Fix T80904: GPencil: bones cannot be transformed when in weightpaint

mode

The transform convert of type TC_POSE was not being defined if the mode
was OB_MODE_WEIGHT_GPENCIL.

Maniphest Tasks: T80904

Differential Revision: https://developer.blender.org/D8934
This commit is contained in:
Philipp Oeser
2020-09-17 21:33:23 +02:00
parent bda6eb1e27
commit 7bfcd99a90

View File

@@ -1101,7 +1101,7 @@ void createTransData(bContext *C, TransInfo *t)
initTransDataContainers_FromObjectData(t, ob, NULL, 0);
convert_type = TC_POSE;
}
else if (ob && (ob->mode & OB_MODE_WEIGHT_PAINT) && !(t->options & CTX_PAINT_CURVE)) {
else if (ob && (ob->mode & OB_MODE_ALL_WEIGHT_PAINT) && !(t->options & CTX_PAINT_CURVE)) {
/* important that ob_armature can be set even when its not selected [#23412]
* lines below just check is also visible */
Object *ob_armature = BKE_modifiers_is_deformed_by_armature(ob);