Revision: 48612
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=48612
Author:   campbellbarton
Date:     2012-07-04 20:47:12 +0000 (Wed, 04 Jul 2012)
Log Message:
-----------
style cleanup

Modified Paths:
--------------
    trunk/blender/source/blender/blenlib/BLI_args.h
    trunk/blender/source/blender/blenlib/intern/BLI_args.c
    trunk/blender/source/blender/collada/GeometryExporter.h
    trunk/blender/source/blender/collada/ImageExporter.cpp
    trunk/blender/source/blender/compositor/nodes/COM_LensDistortionNode.cpp
    
trunk/blender/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp
    
trunk/blender/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp
    
trunk/blender/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp
    
trunk/blender/source/blender/compositor/operations/COM_WriteBufferOperation.cpp
    trunk/blender/source/blender/editors/space_view3d/drawarmature.c
    trunk/blender/source/blender/editors/space_view3d/drawvolume.c
    trunk/blender/source/blender/editors/space_view3d/view3d_edit.c
    trunk/blender/source/blender/editors/space_view3d/view3d_view.c
    trunk/blender/source/blender/editors/transform/transform.c
    trunk/blender/source/blender/editors/transform/transform_snap.c
    trunk/blender/source/blender/imbuf/intern/readimage.c
    trunk/blender/source/blender/nodes/texture/nodes/node_texture_viewer.c
    trunk/blender/source/blender/windowmanager/intern/wm_gesture.c

Modified: trunk/blender/source/blender/blenlib/BLI_args.h
===================================================================
--- trunk/blender/source/blender/blenlib/BLI_args.h     2012-07-04 20:13:39 UTC 
(rev 48611)
+++ trunk/blender/source/blender/blenlib/BLI_args.h     2012-07-04 20:47:12 UTC 
(rev 48612)
@@ -36,19 +36,32 @@
 struct bArgs;
 typedef struct bArgs bArgs;
 
-/* returns the number of extra arguments consumed by the function. 0 is normal 
value, -1 stops parsing arguments, other negative indicates skip */
+/**
+ * Returns the number of extra arguments consumed by the function.
+ * -  0 is normal value,
+ * - -1 stops parsing arguments, other negative indicates skip
+ */
 typedef int (*BA_ArgCallback)(int argc, const char **argv, void *data);
 
 struct bArgs *BLI_argsInit(int argc, const char **argv);
 void BLI_argsFree(struct bArgs *ba);
 
-/* pass starts at 1, -1 means valid all the time
+/**
+ * Pass starts at 1, -1 means valid all the time
  * short_arg or long_arg can be null to specify no short or long versions
- * */
-void BLI_argsAdd(struct bArgs *ba, int pass, const char *short_arg, const char 
*long_arg, const char *doc, BA_ArgCallback cb, void *data);
-/* short_case and long_case specify if those arguments are case specific */
-void BLI_argsAddCase(struct bArgs *ba, int pass, const char *short_arg, int 
short_case, const char *long_arg, int long_case, const char *doc, 
BA_ArgCallback cb, void *data);
+ */
+void BLI_argsAdd(struct bArgs *ba, int pass,
+                 const char *short_arg, const char *long_arg,
+                 const char *doc, BA_ArgCallback cb, void *data);
 
+/**
+ * Short_case and long_case specify if those arguments are case specific
+ */
+void BLI_argsAddCase(struct bArgs *ba, int pass,
+                     const char *short_arg, int short_case,
+                     const char *long_arg, int long_case,
+                     const char *doc, BA_ArgCallback cb, void *data);
+
 void BLI_argsParse(struct bArgs *ba, int pass, BA_ArgCallback default_cb, void 
*data);
 
 void BLI_argsPrintArgDoc(struct bArgs *ba, const char *arg);

Modified: trunk/blender/source/blender/blenlib/intern/BLI_args.c
===================================================================
--- trunk/blender/source/blender/blenlib/intern/BLI_args.c      2012-07-04 
20:13:39 UTC (rev 48611)
+++ trunk/blender/source/blender/blenlib/intern/BLI_args.c      2012-07-04 
20:47:12 UTC (rev 48612)
@@ -173,7 +173,8 @@
        return d;
 }
 
-static void internalAdd(struct bArgs *ba, const char *arg, int pass, int 
case_str, BA_ArgCallback cb, void *data, bArgDoc *d)
+static void internalAdd(struct bArgs *ba, const char *arg, int pass,
+                        int case_str, BA_ArgCallback cb, void *data, bArgDoc 
*d)
 {
        bArgument *a;
        bAKey *key;
@@ -182,8 +183,10 @@
 
        if (a) {
                printf("WARNING: conflicting argument\n");
-               printf("\ttrying to add '%s' on pass %i, %scase sensitive\n", 
arg, pass, case_str == 1 ? "not " : "");
-               printf("\tconflict with '%s' on pass %i, %scase sensitive\n\n", 
a->key->arg, (int)a->key->pass, a->key->case_str == 1 ? "not " : "");
+               printf("\ttrying to add '%s' on pass %i, %scase sensitive\n",
+                      arg, pass, case_str == 1 ? "not " : "");
+               printf("\tconflict with '%s' on pass %i, %scase sensitive\n\n",
+                      a->key->arg, (int)a->key->pass, a->key->case_str == 1 ? 
"not " : "");
        }
 
        a = MEM_callocN(sizeof(bArgument), "bArgument");
@@ -201,7 +204,10 @@
        BLI_ghash_insert(ba->items, key, a);
 }
 
-void BLI_argsAddCase(struct bArgs *ba, int pass, const char *short_arg, int 
short_case, const char *long_arg, int long_case, const char *doc, 
BA_ArgCallback cb, void *data)
+void BLI_argsAddCase(struct bArgs *ba, int pass,
+                     const char *short_arg, int short_case,
+                     const char *long_arg, int long_case,
+                     const char *doc, BA_ArgCallback cb, void *data)
 {
        bArgDoc *d = internalDocs(ba, short_arg, long_arg, doc);
 
@@ -214,7 +220,9 @@
 
 }
 
-void BLI_argsAdd(struct bArgs *ba, int pass, const char *short_arg, const char 
*long_arg, const char *doc, BA_ArgCallback cb, void *data)
+void BLI_argsAdd(struct bArgs *ba, int pass,
+                 const char *short_arg, const char *long_arg,
+                 const char *doc, BA_ArgCallback cb, void *data)
 {
        BLI_argsAddCase(ba, pass, short_arg, 0, long_arg, 0, doc, cb, data);
 }

Modified: trunk/blender/source/blender/collada/GeometryExporter.h
===================================================================
--- trunk/blender/source/blender/collada/GeometryExporter.h     2012-07-04 
20:13:39 UTC (rev 48611)
+++ trunk/blender/source/blender/collada/GeometryExporter.h     2012-07-04 
20:47:12 UTC (rev 48612)
@@ -119,8 +119,7 @@
                LinkNode *node;
                for (node=export_set; node; node = node->next) {
                        Object *ob = (Object *)node->link;
-                       if (ob->type == OB_MESH)
-                       {
+                       if (ob->type == OB_MESH) {
                                f(ob);
                        }
                }

Modified: trunk/blender/source/blender/collada/ImageExporter.cpp
===================================================================
--- trunk/blender/source/blender/collada/ImageExporter.cpp      2012-07-04 
20:13:39 UTC (rev 48611)
+++ trunk/blender/source/blender/collada/ImageExporter.cpp      2012-07-04 
20:47:12 UTC (rev 48612)
@@ -135,7 +135,7 @@
 
                COLLADASW::Image 
img(COLLADABU::URI(COLLADABU::URI::nativePathToUri(export_path)), 
translated_name, translated_name); /* set name also to mNameNC. This helps 
other viewers import files exported from Blender better */
                img.add(mSW);
-               fprintf(stdout, "Collada export: Added image: 
%s\n",export_file);
+               fprintf(stdout, "Collada export: Added image: %s\n", 
export_file);
                mImages.push_back(translated_name);
        }
 }
@@ -145,7 +145,7 @@
        std::set<Image *> uv_textures;
        LinkNode *node;
        bool use_copies = this->export_settings->use_texture_copies;
-       for (node=this->export_settings->export_set; node; node=node->next) {
+       for (node = this->export_settings->export_set; node; node = node->next) 
{
                Object *ob = (Object *)node->link;
                if (ob->type == OB_MESH && ob->totcol) {
                        Mesh *me     = (Mesh *) ob->data;
@@ -160,7 +160,7 @@
                                                if (ima == NULL)
                                                        continue;
 
-                                               bool not_in_list = 
uv_textures.find(ima)==uv_textures.end();
+                                               bool not_in_list = 
uv_textures.find(ima) == uv_textures.end();
                                                if (not_in_list) {
                                                                
uv_textures.insert(ima);
                                                                
export_UV_Image(ima, use_copies);
@@ -177,7 +177,7 @@
 {
        LinkNode *node;
        
-       for (node=this->export_settings->export_set; node; node=node->next) {
+       for (node = this->export_settings->export_set; node; node = node->next) 
{
                Object *ob = (Object *)node->link;
                int a;
                for (a = 0; a < ob->totcol; a++) {

Modified: 
trunk/blender/source/blender/compositor/nodes/COM_LensDistortionNode.cpp
===================================================================
--- trunk/blender/source/blender/compositor/nodes/COM_LensDistortionNode.cpp    
2012-07-04 20:13:39 UTC (rev 48611)
+++ trunk/blender/source/blender/compositor/nodes/COM_LensDistortionNode.cpp    
2012-07-04 20:47:12 UTC (rev 48612)
@@ -50,8 +50,7 @@
                ScreenLensDistortionOperation *operation = new 
ScreenLensDistortionOperation();
                operation->setbNode(editorNode);
                operation->setData(data);
-               if (!(this->getInputSocket(1)->isConnected() || 
this->getInputSocket(2)->isConnected())) 
-               {
+               if (!(this->getInputSocket(1)->isConnected() || 
this->getInputSocket(2)->isConnected())) {
                        // no nodes connected to the distortion and dispersion. 
We can precalculate some values
                        float distortion = ((const bNodeSocketValueFloat 
*)this->getInputSocket(1)->getbNodeSocket()->default_value)->value;
                        float dispersion = ((const bNodeSocketValueFloat 
*)this->getInputSocket(2)->getbNodeSocket()->default_value)->value;

Modified: 
trunk/blender/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp
===================================================================
--- 
trunk/blender/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp
 2012-07-04 20:13:39 UTC (rev 48611)
+++ 
trunk/blender/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp
 2012-07-04 20:47:12 UTC (rev 48612)
@@ -79,10 +79,10 @@
                newInput.xmin = input->xmin - this->m_kr2 - 2;
                newInput.xmax = input->xmax + this->m_kr2 + 2;
        } else {
-               newInput.xmin = input->xmin-7; //(0.25f*20*1)+2 == worse case 
dispersion
+               newInput.xmin = input->xmin - 7; //(0.25f*20*1)+2 == worse case 
dispersion
                newInput.ymin = input->ymin;
                newInput.ymax = input->ymax;
-               newInput.xmax = input->xmax+7; //(0.25f*20*1)+2 == worse case 
dispersion
+               newInput.xmax = input->xmax + 7; //(0.25f*20*1)+2 == worse case 
dispersion
        }
        return NodeOperation::determineDependingAreaOfInterest(&newInput, 
readOperation, output);
 }

Modified: 
trunk/blender/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp
===================================================================
--- 
trunk/blender/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp
    2012-07-04 20:13:39 UTC (rev 48611)
+++ 
trunk/blender/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp
    2012-07-04 20:47:12 UTC (rev 48612)
@@ -256,7 +256,7 @@
                UPDATE_INPUT;
                determineUV(coords, input->xmax, input->ymin);
                UPDATE_INPUT;
-               margin = (ABS(this->m_distortion)+this->m_dispersion)*MARGIN;
+               margin = (ABS(this->m_distortion) + this->m_dispersion) * 
MARGIN;
        } 
        else 
        {
@@ -283,7 +283,7 @@
                UPDATE_INPUT;
                determineUV(coords, input->xmax, input->ymin, 1.0f, 1.0f);
                UPDATE_INPUT;
-               margin=MARGIN;
+               margin = MARGIN;
        }
 
 #undef UPDATE_INPUT

Modified: 
trunk/blender/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp
===================================================================
--- 
trunk/blender/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp
   2012-07-04 20:13:39 UTC (rev 48611)
+++ 
trunk/blender/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp
   2012-07-04 20:47:12 UTC (rev 48612)
@@ -74,7 +74,7 @@
 
 #ifdef COM_DEFOCUS_SEARCH
        float search[4];
-       this->inputSearchProgram->read(search, 
x/InverseSearchRadiusOperation::DIVIDER, 
y/InverseSearchRadiusOperation::DIVIDER, inputBuffers, NULL);
+       this->inputSearchProgram->read(search, 
x/InverseSearchRadiusOperation::DIVIDER, y / 
InverseSearchRadiusOperation::DIVIDER, inputBuffers, NULL);
        int minx = search[0];

@@ Diff output truncated at 10240 characters. @@
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to