diff options
Diffstat (limited to 'source/blender/editors/include')
-rw-r--r-- | source/blender/editors/include/ED_buttons.h | 3 | ||||
-rw-r--r-- | source/blender/editors/include/ED_curve.h | 2 | ||||
-rw-r--r-- | source/blender/editors/include/ED_fileselect.h | 4 | ||||
-rw-r--r-- | source/blender/editors/include/ED_gizmo_library.h | 2 | ||||
-rw-r--r-- | source/blender/editors/include/ED_gpencil.h | 28 | ||||
-rw-r--r-- | source/blender/editors/include/ED_image.h | 7 | ||||
-rw-r--r-- | source/blender/editors/include/ED_numinput.h | 1 | ||||
-rw-r--r-- | source/blender/editors/include/ED_object.h | 1 | ||||
-rw-r--r-- | source/blender/editors/include/ED_screen.h | 1 | ||||
-rw-r--r-- | source/blender/editors/include/ED_undo.h | 1 | ||||
-rw-r--r-- | source/blender/editors/include/ED_view3d.h | 4 | ||||
-rw-r--r-- | source/blender/editors/include/UI_interface.h | 15 |
12 files changed, 49 insertions, 20 deletions
diff --git a/source/blender/editors/include/ED_buttons.h b/source/blender/editors/include/ED_buttons.h index 5d153757900..1ff160b2ca8 100644 --- a/source/blender/editors/include/ED_buttons.h +++ b/source/blender/editors/include/ED_buttons.h @@ -27,6 +27,7 @@ extern "C" { #endif struct SpaceProperties; +struct bContext; int ED_buttons_tabs_list(struct SpaceProperties *sbuts, short *context_tabs_array); bool ED_buttons_tab_has_search_result(struct SpaceProperties *sbuts, const int index); @@ -35,6 +36,8 @@ void ED_buttons_search_string_set(struct SpaceProperties *sbuts, const char *val int ED_buttons_search_string_length(struct SpaceProperties *sbuts); const char *ED_buttons_search_string_get(struct SpaceProperties *sbuts); +void ED_buttons_set_context(const struct bContext *C, PointerRNA *ptr, const int context); + #ifdef __cplusplus } #endif diff --git a/source/blender/editors/include/ED_curve.h b/source/blender/editors/include/ED_curve.h index f9b1d9cdc64..8015a665970 100644 --- a/source/blender/editors/include/ED_curve.h +++ b/source/blender/editors/include/ED_curve.h @@ -84,7 +84,7 @@ void ED_curve_editfont_load(struct Object *obedit); void ED_curve_editfont_make(struct Object *obedit); void ED_curve_editfont_free(struct Object *obedit); -void ED_text_to_object(struct bContext *C, struct Text *text, const bool split_lines); +void ED_text_to_object(struct bContext *C, const struct Text *text, const bool split_lines); void ED_curve_beztcpy(struct EditNurb *editnurb, struct BezTriple *dst, diff --git a/source/blender/editors/include/ED_fileselect.h b/source/blender/editors/include/ED_fileselect.h index 341f97943a5..84808416074 100644 --- a/source/blender/editors/include/ED_fileselect.h +++ b/source/blender/editors/include/ED_fileselect.h @@ -35,6 +35,7 @@ struct SpaceFile; struct bContext; struct bScreen; struct uiBlock; +struct wmOperator; struct wmWindow; struct wmWindowManager; @@ -145,6 +146,9 @@ void ED_fileselect_window_params_get(const struct wmWindow *win, int win_size[2], bool *is_maximized); +struct ScrArea *ED_fileselect_handler_area_find(const struct wmWindow *win, + const struct wmOperator *file_operator); + int ED_path_extension_type(const char *path); int ED_file_extension_icon(const char *path); diff --git a/source/blender/editors/include/ED_gizmo_library.h b/source/blender/editors/include/ED_gizmo_library.h index 861b563521f..434ab743d18 100644 --- a/source/blender/editors/include/ED_gizmo_library.h +++ b/source/blender/editors/include/ED_gizmo_library.h @@ -19,7 +19,7 @@ * * \name Generic Gizmos. * - * This is exposes pre-defined gizmos for re-use. + * This is exposes predefined gizmos for re-use. */ #pragma once diff --git a/source/blender/editors/include/ED_gpencil.h b/source/blender/editors/include/ED_gpencil.h index 398a1630cf6..be2f714dfe1 100644 --- a/source/blender/editors/include/ED_gpencil.h +++ b/source/blender/editors/include/ED_gpencil.h @@ -63,6 +63,8 @@ struct bAnimContext; struct wmKeyConfig; struct wmOperator; +#define GPENCIL_MINIMUM_JOIN_DIST 20.0f + /* Reproject stroke modes. */ typedef enum eGP_ReprojectModes { /* Axis */ @@ -79,6 +81,12 @@ typedef enum eGP_ReprojectModes { GP_REPROJECT_KEEP, } eGP_ReprojectModes; +/* Target object modes. */ +typedef enum eGP_TargetObjectMode { + GP_TARGET_OB_NEW = 0, + GP_TARGET_OB_SELECTED = 1, +} eGP_TargetObjectMode; + /* ------------- Grease-Pencil Runtime Data ---------------- */ /* Temporary 'Stroke Point' data (2D / screen-space) @@ -308,7 +316,8 @@ void ED_gpencil_update_color_uv(struct Main *bmain, struct Material *mat); * 2 - Hit in point B * 3 - Hit in point A and B */ -int ED_gpencil_select_stroke_segment(struct bGPDlayer *gpl, +int ED_gpencil_select_stroke_segment(struct bGPdata *gpd, + struct bGPDlayer *gpl, struct bGPDstroke *gps, struct bGPDspoint *pt, bool select, @@ -318,6 +327,7 @@ int ED_gpencil_select_stroke_segment(struct bGPDlayer *gpl, float r_hitb[3]); void ED_gpencil_select_toggle_all(struct bContext *C, int action); +void ED_gpencil_select_curve_toggle_all(struct bContext *C, int action); /* Ensure stroke sbuffer size is enough */ struct tGPspoint *ED_gpencil_sbuffer_ensure(struct tGPspoint *buffer_array, @@ -358,6 +368,22 @@ bool ED_gpencil_stroke_point_is_inside(struct bGPDstroke *gps, int mouse[2], const float diff_mat[4][4]); +struct bGPDstroke *ED_gpencil_stroke_nearest_to_ends(struct bContext *C, + struct GP_SpaceConversion *gsc, + struct bGPDlayer *gpl, + struct bGPDframe *gpf, + struct bGPDstroke *gps, + const float radius, + int *r_index); + +struct bGPDstroke *ED_gpencil_stroke_join_and_trim(struct bGPdata *gpd, + struct bGPDframe *gpf, + struct bGPDstroke *gps, + struct bGPDstroke *gps_dst, + const int pt_index); + +void ED_gpencil_stroke_close_by_distance(struct bGPDstroke *gps, const float threshold); + #ifdef __cplusplus } #endif diff --git a/source/blender/editors/include/ED_image.h b/source/blender/editors/include/ED_image.h index 4835d2118d9..c1d3a17b9b6 100644 --- a/source/blender/editors/include/ED_image.h +++ b/source/blender/editors/include/ED_image.h @@ -55,11 +55,8 @@ void ED_space_image_auto_set(const struct bContext *C, struct SpaceImage *sima); struct Mask *ED_space_image_get_mask(struct SpaceImage *sima); void ED_space_image_set_mask(struct bContext *C, struct SpaceImage *sima, struct Mask *mask); -bool ED_space_image_color_sample(struct SpaceImage *sima, - struct ARegion *region, - int mval[2], - float r_col[3], - bool *r_is_data); +bool ED_space_image_color_sample( + struct SpaceImage *sima, struct ARegion *region, int mval[2], float r_col[3], bool *r_is_data); struct ImBuf *ED_space_image_acquire_buffer(struct SpaceImage *sima, void **r_lock, int tile); int ED_space_image_get_display_channel_mask(struct ImBuf *ibuf); void ED_space_image_release_buffer(struct SpaceImage *sima, struct ImBuf *ibuf, void *lock); diff --git a/source/blender/editors/include/ED_numinput.h b/source/blender/editors/include/ED_numinput.h index 6c5aacafc7a..50f1ce1efe2 100644 --- a/source/blender/editors/include/ED_numinput.h +++ b/source/blender/editors/include/ED_numinput.h @@ -99,6 +99,7 @@ bool hasNumInput(const NumInput *n); bool applyNumInput(NumInput *n, float *vec); bool handleNumInput(struct bContext *C, NumInput *n, const struct wmEvent *event); +/** Share with `TFM_MODAL_CANCEL` in `transform.h`. */ #define NUM_MODAL_INCREMENT_UP 18 #define NUM_MODAL_INCREMENT_DOWN 19 diff --git a/source/blender/editors/include/ED_object.h b/source/blender/editors/include/ED_object.h index 6fdd65fdcc9..2e9b711c99a 100644 --- a/source/blender/editors/include/ED_object.h +++ b/source/blender/editors/include/ED_object.h @@ -160,6 +160,7 @@ extern struct EnumPropertyItem prop_clear_parent_types[]; extern struct EnumPropertyItem prop_make_parent_types[]; #endif +/* Set the object's parent, return true iff successful. */ bool ED_object_parent_set(struct ReportList *reports, const struct bContext *C, struct Scene *scene, diff --git a/source/blender/editors/include/ED_screen.h b/source/blender/editors/include/ED_screen.h index b8500ba0c37..dc1c43c0337 100644 --- a/source/blender/editors/include/ED_screen.h +++ b/source/blender/editors/include/ED_screen.h @@ -199,6 +199,7 @@ int ED_region_global_size_y(void); void ED_area_update_region_sizes(struct wmWindowManager *wm, struct wmWindow *win, struct ScrArea *area); +bool ED_area_has_shared_border(struct ScrArea *a, struct ScrArea *b); ScrArea *ED_screen_areas_iter_first(const struct wmWindow *win, const bScreen *screen); ScrArea *ED_screen_areas_iter_next(const bScreen *screen, const ScrArea *area); diff --git a/source/blender/editors/include/ED_undo.h b/source/blender/editors/include/ED_undo.h index 989854872f3..7b643e7c764 100644 --- a/source/blender/editors/include/ED_undo.h +++ b/source/blender/editors/include/ED_undo.h @@ -87,6 +87,7 @@ void ED_undosys_type_free(void); /* memfile_undo.c */ struct MemFile *ED_undosys_stack_memfile_get_active(struct UndoStack *ustack); +void ED_undosys_stack_memfile_id_changed_tag(struct UndoStack *ustack, struct ID *id); #ifdef __cplusplus } diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h index d3eb6c00f57..a0246174970 100644 --- a/source/blender/editors/include/ED_view3d.h +++ b/source/blender/editors/include/ED_view3d.h @@ -459,6 +459,8 @@ void ED_view3d_clipping_calc(struct BoundBox *bb, const struct ARegion *region, const struct Object *ob, const struct rcti *rect); +bool ED_view3d_clipping_clamp_minmax(const struct RegionView3D *rv3d, float min[3], float max[3]); + void ED_view3d_clipping_local(struct RegionView3D *rv3d, const float mat[4][4]); bool ED_view3d_clipping_test(const struct RegionView3D *rv3d, const float co[3], @@ -693,7 +695,7 @@ void ED_view3d_grid_steps(const struct Scene *scene, float *r_grid_steps); float ED_view3d_grid_view_scale(struct Scene *scene, struct View3D *v3d, - struct RegionView3D *rv3d, + struct ARegion *region, const char **r_grid_unit); void ED_scene_draw_fps(const struct Scene *scene, int xoffset, int *yoffset); diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index c987a8ac13b..f9dc23502c7 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -1682,7 +1682,7 @@ void UI_panels_begin(const struct bContext *C, struct ARegion *region); void UI_panels_end(const struct bContext *C, struct ARegion *region, int *r_x, int *r_y); void UI_panels_draw(const struct bContext *C, struct ARegion *region); -struct Panel *UI_panel_find_by_type(struct ListBase *lb, struct PanelType *pt); +struct Panel *UI_panel_find_by_type(struct ListBase *lb, const struct PanelType *pt); struct Panel *UI_panel_begin(struct ARegion *region, struct ListBase *lb, uiBlock *block, @@ -1695,29 +1695,22 @@ void UI_panel_end(struct Panel *panel, int width, int height); bool UI_panel_is_closed(const struct Panel *panel); bool UI_panel_is_active(const struct Panel *panel); -void UI_panel_label_offset(struct uiBlock *block, int *r_x, int *r_y); +void UI_panel_label_offset(const struct uiBlock *block, int *r_x, int *r_y); int UI_panel_size_y(const struct Panel *panel); bool UI_panel_is_dragging(const struct Panel *panel); bool UI_panel_matches_search_filter(const struct Panel *panel); bool UI_panel_category_is_visible(const struct ARegion *region); void UI_panel_category_add(struct ARegion *region, const char *name); -struct PanelCategoryDyn *UI_panel_category_find(struct ARegion *region, const char *idname); +struct PanelCategoryDyn *UI_panel_category_find(const struct ARegion *region, const char *idname); struct PanelCategoryStack *UI_panel_category_active_find(struct ARegion *region, const char *idname); const char *UI_panel_category_active_get(struct ARegion *region, bool set_fallback); void UI_panel_category_active_set(struct ARegion *region, const char *idname); void UI_panel_category_active_set_default(struct ARegion *region, const char *idname); -struct PanelCategoryDyn *UI_panel_category_find_mouse_over_ex(struct ARegion *region, - const int x, - const int y); -struct PanelCategoryDyn *UI_panel_category_find_mouse_over(struct ARegion *region, - const struct wmEvent *event); void UI_panel_category_clear_all(struct ARegion *region); void UI_panel_category_draw_all(struct ARegion *region, const char *category_id_active); -struct PanelType *UI_paneltype_find(int space_id, int region_id, const char *idname); - /* Panel custom data. */ struct PointerRNA *UI_panel_custom_data_get(const struct Panel *panel); struct PointerRNA *UI_region_panel_custom_data_under_cursor(const struct bContext *C, @@ -1728,7 +1721,7 @@ void UI_panel_custom_data_set(struct Panel *panel, struct PointerRNA *custom_dat struct Panel *UI_panel_add_instanced(const struct bContext *C, struct ARegion *region, struct ListBase *panels, - char *panel_idname, + const char *panel_idname, struct PointerRNA *custom_data); void UI_panels_free_instanced(const struct bContext *C, struct ARegion *region); |