fix for struct definition building with msvc2008 and some style cleanup.
authorCampbell Barton <ideasman42@gmail.com>
Sun, 24 Mar 2013 01:19:55 +0000 (01:19 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 24 Mar 2013 01:19:55 +0000 (01:19 +0000)
18 files changed:
source/blender/blenlib/BLI_callbacks.h
source/blender/blenloader/intern/readfile.c
source/blender/collada/ArmatureExporter.cpp
source/blender/collada/collada_internal.cpp
source/blender/compositor/nodes/COM_SocketProxyNode.h
source/blender/compositor/operations/COM_CropOperation.cpp
source/blender/compositor/operations/COM_OutputFileOperation.cpp
source/blender/editors/sculpt_paint/paint_image_2d.c
source/blender/editors/sculpt_paint/paint_image_proj.c
source/blender/editors/space_node/drawnode.c
source/blender/makesrna/intern/rna_nodetree.c
source/blender/nodes/composite/node_composite_util.c
source/blender/nodes/shader/nodes/node_shader_value.c
source/blender/render/intern/source/pipeline.c
source/blender/render/intern/source/render_result.c
source/gameengine/Ketsji/KX_ObjectActuator.cpp
source/gameengine/Ketsji/KX_Scene.cpp
source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp

index 1e95510f6ecdab0685a2487ce423af781f3c5fe5..e3d5a80b27f291c2923fe6d132608bef6c3e9638 100644 (file)
@@ -54,7 +54,7 @@ typedef enum {
 } eCbEvent;
 
 
 } eCbEvent;
 
 
-typedef struct {
+typedef struct bCallbackFuncStore {
        struct bCallbackFuncStore *next, *prev;
        void (*func)(struct Main *, struct ID *, void *arg);
        void *arg;
        struct bCallbackFuncStore *next, *prev;
        void (*func)(struct Main *, struct ID *, void *arg);
        void *arg;
index d1f5077b3110d03f42d9f9dc131238bb7313efe3..813d47f650b87891078469997151a45a3ad7a84d 100644 (file)
@@ -1019,7 +1019,7 @@ static int fd_read_gzip_from_memory(FileData *filedata, void *buffer, unsigned i
        if (err == Z_STREAM_END) {
                return 0;
        }
        if (err == Z_STREAM_END) {
                return 0;
        }
-       else if (err != Z_OK)  {
+       else if (err != Z_OK) {
                printf("fd_read_gzip_from_memory: zlib error\n");
                return 0;
        }
                printf("fd_read_gzip_from_memory: zlib error\n");
                return 0;
        }
index a56010aeb27f7c8741e62cf10cfc03c70fd056a7..2d3dc979416588720f184e635ceebf346c488448 100644 (file)
@@ -171,7 +171,7 @@ void ArmatureExporter::add_bone_node(Bone *bone, Object *ob_arm, Scene *sce,
                if (bone->childbase.first == NULL || BLI_countlist(&(bone->childbase)) >= 2) {
                        add_blender_leaf_bone( bone, ob_arm, node);
                }
                if (bone->childbase.first == NULL || BLI_countlist(&(bone->childbase)) >= 2) {
                        add_blender_leaf_bone( bone, ob_arm, node);
                }
-               else{
+               else {
 #endif
                        node.start();
 
 #endif
                        node.start();
 
index c3df2f0dc2fccdc4125ff8487a51067d5ee6e752..069419f938b72eb67e0c537bfe7d1f560237e7e8 100644 (file)
@@ -111,7 +111,7 @@ void UnitConverter::mat4_to_dae_double(double out[4][4], float in[4][4])
 
 float(&UnitConverter::get_rotation())[4][4]
 {
 
 float(&UnitConverter::get_rotation())[4][4]
 {
-       switch(up_axis) {
+       switch (up_axis) {
                case COLLADAFW::FileInfo::X_UP:
                        return x_up_mat4;
                        break;
                case COLLADAFW::FileInfo::X_UP:
                        return x_up_mat4;
                        break;
index a83ac094b2b532eb4d30d0108b16a276ecddd626..b679901ba2c3d27ce78e70fa27e6a4bd26d1b5aa 100644 (file)
@@ -31,9 +31,9 @@
  */
 class SocketProxyNode : public Node {
 private:
  */
 class SocketProxyNode : public Node {
 private:
-    bool m_buffer;
+       bool m_buffer;
 public:
 public:
-    SocketProxyNode(bNode *editorNode, bNodeSocket *editorInput, bNodeSocket *editorOutput, bool buffer);
+       SocketProxyNode(bNode *editorNode, bNodeSocket *editorInput, bNodeSocket *editorOutput, bool buffer);
        void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
 
        virtual bool isProxyNode() const { return true; }
        void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
 
        virtual bool isProxyNode() const { return true; }
index 4f9cd77198872cbf95925d538997bf9af0355496..844d23db2ac36c34a393289ca18ad0b0e6647d5d 100644 (file)
@@ -119,7 +119,7 @@ void CropImageOperation::determineResolution(unsigned int resolution[2], unsigne
 
 void CropImageOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
 
 void CropImageOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
-       if (x >= 0 && x < getWidth() && y >= 0 && y < getHeight())  {
+       if (x >= 0 && x < getWidth() && y >= 0 && y < getHeight()) {
                this->m_inputOperation->read(output, (x + this->m_xmin), (y + this->m_ymin), sampler);
        }
        else {
                this->m_inputOperation->read(output, (x + this->m_xmin), (y + this->m_ymin), sampler);
        }
        else {
index 47b69ec87f91508b66aead83397b2391e4549b78..15e5ab947d4c9c6a556fb12a3d5af8f3ec2e51d5 100644 (file)
@@ -166,7 +166,7 @@ OutputOpenExrLayer::OutputOpenExrLayer(const char *name_, DataType datatype_)
 }
 
 OutputOpenExrMultiLayerOperation::OutputOpenExrMultiLayerOperation(
 }
 
 OutputOpenExrMultiLayerOperation::OutputOpenExrMultiLayerOperation(
-    const RenderData *rd, const bNodeTree *tree, const char *path, char exr_codec)
+        const RenderData *rd, const bNodeTree *tree, const char *path, char exr_codec)
 {
        this->m_rd = rd;
        this->m_tree = tree;
 {
        this->m_rd = rd;
        this->m_tree = tree;
index 921ef6c2879f7338c1fee9d3bc3ba1439199d276..90a2c8037c4fea4709cfef13754a3a2b18ad188a 100644 (file)
@@ -79,9 +79,9 @@ BLI_INLINE unsigned char f_to_char(const float val)
 } (void)0
 
 #define IMAPAINT_CHAR_RGB_TO_FLOAT(f, c)  {                                   \
 } (void)0
 
 #define IMAPAINT_CHAR_RGB_TO_FLOAT(f, c)  {                                   \
-       (f)[0] = IMAPAINT_CHAR_TO_FLOAT((c)[0]);                                   \
-       (f)[1] = IMAPAINT_CHAR_TO_FLOAT((c)[1]);                                   \
-       (f)[2] = IMAPAINT_CHAR_TO_FLOAT((c)[2]);                                   \
+       (f)[0] = IMAPAINT_CHAR_TO_FLOAT((c)[0]);                                  \
+       (f)[1] = IMAPAINT_CHAR_TO_FLOAT((c)[1]);                                  \
+       (f)[2] = IMAPAINT_CHAR_TO_FLOAT((c)[2]);                                  \
 } (void)0
 
 #define IMAPAINT_FLOAT_RGB_COPY(a, b) copy_v3_v3(a, b)
 } (void)0
 
 #define IMAPAINT_FLOAT_RGB_COPY(a, b) copy_v3_v3(a, b)
index a90e9150345a2633052583879bd0b7b986578832..7a0f7b817b30ef1904601bf102d282d8e1c2a870 100644 (file)
@@ -116,10 +116,10 @@ BLI_INLINE unsigned char f_to_char(const float val)
 } (void)0
 
 #define IMAPAINT_CHAR_RGBA_TO_FLOAT(f, c)  {                                  \
 } (void)0
 
 #define IMAPAINT_CHAR_RGBA_TO_FLOAT(f, c)  {                                  \
-       (f)[0] = IMAPAINT_CHAR_TO_FLOAT((c)[0]);                                   \
-       (f)[1] = IMAPAINT_CHAR_TO_FLOAT((c)[1]);                                   \
-       (f)[2] = IMAPAINT_CHAR_TO_FLOAT((c)[2]);                                   \
-       (f)[3] = IMAPAINT_CHAR_TO_FLOAT((c)[3]);                                   \
+       (f)[0] = IMAPAINT_CHAR_TO_FLOAT((c)[0]);                                  \
+       (f)[1] = IMAPAINT_CHAR_TO_FLOAT((c)[1]);                                  \
+       (f)[2] = IMAPAINT_CHAR_TO_FLOAT((c)[2]);                                  \
+       (f)[3] = IMAPAINT_CHAR_TO_FLOAT((c)[3]);                                  \
 } (void)0
 
 #define IMAPAINT_FLOAT_RGB_TO_CHAR(c, f)  {                                   \
 } (void)0
 
 #define IMAPAINT_FLOAT_RGB_TO_CHAR(c, f)  {                                   \
index 9f2e0b71b0ba1991cd4ce0878614ac5d73d9b7b5..a413eb471405f184694be68753ff4fdcbbc83972 100644 (file)
@@ -2811,14 +2811,14 @@ void ED_init_custom_node_socket_type(bNodeSocketType *stype)
 
 /* maps standard socket integer type to a color */
 static const float std_node_socket_colors[][4] = {
 
 /* maps standard socket integer type to a color */
 static const float std_node_socket_colors[][4] = {
-    {0.63, 0.63, 0.63, 1.0},    /* SOCK_FLOAT */
-    {0.39, 0.39, 0.78, 1.0},    /* SOCK_VECTOR */
-    {0.78, 0.78, 0.16, 1.0},    /* SOCK_RGBA */
-    {0.39, 0.78, 0.39, 1.0},    /* SOCK_SHADER */
-    {0.70, 0.65, 0.19, 1.0},    /* SOCK_BOOLEAN */
-    {0.0, 0.0, 0.0, 1.0},       /*__SOCK_MESH (deprecated) */
-    {0.06, 0.52, 0.15, 1.0},    /* SOCK_INT */
-    {1.0, 1.0, 1.0, 1.0},       /* SOCK_STRING */
+       {0.63, 0.63, 0.63, 1.0},    /* SOCK_FLOAT */
+       {0.39, 0.39, 0.78, 1.0},    /* SOCK_VECTOR */
+       {0.78, 0.78, 0.16, 1.0},    /* SOCK_RGBA */
+       {0.39, 0.78, 0.39, 1.0},    /* SOCK_SHADER */
+       {0.70, 0.65, 0.19, 1.0},    /* SOCK_BOOLEAN */
+       {0.0, 0.0, 0.0, 1.0},       /*__SOCK_MESH (deprecated) */
+       {0.06, 0.52, 0.15, 1.0},    /* SOCK_INT */
+       {1.0, 1.0, 1.0, 1.0},       /* SOCK_STRING */
 };
 
 /* common color callbacks for standard types */
 };
 
 /* common color callbacks for standard types */
index 576029ec05171d8e2961dd57b08d8df0c3ad3fdf..d8dd9ff3c33732c651911f6e13ebe7721c6a953e 100644 (file)
@@ -69,15 +69,15 @@ EnumPropertyItem node_socket_in_out_items[] = {
 };
 
 EnumPropertyItem node_socket_type_items[] = {
 };
 
 EnumPropertyItem node_socket_type_items[] = {
-    {SOCK_CUSTOM,  "CUSTOM",    0,    "Custom",    ""},
-    {SOCK_FLOAT,   "VALUE",     0,    "Value",     ""},
-    {SOCK_INT,     "INT",       0,    "Int",       ""},
-    {SOCK_BOOLEAN, "BOOLEAN",   0,    "Boolean",   ""},
-    {SOCK_VECTOR,  "VECTOR",    0,    "Vector",    ""},
-    {SOCK_STRING,  "STRING",    0,    "String",    ""},
-    {SOCK_RGBA,    "RGBA",      0,    "RGBA",      ""},
-    {SOCK_SHADER,  "SHADER",    0,    "Shader",    ""},
-    {0, NULL, 0, NULL, NULL}
+       {SOCK_CUSTOM,  "CUSTOM",    0,    "Custom",    ""},
+       {SOCK_FLOAT,   "VALUE",     0,    "Value",     ""},
+       {SOCK_INT,     "INT",       0,    "Int",       ""},
+       {SOCK_BOOLEAN, "BOOLEAN",   0,    "Boolean",   ""},
+       {SOCK_VECTOR,  "VECTOR",    0,    "Vector",    ""},
+       {SOCK_STRING,  "STRING",    0,    "String",    ""},
+       {SOCK_RGBA,    "RGBA",      0,    "RGBA",      ""},
+       {SOCK_SHADER,  "SHADER",    0,    "Shader",    ""},
+       {0, NULL, 0, NULL, NULL}
 };
 
 EnumPropertyItem node_quality_items[] = {
 };
 
 EnumPropertyItem node_quality_items[] = {
index 6209ca6aa4f54dd905e15b2eb8a83d5747ed6798..02a5f410d836c945569465466fffdb70b9441811 100644 (file)
@@ -41,7 +41,7 @@ void cmp_node_update_default(bNodeTree *UNUSED(ntree), bNode *node)
 {
        bNodeSocket *sock;
        for (sock= node->outputs.first; sock; sock= sock->next) {
 {
        bNodeSocket *sock;
        for (sock= node->outputs.first; sock; sock= sock->next) {
-               if(sock->cache) {
+               if (sock->cache) {
                        //free_compbuf(sock->cache);
                        //sock->cache= NULL;
                }
                        //free_compbuf(sock->cache);
                        //sock->cache= NULL;
                }
index f4aef926f64f2ef3b385458739023cb1c87daa3f..642b5061a76303c4861d9344add44359c827a5a5 100644 (file)
@@ -34,7 +34,7 @@
 
 /* **************** VALUE ******************** */
 static bNodeSocketTemplate sh_node_value_out[] = {
 
 /* **************** VALUE ******************** */
 static bNodeSocketTemplate sh_node_value_out[] = {
-    {  SOCK_FLOAT, 0, N_("Value"), 0.5f, 0, 0, 0, -FLT_MAX, FLT_MAX, PROP_NONE},
+       {       SOCK_FLOAT, 0, N_("Value"), 0.5f, 0, 0, 0, -FLT_MAX, FLT_MAX, PROP_NONE},
        {       -1, 0, ""       }
 };
 
        {       -1, 0, ""       }
 };
 
index 9f44e42469b713d51f6b69e99fc54668a0bcd993..8306a8a63a7e926026ab6f897dcac1f2154d4583 100644 (file)
@@ -877,7 +877,7 @@ static void *do_render_thread(void *thread_v)
                do_part_thread(pa);
                BLI_thread_queue_push(thread->donequeue, pa);
                
                do_part_thread(pa);
                BLI_thread_queue_push(thread->donequeue, pa);
                
-               if(R.test_break(R.tbh))
+               if (R.test_break(R.tbh))
                        break;
        }
        
                        break;
        }
        
index ab0f16c8c2a90a81c4e0c9c37cc7c128905ce6ff..a758c578340fb04bd6fe6f2000daa2f8f4c94df2 100644 (file)
@@ -1092,7 +1092,7 @@ ImBuf *render_result_rect_to_ibuf(RenderResult *rr, RenderData *rd)
                if (BKE_imtype_valid_depths(rd->im_format.imtype) & (R_IMF_CHAN_DEPTH_12 | R_IMF_CHAN_DEPTH_16 | R_IMF_CHAN_DEPTH_24 | R_IMF_CHAN_DEPTH_32)) {
                        IMB_float_from_rect(ibuf);
                }
                if (BKE_imtype_valid_depths(rd->im_format.imtype) & (R_IMF_CHAN_DEPTH_12 | R_IMF_CHAN_DEPTH_16 | R_IMF_CHAN_DEPTH_24 | R_IMF_CHAN_DEPTH_32)) {
                        IMB_float_from_rect(ibuf);
                }
-               else  {
+               else {
                        /* ensure no float buffer remained from previous frame */
                        ibuf->rect_float = NULL;
                }
                        /* ensure no float buffer remained from previous frame */
                        ibuf->rect_float = NULL;
                }
index b4ee339568c6e93c5ae5e710573f5f392c9e7216..d02554e185ef0b746aacaeb4c9f7eed823efd117 100644 (file)
@@ -215,8 +215,8 @@ bool KX_ObjectActuator::Update()
                        m_previous_error = e;
                        m_error_accumulator = I;
                        parent->ApplyForce(m_force,(m_bitLocalFlag.LinearVelocity) != 0);
                        m_previous_error = e;
                        m_error_accumulator = I;
                        parent->ApplyForce(m_force,(m_bitLocalFlag.LinearVelocity) != 0);
-               } else if(m_bitLocalFlag.CharacterMotion)
-               {
+               }
+               else if (m_bitLocalFlag.CharacterMotion) {
                        MT_Vector3 dir = m_dloc;
 
                        if (m_bitLocalFlag.AddOrSetCharLoc) {
                        MT_Vector3 dir = m_dloc;
 
                        if (m_bitLocalFlag.AddOrSetCharLoc) {
index fec275322e9a02553db9938e16217395b8c69028..3e1a81c2f4ff8e44ca16ef120bc388c785cbec9c 100644 (file)
@@ -1172,9 +1172,8 @@ void KX_Scene::ReplaceMesh(class CValue* obj,void* meshobj, bool use_gfx, bool u
                                        );
                                }
                                newobj->SetDeformer(modifierDeformer);
                                        );
                                }
                                newobj->SetDeformer(modifierDeformer);
-                       } 
-                       else    if (bHasShapeKey)
-                       {
+                       }
+                       else if (bHasShapeKey) {
                                BL_ShapeDeformer* shapeDeformer;
                                if (bHasArmature) 
                                {
                                BL_ShapeDeformer* shapeDeformer;
                                if (bHasArmature) 
                                {
index 9fb86dec569ad029b3b65f74d1e312ff001b951a..d5ceba0ec571d90574650717cbf2dfa0d5a59440 100644 (file)
@@ -1576,7 +1576,7 @@ struct OcclusionBuffer
                                }
                        }
                }
                                }
                        }
                }
-               else if (width == 1)  {
+               else if (width == 1) {
                        // Degenerated in at least 2 vertical lines
                        // The algorithm below doesn't work when face has a single pixel width
                        // We cannot use general formulas because the plane is degenerated. 
                        // Degenerated in at least 2 vertical lines
                        // The algorithm below doesn't work when face has a single pixel width
                        // We cannot use general formulas because the plane is degenerated.