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
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2021-05-07 04:03:45 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-05-07 04:23:09 +0300
commit4243ee7d1956f689a9354a2e27d2854f0f4263b9 (patch)
tree0e79202836e8e4f4b18bcb9db8dd3b9c13b026bc /source/blender/editors/object
parent78b2b5fc0e3063656ace8d37f18a8873f6ef06e6 (diff)
Object Mode: avoid error message with particle-edit mode switch
Mode switching passed through when the mode wasn't supported for all modes except particle edit-mode. Add a check to ED_object_mode_compat_test to prevent the error message.
Diffstat (limited to 'source/blender/editors/object')
-rw-r--r--source/blender/editors/object/object_modes.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/editors/object/object_modes.c b/source/blender/editors/object/object_modes.c
index ff1855cafc5..c0c6b09ec3f 100644
--- a/source/blender/editors/object/object_modes.c
+++ b/source/blender/editors/object/object_modes.c
@@ -123,9 +123,14 @@ bool ED_object_mode_compat_test(const Object *ob, eObjectMode mode)
switch (ob->type) {
case OB_MESH:
if (mode & (OB_MODE_EDIT | OB_MODE_SCULPT | OB_MODE_VERTEX_PAINT | OB_MODE_WEIGHT_PAINT |
- OB_MODE_TEXTURE_PAINT | OB_MODE_PARTICLE_EDIT)) {
+ OB_MODE_TEXTURE_PAINT)) {
return true;
}
+ if (mode & OB_MODE_PARTICLE_EDIT) {
+ if (ED_object_particle_edit_mode_supported(ob)) {
+ return true;
+ }
+ }
break;
case OB_CURVE:
case OB_SURF: