diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-11-03 19:35:03 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-11-03 19:35:03 +0400 |
commit | 25591e958d8cf8247ec67a2838470f96a8ae606a (patch) | |
tree | 6b5ec714de724b207e89672dfaf65afe4fe15180 /source/blender/editors/space_node | |
parent | 060ea498b0565764d154ce968cde173e5676a521 (diff) |
style cleanup: tabs & whitespace
Diffstat (limited to 'source/blender/editors/space_node')
-rw-r--r-- | source/blender/editors/space_node/drawnode.c | 4 | ||||
-rw-r--r-- | source/blender/editors/space_node/node_edit.c | 13 |
2 files changed, 9 insertions, 8 deletions
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c index f25fed3f6bb..0938562857b 100644 --- a/source/blender/editors/space_node/drawnode.c +++ b/source/blender/editors/space_node/drawnode.c @@ -1393,10 +1393,10 @@ static void node_shader_buts_script(uiLayout *layout, bContext *UNUSED(C), Point row = uiLayoutRow(layout, TRUE); - if(RNA_enum_get(ptr, "mode") == NODE_SCRIPT_INTERNAL) + if (RNA_enum_get(ptr, "mode") == NODE_SCRIPT_INTERNAL) uiItemR(row, ptr, "script", 0, "", ICON_NONE); else - uiItemR(row, ptr, "filepath", 0,"", ICON_NONE); + uiItemR(row, ptr, "filepath", 0, "", ICON_NONE); uiItemO(row, "", ICON_FILE_REFRESH, "node.shader_script_update"); } diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c index 95dbe7e7b46..6bf0e9f73e3 100644 --- a/source/blender/editors/space_node/node_edit.c +++ b/source/blender/editors/space_node/node_edit.c @@ -2158,21 +2158,22 @@ static int node_shader_script_update_poll(bContext *C) Text *text; /* test if we have a render engine that supports shaders scripts */ - if(!(type && type->update_script_node)) + if (!(type && type->update_script_node)) return 0; /* see if we have a shader script node in context */ node = CTX_data_pointer_get_type(C, "node", &RNA_ShaderNodeScript).data; - if(node && node->type == SH_NODE_SCRIPT) { + if (node && node->type == SH_NODE_SCRIPT) { NodeShaderScript *nss = node->storage; - if(node->id || nss->filepath[0]) + if (node->id || nss->filepath[0]) { return 1; + } } /* see if we have a text datablock in context */ text = CTX_data_pointer_get_type(C, "edit_text", &RNA_Text).data; - if(text) + if (text) return 1; /* we don't check if text datablock is actually in use, too slow for poll */ @@ -2186,8 +2187,8 @@ static void node_shader_script_update_text(void *data_, ID *UNUSED(id), bNodeTre bNode *node; /* update each script that is using this text datablock */ - for (node=ntree->nodes.first; node; node=node->next) { - if (node->type == NODE_GROUP){ + for (node = ntree->nodes.first; node; node = node->next) { + if (node->type == NODE_GROUP) { node_shader_script_update_text(data_, NULL, (bNodeTree *)node->id); } else if (node->type == SH_NODE_SCRIPT && node->id == &data->text->id) { |