Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Oeser <info@graphics-engineer.com>2022-11-11 15:05:47 +0300
committerPhilipp Oeser <info@graphics-engineer.com>2022-11-11 15:24:52 +0300
commit38430c384a29b8fc900eef839c2dd307d0d96ea4 (patch)
treedd7912f69160421ed0ea85478f3b4e1cf68766a6
parent57dd1b7799e7453e34c3a503333d0eadfa87af17 (diff)
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
-rw-r--r--source/blender/editors/transform/transform_convert.c2
-rw-r--r--source/blender/editors/transform/transform_generics.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/transform/transform_convert.c b/source/blender/editors/transform/transform_convert.c
index a5b2442f11c..d71a3897cbc 100644
--- a/source/blender/editors/transform/transform_convert.c
+++ b/source/blender/editors/transform/transform_convert.c
@@ -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;
}
diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c
index e1f93bf881b..e7ef408b848 100644
--- a/source/blender/editors/transform/transform_generics.c
+++ b/source/blender/editors/transform/transform_generics.c
@@ -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;