Fix: Scale/Rotate proportional editing for Grease Pencil / Curves

If the `transdata_check_local_islands` check does not succeed, we end up
with `CTX_NO_PET` for scaling/rotation.

For `Grease Pencil`, this was lost in the transition from GPv2 > GPv3
(type was renamed to "legacy", then removed from
`transdata_check_local_islands` in a804320138, but the new type was
never added).

Curves never specified support for this, but both types are (in theory)
taking into account `V3D_AROUND_LOCAL_ORIGINS` in
`curve_populate_trans_data_structs` (logic from 9d86fada03 might be a
bit broken for proportional editing "islands" without anything selected
as reported in #139101, but that will be corrected in another PR).

So to resolve, add `Grease Pencil` and `Curves` as supported object
types in `transdata_check_local_islands`

NOTE: `transdata_check_local_center` already has these two types as
well.

Part of #139101

Pull Request: https://projects.blender.org/blender/blender/pulls/139209
This commit is contained in:
Philipp Oeser
2025-05-22 13:38:22 +02:00
committed by Philipp Oeser
parent 3d8854b021
commit 1d0c11987f

View File

@@ -78,7 +78,8 @@ bool transdata_check_local_islands(TransInfo *t, short around)
if (t->options & (CTX_CURSOR | CTX_TEXTURE_SPACE)) {
return false;
}
return ((around == V3D_AROUND_LOCAL_ORIGINS) && ELEM(t->obedit_type, OB_MESH));
return ((around == V3D_AROUND_LOCAL_ORIGINS) &&
ELEM(t->obedit_type, OB_MESH, OB_GREASE_PENCIL, OB_CURVES));
}
/** \} */