diff options
Diffstat (limited to 'source/blender/editors/space_clip')
12 files changed, 28 insertions, 36 deletions
diff --git a/source/blender/editors/space_clip/clip_buttons.c b/source/blender/editors/space_clip/clip_buttons.c index f2fe06874d7..db5f6c2451c 100644 --- a/source/blender/editors/space_clip/clip_buttons.c +++ b/source/blender/editors/space_clip/clip_buttons.c @@ -77,7 +77,7 @@ void ED_clip_buttons_register(ARegionType *UNUSED(art)) /********************* MovieClip Template ************************/ -void uiTemplateMovieClip(uiLayout *layout, bContext *C, PointerRNA *ptr, const char *propname, int compact) +void uiTemplateMovieClip(uiLayout *layout, bContext *C, PointerRNA *ptr, const char *propname, bool compact) { PropertyRNA *prop; PointerRNA clipptr; @@ -333,7 +333,7 @@ static void marker_block_handler(bContext *C, void *arg_cb, int event) } void uiTemplateMarker(uiLayout *layout, PointerRNA *ptr, const char *propname, PointerRNA *userptr, - PointerRNA *trackptr, int compact) + PointerRNA *trackptr, bool compact) { PropertyRNA *prop; uiBlock *block; diff --git a/source/blender/editors/space_clip/clip_dopesheet_ops.c b/source/blender/editors/space_clip/clip_dopesheet_ops.c index c8675fc390b..a12e8db6daf 100644 --- a/source/blender/editors/space_clip/clip_dopesheet_ops.c +++ b/source/blender/editors/space_clip/clip_dopesheet_ops.c @@ -53,7 +53,7 @@ #include "clip_intern.h" // own include -static int space_clip_dopesheet_poll(bContext *C) +static bool space_clip_dopesheet_poll(bContext *C) { if (ED_space_clip_tracking_poll(C)) { SpaceClip *sc = CTX_wm_space_clip(C); @@ -70,7 +70,7 @@ static int space_clip_dopesheet_poll(bContext *C) /********************** select channel operator *********************/ -static int dopesheet_select_channel_poll(bContext *C) +static bool dopesheet_select_channel_poll(bContext *C) { SpaceClip *sc = CTX_wm_space_clip(C); diff --git a/source/blender/editors/space_clip/clip_draw.c b/source/blender/editors/space_clip/clip_draw.c index d91e039ecb6..c0d17fabe0d 100644 --- a/source/blender/editors/space_clip/clip_draw.c +++ b/source/blender/editors/space_clip/clip_draw.c @@ -368,7 +368,7 @@ static void draw_stabilization_border(SpaceClip *sc, ARegion *ar, int width, int GPU_viewport_size_getf(viewport_size); immUniform2f("viewport_size", viewport_size[2] / UI_DPI_FAC, viewport_size[3] / UI_DPI_FAC); - immUniform1i("num_colors", 0); /* "simple" mode */ + immUniform1i("colors_len", 0); /* "simple" mode */ immUniformColor4f(1.0f, 1.0f, 1.0f, 0.0f); immUniform1f("dash_width", 6.0f); immUniform1f("dash_factor", 0.5f); @@ -672,7 +672,7 @@ static void draw_marker_areas(SpaceClip *sc, MovieTrackingTrack *track, MovieTra GPU_viewport_size_getf(viewport_size); immUniform2f("viewport_size", viewport_size[2] / UI_DPI_FAC, viewport_size[3] / UI_DPI_FAC); - immUniform1i("num_colors", 0); /* "simple" mode */ + immUniform1i("colors_len", 0); /* "simple" mode */ /* marker position and offset position */ if ((track->flag & SELECT) == sel && (marker->flag & MARKER_DISABLED) == 0) { @@ -1214,7 +1214,7 @@ static void draw_plane_marker_ex(SpaceClip *sc, Scene *scene, MovieTrackingPlane GPU_viewport_size_getf(viewport_size); immUniform2f("viewport_size", viewport_size[2] / UI_DPI_FAC, viewport_size[3] / UI_DPI_FAC); - immUniform1i("num_colors", 0); /* "simple" mode */ + immUniform1i("colors_len", 0); /* "simple" mode */ if (draw_plane_quad) { const bool stipple = !draw_outline && tiny; diff --git a/source/blender/editors/space_clip/clip_editor.c b/source/blender/editors/space_clip/clip_editor.c index 67aa7e19de7..0fb7d63180f 100644 --- a/source/blender/editors/space_clip/clip_editor.c +++ b/source/blender/editors/space_clip/clip_editor.c @@ -76,7 +76,7 @@ /* ******** operactor poll functions ******** */ -int ED_space_clip_poll(bContext *C) +bool ED_space_clip_poll(bContext *C) { SpaceClip *sc = CTX_wm_space_clip(C); @@ -86,7 +86,7 @@ int ED_space_clip_poll(bContext *C) return false; } -int ED_space_clip_view_clip_poll(bContext *C) +bool ED_space_clip_view_clip_poll(bContext *C) { SpaceClip *sc = CTX_wm_space_clip(C); @@ -97,7 +97,7 @@ int ED_space_clip_view_clip_poll(bContext *C) return false; } -int ED_space_clip_tracking_poll(bContext *C) +bool ED_space_clip_tracking_poll(bContext *C) { SpaceClip *sc = CTX_wm_space_clip(C); @@ -107,7 +107,7 @@ int ED_space_clip_tracking_poll(bContext *C) return false; } -int ED_space_clip_maskedit_poll(bContext *C) +bool ED_space_clip_maskedit_poll(bContext *C) { SpaceClip *sc = CTX_wm_space_clip(C); @@ -118,7 +118,7 @@ int ED_space_clip_maskedit_poll(bContext *C) return false; } -int ED_space_clip_maskedit_mask_poll(bContext *C) +bool ED_space_clip_maskedit_mask_poll(bContext *C) { if (ED_space_clip_maskedit_poll(C)) { MovieClip *clip = CTX_data_edit_movieclip(C); diff --git a/source/blender/editors/space_clip/clip_graph_ops.c b/source/blender/editors/space_clip/clip_graph_ops.c index 02ea340eb57..b5a0e374431 100644 --- a/source/blender/editors/space_clip/clip_graph_ops.c +++ b/source/blender/editors/space_clip/clip_graph_ops.c @@ -55,7 +55,7 @@ /******************** common graph-editing utilities ********************/ -static int ED_space_clip_graph_poll(bContext *C) +static bool ED_space_clip_graph_poll(bContext *C) { if (ED_space_clip_tracking_poll(C)) { SpaceClip *sc = CTX_wm_space_clip(C); @@ -66,7 +66,7 @@ static int ED_space_clip_graph_poll(bContext *C) return false; } -static int clip_graph_knots_poll(bContext *C) +static bool clip_graph_knots_poll(bContext *C) { if (ED_space_clip_graph_poll(C)) { SpaceClip *sc = CTX_wm_space_clip(C); diff --git a/source/blender/editors/space_clip/clip_ops.c b/source/blender/editors/space_clip/clip_ops.c index c026ce8d063..26327dc9b41 100644 --- a/source/blender/editors/space_clip/clip_ops.c +++ b/source/blender/editors/space_clip/clip_ops.c @@ -899,7 +899,7 @@ void CLIP_OT_view_selected(wmOperatorType *ot) /********************** change frame operator *********************/ -static int change_frame_poll(bContext *C) +static bool change_frame_poll(bContext *C) { /* prevent changes during render */ if (G.is_rendering) diff --git a/source/blender/editors/space_clip/clip_toolbar.c b/source/blender/editors/space_clip/clip_toolbar.c index 3e4d0cd5bb4..304954b56e3 100644 --- a/source/blender/editors/space_clip/clip_toolbar.c +++ b/source/blender/editors/space_clip/clip_toolbar.c @@ -87,7 +87,7 @@ ARegion *ED_clip_has_properties_region(ScrArea *sa) return arnew; } -static int properties_poll(bContext *C) +static bool properties_poll(bContext *C) { return (CTX_wm_space_clip(C) != NULL); } @@ -151,7 +151,7 @@ static ARegion *clip_has_tools_region(ScrArea *sa) return artool; } -static int tools_poll(bContext *C) +static bool tools_poll(bContext *C) { return (CTX_wm_space_clip(C) != NULL); } diff --git a/source/blender/editors/space_clip/space_clip.c b/source/blender/editors/space_clip/space_clip.c index e9acd7320d0..c66a9a42292 100644 --- a/source/blender/editors/space_clip/space_clip.c +++ b/source/blender/editors/space_clip/space_clip.c @@ -661,10 +661,8 @@ static void clip_keymap(struct wmKeyConfig *keyconf) /* marker */ WM_keymap_add_item(keymap, "CLIP_OT_add_marker_slide", LEFTMOUSE, KM_PRESS, KM_CTRL, 0); - WM_keymap_add_item(keymap, "CLIP_OT_delete_marker", DELKEY, KM_PRESS, KM_SHIFT, 0); -#ifdef USE_WM_KEYMAP_27X WM_keymap_add_item(keymap, "CLIP_OT_delete_marker", XKEY, KM_PRESS, KM_SHIFT, 0); -#endif + WM_keymap_add_item(keymap, "CLIP_OT_delete_marker", DELKEY, KM_PRESS, KM_SHIFT, 0); WM_keymap_add_item(keymap, "CLIP_OT_slide_marker", LEFTMOUSE, KM_PRESS, 0, 0); @@ -672,10 +670,8 @@ static void clip_keymap(struct wmKeyConfig *keyconf) RNA_enum_set(kmi->ptr, "action", 2); /* toggle */ /* tracks */ - WM_keymap_add_item(keymap, "CLIP_OT_delete_track", DELKEY, KM_PRESS, 0, 0); -#ifdef USE_WM_KEYMAP_27X WM_keymap_add_item(keymap, "CLIP_OT_delete_track", XKEY, KM_PRESS, 0, 0); -#endif + WM_keymap_add_item(keymap, "CLIP_OT_delete_track", DELKEY, KM_PRESS, 0, 0); kmi = WM_keymap_add_item(keymap, "CLIP_OT_lock_tracks", LKEY, KM_PRESS, KM_CTRL, 0); RNA_enum_set(kmi->ptr, "action", 0); /* lock */ @@ -774,15 +770,11 @@ static void clip_keymap(struct wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "CLIP_OT_graph_select_border", BKEY, KM_PRESS, 0, 0); /* delete */ - WM_keymap_add_item(keymap, "CLIP_OT_graph_delete_curve", DELKEY, KM_PRESS, 0, 0); -#ifdef USE_WM_KEYMAP_27X WM_keymap_add_item(keymap, "CLIP_OT_graph_delete_curve", XKEY, KM_PRESS, 0, 0); -#endif + WM_keymap_add_item(keymap, "CLIP_OT_graph_delete_curve", DELKEY, KM_PRESS, 0, 0); - WM_keymap_add_item(keymap, "CLIP_OT_graph_delete_knot", DELKEY, KM_PRESS, KM_SHIFT, 0); -#ifdef USE_WM_KEYMAP_27X WM_keymap_add_item(keymap, "CLIP_OT_graph_delete_knot", XKEY, KM_PRESS, KM_SHIFT, 0); -#endif + WM_keymap_add_item(keymap, "CLIP_OT_graph_delete_knot", DELKEY, KM_PRESS, KM_SHIFT, 0); /* view */ WM_keymap_add_item(keymap, "CLIP_OT_graph_view_all", HOMEKEY, KM_PRESS, 0, 0); @@ -851,7 +843,7 @@ static int clip_context(const bContext *C, const char *member, bContextDataResul } /* dropboxes */ -static int clip_drop_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent *UNUSED(event)) +static bool clip_drop_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent *UNUSED(event)) { if (drag->type == WM_DRAG_PATH) if (ELEM(drag->icon, 0, ICON_FILE_IMAGE, ICON_FILE_MOVIE, ICON_FILE_BLANK)) /* rule might not work? */ diff --git a/source/blender/editors/space_clip/tracking_ops.c b/source/blender/editors/space_clip/tracking_ops.c index 1572b9b8f78..42077280cca 100644 --- a/source/blender/editors/space_clip/tracking_ops.c +++ b/source/blender/editors/space_clip/tracking_ops.c @@ -2107,7 +2107,7 @@ void CLIP_OT_copy_tracks(wmOperatorType *ot) /********************* paste tracks from clipboard operator ********************/ -static int paste_tracks_poll(bContext *C) +static bool paste_tracks_poll(bContext *C) { if (ED_space_clip_tracking_poll(C)) { return BKE_tracking_clipboard_has_tracks(); diff --git a/source/blender/editors/space_clip/tracking_ops_orient.c b/source/blender/editors/space_clip/tracking_ops_orient.c index 3db52e6a39b..4d1c3e0b137 100644 --- a/source/blender/editors/space_clip/tracking_ops_orient.c +++ b/source/blender/editors/space_clip/tracking_ops_orient.c @@ -108,7 +108,7 @@ static Object *get_orientation_object(bContext *C) return object; } -static int set_orientation_poll(bContext *C) +static bool set_orientation_poll(bContext *C) { SpaceClip *sc = CTX_wm_space_clip(C); if (sc != NULL) { @@ -754,7 +754,7 @@ void CLIP_OT_set_scale(wmOperatorType *ot) /********************** set solution scale operator *********************/ -static int set_solution_scale_poll(bContext *C) +static bool set_solution_scale_poll(bContext *C) { SpaceClip *sc = CTX_wm_space_clip(C); if (sc != NULL) { @@ -814,7 +814,7 @@ void CLIP_OT_set_solution_scale(wmOperatorType *ot) /********************** apply solution scale operator *********************/ -static int apply_solution_scale_poll(bContext *C) +static bool apply_solution_scale_poll(bContext *C) { SpaceClip *sc = CTX_wm_space_clip(C); if (sc != NULL) { diff --git a/source/blender/editors/space_clip/tracking_ops_stabilize.c b/source/blender/editors/space_clip/tracking_ops_stabilize.c index cb9b40f8a10..2888607a049 100644 --- a/source/blender/editors/space_clip/tracking_ops_stabilize.c +++ b/source/blender/editors/space_clip/tracking_ops_stabilize.c @@ -50,7 +50,7 @@ /********************* add 2d stabilization tracks operator ********************/ -static int stabilize_2d_poll(bContext *C) +static bool stabilize_2d_poll(bContext *C) { if (ED_space_clip_tracking_poll(C)) { SpaceClip *sc = CTX_wm_space_clip(C); diff --git a/source/blender/editors/space_clip/tracking_select.c b/source/blender/editors/space_clip/tracking_select.c index ecbc1f5ae1e..cf4687dca31 100644 --- a/source/blender/editors/space_clip/tracking_select.c +++ b/source/blender/editors/space_clip/tracking_select.c @@ -350,7 +350,7 @@ static int mouse_select(bContext *C, float co[2], int extend) return OPERATOR_FINISHED; } -static int select_poll(bContext *C) +static bool select_poll(bContext *C) { SpaceClip *sc = CTX_wm_space_clip(C); |