fix [#28066] Unchecking 'self project' messes up 'Snap to Vertex'
[blender.git] / source / blender / editors / transform / transform_snap.c
index a4307ea336d324f2f6f79ce8945ef6db022bcf8a..933d90ebbf2f8c23ff13d70e3834de51fdde334a 100644 (file)
@@ -392,7 +392,7 @@ static void initSnappingMode(TransInfo *t)
                        }
                        else
                        {
-                               t->tsnap.modeSelect = t->tsnap.project_self ? SNAP_ALL : SNAP_NOT_OBEDIT;
+                               t->tsnap.modeSelect = t->tsnap.snap_self ? SNAP_ALL : SNAP_NOT_OBEDIT;
                        }
                }
                /* Particles edit mode*/
@@ -458,9 +458,9 @@ void initSnapping(TransInfo *t, wmOperator *op)
                                t->tsnap.project = RNA_boolean_get(op->ptr, "use_snap_project");
                        }
 
-                       if (RNA_struct_find_property(op->ptr, "use_snap_project_self"))
+                       if (RNA_struct_find_property(op->ptr, "use_snap_self"))
                        {
-                               t->tsnap.project = RNA_boolean_get(op->ptr, "use_snap_project_self");
+                               t->tsnap.snap_self = RNA_boolean_get(op->ptr, "use_snap_self");
                        }
                }
        }
@@ -473,7 +473,7 @@ void initSnapping(TransInfo *t, wmOperator *op)
 
                t->tsnap.align = ((t->settings->snap_flag & SCE_SNAP_ROTATE) == SCE_SNAP_ROTATE);
                t->tsnap.project = ((t->settings->snap_flag & SCE_SNAP_PROJECT) == SCE_SNAP_PROJECT);
-               t->tsnap.project_self = !((t->settings->snap_flag & SCE_SNAP_PROJECT_NO_SELF) == SCE_SNAP_PROJECT_NO_SELF);
+               t->tsnap.snap_self = !((t->settings->snap_flag & SCE_SNAP_NO_SELF) == SCE_SNAP_NO_SELF);
                t->tsnap.peel = ((t->settings->snap_flag & SCE_SNAP_PROJECT) == SCE_SNAP_PROJECT);
        }