Commit: 980a2c305b175aa8debb2039875580bf8a41f2e6
Author: Cian Jinks
Date: Wed Jun 16 14:34:07 2021 +0100
Branches: soc-2021-knife-tools
https://developer.blender.org/rB980a2c305b175aa8debb2039875580bf8a41f2e6
Cleanup: Moved knife data init code into correct function
===================================================================
M source/blender/editors/mesh/editmesh_knife.c
===================================================================
diff --git a/source/blender/editors/mesh/editmesh_knife.c
b/source/blender/editors/mesh/editmesh_knife.c
index 550e4ceb0bd..82814b09ea1 100644
--- a/source/blender/editors/mesh/editmesh_knife.c
+++ b/source/blender/editors/mesh/editmesh_knife.c
@@ -2870,6 +2870,16 @@ static void knifetool_init(bContext *C,
knife_init_colors(&kcd->colors);
}
+
+ kcd->axis_string[0] = ' ';
+ kcd->axis_string[1] = '\0';
+
+ /* Initialise num input handling for angle snapping */
+ initNumInput(&kcd->num);
+ kcd->num.idx_max = 0;
+ kcd->num.val_flag[0] |= NUM_NO_NEGATIVE;
+ kcd->num.unit_sys = scene->unit.system;
+ kcd->num.unit_type[0] = B_UNIT_NONE;
}
/* called when modal loop selection is done... */
@@ -3383,18 +3393,8 @@ static int knifetool_invoke(bContext *C, wmOperator *op,
const wmEvent *event)
UNUSED_VARS_NDEBUG(ret);
}
- kcd->axis_string[0] = ' ';
- kcd->axis_string[1] = '\0';
-
knife_update_header(C, op, kcd);
- /* Initialise num input handling for angle snapping */
- initNumInput(&kcd->num);
- kcd->num.idx_max = 0;
- kcd->num.val_flag[0] |= NUM_NO_NEGATIVE;
- kcd->num.unit_sys = scene->unit.system;
- kcd->num.unit_type[0] = B_UNIT_NONE;
-
return OPERATOR_RUNNING_MODAL;
}
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs