[Bf-committers] [Bf-blender-cvs] SVN commit: /data/svn/bf-blender [35659] trunk/blender/release/scripts/ modules/bpy/utils.py: patch from Martin, call classes register/ unregister functions.

Jeff Doyle shelleydoyle at eastlink.ca
Mon Mar 21 18:04:19 CET 2011


I like this patch since it does make things a little cleaner when
registering my rna types but I ran into a little problem.

One of my types had an attribute that was called register which was not
a method and of course the method register_module() in utils.py tries to
call it.  I have since renamed that property.  But maybe a check could
be done to see if the attribute is a method (ie is callable).

  But there is a problem with lines 444 and 466 in utils.py.  The

print("\t", path, "line", line)

fails since "path" and "line" are not defined.  I've commented out these
lines in my own repo and the traceback gives enough info to find where
the exception occurs.  All the other exception sections in utils.py do
not use the print, just the traceback.  So I think its safe to remove
those lines.

Jeff Doyle (nfz)

More information about the Bf-committers mailing list