Changeset View
Changeset View
Standalone View
Standalone View
source/blender/windowmanager/intern/wm_operator_utils.c
| Show First 20 Lines • Show All 203 Lines • ▼ Show 20 Lines | |||||
| } | } | ||||
| static int op_generic_value_invoke(bContext *C, wmOperator *op, const wmEvent *event) | static int op_generic_value_invoke(bContext *C, wmOperator *op, const wmEvent *event) | ||||
| { | { | ||||
| if (RNA_property_is_set(op->ptr, op->type->prop)) { | if (RNA_property_is_set(op->ptr, op->type->prop)) { | ||||
| return WM_operator_call_notest(C, op); | return WM_operator_call_notest(C, op); | ||||
| } | } | ||||
| Scene *scene = CTX_data_scene(C); | |||||
| ViewLayer *view_layer = CTX_data_view_layer(C); | ViewLayer *view_layer = CTX_data_view_layer(C); | ||||
| uint objects_len; | uint objects_len; | ||||
| Object **objects = BKE_view_layer_array_from_objects_in_edit_mode_unique_data( | Object **objects = BKE_view_layer_array_from_objects_in_edit_mode_unique_data( | ||||
| view_layer, CTX_wm_view3d(C), &objects_len); | scene, view_layer, CTX_wm_view3d(C), &objects_len); | ||||
| if (objects_len == 0) { | if (objects_len == 0) { | ||||
| MEM_freeN(objects); | MEM_freeN(objects); | ||||
| return OPERATOR_CANCELLED; | return OPERATOR_CANCELLED; | ||||
| } | } | ||||
| struct ObCustomData_ForEditMode *cd = MEM_callocN(sizeof(*cd), __func__); | struct ObCustomData_ForEditMode *cd = MEM_callocN(sizeof(*cd), __func__); | ||||
| cd->launch_event = WM_userdef_event_type_from_keymap_type(event->type); | cd->launch_event = WM_userdef_event_type_from_keymap_type(event->type); | ||||
| cd->wait_for_input = RNA_boolean_get(op->ptr, "wait_for_input"); | cd->wait_for_input = RNA_boolean_get(op->ptr, "wait_for_input"); | ||||
| ▲ Show 20 Lines • Show All 123 Lines • Show Last 20 Lines | |||||