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>2013-03-18 22:25:05 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-03-18 22:25:05 +0400
commit01e9dae3dc6c7de00e441a8b505debc6df830520 (patch)
tree917d578202f35f095c98506567a62c8240c803e6 /source/blender/blenloader/intern
parent57f69f2f180a988f274d979b1e5f2ad17e9cb77a (diff)
code cleanup
Diffstat (limited to 'source/blender/blenloader/intern')
-rw-r--r--source/blender/blenloader/intern/readfile.c62
-rw-r--r--source/blender/blenloader/intern/versioning_250.c36
-rw-r--r--source/blender/blenloader/intern/versioning_legacy.c6
-rw-r--r--source/blender/blenloader/intern/writefile.c6
4 files changed, 55 insertions, 55 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index ea5610af3b5..fdd34eb2475 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -1401,7 +1401,7 @@ void blo_make_movieclip_pointer_map(FileData *fd, Main *oldmain)
for (; sce; sce = sce->id.next) {
if (sce->nodetree) {
bNode *node;
- for (node = sce->nodetree->nodes.first; node; node= node->next)
+ for (node = sce->nodetree->nodes.first; node; node = node->next)
if (node->type == CMP_NODE_MOVIEDISTORTION)
oldnewmap_insert(fd->movieclipmap, node->storage, node->storage, 0);
}
@@ -2332,15 +2332,15 @@ static void lib_link_ntree(FileData *fd, ID *id, bNodeTree *ntree)
node->id= newlibadr_us(fd, id->lib, node->id);
- for (sock=node->inputs.first; sock; sock=sock->next)
+ for (sock = node->inputs.first; sock; sock = sock->next)
lib_link_node_socket(fd, id, sock);
- for (sock=node->outputs.first; sock; sock=sock->next)
+ for (sock = node->outputs.first; sock; sock = sock->next)
lib_link_node_socket(fd, id, sock);
}
- for (sock=ntree->inputs.first; sock; sock=sock->next)
+ for (sock = ntree->inputs.first; sock; sock = sock->next)
lib_link_node_socket(fd, id, sock);
- for (sock=ntree->outputs.first; sock; sock=sock->next)
+ for (sock = ntree->outputs.first; sock; sock = sock->next)
lib_link_node_socket(fd, id, sock);
}
@@ -2367,7 +2367,7 @@ static void lib_node_do_versions_group_indices(bNode *gnode)
bNodeSocket *sock;
bNodeLink *link;
- for (sock=gnode->outputs.first; sock; sock=sock->next) {
+ for (sock=gnode->outputs.first; sock; sock = sock->next) {
int old_index = sock->to_index;
for (link = ngroup->links.first; link; link = link->next) {
@@ -2380,7 +2380,7 @@ static void lib_node_do_versions_group_indices(bNode *gnode)
}
}
}
- for (sock=gnode->inputs.first; sock; sock=sock->next) {
+ for (sock=gnode->inputs.first; sock; sock = sock->next) {
int old_index = sock->to_index;
for (link = ngroup->links.first; link; link = link->next) {
@@ -4245,9 +4245,9 @@ static void lib_link_object(FileData *fd, Main *main)
ob->proxy = NULL;
if (ob->id.lib)
- printf("Proxy lost from object %s lib %s\n", ob->id.name+2, ob->id.lib->name);
+ printf("Proxy lost from object %s lib %s\n", ob->id.name + 2, ob->id.lib->name);
else
- printf("Proxy lost from object %s lib <NONE>\n", ob->id.name+2);
+ printf("Proxy lost from object %s lib <NONE>\n", ob->id.name + 2);
}
else {
/* this triggers object_update to always use a copy */
@@ -4261,9 +4261,9 @@ static void lib_link_object(FileData *fd, Main *main)
if (ob->data==NULL && poin!=NULL) {
if (ob->id.lib)
- printf("Can't find obdata of %s lib %s\n", ob->id.name+2, ob->id.lib->name);
+ printf("Can't find obdata of %s lib %s\n", ob->id.name + 2, ob->id.lib->name);
else
- printf("Object %s lost data.\n", ob->id.name+2);
+ printf("Object %s lost data.\n", ob->id.name + 2);
ob->type = OB_EMPTY;
warn = 1;
@@ -4984,7 +4984,7 @@ static void composite_patch(bNodeTree *ntree, Scene *scene)
{
bNode *node;
- for (node= ntree->nodes.first; node; node= node->next) {
+ for (node = ntree->nodes.first; node; node = node->next) {
if (node->id==NULL && ELEM4(node->type, CMP_NODE_R_LAYERS, CMP_NODE_COMPOSITE, CMP_NODE_DEFOCUS, CMP_NODE_OUTPUT_FILE))
node->id = &scene->id;
}
@@ -5681,7 +5681,7 @@ static void lib_link_screen(FileData *fd, Main *main)
static bool restore_pointer(ID *id, ID *newid, int user)
{
- if (strcmp(newid->name+2, id->name+2) == 0) {
+ if (strcmp(newid->name + 2, id->name + 2) == 0) {
if (newid->lib == id->lib) {
if (user == 1) {
if (newid->us == 0) {
@@ -7238,7 +7238,7 @@ static void do_versions_nodetree_multi_file_output_format_2_62_1(Scene *sce, bNo
nimf->format = sce->r.im_format;
/* transfer render format toggle to node format toggle */
- for (sock=node->inputs.first; sock; sock=sock->next) {
+ for (sock = node->inputs.first; sock; sock = sock->next) {
NodeImageMultiFileSocket *simf = sock->storage;
simf->use_node_format = simf->use_render_format;
}
@@ -7292,7 +7292,7 @@ static void do_versions_nodetree_file_output_layers_2_64_5(bNodeTree *ntree)
for (node=ntree->nodes.first; node; node=node->next) {
if (node->type == CMP_NODE_OUTPUT_FILE) {
bNodeSocket *sock;
- for (sock=node->inputs.first; sock; sock=sock->next) {
+ for (sock = node->inputs.first; sock; sock = sock->next) {
NodeImageMultiFileSocket *input = sock->storage;
/* multilayer names are stored as separate strings now,
@@ -7487,15 +7487,15 @@ static void do_versions_nodetree_customnodes(bNodeTree *ntree, int UNUSED(is_gro
node->flag |= NODE_INIT;
/* sockets idname */
- for (sock=node->inputs.first; sock; sock=sock->next)
+ for (sock = node->inputs.first; sock; sock = sock->next)
BLI_strncpy(sock->idname, node_socket_get_static_idname(sock), sizeof(sock->idname));
- for (sock=node->outputs.first; sock; sock=sock->next)
+ for (sock = node->outputs.first; sock; sock = sock->next)
BLI_strncpy(sock->idname, node_socket_get_static_idname(sock), sizeof(sock->idname));
}
/* tree sockets idname */
- for (sock=ntree->inputs.first; sock; sock=sock->next)
+ for (sock = ntree->inputs.first; sock; sock = sock->next)
BLI_strncpy(sock->idname, node_socket_get_static_idname(sock), sizeof(sock->idname));
- for (sock=ntree->outputs.first; sock; sock=sock->next)
+ for (sock = ntree->outputs.first; sock; sock = sock->next)
BLI_strncpy(sock->idname, node_socket_get_static_idname(sock), sizeof(sock->idname));
}
@@ -7505,14 +7505,14 @@ static void do_versions_nodetree_customnodes(bNodeTree *ntree, int UNUSED(is_gro
bNodeSocket *sock;
for (node=ntree->nodes.first; node; node=node->next) {
- for (sock=node->inputs.first; sock; sock=sock->next)
+ for (sock = node->inputs.first; sock; sock = sock->next)
sock->in_out = SOCK_IN;
- for (sock=node->outputs.first; sock; sock=sock->next)
+ for (sock = node->outputs.first; sock; sock = sock->next)
sock->in_out = SOCK_OUT;
}
- for (sock=ntree->inputs.first; sock; sock=sock->next)
+ for (sock = ntree->inputs.first; sock; sock = sock->next)
sock->in_out = SOCK_IN;
- for (sock=ntree->outputs.first; sock; sock=sock->next)
+ for (sock = ntree->outputs.first; sock; sock = sock->next)
sock->in_out = SOCK_OUT;
}
@@ -7522,20 +7522,20 @@ static void do_versions_nodetree_customnodes(bNodeTree *ntree, int UNUSED(is_gro
bNodeSocket *sock;
for (node=ntree->nodes.first; node; node=node->next) {
- for (sock=node->inputs.first; sock; sock=sock->next) {
+ for (sock = node->inputs.first; sock; sock = sock->next) {
BLI_strncpy(sock->identifier, sock->name, sizeof(sock->identifier));
BLI_uniquename(&node->inputs, sock, sock->identifier, '.', offsetof(bNodeSocket, identifier), sizeof(sock->identifier));
}
- for (sock=node->outputs.first; sock; sock=sock->next) {
+ for (sock = node->outputs.first; sock; sock = sock->next) {
BLI_strncpy(sock->identifier, sock->name, sizeof(sock->identifier));
BLI_uniquename(&node->outputs, sock, sock->identifier, '.', offsetof(bNodeSocket, identifier), sizeof(sock->identifier));
}
}
- for (sock=ntree->inputs.first; sock; sock=sock->next) {
+ for (sock = ntree->inputs.first; sock; sock = sock->next) {
BLI_strncpy(sock->identifier, sock->name, sizeof(sock->identifier));
BLI_uniquename(&ntree->inputs, sock, sock->identifier, '.', offsetof(bNodeSocket, identifier), sizeof(sock->identifier));
}
- for (sock=ntree->outputs.first; sock; sock=sock->next) {
+ for (sock = ntree->outputs.first; sock; sock = sock->next) {
BLI_strncpy(sock->identifier, sock->name, sizeof(sock->identifier));
BLI_uniquename(&ntree->outputs, sock, sock->identifier, '.', offsetof(bNodeSocket, identifier), sizeof(sock->identifier));
}
@@ -8980,7 +8980,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
for (sa= sc->areabase.first; sa; sa= sa->next) {
SpaceLink *sl;
for (sl= sa->spacedata.first; sl; sl= sl->next) {
- if(sl->spacetype==SPACE_NODE) {
+ if (sl->spacetype==SPACE_NODE) {
SpaceNode *snode = (SpaceNode *)sl;
/* reset pointers to force tree path update from context */
@@ -10331,7 +10331,7 @@ static void give_base_to_groups(Main *mainvar, Scene *scene)
Base *base;
/* BKE_object_add(...) messes with the selection */
- Object *ob = BKE_object_add_only_object(mainvar, OB_EMPTY, group->id.name+2);
+ Object *ob = BKE_object_add_only_object(mainvar, OB_EMPTY, group->id.name + 2);
ob->type = OB_EMPTY;
ob->lay = scene->lay;
@@ -10345,7 +10345,7 @@ static void give_base_to_groups(Main *mainvar, Scene *scene)
/* assign the group */
ob->dup_group = group;
ob->transflag |= OB_DUPLIGROUP;
- rename_id(&ob->id, group->id.name+2);
+ rename_id(&ob->id, group->id.name + 2);
copy_v3_v3(ob->loc, scene->cursor);
}
}
@@ -10733,7 +10733,7 @@ static void read_libraries(FileData *basefd, ListBase *mainlist)
BKE_reportf_wrap(fd->reports, RPT_WARNING,
TIP_("LIB ERROR: %s: '%s' missing from '%s'"),
BKE_idcode_to_name(GS(id->name)),
- id->name+2, mainptr->curlib->filepath);
+ id->name + 2, mainptr->curlib->filepath);
}
change_idid_adr(mainlist, basefd, id, realid);
diff --git a/source/blender/blenloader/intern/versioning_250.c b/source/blender/blenloader/intern/versioning_250.c
index f92a8678300..3827a31ae95 100644
--- a/source/blender/blenloader/intern/versioning_250.c
+++ b/source/blender/blenloader/intern/versioning_250.c
@@ -747,14 +747,14 @@ static void do_versions_nodetree_default_value_259(bNodeTree *ntree)
bNode *node;
bNodeSocket *sock;
for (node=ntree->nodes.first; node; node=node->next) {
- for (sock=node->inputs.first; sock; sock=sock->next)
+ for (sock = node->inputs.first; sock; sock = sock->next)
do_versions_socket_default_value_259(sock);
- for (sock=node->outputs.first; sock; sock=sock->next)
+ for (sock = node->outputs.first; sock; sock = sock->next)
do_versions_socket_default_value_259(sock);
}
- for (sock=ntree->inputs.first; sock; sock=sock->next)
+ for (sock = ntree->inputs.first; sock; sock = sock->next)
do_versions_socket_default_value_259(sock);
- for (sock=ntree->outputs.first; sock; sock=sock->next)
+ for (sock = ntree->outputs.first; sock; sock = sock->next)
do_versions_socket_default_value_259(sock);
}
@@ -2378,17 +2378,17 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *main)
/* first make sure the own_index for new sockets is valid */
for (node=ntree->nodes.first; node; node=node->next) {
- for (sock=node->inputs.first; sock; sock=sock->next)
+ for (sock = node->inputs.first; sock; sock = sock->next)
if (sock->own_index >= ntree->cur_index)
ntree->cur_index = sock->own_index+1;
- for (sock=node->outputs.first; sock; sock=sock->next)
+ for (sock = node->outputs.first; sock; sock = sock->next)
if (sock->own_index >= ntree->cur_index)
ntree->cur_index = sock->own_index+1;
}
/* add ntree->inputs/ntree->outputs sockets for all unlinked sockets in the group tree. */
for (node=ntree->nodes.first; node; node=node->next) {
- for (sock=node->inputs.first; sock; sock=sock->next) {
+ for (sock = node->inputs.first; sock; sock = sock->next) {
if (!sock->link && !nodeSocketIsHidden(sock)) {
gsock = do_versions_node_group_add_socket_2_56_2(ntree, sock->name, sock->type, SOCK_IN);
@@ -2399,18 +2399,18 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *main)
/* XXX nodeAddLink does not work with incomplete (node==NULL) links any longer,
* have to create these directly here. These links are updated again in subsequent do_version!
*/
- link= MEM_callocN(sizeof(bNodeLink), "link");
+ link = MEM_callocN(sizeof(bNodeLink), "link");
BLI_addtail(&ntree->links, link);
- link->fromnode= NULL;
- link->fromsock= gsock;
- link->tonode= node;
- link->tosock= sock;
+ link->fromnode = NULL;
+ link->fromsock = gsock;
+ link->tonode = node;
+ link->tosock = sock;
ntree->update |= NTREE_UPDATE_LINKS;
sock->link = link;
}
}
- for (sock=node->outputs.first; sock; sock=sock->next) {
+ for (sock = node->outputs.first; sock; sock = sock->next) {
if (nodeCountSocketLinks(ntree, sock)==0 && !nodeSocketIsHidden(sock)) {
gsock = do_versions_node_group_add_socket_2_56_2(ntree, sock->name, sock->type, SOCK_OUT);
@@ -2420,12 +2420,12 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *main)
/* XXX nodeAddLink does not work with incomplete (node==NULL) links any longer,
* have to create these directly here. These links are updated again in subsequent do_version!
*/
- link= MEM_callocN(sizeof(bNodeLink), "link");
+ link = MEM_callocN(sizeof(bNodeLink), "link");
BLI_addtail(&ntree->links, link);
- link->fromnode= node;
- link->fromsock= sock;
- link->tonode= NULL;
- link->tosock= gsock;
+ link->fromnode = node;
+ link->fromsock = sock;
+ link->tonode = NULL;
+ link->tosock = gsock;
ntree->update |= NTREE_UPDATE_LINKS;
gsock->link = link;
diff --git a/source/blender/blenloader/intern/versioning_legacy.c b/source/blender/blenloader/intern/versioning_legacy.c
index 31410631ce0..c6856d8b71d 100644
--- a/source/blender/blenloader/intern/versioning_legacy.c
+++ b/source/blender/blenloader/intern/versioning_legacy.c
@@ -2306,7 +2306,7 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *main)
Image *ima;
for (ima = main->image.first; ima; ima = ima->id.next)
if (strcmp(ima->name, "Compositor") == 0) {
- strcpy(ima->id.name+2, "Viewer Node");
+ strcpy(ima->id.name + 2, "Viewer Node");
strcpy(ima->name, "Viewer Node");
}
}
@@ -2495,11 +2495,11 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *main)
ima->gen_x = 256; ima->gen_y = 256;
ima->gen_type = 1;
- if (0 == strncmp(ima->id.name+2, "Viewer Node", sizeof(ima->id.name) - 2)) {
+ if (0 == strncmp(ima->id.name + 2, "Viewer Node", sizeof(ima->id.name) - 2)) {
ima->source = IMA_SRC_VIEWER;
ima->type = IMA_TYPE_COMPOSITE;
}
- if (0 == strncmp(ima->id.name+2, "Render Result", sizeof(ima->id.name) - 2)) {
+ if (0 == strncmp(ima->id.name + 2, "Render Result", sizeof(ima->id.name) - 2)) {
ima->source = IMA_SRC_VIEWER;
ima->type = IMA_TYPE_R_RESULT;
}
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index d78c6687e16..9a4736449a2 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -738,7 +738,7 @@ static void write_nodetree(WriteData *wd, bNodeTree *ntree)
if (ntree->adt) write_animdata(wd, ntree->adt);
- for (node= ntree->nodes.first; node; node= node->next) {
+ for (node = ntree->nodes.first; node; node = node->next) {
writestruct(wd, DATA, "bNode", 1, node);
if (node->prop)
@@ -774,12 +774,12 @@ static void write_nodetree(WriteData *wd, bNodeTree *ntree)
if (node->type==CMP_NODE_OUTPUT_FILE) {
/* inputs have own storage data */
- for (sock=node->inputs.first; sock; sock=sock->next)
+ for (sock = node->inputs.first; sock; sock = sock->next)
writestruct(wd, DATA, "NodeImageMultiFileSocket", 1, sock->storage);
}
if (node->type==CMP_NODE_IMAGE) {
/* write extra socket info */
- for (sock=node->outputs.first; sock; sock=sock->next)
+ for (sock = node->outputs.first; sock; sock = sock->next)
writestruct(wd, DATA, "NodeImageLayer", 1, sock->storage);
}
}