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:
Diffstat (limited to 'source/blender/editors/space_node')
-rw-r--r--source/blender/editors/space_node/drawnode.cc4
-rw-r--r--source/blender/editors/space_node/node_add.cc5
-rw-r--r--source/blender/editors/space_node/node_draw.cc11
-rw-r--r--source/blender/editors/space_node/node_edit.cc20
-rw-r--r--source/blender/editors/space_node/node_intern.hh30
-rw-r--r--source/blender/editors/space_node/node_relationships.cc2
-rw-r--r--source/blender/editors/space_node/node_view.cc4
-rw-r--r--source/blender/editors/space_node/space_node.cc1
8 files changed, 31 insertions, 46 deletions
diff --git a/source/blender/editors/space_node/drawnode.cc b/source/blender/editors/space_node/drawnode.cc
index 2fda7af3c14..f229e7090bb 100644
--- a/source/blender/editors/space_node/drawnode.cc
+++ b/source/blender/editors/space_node/drawnode.cc
@@ -3508,7 +3508,6 @@ void draw_nodespace_back_pix(const bContext &C,
GPU_matrix_pop();
}
-/* return quadratic beziers points for a given nodelink and clip if v2d is not nullptr. */
bool node_link_bezier_handles(const View2D *v2d,
const SpaceNode *snode,
const bNodeLink &link,
@@ -3617,7 +3616,6 @@ bool node_link_bezier_handles(const View2D *v2d,
return true;
}
-/* if v2d not nullptr, it clips and returns 0 if not visible */
bool node_link_bezier_points(const View2D *v2d,
const SpaceNode *snode,
const bNodeLink &link,
@@ -3934,7 +3932,6 @@ static void nodelink_batch_add_link(const SpaceNode &snode,
}
}
-/* don't do shadows if th_col3 is -1. */
void node_draw_link_bezier(const bContext &C,
const View2D &v2d,
const SpaceNode &snode,
@@ -4060,7 +4057,6 @@ void node_draw_link_bezier(const bContext &C,
}
}
-/* NOTE: this is used for fake links in groups too. */
void node_draw_link(const bContext &C,
const View2D &v2d,
const SpaceNode &snode,
diff --git a/source/blender/editors/space_node/node_add.cc b/source/blender/editors/space_node/node_add.cc
index 5a8d91db085..c6a5e8e68c0 100644
--- a/source/blender/editors/space_node/node_add.cc
+++ b/source/blender/editors/space_node/node_add.cc
@@ -61,11 +61,6 @@
/** \name Utilities
* \{ */
-/**
- * XXX Does some additional initialization on top of #nodeAddNode
- * Can be used with both custom and static nodes,
- * if `idname == nullptr` the static int type will be used instead.
- */
bNode *node_add_node(const bContext &C, const char *idname, int type, float locx, float locy)
{
SpaceNode &snode = *CTX_wm_space_node(&C);
diff --git a/source/blender/editors/space_node/node_draw.cc b/source/blender/editors/space_node/node_draw.cc
index 48a81f3dc3a..b4853a6b595 100644
--- a/source/blender/editors/space_node/node_draw.cc
+++ b/source/blender/editors/space_node/node_draw.cc
@@ -259,10 +259,6 @@ static bool compare_nodes(const bNode *a, const bNode *b)
return false;
}
-/**
- * Sort nodes by selection: unselected nodes first, then selected,
- * then the active node at the very end. Relative order is kept intact.
- */
void ED_node_sort(bNodeTree *ntree)
{
/* Merge sort is the algorithm of choice here. */
@@ -799,8 +795,6 @@ static void node_socket_outline_color_get(const bool selected,
}
}
-/* Usual convention here would be node_socket_get_color(), but that's already used (for setting a
- * color property socket). */
void node_socket_color_get(const bContext &C,
const bNodeTree &ntree,
PointerRNA &node_ptr,
@@ -1106,11 +1100,6 @@ static void node_socket_draw_nested(const bContext &C,
UI_block_emboss_set(block, old_emboss);
}
-/**
- * Draw a single node socket at default size.
- * \note this is only called from external code, internally #node_socket_draw_nested() is used for
- * optimized drawing of multiple/all sockets of a node.
- */
void ED_node_socket_draw(bNodeSocket *sock, const rcti *rect, const float color[4], float scale)
{
const float size = 2.25f * NODE_SOCKSIZE * scale;
diff --git a/source/blender/editors/space_node/node_edit.cc b/source/blender/editors/space_node/node_edit.cc
index 3bce32e7af4..fb90e2bfe50 100644
--- a/source/blender/editors/space_node/node_edit.cc
+++ b/source/blender/editors/space_node/node_edit.cc
@@ -318,13 +318,6 @@ static void compo_startjob(void *cjv,
ntree->progress = nullptr;
}
-/**
- * \param scene_owner: is the owner of the job,
- * we don't use it for anything else currently so could also be a void pointer,
- * but for now keep it an 'Scene' for consistency.
- *
- * \note only call from spaces `refresh` callbacks, not direct! - use with care.
- */
void ED_node_composite_job(const bContext *C, struct bNodeTree *nodetree, Scene *scene_owner)
{
Main *bmain = CTX_data_main(C);
@@ -368,7 +361,6 @@ void ED_node_composite_job(const bContext *C, struct bNodeTree *nodetree, Scene
/* ***************************************** */
-/* operator poll callback */
bool composite_node_active(bContext *C)
{
if (ED_operator_node_active(C)) {
@@ -380,7 +372,6 @@ bool composite_node_active(bContext *C)
return false;
}
-/* operator poll callback */
bool composite_node_editable(bContext *C)
{
if (ED_operator_node_editable(C)) {
@@ -468,8 +459,6 @@ bool ED_node_is_geometry(struct SpaceNode *snode)
return STREQ(snode->tree_idname, ntreeType_Geometry->idname);
}
-/* assumes nothing being done in ntree yet, sets the default in/out node */
-/* called from shading buttons or header */
void ED_node_shader_default(const bContext *C, ID *id)
{
Main *bmain = CTX_data_main(C);
@@ -536,8 +525,6 @@ void ED_node_shader_default(const bContext *C, ID *id)
}
}
-/* assumes nothing being done in ntree yet, sets the default in/out node */
-/* called from shading buttons or header */
void ED_node_composit_default(const bContext *C, struct Scene *sce)
{
/* but lets check it anyway */
@@ -571,8 +558,6 @@ void ED_node_composit_default(const bContext *C, struct Scene *sce)
ntreeUpdateTree(CTX_data_main(C), sce->nodetree);
}
-/* assumes nothing being done in ntree yet, sets the default in/out node */
-/* called from shading buttons or header */
void ED_node_texture_default(const bContext *C, Tex *tex)
{
/* but lets check it anyway */
@@ -601,7 +586,9 @@ void ED_node_texture_default(const bContext *C, Tex *tex)
ntreeUpdateTree(CTX_data_main(C), tex->nodetree);
}
-/* Here we set the active tree(s), even called for each redraw now, so keep it fast :) */
+/**
+ * Here we set the active tree(s), even called for each redraw now, so keep it fast :)
+ */
void snode_set_context(const bContext &C)
{
SpaceNode *snode = CTX_wm_space_node(&C);
@@ -1192,7 +1179,6 @@ static bool cursor_isect_multi_input_socket(const float cursor[2], const bNodeSo
return false;
}
-/* type is SOCK_IN and/or SOCK_OUT */
bool node_find_indicated_socket(SpaceNode &snode,
bNode **nodep,
bNodeSocket **sockp,
diff --git a/source/blender/editors/space_node/node_intern.hh b/source/blender/editors/space_node/node_intern.hh
index 5a2603bbe9d..01de8a11a84 100644
--- a/source/blender/editors/space_node/node_intern.hh
+++ b/source/blender/editors/space_node/node_intern.hh
@@ -89,7 +89,9 @@ enum NodeResizeDirection {
};
ENUM_OPERATORS(NodeResizeDirection, NODE_RESIZE_LEFT);
-/* Transform between View2Ds in the tree path. */
+/**
+ * Transform between View2Ds in the tree path.
+ */
blender::float2 space_node_group_offset(const SpaceNode &snode);
float node_socket_calculate_height(const bNodeSocket &socket);
@@ -100,6 +102,10 @@ blender::float2 node_link_calculate_multi_input_position(const blender::float2 &
int node_get_colorid(bNode &node);
int node_get_resize_cursor(NodeResizeDirection directions);
NodeResizeDirection node_get_resize_direction(const bNode *node, const int x, const int y);
+/**
+ * Usual convention here would be #node_socket_get_color(),
+ * but that's already used (for setting a color property socket).
+ */
void node_socket_color_get(const bContext &C,
const bNodeTree &ntree,
PointerRNA &node_ptr,
@@ -152,10 +158,16 @@ void NODE_OT_backimage_sample(wmOperatorType *ot);
void nodelink_batch_start(SpaceNode &snode);
void nodelink_batch_end(SpaceNode &snode);
+/**
+ * \note this is used for fake links in groups too.
+ */
void node_draw_link(const bContext &C,
const View2D &v2d,
const SpaceNode &snode,
const bNodeLink &link);
+/**
+ * Don't do shadows if th_col3 is -1.
+ */
void node_draw_link_bezier(const bContext &C,
const View2D &v2d,
const SpaceNode &snode,
@@ -163,11 +175,15 @@ void node_draw_link_bezier(const bContext &C,
int th_col1,
int th_col2,
int th_col3);
+/** If v2d not nullptr, it clips and returns 0 if not visible. */
bool node_link_bezier_points(const View2D *v2d,
const SpaceNode *snode,
const bNodeLink &link,
float coord_array[][2],
const int resol);
+/**
+ * Return quadratic beziers points for a given nodelink and clip if v2d is not nullptr.
+ */
bool node_link_bezier_handles(const View2D *v2d,
const SpaceNode *snode,
const bNodeLink &ink,
@@ -177,6 +193,11 @@ void draw_nodespace_back_pix(const bContext &C,
SpaceNode &snode,
bNodeInstanceKey parent_key);
+/**
+ * XXX Does some additional initialization on top of #nodeAddNode
+ * Can be used with both custom and static nodes,
+ * if `idname == nullptr` the static int type will be used instead.
+ */
bNode *node_add_node(const bContext &C, const char *idname, int type, float locx, float locy);
void NODE_OT_add_reroute(wmOperatorType *ot);
void NODE_OT_add_group(wmOperatorType *ot);
@@ -220,12 +241,15 @@ void snode_dag_update(bContext &C, SpaceNode &snode);
void snode_set_context(const bContext &C);
void snode_update(SpaceNode &snode, bNode *node);
+/** Operator poll callback. */
bool composite_node_active(bContext *C);
+/** Operator poll callback. */
bool composite_node_editable(bContext *C);
bool node_has_hidden_sockets(bNode *node);
void node_set_hidden_sockets(SpaceNode *snode, bNode *node, int set);
int node_render_changed_exec(bContext *, wmOperator *);
+/** Type is #SOCK_IN and/or #SOCK_OUT. */
bool node_find_indicated_socket(SpaceNode &snode,
bNode **nodep,
bNodeSocket **sockp,
@@ -255,7 +279,9 @@ void NODE_OT_output_file_move_active_socket(wmOperatorType *ot);
void NODE_OT_switch_view_update(wmOperatorType *ot);
-/* NOTE: clipboard_cut is a simple macro of copy + delete. */
+/**
+ * \note clipboard_cut is a simple macro of copy + delete.
+ */
void NODE_OT_clipboard_copy(wmOperatorType *ot);
void NODE_OT_clipboard_paste(wmOperatorType *ot);
diff --git a/source/blender/editors/space_node/node_relationships.cc b/source/blender/editors/space_node/node_relationships.cc
index 7e845940afd..ce07496068d 100644
--- a/source/blender/editors/space_node/node_relationships.cc
+++ b/source/blender/editors/space_node/node_relationships.cc
@@ -2015,7 +2015,6 @@ static bool ed_node_link_conditions(ScrArea *area,
return true;
}
-/* test == 0, clear all intersect flags */
void ED_node_link_intersect_test(ScrArea *area, int test)
{
bNode *select;
@@ -2497,7 +2496,6 @@ void NODE_OT_insert_offset(wmOperatorType *ot)
/** \name Note Link Insert
* \{ */
-/* assumes link with NODE_LINKFLAG_HILITE set */
void ED_node_link_insert(Main *bmain, ScrArea *area)
{
bNode *select;
diff --git a/source/blender/editors/space_node/node_view.cc b/source/blender/editors/space_node/node_view.cc
index c7f341bb028..df629a983e3 100644
--- a/source/blender/editors/space_node/node_view.cc
+++ b/source/blender/editors/space_node/node_view.cc
@@ -444,7 +444,6 @@ static void sample_draw(const bContext *C, ARegion *region, void *arg_info)
}
}
-/* Returns mouse position in image space. */
bool ED_space_node_get_position(
Main *bmain, SpaceNode *snode, struct ARegion *region, const int mval[2], float fpos[2])
{
@@ -472,9 +471,6 @@ bool ED_space_node_get_position(
return true;
}
-/* Returns color in linear space, matching ED_space_image_color_sample().
- * And here we've got recursion in the comments tips...
- */
bool ED_space_node_color_sample(
Main *bmain, SpaceNode *snode, ARegion *region, const int mval[2], float r_col[3])
{
diff --git a/source/blender/editors/space_node/space_node.cc b/source/blender/editors/space_node/space_node.cc
index 714142ef471..f3b95ca2024 100644
--- a/source/blender/editors/space_node/space_node.cc
+++ b/source/blender/editors/space_node/space_node.cc
@@ -995,7 +995,6 @@ static void node_space_subtype_item_extend(bContext *C, EnumPropertyItem **item,
}
}
-/* only called once, from space/spacetypes.c */
void ED_spacetype_node()
{
SpaceType *st = (SpaceType *)MEM_callocN(sizeof(SpaceType), "spacetype node");