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
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')
-rw-r--r--object_collection_manager/__init__.py20
-rw-r--r--object_collection_manager/qcd_move_widget.py2
-rw-r--r--object_collection_manager/ui.py1
3 files changed, 21 insertions, 2 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)
diff --git a/object_collection_manager/qcd_move_widget.py b/object_collection_manager/qcd_move_widget.py
index 95e25058..85f63f58 100644
--- a/object_collection_manager/qcd_move_widget.py
+++ b/object_collection_manager/qcd_move_widget.py
@@ -372,7 +372,7 @@ def update_area_dimensions(area, w=0, h=0):
area["height"] += h
class QCDMoveWidget(Operator):
- """QCD Move Widget"""
+ """Move objects to QCD Slots"""
bl_idname = "view3d.qcd_move_widget"
bl_label = "QCD Move Widget"
diff --git a/object_collection_manager/ui.py b/object_collection_manager/ui.py
index 3bd614a6..76c44bb0 100644
--- a/object_collection_manager/ui.py
+++ b/object_collection_manager/ui.py
@@ -58,6 +58,7 @@ last_icon_theme_text_sel = None
class CollectionManager(Operator):
+ '''Manage and control collections, with advanced features, in a popup UI'''
bl_label = "Collection Manager"
bl_idname = "view3d.collection_manager"