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:
authorCampbell Barton <ideasman42@gmail.com>2019-01-15 15:24:20 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-01-15 15:30:31 +0300
commitb8e8c0e325d213f2dcf4adad5506989fa224716e (patch)
treeadb3d7fa8735426ea856a929f562655b2eaf64cb /source/blender/editors/space_node
parent4226ee0b71fec6f08897dacf3d6632526618acca (diff)
Cleanup: comment line length (editors)
Prevents clang-format wrapping text before comments.
Diffstat (limited to 'source/blender/editors/space_node')
-rw-r--r--source/blender/editors/space_node/drawnode.c20
-rw-r--r--source/blender/editors/space_node/node_draw.c18
-rw-r--r--source/blender/editors/space_node/node_edit.c3
-rw-r--r--source/blender/editors/space_node/node_group.c14
-rw-r--r--source/blender/editors/space_node/node_intern.h3
-rw-r--r--source/blender/editors/space_node/node_relationships.c15
-rw-r--r--source/blender/editors/space_node/node_templates.c3
-rw-r--r--source/blender/editors/space_node/space_node.c3
8 files changed, 53 insertions, 26 deletions
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c
index 38714c6bd4b..b7b75d34470 100644
--- a/source/blender/editors/space_node/drawnode.c
+++ b/source/blender/editors/space_node/drawnode.c
@@ -162,7 +162,8 @@ static void node_buts_curvevec(uiLayout *layout, bContext *UNUSED(C), PointerRNA
}
#define SAMPLE_FLT_ISNONE FLT_MAX
-static float _sample_col[4] = {SAMPLE_FLT_ISNONE}; /* bad bad, 2.5 will do better?... no it won't... */
+/* bad bad, 2.5 will do better?... no it won't... */
+static float _sample_col[4] = {SAMPLE_FLT_ISNONE};
void ED_node_sample_set(const float col[4])
{
if (col) {
@@ -362,7 +363,8 @@ static void node_draw_frame_label(bNodeTree *ntree, bNode *node, const float asp
BLF_enable(fontid, BLF_ASPECT);
BLF_aspect(fontid, aspect, aspect, 1.0f);
- BLF_size(fontid, MIN2(24, font_size), U.dpi); /* clamp otherwise it can suck up a LOT of memory */
+ /* clamp otherwise it can suck up a LOT of memory */
+ BLF_size(fontid, MIN2(24, font_size), U.dpi);
/* title color */
UI_GetThemeColorBlendShade3ubv(TH_TEXT, color_id, 0.4f, 10, color);
@@ -652,7 +654,8 @@ static void node_buts_image_user(uiLayout *layout, bContext *C, PointerRNA *ptr,
source = RNA_enum_get(imaptr, "source");
if (source == IMA_SRC_SEQUENCE) {
- /* don't use iuser->framenr directly because it may not be updated if auto-refresh is off */
+ /* don't use iuser->framenr directly
+ * because it may not be updated if auto-refresh is off */
Scene *scene = CTX_data_scene(C);
ImageUser *iuser = iuserptr->data;
/* Image *ima = imaptr->data; */ /* UNUSED */
@@ -1805,7 +1808,8 @@ static void node_composit_buts_file_output_ex(uiLayout *layout, bContext *C, Poi
RNA_property_collection_lookup_int(ptr, RNA_struct_find_property(ptr, "file_slots"),
active_index, &active_input_ptr);
}
- /* XXX collection lookup does not return the ID part of the pointer, setting this manually here */
+ /* XXX collection lookup does not return the ID part of the pointer,
+ * setting this manually here */
active_input_ptr.id.data = ptr->id.data;
col = uiLayoutColumn(row, true);
@@ -2903,7 +2907,7 @@ static void node_texture_set_butfunc(bNodeType *ntype)
}
}
-/* ******* init draw callbacks for all tree types, only called in usiblender.c, once ************* */
+/* ****** init draw callbacks for all tree types, only called in usiblender.c, once ************ */
static void node_property_update_default(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr)
{
@@ -3054,7 +3058,8 @@ static void std_node_socket_interface_draw_color(bContext *UNUSED(C), PointerRNA
copy_v4_v4(r_color, std_node_socket_colors[type]);
}
-/* draw function for file output node sockets, displays only sub-path and format, no value button */
+/* draw function for file output node sockets,
+ * displays only sub-path and format, no value button */
static void node_file_output_socket_draw(bContext *C, uiLayout *layout, PointerRNA *ptr, PointerRNA *node_ptr)
{
bNodeTree *ntree = ptr->id.data;
@@ -3532,7 +3537,8 @@ static void nodelink_batch_init(void)
g_batch_link.p3_id = GPU_vertformat_attr_add(&format_inst, "P3", GPU_COMP_F32, 2, GPU_FETCH_FLOAT);
g_batch_link.colid_id = GPU_vertformat_attr_add(&format_inst, "colid_doarrow", GPU_COMP_U8, 4, GPU_FETCH_INT);
g_batch_link.inst_vbo = GPU_vertbuf_create_with_format_ex(&format_inst, GPU_USAGE_STREAM);
- GPU_vertbuf_data_alloc(g_batch_link.inst_vbo, NODELINK_GROUP_SIZE); /* Alloc max count but only draw the range we need. */
+ /* Alloc max count but only draw the range we need. */
+ GPU_vertbuf_data_alloc(g_batch_link.inst_vbo, NODELINK_GROUP_SIZE);
GPU_batch_instbuf_set(g_batch_link.batch, g_batch_link.inst_vbo, true);
diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c
index 8ec6d9332d3..4b85b146e7e 100644
--- a/source/blender/editors/space_node/node_draw.c
+++ b/source/blender/editors/space_node/node_draw.c
@@ -195,7 +195,8 @@ static bool compare_nodes(const bNode *a, const bNode *b)
bool a_active = (a->flag & NODE_ACTIVE) != 0, b_active = (b->flag & NODE_ACTIVE) != 0;
/* if one is an ancestor of the other */
- /* XXX there might be a better sorting algorithm for stable topological sort, this is O(n^2) worst case */
+ /* XXX there might be a better sorting algorithm for stable topological sort,
+ * this is O(n^2) worst case */
for (parent = a->parent; parent; parent = parent->parent) {
/* if b is an ancestor, it is always behind a */
if (parent == b)
@@ -713,7 +714,8 @@ static void node_draw_preview(bNodePreview *preview, rctf *prv)
node_draw_preview_background(BLI_rctf_size_x(prv) / 10.0f, &draw_rect);
GPU_blend(true);
- GPU_blend_set_func_separate(GPU_SRC_ALPHA, GPU_ONE_MINUS_SRC_ALPHA, GPU_ONE, GPU_ONE_MINUS_SRC_ALPHA); /* premul graphics */
+ /* premul graphics */
+ GPU_blend_set_func_separate(GPU_SRC_ALPHA, GPU_ONE_MINUS_SRC_ALPHA, GPU_ONE, GPU_ONE_MINUS_SRC_ALPHA);
IMMDrawPixelsTexState state = immDrawPixelsTexSetup(GPU_SHADER_2D_IMAGE_COLOR);
immDrawPixelsTex(&state, draw_rect.xmin, draw_rect.ymin, preview->xsize, preview->ysize, GL_RGBA, GL_UNSIGNED_BYTE, GL_LINEAR, preview->rect,
@@ -967,8 +969,9 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN
nodeLabel(ntree, node, showname, sizeof(showname));
+ /* XXX - don't print into self! */
//if (node->flag & NODE_MUTED)
- // BLI_snprintf(showname, sizeof(showname), "[%s]", showname); /* XXX - don't print into self! */
+ // BLI_snprintf(showname, sizeof(showname), "[%s]", showname);
uiDefBut(node->block, UI_BTYPE_LABEL, 0, showname,
(int)(rct->xmin + (NODE_MARGIN_X)), (int)(rct->ymax - NODE_DY),
@@ -976,8 +979,10 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN
NULL, 0, 0, 0, 0, "");
/* body */
- if (!nodeIsRegistered(node))
- UI_GetThemeColor4fv(TH_REDALERT, color); /* use warning color to indicate undefined types */
+ if (!nodeIsRegistered(node)) {
+ /* use warning color to indicate undefined types */
+ UI_GetThemeColor4fv(TH_REDALERT, color);
+ }
else if (node->flag & NODE_CUSTOM_COLOR) {
rgba_float_args_set(color, node->color[0], node->color[1], node->color[2], 1.0f);
}
@@ -1092,8 +1097,9 @@ static void node_draw_hidden(const bContext *C, ARegion *ar, SpaceNode *snode, b
if (node->miniwidth > 0.0f) {
nodeLabel(ntree, node, showname, sizeof(showname));
+ /* XXX - don't print into self! */
//if (node->flag & NODE_MUTED)
- // BLI_snprintf(showname, sizeof(showname), "[%s]", showname); /* XXX - don't print into self! */
+ // BLI_snprintf(showname, sizeof(showname), "[%s]", showname);
uiDefBut(node->block, UI_BTYPE_LABEL, 0, showname,
round_fl_to_int(rct->xmin + NODE_MARGIN_X), round_fl_to_int(centy - NODE_DY * 0.5f),
diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c
index 9a6a75d4f61..875cb22fb16 100644
--- a/source/blender/editors/space_node/node_edit.c
+++ b/source/blender/editors/space_node/node_edit.c
@@ -1947,7 +1947,8 @@ static int node_clipboard_copy_exec(bContext *C, wmOperator *UNUSED(op))
/* ensure valid pointers */
if (new_node->parent) {
- /* parent pointer must be redirected to new node or detached if parent is not copied */
+ /* parent pointer must be redirected to new node or detached if parent is
+ * not copied */
if (new_node->parent->flag & NODE_SELECT) {
new_node->parent = new_node->parent->new_node;
}
diff --git a/source/blender/editors/space_node/node_group.c b/source/blender/editors/space_node/node_group.c
index e024a76c707..91bb95c9cb4 100644
--- a/source/blender/editors/space_node/node_group.c
+++ b/source/blender/editors/space_node/node_group.c
@@ -258,7 +258,8 @@ static int node_group_ungroup(Main *bmain, bNodeTree *ntree, bNode *gnode)
LinkData *ld, *ldn = NULL;
bAction *waction;
- /* firstly, wgroup needs to temporary dummy action that can be destroyed, as it shares copies */
+ /* firstly, wgroup needs to temporary dummy action
+ * that can be destroyed, as it shares copies */
waction = wgroup->adt->action = BKE_action_copy(bmain, wgroup->adt->action);
/* now perform the moving */
@@ -307,7 +308,9 @@ static int node_group_ungroup(Main *bmain, bNodeTree *ntree, bNode *gnode)
/* XXX TODO bNodeSocket *sock = node_group_find_input_socket(gnode, identifier);
BLI_assert(sock);*/
- /* XXX TODO nodeSocketCopy(ntree, link->tosock->new_sock, link->tonode->new_node, ntree, sock, gnode);*/
+ /* XXX TODO
+ * nodeSocketCopy(ntree, link->tosock->new_sock, link->tonode->new_node,
+ * ntree, sock, gnode);*/
}
}
}
@@ -335,7 +338,8 @@ static int node_group_ungroup(Main *bmain, bNodeTree *ntree, bNode *gnode)
/* XXX TODO bNodeSocket *sock = node_group_find_output_socket(gnode, identifier);
BLI_assert(sock);*/
- /* XXX TODO nodeSocketCopy(ntree, link->tosock, link->tonode, ntree, sock, gnode); */
+ /* XXX TODO
+ * nodeSocketCopy(ntree, link->tosock, link->tonode, ntree, sock, gnode); */
}
}
}
@@ -963,7 +967,9 @@ static int node_group_make_exec(bContext *C, wmOperator *op)
snode_notify(C, snode);
snode_dag_update(C, snode);
- DEG_relations_tag_update(bmain); /* We broke relations in node tree, need to rebuild them in the grahes. */
+
+ /* We broke relations in node tree, need to rebuild them in the grahes. */
+ DEG_relations_tag_update(bmain);
return OPERATOR_FINISHED;
}
diff --git a/source/blender/editors/space_node/node_intern.h b/source/blender/editors/space_node/node_intern.h
index 9cff6b7880e..a74daae12b3 100644
--- a/source/blender/editors/space_node/node_intern.h
+++ b/source/blender/editors/space_node/node_intern.h
@@ -64,7 +64,8 @@ typedef struct bNodeLinkDrag {
ARegion *node_has_buttons_region(ScrArea *sa);
ARegion *node_has_tools_region(ScrArea *sa);
-void snode_group_offset(struct SpaceNode *snode, float *x, float *y); /* transform between View2Ds in the tree path */
+/* transform between View2Ds in the tree path */
+void snode_group_offset(struct SpaceNode *snode, float *x, float *y);
/* node_draw.c */
int node_get_colorid(struct bNode *node);
diff --git a/source/blender/editors/space_node/node_relationships.c b/source/blender/editors/space_node/node_relationships.c
index 8f3d3d8a4b3..368bc0fd4b3 100644
--- a/source/blender/editors/space_node/node_relationships.c
+++ b/source/blender/editors/space_node/node_relationships.c
@@ -1179,7 +1179,8 @@ static int node_join_exec(bContext *C, wmOperator *UNUSED(op))
bNodeTree *ntree = snode->edittree;
bNode *node, *frame;
- /* XXX save selection: node_add_node call below sets the new frame as single active+selected node */
+ /* XXX save selection: node_add_node call below sets the new frame as single
+ * active+selected node */
for (node = ntree->nodes.first; node; node = node->next) {
if (node->flag & NODE_SELECT)
node->flag |= NODE_TEST;
@@ -1455,11 +1456,13 @@ void ED_node_link_intersect_test(ScrArea *sa, int test)
float dist = FLT_MAX;
int i;
- /* loop over link coords to find shortest dist to upper left node edge of a intersected line segment */
+ /* loop over link coords to find shortest dist to
+ * upper left node edge of a intersected line segment */
for (i = 0; i < NODE_LINK_RESOL; i++) {
/* check if the node rect intersetcts the line from this point to next one */
if (BLI_rctf_isect_segment(&select->totr, coord_array[i], coord_array[i + 1])) {
- /* store the shortest distance to the upper left edge of all intersetctions found so far */
+ /* store the shortest distance to the upper left edge
+ * of all intersetctions found so far */
const float node_xy[] = {select->totr.xmin, select->totr.ymax};
/* to be precise coord_array should be clipped by select->totr,
@@ -1645,10 +1648,12 @@ static void node_link_insert_offset_ntree(
/* NODE_TEST will be used later, so disable for all nodes */
ntreeNodeFlagSet(ntree, NODE_TEST, false);
- /* insert->totr isn't updated yet, so totr_insert is used to get the correct worldspace coords */
+ /* insert->totr isn't updated yet,
+ * so totr_insert is used to get the correct worldspace coords */
node_to_updated_rect(insert, &totr_insert);
- /* frame attachment wasn't handled yet so we search the frame that the node will be attached to later */
+ /* frame attachment wasn't handled yet
+ * so we search the frame that the node will be attached to later */
insert->parent = node_find_frame_to_attach(ar, ntree, mouse_xy);
/* this makes sure nodes are also correctly offset when inserting a node on top of a frame
diff --git a/source/blender/editors/space_node/node_templates.c b/source/blender/editors/space_node/node_templates.c
index e7a9db20103..76cd7700216 100644
--- a/source/blender/editors/space_node/node_templates.c
+++ b/source/blender/editors/space_node/node_templates.c
@@ -499,7 +499,8 @@ static void ui_node_menu_column(NodeLinkArg *arg, int nclass, const char *cname)
if (num > 1) {
if (!cur_node_name || !STREQ(cur_node_name, items[i].node_name)) {
cur_node_name = items[i].node_name;
- /* XXX Do not use uiItemL here, it would add an empty icon as we are in a menu! */
+ /* XXX Do not use uiItemL here,
+ * it would add an empty icon as we are in a menu! */
uiDefBut(block, UI_BTYPE_LABEL, 0, IFACE_(cur_node_name), 0, 0, UI_UNIT_X * 4, UI_UNIT_Y,
NULL, 0.0, 0.0, 0.0, 0.0, "");
}
diff --git a/source/blender/editors/space_node/space_node.c b/source/blender/editors/space_node/space_node.c
index cbd67bfb722..00cd6ca2a6e 100644
--- a/source/blender/editors/space_node/space_node.c
+++ b/source/blender/editors/space_node/space_node.c
@@ -670,7 +670,8 @@ static void node_main_region_draw(const bContext *C, ARegion *ar)
static bool node_ima_drop_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent *UNUSED(event), const char **UNUSED(tooltip))
{
if (drag->type == WM_DRAG_PATH) {
- return (ELEM(drag->icon, 0, ICON_FILE_IMAGE, ICON_FILE_MOVIE)); /* rule might not work? */
+ /* rule might not work? */
+ return (ELEM(drag->icon, 0, ICON_FILE_IMAGE, ICON_FILE_MOVIE));
}
else {
return WM_drag_ID(drag, ID_IM) != NULL;