def register(): from . import properties bpy.utils.register_module(__name__) # CUSTOM ICONS INITIALIZATION _icons.init() # PROPERTIES REGISTRATION bpy.types.Object.scs_object_look_inventory = CollectionProperty( type=properties.object.ObjectLooksInventoryItem) bpy.types.Object.scs_object_part_inventory = CollectionProperty( type=properties.object.ObjectPartInventoryItem) bpy.types.Object.scs_object_variant_inventory = CollectionProperty( type=properties.object.ObjectVariantInventoryItem) bpy.types.Object.scs_object_animation_inventory = CollectionProperty( type=properties.object.ObjectAnimationInventoryItem) bpy.types.World.scs_globals = PointerProperty( name="SCS Tools Global Variables", type=properties.world.GlobalSCSProps, description="SCS Tools global variables", ) bpy.types.Object.scs_props = PointerProperty( name="SCS Tools Object Variables", type=properties.object.ObjectSCSTools, description="SCS Tools object variables", ) bpy.types.Scene.scs_props = PointerProperty( name="SCS Tools Scene Variables", type=properties.scene.SceneSCSProps, description="SCS Tools scene variables", ) bpy.types.Mesh.scs_props = PointerProperty( name="SCS Tools Mesh Variables", type=properties.mesh.MeshSCSTools, description="SCS Tools Mesh variables", ) bpy.types.Material.scs_props = PointerProperty( name="SCS Tools Material Variables", type=properties.material.MaterialSCSTools, description="SCS Tools Material variables", ) bpy.types.Action.scs_props = PointerProperty( name="SCS Tools Action Variables", type=properties.action.ActionSCSTools, description="SCS Tools Action variables", ) # REGISTER DYNAMIC PROPERTIES properties.object_dynamic.register() properties.scene_dynamic.register() # PERSISTENT HANDLERS _persistent_callback.enable() # MENU REGISTRATION bpy.types.INFO_MT_file_import.append(menu_func_import) bpy.types.INFO_MT_file_export.append(menu_func_export) bpy.types.INFO_MT_add.prepend(add_menu_func)
def register(): # CUSTOM ICONS INITIALIZATION _icons.register() # REGISTRATION OF OUR PROPERTIES from io_scs_tools.properties import register as props_register props_register() # PROPERTIES REGISTRATION INTO EXISTING CLASSES bpy.types.Object.scs_object_look_inventory = CollectionProperty( type=properties.object.ObjectLooksInventoryItem ) bpy.types.Object.scs_object_part_inventory = CollectionProperty( type=properties.object.ObjectPartInventoryItem ) bpy.types.Object.scs_object_variant_inventory = CollectionProperty( type=properties.object.ObjectVariantInventoryItem ) bpy.types.Object.scs_object_animation_inventory = CollectionProperty( type=properties.object.ObjectAnimationInventoryItem ) bpy.types.WorkSpace.scs_props = PointerProperty( name="SCS Tools Workspace Variables", type=properties.workspace.WorkspaceSCSProps, description="SCS Tools workspace variables" ) bpy.types.Object.scs_props = PointerProperty( name="SCS Tools Object Variables", type=properties.object.ObjectSCSTools, description="SCS Tools object variables", ) bpy.types.Scene.scs_props = PointerProperty( name="SCS Tools Scene Variables", type=properties.scene.SceneSCSProps, description="SCS Tools scene variables", ) bpy.types.Mesh.scs_props = PointerProperty( name="SCS Tools Mesh Variables", type=properties.mesh.MeshSCSTools, description="SCS Tools Mesh variables", ) bpy.types.Material.scs_props = PointerProperty( name="SCS Tools Material Variables", type=properties.material.MaterialSCSTools, description="SCS Tools Material variables", ) bpy.types.Action.scs_props = PointerProperty( name="SCS Tools Action Variables", type=properties.action.ActionSCSTools, description="SCS Tools Action variables", ) # REGISTER UI from io_scs_tools.ui import register as ui_register ui_register() # REGISTER OPERATORS from io_scs_tools.operators import register as ops_register ops_register() # MAIN MODULE REGISTRATION for cls in classes: bpy.utils.register_class(cls) # MENU REGISTRATION bpy.types.TOPBAR_MT_editor_menus.append(menu_scs_tools) bpy.types.TOPBAR_MT_file_import.append(menu_func_import) bpy.types.TOPBAR_MT_file_export.append(menu_func_export) bpy.types.VIEW3D_MT_add.prepend(add_menu_func) # PERSISTENT HANDLERS _persistent_callback.enable()
def register(): from . import properties bpy.utils.register_module(__name__) # CUSTOM ICONS CLEANUP _icons.init() # PROPERTIES REGISTRATION bpy.types.Object.scs_object_look_inventory = CollectionProperty( type=properties.object.ObjectLooksInventoryItem ) bpy.types.Object.scs_object_part_inventory = CollectionProperty( type=properties.object.ObjectPartInventoryItem ) bpy.types.Object.scs_object_variant_inventory = CollectionProperty( type=properties.object.ObjectVariantInventoryItem ) bpy.types.Object.scs_object_animation_inventory = CollectionProperty( type=properties.object.ObjectAnimationInventoryItem ) bpy.types.World.scs_shader_presets_inventory = CollectionProperty( type=properties.world.ShaderPresetsInventoryItem ) bpy.types.World.scs_globals = PointerProperty( name="SCS Tools Global Variables", type=properties.world.GlobalSCSProps, description="SCS Tools global variables", ) bpy.types.Object.scs_props = PointerProperty( name="SCS Tools Object Variables", type=properties.object.ObjectSCSTools, description="SCS Tools object variables", ) bpy.types.Scene.scs_props = PointerProperty( name="SCS Tools Scene Variables", type=properties.scene.SceneSCSProps, description="SCS Tools scene variables", ) bpy.types.Mesh.scs_props = PointerProperty( name="SCS Tools Mesh Variables", type=properties.mesh.MeshSCSTools, description="SCS Tools Mesh variables", ) bpy.types.Material.scs_props = PointerProperty( name="SCS Tools Material Variables", type=properties.material.MaterialSCSTools, description="SCS Tools Material variables", ) bpy.types.Action.scs_props = PointerProperty( name="SCS Tools Action Variables", type=properties.action.ActionSCSTools, description="SCS Tools Action variables", ) # REGISTER DYNAMIC PROPERTIES properties.object_dynamic.register() properties.scene_dynamic.register() # PERSISTENT HANDLERS _persistent_callback.enable() # MENU REGISTRATION bpy.types.INFO_MT_file_import.append(menu_func_import) bpy.types.INFO_MT_file_export.append(menu_func_export)
def register(): from . import properties bpy.utils.register_module(__name__) # PROPERTIES REGISTRATION bpy.types.Object.scs_object_part_inventory = CollectionProperty( type=properties.object.ObjectPartInventory) bpy.types.Object.scs_object_variant_inventory = CollectionProperty( type=properties.object.ObjectVariantInventory) bpy.types.Object.scs_object_animation_inventory = CollectionProperty( type=properties.object.ObjectAnimationInventory) bpy.types.Scene.scs_shader_presets_inventory = CollectionProperty( type=properties.scene.SceneShaderPresetsInventory) # bpy.types.Scene.scs_cgfx_template_inventory = CollectionProperty( # type=scene_props.SceneCgFXTemplateInventory # ) # # bpy.types.Scene.scs_cgfx_inventory = CollectionProperty( # type=scene_props.SceneCgFXShaderInventory # ) # # bpy.types.Material.scs_cgfx_looks = CollectionProperty( # type=material_props.MaterialCgFXShaderLooks # ) bpy.types.World.scs_globals = PointerProperty( name="SCS Tools Global Variables", type=properties.scene.GlobalSCSProps, description="SCS Tools global variables", ) bpy.types.Object.scs_props = PointerProperty( name="SCS Tools Object Variables", type=properties.object.ObjectSCSTools, description="SCS Tools object variables", ) bpy.types.Scene.scs_props = PointerProperty( name="SCS Tools Scene Variables", type=properties.scene.SceneSCSProps, description="SCS Tools scene variables", ) bpy.types.Mesh.scs_props = PointerProperty( name="SCS Tools Mesh Variables", type=properties.mesh.MeshSCSTools, description="SCS Tools Mesh variables", ) bpy.types.Armature.scs_props = PointerProperty( name="SCS Tools Armature Variables", type=properties.armature.ArmatureSCSTools, description="SCS Tools Armature variables", ) bpy.types.Material.scs_props = PointerProperty( name="SCS Tools Material Variables", type=properties.material.MaterialSCSTools, description="SCS Tools Material variables", ) bpy.types.Action.scs_props = PointerProperty( name="SCS Tools Action Variables", type=properties.action.ActionSCSTools, description="SCS Tools Action variables", ) # REGISTER DYNAMIC PROPERTIES properties.object_dynamic.register() properties.scene_dynamic.register() # PERSISTENT HANDLERS _persistent_callback.enable() # MENU REGISTRATION bpy.types.INFO_MT_file_import.append(menu_func_import) bpy.types.INFO_MT_file_export.append(menu_func_export)