[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [55892] trunk/blender/source: style cleanup
Campbell Barton
ideasman42 at gmail.com
Mon Apr 8 06:39:14 CEST 2013
Revision: 55892
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55892
Author: campbellbarton
Date: 2013-04-08 04:39:09 +0000 (Mon, 08 Apr 2013)
Log Message:
-----------
style cleanup
Modified Paths:
--------------
trunk/blender/source/blender/blenlib/intern/listbase.c
trunk/blender/source/blender/blenloader/intern/readfile.c
trunk/blender/source/blender/blenloader/intern/writefile.c
trunk/blender/source/blender/compositor/operations/COM_ZCombineOperation.cpp
trunk/blender/source/blender/editors/interface/interface_templates.c
trunk/blender/source/blender/editors/sculpt_paint/paint_ops.c
trunk/blender/source/blender/editors/sculpt_paint/sculpt.c
trunk/blender/source/blender/editors/transform/transform_generics.c
trunk/blender/source/blender/freestyle/intern/application/AppCanvas.cpp
trunk/blender/source/blender/freestyle/intern/application/Controller.cpp
trunk/blender/source/blender/render/intern/source/pipeline.c
trunk/blender/source/gameengine/BlenderRoutines/KX_BlenderGL.cpp
Modified: trunk/blender/source/blender/blenlib/intern/listbase.c
===================================================================
--- trunk/blender/source/blender/blenlib/intern/listbase.c 2013-04-08 02:14:58 UTC (rev 55891)
+++ trunk/blender/source/blender/blenlib/intern/listbase.c 2013-04-08 04:39:09 UTC (rev 55892)
@@ -472,9 +472,11 @@
return NULL;
}
+/**
+ * Finds the first element of listbase which contains the specified pointer value
+ * at the specified offset, returning NULL if not found.
+ */
void *BLI_findptr(const ListBase *listbase, const void *ptr, const int offset)
-/* finds the first element of listbase which contains the specified pointer value
-at the specified offset, returning NULL if not found. */
{
Link *link = NULL;
const void *ptr_iter;
@@ -493,9 +495,11 @@
return NULL;
}
/* same as above but find reverse */
+/**
+ * Finds the last element of listbase which contains the specified pointer value
+ * at the specified offset, returning NULL if not found.
+ */
void *BLI_rfindptr(const ListBase *listbase, const void *ptr, const int offset)
-/* finds the last element of listbase which contains the specified pointer value
-at the specified offset, returning NULL if not found. */
{
Link *link = NULL;
const void *ptr_iter;
@@ -514,9 +518,11 @@
return NULL;
}
+/**
+ * Returns the 1-based index of the first element of listbase which contains the specified
+ * null-terminated string at the specified offset, or -1 if not found.
+ */
int BLI_findstringindex(const ListBase *listbase, const char *id, const int offset)
-/* returns the 1-based index of the first element of listbase which contains the specified
-null-terminated string at the specified offset, or -1 if not found. */
{
Link *link = NULL;
const char *id_iter;
Modified: trunk/blender/source/blender/blenloader/intern/readfile.c
===================================================================
--- trunk/blender/source/blender/blenloader/intern/readfile.c 2013-04-08 02:14:58 UTC (rev 55891)
+++ trunk/blender/source/blender/blenloader/intern/readfile.c 2013-04-08 04:39:09 UTC (rev 55892)
@@ -6764,7 +6764,7 @@
break;
}
}
- for (m = linestyle->alpha_modifiers.first; m; m = m->next){
+ for (m = linestyle->alpha_modifiers.first; m; m = m->next) {
switch (m->type) {
case LS_MODIFIER_DISTANCE_FROM_OBJECT:
{
@@ -6774,7 +6774,7 @@
break;
}
}
- for (m = linestyle->thickness_modifiers.first; m; m = m->next){
+ for (m = linestyle->thickness_modifiers.first; m; m = m->next) {
switch (m->type) {
case LS_MODIFIER_DISTANCE_FROM_OBJECT:
{
@@ -10461,11 +10461,11 @@
if (m->type == LS_MODIFIER_DISTANCE_FROM_OBJECT)
expand_doit(fd, mainvar, ((LineStyleColorModifier_DistanceFromObject *)m)->target);
}
- for (m = linestyle->alpha_modifiers.first; m; m = m->next){
+ for (m = linestyle->alpha_modifiers.first; m; m = m->next) {
if (m->type == LS_MODIFIER_DISTANCE_FROM_OBJECT)
expand_doit(fd, mainvar, ((LineStyleAlphaModifier_DistanceFromObject *)m)->target);
}
- for (m = linestyle->thickness_modifiers.first; m; m = m->next){
+ for (m = linestyle->thickness_modifiers.first; m; m = m->next) {
if (m->type == LS_MODIFIER_DISTANCE_FROM_OBJECT)
expand_doit(fd, mainvar, ((LineStyleThicknessModifier_DistanceFromObject *)m)->target);
}
Modified: trunk/blender/source/blender/blenloader/intern/writefile.c
===================================================================
--- trunk/blender/source/blender/blenloader/intern/writefile.c 2013-04-08 02:14:58 UTC (rev 55891)
+++ trunk/blender/source/blender/blenloader/intern/writefile.c 2013-04-08 04:39:09 UTC (rev 55892)
@@ -2326,10 +2326,10 @@
for (srl = sce->r.layers.first; srl; srl = srl->next) {
writestruct(wd, DATA, "SceneRenderLayer", 1, srl);
- for(fmc = srl->freestyleConfig.modules.first; fmc; fmc = fmc->next) {
+ for (fmc = srl->freestyleConfig.modules.first; fmc; fmc = fmc->next) {
writestruct(wd, DATA, "FreestyleModuleConfig", 1, fmc);
}
- for(fls = srl->freestyleConfig.linesets.first; fls; fls = fls->next) {
+ for (fls = srl->freestyleConfig.linesets.first; fls; fls = fls->next) {
writestruct(wd, DATA, "FreestyleLineSet", 1, fls);
}
}
Modified: trunk/blender/source/blender/compositor/operations/COM_ZCombineOperation.cpp
===================================================================
--- trunk/blender/source/blender/compositor/operations/COM_ZCombineOperation.cpp 2013-04-08 02:14:58 UTC (rev 55891)
+++ trunk/blender/source/blender/compositor/operations/COM_ZCombineOperation.cpp 2013-04-08 04:39:09 UTC (rev 55892)
@@ -125,10 +125,10 @@
float fac = mask[0];
// multiply mask with alpha, if mask == 0 color1, else color2 make sure
- float mfac = 1.0f-fac;
- output[0] = color1[0]*mfac + color2[0]*fac;
- output[1] = color1[1]*mfac + color2[1]*fac;
- output[2] = color1[2]*mfac + color2[2]*fac;
+ float mfac = 1.0f - fac;
+ output[0] = color1[0] * mfac + color2[0] * fac;
+ output[1] = color1[1] * mfac + color2[1] * fac;
+ output[2] = color1[2] * mfac + color2[2] * fac;
output[3] = max(color1[3], color2[3]);
}
@@ -144,13 +144,13 @@
float fac = mask[0];
// multiply mask with alpha, if mask == 0 color1, else color2 make sure
- float mfac = 1.0f-fac;
- float alpha = color1[3]*mfac + color2[3]*fac;
+ float mfac = 1.0f - fac;
+ float alpha = color1[3] * mfac + color2[3] * fac;
float facalpha = fac * alpha;
- mfac = 1.0f-facalpha;
- output[0] = color1[0]*mfac + color2[0]*facalpha;
- output[1] = color1[1]*mfac + color2[1]*facalpha;
- output[2] = color1[2]*mfac + color2[2]*facalpha;
+ mfac = 1.0f - facalpha;
+ output[0] = color1[0] * mfac + color2[0] * facalpha;
+ output[1] = color1[1] * mfac + color2[1] * facalpha;
+ output[2] = color1[2] * mfac + color2[2] * facalpha;
output[3] = max(color1[3], color2[3]);
}
Modified: trunk/blender/source/blender/editors/interface/interface_templates.c
===================================================================
--- trunk/blender/source/blender/editors/interface/interface_templates.c 2013-04-08 02:14:58 UTC (rev 55891)
+++ trunk/blender/source/blender/editors/interface/interface_templates.c 2013-04-08 04:39:09 UTC (rev 55892)
@@ -547,7 +547,7 @@
}
/* Due to space limit in UI - skip the "open" icon for packed data, and allow to unpack.
- Only for images, sound and fonts */
+ * Only for images, sound and fonts */
if (id && BKE_pack_check(id)) {
but = uiDefIconButO(block, BUT, "FILE_OT_unpack_item", WM_OP_INVOKE_REGION_WIN, ICON_PACKAGE, 0, 0,
UI_UNIT_X, UI_UNIT_Y, TIP_("Packed File, click to unpack"));
Modified: trunk/blender/source/blender/editors/sculpt_paint/paint_ops.c
===================================================================
--- trunk/blender/source/blender/editors/sculpt_paint/paint_ops.c 2013-04-08 02:14:58 UTC (rev 55891)
+++ trunk/blender/source/blender/editors/sculpt_paint/paint_ops.c 2013-04-08 04:39:09 UTC (rev 55892)
@@ -640,13 +640,13 @@
float orig_area, stencil_area, factor;
ED_image_get_uv_aspect(ima, NULL, &aspx, &aspy);
- orig_area = aspx*aspy;
- stencil_area = br->stencil_dimension[0]*br->stencil_dimension[1];
+ orig_area = aspx * aspy;
+ stencil_area = br->stencil_dimension[0] * br->stencil_dimension[1];
factor = sqrt(stencil_area / orig_area);
- br->stencil_dimension[0] = factor*aspx;
- br->stencil_dimension[1] = factor*aspy;
+ br->stencil_dimension[0] = factor * aspx;
+ br->stencil_dimension[1] = factor * aspy;
}
return OPERATOR_FINISHED;
Modified: trunk/blender/source/blender/editors/sculpt_paint/sculpt.c
===================================================================
--- trunk/blender/source/blender/editors/sculpt_paint/sculpt.c 2013-04-08 02:14:58 UTC (rev 55891)
+++ trunk/blender/source/blender/editors/sculpt_paint/sculpt.c 2013-04-08 04:39:09 UTC (rev 55892)
@@ -381,11 +381,11 @@
/**********************************************************************/
/* Returns true if the stroke will use dynamic topology, false
- otherwise.
-
- Factors: some brushes like grab cannot do dynamic topology.
- Others, like smooth, are better without. Same goes for alt-
- key smoothing. */
+ * otherwise.
+ *
+ * Factors: some brushes like grab cannot do dynamic topology.
+ * Others, like smooth, are better without. Same goes for alt-
+ * key smoothing. */
static int sculpt_stroke_dynamic_topology(const SculptSession *ss,
const Brush *brush)
{
Modified: trunk/blender/source/blender/editors/transform/transform_generics.c
===================================================================
--- trunk/blender/source/blender/editors/transform/transform_generics.c 2013-04-08 02:14:58 UTC (rev 55891)
+++ trunk/blender/source/blender/editors/transform/transform_generics.c 2013-04-08 04:39:09 UTC (rev 55892)
@@ -962,10 +962,6 @@
else if (t->spacetype == SPACE_CLIP) {
recalcData_spaceclip(t);
}
-
- if (t->options & CTX_MASK) {
-
- }
}
void drawLine(TransInfo *t, const float center[3], const float dir[3], char axis, short options)
Modified: trunk/blender/source/blender/freestyle/intern/application/AppCanvas.cpp
===================================================================
--- trunk/blender/source/blender/freestyle/intern/application/AppCanvas.cpp 2013-04-08 02:14:58 UTC (rev 55891)
+++ trunk/blender/source/blender/freestyle/intern/application/AppCanvas.cpp 2013-04-08 04:39:09 UTC (rev 55892)
@@ -98,7 +98,7 @@
static bool firsttime = true;
if (firsttime) {
_Renderer = new BlenderStrokeRenderer;
- if(!StrokeRenderer::loadTextures()) {
+ if (!StrokeRenderer::loadTextures()) {
cerr << "unable to load stroke textures" << endl;
return;
}
Modified: trunk/blender/source/blender/freestyle/intern/application/Controller.cpp
===================================================================
--- trunk/blender/source/blender/freestyle/intern/application/Controller.cpp 2013-04-08 02:14:58 UTC (rev 55891)
+++ trunk/blender/source/blender/freestyle/intern/application/Controller.cpp 2013-04-08 04:39:09 UTC (rev 55892)
@@ -650,7 +650,7 @@
// FIXME !! again!
img[i] = new GrayImage(_pView->width(), _pView->height());
for (unsigned int y = 0; y < img[i]->height(); ++y) {
- for(unsigned int x = 0; x < img[i]->width(); ++x) {
+ for (unsigned int x = 0; x < img[i]->width(); ++x) {
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list