[Bf-blender-cvs] [30395a491f5] master: Fix T77073: Objects cannot be activated after collection exclude
Nathan Craddock
noreply at git.blender.org
Thu Jun 4 13:48:20 CEST 2020
Commit: 30395a491f5aa0764b57cb8b715740152d61fdcc
Author: Nathan Craddock
Date: Thu Jun 4 21:46:40 2020 +1000
Branches: master
https://developer.blender.org/rB30395a491f5aa0764b57cb8b715740152d61fdcc
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.
===================================================================
M source/blender/editors/object/object_modes.c
===================================================================
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);
More information about the Bf-blender-cvs
mailing list