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.
This commit is contained in:
parent
78b2b5fc0e
commit
4243ee7d19
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue