Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2021-01-15 19:48:22 +0300
committerHans Goudey <h.goudey@me.com>2021-01-15 19:48:22 +0300
commit237e27e161c9ac3c6b9d74dae1cafb5ea55c0458 (patch)
treeb1f2193e6269befc4bf365573b15a89c5c76aedd /source/blender/editors/space_node/node_intern.h
parent20a54347eec65d687c8d87bb16e1e7df9cad1a8b (diff)
Cleanup: Add const in various places in node code
Also includes some various other minor cleanups, like using bool instead of int in a couple places.
Diffstat (limited to 'source/blender/editors/space_node/node_intern.h')
-rw-r--r--source/blender/editors/space_node/node_intern.h27
1 files changed, 15 insertions, 12 deletions
diff --git a/source/blender/editors/space_node/node_intern.h b/source/blender/editors/space_node/node_intern.h
index aa59b7293a3..16c166ef5b1 100644
--- a/source/blender/editors/space_node/node_intern.h
+++ b/source/blender/editors/space_node/node_intern.h
@@ -61,14 +61,17 @@ void space_node_group_offset(struct SpaceNode *snode, float *x, float *y);
/* node_draw.c */
int node_get_colorid(struct bNode *node);
int node_get_resize_cursor(int directions);
-void node_draw_shadow(struct SpaceNode *snode, struct bNode *node, float radius, float alpha);
+void node_draw_shadow(const struct SpaceNode *snode,
+ const struct bNode *node,
+ float radius,
+ float alpha);
void node_draw_default(const struct bContext *C,
struct ARegion *region,
struct SpaceNode *snode,
struct bNodeTree *ntree,
struct bNode *node,
bNodeInstanceKey key);
-void node_draw_sockets(struct View2D *v2d,
+void node_draw_sockets(const struct View2D *v2d,
const struct bContext *C,
struct bNodeTree *ntree,
struct bNode *node,
@@ -92,9 +95,9 @@ void node_draw_space(const bContext *C, ARegion *region);
void node_set_cursor(struct wmWindow *win, struct SpaceNode *snode, float cursor[2]);
/* DPI scaled coords */
-void node_to_view(struct bNode *node, float x, float y, float *rx, float *ry);
-void node_to_updated_rect(struct bNode *node, rctf *r_rect);
-void node_from_view(struct bNode *node, float x, float y, float *rx, float *ry);
+void node_to_view(const struct bNode *node, float x, float y, float *rx, float *ry);
+void node_to_updated_rect(const struct bNode *node, rctf *r_rect);
+void node_from_view(const struct bNode *node, float x, float y, float *rx, float *ry);
/* node_buttons.c */
void node_buttons_register(struct ARegionType *art);
@@ -145,17 +148,17 @@ void nodelink_batch_start(struct SpaceNode *snode);
void nodelink_batch_end(struct SpaceNode *snode);
void node_draw_link(struct View2D *v2d, struct SpaceNode *snode, struct bNodeLink *link);
-void node_draw_link_bezier(struct View2D *v2d,
- struct SpaceNode *snode,
- struct bNodeLink *link,
+void node_draw_link_bezier(const struct View2D *v2d,
+ const struct SpaceNode *snode,
+ const struct bNodeLink *link,
int th_col1,
int th_col2,
int th_col3);
-bool node_link_bezier_points(struct View2D *v2d,
- struct SpaceNode *snode,
- struct bNodeLink *link,
+bool node_link_bezier_points(const struct View2D *v2d,
+ const struct SpaceNode *snode,
+ const struct bNodeLink *link,
float coord_array[][2],
- int resol);
+ const int resol);
void draw_nodespace_back_pix(const struct bContext *C,
struct ARegion *region,
struct SpaceNode *snode,