[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [1899] contrib/py/scripts/addons/ add_curve_sapling/__init__.py: Fixed registration issue for latest Blender revision.

Andrew Hale TrumanBlending at gmail.com
Sat May 7 14:54:48 CEST 2011


Revision: 1899
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=1899
Author:   trumanblending
Date:     2011-05-07 12:54:47 +0000 (Sat, 07 May 2011)
Log Message:
-----------
Fixed registration issue for latest Blender revision. Fix supplied by Meta-Androcto.

Modified Paths:
--------------
    contrib/py/scripts/addons/add_curve_sapling/__init__.py

Modified: contrib/py/scripts/addons/add_curve_sapling/__init__.py
===================================================================
--- contrib/py/scripts/addons/add_curve_sapling/__init__.py	2011-05-07 10:13:07 UTC (rev 1898)
+++ contrib/py/scripts/addons/add_curve_sapling/__init__.py	2011-05-07 12:54:47 UTC (rev 1899)
@@ -522,31 +522,14 @@
     self.layout.operator(AddTree.bl_idname, text="Add Tree", icon='PLUGIN')
 
 def register():
-    bpy.utils.register_class(AddTree)
-    bpy.utils.register_class(PresetMenu)
-    bpy.utils.register_class(ImportData)
-    bpy.utils.register_class(ExportData)
-    #bpy.utils.register_class(SaplingProps)
+    bpy.utils.register_module(__name__)
+
     bpy.types.INFO_MT_curve_add.append(menu_func)
-    #bpy.types.WindowManager.sapling = bpy.props.PointerProperty(type = SaplingProps)
 
 def unregister():
-    bpy.utils.unregister_class(AddTree)
-    bpy.utils.unregister_class(PresetMenu)
-    bpy.utils.unregister_class(ImportData)
-    bpy.utils.unregister_class(ExportData)
+    bpy.utils.unregister_module(__name__)
+
     bpy.types.INFO_MT_curve_add.remove(menu_func)
-    try:
-        del bpy.types.WindowManager.sapling
-    except:
-        pass
 
 if __name__ == "__main__":
-    register()
-
-class panelTest(AddTree, bpy.types.Panel):
-    bl_idname = "VIEW3D_PT_test_1"
-    bl_label = "Panel One"
-
-    def draw(self, context):
-        self.layout.label("Small Class")
\ No newline at end of file
+    register()
\ No newline at end of file



More information about the Bf-extensions-cvs mailing list