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 <germano.costa@ig.com.br>2022-04-25 18:31:13 +0300
committerGermano Cavalcante <germano.costa@ig.com.br>2022-04-25 18:35:55 +0300
commit35dc4ba9e23ac37a22fee49c813aee2a6a2d3e61 (patch)
tree7eb4bc2715a5ea16c33fb4b37be20117c51c7651 /source/blender/editors/transform/transform_snap.c
parent696370380145e6f89e79c1e3dc12203077ef3e45 (diff)
Fix T97401: Snap options ignored for Nurbs surfaces
The editing data of a `SURF`s is similar to that of Curves and should be supported for snapping. But unlike Curve objects, for snapping, only support the nurb points if the object is in edit mode. This matches the solution for Meshes and avoids having to create a kind of "boundbox" for the SURF nurb points.
Diffstat (limited to 'source/blender/editors/transform/transform_snap.c')
-rw-r--r--source/blender/editors/transform/transform_snap.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c
index 23619a2049a..afad4df2c88 100644
--- a/source/blender/editors/transform/transform_snap.c
+++ b/source/blender/editors/transform/transform_snap.c
@@ -638,7 +638,13 @@ static short snap_select_type_get(TransInfo *t)
const int obedit_type = t->obedit_type;
if (obedit_type != -1) {
/* Edit mode */
- if (ELEM(obedit_type, OB_MESH, OB_ARMATURE, OB_CURVES_LEGACY, OB_LATTICE, OB_MBALL)) {
+ if (ELEM(obedit_type,
+ OB_MESH,
+ OB_ARMATURE,
+ OB_CURVES_LEGACY,
+ OB_SURF,
+ OB_LATTICE,
+ OB_MBALL)) {
/* Temporary limited to edit mode meshes, armature, curves, lattice and metaballs. */
if ((obedit_type == OB_MESH) && (t->flag & T_PROP_EDIT)) {