[Bf-blender-cvs] [76e9cdc90a4] modifier-panels-ui: Merge branch 'master' into modifier-panels-ui

Hans Goudey noreply at git.blender.org
Fri Jun 5 18:46:52 CEST 2020


Commit: 76e9cdc90a43458ab0bb5d66883631f9dc5fe53b
Author: Hans Goudey
Date:   Fri Jun 5 11:34:10 2020 -0400
Branches: modifier-panels-ui
https://developer.blender.org/rB76e9cdc90a43458ab0bb5d66883631f9dc5fe53b

Merge branch 'master' into modifier-panels-ui

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



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

diff --cc source/blender/blenloader/intern/versioning_290.c
index 207cee5ac50,c5628b43960..c4d7e871ea0
--- a/source/blender/blenloader/intern/versioning_290.c
+++ b/source/blender/blenloader/intern/versioning_290.c
@@@ -100,47 -267,17 +268,47 @@@ void blo_do_versions_290(FileData *fd, 
    {
      /* Keep this block, even when empty. */
  
-     /* Transition to saving expansion for all of a constraint's subpanels. */
-     if (!DNA_struct_elem_find(fd->filesdna, "bSizeLikeConstraint", "short", "ui_expand_flag")) {
++    /* Transition to saving expansion for all of a modifier's subpanels. */
+     if (!DNA_struct_elem_find(fd->filesdna, "ModifierData", "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) {
-             con->ui_expand_flag = 1;
+         LISTBASE_FOREACH (ModifierData *, md, &object->modifiers) {
+           if (md->mode & eModifierMode_Expanded_DEPRECATED) {
+             md->ui_expand_flag = 1;
            }
            else {
-             con->ui_expand_flag = 0;
+             md->ui_expand_flag = 0;
            }
          }
        }
      }
 +
-     /* Transition to saving expansion for all of a modifier's subpanels. */
-     if (!DNA_struct_elem_find(fd->filesdna, "SolidifyModifierData", "short", "ui_expand_flag")) {
++    /* Transition to saving expansion for all of a constraint's subpanels. */
++    if (!DNA_struct_elem_find(fd->filesdna, "bSizeLikeConstraint", "short", "ui_expand_flag")) {
 +      for (Object *object = bmain->objects.first; object != NULL; object = object->id.next) {
-         LISTBASE_FOREACH (ModifierData *, md, &object->modifiers) {
-           if (md->mode & eModifierMode_Expanded_DEPRECATED) {
-             md->ui_expand_flag = 1;
++        LISTBASE_FOREACH (bConstraint *, con, &object->constraints) {
++          if (con->flag & CONSTRAINT_EXPAND_DEPRECATED) {
++            con->ui_expand_flag = 1;
 +          }
 +          else {
-             md->ui_expand_flag = 0;
++            con->ui_expand_flag = 0;
 +          }
 +        }
 +      }
 +    }
 +
 +    /* Transition to saving expansion for all of grease pencil modifier's subpanels. */
 +    if (!DNA_struct_elem_find(
 +            fd->filesdna, "ThickGpencilModifierData", "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) {
 +            md->ui_expand_flag = 1;
 +          }
 +          else {
 +            md->ui_expand_flag = 0;
 +          }
 +        }
 +      }
 +    }
    }
  }
diff --cc source/blender/editors/interface/interface_templates.c
index 46a0fd43a7f,1d55e2b3e4b..0661dce1869
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@@ -2333,14 -2435,13 +2348,14 @@@ void uiTemplateOperatorRedoProperties(u
  /** \name Constraint Template
   * \{ */
  
 +#define ERROR_LIBDATA_MESSAGE TIP_("Can't edit external library data")
 +
  static void constraint_active_func(bContext *UNUSED(C), void *ob_v, void *con_v)
  {
-   ED_object_constraint_set_active(ob_v, con_v);
+   ED_object_constraint_active_set(ob_v, con_v);
  }
  
 -/* draw panel showing settings for a constraint */
 -static uiLayout *draw_constraint(uiLayout *layout, Object *ob, bConstraint *con)
 +static void draw_constraint_header(uiLayout *layout, Object *ob, bConstraint *con)
  {
    bPoseChannel *pchan = BKE_pose_channel_active(ob);
    const bConstraintTypeInfo *cti;
diff --cc source/blender/editors/space_buttons/space_buttons.c
index e3f7cffc8ed,187334a5c34..5ab3304c0e6
--- a/source/blender/editors/space_buttons/space_buttons.c
+++ b/source/blender/editors/space_buttons/space_buttons.c
@@@ -30,15 -30,11 +30,17 @@@
  #include "BLI_utildefines.h"
  
  #include "BKE_context.h"
- #include "BKE_gpencil_modifier.h" /* Types for regiestering panels. */
++#include "BKE_gpencil_modifier.h" /* Types for registering panels. */
  #include "BKE_modifier.h"
  #include "BKE_screen.h"
 +#include "BKE_shader_fx.h"
 +
 +#include "DNA_gpencil_modifier_types.h" /* Registering list panels. */
 +#include "DNA_modifier_types.h"
 +#include "DNA_shader_fx_types.h"
  
+ #include "DNA_modifier_types.h"
+ 
  #include "ED_screen.h"
  #include "ED_space_api.h"
  #include "ED_view3d.h" /* To draw toolbar UI. */
diff --cc source/blender/makesrna/intern/rna_constraint.c
index 9f627f9d407,5405cb4e24a..12265a8e1f7
--- a/source/blender/makesrna/intern/rna_constraint.c
+++ b/source/blender/makesrna/intern/rna_constraint.c
@@@ -3265,9 -3380,8 +3380,8 @@@ void RNA_def_constraint(BlenderRNA *brn
  
    prop = RNA_def_property(srna, "show_expanded", PROP_BOOLEAN, PROP_NONE);
    RNA_def_property_flag(prop, PROP_NO_DEG_UPDATE);
 -  RNA_def_property_boolean_sdna(prop, NULL, "flag", CONSTRAINT_EXPAND);
 -  RNA_def_property_ui_text(prop, "Expanded", "Constraint's panel is expanded in UI");
 +  RNA_def_property_boolean_sdna(prop, NULL, "ui_expand_flag", 0);
 +  RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
-   RNA_def_property_ui_text(prop, "Expanded", "Constraint's panel is expanded in UI");
    RNA_def_property_ui_icon(prop, ICON_DISCLOSURE_TRI_RIGHT, 1);
  
    /* XXX this is really an internal flag,
diff --cc source/blender/modifiers/intern/MOD_cast.c
index a6137ae2990,2f475e9fca6..6ce3cc52ef2
--- a/source/blender/modifiers/intern/MOD_cast.c
+++ b/source/blender/modifiers/intern/MOD_cast.c
@@@ -538,9 -543,7 +543,6 @@@ static void panel_draw(const bContext *
    PointerRNA ptr;
    PointerRNA ob_ptr;
    modifier_panel_get_property_pointers(C, panel, &ob_ptr, &ptr);
-   modifier_panel_buttons(C, panel);
--
-   bool has_vertex_group = RNA_string_length(&ptr, "vertex_group") != 0;
    PointerRNA cast_object_ptr = RNA_pointer_get(&ptr, "object");
  
    uiLayoutSetPropSep(layout, true);
diff --cc source/blender/modifiers/intern/MOD_subsurf.c
index 9e3d13432a0,2b2f6893a2e..affd3eece0a
--- a/source/blender/modifiers/intern/MOD_subsurf.c
+++ b/source/blender/modifiers/intern/MOD_subsurf.c
@@@ -328,11 -328,7 +328,6 @@@ static void panel_draw(const bContext *
    PointerRNA ptr;
    PointerRNA ob_ptr;
    modifier_panel_get_property_pointers(C, panel, &ob_ptr, &ptr);
-   modifier_panel_buttons(C, panel);
--
-   PointerRNA scene_ptr;
-   Scene *scene = CTX_data_scene(C);
-   RNA_id_pointer_create(&scene->id, &scene_ptr);
    /* Only test for adaptive subdivision if built with cycles. */
    bool show_adaptive_options = false;
    bool ob_use_adaptive_subdivision = false;



More information about the Bf-blender-cvs mailing list