Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2020-11-13 00:59:30 +0300
committerHans Goudey <h.goudey@me.com>2020-11-13 00:59:30 +0300
commit55e2930c18a4953b5b7d999896e0f86c4794870a (patch)
tree8481d238342d93863a40a36094e25162586bda65 /source
parentb6988de22a9c1b78fe4f5ddedfd4467db1d8e209 (diff)
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
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/space_outliner/outliner_select.c22
1 files changed, 21 insertions, 1 deletions
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;