[Bf-blender-cvs] [9e76a641afb] modifier-panels-ui: Apply changes from constraints patch and modifiers patch

Hans Goudey noreply at git.blender.org
Tue Jun 9 23:53:10 CEST 2020


Commit: 9e76a641afb1e3a9caf839b479d3ab37e883434d
Author: Hans Goudey
Date:   Tue Jun 9 17:52:57 2020 -0400
Branches: modifier-panels-ui
https://developer.blender.org/rB9e76a641afb1e3a9caf839b479d3ab37e883434d

Apply changes from constraints patch and modifiers patch

===================================================================

M	release/scripts/startup/bl_ui/properties_constraint.py
M	source/blender/blenkernel/BKE_gpencil_modifier.h
M	source/blender/blenkernel/intern/gpencil_modifier.c
M	source/blender/blenkernel/intern/shader_fx.c
M	source/blender/blenloader/intern/versioning_290.c
M	source/blender/editors/interface/interface_templates.c
M	source/blender/editors/object/object_constraint.c
M	source/blender/editors/space_buttons/space_buttons.c
M	source/blender/gpencil_modifiers/intern/MOD_gpencilbuild.c

===================================================================

diff --git a/release/scripts/startup/bl_ui/properties_constraint.py b/release/scripts/startup/bl_ui/properties_constraint.py
index 5243712f64c..da02ce3ad8a 100644
--- a/release/scripts/startup/bl_ui/properties_constraint.py
+++ b/release/scripts/startup/bl_ui/properties_constraint.py
@@ -329,15 +329,16 @@ class OBJECT_PT_bFollowPathConstraint(ConstraintButtonsPanel):
         con = self.get_constraint(context)
         layout.use_property_split = True
         layout.use_property_decorate = True
+        
+        col = layout.column()
+        col.prop(con, "use_curve_follow")
+        col.prop(con, "use_curve_radius")
 
-        layout.prop(con, "use_curve_follow")
-        layout.prop(con, "use_curve_radius")
-
-        layout.prop(con, "use_fixed_location")
+        col.prop(con, "use_fixed_location")
         if con.use_fixed_location:
-            layout.prop(con, "offset_factor", text="Offset")
+            col.prop(con, "offset_factor", text="Offset")
         else:
-            layout.prop(con, "offset")
+            col.prop(con, "offset")
 
         layout.prop(con, "forward_axis", expand=True)
         layout.prop(con, "up_axis", expand=True, text="Up")
@@ -391,39 +392,41 @@ class OBJECT_PT_bLocLimitConstraint(ConstraintButtonsPanel):
         layout.use_property_split = True
         layout.use_property_decorate = True
 
-        row = layout.row(heading="Minimum X", align=True)
+        col = layout.column()
+
+        row = col.row(heading="Minimum X", align=True)
         row.prop(con, "use_min_x", text="")
         sub = row.row()
         sub.active = con.use_min_x
         sub.prop(con, "min_x", text="")
 
-        row = layout.row(heading="Y", align=True)
+        row = col.row(heading="Y", align=True)
         row.prop(con, "use_min_y", text="")
         sub = row.row()
         sub.active = con.use_min_y
         sub.prop(con, "min_y", text="")
 
-        row = layout.row(heading="Z", align=True)
+        row = col.row(heading="Z", align=True)
         row.prop(con, "use_min_z", text="")
         sub = row.row()
         sub.active = con.use_min_z
         sub.prop(con, "min_z", text="")
 
-        layout.separator()
+        col.separator()
 
-        row = layout.row(heading="Maximum X", align=True)
+        row = col.row(heading="Maximum X", align=True)
         row.prop(con, "use_max_x", text="")
         sub = row.row()
         sub.active = con.use_max_x
         sub.prop(con, "max_x", text="")
 
-        row = layout.row(heading="Y", align=True)
+        row = col.row(heading="Y", align=True)
         row.prop(con, "use_max_y", text="")
         sub = row.row()
         sub.active = con.use_max_y
         sub.prop(con, "max_y", text="")
 
-        row = layout.row(heading="Z", align=True)
+        row = col.row(heading="Z", align=True)
         row.prop(con, "use_max_z", text="")
         sub = row.row()
         sub.active = con.use_max_z
@@ -558,11 +561,12 @@ class OBJECT_PT_bSizeLikeConstraint(ConstraintButtonsPanel):
         row.prop(con, "use_y", text="Y", toggle=True)
         row.prop(con, "use_z", text="Z", toggle=True)
 
-        layout.prop(con, "power")
-        layout.prop(con, "use_make_uniform")
+        col = layout.column()
+        col.prop(con, "power")
+        col.prop(con, "use_make_uniform")
 
-        layout.prop(con, "use_offset")
-        row = layout.row()
+        col.prop(con, "use_offset")
+        row = col.row()
         row.active = con.use_offset
         row.prop(con, "use_add")
 
@@ -1198,18 +1202,15 @@ class OBJECT_PT_bTransformCacheConstraint(ConstraintButtonsPanel):
     def draw(self, context):
         layout = self.layout
         con = self.get_constraint(context)
+        layout.use_property_split = True
+        layout.use_property_decorate = True
 
-        layout.label(text="Cache File Properties:")
-        box = layout.box()
-        box.template_cache_file(con, "cache_file")
+        layout.template_cache_file(con, "cache_file")
 
         cache_file = con.cache_file
 
-        layout.label(text="Constraint Properties:")
-        box = layout.box()
-
         if cache_file is not None:
-            box.prop_search(con, "object_path", cache_file, "object_paths")
+            layout.prop_search(con, "object_path", cache_file, "object_paths")
 
         self.draw_influence(layout, con)
 
@@ -1229,8 +1230,9 @@ class OBJECT_PT_bArmatureConstraint(ConstraintButtonsPanel):
         layout.use_property_split = True
         layout.use_property_decorate = True
 
-        layout.prop(con, "use_deform_preserve_volume")
-        layout.prop(con, "use_bone_envelopes")
+        col = layout.column()
+        col.prop(con, "use_deform_preserve_volume")
+        col.prop(con, "use_bone_envelopes")
 
         if context.pose_bone:
             layout.prop(con, "use_current_location")
diff --git a/source/blender/blenkernel/BKE_gpencil_modifier.h b/source/blender/blenkernel/BKE_gpencil_modifier.h
index 646da198e1e..ac5f4607838 100644
--- a/source/blender/blenkernel/BKE_gpencil_modifier.h
+++ b/source/blender/blenkernel/BKE_gpencil_modifier.h
@@ -284,7 +284,7 @@ void BKE_gpencil_modifier_copydata(struct GpencilModifierData *md,
 void BKE_gpencil_modifier_copydata_ex(struct GpencilModifierData *md,
                                       struct GpencilModifierData *target,
                                       const int flag);
-void BKE_gpencil_modifier_setError(struct GpencilModifierData *md, const char *format, ...)
+void BKE_gpencil_modifier_set_error(struct GpencilModifierData *md, const char *format, ...)
     ATTR_PRINTF_FORMAT(2, 3);
 void BKE_gpencil_modifiers_foreach_ID_link(struct Object *ob,
                                            GreasePencilIDWalkFunc walk,
diff --git a/source/blender/blenkernel/intern/gpencil_modifier.c b/source/blender/blenkernel/intern/gpencil_modifier.c
index 0770dae0a50..fa738615d64 100644
--- a/source/blender/blenkernel/intern/gpencil_modifier.c
+++ b/source/blender/blenkernel/intern/gpencil_modifier.c
@@ -603,7 +603,7 @@ GpencilModifierData *BKE_gpencil_modifiers_findby_type(Object *ob, GpencilModifi
   return md;
 }
 
-void BKE_gpencil_modifier_setError(GpencilModifierData *md, const char *_format, ...)
+void BKE_gpencil_modifier_set_error(GpencilModifierData *md, const char *_format, ...)
 {
   char buffer[512];
   va_list ap;
diff --git a/source/blender/blenkernel/intern/shader_fx.c b/source/blender/blenkernel/intern/shader_fx.c
index 69e2e11e390..5381a6d383f 100644
--- a/source/blender/blenkernel/intern/shader_fx.c
+++ b/source/blender/blenkernel/intern/shader_fx.c
@@ -166,7 +166,7 @@ const ShaderFxTypeInfo *BKE_shaderfx_get_info(ShaderFxType type)
 }
 
 /**
- * Get an effect's panel type.
+ * Get an effect's panel type, which was defined in the #panelRegister callback.
  *
  * \note: ShaderFx panel types are assumed to be named with the struct name field concatenated to
  * the defined prefix.
diff --git a/source/blender/blenloader/intern/versioning_290.c b/source/blender/blenloader/intern/versioning_290.c
index c4d7e871ea0..0cd3af67b5f 100644
--- a/source/blender/blenloader/intern/versioning_290.c
+++ b/source/blender/blenloader/intern/versioning_290.c
@@ -283,7 +283,7 @@ void blo_do_versions_290(FileData *fd, Library *UNUSED(lib), Main *bmain)
     }
 
     /* Transition to saving expansion for all of a constraint's subpanels. */
-    if (!DNA_struct_elem_find(fd->filesdna, "bSizeLikeConstraint", "short", "ui_expand_flag")) {
+    if (!DNA_struct_elem_find(fd->filesdna, "bConstraint", "short", "ui_expand_flag")) {
       for (Object *object = bmain->objects.first; object != NULL; object = object->id.next) {
         LISTBASE_FOREACH (bConstraint *, con, &object->constraints) {
           if (con->flag & CONSTRAINT_EXPAND_DEPRECATED) {
@@ -297,8 +297,7 @@ void blo_do_versions_290(FileData *fd, Library *UNUSED(lib), Main *bmain)
     }
 
     /* Transition to saving expansion for all of grease pencil modifier's subpanels. */
-    if (!DNA_struct_elem_find(
-            fd->filesdna, "ThickGpencilModifierData", "short", "ui_expand_flag")) {
+    if (!DNA_struct_elem_find(fd->filesdna, "GpencilModifierData", "short", "ui_expand_flag")) {
       for (Object *object = bmain->objects.first; object != NULL; object = object->id.next) {
         LISTBASE_FOREACH (GpencilModifierData *, md, &object->greasepencil_modifiers) {
           if (md->mode & eGpencilModifierMode_Expanded_DEPRECATED) {
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index a305b4f4e33..ed8afbeb5d1 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -1877,6 +1877,9 @@ void uiTemplateModifiers(uiLayout *UNUSED(layout), bContext *C)
  *  Template for building the panel layout for the active object's modifiers.
  * \{ */
 
+/**
+ * Function with void * argument for #uiListPanelIDFromDataFunc.
+ */
 static void gpencil_modifier_panel_id(void *md_link, char *r_name)
 {
   ModifierData *md = (ModifierData *)md_link;
@@ -1899,7 +1902,7 @@ void uiTemplateGpencilModifiers(uiLayout *UNUSED(layout), bContext *C)
       const GpencilModifierTypeInfo *mti = BKE_gpencil_modifier_get_info(md->type);
       if (mti->panelRegister) {
         char panel_idname[MAX_NAME];
-        BKE_gpencil_modifierType_panel_id(md->type, panel_idname);
+        gpencil_modifier_panel_id(md, panel_idname);
 
         Panel *new_panel = UI_panel_add_instanced(sa, region, &region->panels, panel_idname, i);
         if (new_panel != NULL) {
@@ -1940,6 +1943,7 @@ static void constraint_reorder(bContext *C, Panel *panel, int new_index)
   WM_operator_properties_create_ptr(&props_ptr, ot);
   RNA_string_set(&props_ptr, "constraint", con->name);
   RNA_int_set(&props_ptr, "index", new_index);
+  /* Set owner to #EDIT_CONSTRAINT_OWNER_OBJECT or #EDIT_CONSTRAINT_OWNER_BONE. */
   RNA_enum_set(&props_ptr, "owner", constraint_from_bone ? 1 : 0);
   WM_operator_name_call_ptr(C, ot, WM_OP_INVOKE_DEFAULT, &props_ptr);
   WM_operator_properties_free(&props_ptr);
@@ -1990,7 +1994,7 @@ void uiTemplateConstraints(uiLayout *UNUSED(layout), bContext *C)
     bConstraint *con =

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list