Changeset View
Changeset View
Standalone View
Standalone View
source/blender/windowmanager/intern/wm_operator_props.c
| Context not available. | |||||
| { | { | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| static const EnumPropertyItem face_select_items[] = { | |||||
| {FACE_DEFAULT, | |||||
| "FACE_DEFAULT", | |||||
| 0, | |||||
| "Default", | |||||
| "Select faces that are touched by the selection area in near select. Select faces whose " | |||||
| "center is touched by the selection area in X-Ray select"}, | |||||
| {FACE_TOUCH, | |||||
| "FACE_TOUCH", | |||||
| 0, | |||||
| "Touch", | |||||
| "Select faces that are touched by the selection area"}, | |||||
| {FACE_ENCLOSE, | |||||
| "FACE_ENCLOSE", | |||||
| 0, | |||||
| "Enclose", | |||||
| "Select faces that are fully inside the selection area"}, | |||||
| {FACE_CENTER, | |||||
| "FACE_CENTER", | |||||
| 0, | |||||
| "Center", | |||||
| "Select faces whose center is touched by the selection area"}, | |||||
| {0, NULL, 0, NULL, NULL}, | |||||
| }; | |||||
| static const EnumPropertyItem edge_select_items[] = { | |||||
| {EDGE_DEFAULT, | |||||
| "EDGE_DEFAULT", | |||||
| 0, | |||||
| "Default", | |||||
| "Select edges that are fully inside the selection area. If no edges are fully inside the " | |||||
| "selection area, select edges that are touched by the selection area"}, | |||||
| {EDGE_TOUCH, | |||||
| "EDGE_TOUCH", | |||||
| 0, | |||||
| "Touch", | |||||
| "Select edges that are touched by the selection area"}, | |||||
| {EDGE_ENCLOSE, | |||||
| "EDGE_ENCLOSE", | |||||
| 0, | |||||
| "Enclose", | |||||
| "Select edges that are fully inside the selection area"}, | |||||
| {0, NULL, 0, NULL, NULL}, | |||||
| }; | |||||
| WM_operator_properties_border(ot); | WM_operator_properties_border(ot); | ||||
| prop = RNA_def_enum(ot->srna, "face_type", face_select_items, 0, "Face Select", ""); | |||||
| RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); | |||||
| prop = RNA_def_enum(ot->srna, "edge_type", edge_select_items, 0, "Edge Select", ""); | |||||
| RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); | |||||
| if (deselect) { | if (deselect) { | ||||
| prop = RNA_def_boolean( | prop = RNA_def_boolean( | ||||
| ot->srna, "deselect", false, "Deselect", "Deselect rather than select items"); | ot->srna, "deselect", false, "Deselect", "Deselect rather than select items"); | ||||
| Context not available. | |||||
| void WM_operator_properties_gesture_lasso(wmOperatorType *ot) | void WM_operator_properties_gesture_lasso(wmOperatorType *ot) | ||||
| { | { | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| static const EnumPropertyItem face_select_items[] = { | |||||
| {FACE_DEFAULT, | |||||
| "FACE_DEFAULT", | |||||
| 0, | |||||
| "Default", | |||||
| "Select faces that are touched by the selection area in near select. Select faces whose " | |||||
| "center is touched by the selection area in X-Ray select"}, | |||||
| {FACE_TOUCH, | |||||
| "FACE_TOUCH", | |||||
| 0, | |||||
| "Touch", | |||||
| "Select faces that are touched by the selection area"}, | |||||
| {FACE_ENCLOSE, | |||||
| "FACE_ENCLOSE", | |||||
| 0, | |||||
| "Enclose", | |||||
| "Select faces that are fully inside the selection area"}, | |||||
| {FACE_CENTER, | |||||
| "FACE_CENTER", | |||||
| 0, | |||||
| "Center", | |||||
| "Select faces whose center is touched by the selection area"}, | |||||
| {0, NULL, 0, NULL, NULL}, | |||||
| }; | |||||
| static const EnumPropertyItem edge_select_items[] = { | |||||
| {EDGE_DEFAULT, | |||||
| "EDGE_DEFAULT", | |||||
| 0, | |||||
| "Default", | |||||
| "Select edges that are fully inside the selection area. If no edges are fully inside the " | |||||
| "selection area, select edges that are touched by the selection area"}, | |||||
| {EDGE_TOUCH, | |||||
| "EDGE_TOUCH", | |||||
| 0, | |||||
| "Touch", | |||||
| "Select edges that are touched by the selection area"}, | |||||
| {EDGE_ENCLOSE, | |||||
| "EDGE_ENCLOSE", | |||||
| 0, | |||||
| "Enclose", | |||||
| "Select edges that are fully inside the selection area"}, | |||||
| {0, NULL, 0, NULL, NULL}, | |||||
| }; | |||||
| prop = RNA_def_enum(ot->srna, "face_type", face_select_items, 0, "Face Select", ""); | |||||
| RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); | |||||
| prop = RNA_def_enum(ot->srna, "edge_type", edge_select_items, 0, "Edge Select", ""); | |||||
| RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); | |||||
| prop = RNA_def_collection_runtime(ot->srna, "path", &RNA_OperatorMousePath, "Path", ""); | prop = RNA_def_collection_runtime(ot->srna, "path", &RNA_OperatorMousePath, "Path", ""); | ||||
| RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); | RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); | ||||
| } | } | ||||
| Context not available. | |||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| const int radius_default = 25; | const int radius_default = 25; | ||||
| static const EnumPropertyItem face_select_items[] = { | |||||
| {FACE_DEFAULT, | |||||
| "FACE_DEFAULT", | |||||
| 0, | |||||
| "Default", | |||||
| "Select faces that are touched by the selection area in near select. Select faces whose " | |||||
| "center is touched by the selection area in X-Ray select"}, | |||||
| {FACE_TOUCH, | |||||
| "FACE_TOUCH", | |||||
| 0, | |||||
| "Touch", | |||||
| "Select faces that are touched by the selection area"}, | |||||
| {FACE_ENCLOSE, | |||||
| "FACE_ENCLOSE", | |||||
| 0, | |||||
| "Enclose", | |||||
| "Select faces that are fully inside the selection area"}, | |||||
| {FACE_CENTER, | |||||
| "FACE_CENTER", | |||||
| 0, | |||||
| "Center", | |||||
| "Select faces whose center is touched by the selection area"}, | |||||
| {0, NULL, 0, NULL, NULL}, | |||||
| }; | |||||
| static const EnumPropertyItem edge_select_items[] = { | |||||
| {EDGE_DEFAULT, | |||||
| "EDGE_DEFAULT", | |||||
| 0, | |||||
| "Default", | |||||
| "Select edges that are touched by the selection area"}, | |||||
| {EDGE_TOUCH, | |||||
| "EDGE_TOUCH", | |||||
| 0, | |||||
| "Touch", | |||||
| "Select edges that are touched by the selection area"}, | |||||
| {EDGE_ENCLOSE, | |||||
| "EDGE_ENCLOSE", | |||||
| 0, | |||||
| "Enclose", | |||||
| "Select edges that are fully inside the selection area"}, | |||||
| {0, NULL, 0, NULL, NULL}, | |||||
| }; | |||||
| prop = RNA_def_int(ot->srna, "x", 0, INT_MIN, INT_MAX, "X", "", INT_MIN, INT_MAX); | prop = RNA_def_int(ot->srna, "x", 0, INT_MIN, INT_MAX, "X", "", INT_MIN, INT_MAX); | ||||
| RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); | RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); | ||||
| prop = RNA_def_int(ot->srna, "y", 0, INT_MIN, INT_MAX, "Y", "", INT_MIN, INT_MAX); | prop = RNA_def_int(ot->srna, "y", 0, INT_MIN, INT_MAX, "Y", "", INT_MIN, INT_MAX); | ||||
| Context not available. | |||||
| prop = RNA_def_boolean(ot->srna, "wait_for_input", true, "Wait for Input", ""); | prop = RNA_def_boolean(ot->srna, "wait_for_input", true, "Wait for Input", ""); | ||||
| RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); | RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); | ||||
| prop = RNA_def_enum(ot->srna, "face_type", face_select_items, 0, "Face Select", ""); | |||||
| RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); | |||||
| prop = RNA_def_enum(ot->srna, "edge_type", edge_select_items, 0, "Edge Select", ""); | |||||
| RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); | |||||
| } | } | ||||
| void WM_operator_properties_mouse_select(wmOperatorType *ot) | void WM_operator_properties_mouse_select(wmOperatorType *ot) | ||||
| Context not available. | |||||