diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-05-31 16:21:16 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-05-31 16:22:52 +0300 |
commit | aba4e6810f8b4d0e459137b64e061a2cadc457d1 (patch) | |
tree | 2b6159c7ba0f23c020600b71276772fa4a882b5b /source/blender/editors/space_node/node_edit.c | |
parent | 72a563cdee8fef198a200ff65b57ddb847c01795 (diff) |
Cleanup: style, use braces in source/ (include disabled blocks)
Diffstat (limited to 'source/blender/editors/space_node/node_edit.c')
-rw-r--r-- | source/blender/editors/space_node/node_edit.c | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c index fb34d9dc459..235bc6aeb96 100644 --- a/source/blender/editors/space_node/node_edit.c +++ b/source/blender/editors/space_node/node_edit.c @@ -745,10 +745,11 @@ void ED_node_set_active(Main *bmain, bNodeTree *ntree, bNode *node) else if (ntree->type == NTREE_TEXTURE) { // XXX #if 0 - if (node->id) - ; // XXX BIF_preview_changed(-1); - // allqueue(REDRAWBUTSSHADING, 1); - // allqueue(REDRAWIPO, 0); + if (node->id) { + // XXX BIF_preview_changed(-1); + // allqueue(REDRAWBUTSSHADING, 1); + // allqueue(REDRAWIPO, 0); + } #endif } } @@ -784,17 +785,21 @@ static int edit_node_invoke_properties(bContext *C, wmOperator *op) { if (!RNA_struct_property_is_set(op->ptr, "node")) { bNode *node = CTX_data_pointer_get_type(C, "node", &RNA_Node).data; - if (!node) + if (!node) { return 0; - else + } + else { RNA_string_set(op->ptr, "node", node->name); + } } - if (!RNA_struct_property_is_set(op->ptr, "in_out")) + if (!RNA_struct_property_is_set(op->ptr, "in_out")) { RNA_enum_set(op->ptr, "in_out", SOCK_IN); + } - if (!RNA_struct_property_is_set(op->ptr, "socket")) + if (!RNA_struct_property_is_set(op->ptr, "socket")) { RNA_int_set(op->ptr, "socket", 0); + } return 1; } @@ -823,12 +828,15 @@ static void edit_node_properties_get( break; } - if (rnode) + if (rnode) { *rnode = node; - if (rsock) + } + if (rsock) { *rsock = sock; - if (rin_out) + } + if (rin_out) { *rin_out = in_out; + } } #endif |