diff options
Diffstat (limited to 'source/blender/windowmanager/manipulators/intern/wm_manipulator.c')
-rw-r--r-- | source/blender/windowmanager/manipulators/intern/wm_manipulator.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/source/blender/windowmanager/manipulators/intern/wm_manipulator.c b/source/blender/windowmanager/manipulators/intern/wm_manipulator.c index 856b92096dd..42232950cc4 100644 --- a/source/blender/windowmanager/manipulators/intern/wm_manipulator.c +++ b/source/blender/windowmanager/manipulators/intern/wm_manipulator.c @@ -469,6 +469,26 @@ bool wm_manipulator_select_and_highlight(bContext *C, wmManipulatorMap *mmap, wm } } +/** + * Special function to run from setup so manipulators start out interactive. + * + * We could do this when linking them, but this complicates things since the window update code needs to run first. + */ +void WM_manipulator_modal_set_from_setup( + struct wmManipulatorMap *mmap, struct bContext *C, + struct wmManipulator *mpr, int part_index, const wmEvent *event) +{ + mpr->highlight_part = part_index; + WM_manipulator_highlight_set(mmap, mpr); + if (false) { + wm_manipulatormap_modal_set(mmap, C, mpr, event, true); + } + else { + /* WEAK: but it works. */ + WM_operator_name_call(C, "MANIPULATORGROUP_OT_manipulator_tweak", WM_OP_INVOKE_DEFAULT, NULL); + } +} + void wm_manipulator_calculate_scale(wmManipulator *mpr, const bContext *C) { const RegionView3D *rv3d = CTX_wm_region_view3d(C); |