Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Inch <mythologylover75@gmail.com>2020-07-18 07:32:07 +0300
committerRyan Inch <mythologylover75@gmail.com>2020-07-18 07:32:07 +0300
commit52edc5f41f231eac04415f3722a354ab5972b03a (patch)
treef362ad054e4579907ddf88b8f950eee0f4f07b11 /object_collection_manager/__init__.py
parentbda1b8bc98bc0315f1090c131fab19a3b282e047 (diff)
Collection Manager: Add to menus. Task: T69577
Add the main collection manager window and the QCD move widget to the Object->Collection menu, formerly these were only accessible through hotkeys. Improve tooltips to better describe what these do.
Diffstat (limited to 'object_collection_manager/__init__.py')
-rw-r--r--object_collection_manager/__init__.py20
1 files changed, 19 insertions, 1 deletions
diff --git a/object_collection_manager/__init__.py b/object_collection_manager/__init__.py
index 928a62ec..e8b8f25c 100644
--- a/object_collection_manager/__init__.py
+++ b/object_collection_manager/__init__.py
@@ -22,7 +22,7 @@ bl_info = {
"name": "Collection Manager",
"description": "Manage collections and their objects",
"author": "Ryan Inch",
- "version": (2, 9, 2),
+ "version": (2, 9, 3),
"blender": (2, 80, 0),
"location": "View3D - Object Mode (Shortcut - M)",
"warning": '', # used for warning icon and text in addons panel
@@ -133,6 +133,18 @@ def undo_redo_post_handler(dummy):
internals.move_selection.clear()
internals.move_active = None
+
+def menu_addition(self, context):
+ layout = self.layout
+
+ layout.operator('view3d.collection_manager')
+
+ if bpy.context.preferences.addons[__package__].preferences.enable_qcd:
+ layout.operator('view3d.qcd_move_widget')
+
+ layout.separator()
+
+
def register():
for cls in classes:
bpy.utils.register_class(cls)
@@ -145,6 +157,9 @@ def register():
kmi = km.keymap_items.new('view3d.collection_manager', 'M', 'PRESS')
addon_keymaps.append((km, kmi))
+ # Add Collection Manager & QCD Move Widget to the Object->Collections menu
+ bpy.types.VIEW3D_MT_object_collection.prepend(menu_addition)
+
bpy.app.handlers.depsgraph_update_post.append(depsgraph_update_post_handler)
bpy.app.handlers.undo_post.append(undo_redo_post_handler)
bpy.app.handlers.redo_post.append(undo_redo_post_handler)
@@ -159,6 +174,9 @@ def unregister():
for cls in classes:
bpy.utils.unregister_class(cls)
+ # Remove Collection Manager & QCD Move Widget from the Object->Collections menu
+ bpy.types.VIEW3D_MT_object_collection.remove(menu_addition)
+
bpy.app.handlers.depsgraph_update_post.remove(depsgraph_update_post_handler)
bpy.app.handlers.undo_post.remove(undo_redo_post_handler)
bpy.app.handlers.redo_post.remove(undo_redo_post_handler)