Fix T59546: Grease Pencil Edit: Rotation around individual origins error
Thanks to Habib Gahbiche (@zazizizou) for helping fixing this bug. See D4156.
This commit is contained in:
parent
6c878c5d3c
commit
38796a4971
Notes:
blender-bot
2024-03-25 12:30:38 +01:00
Referenced by issue #59546, Grease Pencil Edit Mode: Individual Origins does not work
|
@ -223,7 +223,7 @@ static bool transdata_check_local_center(TransInfo *t, short around)
|
|||
return ((around == V3D_AROUND_LOCAL_ORIGINS) && (
|
||||
(t->flag & (T_OBJECT | T_POSE)) ||
|
||||
/* implicit: (t->flag & T_EDIT) */
|
||||
(ELEM(t->obedit_type, OB_MESH, OB_CURVE, OB_MBALL, OB_ARMATURE)) ||
|
||||
(ELEM(t->obedit_type, OB_MESH, OB_CURVE, OB_MBALL, OB_ARMATURE, OB_GPENCIL)) ||
|
||||
(t->spacetype == SPACE_IPO) ||
|
||||
(t->options & (CTX_MOVIECLIP | CTX_MASK | CTX_PAINT_CURVE)))
|
||||
);
|
||||
|
|
|
@ -8588,7 +8588,7 @@ void createTransData(bContext *C, TransInfo *t)
|
|||
}
|
||||
else if (t->options & CTX_GPENCIL_STROKES) {
|
||||
t->options |= CTX_GPENCIL_STROKES;
|
||||
t->flag |= T_POINTS;
|
||||
t->flag |= T_POINTS | T_EDIT;
|
||||
|
||||
initTransDataContainers_FromObjectData(t, ob, NULL, 0);
|
||||
createTransGPencil(C, t);
|
||||
|
|
|
@ -1292,7 +1292,7 @@ void initTransInfo(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve
|
|||
|
||||
t->flag = 0;
|
||||
|
||||
t->obedit_type = (object_mode == OB_MODE_EDIT) ? object_type : -1;
|
||||
t->obedit_type = ((object_mode == OB_MODE_EDIT) || (object_mode == OB_MODE_EDIT_GPENCIL)) ? object_type : -1;
|
||||
|
||||
/* Many kinds of transform only use a single handle. */
|
||||
if (t->data_container == NULL) {
|
||||
|
|
Loading…
Reference in New Issue