On Mon, Aug 2, 2010 at 2:14 AM, Martin Poirier <[email protected]> wrote:
> Hi,
>
> As mentioned during meeting, now that most of the bugs with rna types are 
> fixed, I really think it's time to revisit my earlier proposal for metaclass 
> based automatic registration.
>
> Here was the proposal: 
> http://lists.blender.org/pipermail/bf-committers/2010-February/026328.html
>
> And here's the updated patch: 
> http://blenderartists.org/~theeth/bf/register.patch
>
> Previous criticism was that it didn't handle running stuff from the text 
> window (that's fixed now) and that it made debugging harder (during 
> development, I added debug code that would spit out a list of all registered 
> type, the module they came from (with complete back trace to declaration 
> path), the order they were loaded in and so forth).
>
> Any other questions or objections, I'd be happy to discuss.
>
> Martin

Looks good, give useful backtraces and removes class list cruft,
you'll probably want to commit this patch yourself.

notes...
* would prefer not to have to subclass 2 types, but guess we cant get
around this, no big deal. eg.
class PHYSICS_PT_domain_particles(PhysicButtonsPanel, bpy.types.Panel):

* addons will need LoadModule() called from WM_OT_addon_enable, at the
moment they use the old style register.

* many addons will need updating, (heads up for Luca and Brendon!)

* perhaps we could make register/unregister optional class methods and
remove from the module, have to think about this, it would be annoying
if you didn't want to register a class but DID want to run
register/unregister functions though currently we don't do this AFAIK.

- Campbell
_______________________________________________
Bf-committers mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-committers

Reply via email to