[Bf-blender-cvs] [832157cb02f] blender-v3.3-release: Fix T101928: transform operator properties saving wrong snap values
Germano Cavalcante
noreply at git.blender.org
Mon Nov 28 13:08:36 CET 2022
Commit: 832157cb02f1770439823f8fdf0dd8cccb57a7ca
Author: Germano Cavalcante
Date: Wed Oct 19 10:56:33 2022 -0300
Branches: blender-v3.3-release
https://developer.blender.org/rB832157cb02f1770439823f8fdf0dd8cccb57a7ca
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 25a36477950..9a2acf9355a 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -1591,9 +1591,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