make register and unregister functional
authorCampbell Barton <ideasman42@gmail.com>
Tue, 3 Sep 2013 04:04:33 +0000 (04:04 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 3 Sep 2013 04:04:33 +0000 (04:04 +0000)
oscurart_mesh_cache_tools.py

index 8da9072..7b2cfb3 100755 (executable)
@@ -16,16 +16,6 @@ import sys
 import os
 import struct
 
-bpy.types.Scene.muu_pc2_rotx = bpy.props.BoolProperty(default=True, name="Rotx = 90")
-bpy.types.Scene.muu_pc2_world_space = bpy.props.BoolProperty(default=True, name="World Space")
-bpy.types.Scene.muu_pc2_modifiers = bpy.props.BoolProperty(default=True, name="Apply Modifiers")
-bpy.types.Scene.muu_pc2_subsurf = bpy.props.BoolProperty(default=True, name="Turn Off SubSurf")
-bpy.types.Scene.muu_pc2_start = bpy.props.IntProperty(default=0, name="Frame Start")
-bpy.types.Scene.muu_pc2_end = bpy.props.IntProperty(default=100, name="Frame End")
-bpy.types.Scene.muu_pc2_group = bpy.props.StringProperty()
-bpy.types.Scene.muu_pc2_folder = bpy.props.StringProperty(default="Set me Please!")
-bpy.types.Scene.muu_pc2_relative_path = bpy.props.StringProperty(default="")
-
 class OscEPc2ExporterPanel(bpy.types.Panel):
     """Creates a Panel in the Object properties window"""
     bl_label = "Mesh Cache Tools"
@@ -243,9 +233,38 @@ class OscMeshCacheUp(bpy.types.Operator):
     
 
 def register():
+    from bpy.types import Scene
+    from bpy.props import (BoolProperty,
+                           IntProperty,
+                           StringProperty,
+                           )
+    
+    Scene.muu_pc2_rotx = BoolProperty(default=True, name="Rotx = 90")
+    Scene.muu_pc2_world_space = BoolProperty(default=True, name="World Space")
+    Scene.muu_pc2_modifiers = BoolProperty(default=True, name="Apply Modifiers")
+    Scene.muu_pc2_subsurf = BoolProperty(default=True, name="Turn Off SubSurf")
+    Scene.muu_pc2_start = IntProperty(default=0, name="Frame Start")
+    Scene.muu_pc2_end = IntProperty(default=100, name="Frame End")
+    Scene.muu_pc2_group = StringProperty()
+    Scene.muu_pc2_folder = StringProperty(default="Set me Please!")
+    Scene.muu_pc2_relative_path = StringProperty(default="")
+
     bpy.utils.register_module(__name__)
 
+
 def unregister():
+    from bpy.types import Scene
+
+    del Scene.muu_pc2_rotx
+    del Scene.muu_pc2_world_space
+    del Scene.muu_pc2_modifiers
+    del Scene.muu_pc2_subsurf
+    del Scene.muu_pc2_start
+    del Scene.muu_pc2_end
+    del Scene.muu_pc2_group
+    del Scene.muu_pc2_folder
+    del Scene.muu_pc2_relative_path
+
     bpy.utils.unregister_module(__name__)
 
 if __name__ == "__main__":