Fix: GPv3: Crash when transforming keyframes

Blender would crash when trying to move/duplicate, etc. some keyframes.
This was because the `convert_type_get` function in the transform code
would return the wrong transform type `TransConvertType_GreasePencil`
instead of `TransConvertType_Action`.
The fix makes sure that we only return the
`TransConvertType_GreasePencil` in the 3d viewport.
This commit is contained in:
Falk David
2023-10-25 10:24:19 +02:00
parent 4d453ca1c0
commit 23e9ebfdbd

View File

@@ -916,7 +916,7 @@ static TransConvertTypeInfo *convert_type_get(const TransInfo *t, Object **r_obj
if (t->options & CTX_EDGE_DATA) {
return &TransConvertType_MeshEdge;
}
if (t->options & CTX_GPENCIL_STROKES) {
if ((t->options & CTX_GPENCIL_STROKES) && (t->spacetype == SPACE_VIEW3D)) {
if (t->obedit_type == OB_GREASE_PENCIL) {
return &TransConvertType_GreasePencil;
}