(On Hold) Rework Properties UI Editor #159

Open
Demeter Dzadik wants to merge 10 commits from new-props-ux into master

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
3 changed files with 28 additions and 0 deletions
Showing only changes of commit fd02c2e7eb - Show all commits

View File

@ -946,6 +946,10 @@ class CLOUDRIG_PT_settings(CLOUDRIG_PT_base):
if rig.cloudrig.ui_edit_mode:
if hasattr(bpy.ops.pose, 'cloudrig_add_property_to_ui'):
layout.operator('pose.cloudrig_add_property_to_ui', icon='ADD')
if hasattr(bpy.ops.object, 'cloudrig_ui_element_add'):
layout.operator('object.cloudrig_ui_element_add', icon='ADD')
else:
print("Why didn't the class register")
if ui_data:
for panel_name, panel_data in ui_data.items():

View File

@ -9,6 +9,7 @@ from . import (
object,
parenting,
properties_ui,
properties_ui_editor,
)
@ -23,6 +24,7 @@ modules = [
parenting,
properties_ui,
component_params_ui,
properties_ui_editor,
]
# Dictionary of modules that have a Params class, and want to register

View File

@ -0,0 +1,22 @@
from ..generation.cloudrig import CloudRig_UIElement
from bpy.types import Operator
class CLOUDRIG_OT_ui_element_add(Operator):
"""Add a UI element"""
bl_idname = "object.cloudrig_ui_element_add"
bl_label = "Add Property to UI"
bl_options = {'REGISTER', 'UNDO'}
# Copy the definition of a single UIElement, which will be added
# by this operator, when the "OK" button is clicked.
__annotations__ = CloudRig_UIElement.__annotations__
def execute(self, context):
return {'FINISHED'}
registry = [
CLOUDRIG_OT_ui_element_add
]