Fix: Curves sculptmode: paintcurve stroke points cannot be transformed
As part of rB3f91540cef7e, we already made `OB_MODE_SCULPT_CURVES` to be allowed in `paint_curve_poll` (alongside `OB_MODE_ALL_PAINT`). Now, to get the paintcurves transform systems to work with curves sculptmode as well, we introduce this "additional case" in the appropriate place in the transform system as well. NOTE: as a next step, considering `OB_MODE_SCULPT_CURVES` to be generally part of `OB_MODE_ALL_PAINT` is to be done (this might fix another couple of bugs, but also has to be carefully checked in many places, so this patch is just fixing this very specific case) Fixes T102204. Maniphest Tasks: T102204 Differential Revision: https://developer.blender.org/D16466
This commit is contained in:
parent
57dd1b7799
commit
38430c384a
Notes:
blender-bot
2024-03-25 12:30:38 +01:00
Referenced by issue #102204, Curves sculptmode: paintcurve stroke points cannot be transformed
|
@ -1109,7 +1109,7 @@ static TransConvertTypeInfo *convert_type_get(const TransInfo *t, Object **r_obj
|
|||
PE_start_edit(PE_get_current(t->depsgraph, t->scene, ob))) {
|
||||
return &TransConvertType_Particle;
|
||||
}
|
||||
if (ob && (ob->mode & OB_MODE_ALL_PAINT)) {
|
||||
if (ob && ((ob->mode & OB_MODE_ALL_PAINT) || (ob->mode & OB_MODE_SCULPT_CURVES))) {
|
||||
if ((t->options & CTX_PAINT_CURVE) && !ELEM(t->mode, TFM_SHEAR, TFM_SHRINKFATTEN)) {
|
||||
return &TransConvertType_PaintCurve;
|
||||
}
|
||||
|
|
|
@ -309,7 +309,7 @@ void initTransInfo(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve
|
|||
t->flag |= T_V3D_ALIGN;
|
||||
}
|
||||
|
||||
if (object_mode & OB_MODE_ALL_PAINT) {
|
||||
if ((object_mode & OB_MODE_ALL_PAINT) || (object_mode & OB_MODE_SCULPT_CURVES)) {
|
||||
Paint *p = BKE_paint_get_active_from_context(C);
|
||||
if (p && p->brush && (p->brush->flag & BRUSH_CURVE)) {
|
||||
t->options |= CTX_PAINT_CURVE;
|
||||
|
|
Loading…
Reference in New Issue