diff options
Diffstat (limited to 'source/blender/editors/include')
-rw-r--r-- | source/blender/editors/include/ED_anim_api.h | 3 | ||||
-rw-r--r-- | source/blender/editors/include/ED_gpencil.h | 29 | ||||
-rw-r--r-- | source/blender/editors/include/ED_image.h | 14 | ||||
-rw-r--r-- | source/blender/editors/include/ED_info.h | 6 | ||||
-rw-r--r-- | source/blender/editors/include/ED_keyframes_edit.h | 8 | ||||
-rw-r--r-- | source/blender/editors/include/ED_keyframing.h | 6 | ||||
-rw-r--r-- | source/blender/editors/include/ED_node.h | 6 | ||||
-rw-r--r-- | source/blender/editors/include/ED_object.h | 6 | ||||
-rw-r--r-- | source/blender/editors/include/ED_outliner.h | 2 | ||||
-rw-r--r-- | source/blender/editors/include/ED_particle.h | 4 | ||||
-rw-r--r-- | source/blender/editors/include/ED_transform.h | 2 | ||||
-rw-r--r-- | source/blender/editors/include/UI_icons.h | 2 | ||||
-rw-r--r-- | source/blender/editors/include/UI_interface.h | 79 | ||||
-rw-r--r-- | source/blender/editors/include/UI_resources.h | 8 | ||||
-rw-r--r-- | source/blender/editors/include/UI_view2d.h | 23 |
15 files changed, 131 insertions, 67 deletions
diff --git a/source/blender/editors/include/ED_anim_api.h b/source/blender/editors/include/ED_anim_api.h index a9b34e3c735..7d38792f332 100644 --- a/source/blender/editors/include/ED_anim_api.h +++ b/source/blender/editors/include/ED_anim_api.h @@ -229,6 +229,7 @@ typedef enum eAnim_ChannelType { ANIMTYPE_DSHAIR, ANIMTYPE_DSPOINTCLOUD, ANIMTYPE_DSVOLUME, + ANIMTYPE_DSSIMULATION, ANIMTYPE_SHAPEKEY, @@ -356,6 +357,8 @@ typedef enum eAnimFilter_Flags { #define FILTER_HAIR_OBJD(ha) (CHECK_TYPE_INLINE(ha, Hair *), ((ha->flag & HA_DS_EXPAND))) #define FILTER_POINTS_OBJD(pt) (CHECK_TYPE_INLINE(pt, PointCloud *), ((pt->flag & PT_DS_EXPAND))) #define FILTER_VOLUME_OBJD(vo) (CHECK_TYPE_INLINE(vo, Volume *), ((vo->flag & VO_DS_EXPAND))) +#define FILTER_SIMULATION_OBJD(sim) \ + (CHECK_TYPE_INLINE(sim, Simulation *), ((sim->flag & SIM_DS_EXPAND))) /* Variable use expanders */ #define FILTER_NTREE_DATA(ntree) \ (CHECK_TYPE_INLINE(ntree, bNodeTree *), (((ntree)->flag & NTREE_DS_EXPAND))) diff --git a/source/blender/editors/include/ED_gpencil.h b/source/blender/editors/include/ED_gpencil.h index 1403ae1f3cc..2dbd979564e 100644 --- a/source/blender/editors/include/ED_gpencil.h +++ b/source/blender/editors/include/ED_gpencil.h @@ -40,6 +40,7 @@ struct bGPDspoint; struct bGPDstroke; struct bGPdata; struct tGPspoint; +struct GpRandomSettings; struct ARegion; struct Depsgraph; @@ -48,6 +49,7 @@ struct RegionView3D; struct ReportList; struct Scene; struct ScrArea; +struct SnapObjectContext; struct ToolSettings; struct View3D; struct ViewLayer; @@ -69,14 +71,15 @@ struct wmOperator; * Used as part of the 'stroke cache' used during drawing of new strokes */ typedef struct tGPspoint { - float x, y; /* x and y coordinates of cursor (in relative to area) */ - float pressure; /* pressure of tablet at this point */ - float strength; /* pressure of tablet at this point for alpha factor */ - float time; /* Time relative to stroke start (used when converting to path) */ - float uv_fac; /* factor of uv along the stroke */ - float uv_rot; /* uv rotation for dor mode */ - float rnd[3]; /* rnd value */ - bool rnd_dirty; /* rnd flag */ + float x, y; /* x and y coordinates of cursor (in relative to area) */ + float pressure; /* pressure of tablet at this point */ + float strength; /* pressure of tablet at this point for alpha factor */ + float time; /* Time relative to stroke start (used when converting to path) */ + float uv_fac; /* factor of uv along the stroke */ + float uv_rot; /* uv rotation for dor mode */ + float rnd[3]; /* rnd value */ + bool rnd_dirty; /* rnd flag */ + float vert_color[4]; /* Point vertex color. */ } tGPspoint; /* ----------- Grease Pencil Tools/Context ------------- */ @@ -296,12 +299,18 @@ void ED_gpencil_fill_vertex_color_set(struct ToolSettings *ts, struct bGPDstroke *gps); void ED_gpencil_point_vertex_color_set(struct ToolSettings *ts, struct Brush *brush, - struct bGPDspoint *pt); + struct bGPDspoint *pt, + struct tGPspoint *tpt); void ED_gpencil_sbuffer_vertex_color_set(struct Depsgraph *depsgraph, struct Object *ob, struct ToolSettings *ts, struct Brush *brush, - struct Material *material); + struct Material *material, + float random_color[3], + float pen_pressure); +void ED_gpencil_init_random_settings(struct Brush *brush, + const int mval[2], + struct GpRandomSettings *random_settings); bool ED_gpencil_stroke_check_collision(struct GP_SpaceConversion *gsc, struct bGPDstroke *gps, diff --git a/source/blender/editors/include/ED_image.h b/source/blender/editors/include/ED_image.h index 910cf362a37..a8476e3d1ca 100644 --- a/source/blender/editors/include/ED_image.h +++ b/source/blender/editors/include/ED_image.h @@ -69,7 +69,7 @@ void ED_space_image_get_size(struct SpaceImage *sima, int *r_width, int *r_heigh void ED_space_image_get_size_fl(struct SpaceImage *sima, float r_size[2]); void ED_space_image_get_aspect(struct SpaceImage *sima, float *r_aspx, float *r_aspy); void ED_space_image_get_zoom(struct SpaceImage *sima, - struct ARegion *region, + const struct ARegion *region, float *r_zoomx, float *r_zoomy); void ED_space_image_get_uv_aspect(struct SpaceImage *sima, float *r_aspx, float *r_aspy); @@ -88,14 +88,18 @@ void ED_image_get_uv_aspect(struct Image *ima, float *r_aspx, float *r_aspy); void ED_image_mouse_pos(struct SpaceImage *sima, - struct ARegion *region, + const struct ARegion *region, const int mval[2], float co[2]); void ED_image_view_center_to_point(struct SpaceImage *sima, float x, float y); -void ED_image_point_pos( - struct SpaceImage *sima, struct ARegion *region, float x, float y, float *r_x, float *r_y); +void ED_image_point_pos(struct SpaceImage *sima, + const struct ARegion *region, + float x, + float y, + float *r_x, + float *r_y); void ED_image_point_pos__reverse(struct SpaceImage *sima, - struct ARegion *region, + const struct ARegion *region, const float co[2], float r_co[2]); bool ED_image_slot_cycle(struct Image *image, int direction); diff --git a/source/blender/editors/include/ED_info.h b/source/blender/editors/include/ED_info.h index 82662a6b118..1146c49bef2 100644 --- a/source/blender/editors/include/ED_info.h +++ b/source/blender/editors/include/ED_info.h @@ -31,9 +31,9 @@ struct Main; /* info_stats.c */ void ED_info_stats_clear(struct ViewLayer *view_layer); -const char *ED_info_stats_string(struct Main *bmain, - struct Scene *scene, - struct ViewLayer *view_layer); +const char *ED_info_footer_string(struct ViewLayer *view_layer); +void ED_info_draw_stats( + Main *bmain, Scene *scene, ViewLayer *view_layer, int x, int *y, int height); #ifdef __cplusplus } diff --git a/source/blender/editors/include/ED_keyframes_edit.h b/source/blender/editors/include/ED_keyframes_edit.h index 3ae0c254000..28bc0b22790 100644 --- a/source/blender/editors/include/ED_keyframes_edit.h +++ b/source/blender/editors/include/ED_keyframes_edit.h @@ -24,12 +24,12 @@ #ifndef __ED_KEYFRAMES_EDIT_H__ #define __ED_KEYFRAMES_EDIT_H__ +#include "ED_anim_api.h" /* for enum eAnimFilter_Flags */ + #ifdef __cplusplus extern "C" { #endif -#include "ED_anim_api.h" /* for enum eAnimFilter_Flags */ - struct BezTriple; struct FCurve; struct Scene; @@ -106,8 +106,8 @@ typedef enum eEditKeyframes_Mirror { typedef struct KeyframeEdit_LassoData { rctf *rectf_scaled; const rctf *rectf_view; - const int (*mcords)[2]; - int mcords_tot; + const int (*mcoords)[2]; + int mcoords_len; } KeyframeEdit_LassoData; /* use with BEZT_OK_REGION_CIRCLE */ diff --git a/source/blender/editors/include/ED_keyframing.h b/source/blender/editors/include/ED_keyframing.h index 4225ecc6f3d..5635ef2800a 100644 --- a/source/blender/editors/include/ED_keyframing.h +++ b/source/blender/editors/include/ED_keyframing.h @@ -24,6 +24,9 @@ #ifndef __ED_KEYFRAMING_H__ #define __ED_KEYFRAMING_H__ +#include "DNA_anim_types.h" +#include "RNA_types.h" + #ifdef __cplusplus extern "C" { #endif @@ -50,9 +53,6 @@ struct PropertyRNA; struct NlaKeyframingContext; -#include "DNA_anim_types.h" -#include "RNA_types.h" - /* ************ Keyframing Management **************** */ /* Get the active settings for keyframing settings from context (specifically the given scene) diff --git a/source/blender/editors/include/ED_node.h b/source/blender/editors/include/ED_node.h index 7a1f64b61d4..1dc98cfee2f 100644 --- a/source/blender/editors/include/ED_node.h +++ b/source/blender/editors/include/ED_node.h @@ -37,6 +37,7 @@ struct Tex; struct View2D; struct bContext; struct bNode; +struct bNodeSocket; struct bNodeSocketType; struct bNodeTree; struct bNodeTree; @@ -79,6 +80,10 @@ void ED_node_draw_snap( struct View2D *v2d, const float cent[2], float size, NodeBorder border, unsigned int pos); /* node_draw.c */ +void ED_node_socket_draw(struct bNodeSocket *sock, + const struct rcti *rect, + const float color[4], + float scale); void ED_node_tree_update(const struct bContext *C); void ED_node_tag_update_id(struct ID *id); void ED_node_tag_update_nodetree(struct Main *bmain, struct bNodeTree *ntree, struct bNode *node); @@ -94,6 +99,7 @@ void ED_node_set_tree_type(struct SpaceNode *snode, struct bNodeTreeType *typein bool ED_node_is_compositor(struct SpaceNode *snode); bool ED_node_is_shader(struct SpaceNode *snode); bool ED_node_is_texture(struct SpaceNode *snode); +bool ED_node_is_simulation(struct SpaceNode *snode); void ED_node_shader_default(const struct bContext *C, struct ID *id); void ED_node_composit_default(const struct bContext *C, struct Scene *scene); diff --git a/source/blender/editors/include/ED_object.h b/source/blender/editors/include/ED_object.h index 13a0dd1ffd2..e6d39d5f966 100644 --- a/source/blender/editors/include/ED_object.h +++ b/source/blender/editors/include/ED_object.h @@ -24,6 +24,9 @@ #ifndef __ED_OBJECT_H__ #define __ED_OBJECT_H__ +#include "BLI_compiler_attrs.h" +#include "DNA_object_enums.h" + #ifdef __cplusplus extern "C" { #endif @@ -54,9 +57,6 @@ struct wmOperator; struct wmOperatorType; struct wmWindowManager; -#include "BLI_compiler_attrs.h" -#include "DNA_object_enums.h" - /* object_edit.c */ /* context.object */ struct Object *ED_object_context(struct bContext *C); diff --git a/source/blender/editors/include/ED_outliner.h b/source/blender/editors/include/ED_outliner.h index beed0f98fb5..d3fc5174dd9 100644 --- a/source/blender/editors/include/ED_outliner.h +++ b/source/blender/editors/include/ED_outliner.h @@ -27,9 +27,9 @@ extern "C" { #endif +struct Base; struct ListBase; struct bContext; -struct Base; bool ED_outliner_collections_editor_poll(struct bContext *C); diff --git a/source/blender/editors/include/ED_particle.h b/source/blender/editors/include/ED_particle.h index c8a4dc5b49d..789db5ae56e 100644 --- a/source/blender/editors/include/ED_particle.h +++ b/source/blender/editors/include/ED_particle.h @@ -71,8 +71,8 @@ bool PE_mouse_particles( bool PE_box_select(struct bContext *C, const struct rcti *rect, const int sel_op); bool PE_circle_select(struct bContext *C, const int sel_op, const int mval[2], float rad); int PE_lasso_select(struct bContext *C, - const int mcords[][2], - const short moves, + const int mcoords[][2], + const int mcoords_len, const int sel_op); bool PE_deselect_all_visible_ex(struct PTCacheEdit *edit); bool PE_deselect_all_visible(struct bContext *C); diff --git a/source/blender/editors/include/ED_transform.h b/source/blender/editors/include/ED_transform.h index beba4a7199b..9969acd04b7 100644 --- a/source/blender/editors/include/ED_transform.h +++ b/source/blender/editors/include/ED_transform.h @@ -157,6 +157,8 @@ int BIF_countTransformOrientation(const struct bContext *C); #define P_GPENCIL_EDIT (1 << 13) #define P_CURSOR_EDIT (1 << 14) #define P_CLNOR_INVALIDATE (1 << 15) +/* For properties performed when confirming the transformation. */ +#define P_POST_TRANSFORM (1 << 19) void Transform_Properties(struct wmOperatorType *ot, int flags); diff --git a/source/blender/editors/include/UI_icons.h b/source/blender/editors/include/UI_icons.h index 6fdef4a06e0..452a1fca111 100644 --- a/source/blender/editors/include/UI_icons.h +++ b/source/blender/editors/include/UI_icons.h @@ -428,7 +428,7 @@ DEF_ICON(FORCE_CURVE) DEF_ICON(FORCE_BOID) DEF_ICON(FORCE_TURBULENCE) DEF_ICON(FORCE_DRAG) -DEF_ICON(FORCE_SMOKEFLOW) +DEF_ICON(FORCE_FLUIDFLOW) DEF_ICON_BLANK(673) DEF_ICON_BLANK(674) DEF_ICON(RIGID_BODY) diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index b8413fc86f9..3ad1608b47b 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -250,6 +250,8 @@ enum { UI_BUT_TEXT_RIGHT = 1 << 3, /** Prevent the button to show any tooltip. */ UI_BUT_NO_TOOLTIP = 1 << 4, + /** Do not add the usual horizontal padding for text drawing. */ + UI_BUT_NO_TEXT_PADDING = 1 << 5, /* Button align flag, for drawing groups together. * Used in 'uiBlock.flag', take care! */ @@ -500,15 +502,24 @@ typedef void (*uiButHandleRenameFunc)(struct bContext *C, void *arg, char *origs typedef void (*uiButHandleNFunc)(struct bContext *C, void *argN, void *arg2); typedef void (*uiButHandleHoldFunc)(struct bContext *C, struct ARegion *butregion, uiBut *but); typedef int (*uiButCompleteFunc)(struct bContext *C, char *str, void *arg); -typedef struct ARegion *(*uiButSearchCreateFunc)(struct bContext *C, - struct ARegion *butregion, - uiBut *but); -typedef void (*uiButSearchFunc)(const struct bContext *C, - void *arg, - const char *str, - uiSearchItems *items); -typedef void (*uiButSearchArgFreeFunc)(void *arg); +/* Search types. */ +typedef struct ARegion *(*uiButSearchCreateFn)(struct bContext *C, + struct ARegion *butregion, + uiBut *but); +typedef void (*uiButSearchUpdateFn)(const struct bContext *C, + void *arg, + const char *str, + uiSearchItems *items); +typedef void (*uiButSearchArgFreeFn)(void *arg); +typedef bool (*uiButSearchContextMenuFn)(struct bContext *C, + void *arg, + void *active, + const struct wmEvent *event); +typedef struct ARegion *(*uiButSearchTooltipFn)(struct bContext *C, + struct ARegion *region, + void *arg, + void *active); /* Must return allocated string. */ typedef char *(*uiButToolTipFunc)(struct bContext *C, void *argN, const char *tip); @@ -619,8 +630,7 @@ void UI_popup_block_invoke_ex(struct bContext *C, uiBlockCreateFunc func, void *arg, void (*arg_free)(void *arg), - const char *opname, - int opcontext); + bool can_refresh); void UI_popup_block_ex(struct bContext *C, uiBlockCreateFunc func, uiBlockHandleFunc popup_func, @@ -1570,21 +1580,25 @@ eAutoPropButsReturn uiDefAutoButsRNA(uiLayout *layout, /* use inside searchfunc to add items */ bool UI_search_item_add(uiSearchItems *items, const char *name, void *poin, int iconid, int state); -/* bfunc gets search item *poin as arg2, or if NULL the old string */ void UI_but_func_search_set(uiBut *but, - uiButSearchCreateFunc cfunc, - uiButSearchFunc sfunc, + uiButSearchCreateFn search_create_fn, + uiButSearchUpdateFn search_update_fn, void *arg, - uiButSearchArgFreeFunc search_arg_free_func, - uiButHandleFunc bfunc, - const char *search_sep_string, + uiButSearchArgFreeFn search_arg_free_fn, + uiButHandleFunc search_exec_fn, void *active); +void UI_but_func_search_set_context_menu(uiBut *but, uiButSearchContextMenuFn context_menu_fn); +void UI_but_func_search_set_tooltip(uiBut *but, uiButSearchTooltipFn tooltip_fn); +void UI_but_func_search_set_sep_string(uiBut *but, const char *search_sep_string); + /* height in pixels, it's using hardcoded values still */ int UI_searchbox_size_y(void); int UI_searchbox_size_x(void); /* check if a string is in an existing search box */ int UI_search_items_find_index(uiSearchItems *items, const char *name); +void UI_but_node_link_set(uiBut *but, struct bNodeSocket *socket, const float draw_color[4]); + void UI_block_func_handle_set(uiBlock *block, uiBlockHandleFunc func, void *arg); void UI_block_func_butmenu_set(uiBlock *block, uiMenuHandleFunc func, void *arg); void UI_block_func_set(uiBlock *block, uiButHandleFunc func, void *arg1, void *arg2); @@ -1668,6 +1682,7 @@ void UI_panel_end(const struct ScrArea *area, void UI_panels_scale(struct ARegion *region, float new_width); void UI_panel_label_offset(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_category_is_visible(const struct ARegion *region); void UI_panel_category_add(struct ARegion *region, const char *name); @@ -1772,6 +1787,10 @@ enum { UI_ITEM_O_DEPRESS = 1 << 10, UI_ITEM_R_COMPACT = 1 << 11, UI_ITEM_R_CHECKBOX_INVERT = 1 << 12, + /** Don't add a real decorator item, just blank space. */ + UI_ITEM_R_FORCE_BLANK_DECORATE = 1 << 13, + /* Even create the property split layout if there's no name to show there. */ + UI_ITEM_R_SPLIT_EMPTY_NAME = 1 << 14, }; #define UI_HEADER_OFFSET ((void)0, 0.4f * UI_UNIT_X) @@ -1782,6 +1801,9 @@ enum { UI_TEMPLATE_OP_PROPS_SHOW_EMPTY = 1 << 1, UI_TEMPLATE_OP_PROPS_COMPACT = 1 << 2, UI_TEMPLATE_OP_PROPS_HIDE_ADVANCED = 1 << 3, + /* Disable property split for the default layout (custom ui callbacks still have full control + * over the layout and can enable it). */ + UI_TEMPLATE_OP_PROPS_NO_SPLIT_LAYOUT = 1 << 4, }; /* used for transp checkers */ @@ -1869,7 +1891,9 @@ bool uiLayoutGetPropDecorate(uiLayout *layout); /* layout specifiers */ uiLayout *uiLayoutRow(uiLayout *layout, bool align); +uiLayout *uiLayoutRowWithHeading(uiLayout *layout, bool align, const char *heading); uiLayout *uiLayoutColumn(uiLayout *layout, bool align); +uiLayout *uiLayoutColumnWithHeading(uiLayout *layout, bool align, const char *heading); uiLayout *uiLayoutColumnFlow(uiLayout *layout, int number, bool align); uiLayout *uiLayoutGridFlow(uiLayout *layout, bool row_major, @@ -2044,11 +2068,11 @@ void uiTemplateOperatorSearch(uiLayout *layout); void UI_but_func_menu_search(uiBut *but); void uiTemplateMenuSearch(uiLayout *layout); -eAutoPropButsReturn uiTemplateOperatorPropertyButs(const struct bContext *C, - uiLayout *layout, - struct wmOperator *op, - const eButLabelAlign label_align, - const short flag); +void uiTemplateOperatorPropertyButs(const struct bContext *C, + uiLayout *layout, + struct wmOperator *op, + eButLabelAlign label_align, + short flag); void uiTemplateHeader3D_mode(uiLayout *layout, struct bContext *C); void uiTemplateEditModeSelection(uiLayout *layout, struct bContext *C); void uiTemplateReportsBanner(uiLayout *layout, struct bContext *C); @@ -2088,6 +2112,7 @@ void uiTemplateList(uiLayout *layout, bool sort_reverse, bool sort_lock); void uiTemplateNodeLink(uiLayout *layout, + struct bContext *C, struct bNodeTree *ntree, struct bNode *node, struct bNodeSocket *input); @@ -2297,6 +2322,14 @@ void uiItemsFullEnumO_items(uiLayout *layout, const EnumPropertyItem *item_array, int totitem); +typedef struct uiPropertySplitWrapper { + uiLayout *label_column; + uiLayout *property_row; + uiLayout *decorate_column; +} uiPropertySplitWrapper; + +uiPropertySplitWrapper uiItemPropertySplitWrapperCreate(uiLayout *parent_layout); + void uiItemL(uiLayout *layout, const char *name, int icon); /* label */ void uiItemL_ex( uiLayout *layout, const char *name, int icon, const bool highlight, const bool redalert); @@ -2308,6 +2341,9 @@ void uiItemM_ptr(uiLayout *layout, struct MenuType *mt, const char *name, int ic void uiItemM(uiLayout *layout, const char *menuname, const char *name, int icon); /* menu contents */ void uiItemMContents(uiLayout *layout, const char *menuname); +/* Decorators */ +void uiItemDecoratorR_prop(uiLayout *layout, PointerRNA *ptr, PropertyRNA *prop, int index); +void uiItemDecoratorR(uiLayout *layout, PointerRNA *ptr, const char *propname, int index); /* value */ void uiItemV(uiLayout *layout, const char *name, int icon, int argval); /* separator */ @@ -2375,6 +2411,7 @@ bool UI_context_copy_to_selected_list(struct bContext *C, /* Helpers for Operators */ uiBut *UI_context_active_but_get(const struct bContext *C); +uiBut *UI_context_active_but_get_respect_menu(const struct bContext *C); uiBut *UI_context_active_but_prop_get(const struct bContext *C, struct PointerRNA *r_ptr, struct PropertyRNA **r_prop, diff --git a/source/blender/editors/include/UI_resources.h b/source/blender/editors/include/UI_resources.h index b0995250979..c5c4ca79f14 100644 --- a/source/blender/editors/include/UI_resources.h +++ b/source/blender/editors/include/UI_resources.h @@ -26,10 +26,6 @@ #include "BLI_sys_types.h" -#ifdef __cplusplus -extern "C" { -#endif - /* Define icon enum. */ #define DEF_ICON(name) ICON_##name, #define DEF_ICON_VECTOR(name) ICON_##name, @@ -47,6 +43,10 @@ typedef enum { /* use to denote intentionally unset theme color */ #define TH_UNDEFINED -1 +#ifdef __cplusplus +extern "C" { +#endif + typedef enum ThemeColorID { TH_REDALERT, diff --git a/source/blender/editors/include/UI_view2d.h b/source/blender/editors/include/UI_view2d.h index d4db1b14074..ffc06e94a90 100644 --- a/source/blender/editors/include/UI_view2d.h +++ b/source/blender/editors/include/UI_view2d.h @@ -137,9 +137,9 @@ void UI_view2d_view_orthoSpecial(struct ARegion *region, struct View2D *v2d, con void UI_view2d_view_restore(const struct bContext *C); /* grid drawing */ -void UI_view2d_constant_grid_draw(struct View2D *v2d, float step); +void UI_view2d_constant_grid_draw(const struct View2D *v2d, float step); void UI_view2d_multi_grid_draw( - struct View2D *v2d, int colorid, float step, int level_size, int totlevels); + const struct View2D *v2d, int colorid, float step, int level_size, int totlevels); void UI_view2d_draw_lines_y__values(const struct View2D *v2d); void UI_view2d_draw_lines_x__values(const struct View2D *v2d); @@ -209,14 +209,17 @@ bool UI_view2d_view_to_region_clip( const struct View2D *v2d, float x, float y, int *r_region_x, int *r_region_y) ATTR_NONNULL(); void UI_view2d_view_to_region( - struct View2D *v2d, float x, float y, int *r_region_x, int *r_region_y) ATTR_NONNULL(); -void UI_view2d_view_to_region_fl( - struct View2D *v2d, float x, float y, float *r_region_x, float *r_region_y) ATTR_NONNULL(); -void UI_view2d_view_to_region_m4(struct View2D *v2d, float matrix[4][4]) ATTR_NONNULL(); -void UI_view2d_view_to_region_rcti(struct View2D *v2d, + const struct View2D *v2d, float x, float y, int *r_region_x, int *r_region_y) ATTR_NONNULL(); +void UI_view2d_view_to_region_fl(const struct View2D *v2d, + float x, + float y, + float *r_region_x, + float *r_region_y) ATTR_NONNULL(); +void UI_view2d_view_to_region_m4(const struct View2D *v2d, float matrix[4][4]) ATTR_NONNULL(); +void UI_view2d_view_to_region_rcti(const struct View2D *v2d, const struct rctf *rect_src, struct rcti *rect_dst) ATTR_NONNULL(); -bool UI_view2d_view_to_region_rcti_clip(struct View2D *v2d, +bool UI_view2d_view_to_region_rcti_clip(const struct View2D *v2d, const struct rctf *rect_src, struct rcti *rect_dst) ATTR_NONNULL(); @@ -228,9 +231,9 @@ void UI_view2d_scroller_size_get(const struct View2D *v2d, float *r_x, float *r_ void UI_view2d_scale_get(struct View2D *v2d, float *r_x, float *r_y); float UI_view2d_scale_get_x(const struct View2D *v2d); float UI_view2d_scale_get_y(const struct View2D *v2d); -void UI_view2d_scale_get_inverse(struct View2D *v2d, float *r_x, float *r_y); +void UI_view2d_scale_get_inverse(const struct View2D *v2d, float *r_x, float *r_y); -void UI_view2d_center_get(struct View2D *v2d, float *r_x, float *r_y); +void UI_view2d_center_get(const struct View2D *v2d, float *r_x, float *r_y); void UI_view2d_center_set(struct View2D *v2d, float x, float y); void UI_view2d_offset(struct View2D *v2d, float xfac, float yfac); |