[Bf-blender-cvs] [425e7ca3421] master: Fix T101928: transform operator properties saving wrong snap values

Germano Cavalcante noreply at git.blender.org
Wed Oct 19 15:59:21 CEST 2022


Commit: 425e7ca3421d3a17651701d305140f490f5d2afc
Author: Germano Cavalcante
Date:   Wed Oct 19 10:56:33 2022 -0300
Branches: master
https://developer.blender.org/rB425e7ca3421d3a17651701d305140f490f5d2afc

Fix T101928: transform operator properties saving wrong snap values

The check for the flags should be `== 0` since they are describing a
negative state.

Thanks to @lone_noel for pointing out the error.

===================================================================

M	source/blender/editors/transform/transform.c

===================================================================

diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index 34e5b78c48f..919f4e5b85c 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -1594,9 +1594,9 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op)
       RNA_enum_set(op->ptr, "snap_target", t->tsnap.source_select);
 
       eSnapTargetSelect target = t->tsnap.target_select;
-      RNA_boolean_set(op->ptr, "use_snap_self", (target & SCE_SNAP_TARGET_NOT_ACTIVE) != 0);
-      RNA_boolean_set(op->ptr, "use_snap_edit", (target & SCE_SNAP_TARGET_NOT_EDITED) != 0);
-      RNA_boolean_set(op->ptr, "use_snap_nonedit", (target & SCE_SNAP_TARGET_NOT_NONEDITED) != 0);
+      RNA_boolean_set(op->ptr, "use_snap_self", (target & SCE_SNAP_TARGET_NOT_ACTIVE) == 0);
+      RNA_boolean_set(op->ptr, "use_snap_edit", (target & SCE_SNAP_TARGET_NOT_EDITED) == 0);
+      RNA_boolean_set(op->ptr, "use_snap_nonedit", (target & SCE_SNAP_TARGET_NOT_NONEDITED) == 0);
       RNA_boolean_set(
           op->ptr, "use_snap_selectable", (target & SCE_SNAP_TARGET_ONLY_SELECTABLE) != 0);
     }



More information about the Bf-blender-cvs mailing list