diff options
author | Nathan Craddock <nzcraddock@gmail.com> | 2020-06-04 14:46:40 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-06-04 14:48:04 +0300 |
commit | 30395a491f5aa0764b57cb8b715740152d61fdcc (patch) | |
tree | 754872e4932f997610036633ea9a96bb19240be6 /source | |
parent | c7c3908b8ee2fd5d17178a95b62d35725435d116 (diff) |
Fix T77073: Objects cannot be activated after collection exclude
When excluding a collection containing the active object in either
texture paint or particle edit mode, the object could not be reactivated
when the collection was re-enabled. This is because the object's mode
was left in TEXTURE_PAINT or PARTICLE_EDIT, and the activation code did
not have cases to handle these modes.
This moves the code that is run when toggling out of texture paint or
particle edit modes to functions so activation can properly toggle off
the respective interaction mode.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/object/object_modes.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/editors/object/object_modes.c b/source/blender/editors/object/object_modes.c index fbd935c2e55..c518fd32c7f 100644 --- a/source/blender/editors/object/object_modes.c +++ b/source/blender/editors/object/object_modes.c @@ -274,6 +274,18 @@ static bool ed_object_mode_generic_exit_ex(struct Main *bmain, ED_object_posemode_exit_ex(bmain, ob); } } + else if (ob->mode & OB_MODE_TEXTURE_PAINT) { + if (only_test) { + return true; + } + ED_object_texture_paint_mode_exit_ex(bmain, scene, ob); + } + else if (ob->mode & OB_MODE_PARTICLE_EDIT) { + if (only_test) { + return true; + } + ED_object_particle_edit_mode_exit_ex(scene, ob); + } else if (ob->type == OB_GPENCIL) { /* Accounted for above. */ BLI_assert((ob->mode & OB_MODE_OBJECT) == 0); |