[Bf-blender-cvs] [55e2930c18a] master: Outliner: Sync with property editor physics tab

Hans Goudey noreply at git.blender.org
Thu Nov 12 22:59:36 CET 2020


Commit: 55e2930c18a4953b5b7d999896e0f86c4794870a
Author: Hans Goudey
Date:   Thu Nov 12 16:59:30 2020 -0500
Branches: master
https://developer.blender.org/rB55e2930c18a4953b5b7d999896e0f86c4794870a

Outliner: Sync with property editor physics tab

This commit makes the property editor switch to the physics tab instead
of the modifier tab when selecting physics modifiers. Since the modifier
isn't visible then, it's confusing to change the expansion, so this commit
also disables the modifier expansion for these modifiers.

Differential Revision: https://developer.blender.org/D9544

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

M	source/blender/editors/space_outliner/outliner_select.c

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

diff --git a/source/blender/editors/space_outliner/outliner_select.c b/source/blender/editors/space_outliner/outliner_select.c
index 044d75b4722..064d6531bf4 100644
--- a/source/blender/editors/space_outliner/outliner_select.c
+++ b/source/blender/editors/space_outliner/outliner_select.c
@@ -1184,7 +1184,27 @@ static void outliner_set_properties_tab(bContext *C, TreeElement *te, TreeStoreE
             BKE_gpencil_modifier_panel_expand(te->directdata);
           }
           else {
-            BKE_modifier_panel_expand(te->directdata);
+            ModifierData *md = (ModifierData *)te->directdata;
+
+            switch ((ModifierType)md->type) {
+              case eModifierType_ParticleSystem:
+                context = BCONTEXT_PARTICLE;
+                break;
+              case eModifierType_Cloth:
+              case eModifierType_Softbody:
+              case eModifierType_Collision:
+              case eModifierType_Fluidsim:
+              case eModifierType_DynamicPaint:
+              case eModifierType_Fluid:
+                context = BCONTEXT_PHYSICS;
+                break;
+              default:
+                break;
+            }
+
+            if (context == BCONTEXT_MODIFIER) {
+              BKE_modifier_panel_expand(md);
+            }
           }
         }
         break;



More information about the Bf-blender-cvs mailing list