[Bf-extensions-cvs] [a6221258] blender2.8: Fix copy-attributes menu registration
Campbell Barton
noreply at git.blender.org
Thu Jul 12 15:45:10 CEST 2018
Commit: a6221258081ac6aa5666cb4bcaeb93365c12ef81
Author: Campbell Barton
Date: Thu Jul 12 15:44:27 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBAa6221258081ac6aa5666cb4bcaeb93365c12ef81
Fix copy-attributes menu registration
Was using recently removed 'register_modules'
===================================================================
M space_view3d_copy_attributes.py
===================================================================
diff --git a/space_view3d_copy_attributes.py b/space_view3d_copy_attributes.py
index d8b19b9d..fecbcf64 100644
--- a/space_view3d_copy_attributes.py
+++ b/space_view3d_copy_attributes.py
@@ -836,8 +836,25 @@ class MESH_OT_CopyFaceSettings(Operator):
return(retval)
+classes = (
+ CopySelectedPoseConstraints,
+ VIEW3D_MT_posecopypopup,
+ CopySelectedObjectConstraints,
+ CopySelectedObjectModifiers,
+ VIEW3D_MT_copypopup,
+ MESH_MT_CopyFaceSettings,
+ MESH_MT_CopyImagesFromLayer,
+ MESH_MT_CopyUVCoordsFromLayer,
+ MESH_MT_CopyVertexColorsFromLayer,
+ MESH_OT_CopyFaceSettings,
+ *pose_ops,
+ *object_ops,
+)
+
def register():
- bpy.utils.register_module(__name__)
+ from bpy.utils import register_class
+ for cls in classes:
+ register_class(cls)
# mostly to get the keymap working
kc = bpy.context.window_manager.keyconfigs.addon
@@ -886,7 +903,9 @@ def unregister():
if kmi.properties.name == 'VIEW3D_MT_copypopup':
km.keymap_items.remove(kmi)
- bpy.utils.unregister_module(__name__)
+ from bpy.utils import unregister_class
+ for cls in classes:
+ unregister_class(cls)
if __name__ == "__main__":
More information about the Bf-extensions-cvs
mailing list