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:
authorGermano Cavalcante <mano-wii>2021-04-01 16:41:12 +0300
committerGermano Cavalcante <germano.costa@ig.com.br>2021-04-01 16:54:49 +0300
commitf674976edd884d7a9a409042708f2b1169fd4e98 (patch)
tree1b2b293170e06d635aa6d3145db61bd4f6d4e535 /source/blender/editors/object/object_data_transform.c
parent7a757662bc0a99b6f4720bb0e92735e54f9a1441 (diff)
Curve: Remove 'CU_2D' flag used for nurbs
This fixes T86440 As the CU_2D flag is set for nurbs, a Curve can have 2D nurbs mixed with 3D. But the UI does not allow this mixing. It updates all nurbs to 2D or 3D when set. So remove this specific flag for nurbs. This may break old files, since 2D curves with mixed 3D are now set as 3D. Differential Revision: https://developer.blender.org/D10738
Diffstat (limited to 'source/blender/editors/object/object_data_transform.c')
-rw-r--r--source/blender/editors/object/object_data_transform.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/editors/object/object_data_transform.c b/source/blender/editors/object/object_data_transform.c
index 72dde7b734b..6e3a5e715f6 100644
--- a/source/blender/editors/object/object_data_transform.c
+++ b/source/blender/editors/object/object_data_transform.c
@@ -593,13 +593,14 @@ void ED_object_data_xform_by_mat4(struct XFormObjectData *xod_base, const float
if (xod_base->is_edit_mode) {
EditNurb *editnurb = cu->editnurb;
nurb = &editnurb->nurbs;
- BKE_curve_nurbs_vert_coords_apply_with_mat4(&editnurb->nurbs, xod->elem_array, mat, true);
+ BKE_curve_nurbs_vert_coords_apply_with_mat4(
+ &editnurb->nurbs, xod->elem_array, mat, CU_IS_2D(cu));
/* Always operate on all keys for the moment. */
// key_index = editnurb->shapenr - 1;
}
else {
nurb = &cu->nurb;
- BKE_curve_nurbs_vert_coords_apply_with_mat4(&cu->nurb, xod->elem_array, mat, true);
+ BKE_curve_nurbs_vert_coords_apply_with_mat4(&cu->nurb, xod->elem_array, mat, CU_IS_2D(cu));
}
if ((key != NULL) && (xod->key_data != NULL)) {
@@ -694,12 +695,12 @@ void ED_object_data_xform_restore(struct XFormObjectData *xod_base)
struct XFormObjectData_Curve *xod = (struct XFormObjectData_Curve *)xod_base;
if (xod_base->is_edit_mode) {
EditNurb *editnurb = cu->editnurb;
- BKE_curve_nurbs_vert_coords_apply(&editnurb->nurbs, xod->elem_array, true);
+ BKE_curve_nurbs_vert_coords_apply(&editnurb->nurbs, xod->elem_array, CU_IS_2D(cu));
/* Always operate on all keys for the moment. */
// key_index = editnurb->shapenr - 1;
}
else {
- BKE_curve_nurbs_vert_coords_apply(&cu->nurb, xod->elem_array, true);
+ BKE_curve_nurbs_vert_coords_apply(&cu->nurb, xod->elem_array, CU_IS_2D(cu));
}
if ((key != NULL) && (xod->key_data != NULL)) {