def register():
if DEBUG: print("Urho export register")
#bpy.utils.register_module(__name__)
bpy.utils.register_class(UrhoAddonPreferences)
bpy.utils.register_class(UrhoExportSettings)
bpy.utils.register_class(UrhoExportOperator)
bpy.utils.register_class(UrhoExportResetOperator)
bpy.utils.register_class(UrhoExportResetPathsOperator)
bpy.utils.register_class(UrhoExportRenderPanel)
bpy.utils.register_class(UrhoReportDialog)
bpy.utils.register_class(UrhoComponentsPanel)
bpy.utils.register_class(UrhoComponentModelResetOperator)
bpy.utils.register_class(UrhoComponentShapeResetOperator)
bpy.utils.register_class(UrhoComponentBodyResetOperator)
Scene.urho_exportsettings = PointerProperty(type=UrhoExportSettings)
bpy.context.user_preferences.filepaths.use_relative_paths = False
if not PostLoad in bpy.app.handlers.load_post:
bpy.app.handlers.load_post.append(PostLoad)
# Note: the script __init__.py is executed only the first time the addons is enabled. After that
# disabling or enabling the script will only call unregister() or register(). So in unregister()
# delete only objects created with register(), do not delete global objects as they will not be
# created re-enabling the addon.
# __init__.py is re-executed pressing F8 or randomly(?) enabling the addon.
# Called when the addon is disabled. Here we remove our UI classes.
评论列表
文章目录