style cleanup: also correct doc example for 'foreach_get/set'
authorCampbell Barton <ideasman42@gmail.com>
Sat, 2 Feb 2013 00:34:34 +0000 (00:34 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 2 Feb 2013 00:34:34 +0000 (00:34 +0000)
source/blender/editors/physics/particle_edit.c
source/blender/python/intern/bpy_rna.c
source/blender/render/intern/source/convertblender.c
source/blender/render/intern/source/renderdatabase.c

index deddc64..bbd10a1 100644 (file)
@@ -3397,7 +3397,7 @@ static int brush_add(PEData *data, short number)
                                        weight[w] = 0.0f;
                                }
 
-                               if(totw > 0.0f) {
+                               if (totw > 0.0f) {
                                        for (w=0; w<maxw; w++)
                                                weight[w] /= totw;
                                }
index 7359979..78d6be6 100644 (file)
@@ -4527,7 +4527,7 @@ PyDoc_STRVAR(pyrna_prop_collection_foreach_get_doc,
 "\n"
 "   .. code-block:: python\n"
 "\n"
-"      collection.foreach_get(someseq, attr)\n"
+"      collection.foreach_get(attr, someseq)\n"
 "\n"
 "      # Python equivalent\n"
 "      for i in range(len(seq)): someseq[i] = getattr(collection, attr)\n"
@@ -4547,7 +4547,7 @@ PyDoc_STRVAR(pyrna_prop_collection_foreach_set_doc,
 "\n"
 "   .. code-block:: python\n"
 "\n"
-"      collection.foreach_set(seq, attr)\n"
+"      collection.foreach_set(attr, seq)\n"
 "\n"
 "      # Python equivalent\n"
 "      for i in range(len(seq)): setattr(collection[i], attr, seq[i])\n"
index 0dc6492..b161bb7 100644 (file)
@@ -3283,7 +3283,7 @@ static void init_render_mesh(Render *re, ObjectRen *obr, int timeoffset)
        }
        
        /* origindex currently only used when baking to vertex colors */
-       if(re->flag & R_BAKING && re->r.bake_flag & R_BAKE_VCOL)
+       if (re->flag & R_BAKING && re->r.bake_flag & R_BAKE_VCOL)
                need_origindex= 1;
 
        /* check autosmooth and displacement, we then have to skip only-verts optimize */
index b25f2f4..0a8af1c 100644 (file)
@@ -361,8 +361,8 @@ int *RE_vlakren_get_origindex(ObjectRen *obr, VlakRen *vlak, int verify)
        int nr= vlak->index>>8;
 
        origindex= obr->vlaknodes[nr].origindex;
-       if(origindex==NULL) {
-               if(verify)
+       if (origindex==NULL) {
+               if (verify)
                        origindex= obr->vlaknodes[nr].origindex= MEM_callocN(256*RE_VLAK_ORIGINDEX_ELEMS*sizeof(int), "origindex table");
                else
                        return NULL;
@@ -440,7 +440,7 @@ VlakRen *RE_vlakren_copy(ObjectRen *obr, VlakRen *vlr)
        }
 
        origindex= RE_vlakren_get_origindex(obr, vlr, 0);
-       if(origindex) {
+       if (origindex) {
                origindex1= RE_vlakren_get_origindex(obr, vlr1, 1);
                /* Just an int, but memcpy for consistency. */
                memcpy(origindex1, origindex, sizeof(int)*RE_VLAK_ORIGINDEX_ELEMS);
@@ -791,7 +791,7 @@ void free_renderdata_vlaknodes(VlakTableNode *vlaknodes)
                        MEM_freeN(vlaknodes[a].mtface);
                if (vlaknodes[a].mcol)
                        MEM_freeN(vlaknodes[a].mcol);
-               if(vlaknodes[a].origindex)
+               if (vlaknodes[a].origindex)
                        MEM_freeN(vlaknodes[a].origindex);
                if (vlaknodes[a].surfnor)
                        MEM_freeN(vlaknodes[a].surfnor);