style cleanup: also correct doc example for 'foreach_get/set'

This commit is contained in:
Campbell Barton 2013-02-02 00:34:34 +00:00
parent 736d7810a0
commit 6fca85780b
4 changed files with 8 additions and 8 deletions

@ -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;
}

@ -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"

@ -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 */

@ -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);