style cleanup
authorCampbell Barton <ideasman42@gmail.com>
Mon, 22 Oct 2012 08:15:51 +0000 (08:15 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 22 Oct 2012 08:15:51 +0000 (08:15 +0000)
218 files changed:
intern/container/CTR_TaggedIndex.h
intern/container/CTR_TaggedSetOps.h
source/blender/blenkernel/intern/boids.c
source/blender/blenkernel/intern/cloth.c
source/blender/blenkernel/intern/effect.c
source/blender/blenkernel/intern/implicit.c
source/blender/blenkernel/intern/library.c
source/blender/blenkernel/intern/material.c
source/blender/blenkernel/intern/particle_system.c
source/blender/blenkernel/intern/pointcache.c
source/blender/blenkernel/intern/sca.c
source/blender/blenkernel/intern/softbody.c
source/blender/blenlib/intern/BLI_heap.c
source/blender/blenlib/intern/math_rotation.c
source/blender/blenlib/intern/string_utf8.c
source/blender/blenloader/intern/readfile.c
source/blender/blenloader/intern/writefile.c
source/blender/bmesh/intern/bmesh_decimate.c
source/blender/editors/interface/interface.c
source/blender/editors/physics/particle_edit.c
source/blender/editors/sculpt_paint/paint_image.c
source/blender/editors/space_logic/logic_window.c
source/blender/editors/space_logic/space_logic.c
source/blender/editors/space_view3d/drawmesh.c
source/blender/editors/space_view3d/view3d_fly.c
source/blender/makesdna/DNA_genfile.h
source/blender/makesdna/intern/dna_genfile.c
source/blender/makesdna/intern/makesdna.c
source/blender/modifiers/intern/MOD_screw.c
source/blender/nodes/composite/node_composite_util.c
source/blender/nodes/composite/nodes/node_composite_alphaOver.c
source/blender/nodes/composite/nodes/node_composite_bokehimage.c
source/blender/nodes/composite/nodes/node_composite_boxmask.c
source/blender/nodes/composite/nodes/node_composite_brightness.c
source/blender/nodes/composite/nodes/node_composite_channelMatte.c
source/blender/nodes/composite/nodes/node_composite_chromaMatte.c
source/blender/nodes/composite/nodes/node_composite_colorMatte.c
source/blender/nodes/composite/nodes/node_composite_colorSpill.c
source/blender/nodes/composite/nodes/node_composite_colorbalance.c
source/blender/nodes/composite/nodes/node_composite_colorcorrection.c
source/blender/nodes/composite/nodes/node_composite_composite.c
source/blender/nodes/composite/nodes/node_composite_crop.c
source/blender/nodes/composite/nodes/node_composite_curves.c
source/blender/nodes/composite/nodes/node_composite_defocus.c
source/blender/nodes/composite/nodes/node_composite_despeckle.c
source/blender/nodes/composite/nodes/node_composite_diffMatte.c
source/blender/nodes/composite/nodes/node_composite_displace.c
source/blender/nodes/composite/nodes/node_composite_distanceMatte.c
source/blender/nodes/composite/nodes/node_composite_doubleEdgeMask.c
source/blender/nodes/composite/nodes/node_composite_ellipsemask.c
source/blender/nodes/composite/nodes/node_composite_filter.c
source/blender/nodes/composite/nodes/node_composite_flip.c
source/blender/nodes/composite/nodes/node_composite_gamma.c
source/blender/nodes/composite/nodes/node_composite_glare.c
source/blender/nodes/composite/nodes/node_composite_hueSatVal.c
source/blender/nodes/composite/nodes/node_composite_huecorrect.c
source/blender/nodes/composite/nodes/node_composite_idMask.c
source/blender/nodes/composite/nodes/node_composite_image.c
source/blender/nodes/composite/nodes/node_composite_invert.c
source/blender/nodes/composite/nodes/node_composite_lensdist.c
source/blender/nodes/composite/nodes/node_composite_levels.c
source/blender/nodes/composite/nodes/node_composite_lummaMatte.c
source/blender/nodes/composite/nodes/node_composite_mapUV.c
source/blender/nodes/composite/nodes/node_composite_mapValue.c
source/blender/nodes/composite/nodes/node_composite_math.c
source/blender/nodes/composite/nodes/node_composite_mixrgb.c
source/blender/nodes/composite/nodes/node_composite_normal.c
source/blender/nodes/composite/nodes/node_composite_normalize.c
source/blender/nodes/composite/nodes/node_composite_premulkey.c
source/blender/nodes/composite/nodes/node_composite_rgb.c
source/blender/nodes/composite/nodes/node_composite_rotate.c
source/blender/nodes/composite/nodes/node_composite_sepcombHSVA.c
source/blender/nodes/composite/nodes/node_composite_sepcombRGBA.c
source/blender/nodes/composite/nodes/node_composite_sepcombYCCA.c
source/blender/nodes/composite/nodes/node_composite_sepcombYUVA.c
source/blender/nodes/composite/nodes/node_composite_setalpha.c
source/blender/nodes/composite/nodes/node_composite_splitViewer.c
source/blender/nodes/composite/nodes/node_composite_stabilize2d.c
source/blender/nodes/composite/nodes/node_composite_switch.c
source/blender/nodes/composite/nodes/node_composite_texture.c
source/blender/nodes/composite/nodes/node_composite_tonemap.c
source/blender/nodes/composite/nodes/node_composite_translate.c
source/blender/nodes/composite/nodes/node_composite_valToRgb.c
source/blender/nodes/composite/nodes/node_composite_value.c
source/blender/nodes/composite/nodes/node_composite_zcombine.c
source/blender/nodes/intern/node_exec.c
source/blender/nodes/shader/node_shader_util.c
source/blender/nodes/shader/nodes/node_shader_add_shader.c
source/blender/nodes/shader/nodes/node_shader_attribute.c
source/blender/nodes/shader/nodes/node_shader_background.c
source/blender/nodes/shader/nodes/node_shader_brightness.c
source/blender/nodes/shader/nodes/node_shader_bsdf_anisotropic.c
source/blender/nodes/shader/nodes/node_shader_bsdf_diffuse.c
source/blender/nodes/shader/nodes/node_shader_bsdf_glass.c
source/blender/nodes/shader/nodes/node_shader_bsdf_glossy.c
source/blender/nodes/shader/nodes/node_shader_bsdf_translucent.c
source/blender/nodes/shader/nodes/node_shader_bsdf_transparent.c
source/blender/nodes/shader/nodes/node_shader_bsdf_velvet.c
source/blender/nodes/shader/nodes/node_shader_bump.c
source/blender/nodes/shader/nodes/node_shader_camera.c
source/blender/nodes/shader/nodes/node_shader_curves.c
source/blender/nodes/shader/nodes/node_shader_emission.c
source/blender/nodes/shader/nodes/node_shader_fresnel.c
source/blender/nodes/shader/nodes/node_shader_gamma.c
source/blender/nodes/shader/nodes/node_shader_geom.c
source/blender/nodes/shader/nodes/node_shader_geometry.c
source/blender/nodes/shader/nodes/node_shader_holdout.c
source/blender/nodes/shader/nodes/node_shader_hueSatVal.c
source/blender/nodes/shader/nodes/node_shader_invert.c
source/blender/nodes/shader/nodes/node_shader_layer_weight.c
source/blender/nodes/shader/nodes/node_shader_light_falloff.c
source/blender/nodes/shader/nodes/node_shader_light_path.c
source/blender/nodes/shader/nodes/node_shader_mapping.c
source/blender/nodes/shader/nodes/node_shader_material.c
source/blender/nodes/shader/nodes/node_shader_math.c
source/blender/nodes/shader/nodes/node_shader_mixRgb.c
source/blender/nodes/shader/nodes/node_shader_mix_shader.c
source/blender/nodes/shader/nodes/node_shader_normal.c
source/blender/nodes/shader/nodes/node_shader_object_info.c
source/blender/nodes/shader/nodes/node_shader_output.c
source/blender/nodes/shader/nodes/node_shader_output_lamp.c
source/blender/nodes/shader/nodes/node_shader_output_material.c
source/blender/nodes/shader/nodes/node_shader_output_world.c
source/blender/nodes/shader/nodes/node_shader_rgb.c
source/blender/nodes/shader/nodes/node_shader_sepcombRGB.c
source/blender/nodes/shader/nodes/node_shader_squeeze.c
source/blender/nodes/shader/nodes/node_shader_tex_brick.c
source/blender/nodes/shader/nodes/node_shader_tex_checker.c
source/blender/nodes/shader/nodes/node_shader_tex_coord.c
source/blender/nodes/shader/nodes/node_shader_tex_environment.c
source/blender/nodes/shader/nodes/node_shader_tex_gradient.c
source/blender/nodes/shader/nodes/node_shader_tex_image.c
source/blender/nodes/shader/nodes/node_shader_tex_magic.c
source/blender/nodes/shader/nodes/node_shader_tex_musgrave.c
source/blender/nodes/shader/nodes/node_shader_tex_noise.c
source/blender/nodes/shader/nodes/node_shader_tex_sky.c
source/blender/nodes/shader/nodes/node_shader_tex_voronoi.c
source/blender/nodes/shader/nodes/node_shader_tex_wave.c
source/blender/nodes/shader/nodes/node_shader_texture.c
source/blender/nodes/shader/nodes/node_shader_valToRgb.c
source/blender/nodes/shader/nodes/node_shader_value.c
source/blender/nodes/shader/nodes/node_shader_vectMath.c
source/blender/nodes/shader/nodes/node_shader_volume_isotropic.c
source/blender/nodes/shader/nodes/node_shader_volume_transparent.c
source/blender/nodes/texture/nodes/node_texture_at.c
source/blender/nodes/texture/nodes/node_texture_bricks.c
source/blender/nodes/texture/nodes/node_texture_checker.c
source/blender/nodes/texture/nodes/node_texture_compose.c
source/blender/nodes/texture/nodes/node_texture_coord.c
source/blender/nodes/texture/nodes/node_texture_curves.c
source/blender/nodes/texture/nodes/node_texture_decompose.c
source/blender/nodes/texture/nodes/node_texture_distance.c
source/blender/nodes/texture/nodes/node_texture_hueSatVal.c
source/blender/nodes/texture/nodes/node_texture_image.c
source/blender/nodes/texture/nodes/node_texture_invert.c
source/blender/nodes/texture/nodes/node_texture_math.c
source/blender/nodes/texture/nodes/node_texture_mixRgb.c
source/blender/nodes/texture/nodes/node_texture_output.c
source/blender/nodes/texture/nodes/node_texture_proc.c
source/blender/nodes/texture/nodes/node_texture_rotate.c
source/blender/nodes/texture/nodes/node_texture_scale.c
source/blender/nodes/texture/nodes/node_texture_texture.c
source/blender/nodes/texture/nodes/node_texture_translate.c
source/blender/nodes/texture/nodes/node_texture_valToNor.c
source/blender/nodes/texture/nodes/node_texture_valToRgb.c
source/gameengine/BlenderRoutines/KX_BlenderRenderTools.cpp
source/gameengine/Converter/BL_ActionActuator.cpp
source/gameengine/Converter/BL_ArmatureChannel.cpp
source/gameengine/Converter/BL_ArmatureConstraint.cpp
source/gameengine/Converter/BL_BlenderDataConversion.cpp
source/gameengine/Converter/BL_MeshDeformer.cpp
source/gameengine/Converter/BL_ShapeActionActuator.cpp
source/gameengine/Converter/KX_BlenderSceneConverter.cpp
source/gameengine/Expressions/ListValue.cpp
source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp
source/gameengine/GameLogic/Joystick/SCA_JoystickEvents.cpp
source/gameengine/GameLogic/SCA_IController.cpp
source/gameengine/GameLogic/SCA_ILogicBrick.cpp
source/gameengine/GameLogic/SCA_ISensor.cpp
source/gameengine/GameLogic/SCA_JoystickSensor.cpp
source/gameengine/GameLogic/SCA_KeyboardSensor.cpp
source/gameengine/GameLogic/SCA_PythonController.cpp
source/gameengine/GameLogic/SCA_RandomSensor.cpp
source/gameengine/GamePlayer/common/GPC_RawLoadDotBlendArray.cpp
source/gameengine/GamePlayer/common/GPC_RawLogoArrays.cpp
source/gameengine/GamePlayer/common/GPC_RenderTools.cpp
source/gameengine/Ketsji/BL_BlenderShader.cpp
source/gameengine/Ketsji/BL_Shader.cpp
source/gameengine/Ketsji/BL_Texture.cpp
source/gameengine/Ketsji/KX_BlenderMaterial.cpp
source/gameengine/Ketsji/KX_Camera.cpp
source/gameengine/Ketsji/KX_CameraActuator.cpp
source/gameengine/Ketsji/KX_ConstraintWrapper.cpp
source/gameengine/Ketsji/KX_FontObject.cpp
source/gameengine/Ketsji/KX_GameObject.cpp
source/gameengine/Ketsji/KX_IpoActuator.cpp
source/gameengine/Ketsji/KX_Light.cpp
source/gameengine/Ketsji/KX_MeshProxy.cpp
source/gameengine/Ketsji/KX_MouseFocusSensor.cpp
source/gameengine/Ketsji/KX_NavMeshObject.cpp
source/gameengine/Ketsji/KX_ObjectActuator.cpp
source/gameengine/Ketsji/KX_PolyProxy.cpp
source/gameengine/Ketsji/KX_PolygonMaterial.cpp
source/gameengine/Ketsji/KX_PyMath.cpp
source/gameengine/Ketsji/KX_PythonInit.cpp
source/gameengine/Ketsji/KX_RadarSensor.cpp
source/gameengine/Ketsji/KX_Scene.cpp
source/gameengine/Ketsji/KX_TouchSensor.cpp
source/gameengine/Ketsji/KX_VertexProxy.cpp
source/gameengine/Physics/Bullet/CcdPhysicsController.cpp
source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp
source/gameengine/Rasterizer/RAS_MaterialBucket.cpp
source/gameengine/Rasterizer/RAS_MeshObject.cpp
source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp
source/gameengine/Rasterizer/RAS_Polygon.cpp
source/gameengine/Rasterizer/RAS_TexVert.cpp
source/gameengine/Rasterizer/RAS_texmatrix.cpp
source/tests/rna_array.py

index 8420414d6c7eb2c1501c05351ef0ad94cceaf558..0eb4e02e84f01663ff0b3e57dfc9c5cd9b9032a8 100644 (file)
  *  \ingroup ctr
  */
 
-
-/**
-
- * Copyright (C) 2001 NaN Technologies B.V.
- * Simple tagged index class.
- */
-
 #ifndef __CTR_TAGGEDINDEX_H__
 #define __CTR_TAGGEDINDEX_H__
 
@@ -53,7 +46,6 @@
 #include "MEM_sys_types.h"
 
 enum {
-
        empty_tag = 0x0,
        empty_index = 0xffffffff
 };
@@ -191,7 +183,7 @@ public:
                return (Tag() == Empty().Tag());
        }
        
-       // functionals 
+       /* functionals */
 
        struct greater : std::binary_function<CTR_TaggedIndex, CTR_TaggedIndex, bool>
        {
@@ -213,7 +205,6 @@ private :
        unsigned int m_val;
 
 
-};                     
-
-#endif
+};
 
+#endif  /* __CTR_TAGGEDINDEX_H__ */
index d30081d2d608cfc34f620e29b7f982fe63147cd4..6ebf20b77bfd230a2cfaa502d6e01a10a5359fd5 100644 (file)
  * type ObjectType must have the following public methods to be used by
  * this template class:
  *
- *     int
+ *  int
  * OpenTag(void) --- return a persistent tag value for the primitive
  *
- *     void
+ *  void
  * SetOpenTag(int bla) --- set the persistent tag value for this primitive to bla.
  *
- *     bool
+ *  bool
  * SelectTag() --- return a persistent boolean tag for this primitive
  *
- *     void
+ *  void
  * SetSelectTag(bool bla) --- set the persistent boolean tag for this primitive to bla.
  *
  * Here persistent means that the tag should be associated with the object for the
@@ -86,16 +86,16 @@ public :
                unsigned int shift
        ) {
 
-               // iterate through vectors in index_list
-               // iterate through individual members of each vector
-               // mark each obejct that the index points to 
+               /* iterate through vectors in index_list
+                * iterate through individual members of each vector
+                * mark each obejct that the index points to */
 
                typename std::vector< std::vector<IndexType> >::const_iterator 
                        last_vector = index_list.end();
                typename std::vector< std::vector<IndexType> >::const_iterator 
                        start_vector = index_list.begin();
 
-               // FIXME some temporary space
+               /* FIXME some temporary space */
 
                std::vector<IndexType> temp_union;
                temp_union.reserve(64);
@@ -114,7 +114,7 @@ public :
                                ObjectType & prim = primitives[*start_index];
 
                                if (!prim.OpenTag()) {
-                                       // compute the union
+                                       /* compute the union */
                                        temp_union.push_back(*start_index);
                                }
                                int tag = prim.OpenTag();
@@ -126,7 +126,7 @@ public :
                        ++tag_num;
                }
                                
-               // now iterate through the union and pull out all those with the right tag
+               /* now iterate through the union and pull out all those with the right tag */
                
                typename std::vector<IndexType>::const_iterator last_index = 
                        temp_union.end();
@@ -138,20 +138,20 @@ public :
                        ObjectType & prim = primitives[*start_index];
 
                        if (prim.OpenTag() == tag_num) {
-                               //it's part of the intersection!
+                               /* it's part of the intersection! */
 
                                output.push_back(*start_index);
-                               // because we're iterating through the union 
-                               // it's safe to remove the tag at this point
+                               /* because we're iterating through the union
+                                * it's safe to remove the tag at this point */
 
                                prim.SetOpenTag(prim.OpenTag() & ~mask);
                        }
                }
        };
                
-       // note not a strict set intersection!
-       // if x appears twice in b and is part of the intersection
-       // it will appear twice in the intersection
+       /* note not a strict set intersection!
+        * if x appears twice in b and is part of the intersection
+        * it will appear twice in the intersection */
 
        static
                void
@@ -180,7 +180,7 @@ public :
                                output.push_back(*start_index);
                        }
                }
-               // deselect
+               /* deselect */
                last_index = a.end();
                start_index = a.begin();
 
@@ -199,9 +199,9 @@ public :
                std::vector<IndexType> &output
        ) {
        
-               // iterate through vectors in index_list
-               // iterate through individual members of each vector
-               // mark each obejct that the index points to 
+               /* iterate through vectors in index_list
+                * iterate through individual members of each vector
+                * mark each obejct that the index points to */
 
                typename std::vector< std::vector<IndexType> >::const_iterator 
                        last_vector = index_list.end();
@@ -220,15 +220,15 @@ public :
                                ObjectType & prim = primitives[*start_index];
 
                                if (!prim.SelectTag()) {
-                                       // compute the union
+                                       /* compute the union */
                                        output.push_back(*start_index);
                                        prim.SetSelectTag(true);
                                }
                        }
                }
                                
-               // now iterate through the union and reset the tags
-               
+               /* now iterate through the union and reset the tags */
+
                typename std::vector<IndexType>::const_iterator last_index = 
                        output.end();
                typename std::vector<IndexType>::iterator start_index = 
@@ -238,7 +238,7 @@ public :
 
                        ObjectType & prim = primitives[*start_index];
                        prim.SetSelectTag(false);
-               }                       
+               }
        }
 
 
@@ -251,8 +251,8 @@ public :
                std::vector< IndexType> &output
        ) {
 
-               // iterate through b mark all
-               // iterate through a and add to output all unmarked 
+               /* iterate through b mark all
+                * iterate through a and add to output all unmarked */
 
                typename std::vector<IndexType>::const_iterator last_index = 
                        b.end();
@@ -276,7 +276,7 @@ public :
                        }
                }
 
-               // clean up the tags
+               /* clean up the tags */
        
                last_index = b.end();
                start_index = b.begin();
@@ -290,12 +290,11 @@ public :
 
 private :
 
-       // private constructor - this class is not meant for
-       // instantiation
+       /* private constructor - this class is not meant for
+        * instantiation */
 
        CTR_TaggedSetOps();
 
 };
 
-#endif
-
+#endif  /* __CTR_TAGGEDSETOPS_H__ */
index aafc7fe89b46af75994658f07e94dc50157e4147..43f795eeee5ca7c20472d67f923484e8c0fd8fab 100644 (file)
@@ -956,7 +956,8 @@ void boid_brain(BoidBrainData *bbd, int p, ParticleData *pa)
        //      }
        //}
 
-       bbd->wanted_co[0]=bbd->wanted_co[1]=bbd->wanted_co[2]=bbd->wanted_speed=0.0f;
+       zero_v3(bbd->wanted_co);
+       bbd->wanted_speed = 0.0f;
 
        /* create random seed for every particle & frame */
        rand = (int)(PSYS_FRAND(psys->seed + p) * 1000);
@@ -990,7 +991,8 @@ void boid_brain(BoidBrainData *bbd, int p, ParticleData *pa)
                                        add_v3_v3(wanted_co, bbd->wanted_co);
                                        wanted_speed += bbd->wanted_speed;
                                        n++;
-                                       bbd->wanted_co[0]=bbd->wanted_co[1]=bbd->wanted_co[2]=bbd->wanted_speed=0.0f;
+                                       zero_v3(bbd->wanted_co);
+                                       bbd->wanted_speed = 0.0f;
                                }
                        }
 
@@ -1266,9 +1268,9 @@ void boid_body(BoidBrainData *bbd, ParticleData *pa)
                {
                        float grav[3];
 
-                       grav[0]= 0.0f;
-                       grav[1]= 0.0f;
-                       grav[2]= bbd->sim->scene->physics_settings.gravity[2] < 0.0f ? -1.0f : 0.0f;
+                       grav[0] = 0.0f;
+                       grav[1] = 0.0f;
+                       grav[2] = bbd->sim->scene->physics_settings.gravity[2] < 0.0f ? -1.0f : 0.0f;
 
                        /* don't take forward acceleration into account (better banking) */
                        if (dot_v3v3(bpa->data.acc, pa->state.vel) > 0.0f) {
@@ -1309,9 +1311,9 @@ void boid_body(BoidBrainData *bbd, ParticleData *pa)
                {
                        float grav[3];
 
-                       grav[0]= 0.0f;
-                       grav[1]= 0.0f;
-                       grav[2]= bbd->sim->scene->physics_settings.gravity[2] < 0.0f ? -1.0f : 0.0f;
+                       grav[0] = 0.0f;
+                       grav[1] = 0.0f;
+                       grav[2] = bbd->sim->scene->physics_settings.gravity[2] < 0.0f ? -1.0f : 0.0f;
 
 
                        /* gather apparent gravity */
index 4e00e1bce0bd69d927fba13669254c0c0d1702ea..88dfb4577d5d2b391ccf657648d0ba3b7e835264 100644 (file)
@@ -824,7 +824,7 @@ static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *d
        int i = 0;
        MVert *mvert = NULL;
        ClothVertex *verts = NULL;
-       float (*shapekey_rest)[3]= NULL;
+       float (*shapekey_rest)[3] = NULL;
        float tnull[3] = {0, 0, 0};
        Cloth *cloth = NULL;
        float maxdist = 0;
index 9b2439d285a7bbb5ef06ef66ecc1e9ad95df965c..88490dbb96024a214116b307daf7a30673c6ee02 100644 (file)
@@ -828,7 +828,7 @@ static void do_physical_effector(EffectorCache *eff, EffectorData *efd, Effected
 {
        PartDeflect *pd = eff->pd;
        RNG *rng = pd->rng;
-       float force[3]={0, 0, 0};
+       float force[3] = {0, 0, 0};
        float temp[3];
        float fac;
        float strength = pd->f_strength;
@@ -1020,7 +1020,7 @@ void pdDoEffectors(ListBase *effectors, ListBase *colliders, EffectorWeights *we
                                        do_texture_effector(eff, &efd, point, force);
                                }
                                else {
-                                       float temp1[3]={0, 0, 0}, temp2[3];
+                                       float temp1[3] = {0, 0, 0}, temp2[3];
                                        copy_v3_v3(temp1, force);
 
                                        do_physical_effector(eff, &efd, point, force);
index d1ef5d7376b518b95db44c20748b4349472cff06..9201ac463e340b02c921ed843b8caa98f04555b3 100644 (file)
@@ -1218,7 +1218,7 @@ DO_INLINE void cloth_calc_spring_force(ClothModifierData *clmd, ClothSpring *s,
        float stretch_force[3] = {0, 0, 0};
        float bending_force[3] = {0, 0, 0};
        float damping_force[3] = {0, 0, 0};
-       float nulldfdx[3][3]={ {0, 0, 0}, {0, 0, 0}, {0, 0, 0}};
+       float nulldfdx[3][3] = {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}};
        
        float scaling = 0.0;
 
@@ -1356,15 +1356,15 @@ static void CalcFloat( float *v1, float *v2, float *v3, float *n)
 {
        float n1[3], n2[3];
 
-       n1[0]= v1[0]-v2[0];
-       n2[0]= v2[0]-v3[0];
-       n1[1]= v1[1]-v2[1];
-       n2[1]= v2[1]-v3[1];
-       n1[2]= v1[2]-v2[2];
-       n2[2]= v2[2]-v3[2];
-       n[0]= n1[1]*n2[2]-n1[2]*n2[1];
-       n[1]= n1[2]*n2[0]-n1[0]*n2[2];
-       n[2]= n1[0]*n2[1]-n1[1]*n2[0];
+       n1[0] = v1[0]-v2[0];
+       n2[0] = v2[0]-v3[0];
+       n1[1] = v1[1]-v2[1];
+       n2[1] = v2[1]-v3[1];
+       n1[2] = v1[2]-v2[2];
+       n2[2] = v2[2]-v3[2];
+       n[0] = n1[1]*n2[2]-n1[2]*n2[1];
+       n[1] = n1[2]*n2[0]-n1[0]*n2[2];
+       n[2] = n1[0]*n2[1]-n1[1]*n2[0];
 }
 
 static void CalcFloat4( float *v1, float *v2, float *v3, float *v4, float *n)
@@ -1372,17 +1372,17 @@ static void CalcFloat4( float *v1, float *v2, float *v3, float *v4, float *n)
        /* real cross! */
        float n1[3], n2[3];
 
-       n1[0]= v1[0]-v3[0];
-       n1[1]= v1[1]-v3[1];
-       n1[2]= v1[2]-v3[2];
+       n1[0] = v1[0]-v3[0];
+       n1[1] = v1[1]-v3[1];
+       n1[2] = v1[2]-v3[2];
 
-       n2[0]= v2[0]-v4[0];
-       n2[1]= v2[1]-v4[1];
-       n2[2]= v2[2]-v4[2];
+       n2[0] = v2[0]-v4[0];
+       n2[1] = v2[1]-v4[1];
+       n2[2] = v2[2]-v4[2];
 
-       n[0]= n1[1]*n2[2]-n1[2]*n2[1];
-       n[1]= n1[2]*n2[0]-n1[0]*n2[2];
-       n[2]= n1[0]*n2[1]-n1[1]*n2[0];
+       n[0] = n1[1]*n2[2]-n1[2]*n2[1];
+       n[1] = n1[2]*n2[0]-n1[0]*n2[2];
+       n[2] = n1[0]*n2[1]-n1[1]*n2[0];
 }
 
 static float calculateVertexWindForce(float wind[3], float vertexnormal[3])  
@@ -1544,7 +1544,7 @@ static void cloth_calc_force(ClothModifierData *clmd, float UNUSED(frame), lfVec
        lfVector *winvec;
        EffectedPoint epoint;
 
-       tm2[0][0]= tm2[1][1]= tm2[2][2]= -spring_air;
+       tm2[0][0] = tm2[1][1] = tm2[2][2] = -spring_air;
        
        /* global acceleration (gravitation) */
        if (clmd->scene->physics_settings.flag & PHYS_GLOBAL_GRAVITY) {
@@ -1588,9 +1588,9 @@ static void cloth_calc_force(ClothModifierData *clmd, float UNUSED(frame), lfVec
                }
                
                for (i = 0; i < cloth->numfaces; i++) {
-                       float trinormal[3]={0, 0, 0}; // normalized triangle normal
-                       float triunnormal[3]={0, 0, 0}; // not-normalized-triangle normal
-                       float tmp[3]={0, 0, 0};
+                       float trinormal[3] = {0, 0, 0}; // normalized triangle normal
+                       float triunnormal[3] = {0, 0, 0}; // not-normalized-triangle normal
+                       float tmp[3] = {0, 0, 0};
                        float factor = (mfaces[i].v4) ? 0.25 : 1.0 / 3.0;
                        factor *= 0.02;
                        
@@ -1628,9 +1628,9 @@ static void cloth_calc_force(ClothModifierData *clmd, float UNUSED(frame), lfVec
                /* Hair has only edges */
                if (cloth->numfaces == 0) {
                        ClothSpring *spring;
-                       float edgevec[3]={0, 0, 0}; //edge vector
-                       float edgeunnormal[3]={0, 0, 0}; // not-normalized-edge normal
-                       float tmp[3]={0, 0, 0};
+                       float edgevec[3] = {0, 0, 0}; //edge vector
+                       float edgeunnormal[3] = {0, 0, 0}; // not-normalized-edge normal
+                       float tmp[3] = {0, 0, 0};
                        float factor = 0.01;
 
                        search = cloth->springs;
index 83e7274dfc9871d6c26564ee4b590d832c65e916..2f5e48e0ac66d74e0cc9167b778a41cc9fbb57b3 100644 (file)
@@ -1200,7 +1200,7 @@ static int check_for_dupid(ListBase *lb, ID *id, char *name)
        char left[MAX_ID_NAME + 8], leftest[MAX_ID_NAME + 8];
 
        /* make sure input name is terminated properly */
-       /* if ( strlen(name) > MAX_ID_NAME-3 ) name[MAX_ID_NAME-3]= 0; */
+       /* if ( strlen(name) > MAX_ID_NAME-3 ) name[MAX_ID_NAME-3] = 0; */
        /* removed since this is only ever called from one place - campbell */
 
        while (1) {
index 2f04df06d6684056bfc9e613e75a86233cc2cec2..ea3179562559beea048c51c37c0169794b855c6d 100644 (file)
@@ -1159,7 +1159,7 @@ void material_drivers_update(Scene *scene, Material *ma, float ctime)
        
 /* ****************** */
 #if 0 /* UNUSED */
-static char colname_array[125][20]= {
+static char colname_array[125][20] = {
 "Black", "DarkRed", "HalfRed", "Red", "Red",
 "DarkGreen", "DarkOlive", "Brown", "Chocolate", "OrangeRed",
 "HalfGreen", "GreenOlive", "DryOlive", "Goldenrod", "DarkOrange",
index c1501ccc359856997ef5f05700767141f44d6462..d3f416b34ae3b622f487db6aaf5eccd7872b1acb 100644 (file)
@@ -369,10 +369,10 @@ void psys_calc_dmcache(Object *ob, DerivedMesh *dm, ParticleSystem *psys)
                                if (nodearray[*origindex]) {
                                        /* prepend */
                                        node->next = nodearray[*origindex];
-                                       nodearray[*origindex]= node;
+                                       nodearray[*origindex] = node;
                                }
                                else
-                                       nodearray[*origindex]= node;
+                                       nodearray[*origindex] = node;
                        }
                }
                
@@ -633,8 +633,8 @@ static void hammersley_create(float *out, int n, int seed, float amount)
        int k, kk;
 
        rng = rng_new(31415926 + n + seed);
-       offs[0]= rng_getDouble(rng) + (double)amount;
-       offs[1]= rng_getDouble(rng) + (double)amount;
+       offs[0] = rng_getDouble(rng) + (double)amount;
+       offs[1] = rng_getDouble(rng) + (double)amount;
        rng_free(rng);
 
        for (k = 0; k < n; k++) {
@@ -643,8 +643,8 @@ static void hammersley_create(float *out, int n, int seed, float amount)
                        if (kk & 1) /* kk mod 2 = 1 */
                                t += p;
 
-               out[2*k + 0]= fmod((double)k/(double)n + offs[0], 1.0);
-               out[2*k + 1]= fmod(t + offs[1], 1.0);
+               out[2*k + 0] = fmod((double)k/(double)n + offs[0], 1.0);
+               out[2*k + 1] = fmod(t + offs[1], 1.0);
        }
 }
 
@@ -666,8 +666,8 @@ static void init_mv_jit(float *jit, int num, int seed2, float amount)
                num2 = 2 * num;
        for (i=0; i<num2; i+=2) {
        
-               jit[i]= x + amount*rad1*(0.5f - rng_getFloat(rng));
-               jit[i+1]= i/(2.0f*num) + amount*rad1*(0.5f - rng_getFloat(rng));
+               jit[i] = x + amount*rad1*(0.5f - rng_getFloat(rng));
+               jit[i+1] = i/(2.0f*num) + amount*rad1*(0.5f - rng_getFloat(rng));
                
                jit[i]-= (float)floor(jit[i]);
                jit[i+1]-= (float)floor(jit[i+1]);
@@ -698,21 +698,21 @@ static void psys_uv_to_w(float u, float v, int quad, float *w)
                        u= 1.0f-u;
        }
 
-       vert[0][0]= 0.0f; vert[0][1]= 0.0f; vert[0][2]= 0.0f;
-       vert[1][0]= 1.0f; vert[1][1]= 0.0f; vert[1][2]= 0.0f;
-       vert[2][0]= 1.0f; vert[2][1]= 1.0f; vert[2][2]= 0.0f;
+       vert[0][0] = 0.0f; vert[0][1] = 0.0f; vert[0][2] = 0.0f;
+       vert[1][0] = 1.0f; vert[1][1] = 0.0f; vert[1][2] = 0.0f;
+       vert[2][0] = 1.0f; vert[2][1] = 1.0f; vert[2][2] = 0.0f;
 
-       co[0]= u;
-       co[1]= v;
-       co[2]= 0.0f;
+       co[0] = u;
+       co[1] = v;
+       co[2] = 0.0f;
 
        if (quad) {
-               vert[3][0]= 0.0f; vert[3][1]= 1.0f; vert[3][2]= 0.0f;
+               vert[3][0] = 0.0f; vert[3][1] = 1.0f; vert[3][2] = 0.0f;
                interp_weights_poly_v3( w,vert, 4, co);
        }
        else {
                interp_weights_poly_v3( w,vert, 3, co);
-               w[3]= 0.0f;
+               w[3] = 0.0f;
        }
 }
 
@@ -1000,7 +1000,7 @@ static void distribute_invalid(Scene *scene, ParticleSystem *psys, int from)
 
                if (psys->child && totchild) {
                        for (p=0,cpa=psys->child; p<totchild; p++,cpa++) {
-                               cpa->fuv[0]=cpa->fuv[1]=cpa->fuv[2]=cpa->fuv[3]= 0.0;
+                               cpa->fuv[0]=cpa->fuv[1]=cpa->fuv[2]=cpa->fuv[3] = 0.0;
                                cpa->foffset= 0.0f;
                                cpa->parent=0;
                                cpa->pa[0]=cpa->pa[1]=cpa->pa[2]=cpa->pa[3]=0;
@@ -1011,7 +1011,7 @@ static void distribute_invalid(Scene *scene, ParticleSystem *psys, int from)
        else {
                PARTICLE_P;
                LOOP_PARTICLES {
-                       pa->fuv[0]=pa->fuv[1]=pa->fuv[2]= pa->fuv[3]= 0.0;
+                       pa->fuv[0] = pa->fuv[1] = pa->fuv[2] = pa->fuv[3] = 0.0;
                        pa->foffset= 0.0f;
                        pa->num= -1;
                }
@@ -1113,7 +1113,7 @@ static int distribute_threads_init_data(ParticleThread *threads, Scene *scene, D
 
                if (from == PART_FROM_VERT) {
                        MVert *mv= dm->getVertDataArray(dm, CD_MVERT);
-                       float (*orcodata)[3]= dm->getVertDataArray(dm, CD_ORCO);
+                       float (*orcodata)[3] = dm->getVertDataArray(dm, CD_ORCO);
                        int totvert = dm->getNumVerts(dm);
 
                        tree=BLI_kdtree_new(totvert);
@@ -1245,9 +1245,9 @@ static int distribute_threads_init_data(ParticleThread *threads, Scene *scene, D
        inv_totweight = (totweight > 0.f ? 1.f/totweight : 0.f);
 
        /* Calculate cumulative weights */
-       element_sum[0]= 0.0f;
+       element_sum[0] = 0.0f;
        for (i=0; i<totelem; i++)
-               element_sum[i+1]= element_sum[i] + element_weight[i] * inv_totweight;
+               element_sum[i+1] = element_sum[i] + element_weight[i] * inv_totweight;
        
        /* Finally assign elements to particles */
        if ((part->flag&PART_TRAND) || (part->simplify_flag&PART_SIMPLIFY_ENABLE)) {
@@ -1256,9 +1256,9 @@ static int distribute_threads_init_data(ParticleThread *threads, Scene *scene, D
                for (p=0; p<totpart; p++) {
                        /* In theory element_sum[totelem] should be 1.0, but due to float errors this is not necessarily always true, so scale pos accordingly. */
                        pos= BLI_frand() * element_sum[totelem];
-                       particle_element[p]= distribute_binary_search(element_sum, totelem, pos);
-                       particle_element[p]= MIN2(totelem-1, particle_element[p]);
-                       jitter_offset[particle_element[p]]= pos;
+                       particle_element[p] = distribute_binary_search(element_sum, totelem, pos);
+                       particle_element[p] = MIN2(totelem-1, particle_element[p]);
+                       jitter_offset[particle_element[p]] = pos;
                }
        }
        else {
@@ -1272,13 +1272,13 @@ static int distribute_threads_init_data(ParticleThread *threads, Scene *scene, D
                        while ((i < totelem) && (pos > element_sum[i+1]))
                                i++;
 
-                       particle_element[p]= MIN2(totelem-1, i);
+                       particle_element[p] = MIN2(totelem-1, i);
 
                        /* avoid zero weight face */
                        if (p == totpart-1 && element_weight[particle_element[p]] == 0.0f)
-                               particle_element[p]= particle_element[p-1];
+                               particle_element[p] = particle_element[p-1];
 
-                       jitter_offset[particle_element[p]]= pos;
+                       jitter_offset[particle_element[p]] = pos;
                }
        }
 
@@ -1622,9 +1622,9 @@ void psys_get_birth_coordinates(ParticleSimulationData *sim, ParticleData *pa, P
        ParticleSystem *psys = sim->psys;
        ParticleSettings *part;
        ParticleTexture ptex;
-       float fac, phasefac, nor[3]={0,0,0},loc[3],vel[3]={0.0,0.0,0.0},rot[4],q2[4];
-       float r_vel[3],r_ave[3],r_rot[4],vec[3],p_vel[3]={0.0,0.0,0.0};
-       float x_vec[3]={1.0,0.0,0.0}, utan[3]={0.0,1.0,0.0}, vtan[3]={0.0,0.0,1.0}, rot_vec[3]={0.0,0.0,0.0};
+       float fac, phasefac, nor[3] = {0,0,0},loc[3],vel[3] = {0.0,0.0,0.0},rot[4],q2[4];
+       float r_vel[3],r_ave[3],r_rot[4],vec[3],p_vel[3] = {0.0,0.0,0.0};
+       float x_vec[3] = {1.0,0.0,0.0}, utan[3] = {0.0,1.0,0.0}, vtan[3] = {0.0,0.0,1.0}, rot_vec[3] = {0.0,0.0,0.0};
        float q_phase[4];
        int p = pa - psys->particles;
        part=psys->part;
@@ -2736,7 +2736,7 @@ static void basic_integrate(ParticleSimulationData *sim, int p, float dfra, floa
 }
 static void basic_rotate(ParticleSettings *part, ParticleData *pa, float dfra, float timestep)
 {
-       float rotfac, rot1[4], rot2[4]={1.0,0.0,0.0,0.0}, dtime=dfra*timestep, extrotfac;
+       float rotfac, rot1[4], rot2[4] = {1.0,0.0,0.0,0.0}, dtime=dfra*timestep, extrotfac;
 
        if ((part->flag & PART_ROTATIONS) == 0) {
                unit_qt(pa->state.rot);
index 88f3eb1561072af1f2ab1ce60b691069366866d7..c9b923cde32147d6704acffe4a5975fbced48a96 100644 (file)
@@ -249,9 +249,9 @@ static int  ptcache_particle_write(int index, void *psys_v, void **data, int cfr
        if (data[BPHYS_DATA_INDEX] && (cfra < pa->time - step || cfra > pa->dietime + step))
                return 0;
 
-       times[0]= pa->time;
-       times[1]= pa->dietime;
-       times[2]= pa->lifetime;
+       times[0] = pa->time;
+       times[1] = pa->dietime;
+       times[2] = pa->lifetime;
 
        PTCACHE_DATA_FROM(data, BPHYS_DATA_INDEX, &index);
        PTCACHE_DATA_FROM(data, BPHYS_DATA_LOCATION, pa->state.co);
index 6c1fbbfa9a00267e7fae59d9987cab1f6a030d5e..eb4e0d9c67994165141b8b3b2e54eec3fecc386a 100644 (file)
@@ -552,7 +552,7 @@ void set_sca_new_poins_ob(Object *ob)
                if (sens->flag & SENS_NEW) {
                        for (a=0; a<sens->totlinks; a++) {
                                if (sens->links[a] && sens->links[a]->mynew)
-                                       sens->links[a]= sens->links[a]->mynew;
+                                       sens->links[a] = sens->links[a]->mynew;
                        }
                }
                sens= sens->next;
@@ -563,7 +563,7 @@ void set_sca_new_poins_ob(Object *ob)
                if (cont->flag & CONT_NEW) {
                        for (a=0; a<cont->totlinks; a++) {
                                if ( cont->links[a] && cont->links[a]->mynew)
-                                       cont->links[a]= cont->links[a]->mynew;
+                                       cont->links[a] = cont->links[a]->mynew;
                        }
                }
                cont= cont->next;
index f47c931e30945fcbc1aec083755f4d8562f3ddc6..8fea83b202e2a5de55196a734a98a45eb52af88e 100644 (file)
@@ -1598,7 +1598,7 @@ static void _scan_for_ext_spring_forces(Scene *scene, Object *ob, float timenow,
                                        /*see if we have wind*/
                                        if (do_effector) {
                                                EffectedPoint epoint;
-                                               float speed[3]={0.0f, 0.0f, 0.0f};
+                                               float speed[3] = {0.0f, 0.0f, 0.0f};
                                                float pos[3];
                                                mid_v3_v3v3(pos, sb->bpoint[bs->v1].pos, sb->bpoint[bs->v2].pos);
                                                mid_v3_v3v3(vel, sb->bpoint[bs->v1].vec, sb->bpoint[bs->v2].vec);
@@ -1749,8 +1749,8 @@ static int sb_detect_vertex_collisionCached(float opco[3], float facenormal[3],
        Object *ob= NULL;
        GHash *hash;
        GHashIterator *ihash;
-       float nv1[3], nv2[3], nv3[3], nv4[3], edge1[3], edge2[3], d_nvect[3], dv1[3], ve[3], avel[3]={0.0, 0.0, 0.0},
-             vv1[3], vv2[3], vv3[3], vv4[3], coledge[3]={0.0f, 0.0f, 0.0f}, mindistedge = 1000.0f,
+       float nv1[3], nv2[3], nv3[3], nv4[3], edge1[3], edge2[3], d_nvect[3], dv1[3], ve[3], avel[3] = {0.0, 0.0, 0.0},
+             vv1[3], vv2[3], vv3[3], vv4[3], coledge[3] = {0.0f, 0.0f, 0.0f}, mindistedge = 1000.0f,
              outerforceaccu[3], innerforceaccu[3],
              facedist, /* n_mag, */ /* UNUSED */ force_mag_norm, minx, miny, minz, maxx, maxy, maxz,
              innerfacethickness = -0.5f, outerfacethickness = 0.2f,
@@ -2209,7 +2209,7 @@ static int _softbody_calc_forces_slice_in_a_thread(Scene *scene, Object *ob, flo
        bp = &sb->bpoint[ifirst];
        for (bb=number_of_points_here; bb>0; bb--, bp++) {
                /* clear forces  accumulator */
-               bp->force[0]= bp->force[1]= bp->force[2]= 0.0;
+               bp->force[0] = bp->force[1] = bp->force[2] = 0.0;
                /* naive ball self collision */
                /* needs to be done if goal snaps or not */
                if (do_selfcollision) {
@@ -2304,8 +2304,8 @@ static int _softbody_calc_forces_slice_in_a_thread(Scene *scene, Object *ob, flo
                        if (do_effector) {
                                EffectedPoint epoint;
                                float kd;
-                               float force[3]= {0.0f, 0.0f, 0.0f};
-                               float speed[3]= {0.0f, 0.0f, 0.0f};
+                               float force[3] = {0.0f, 0.0f, 0.0f};
+                               float speed[3] = {0.0f, 0.0f, 0.0f};
                                float eval_sb_fric_force_scale = sb_fric_force_scale(ob); /* just for calling function once */
                                pd_point_from_soft(scene, bp->pos, bp->vec, sb->bpoint-bp, &epoint);
                                pdDoEffectors(do_effector, NULL, sb->effector_weights, &epoint, force, speed);
@@ -2557,7 +2557,7 @@ static void softbody_calc_forces(Scene *scene, Object *ob, float forcetime, floa
 
                for (a=sb->totpoint, bp= sb->bpoint; a>0; a--, bp++) {
                        /* clear forces  accumulator */
-                       bp->force[0]= bp->force[1]= bp->force[2]= 0.0;
+                       bp->force[0] = bp->force[1] = bp->force[2] = 0.0;
                        if (nl_flags & NLF_BUILD) {
                                //int ia =3*(sb->totpoint-a);
                                //int op =3*sb->totpoint;
@@ -2712,8 +2712,8 @@ static void softbody_calc_forces(Scene *scene, Object *ob, float forcetime, floa
                                /* particle field & vortex */
                                if (do_effector) {
                                        EffectedPoint epoint;
-                                       float force[3]= {0.0f, 0.0f, 0.0f};
-                                       float speed[3]= {0.0f, 0.0f, 0.0f};
+                                       float force[3] = {0.0f, 0.0f, 0.0f};
+                                       float speed[3] = {0.0f, 0.0f, 0.0f};
                                        float eval_sb_fric_force_scale = sb_fric_force_scale(ob); /* just for calling function once */
                                        pd_point_from_soft(scene, bp->pos, bp->vec, sb->bpoint-bp, &epoint);
                                        pdDoEffectors(do_effector, NULL, sb->effector_weights, &epoint, force, speed);
@@ -2905,7 +2905,7 @@ static void softbody_apply_forces(Object *ob, float forcetime, int mode, float *
        /* or heun ~ 2nd order runge-kutta steps, mode 1, 2 */
        SoftBody *sb= ob->soft; /* is supposed to be there */
        BodyPoint *bp;
-       float dx[3]={0}, dv[3], aabbmin[3], aabbmax[3], cm[3]={0.0f, 0.0f, 0.0f};
+       float dx[3] = {0}, dv[3], aabbmin[3], aabbmax[3], cm[3] = {0.0f, 0.0f, 0.0f};
        float timeovermass/*, freezeloc=0.00001f, freezeforce=0.00000000001f*/;
        float maxerrpos= 0.0f, maxerrvel = 0.0f;
        int a, fuzzy=0;
@@ -3865,7 +3865,7 @@ static void softbody_reset(Object *ob, SoftBody *sb, float (*vertexCos)[3], int
                copy_v3_v3(bp->origS, bp->pos);
                copy_v3_v3(bp->origE, bp->pos);
                copy_v3_v3(bp->origT, bp->pos);
-               bp->vec[0]= bp->vec[1]= bp->vec[2]= 0.0f;
+               bp->vec[0] = bp->vec[1] = bp->vec[2] = 0.0f;
 
                /* the bp->prev*'s are for rolling back from a canceled try to propagate in time
                 * adaptive step size algo in a nutshell:
index d3b1bdfa8fa05868a4f6d6f97c4582588d695855..42dca360f4cf07c9165ef612e61261e397b586b0 100644 (file)
@@ -122,6 +122,7 @@ static void heap_up(Heap *heap, unsigned int i)
 Heap *BLI_heap_new_ex(unsigned int tot_reserve)
 {
        Heap *heap = (Heap *)MEM_callocN(sizeof(Heap), __func__);
+       /* ensure we have at least one so we can keep doubling it */
        heap->bufsize = MAX2(1, tot_reserve);
        heap->tree = (HeapNode **)MEM_mallocN(heap->bufsize * sizeof(HeapNode *), "BLIHeapTree");
        heap->arena = BLI_memarena_new(1 << 16, "heap arena");
@@ -151,8 +152,8 @@ HeapNode *BLI_heap_insert(Heap *heap, float value, void *ptr)
 {
        HeapNode *node;
 
-       if ((heap->size + 1) > heap->bufsize) {
-               heap->bufsize = heap->bufsize * 2;
+       if (UNLIKELY((heap->size + 1) > heap->bufsize)) {
+               heap->bufsize *= 2;
                heap->tree = MEM_reallocN(heap->tree, heap->bufsize * sizeof(*heap->tree));
        }
 
@@ -199,8 +200,9 @@ void *BLI_heap_popmin(Heap *heap)
        heap->tree[0]->ptr = heap->freenodes;
        heap->freenodes = heap->tree[0];
 
-       if (heap->size == 1)
+       if (UNLIKELY(heap->size == 1)) {
                heap->size--;
+       }
        else {
                heap_swap(heap, 0, heap->size - 1);
                heap->size--;
index ce13a2782740bb74ad9a216e2dde95f3cd411a5e..70d9ef27734aa8907cac5e5d4f901804f9bfefde 100644 (file)
@@ -1679,34 +1679,34 @@ void vec_apply_track(float vec[3], short axis)
 
        switch (axis) {
                case 0: /* pos-x */
-                       /* vec[0]=  0.0; */
+                       /* vec[0] =  0.0; */
                        vec[1] = tvec[2];
                        vec[2] = -tvec[1];
                        break;
                case 1: /* pos-y */
-                       /* vec[0]= tvec[0]; */
-                       /* vec[1]=  0.0; */
-                       /* vec[2]= tvec[2]; */
+                       /* vec[0] = tvec[0]; */
+                       /* vec[1] =  0.0; */
+                       /* vec[2] = tvec[2]; */
                        break;
                case 2: /* pos-z */
-                       /* vec[0]= tvec[0]; */
-                       /* vec[1]= tvec[1]; */
-                       /* vec[2]=  0.0; */
+                       /* vec[0] = tvec[0]; */
+                       /* vec[1] = tvec[1]; */
+                       /* vec[2] =  0.0; */
                        break;
                case 3: /* neg-x */
-                       /* vec[0]=  0.0; */
+                       /* vec[0] =  0.0; */
                        vec[1] = tvec[2];
                        vec[2] = -tvec[1];
                        break;
                case 4: /* neg-y */
                        vec[0] = -tvec[2];
-                       /* vec[1]=  0.0; */
+                       /* vec[1] =  0.0; */
                        vec[2] = tvec[0];
                        break;
                case 5: /* neg-z */
                        vec[0] = -tvec[0];
                        vec[1] = -tvec[1];
-                       /* vec[2]=  0.0; */
+                       /* vec[2] =  0.0; */
                        break;
        }
 }
index 17b9ed7ea8dd3f81b10d8255b49f820f0ec756a2..2543a1637b266b12d6d3929cede5ae7bddbedb82 100644 (file)
@@ -214,7 +214,7 @@ size_t BLI_strncpy_wchar_as_utf8(char *dst, const wchar_t *src, const size_t max
                len += BLI_str_utf8_from_unicode(*src++, dst + len);
        }
 
-       dst[len]= '\0';
+       dst[len] = '\0';
 
        return len;
 }
index 7ba189d2a36ab4f632b004670f05c718eea14644..b6096ea278ef95dbfd88e1d10cad3ec99b2b3b5f 100644 (file)
@@ -2811,7 +2811,7 @@ static void lib_link_mball(FileData *fd, Main *main)
                        if (mb->adt) lib_link_animdata(fd, &mb->id, mb->adt);
                        
                        for (a = 0; a < mb->totcol; a++) 
-                               mb->mat[a]= newlibadr_us(fd, mb->id.lib, mb->mat[a]);
+                               mb->mat[a] = newlibadr_us(fd, mb->id.lib, mb->mat[a]);
                        
                        mb->ipo = newlibadr_us(fd, mb->id.lib, mb->ipo); // XXX deprecated - old animation system
                        
@@ -7271,10 +7271,10 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
                                        if ( (ob->dsize[i] == 0.0f) || /* simple case, user never touched dsize */
                                             (ob->size[i]  == 0.0f))   /* cant scale the dsize to give a non zero result, so fallback to 1.0f */
                                        {
-                                               ob->dscale[i]= 1.0f;
+                                               ob->dscale[i] = 1.0f;
                                        }
                                        else {
-                                               ob->dscale[i]= (ob->size[i] + ob->dsize[i]) / ob->size[i];
+                                               ob->dscale[i] = (ob->size[i] + ob->dsize[i]) / ob->size[i];
                                        }
                                }
                        }
index ad83b426c5128757218527ed6d9a0ad33c0932aa..a162187e2cd9cca8d4b27166a89bf91ea6b73537 100644 (file)
@@ -197,7 +197,7 @@ static WriteData *writedata_new(int file)
 
        if (wd == NULL) return NULL;
 
-       wd->sdna= DNA_sdna_from_data(DNAstr, DNAlen, 0);
+       wd->sdna = DNA_sdna_from_data(DNAstr, DNAlen, 0);
 
        wd->file= file;
 
@@ -2540,7 +2540,7 @@ static void write_bone(WriteData *wd, Bone *bone)
        Bone*   cbone;
 
        // PATCH for upward compatibility after 2.37+ armature recode
-       bone->size[0]= bone->size[1]= bone->size[2]= 1.0f;
+       bone->size[0] = bone->size[1] = bone->size[2] = 1.0f;
                
        // Write this bone
        writestruct(wd, DATA, "Bone", 1, bone);
index dbdd6008e8988504c8838f8d0e78137036f0f9e0..dd836c7c4fca86b53f6471286db0379b5997b36c 100644 (file)
@@ -876,6 +876,7 @@ void BM_mesh_decimate(BMesh *bm, const float factor)
 
        /* alloc vars */
        vquadrics = MEM_callocN(sizeof(Quadric) * bm->totvert, __func__);
+       /* since some edges may be degenerate, we might be over allocing a little here */
        eheap = BLI_heap_new_ex(bm->totedge);
        eheap_table = MEM_callocN(sizeof(HeapNode *) * bm->totedge, __func__);
        tot_edge_orig = bm->totedge;
index 1039453e93aff4664b1324465843d8c3e0b6d52b..d18c611166f050145b992990dabb8f532bbfb9f0 100644 (file)
@@ -628,8 +628,8 @@ static int ui_but_update_from_old_block(const bContext *C, uiBlock *block, uiBut
 //                             but->selend= oldbut->selend;
 //                             but->softmin= oldbut->softmin;
 //                             but->softmax= oldbut->softmax;
-//                             but->linkto[0]= oldbut->linkto[0];
-//                             but->linkto[1]= oldbut->linkto[1];
+//                             but->linkto[0] = oldbut->linkto[0];
+//                             but->linkto[1] = oldbut->linkto[1];
                                found = 1;
 //                             oldbut->active= NULL;
                        
index e8846b3236c18628a089ba5ed09dc6d2dedfa4d2..3b505f24d2de20a2930e32b4daa028e7c2f2d2f7 100644 (file)
@@ -603,7 +603,7 @@ static void foreach_mouse_hit_key(PEData *data, ForKeyMatFunc func, int selected
        ParticleSystemModifierData *psmd = NULL;
        ParticleEditSettings *pset= PE_settings(data->scene);
        POINT_P; KEY_K;
-       float mat[4][4]= MAT4_UNITY, imat[4][4]= MAT4_UNITY;
+       float mat[4][4] = MAT4_UNITY, imat[4][4] = MAT4_UNITY;
 
        if (edit->psys)
                psmd= psys_get_modifier(data->ob, edit->psys);
@@ -744,15 +744,15 @@ static void PE_update_mirror_cache(Object *ob, ParticleSystem *psys)
                psys_mat_hair_to_orco(ob, psmd->dm, psys->part->from, pa, mat);
                copy_v3_v3(co, key->co);
                mul_m4_v3(mat, co);
-               co[0]= -co[0];
+               co[0] = -co[0];
 
                index= BLI_kdtree_find_nearest(tree, co, NULL, &nearest);
 
                /* this needs a custom threshold still, duplicated for editmode mirror */
                if (index != -1 && index != p && (nearest.dist <= 0.0002f))
-                       edit->mirror_cache[p]= index;
+                       edit->mirror_cache[p] = index;
                else
-                       edit->mirror_cache[p]= -1;
+                       edit->mirror_cache[p] = -1;
        }
 
        /* make sure mirrors are in two directions */
@@ -760,7 +760,7 @@ static void PE_update_mirror_cache(Object *ob, ParticleSystem *psys)
                if (edit->mirror_cache[p]) {
                        index= edit->mirror_cache[p];
                        if (edit->mirror_cache[index] != p)
-                               edit->mirror_cache[p]= -1;
+                               edit->mirror_cache[p] = -1;
                }
        }
 
@@ -829,7 +829,7 @@ static void PE_mirror_particle(Object *ob, DerivedMesh *dm, ParticleSystem *psys
        for (k=0; k<pa->totkey; k++, hkey++, mhkey++, key++, mkey++) {
                copy_v3_v3(mhkey->co, hkey->co);
                mul_m4_v3(mat, mhkey->co);
-               mhkey->co[0]= -mhkey->co[0];
+               mhkey->co[0] = -mhkey->co[0];
                mul_m4_v3(immat, mhkey->co);
 
                if (key->flag & PEK_TAG)
@@ -986,9 +986,9 @@ static void pe_iterate_lengths(Scene *scene, PTCacheEdit *edit)
        PTCacheEditKey *key;
        int j, k;
        float tlen;
-       float dv0[3]= {0.0f, 0.0f, 0.0f};
-       float dv1[3]= {0.0f, 0.0f, 0.0f};
-       float dv2[3]= {0.0f, 0.0f, 0.0f};
+       float dv0[3] = {0.0f, 0.0f, 0.0f};
+       float dv1[3] = {0.0f, 0.0f, 0.0f};
+       float dv2[3] = {0.0f, 0.0f, 0.0f};
 
        if (edit==0 || (pset->flag & PE_KEEP_LENGTHS)==0)
                return;
@@ -1003,12 +1003,12 @@ static void pe_iterate_lengths(Scene *scene, PTCacheEdit *edit)
                        if (pset->flag & PE_LOCK_FIRST) {
                                key= point->keys + 1;
                                k= 1;
-                               dv1[0]= dv1[1]= dv1[2]= 0.0;
+                               dv1[0] = dv1[1] = dv1[2] = 0.0;
                        }
                        else {
                                key= point->keys;
                                k= 0;
-                               dv0[0]= dv0[1]= dv0[2]= 0.0;
+                               dv0[0] = dv0[1] = dv0[2] = 0.0;
                        }
 
                        for (; k<point->totkey; k++, key++) {
@@ -1527,8 +1527,8 @@ static int select_linked_exec(bContext *C, wmOperator *op)
        int location[2];
 
        RNA_int_get_array(op->ptr, "location", location);
-       mval[0]= location[0];
-       mval[1]= location[1];
+       mval[0] = location[0];
+       mval[1] = location[1];
 
        PE_set_view3d_data(C, &data);
        data.mval= mval;
@@ -1643,7 +1643,7 @@ int PE_lasso_select(bContext *C, const int mcords[][2], const short moves, short
        ParticleSystem *psys = edit->psys;
        ParticleSystemModifierData *psmd = psys_get_modifier(ob, psys);
        POINT_P; KEY_K;
-       float co[3], mat[4][4]= MAT4_UNITY;
+       float co[3], mat[4][4] = MAT4_UNITY;
        int screen_co[2];
 
        PEData data;
@@ -2535,7 +2535,7 @@ static void toggle_particle_cursor(bContext *C, int enable)
 
 enum { DEL_PARTICLE, DEL_KEY };
 
-static EnumPropertyItem delete_type_items[]= {
+static EnumPropertyItem delete_type_items[] = {
        {DEL_PARTICLE, "PARTICLE", 0, "Particle", ""},
        {DEL_KEY, "KEY", 0, "Key", ""},
        {0, NULL, 0, NULL, NULL}};
@@ -2691,10 +2691,10 @@ static void PE_mirror_x(Scene *scene, Object *ob, int tagged)
 
                        /* rotate weights according to vertex index rotation */
                        rotation= mirrorfaces[pa->num*2+1];
-                       newpa->fuv[0]= pa->fuv[2];
-                       newpa->fuv[1]= pa->fuv[1];
-                       newpa->fuv[2]= pa->fuv[0];
-                       newpa->fuv[3]= pa->fuv[3];
+                       newpa->fuv[0] = pa->fuv[2];
+                       newpa->fuv[1] = pa->fuv[1];
+                       newpa->fuv[2] = pa->fuv[0];
+                       newpa->fuv[3] = pa->fuv[3];
                        while (rotation-- > 0)
                                if (me->mface[pa->num].v4) {
                                        SHIFT4(float, newpa->fuv[0], newpa->fuv[1], newpa->fuv[2], newpa->fuv[3]);
@@ -3088,9 +3088,9 @@ static void intersect_dm_quad_weights(const float v1[3], const float v2[3], cons
        copy_v3_v3(vert[2], v3);
        copy_v3_v3(vert[3], v4);
 
-       co[0]= v1[0]*w[0] + v2[0]*w[1] + v3[0]*w[2] + v4[0]*w[3];
-       co[1]= v1[1]*w[0] + v2[1]*w[1] + v3[1]*w[2] + v4[1]*w[3];
-       co[2]= v1[2]*w[0] + v2[2]*w[1] + v3[2]*w[2] + v4[2]*w[3];
+       co[0] = v1[0]*w[0] + v2[0]*w[1] + v3[0]*w[2] + v4[0]*w[3];
+       co[1] = v1[1]*w[0] + v2[1]*w[1] + v3[1]*w[2] + v4[1]*w[3];
+       co[2] = v1[2]*w[0] + v2[2]*w[1] + v3[2]*w[2] + v4[2]*w[3];
 
        interp_weights_poly_v3(w, vert, 4, co);
 }
@@ -3198,10 +3198,10 @@ static int particle_intersect_dm(Scene *scene, Object *ob, DerivedMesh *dm,
                        if (isect_line_tri_v3(co1, co2, v1, v2, v3, &cur_d, cur_uv)) {
                                if (cur_d<*min_d) {
                                        *min_d=cur_d;
-                                       min_w[0]= 1.0f - cur_uv[0] - cur_uv[1];
-                                       min_w[1]= cur_uv[0];
-                                       min_w[2]= cur_uv[1];
-                                       min_w[3]= 0.0f;
+                                       min_w[0] = 1.0f - cur_uv[0] - cur_uv[1];
+                                       min_w[1] = cur_uv[0];
+                                       min_w[2] = cur_uv[1];
+                                       min_w[3] = 0.0f;
                                        if (mface->v4)
                                                intersect_dm_quad_weights(v1, v2, v3, v4, min_w);
                                        *min_face=i;
@@ -3212,10 +3212,10 @@ static int particle_intersect_dm(Scene *scene, Object *ob, DerivedMesh *dm,
                                if (isect_line_tri_v3(co1, co2, v1, v3, v4, &cur_d, cur_uv)) {
                                        if (cur_d<*min_d) {
                                                *min_d=cur_d;
-                                               min_w[0]= 1.0f - cur_uv[0] - cur_uv[1];
-                                               min_w[1]= 0.0f;
-                                               min_w[2]= cur_uv[0];
-                                               min_w[3]= cur_uv[1];
+                                               min_w[0] = 1.0f - cur_uv[0] - cur_uv[1];
+                                               min_w[1] = 0.0f;
+                                               min_w[2] = cur_uv[0];
+                                               min_w[3] = cur_uv[1];
                                                intersect_dm_quad_weights(v1, v2, v3, v4, min_w);
                                                *min_face=i;
                                                intersect=1;
@@ -3274,8 +3274,8 @@ static int brush_add(PEData *data, short number)
                        }
                }
 
-               mco[0]= data->mval[0] + dmx;
-               mco[1]= data->mval[1] + dmy;
+               mco[0] = data->mval[0] + dmx;
+               mco[1] = data->mval[1] + dmy;
                ED_view3d_win_to_segment_clip(data->vc.ar, data->vc.v3d, mco, co1, co2);
 
                mul_m4_v3(imat, co1);
@@ -3368,11 +3368,11 @@ static int brush_add(PEData *data, short number)
                                maxd= ptn[maxw-1].dist;
                                
                                for (w=0; w<maxw; w++) {
-                                       weight[w]= (float)pow(2.0, (double)(-6.0f * ptn[w].dist / maxd));
+                                       weight[w] = (float)pow(2.0, (double)(-6.0f * ptn[w].dist / maxd));
                                        totw += weight[w];
                                }
                                for (;w<3; w++) {
-                                       weight[w]= 0.0f;
+                                       weight[w] = 0.0f;
                                }
 
                                for (w=0; w<maxw; w++)
@@ -3506,15 +3506,15 @@ static void brush_edit_apply(bContext *C, wmOperator *op, PointerRNA *itemptr)
        flip= RNA_boolean_get(itemptr, "pen_flip");
 
        if (bedit->first) {
-               bedit->lastmouse[0]= mouse[0];
-               bedit->lastmouse[1]= mouse[1];
+               bedit->lastmouse[0] = mouse[0];
+               bedit->lastmouse[1] = mouse[1];
        }
 
        dx= mouse[0] - bedit->lastmouse[0];
        dy= mouse[1] - bedit->lastmouse[1];
 
-       mval[0]= mouse[0];
-       mval[1]= mouse[1];
+       mval[0] = mouse[0];
+       mval[1] = mouse[1];
 
 
        /* disable locking temporatily for disconnected hair */
@@ -3639,7 +3639,7 @@ static void brush_edit_apply(bContext *C, wmOperator *op, PointerRNA *itemptr)
                                        data.mval= mval;
                                        data.rad= (float)brush->size;
 
-                                       data.vec[0]= data.vec[1]= data.vec[2]= 0.0f;
+                                       data.vec[0] = data.vec[1] = data.vec[2] = 0.0f;
                                        data.tot= 0;
 
                                        data.smoothfac= brush->strength;
@@ -3693,8 +3693,8 @@ static void brush_edit_apply(bContext *C, wmOperator *op, PointerRNA *itemptr)
                        WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
                }
 
-               bedit->lastmouse[0]= mouse[0];
-               bedit->lastmouse[1]= mouse[1];
+               bedit->lastmouse[0] = mouse[0];
+               bedit->lastmouse[1] = mouse[1];
                bedit->first= 0;
        }
 
index a318837b5856509a819e2eaa5946fb1658394976..cf3f2ad741bde32f44eb210d9a3161e99dd31eff 100644 (file)
 #define IMAPAINT_CHAR_TO_FLOAT(c) ((c) / 255.0f)
 
 #define IMAPAINT_FLOAT_RGB_TO_CHAR(c, f)  {                                   \
-       (c)[0]= FTOCHAR((f)[0]);                                                  \
-       (c)[1]= FTOCHAR((f)[1]);                                                  \
-       (c)[2]= FTOCHAR((f)[2]);                                                  \
+       (c)[0] = FTOCHAR((f)[0]);                                                  \
+       (c)[1] = FTOCHAR((f)[1]);                                                  \
+       (c)[2] = FTOCHAR((f)[2]);                                                  \
 } (void)0
 #define IMAPAINT_FLOAT_RGBA_TO_CHAR(c, f)  {                                  \
-       (c)[0]= FTOCHAR((f)[0]);                                                  \
-       (c)[1]= FTOCHAR((f)[1]);                                                  \
-       (c)[2]= FTOCHAR((f)[2]);                                                  \
-       (c)[3]= FTOCHAR((f)[3]);                                                  \
+       (c)[0] = FTOCHAR((f)[0]);                                                  \
+       (c)[1] = FTOCHAR((f)[1]);                                                  \
+       (c)[2] = FTOCHAR((f)[2]);                                                  \
+       (c)[3] = FTOCHAR((f)[3]);                                                  \
 } (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_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_COPY(a, b) copy_v3_v3(a, b)
index 4adbce8f19cb50982890819cce268d4904275ebb..4b151734dc7a7b56d3426258b5014d42463789c0 100644 (file)
@@ -149,22 +149,22 @@ void make_unique_prop_names(bContext *C, char *str)
                ob= (Object *)idar[a];
                prop= ob->prop.first;
                while (prop) {
-                       names[nr++]= prop->name;
+                       names[nr++] = prop->name;
                        prop= prop->next;
                }
                sens= ob->sensors.first;
                while (sens) {
-                       names[nr++]= sens->name;
+                       names[nr++] = sens->name;
                        sens= sens->next;
                }
                cont= ob->controllers.first;
                while (cont) {
-                       names[nr++]= cont->name;
+                       names[nr++] = cont->name;
                        cont= cont->next;
                }
                act= ob->actuators.first;
                while (act) {
-                       names[nr++]= act->name;
+                       names[nr++] = act->name;
                        act= act->next;
                }
        }
@@ -697,13 +697,13 @@ static ID **get_selected_and_linked_obs(bContext *C, short *count, short scavisf
 
        /* make the active object always the first one of the list */
        if (obact) {
-               idar[0]= (ID *)obact;
+               idar[0] = (ID *)obact;
                nr++;
        }
 
        while (ob) {
                if ((ob->scavisflag) && (ob != obact)) {
-                       idar[nr]= (ID *)ob;
+                       idar[nr] = (ID *)ob;
                        nr++;
                }
                if (nr>=24) break;
index 1a50f72153adb54720bdd027aabe451acc4f1e02..4ee522952d4936c3bb46d071132b697228699211 100644 (file)
@@ -129,18 +129,18 @@ static SpaceLink *logic_new(const bContext *UNUSED(C))
        ar->v2d.cur.xmax = 1280.0f;
        ar->v2d.cur.ymax = 240.0f;
        
-       ar->v2d.min[0]= 1.0f;
-       ar->v2d.min[1]= 1.0f;
+       ar->v2d.min[0] = 1.0f;
+       ar->v2d.min[1] = 1.0f;
        
-       ar->v2d.max[0]= 32000.0f;
-       ar->v2d.max[1]= 32000.0f;
+       ar->v2d.max[0] = 32000.0f;
+       ar->v2d.max[1] = 32000.0f;
        
-       ar->v2d.minzoom= 0.5f;
-       ar->v2d.maxzoom= 1.21f;
+       ar->v2d.minzoom = 0.5f;
+       ar->v2d.maxzoom = 1.21f;
        
-       ar->v2d.scroll= (V2D_SCROLL_RIGHT|V2D_SCROLL_BOTTOM);
-       ar->v2d.keepzoom= V2D_LIMITZOOM|V2D_KEEPASPECT;
-       ar->v2d.keeptot= 0;
+       ar->v2d.scroll = (V2D_SCROLL_RIGHT | V2D_SCROLL_BOTTOM);
+       ar->v2d.keepzoom = V2D_LIMITZOOM | V2D_KEEPASPECT;
+       ar->v2d.keeptot = 0;
        
        
        return (SpaceLink *)slogic;
index c603605aa0e0558bba1f48e994d4003b10d8d44c..c506abd9bd3c070eb2a96808becf3de23fb59498 100644 (file)
@@ -636,7 +636,7 @@ static void draw_mesh_text(Scene *scene, Object *ob, int glsl)
        int a, totpoly = me->totpoly;
 
        /* fake values to pass to GPU_render_text() */
-       MCol tmp_mcol[4]  = {{0}};
+       MCol  tmp_mcol[4]  = {{0}};
        MCol *tmp_mcol_pt  = mloopcol ? tmp_mcol : NULL;
        MTFace tmp_tf      = {{{0}}};
 
index 0f0a5d2b9a3a10b42f2fe7e3afbcfe956e48a992..4babb03f374bcbcab3bd5313dbb7699847a876a6 100644 (file)
@@ -795,8 +795,8 @@ static int flyApply(bContext *C, FlyInfo *fly)
        ymargin = ar->winy / 20.0f;
 
        // UNUSED
-       // cent_orig[0]= ar->winrct.xmin + ar->winx/2;
-       // cent_orig[1]= ar->winrct.ymin + ar->winy/2;
+       // cent_orig[0] = ar->winrct.xmin + ar->winx / 2;
+       // cent_orig[1] = ar->winrct.ymin + ar->winy / 2;
 
        {
 
index 20f7bb44e92a025aea33e11faefd75ee2e755ae7..2d1549ff48782892eaf3ea00a3f959272c42060b 100644 (file)
@@ -35,8 +35,8 @@
 
 struct SDNA;
 
-extern unsigned char DNAstr[];  /* DNA.c */
-extern int DNAlen;
+extern const unsigned char DNAstr[];  /* DNA.c */
+extern const int DNAlen;
 
 typedef enum eSDNA_Type {
        SDNA_TYPE_CHAR     = 0,
@@ -56,7 +56,7 @@ typedef enum eSDNA_Type {
 /* define so switch statements don't complain */
 #define SDNA_TYPE_VOID 9
 
-struct SDNA *DNA_sdna_from_data(void *data, int datalen, int do_endian_swap);
+struct SDNA *DNA_sdna_from_data(const void *data, const int datalen, int do_endian_swap);
 void DNA_sdna_free(struct SDNA *sdna);
 
 int DNA_struct_find_nr(struct SDNA *sdna, const char *str);
index e37da0e7d21ad8208932dc34a2ca07cb933034f7..10c3b0bbee469785ae6bb3172070638f22ec8479 100644 (file)
@@ -506,7 +506,7 @@ static void init_structDNA(SDNA *sdna, int do_endian_swap)
        }
 }
 
-SDNA *DNA_sdna_from_data(void *data, int datalen, int do_endian_swap)
+SDNA *DNA_sdna_from_data(const void *data, const int datalen, int do_endian_swap)
 {
        SDNA *sdna = MEM_mallocN(sizeof(*sdna), "sdna");
        
index 72e34fe72286dadc044015b9f03d575dbdaf58b4..77d2b00dfc2b23ec82efdd4a12b527550ecb9828 100644 (file)
@@ -1174,7 +1174,7 @@ int main(int argc, char **argv)
                                strcpy(baseDirectory, BASE_HEADER);
                        }
 
-                       fprintf(file, "unsigned char DNAstr[]= {\n");
+                       fprintf(file, "const unsigned char DNAstr[] = {\n");
                        if (make_structDNA(baseDirectory, file)) {
                                /* error */
                                fclose(file);
@@ -1183,7 +1183,7 @@ int main(int argc, char **argv)
                        }
                        else {
                                fprintf(file, "};\n");
-                               fprintf(file, "int DNAlen = sizeof(DNAstr);\n");
+                               fprintf(file, "const int DNAlen = sizeof(DNAstr);\n");
        
                                fclose(file);
                        }
index 3387eaf679be0a14871de03e83a33a40dd6d3650..49da4ec22a0486887949f8a3bd9b98d9ad1952d6 100644 (file)
@@ -475,7 +475,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
                                                        /*printf("\t\tVERT: %i\n", lt_iter.v);*/
                                                        if (lt_iter.v_poin->flag) {
                                                                /*printf("\t\t\tBreaking Found end\n");*/
-                                                               //endpoints[0]= endpoints[1]= -1;
+                                                               //endpoints[0] = endpoints[1] = -1;
                                                                ed_loop_closed = 1; /* circle */
                                                                break;
                                                        }
@@ -490,7 +490,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
                                                        screwvert_iter_step(&lt_iter);
                                                        if (!lt_iter.v_poin) {
                                                                /*printf("\t\t\tFound End Also Num %i\n", j);*/
-                                                               /*endpoints[j]= lt_iter.v_other;*/ /* other is still valid */
+                                                               /*endpoints[j] = lt_iter.v_other;*/ /* other is still valid */
                                                                break;
                                                        }
                                                }
index 9e9810e2770dd813e43a30df3529d1b895741e06..57eb99021f640616fd9f21af7cbc42c891ab4c66 100644 (file)
@@ -213,53 +213,53 @@ void typecheck_compbuf_color(float *out, float *in, int outtype, int intype)
        }
        else if (outtype==CB_VEC2) {
                if (intype==CB_VAL) {
-                       out[0]= in[0];
-                       out[1]= in[0];
+                       out[0] = in[0];
+                       out[1] = in[0];
                }
                else if (intype==CB_VEC3) {
-                       out[0]= in[0];
-                       out[1]= in[1];
+                       out[0] = in[0];
+                       out[1] = in[1];
                }
                else if (intype==CB_RGBA) {
-                       out[0]= in[0];
-                       out[1]= in[1];
+                       out[0] = in[0];
+                       out[1] = in[1];
                }
        }
        else if (outtype==CB_VEC3) {
                if (intype==CB_VAL) {
-                       out[0]= in[0];
-                       out[1]= in[0];
-                       out[2]= in[0];
+                       out[0] = in[0];
+                       out[1] = in[0];
+                       out[2] = in[0];
                }
                else if (intype==CB_VEC2) {
-                       out[0]= in[0];
-                       out[1]= in[1];
-                       out[2]= 0.0f;
+                       out[0] = in[0];
+                       out[1] = in[1];
+                       out[2] = 0.0f;
                }
                else if (intype==CB_RGBA) {
-                       out[0]= in[0];
-                       out[1]= in[1];
-                       out[2]= in[2];
+                       out[0] = in[0];
+                       out[1] = in[1];
+                       out[2] = in[2];
                }
        }
        else if (outtype==CB_RGBA) {
                if (intype==CB_VAL) {
-                       out[0]= in[0];
-                       out[1]= in[0];
-                       out[2]= in[0];
-                       out[3]= 1.0f;
+                       out[0] = in[0];
+                       out[1] = in[0];
+                       out[2] = in[0];
+                       out[3] = 1.0f;
                }
                else if (intype==CB_VEC2) {
-                       out[0]= in[0];
-                       out[1]= in[1];
-                       out[2]= 0.0f;
-                       out[3]= 1.0f;
+                       out[0] = in[0];
+                       out[1] = in[1];
+                       out[2] = 0.0f;
+                       out[3] = 1.0f;
                }
                else if (intype==CB_VEC3) {
-                       out[0]= in[0];
-                       out[1]= in[1];
-                       out[2]= in[2];
-                       out[3]= 1.0f;
+                       out[0] = in[0];
+                       out[1] = in[1];
+                       out[2] = in[2];
+                       out[3] = 1.0f;
                }
        }
 }
@@ -307,69 +307,69 @@ CompBuf *typecheck_compbuf(CompBuf *inbuf, int type)
                else if (type==CB_VEC2) {
                        if (inbuf->type==CB_VAL) {
                                for (; x>0; x--, outrf+= 2, inrf+= 1) {
-                                       outrf[0]= inrf[0];
-                                       outrf[1]= inrf[0];
+                                       outrf[0] = inrf[0];
+                                       outrf[1] = inrf[0];
                                }
                        }
                        else if (inbuf->type==CB_VEC3) {
                                for (; x>0; x--, outrf+= 2, inrf+= 3) {
-                                       outrf[0]= inrf[0];
-                                       outrf[1]= inrf[1];
+                                       outrf[0] = inrf[0];
+                                       outrf[1] = inrf[1];
                                }
                        }
                        else if (inbuf->type==CB_RGBA) {
                                for (; x>0; x--, outrf+= 2, inrf+= 4) {
-                                       outrf[0]= inrf[0];
-                                       outrf[1]= inrf[1];
+                                       outrf[0] = inrf[0];
+                                       outrf[1] = inrf[1];
                                }
                        }
                }
                else if (type==CB_VEC3) {
                        if (inbuf->type==CB_VAL) {
                                for (; x>0; x--, outrf+= 3, inrf+= 1) {
-                                       outrf[0]= inrf[0];
-                                       outrf[1]= inrf[0];
-                                       outrf[2]= inrf[0];
+                                       outrf[0] = inrf[0];
+                                       outrf[1] = inrf[0];
+                                       outrf[2] = inrf[0];
                                }
                        }
                        else if (inbuf->type==CB_VEC2) {
                                for (; x>0; x--, outrf+= 3, inrf+= 2) {
-                                       outrf[0]= inrf[0];
-                                       outrf[1]= inrf[1];
-                                       outrf[2]= 0.0f;
+                                       outrf[0] = inrf[0];
+                                       outrf[1] = inrf[1];
+                                       outrf[2] = 0.0f;
                                }
                        }
                        else if (inbuf->type==CB_RGBA) {
                                for (; x>0; x--, outrf+= 3, inrf+= 4) {
-                                       outrf[0]= inrf[0];
-                                       outrf[1]= inrf[1];
-                                       outrf[2]= inrf[2];
+                                       outrf[0] = inrf[0];
+                                       outrf[1] = inrf[1];
+                                       outrf[2] = inrf[2];
                                }
                        }
                }
                else if (type==CB_RGBA) {
                        if (inbuf->type==CB_VAL) {
                                for (; x>0; x--, outrf+= 4, inrf+= 1) {
-                                       outrf[0]= inrf[0];
-                                       outrf[1]= inrf[0];
-                                       outrf[2]= inrf[0];
-                                       outrf[3]= 1.0f;
+                                       outrf[0] = inrf[0];
+                                       outrf[1] = inrf[0];
+                                       outrf[2] = inrf[0];
+                                       outrf[3] = 1.0f;
                                }
                        }
                        else if (inbuf->type==CB_VEC2) {
                                for (; x>0; x--, outrf+= 4, inrf+= 2) {
-                                       outrf[0]= inrf[0];
-                                       outrf[1]= inrf[1];
-                                       outrf[2]= 0.0f;
-                                       outrf[3]= 1.0f;
+                                       outrf[0] = inrf[0];
+                                       outrf[1] = inrf[1];
+                                       outrf[2] = 0.0f;
+                                       outrf[3] = 1.0f;
                                }
                        }
                        else if (inbuf->type==CB_VEC3) {
                                for (; x>0; x--, outrf+= 4, inrf+= 3) {
-                                       outrf[0]= inrf[0];
-                                       outrf[1]= inrf[1];
-                                       outrf[2]= inrf[2];
-                                       outrf[3]= 1.0f;
+                                       outrf[0] = inrf[0];
+                                       outrf[1] = inrf[1];
+                                       outrf[2] = inrf[2];
+                                       outrf[3] = 1.0f;
                                }
                        }
                }
@@ -387,7 +387,7 @@ float *compbuf_get_pixel(CompBuf *cbuf, float *defcol, float *use, int x, int y,
                        return use;
                }
                else {
-                       static float col[4]= {0.0f, 0.0f, 0.0f, 0.0f};
+                       static float col[4] = {0.0f, 0.0f, 0.0f, 0.0f};
                        
                        /* map coords */
                        x-= cbuf->xof;
@@ -707,18 +707,18 @@ void do_copy_rgba(bNode *UNUSED(node), float *out, float *in)
 void do_copy_rgb(bNode *UNUSED(node), float *out, float *in)
 {
        copy_v3_v3(out, in);
-       out[3]= 1.0f;
+       out[3] = 1.0f;
 }
 
 void do_copy_value(bNode *UNUSED(node), float *out, float *in)
 {
-       out[0]= in[0];
+       out[0] = in[0];
 }
 
 void do_copy_a_rgba(bNode *UNUSED(node), float *out, float *in, float *fac)
 {
        copy_v3_v3(out, in);
-       out[3]= *fac;
+       out[3] = *fac;
 }
 
 /* only accepts RGBA buffers */
@@ -732,16 +732,16 @@ void gamma_correct_compbuf(CompBuf *img, int inversed)
        drect= img->rect;
        if (inversed) {
                for (x=img->x*img->y; x>0; x--, drect+=4) {
-                       if (drect[0]>0.0f) drect[0]= sqrt(drect[0]); else drect[0]= 0.0f;
-                       if (drect[1]>0.0f) drect[1]= sqrt(drect[1]); else drect[1]= 0.0f;
-                       if (drect[2]>0.0f) drect[2]= sqrt(drect[2]); else drect[2]= 0.0f;
+                       if (drect[0]>0.0f) drect[0] = sqrt(drect[0]); else drect[0] = 0.0f;
+                       if (drect[1]>0.0f) drect[1] = sqrt(drect[1]); else drect[1] = 0.0f;
+                       if (drect[2]>0.0f) drect[2] = sqrt(drect[2]); else drect[2] = 0.0f;
                }
        }
        else {
                for (x=img->x*img->y; x>0; x--, drect+=4) {
-                       if (drect[0]>0.0f) drect[0]*= drect[0]; else drect[0]= 0.0f;
-                       if (drect[1]>0.0f) drect[1]*= drect[1]; else drect[1]= 0.0f;
-                       if (drect[2]>0.0f) drect[2]*= drect[2]; else drect[2]= 0.0f;
+                       if (drect[0]>0.0f) drect[0]*= drect[0]; else drect[0] = 0.0f;
+                       if (drect[1]>0.0f) drect[1]*= drect[1]; else drect[1] = 0.0f;
+                       if (drect[2]>0.0f) drect[2]*= drect[2]; else drect[2] = 0.0f;
                }
        }
 }
@@ -757,9 +757,9 @@ void premul_compbuf(CompBuf *img, int inversed)
        if (inversed) {
                for (x=img->x*img->y; x>0; x--, drect+=4) {
                        if (fabsf(drect[3]) < 1e-5f) {
-                               drect[0]= 0.0f;
-                               drect[1]= 0.0f;
-                               drect[2]= 0.0f;
+                               drect[0] = 0.0f;
+                               drect[1] = 0.0f;
+                               drect[2] = 0.0f;
                        }
                        else {
                                drect[0] /= drect[3];
index 26f2789b9bb464bd5c8a5cd090fd33411c341f37..72c2204d8c53c51dc4ce108c0725615caeee2434 100644 (file)
 #include "node_composite_util.h"
 
 /* **************** ALPHAOVER ******************** */
-static bNodeSocketTemplate cmp_node_alphaover_in[]= {
+static bNodeSocketTemplate cmp_node_alphaover_in[] = {
        {       SOCK_FLOAT, 1, N_("Fac"),                       1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, PROP_FACTOR},
        {       SOCK_RGBA, 1, N_("Image"),                      1.0f, 1.0f, 1.0f, 1.0f},
        {       SOCK_RGBA, 1, N_("Image"),                      1.0f, 1.0f, 1.0f, 1.0f},
        {       -1, 0, ""       }
 };
-static bNodeSocketTemplate cmp_node_alphaover_out[]= {
+static bNodeSocketTemplate cmp_node_alphaover_out[] = {
        {       SOCK_RGBA, 0, N_("Image")},
        {       -1, 0, ""       }
 };
@@ -58,10 +58,10 @@ static void do_alphaover_premul(bNode *UNUSED(node), float *out, float *src, flo
        else {
                float mul= 1.0f - fac[0]*over[3];
 
-               out[0]= (mul*src[0]) + fac[0]*over[0];
-               out[1]= (mul*src[1]) + fac[0]*over[1];
-               out[2]= (mul*src[2]) + fac[0]*over[2];
-               out[3]= (mul*src[3]) + fac[0]*over[3];
+               out[0] = (mul*src[0]) + fac[0]*over[0];
+               out[1] = (mul*src[1]) + fac[0]*over[1];
+               out[2] = (mul*src[2]) + fac[0]*over[2];
+               out[3] = (mul*src[3]) + fac[0]*over[3];
        }
 }
 
@@ -79,10 +79,10 @@ static void do_alphaover_key(bNode *UNUSED(node), float *out, float *src, float
                float premul= fac[0]*over[3];
                float mul= 1.0f - premul;
 
-               out[0]= (mul*src[0]) + premul*over[0];
-               out[1]= (mul*src[1]) + premul*over[1];
-               out[2]= (mul*src[2]) + premul*over[2];
-               out[3]= (mul*src[3]) + fac[0]*over[3];
+               out[0] = (mul*src[0]) + premul*over[0];
+               out[1] = (mul*src[1]) + premul*over[1];
+               out[2] = (mul*src[2]) + premul*over[2];
+               out[3] = (mul*src[3]) + fac[0]*over[3];
        }
 }
 
@@ -102,10 +102,10 @@ static void do_alphaover_mixed(bNode *node, float *out, float *src, float *over,
                float premul= fac[0]*addfac;
                float mul= 1.0f - fac[0]*over[3];
                
-               out[0]= (mul*src[0]) + premul*over[0];
-               out[1]= (mul*src[1]) + premul*over[1];
-               out[2]= (mul*src[2]) + premul*over[2];
-               out[3]= (mul*src[3]) + fac[0]*over[3];
+               out[0] = (mul*src[0]) + premul*over[0];
+               out[1] = (mul*src[1]) + premul*over[1];
+               out[2] = (mul*src[2]) + premul*over[2];
+               out[3] = (mul*src[3]) + fac[0]*over[3];
        }
 }
 
index c5697679f90b6fc716fd3150571c1e4dc2cda1c3..8324b77b2d1f3b9b242a5a9173c7b271a7929ecf 100644 (file)
@@ -37,7 +37,7 @@
 
 /* **************** Bokeh image Tools  ******************** */
   
-static bNodeSocketTemplate cmp_node_bokehimage_out[]= {
+static bNodeSocketTemplate cmp_node_bokehimage_out[] = {
        {       SOCK_RGBA, 0, N_("Image"),                      0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
        {       -1, 0, ""       }
 };
index ff0fa0c971d7383b446c5402a398602bd12e95e4..0f82fdb481a9f6e4ec92b697805139bea83786ce 100644 (file)
 #include "../node_composite_util.h"
 
 /* **************** SCALAR MATH ******************** */ 
-static bNodeSocketTemplate cmp_node_boxmask_in[]= {
+static bNodeSocketTemplate cmp_node_boxmask_in[] = {
        {       SOCK_FLOAT, 1, N_("Mask"), 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
        {       SOCK_FLOAT, 1, N_("Value"), 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
        {   -1, 0, "" }
 };
 
-static bNodeSocketTemplate cmp_node_boxmask_out[]= {
+static bNodeSocketTemplate cmp_node_boxmask_out[] = {
        {       SOCK_FLOAT, 0, N_("Mask"), 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
        {   -1, 0, "" }
 };
index b58c1c27b2a5d99dc1ca56dae029895a5766c069..ecf572f59c7105bf6421150305bde566ff4b7371 100644 (file)
 
 /* **************** Brigh and contrsast  ******************** */
 
-static bNodeSocketTemplate cmp_node_brightcontrast_in[]= {
+static bNodeSocketTemplate cmp_node_brightcontrast_in[] = {
        {       SOCK_RGBA, 1, N_("Image"),                      1.0f, 1.0f, 1.0f, 1.0f},
        {       SOCK_FLOAT, 1, N_("Bright"),            0.0f, 0.0f, 0.0f, 0.0f, -100.0f, 100.0f, PROP_NONE},
        {       SOCK_FLOAT, 1, N_("Contrast"),          0.0f, 0.0f, 0.0f, 0.0f, -100.0f, 100.0f, PROP_NONE},
        {       -1, 0, ""       }
 };
-static bNodeSocketTemplate cmp_node_brightcontrast_out[]= {
+static bNodeSocketTemplate cmp_node_brightcontrast_out[] = {
        {       SOCK_RGBA, 0, N_("Image")},
        {       -1, 0, ""       }
 };
index fdb656ead74f5bc3855479854fbf24f83f6ca9bb..40dbbbb8dca445af98fdb364656dd2159c80a401 100644 (file)
 
 
 /* ******************* Channel Matte Node ********************************* */
-static bNodeSocketTemplate cmp_node_channel_matte_in[]={
+static bNodeSocketTemplate cmp_node_channel_matte_in[] ={
        {SOCK_RGBA, 1, N_("Image"), 1.0f, 1.0f, 1.0f, 1.0f},
        {-1, 0, ""}
 };
 
-static bNodeSocketTemplate cmp_node_channel_matte_out[]={
+static bNodeSocketTemplate cmp_node_channel_matte_out[] ={
        {SOCK_RGBA, 0, N_("Image")},
        {SOCK_FLOAT, 0, N_("Matte")},
        {-1, 0, ""}
index 55ee1b090bba9ccb401f33b5ebe95a7888bd6ef6..f343f806d57774f8497b359c123944b5ea204955 100644 (file)
 #include "node_composite_util.h"
 
 /* ******************* Chroma Key ********************************************************** */
-static bNodeSocketTemplate cmp_node_chroma_in[]={
+static bNodeSocketTemplate cmp_node_chroma_in[] = {
        {SOCK_RGBA, 1, N_("Image"), 1.0f, 1.0f, 1.0f, 1.0f},
        {SOCK_RGBA, 1, N_("Key Color"), 1.0f, 1.0f, 1.0f, 1.0f},
        {-1, 0, ""}
 };
 
-static bNodeSocketTemplate cmp_node_chroma_out[]={
+static bNodeSocketTemplate cmp_node_chroma_out[] = {
        {SOCK_RGBA, 0, N_("Image")},
        {SOCK_FLOAT, 0, N_("Matte")},
        {-1, 0, ""}
index 37fb29811baabf4c7ec5657697ec255d29a39b10..07a6647d976b1cb866450ae25daa96738d3a4f91 100644 (file)
 #include "node_composite_util.h"
 
 /* ******************* Color Key ********************************************************** */
-static bNodeSocketTemplate cmp_node_color_in[]={
+static bNodeSocketTemplate cmp_node_color_in[] = {
        {SOCK_RGBA, 1, N_("Image"), 1.0f, 1.0f, 1.0f, 1.0f},
        {SOCK_RGBA, 1, N_("Key Color"), 1.0f, 1.0f, 1.0f, 1.0f},
        {-1, 0, ""}
 };
 
-static bNodeSocketTemplate cmp_node_color_out[]={
+static bNodeSocketTemplate cmp_node_color_out[] = {
        {SOCK_RGBA, 0, N_("Image")},
        {SOCK_FLOAT, 0, N_("Matte")},
        {-1, 0, ""}
index c4120ab22c632ce14dbf9e695550d19fc6d7fd4d..e8965d50b47188dce7fe046742635ca7c8b2766d 100644 (file)
 #define AVG(a, b) ((a + b) / 2)
 
 /* ******************* Color Spill Supression ********************************* */
-static bNodeSocketTemplate cmp_node_color_spill_in[]={
+static bNodeSocketTemplate cmp_node_color_spill_in[] = {
        {SOCK_RGBA, 1, N_("Image"), 1.0f, 1.0f, 1.0f, 1.0f},
        {SOCK_FLOAT, 1, N_("Fac"),      1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_FACTOR},
        {-1, 0, ""}
 };
 
-static bNodeSocketTemplate cmp_node_color_spill_out[]={
+static bNodeSocketTemplate cmp_node_color_spill_out[] = {
        {SOCK_RGBA, 0, N_("Image")},
        {-1, 0, ""}
 };
index a9f930f9cf21fcb0fe3e4ca8b4234ec5ddc5b1c7..e9d26ebebbcb83624bcb607a58bdd8f4e7799522 100644 (file)
 
 
 /* ******************* Color Balance ********************************* */
-static bNodeSocketTemplate cmp_node_colorbalance_in[]={
+static bNodeSocketTemplate cmp_node_colorbalance_in[] = {
        {SOCK_FLOAT, 1, N_("Fac"),      1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_FACTOR},
        {SOCK_RGBA, 1, N_("Image"), 1.0f, 1.0f, 1.0f, 1.0f},
        {-1, 0, ""}
 };
 
-static bNodeSocketTemplate cmp_node_colorbalance_out[]={
+static bNodeSocketTemplate cmp_node_colorbalance_out[] = {
        {SOCK_RGBA, 0, N_("Image")},
        {-1, 0, ""}
 };
index ce43b2f0f2b650c63f1a5a4da26ca81ecd47b0c3..526f8472992e77fb5f06012a517fdf1a1ddbbd86 100644 (file)
 
 
 /* ******************* Color Balance ********************************* */
-static bNodeSocketTemplate cmp_node_colorcorrection_in[]={
+static bNodeSocketTemplate cmp_node_colorcorrection_in[] = {
        {       SOCK_RGBA,1,N_("Image"), 1.0f, 1.0f, 1.0f, 1.0f},
        {       SOCK_FLOAT, 1, N_("Mask"),      1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_FACTOR},
        {       -1,0,""}
 };
 
-static bNodeSocketTemplate cmp_node_colorcorrection_out[]={
+static bNodeSocketTemplate cmp_node_colorcorrection_out[] = {
        {       SOCK_RGBA,0,N_("Image")},
        {       -1,0,""}
 };
index dadc863873da250d8b2731a1da1a27ef8eb3c68f..edbb627265d39f9482caf710af2b62826a3f4e38 100644 (file)
@@ -32,7 +32,7 @@
 #include "node_composite_util.h"
 
 /* **************** COMPOSITE ******************** */
-static bNodeSocketTemplate cmp_node_composite_in[]= {
+static bNodeSocketTemplate cmp_node_composite_in[] = {
        {       SOCK_RGBA, 1, N_("Image"),              0.0f, 0.0f, 0.0f, 1.0f},
        {       SOCK_FLOAT, 1, N_("Alpha"),             1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_FACTOR},
        {       SOCK_FLOAT, 1, N_("Z"),                 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_FACTOR},
index f93a4817c019632dbf7c7623ceb06a19934e76ad..ad51fae199891cfdde1d28b73d2a482001d27885 100644 (file)
 
 /* **************** Crop  ******************** */
 
-static bNodeSocketTemplate cmp_node_crop_in[]= {
+static bNodeSocketTemplate cmp_node_crop_in[] = {
        {       SOCK_RGBA, 1, N_("Image"),                      1.0f, 1.0f, 1.0f, 1.0f},
        {       -1, 0, ""       }
 };
-static bNodeSocketTemplate cmp_node_crop_out[]= {
+static bNodeSocketTemplate cmp_node_crop_out[] = {
        {       SOCK_RGBA, 0, N_("Image")},
        {       -1, 0, ""       }
 };
index 1948709ec8419940762db93f90b9302ac91ea1e9..a1999ec8887714f916563aec2e6bf90573d29c87 100644 (file)
@@ -36,7 +36,7 @@
 /* **************** CURVE Time  ******************** */
 
 /* custom1 = sfra, custom2 = efra */
-static bNodeSocketTemplate cmp_node_time_out[]= {
+static bNodeSocketTemplate cmp_node_time_out[] = {
        {       SOCK_FLOAT, 0, N_("Fac")},
        {       -1, 0, ""       }
 };
@@ -55,7 +55,7 @@ static void node_composit_exec_curves_time(void *data, bNode *node, bNodeStack *
        curvemapping_initialize(node->storage);
        fac = curvemapping_evaluateF(node->storage, 0, fac);
 
-       out[0]->vec[0]= CLAMPIS(fac, 0.0f, 1.0f);
+       out[0]->vec[0] = CLAMPIS(fac, 0.0f, 1.0f);
 }
 
 #endif  /* WITH_COMPOSITOR_LEGACY */
@@ -86,12 +86,12 @@ void register_node_type_cmp_curve_time(bNodeTreeType *ttype)
 
 
 /* **************** CURVE VEC  ******************** */
-static bNodeSocketTemplate cmp_node_curve_vec_in[]= {
+static bNodeSocketTemplate cmp_node_curve_vec_in[] = {
        {       SOCK_VECTOR, 1, N_("Vector"),   0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f, PROP_NONE},
        {       -1, 0, ""       }
 };
 
-static bNodeSocketTemplate cmp_node_curve_vec_out[]= {
+static bNodeSocketTemplate cmp_node_curve_vec_out[] = {
        {       SOCK_VECTOR, 0, N_("Vector")},
        {       -1, 0, ""       }
 };
@@ -132,7 +132,7 @@ void register_node_type_cmp_curve_vec(bNodeTreeType *ttype)
 
 
 /* **************** CURVE RGB  ******************** */
-static bNodeSocketTemplate cmp_node_curve_rgb_in[]= {
+static bNodeSocketTemplate cmp_node_curve_rgb_in[] = {
        {       SOCK_FLOAT, 1, N_("Fac"),       1.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f, PROP_FACTOR},
        {       SOCK_RGBA, 1, N_("Image"),      1.0f, 1.0f, 1.0f, 1.0f},
        {       SOCK_RGBA, 1, N_("Black Level"),        0.0f, 0.0f, 0.0f, 1.0f},
@@ -140,7 +140,7 @@ static bNodeSocketTemplate cmp_node_curve_rgb_in[]= {
        {       -1, 0, ""       }
 };
 
-static bNodeSocketTemplate cmp_node_curve_rgb_out[]= {
+static bNodeSocketTemplate cmp_node_curve_rgb_out[] = {
        {       SOCK_RGBA, 0, N_("Image")},
        {       -1, 0, ""       }
 };
@@ -151,7 +151,7 @@ static void do_curves(bNode *node, float *out, float *in)
 {
        curvemapping_initialize(node->storage);
        curvemapping_evaluate_premulRGBF(node->storage, out, in);
-       out[3]= in[3];
+       out[3] = in[3];
 }
 
 static void do_curves_fac(bNode *node, float *out, float *in, float *fac)
@@ -166,11 +166,11 @@ static void do_curves_fac(bNode *node, float *out, float *in, float *fac)
        else {
                float col[4], mfac= 1.0f-*fac;
                curvemapping_evaluate_premulRGBF(node->storage, col, in);
-               out[0]= mfac*in[0] + *fac*col[0];
-               out[1]= mfac*in[1] + *fac*col[1];
-               out[2]= mfac*in[2] + *fac*col[2];
+               out[0] = mfac*in[0] + *fac*col[0];
+               out[1] = mfac*in[1] + *fac*col[1];
+               out[2] = mfac*in[2] + *fac*col[2];
        }
-       out[3]= in[3];
+       out[3] = in[3];
 }
 
 static void node_composit_exec_curve_rgb(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out)
index 34433f894f3c059ed4dcffedf85b91a803faff20..826c555d2c69c5390690da846cb98f6d5b559e62 100644 (file)
 #include <limits.h>
 
 /* ************ qdn: Defocus node ****************** */
-static bNodeSocketTemplate cmp_node_defocus_in[]= {
+static bNodeSocketTemplate cmp_node_defocus_in[] = {
        {       SOCK_RGBA, 1, N_("Image"),                      1.0f, 1.0f, 1.0f, 1.0f},
        {       SOCK_FLOAT, 1, N_("Z"),                 1.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, PROP_FACTOR},
        {       -1, 0, ""       }
 };
-static bNodeSocketTemplate cmp_node_defocus_out[]= {
+static bNodeSocketTemplate cmp_node_defocus_out[] = {
        {       SOCK_RGBA, 0, N_("Image")},
        {       -1, 0, ""       }
 };
index 21b703dc9a808580ca481d818bb57931ccd44098..9d47e4bc276cff9b2cc68810f92be7799d477626 100644 (file)
 #include "node_composite_util.h"
 
 /* **************** FILTER  ******************** */
-static bNodeSocketTemplate cmp_node_despeckle_in[]= {
+static bNodeSocketTemplate cmp_node_despeckle_in[] = {
        {       SOCK_FLOAT, 1, N_("Fac"),                       1.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, PROP_FACTOR},
        {       SOCK_RGBA, 1, N_("Image"),                      1.0f, 1.0f, 1.0f, 1.0f},
        {       -1, 0, ""       }
 };
-static bNodeSocketTemplate cmp_node_despeckle_out[]= {
+static bNodeSocketTemplate cmp_node_despeckle_out[] = {
        {       SOCK_RGBA, 0, N_("Image")},
        {       -1, 0, ""       }
 };
index ed43baef420781a6574324eedc8f53f75d8c09d3..8a761caea2133e9ae3bc30155314c811a98daee6 100644 (file)
 #include "node_composite_util.h"
 
 /* ******************* channel Difference Matte ********************************* */
-static bNodeSocketTemplate cmp_node_diff_matte_in[]={
+static bNodeSocketTemplate cmp_node_diff_matte_in[] = {
        {SOCK_RGBA, 1, N_("Image 1"), 1.0f, 1.0f, 1.0f, 1.0f},
        {SOCK_RGBA, 1, N_("Image 2"), 1.0f, 1.0f, 1.0f, 1.0f},
        {-1, 0, ""}
 };
 
-static bNodeSocketTemplate cmp_node_diff_matte_out[]={
+static bNodeSocketTemplate cmp_node_diff_matte_out[] = {
        {SOCK_RGBA, 0, N_("Image")},
        {SOCK_FLOAT, 0, N_("Matte")},
        {-1, 0, ""}
index 51ccc2a4d399d0c5f581ae0a32149971d2ef2af3..c283512e4612bac9b9f5dbdcba0fefddd46681fe 100644 (file)
 
 /* **************** Displace  ******************** */
 
-static bNodeSocketTemplate cmp_node_displace_in[]= {
+static bNodeSocketTemplate cmp_node_displace_in[] = {
        {       SOCK_RGBA, 1, N_("Image"),                      1.0f, 1.0f, 1.0f, 1.0f},
        {       SOCK_VECTOR, 1, N_("Vector"),                   1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_TRANSLATION},
        {       SOCK_FLOAT, 1, N_("X Scale"),                           0.0f, 0.0f, 0.0f, 0.0f, -1000.0f, 1000.0f, PROP_FACTOR},
        {       SOCK_FLOAT, 1, N_("Y Scale"),                           0.0f, 0.0f, 0.0f, 0.0f, -1000.0f, 1000.0f, PROP_FACTOR},
        {       -1, 0, ""       }
 };
-static bNodeSocketTemplate cmp_node_displace_out[]= {
+static bNodeSocketTemplate cmp_node_displace_out[] = {
        {       SOCK_RGBA, 0, N_("Image")},
        {       -1, 0, ""       }
 };
index 7a101ff43b51e4bb83cd322f44a60b4785479507..7e605865cd2c0c58133fa244a0de8f6e9b2c3352 100644 (file)
 #include "node_composite_util.h"
 
 /* ******************* channel Distance Matte ********************************* */
-static bNodeSocketTemplate cmp_node_distance_matte_in[]={
+static bNodeSocketTemplate cmp_node_distance_matte_in[] = {
        {SOCK_RGBA, 1, N_("Image"), 1.0f, 1.0f, 1.0f, 1.0f},
        {SOCK_RGBA, 1, N_("Key Color"), 1.0f, 1.0f, 1.0f, 1.0f},
        {-1, 0, ""}
 };
 
-static bNodeSocketTemplate cmp_node_distance_matte_out[]={
+static bNodeSocketTemplate cmp_node_distance_matte_out[] = {
        {SOCK_RGBA, 0, N_("Image")},
        {SOCK_FLOAT, 0, N_("Matte")},
        {-1, 0, ""}
@@ -159,9 +159,9 @@ static void node_composit_exec_distance_matte(void *data, bNode *node, bNodeStac
        workbuf=dupalloc_compbuf(inbuf);
 
        /*use the input color*/
-       c->key[0]= in[1]->vec[0];
-       c->key[1]= in[1]->vec[1];
-       c->key[2]= in[1]->vec[2];
+       c->key[0] = in[1]->vec[0];
+       c->key[1] = in[1]->vec[1];
+       c->key[2] = in[1]->vec[2];
 
        /* work in RGB color space */
        if (c->channel == 1) {
index 63a54efea745ad527e123aae887f22a5f74e3a3a..3c1e3ee443e8c509e27a5b9a09f7b5803efb6356 100644 (file)
 /* **************** Double Edge Mask ******************** */
 
 
-static bNodeSocketTemplate cmp_node_doubleedgemask_in[]= {
+static bNodeSocketTemplate cmp_node_doubleedgemask_in[] = {
        { SOCK_FLOAT, 1, "Inner Mask", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f, PROP_NONE},  // inner mask socket definition
        { SOCK_FLOAT, 1, "Outer Mask", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f, PROP_NONE},  // outer mask socket definition
        { -1, 0, ""     }                                                                                                                                       // input socket array terminator
 };
-static bNodeSocketTemplate cmp_node_doubleedgemask_out[]= {
+static bNodeSocketTemplate cmp_node_doubleedgemask_out[] = {
        { SOCK_FLOAT, 0, "Mask"},               // output socket definition
        { -1, 0, "" }                                   // output socket array terminator
 };
index 905090e93ad3b5a93ef69016ac04f0423d2d349b..5e7bd26d34a42a622fb5ccfe11431a4bdae9f270 100644 (file)
 #include "../node_composite_util.h"
 
 /* **************** SCALAR MATH ******************** */ 
-static bNodeSocketTemplate cmp_node_ellipsemask_in[]= {
+static bNodeSocketTemplate cmp_node_ellipsemask_in[] = {
        {       SOCK_FLOAT, 1, N_("Mask"), 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
        {       SOCK_FLOAT, 1, N_("Value"), 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
        {   -1, 0, "" }
 };
 
-static bNodeSocketTemplate cmp_node_ellipsemask_out[]= {
+static bNodeSocketTemplate cmp_node_ellipsemask_out[] = {
        {       SOCK_FLOAT, 0, N_("Mask"), 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
        {   -1, 0, "" }
 };
index 0b12c03682b4b5221c445bd784c394f8c927309c..a27116ab07749a77ff24c71fbc5143bbae6b38bd 100644 (file)
 #include "node_composite_util.h"
 
 /* **************** FILTER  ******************** */
-static bNodeSocketTemplate cmp_node_filter_in[]= {
+static bNodeSocketTemplate cmp_node_filter_in[] = {
        {       SOCK_FLOAT, 1, N_("Fac"),                       1.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, PROP_FACTOR},
        {       SOCK_RGBA, 1, N_("Image"),                      1.0f, 1.0f, 1.0f, 1.0f},
        {       -1, 0, ""       }
 };
-static bNodeSocketTemplate cmp_node_filter_out[]= {
+static bNodeSocketTemplate cmp_node_filter_out[] = {
        {       SOCK_RGBA, 0, N_("Image")},
        {       -1, 0, ""       }
 };
@@ -73,10 +73,10 @@ static void do_filter_edge(CompBuf *out, CompBuf *in, float *filter, float fac)
                                for (c=0; c<3; c++) {
                                        f1= filter[0]*row1[0] + filter[1]*row1[4] + filter[2]*row1[8] + filter[3]*row2[0] + filter[4]*row2[4] + filter[5]*row2[8] + filter[6]*row3[0] + filter[7]*row3[4] + filter[8]*row3[8];
                                        f2= filter[0]*row1[0] + filter[3]*row1[4] + filter[6]*row1[8] + filter[1]*row2[0] + filter[4]*row2[4] + filter[7]*row2[8] + filter[2]*row3[0] + filter[5]*row3[4] + filter[8]*row3[8];
-                                       fp[0]= mfac*row2[4] + fac*sqrt(f1*f1 + f2*f2);
+                                       fp[0] = mfac*row2[4] + fac*sqrt(f1*f1 + f2*f2);
                                        fp++; row1++; row2++; row3++;
                                }
-                               fp[0]= row2[4];
+                               fp[0] = row2[4];
                                /* no alpha... will clear it completely */
                                fp++; row1++; row2++; row3++;
                        }
@@ -87,7 +87,7 @@ static void do_filter_edge(CompBuf *out, CompBuf *in, float *filter, float fac)
                        for (x=2; x<rowlen; x++) {
                                f1= filter[0]*row1[0] + filter[1]*row1[1] + filter[2]*row1[2] + filter[3]*row2[0] + filter[4]*row2[1] + filter[5]*row2[2] + filter[6]*row3[0] + filter[7]*row3[1] + filter[8]*row3[2];
                                f2= filter[0]*row1[0] + filter[3]*row1[1] + filter[6]*row1[2] + filter[1]*row2[0] + filter[4]*row2[1] + filter[7]*row2[2] + filter[2]*row3[0] + filter[5]*row3[1] + filter[8]*row3[2];
-                               fp[0]= mfac*row2[1] + fac*sqrt(f1*f1 + f2*f2);
+                               fp[0] = mfac*row2[1] + fac*sqrt(f1*f1 + f2*f2);
                                fp++; row1++; row2++; row3++;
                        }
                }
@@ -116,28 +116,28 @@ static void do_filter3(CompBuf *out, CompBuf *in, float *filter, float fac)
                fp= out->rect + pixlen*(y)*rowlen;
                
                if (pixlen==1) {
-                       fp[0]= row2[0];
+                       fp[0] = row2[0];
                        fp+= 1;
                        
                        for (x=2; x<rowlen; x++) {
-                               fp[0]= mfac*row2[1] + fac*(filter[0]*row1[0] + filter[1]*row1[1] + filter[2]*row1[2] + filter[3]*row2[0] + filter[4]*row2[1] + filter[5]*row2[2] + filter[6]*row3[0] + filter[7]*row3[1] + filter[8]*row3[2]);
+                               fp[0] = mfac*row2[1] + fac*(filter[0]*row1[0] + filter[1]*row1[1] + filter[2]*row1[2] + filter[3]*row2[0] + filter[4]*row2[1] + filter[5]*row2[2] + filter[6]*row3[0] + filter[7]*row3[1] + filter[8]*row3[2]);
                                fp++; row1++; row2++; row3++;
                        }
-                       fp[0]= row2[1];
+                       fp[0] = row2[1];
                }
                else if (pixlen==2) {
-                       fp[0]= row2[0];
-                       fp[1]= row2[1];
+                       fp[0] = row2[0];
+                       fp[1] = row2[1];
                        fp+= 2;
                        
                        for (x=2; x<rowlen; x++) {
                                for (c=0; c<2; c++) {
-                                       fp[0]= mfac*row2[2] + fac*(filter[0]*row1[0] + filter[1]*row1[2] + filter[2]*row1[4] + filter[3]*row2[0] + filter[4]*row2[2] + filter[5]*row2[4] + filter[6]*row3[0] + filter[7]*row3[2] + filter[8]*row3[4]);
+                                       fp[0] = mfac*row2[2] + fac*(filter[0]*row1[0] + filter[1]*row1[2] + filter[2]*row1[4] + filter[3]*row2[0] + filter[4]*row2[2] + filter[5]*row2[4] + filter[6]*row3[0] + filter[7]*row3[2] + filter[8]*row3[4]);
                                        fp++; row1++; row2++; row3++;
                                }
                        }
-                       fp[0]= row2[2];
-                       fp[1]= row2[3];
+                       fp[0] = row2[2];
+                       fp[1] = row2[3];
                }
                else if (pixlen==3) {
                        copy_v3_v3(fp, row2);
@@ -145,7 +145,7 @@ static void do_filter3(CompBuf *out, CompBuf *in, float *filter, float fac)
                        
                        for (x=2; x<rowlen; x++) {
                                for (c=0; c<3; c++) {
-                                       fp[0]= mfac*row2[3] + fac*(filter[0]*row1[0] + filter[1]*row1[3] + filter[2]*row1[6] + filter[3]*row2[0] + filter[4]*row2[3] + filter[5]*row2[6] + filter[6]*row3[0] + filter[7]*row3[3] + filter[8]*row3[6]);
+                                       fp[0] = mfac*row2[3] + fac*(filter[0]*row1[0] + filter[1]*row1[3] + filter[2]*row1[6] + filter[3]*row2[0] + filter[4]*row2[3] + filter[5]*row2[6] + filter[6]*row3[0] + filter[7]*row3[3] + filter[8]*row3[6]);
                                        fp++; row1++; row2++; row3++;
                                }
                        }
@@ -157,7 +157,7 @@ static void do_filter3(CompBuf *out, CompBuf *in, float *filter, float fac)
                        
                        for (x=2; x<rowlen; x++) {
                                for (c=0; c<4; c++) {
-                                       fp[0]= mfac*row2[4] + fac*(filter[0]*row1[0] + filter[1]*row1[4] + filter[2]*row1[8] + filter[3]*row2[0] + filter[4]*row2[4] + filter[5]*row2[8] + filter[6]*row3[0] + filter[7]*row3[4] + filter[8]*row3[8]);
+                                       fp[0] = mfac*row2[4] + fac*(filter[0]*row1[0] + filter[1]*row1[4] + filter[2]*row1[8] + filter[3]*row2[0] + filter[4]*row2[4] + filter[5]*row2[8] + filter[6]*row3[0] + filter[7]*row3[4] + filter[8]*row3[8]);
                                        fp++; row1++; row2++; row3++;
                                }
                        }
@@ -169,13 +169,13 @@ static void do_filter3(CompBuf *out, CompBuf *in, float *filter, float fac)
 
 static void node_composit_exec_filter(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
 {
-       static float soft[9]= {1/16.0f, 2/16.0f, 1/16.0f, 2/16.0f, 4/16.0f, 2/16.0f, 1/16.0f, 2/16.0f, 1/16.0f};
-       float sharp[9]= {-1, -1, -1, -1, 9, -1, -1, -1, -1};
-       float laplace[9]= {-1/8.0f, -1/8.0f, -1/8.0f, -1/8.0f, 1.0f, -1/8.0f, -1/8.0f, -1/8.0f, -1/8.0f};
-       float sobel[9]= {1, 2, 1, 0, 0, 0, -1, -2, -1};
-       float prewitt[9]= {1, 1, 1, 0, 0, 0, -1, -1, -1};
-       float kirsch[9]= {5, 5, 5, -3, -3, -3, -2, -2, -2};
-       float shadow[9]= {1, 2, 1, 0, 1, 0, -1, -2, -1};
+       static float soft[9] = {1/16.0f, 2/16.0f, 1/16.0f, 2/16.0f, 4/16.0f, 2/16.0f, 1/16.0f, 2/16.0f, 1/16.0f};
+       float sharp[9] = {-1, -1, -1, -1, 9, -1, -1, -1, -1};
+       float laplace[9] = {-1/8.0f, -1/8.0f, -1/8.0f, -1/8.0f, 1.0f, -1/8.0f, -1/8.0f, -1/8.0f, -1/8.0f};
+       float sobel[9] = {1, 2, 1, 0, 0, 0, -1, -2, -1};
+       float prewitt[9] = {1, 1, 1, 0, 0, 0, -1, -1, -1};
+       float kirsch[9] = {5, 5, 5, -3, -3, -3, -2, -2, -2};
+       float shadow[9] = {1, 2, 1, 0, 1, 0, -1, -2, -1};
        
        if (out[0]->hasoutput==0) return;
        
index 147e7591af7d592dc8dc8faa986eb8c07d977682..4aa98d173e7dbe8d36d80539ec34c9cde23a73a3 100644 (file)
 #include "node_composite_util.h"
 
 /* **************** Flip  ******************** */
-static bNodeSocketTemplate cmp_node_flip_in[]= {
+static bNodeSocketTemplate cmp_node_flip_in[] = {
        {       SOCK_RGBA, 1, N_("Image"),                  1.0f, 1.0f, 1.0f, 1.0f},
        {       -1, 0, ""       }
 };
 
-static bNodeSocketTemplate cmp_node_flip_out[]= {
+static bNodeSocketTemplate cmp_node_flip_out[] = {
        {       SOCK_RGBA, 0, N_("Image")},
        {       -1, 0, ""       }
 };
@@ -75,7 +75,7 @@ static void node_composit_exec_flip(void *UNUSED(data), bNode *node, bNodeStack
                                outfp += (src_width-1)*src_pix;
                                for (x=0; x<src_width; x++) {
                                        for (i=0; i<src_pix; i++) {
-                                               outfp[i]= srcfp[i];
+                                               outfp[i] = srcfp[i];
                                        }
                                        outfp -= src_pix;
                                        srcfp += src_pix;
index 871554780359b23d9f84cef3d71860bd79fc3302..b8c998943010629c867f3d8c9a6eb521fa7d0317 100644 (file)
 
 /* **************** Gamma Tools  ******************** */
   
-static bNodeSocketTemplate cmp_node_gamma_in[]= {
+static bNodeSocketTemplate cmp_node_gamma_in[] = {
        {       SOCK_RGBA, 1, N_("Image"),                      1.0f, 1.0f, 1.0f, 1.0f},
        {       SOCK_FLOAT, 1, N_("Gamma"),                     1.0f, 0.0f, 0.0f, 0.0f, 0.001f, 10.0f, PROP_UNSIGNED},
        {       -1, 0, ""       }
 };
-static bNodeSocketTemplate cmp_node_gamma_out[]= {
+static bNodeSocketTemplate cmp_node_gamma_out[] = {
        {       SOCK_RGBA, 0, N_("Image")},
        {       -1, 0, ""       }
 };
index 7d6c0cb1a299c596c7158197555db970197cd0eb..950d8a56f58a8559b217ac4a7e9b77e526136bf0 100644 (file)
 
 #include "node_composite_util.h"
 
-static bNodeSocketTemplate cmp_node_glare_in[]= {
+static bNodeSocketTemplate cmp_node_glare_in[] = {
        {       SOCK_RGBA, 1, N_("Image"),                      1.0f, 1.0f, 1.0f, 1.0f},
        {       -1, 0, ""       }
 };
-static bNodeSocketTemplate cmp_node_glare_out[]= {
+static bNodeSocketTemplate cmp_node_glare_out[] = {
        {       SOCK_RGBA, 0, N_("Image")},
        {       -1, 0, ""       }
 };
index 793ea2eb75607d6a918aee640a04e65ccaebd649..d52e3d01a329564d17e57eb238cb2e64b4b38dfd 100644 (file)
 
 
 /* **************** Hue Saturation ******************** */
-static bNodeSocketTemplate cmp_node_hue_sat_in[]= {
+static bNodeSocketTemplate cmp_node_hue_sat_in[] = {
        {       SOCK_FLOAT, 1, N_("Fac"),                       1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_FACTOR},
        {       SOCK_RGBA, 1, N_("Image"),                      1.0f, 1.0f, 1.0f, 1.0f},
        {       -1, 0, ""       }
 };
-static bNodeSocketTemplate cmp_node_hue_sat_out[]= {
+static bNodeSocketTemplate cmp_node_hue_sat_out[] = {
        {       SOCK_RGBA, 0, N_("Image")},
        {       -1, 0, ""       }
 };
@@ -60,10 +60,10 @@ static void do_hue_sat_fac(bNode *node, float *out, float *in, float *fac)
                hsv[2]*= nhs->val;
                hsv_to_rgb(hsv[0], hsv[1], hsv[2], col, col+1, col+2);
                
-               out[0]= mfac*in[0] + *fac*col[0];
-               out[1]= mfac*in[1] + *fac*col[1];
-               out[2]= mfac*in[2] + *fac*col[2];
-               out[3]= in[3];
+               out[0] = mfac*in[0] + *fac*col[0];
+               out[1] = mfac*in[1] + *fac*col[1];
+               out[2] = mfac*in[2] + *fac*col[2];
+               out[3] = in[3];
        }
        else {
                copy_v4_v4(out, in);
index 42077cd5c06d179f5e4797eefb632c8e3f8e3016..f751dbea8d23051e144ce77c648ba4a991496182 100644 (file)
 
 #include "node_composite_util.h"
 
-static bNodeSocketTemplate cmp_node_huecorrect_in[]= {
+static bNodeSocketTemplate cmp_node_huecorrect_in[] = {
        {       SOCK_FLOAT, 1, N_("Fac"),       1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_FACTOR},
        {       SOCK_RGBA, 1, N_("Image"),      1.0f, 1.0f, 1.0f, 1.0f},
        {       -1, 0, ""       }
 };
 
-static bNodeSocketTemplate cmp_node_huecorrect_out[]= {
+static bNodeSocketTemplate cmp_node_huecorrect_out[] = {
        {       SOCK_RGBA, 0, N_("Image")},
        {       -1, 0, ""       }
 };
@@ -71,7 +71,7 @@ static void do_huecorrect(bNode *node, float *out, float *in)
        /* convert back to rgb */
        hsv_to_rgb(hsv[0], hsv[1], hsv[2], out, out+1, out+2);
        
-       out[3]= in[3];
+       out[3] = in[3];
 }
 
 static void do_huecorrect_fac(bNode *node, float *out, float *in, float *fac)
@@ -101,10 +101,10 @@ static void do_huecorrect_fac(bNode *node, float *out, float *in, float *fac)
        /* convert back to rgb */
        hsv_to_rgb(hsv[0], hsv[1], hsv[2], rgb, rgb+1, rgb+2);
        
-       out[0]= mfac*in[0] + *fac*rgb[0];
-       out[1]= mfac*in[1] + *fac*rgb[1];
-       out[2]= mfac*in[2] + *fac*rgb[2];
-       out[3]= in[3];
+       out[0] = mfac*in[0] + *fac*rgb[0];
+       out[1] = mfac*in[1] + *fac*rgb[1];
+       out[2] = mfac*in[2] + *fac*rgb[2];
+       out[3] = in[3];
 }
 
 static void node_composit_exec_huecorrect(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out)
index 31a3a765ebe2b7a9a703f4dcbd6256310cbdfae5..ef0c502119227ea6359e26037f32e2214fbdc33d 100644 (file)
 
 /* **************** ID Mask  ******************** */
 
-static bNodeSocketTemplate cmp_node_idmask_in[]= {
+static bNodeSocketTemplate cmp_node_idmask_in[] = {
        {       SOCK_FLOAT, 1, N_("ID value"),                  1.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, PROP_NONE},
        {       -1, 0, ""       }
 };
-static bNodeSocketTemplate cmp_node_idmask_out[]= {
+static bNodeSocketTemplate cmp_node_idmask_out[] = {
        {       SOCK_FLOAT, 0, N_("Alpha")},
        {       -1, 0, ""       }
 };
@@ -56,14 +56,14 @@ static void do_idmask(CompBuf *stackbuf, CompBuf *cbuf, float idnr)
        rect= cbuf->rect;
        for (x= cbuf->x*cbuf->y - 1; x>=0; x--)
                if (rect[x]==idnr)
-                       abuf[x]= 255;
+                       abuf[x] = 255;
        
        antialias_tagbuf(cbuf->x, cbuf->y, abuf);
        
        rect= stackbuf->rect;
        for (x= cbuf->x*cbuf->y - 1; x>=0; x--)
                if (abuf[x]>1)
-                       rect[x]= (1.0f/255.0f)*(float)abuf[x];
+                       rect[x] = (1.0f/255.0f)*(float)abuf[x];
        
        MEM_freeN(abuf);
 }
@@ -78,7 +78,7 @@ static void do_idmask_fsa(CompBuf *stackbuf, CompBuf *cbuf, float idnr)
        rs= stackbuf->rect;
        for (x= cbuf->x*cbuf->y - 1; x>=0; x--)
                if (rect[x]==idnr)
-                       rs[x]= 1.0f;
+                       rs[x] = 1.0f;
        
 }
 
index 4f6a73c34c93c3972eba73271312999aa0cac3a3..150382c1f8f7c9b4190f06ca750e0f8a421c5e55 100644 (file)
@@ -34,7 +34,7 @@
 
 /* **************** IMAGE (and RenderResult, multilayer image) ******************** */
 
-static bNodeSocketTemplate cmp_node_rlayers_out[]= {
+static bNodeSocketTemplate cmp_node_rlayers_out[] = {
        {       SOCK_RGBA, 0, N_("Image"),                                      0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
        {       SOCK_FLOAT, 0, N_("Alpha"),                                     1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
        {       SOCK_FLOAT, 0, N_("Z"),                                         1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
index 277998ee35556ec09c3e4233f79a4f0131d8eeaa..2db6e42f6034f0169ef48c2bd110e128430df044 100644 (file)
 #include "node_composite_util.h"
 
 /* **************** INVERT ******************** */
-static bNodeSocketTemplate cmp_node_invert_in[]= { 
+static bNodeSocketTemplate cmp_node_invert_in[] = {
        { SOCK_FLOAT, 1, N_("Fac"), 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_FACTOR},
        { SOCK_RGBA, 1, N_("Color"), 1.0f, 1.0f, 1.0f, 1.0f},
        { -1, 0, "" }
 };
 
-static bNodeSocketTemplate cmp_node_invert_out[]= { 
+static bNodeSocketTemplate cmp_node_invert_out[] = {
        { SOCK_RGBA, 0, N_("Color")},
        { -1, 0, "" }
 };
index a4983cce8b89d13af7b751f37ecc3296a2e79455..c3f64f0eacb5033ad721438b5a3422c0d0f16b33 100644 (file)
 
 #include "node_composite_util.h"
 
-static bNodeSocketTemplate cmp_node_lensdist_in[]= {
+static bNodeSocketTemplate cmp_node_lensdist_in[] = {
        {       SOCK_RGBA, 1, N_("Image"),                      1.0f, 1.0f, 1.0f, 1.0f},
        {       SOCK_FLOAT, 1, N_("Distort"),   0.f, 0.f, 0.f, 0.f, -0.999f, 1.f, PROP_NONE},
        {       SOCK_FLOAT, 1, N_("Dispersion"), 0.f, 0.f, 0.f, 0.f, 0.f, 1.f, PROP_NONE},
        {       -1, 0, ""       }
 };
-static bNodeSocketTemplate cmp_node_lensdist_out[]= {
+static bNodeSocketTemplate cmp_node_lensdist_out[] = {
        {       SOCK_RGBA, 0, N_("Image")},
        {       -1, 0, ""       }
 };
@@ -74,7 +74,7 @@ static void lensDistort(CompBuf *dst, CompBuf *src, float kr, float kg, float kb
                                qd_getPixelLerpChan(tsrc, (u*dst->x - kr) - 0.5f, v*dst->y - 0.5f, 2, colp[x]+2);
                                
                                /* set alpha */
-                               colp[x][3]= 1.0f;
+                               colp[x][3] = 1.0f;
                        }
                }
                free_compbuf(tsrc);
@@ -159,7 +159,7 @@ static void lensDistort(CompBuf *dst, CompBuf *src, float kr, float kg, float kb
                                if (db) colp[x][2] = 2.f*tc[2] / (float)db;
        
                                /* set alpha */
-                               colp[x][3]= 1.0f;
+                               colp[x][3] = 1.0f;
                        }
                }
        }
index 4cc927aaa337cd190d4204fc8201a4ca0f59691f..57d94d6cb4d34337df516d0c4048e5352e53ac02 100644 (file)
 
 
 /* **************** LEVELS ******************** */
-static bNodeSocketTemplate cmp_node_view_levels_in[]= {
+static bNodeSocketTemplate cmp_node_view_levels_in[] = {
        {       SOCK_RGBA, 1, N_("Image"), 0.0f, 0.0f, 0.0f, 1.0f},
        {       -1, 0, ""       }
 };
 
-static bNodeSocketTemplate cmp_node_view_levels_out[]={
+static bNodeSocketTemplate cmp_node_view_levels_out[] = {
        {SOCK_FLOAT, 0, N_("Mean")},
        {SOCK_FLOAT, 0, N_("Std Dev")},
        {-1, 0, ""}
@@ -300,9 +300,9 @@ static void node_composit_exec_view_levels(void *data, bNode *node, bNodeStack *
 #endif
 
        if (out[0]->hasoutput)
-                       out[0]->vec[0]= mean;
+                       out[0]->vec[0] = mean;
        if (out[1]->hasoutput)
-                       out[1]->vec[0]= std_dev;
+                       out[1]->vec[0] = std_dev;
 
        generate_preview(data, node, histogram);
 
index 61cd4493f396ee34b23e46aa474c0875c502bb84..ed232933139229d9f03f1580b0175d028b513a4e 100644 (file)
 
 
 /* ******************* Luma Matte Node ********************************* */
-static bNodeSocketTemplate cmp_node_luma_matte_in[]={
+static bNodeSocketTemplate cmp_node_luma_matte_in[] = {
        {SOCK_RGBA, 1, N_("Image"), 1.0f, 1.0f, 1.0f, 1.0f},
        {-1, 0, ""}
 };
 
-static bNodeSocketTemplate cmp_node_luma_matte_out[]={
+static bNodeSocketTemplate cmp_node_luma_matte_out[] = {
        {SOCK_RGBA, 0, N_("Image")},
        {SOCK_FLOAT, 0, N_("Matte")},
        {-1, 0, ""}
index e6c9d72294fd72519d1acd5fb251907e3e0b4649..40092a84367a9dd94f1176595192dd9e2083b504 100644 (file)
 
 /* **************** Map UV  ******************** */
 
-static bNodeSocketTemplate cmp_node_mapuv_in[]= {
+static bNodeSocketTemplate cmp_node_mapuv_in[] = {
        {       SOCK_RGBA, 1, N_("Image"),                      1.0f, 1.0f, 1.0f, 1.0f},
        {       SOCK_VECTOR, 1, N_("UV"),                       1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_NONE},
        {       -1, 0, ""       }
 };
-static bNodeSocketTemplate cmp_node_mapuv_out[]= {
+static bNodeSocketTemplate cmp_node_mapuv_out[] = {
        {       SOCK_RGBA, 0, N_("Image")},
        {       -1, 0, ""       }
 };
index be69c11b35f91deeac284ed6cadc84ffc214d0c0..677d5bd501399b567a2ef90f9f727e6a7eafed41 100644 (file)
 #include "node_composite_util.h"
 
 /* **************** MAP VALUE ******************** */
-static bNodeSocketTemplate cmp_node_map_value_in[]= {
+static bNodeSocketTemplate cmp_node_map_value_in[] = {
        {       SOCK_FLOAT, 1, N_("Value"),                     1.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, PROP_NONE},
        {       -1, 0, ""       }
 };
-static bNodeSocketTemplate cmp_node_map_value_out[]= {
+static bNodeSocketTemplate cmp_node_map_value_out[] = {
        {       SOCK_FLOAT, 0, N_("Value")},
        {       -1, 0, ""       }
 };
@@ -48,13 +48,13 @@ static void do_map_value(bNode *node, float *out, float *src)
 {
        TexMapping *texmap= node->storage;
        
-       out[0]= (src[0] + texmap->loc[0])*texmap->size[0];
+       out[0] = (src[0] + texmap->loc[0])*texmap->size[0];
        if (texmap->flag & TEXMAP_CLIP_MIN)
                if (out[0]<texmap->min[0])
-                       out[0]= texmap->min[0];
+                       out[0] = texmap->min[0];
        if (texmap->flag & TEXMAP_CLIP_MAX)
                if (out[0]>texmap->max[0])
-                       out[0]= texmap->max[0];
+                       out[0] = texmap->max[0];
 }
 
 static void node_composit_exec_map_value(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out)
index 96504b213656c56c3f8f118121b5be331f90c9de..c99e12a95b994a13667a2291784a286d9f4b5024 100644 (file)
 #include "node_composite_util.h"
 
 /* **************** SCALAR MATH ******************** */ 
-static bNodeSocketTemplate cmp_node_math_in[]= { 
+static bNodeSocketTemplate cmp_node_math_in[] = {
        { SOCK_FLOAT, 1, N_("Value"), 0.5f, 0.5f, 0.5f, 1.0f, -10000.0f, 10000.0f, PROP_NONE},
        { SOCK_FLOAT, 1, N_("Value"), 0.5f, 0.5f, 0.5f, 1.0f, -10000.0f, 10000.0f, PROP_NONE},
        { -1, 0, "" }
 };
 
-static bNodeSocketTemplate cmp_node_math_out[]= { 
+static bNodeSocketTemplate cmp_node_math_out[] = {
        { SOCK_FLOAT, 0, N_("Value")},
        { -1, 0, "" }
 };
@@ -50,63 +50,63 @@ static void do_math(bNode *node, float *out, float *in, float *in2)
 {
        switch (node->custom1) {
        case 0: /* Add */
-               out[0]= in[0] + in2[0]; 
+               out[0] = in[0] + in2[0];
                break; 
        case 1: /* Subtract */
-               out[0]= in[0] - in2[0];
+               out[0] = in[0] - in2[0];
                break; 
        case 2: /* Multiply */
-               out[0]= in[0] * in2[0]; 
+               out[0] = in[0] * in2[0];
                break; 
        case 3: /* Divide */
                {
                        if (in2[0]==0)  /* We don't want to divide by zero. */
-                               out[0]= 0.0;
+                               out[0] = 0.0;
                        else
-                               out[0]= in[0] / in2[0];
+                               out[0] = in[0] / in2[0];
                        }
                break;
        case 4: /* Sine */
-               out[0]= sin(in[0]);
+               out[0] = sin(in[0]);
                break;
        case 5: /* Cosine */
-               out[0]= cos(in[0]);
+               out[0] = cos(in[0]);
                break;
        case 6: /* Tangent */
-               out[0]= tan(in[0]);
+               out[0] = tan(in[0]);
                break;
        case 7: /* Arc-Sine */
                {
                        /* Can't do the impossible... */
                        if (in[0] <= 1 && in[0] >= -1 )
-                               out[0]= asin(in[0]);
+                               out[0] = asin(in[0]);
                        else
-                               out[0]= 0.0;
+                               out[0] = 0.0;
                }
                break;
        case 8: /* Arc-Cosine */
                {
                        /* Can't do the impossible... */
                        if ( in[0] <= 1 && in[0] >= -1 )
-                               out[0]= acos(in[0]);
+                               out[0] = acos(in[0]);
                        else
-                               out[0]= 0.0;
+                               out[0] = 0.0;
                }
                break;
        case 9: /* Arc-Tangent */
-               out[0]= atan(in[0]);
+               out[0] = atan(in[0]);
                break;
        case 10: /* Power */
                {
                        /* Only raise negative numbers by full integers */
                        if ( in[0] >= 0 ) {
-                               out[0]= pow(in[0], in2[0]);
+                               out[0] = pow(in[0], in2[0]);
                        }
                        else {
                                float y_mod_1 = fmod(in2[0], 1);
                                /* if input value is not nearly an integer, fall back to zero, nicer than straight rounding */
                                if (y_mod_1 > 0.999f || y_mod_1 < 0.001f) {
-                                       out[0]= powf(in[0], floorf(in2[0] + 0.5f));
+                                       out[0] = powf(in[0], floorf(in2[0] + 0.5f));
                                }
                                else {
                                        out[0] = 0.0f;
@@ -118,50 +118,50 @@ static void do_math(bNode *node, float *out, float *in, float *in2)
                {
                        /* Don't want any imaginary numbers... */
                        if ( in[0] > 0  && in2[0] > 0 )
-                               out[0]= log(in[0]) / log(in2[0]);
+                               out[0] = log(in[0]) / log(in2[0]);
                        else
-                               out[0]= 0.0;
+                               out[0] = 0.0;
                }
                break;
        case 12: /* Minimum */
                {
                        if ( in[0] < in2[0] )
-                               out[0]= in[0];
+                               out[0] = in[0];
                        else
-                               out[0]= in2[0];
+                               out[0] = in2[0];
                }
                break;
        case 13: /* Maximum */
                {
                        if ( in[0] > in2[0] )
-                               out[0]= in[0];
+                               out[0] = in[0];
                        else
-                               out[0]= in2[0];
+                               out[0] = in2[0];
                }
                break;
        case 14: /* Round */
                {
                        /* round by the second value */
                        if ( in2[0] != 0.0f )
-                               out[0]= floorf(in[0] / in2[0] + 0.5f) * in2[0];
+                               out[0] = floorf(in[0] / in2[0] + 0.5f) * in2[0];
                        else
-                               out[0]= floorf(in[0] + 0.5f);
+                               out[0] = floorf(in[0] + 0.5f);
                }
                break;
        case 15: /* Less Than */
                {
                        if ( in[0] < in2[0] )
-                               out[0]= 1.0f;
+                               out[0] = 1.0f;
                        else
-                               out[0]= 0.0f;
+                               out[0] = 0.0f;
                }
                break;
        case 16: /* Greater Than */
                {
                        if ( in[0] > in2[0] )
-                               out[0]= 1.0f;
+                               out[0] = 1.0f;
                        else
-                               out[0]= 0.0f;
+                               out[0] = 0.0f;
                }
                break;
        }
index e2c9a5abcb179f8656ddff4df3fbf44a21551b68..5d3ee480612fe20996915849d697a20299901562 100644 (file)
 #include "node_composite_util.h"
 
 /* **************** MIX RGB ******************** */
-static bNodeSocketTemplate cmp_node_mix_rgb_in[]= {
+static bNodeSocketTemplate cmp_node_mix_rgb_in[] = {
        {       SOCK_FLOAT, 1, N_("Fac"),                       1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 5.0f, PROP_FACTOR},
        {       SOCK_RGBA, 1, N_("Image"),                      1.0f, 1.0f, 1.0f, 1.0f},
        {       SOCK_RGBA, 1, N_("Image"),                      1.0f, 1.0f, 1.0f, 1.0f},
        {       -1, 0, ""       }
 };
-static bNodeSocketTemplate cmp_node_mix_rgb_out[]= {
+static bNodeSocketTemplate cmp_node_mix_rgb_out[] = {
        {       SOCK_RGBA, 0, N_("Image")},
        {       -1, 0, ""       }
 };
@@ -55,7 +55,7 @@ static void do_mix_rgb(bNode *node, float *out, float *in1, float *in2, float *f
        else
                ramp_blend(node->custom1, col, fac[0], in2);
        copy_v3_v3(out, col);
-       out[3]= in1[3];
+       out[3] = in1[3];
 }
 
 static void node_composit_exec_mix_rgb(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
index 6f1e86e27600a544f4063117d8c3fb55d02cfda8..93fd7ca1c1bd3b8c3a4a28b87b19f38c702b577d 100644 (file)
 
 
 /* **************** NORMAL  ******************** */
-static bNodeSocketTemplate cmp_node_normal_in[]= {
+static bNodeSocketTemplate cmp_node_normal_in[] = {
        {       SOCK_VECTOR, 1, N_("Normal"),   0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f, PROP_DIRECTION},
        {       -1, 0, ""       }
 };
 
-static bNodeSocketTemplate cmp_node_normal_out[]= {
+static bNodeSocketTemplate cmp_node_normal_out[] = {
        {       SOCK_VECTOR, 0, N_("Normal")},
        {       SOCK_FLOAT, 0, N_("Dot")},
        {       -1, 0, ""       }
@@ -53,7 +53,7 @@ static void do_normal(bNode *node, float *out, float *in)
        float *nor= ((bNodeSocketValueVector*)sock->default_value)->value;
        
        /* render normals point inside... the widget points outside */
-       out[0]= -dot_v3v3(nor, in);
+       out[0] = -dot_v3v3(nor, in);
 }
 
 /* generates normal, does dot product */
@@ -68,7 +68,7 @@ static void node_composit_exec_normal(void *UNUSED(data), bNode *node, bNodeStac
        if (in[0]->data==NULL) {
                copy_v3_v3(out[0]->vec, nor);
                /* render normals point inside... the widget points outside */
-               out[1]->vec[0]= -dot_v3v3(out[0]->vec, in[0]->vec);
+               out[1]->vec[0] = -dot_v3v3(out[0]->vec, in[0]->vec);
        }
        else if (out[1]->hasoutput) {
                /* make output size of input image */
index 1d2312d8280f2b3a8c20ca3850909eb3167403cf..19b543dce5d861e41c7d5f03269262a2fd9710e4 100644 (file)
 
 
 /* **************** NORMALIZE single channel, useful for Z buffer ******************** */
-static bNodeSocketTemplate cmp_node_normalize_in[]= {
+static bNodeSocketTemplate cmp_node_normalize_in[] = {
        {   SOCK_FLOAT, 1, N_("Value"),         1.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, PROP_NONE},
        {   -1, 0, ""   }
 };
-static bNodeSocketTemplate cmp_node_normalize_out[]= {
+static bNodeSocketTemplate cmp_node_normalize_out[] = {
        {   SOCK_FLOAT, 0, N_("Value")},
        {   -1, 0, ""   }
 };
index d791983b069972991451add8478e613b72edbc7f..7f7b7692b02c4e1c2a4f978391dca9c4153ae8d6 100644 (file)
 
 /* **************** Premul and Key Alpha Convert ******************** */
 
-static bNodeSocketTemplate cmp_node_premulkey_in[]= {
+static bNodeSocketTemplate cmp_node_premulkey_in[] = {
        {       SOCK_RGBA, 1, N_("Image"),                      1.0f, 1.0f, 1.0f, 1.0f},
        {       -1, 0, ""       }
 };
-static bNodeSocketTemplate cmp_node_premulkey_out[]= {
+static bNodeSocketTemplate cmp_node_premulkey_out[] = {
        {       SOCK_RGBA, 0, N_("Image")},
        {       -1, 0, ""       }
 };
index 65c1dcdb7bb6f56cbb00cb9207faaeb02c3e50c6..54fba650783a0457e5c3c9a3af649f5d85723ccd 100644 (file)
@@ -34,7 +34,7 @@
 
 
 /* **************** RGB ******************** */
-static bNodeSocketTemplate cmp_node_rgb_out[]= {
+static bNodeSocketTemplate cmp_node_rgb_out[] = {
        {       SOCK_RGBA, 0, N_("RGBA"),                       0.5f, 0.5f, 0.5f, 1.0f},
        {       -1, 0, ""       }
 };
index 8968fd5fb3aa1494437cba61cd426eff0c536dd9..9a76764b97ea2f75278ab8d1a44975f6fa94589b 100644 (file)
 
 /* **************** Rotate  ******************** */
 
-static bNodeSocketTemplate cmp_node_rotate_in[]= {
+static bNodeSocketTemplate cmp_node_rotate_in[] = {
        {       SOCK_RGBA, 1, N_("Image"),                      1.0f, 1.0f, 1.0f, 1.0f},
        {       SOCK_FLOAT, 1, N_("Degr"),                      0.0f, 0.0f, 0.0f, 0.0f, -10000.0f, 10000.0f, PROP_ANGLE},
        {       -1, 0, ""       }
 };
-static bNodeSocketTemplate cmp_node_rotate_out[]= {
+static bNodeSocketTemplate cmp_node_rotate_out[] = {
        {       SOCK_RGBA, 0, N_("Image")},
        {       -1, 0, ""       }
 };
index 97150020cfbdcdfc505bc21f3b7333d737327144..f1a754937183bdbae7b4d553acb29cd09fdacefa 100644 (file)
 
 
 /* **************** SEPARATE HSVA ******************** */
-static bNodeSocketTemplate cmp_node_sephsva_in[]= {
+static bNodeSocketTemplate cmp_node_sephsva_in[] = {
        {       SOCK_RGBA, 1, N_("Image"),                      1.0f, 1.0f, 1.0f, 1.0f},
        {       -1, 0, ""       }
 };
-static bNodeSocketTemplate cmp_node_sephsva_out[]= {
+static bNodeSocketTemplate cmp_node_sephsva_out[] = {
        {       SOCK_FLOAT, 0, N_("H")},
        {       SOCK_FLOAT, 0, N_("S")},
        {       SOCK_FLOAT, 0, N_("V")},
@@ -54,10 +54,10 @@ static void do_sephsva(bNode *UNUSED(node), float *out, float *in)
        
        rgb_to_hsv(in[0], in[1], in[2], &h, &s, &v);
        
-       out[0]= h;
-       out[1]= s;
-       out[2]= v;
-       out[3]= in[3];
+       out[0] = h;
+       out[1] = s;
+       out[2] = v;
+       out[3] = in[3];
 }
 
 static void node_composit_exec_sephsva(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out)
@@ -126,7 +126,7 @@ static bNodeSocketTemplate cmp_node_combhsva_in[] = {
        {       SOCK_FLOAT, 1, N_("A"),                 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_NONE},
        {       -1, 0, ""       }
 };
-static bNodeSocketTemplate cmp_node_combhsva_out[]= {
+static bNodeSocketTemplate cmp_node_combhsva_out[] = {
        {       SOCK_RGBA, 0, N_("Image")},
        {       -1, 0, ""       }
 };
index aaa10d45445b86dc11e7853aca3c050f1f16902b..83b2c7310200030a2a9cbffbd9a4b1b3df21d749 100644 (file)
 #include "node_composite_util.h"
 
 /* **************** SEPARATE RGBA ******************** */
-static bNodeSocketTemplate cmp_node_seprgba_in[]= {
+static bNodeSocketTemplate cmp_node_seprgba_in[] = {
        {       SOCK_RGBA, 1, N_("Image"),                      1.0f, 1.0f, 1.0f, 1.0f},
        {       -1, 0, ""       }
 };
-static bNodeSocketTemplate cmp_node_seprgba_out[]= {
+static bNodeSocketTemplate cmp_node_seprgba_out[] = {
        {       SOCK_FLOAT, 0, N_("R")},
        {       SOCK_FLOAT, 0, N_("G")},
        {       SOCK_FLOAT, 0, N_("B")},
@@ -98,14 +98,14 @@ void register_node_type_cmp_seprgba(bNodeTreeType *ttype)
 
 
 /* **************** COMBINE RGBA ******************** */
-static bNodeSocketTemplate cmp_node_combrgba_in[]= {
+static bNodeSocketTemplate cmp_node_combrgba_in[] = {
        {       SOCK_FLOAT, 1, N_("R"),                 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_NONE},
        {       SOCK_FLOAT, 1, N_("G"),                 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_NONE},
        {       SOCK_FLOAT, 1, N_("B"),                 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_NONE},
        {       SOCK_FLOAT, 1, N_("A"),                 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_NONE},
        {       -1, 0, ""       }
 };
-static bNodeSocketTemplate cmp_node_combrgba_out[]= {
+static bNodeSocketTemplate cmp_node_combrgba_out[] = {
        {       SOCK_RGBA, 0, N_("Image")},
        {       -1, 0, ""       }
 };
index 0d862d063f37c6776416e1ca30935613fd2b7903..982d674708ca81766059fede67bb5464b9bd5315 100644 (file)
 
 
 /* **************** SEPARATE YCCA ******************** */
-static bNodeSocketTemplate cmp_node_sepycca_in[]= {
+static bNodeSocketTemplate cmp_node_sepycca_in[] = {
        {  SOCK_RGBA, 1, N_("Image"),        1.0f, 1.0f, 1.0f, 1.0f},
        {  -1, 0, ""   }
 };
-static bNodeSocketTemplate cmp_node_sepycca_out[]= {
+static bNodeSocketTemplate cmp_node_sepycca_out[] = {
        {  SOCK_FLOAT, 0, N_("Y")},
        {  SOCK_FLOAT, 0, N_("Cb")},
        {  SOCK_FLOAT, 0, N_("Cr")},
@@ -55,10 +55,10 @@ static void do_sepycca_601(bNode *UNUSED(node), float *out, float *in)
        rgb_to_ycc(in[0], in[1], in[2], &y, &cb, &cr, BLI_YCC_ITU_BT601);
        
        /*divided by 255 to normalize for viewing in */
-       out[0]=  y/255.0f;
-       out[1]= cb/255.0f;
-       out[2]= cr/255.0f;
-       out[3]= in[3];
+       out[0] =  y/255.0f;
+       out[1] = cb/255.0f;
+       out[2] = cr/255.0f;
+       out[3] = in[3];
 }
 
 static void do_sepycca_709(bNode *UNUSED(node), float *out, float *in)
@@ -68,10 +68,10 @@ static void do_sepycca_709(bNode *UNUSED(node), float *out, float *in)
        rgb_to_ycc(in[0], in[1], in[2], &y, &cb, &cr, BLI_YCC_ITU_BT709);
        
        /*divided by 255 to normalize for viewing in */
-       out[0]=  y/255.0f;
-       out[1]= cb/255.0f;
-       out[2]= cr/255.0f;
-       out[3]= in[3];
+       out[0] =  y/255.0f;
+       out[1] = cb/255.0f;
+       out[2] = cr/255.0f;
+       out[3] = in[3];
 }
 
 static void do_sepycca_jfif(bNode *UNUSED(node), float *out, float *in)
@@ -81,10 +81,10 @@ static void do_sepycca_jfif(bNode *UNUSED(node), float *out, float *in)
        rgb_to_ycc(in[0], in[1], in[2], &y, &cb, &cr, BLI_YCC_JFIF_0_255);
        
        /*divided by 255 to normalize for viewing in */
-       out[0]=  y/255.0f;
-       out[1]= cb/255.0f;
-       out[2]= cr/255.0f;
-       out[3]= in[3];
+       out[0] =  y/255.0f;
+       out[1] = cb/255.0f;
+       out[2] = cr/255.0f;
+       out[3] = in[3];
 }
 
 static void node_composit_exec_sepycca(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out)
@@ -167,14 +167,14 @@ void register_node_type_cmp_sepycca(bNodeTreeType *ttype)
 
 
 /* **************** COMBINE YCCA ******************** */
-static bNodeSocketTemplate cmp_node_combycca_in[]= {
+static bNodeSocketTemplate cmp_node_combycca_in[] = {
        {       SOCK_FLOAT, 1, N_("Y"),                 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_NONE},
        {       SOCK_FLOAT, 1, N_("Cb"),                        0.5f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_NONE},
        {       SOCK_FLOAT, 1, N_("Cr"),                        0.5f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_NONE},
        {       SOCK_FLOAT, 1, N_("A"),                 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_NONE},
        {       -1, 0, ""       }
 };
-static bNodeSocketTemplate cmp_node_combycca_out[]= {
+static bNodeSocketTemplate cmp_node_combycca_out[] = {
        {       SOCK_RGBA, 0, N_("Image")},
        {       -1, 0, ""       }
 };
index 9b8c805b0f098dc2a8425a2e751e56f14179212b..0a9575971b4369e158776db48e3511c84df36057 100644 (file)
 
 
 /* **************** SEPARATE YUVA ******************** */
-static bNodeSocketTemplate cmp_node_sepyuva_in[]= {
+static bNodeSocketTemplate cmp_node_sepyuva_in[] = {
        {  SOCK_RGBA, 1, N_("Image"),        1.0f, 1.0f, 1.0f, 1.0f},
        {  -1, 0, ""   }
 };
-static bNodeSocketTemplate cmp_node_sepyuva_out[]= {
+static bNodeSocketTemplate cmp_node_sepyuva_out[] = {
        {  SOCK_FLOAT, 0, N_("Y")},
        {  SOCK_FLOAT, 0, N_("U")},
        {  SOCK_FLOAT, 0, N_("V")},
@@ -54,10 +54,10 @@ static void do_sepyuva(bNode *UNUSED(node), float *out, float *in)
        
        rgb_to_yuv(in[0], in[1], in[2], &y, &u, &v);
        
-       out[0]= y;
-       out[1]= u;
-       out[2]= v;
-       out[3]= in[3];
+       out[0] = y;
+       out[1] = u;
+       out[2] = v;
+       out[3] = in[3];
 }
 
 static void node_composit_exec_sepyuva(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out)
@@ -121,14 +121,14 @@ void register_node_type_cmp_sepyuva(bNodeTreeType *ttype)
 
 
 /* **************** COMBINE YUVA ******************** */
-static bNodeSocketTemplate cmp_node_combyuva_in[]= {
+static bNodeSocketTemplate cmp_node_combyuva_in[] = {
        {       SOCK_FLOAT, 1, N_("Y"),                 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_NONE},
        {       SOCK_FLOAT, 1, N_("U"),                 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_NONE},
        {       SOCK_FLOAT, 1, N_("V"),                 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_NONE},
        {       SOCK_FLOAT, 1, N_("A"),                 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_NONE},
        {       -1, 0, ""       }
 };
-static bNodeSocketTemplate cmp_node_combyuva_out[]= {
+static bNodeSocketTemplate cmp_node_combyuva_out[] = {
        {       SOCK_RGBA, 0, N_("Image")},
        {       -1, 0, ""       }
 };
index 503815b74a05a2e1be43549dacfe752f2c24f270..59c104869fee55fbb88933ca2c1d23f0fc375b0c 100644 (file)
 #include "node_composite_util.h"
 
 /* **************** SET ALPHA ******************** */
-static bNodeSocketTemplate cmp_node_setalpha_in[]= {
+static bNodeSocketTemplate cmp_node_setalpha_in[] = {
        {       SOCK_RGBA, 1, N_("Image"),                      0.0f, 0.0f, 0.0f, 1.0f},
        {       SOCK_FLOAT, 1, N_("Alpha"),                     1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_NONE},
        {       -1, 0, ""       }
 };
-static bNodeSocketTemplate cmp_node_setalpha_out[]= {
+static bNodeSocketTemplate cmp_node_setalpha_out[] = {
        {       SOCK_RGBA, 0, N_("Image")},
        {       -1, 0, ""       }
 };
index f6811f526f767469cbca9ca08c6de97a72480a90..70c1bf8f23fe3186b1bce99fcbe856a6b3f97e80 100644 (file)
@@ -33,7 +33,7 @@
 #include "node_composite_util.h"
 
 /* **************** SPLIT VIEWER ******************** */
-static bNodeSocketTemplate cmp_node_splitviewer_in[]= {
+static bNodeSocketTemplate cmp_node_splitviewer_in[] = {
        {       SOCK_RGBA, 1, N_("Image"),              0.0f, 0.0f, 0.0f, 1.0f},
        {       SOCK_RGBA, 1, N_("Image"),              0.0f, 0.0f, 0.0f, 1.0f},
        {       -1, 0, ""       }
index fdf0b38e8446fa74db4545de1b92833d59590b4d..1787e075a14a95a885a2b5adfbaa1f4773b85fff 100644 (file)
 
 /* **************** Translate  ******************** */
 
-static bNodeSocketTemplate cmp_node_stabilize2d_in[]= {
+static bNodeSocketTemplate cmp_node_stabilize2d_in[] = {
        {       SOCK_RGBA, 1, N_("Image"),                      0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
        {       -1, 0, ""       }
 };
 
-static bNodeSocketTemplate cmp_node_stabilize2d_out[]= {
+static bNodeSocketTemplate cmp_node_stabilize2d_out[] = {
        {       SOCK_RGBA, 0, N_("Image")},
        {       -1, 0, ""       }
 };
index 258fac18c117d72b9d324575bf50c4de475afdb9..7f9127c969f9408383c17c8c48918ae3fdd5b04c 100644 (file)
 #include "../node_composite_util.h"
 
 /* **************** MIX RGB ******************** */
-static bNodeSocketTemplate cmp_node_switch_in[]= {
+static bNodeSocketTemplate cmp_node_switch_in[] = {
        {       SOCK_RGBA, 1, N_("Off"),                0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
        {       SOCK_RGBA, 1, N_("On"),                 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
        {       -1, 0, ""       }
 };
 
-static bNodeSocketTemplate cmp_node_switch_out[]= {
+static bNodeSocketTemplate cmp_node_switch_out[] = {
        {       SOCK_RGBA, 0, N_("Image"),                      0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
        {       -1, 0, ""       }
 };
index 01baa39807a2e4411c8b6b63247623c122259524..b6518c4863802fb33084cf9db95b02f55dd86493 100644 (file)
 #include "node_composite_util.h"
 
 /* **************** TEXTURE ******************** */
-static bNodeSocketTemplate cmp_node_texture_in[]= {
+static bNodeSocketTemplate cmp_node_texture_in[] = {
        {       SOCK_VECTOR, 1, N_("Offset"),           0.0f, 0.0f, 0.0f, 0.0f, -2.0f, 2.0f, PROP_TRANSLATION},
        {       SOCK_VECTOR, 1, N_("Scale"),            1.0f, 1.0f, 1.0f, 1.0f, -10.0f, 10.0f, PROP_XYZ},
        {       -1, 0, ""       }
 };
-static bNodeSocketTemplate cmp_node_texture_out[]= {
+static bNodeSocketTemplate cmp_node_texture_out[] = {
        {       SOCK_FLOAT, 0, N_("Value")},
        {       SOCK_RGBA, 0, N_("Color")},
        {       -1, 0, ""       }
@@ -51,28 +51,28 @@ static void texture_procedural(CompBuf *cbuf, float *out, float xco, float yco)
 {
        bNode *node= cbuf->node;
        TexResult texres= {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, NULL};
-       float vec[3], *size, nor[3]={0.0f, 0.0f, 0.0f}, col[4];
+       float vec[3], *size, nor[3] = {0.0f, 0.0f, 0.0f}, col[4];
        int retval, type= cbuf->procedural_type;
        
        size= cbuf->procedural_size;
        
-       vec[0]= size[0]*(xco + cbuf->procedural_offset[0]);
-       vec[1]= size[1]*(yco + cbuf->procedural_offset[1]);
-       vec[2]= size[2]*cbuf->procedural_offset[2];
+       vec[0] = size[0]*(xco + cbuf->procedural_offset[0]);
+       vec[1] = size[1]*(yco + cbuf->procedural_offset[1]);
+       vec[2] = size[2]*cbuf->procedural_offset[2];
        
        retval= multitex_ext((Tex *)node->id, vec, NULL, NULL, 0, &texres);
        
        if (type==CB_VAL) {
                if (texres.talpha)
-                       col[0]= texres.ta;
+                       col[0] = texres.ta;
                else
-                       col[0]= texres.tin;
+                       col[0] = texres.tin;
        }
        else if (type==CB_RGBA) {
                if (texres.talpha)
-                       col[3]= texres.ta;
+                       col[3] = texres.ta;
                else
-                       col[3]= texres.tin;
+                       col[3] = texres.tin;
                
                if ((retval & TEX_RGB)) {
                        copy_v3_v3(col, &texres.tr);
index 5e4efe2f3b1f280b18a1e5f7f2bbbbdf8db29cf9..00b1a5514dc6fbe509b1126c00cac97c0ccde33c 100644 (file)
 
 #include "node_composite_util.h"
 
-static bNodeSocketTemplate cmp_node_tonemap_in[]= {
+static bNodeSocketTemplate cmp_node_tonemap_in[] = {
        {       SOCK_RGBA, 1, N_("Image"),                      1.0f, 1.0f, 1.0f, 1.0f},
        {       -1, 0, ""       }
 };
-static bNodeSocketTemplate cmp_node_tonemap_out[]= {
+static bNodeSocketTemplate cmp_node_tonemap_out[] = {
        {       SOCK_RGBA, 0, N_("Image")},
        {       -1, 0, ""       }
 };
index 649902ff9085bd7b21095f9f54be1d4f7454031f..1c2963a2f08c3788b6f5d76294b8fc935488232c 100644 (file)
 
 /* **************** Translate  ******************** */
 
-static bNodeSocketTemplate cmp_node_translate_in[]= {
+static bNodeSocketTemplate cmp_node_translate_in[] = {
        {       SOCK_RGBA, 1, N_("Image"),                      1.0f, 1.0f, 1.0f, 1.0f},
        {       SOCK_FLOAT, 1, N_("X"), 0.0f, 0.0f, 0.0f, 0.0f, -10000.0f, 10000.0f, PROP_NONE},
        {       SOCK_FLOAT, 1, N_("Y"), 0.0f, 0.0f, 0.0f, 0.0f, -10000.0f, 10000.0f, PROP_NONE},
        {       -1, 0, ""       }
 };
-static bNodeSocketTemplate cmp_node_translate_out[]= {
+static bNodeSocketTemplate cmp_node_translate_out[] = {
        {       SOCK_RGBA, 0, N_("Image")},
        {       -1, 0, ""       }
 };
index 87a776c7bea918139ac025e97696186feab33d6a..5c111998b1803114e5d95ce153e333ded6d9e0aa 100644 (file)
 
 
 /* **************** VALTORGB ******************** */
-static bNodeSocketTemplate cmp_node_valtorgb_in[]= {
+static bNodeSocketTemplate cmp_node_valtorgb_in[] = {
        {       SOCK_FLOAT, 1, N_("Fac"),                       0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_FACTOR},
        {       -1, 0, ""       }
 };
-static bNodeSocketTemplate cmp_node_valtorgb_out[]= {
+static bNodeSocketTemplate cmp_node_valtorgb_out[] = {
        {       SOCK_RGBA, 0, N_("Image")},
        {       SOCK_FLOAT, 0, N_("Alpha")},
        {       -1, 0, ""       }
@@ -106,11 +106,11 @@ void register_node_type_cmp_valtorgb(bNodeTreeType *ttype)
 
 
 /* **************** RGBTOBW ******************** */
-static bNodeSocketTemplate cmp_node_rgbtobw_in[]= {
+static bNodeSocketTemplate cmp_node_rgbtobw_in[] = {
        {       SOCK_RGBA, 1, N_("Image"),                      0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
        {       -1, 0, ""       }
 };
-static bNodeSocketTemplate cmp_node_rgbtobw_out[]= {
+static bNodeSocketTemplate cmp_node_rgbtobw_out[] = {
        {       SOCK_FLOAT, 0, N_("Val"),                       0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
        {       -1, 0, ""       }
 };
index 63ab4fcb58f7db9a0a4429604bc559abbee26a1e..2c65fe6be19cd2947cca5699e3e5f7d2de6c2495 100644 (file)
@@ -33,7 +33,7 @@
 #include "node_composite_util.h"
 
 /* **************** VALUE ******************** */
-static bNodeSocketTemplate cmp_node_value_out[]= {
+static bNodeSocketTemplate cmp_node_value_out[] = {
        /* XXX value nodes use the output sockets for buttons, so we need explicit limits here! */
        {       SOCK_FLOAT, 0, N_("Value"), 0.0f, 0.0f, 0.0f, 0.0f, -FLT_MAX, FLT_MAX},
        {       -1, 0, ""       }
@@ -56,7 +56,7 @@ static void node_composit_exec_value(void *UNUSED(data), bNode *node, bNodeStack
        bNodeSocket *sock= node->outputs.first;
        float val= ((bNodeSocketValueFloat*)sock->default_value)->value;
        
-       out[0]->vec[0]= val;
+       out[0]->vec[0] = val;
 }
 
 #endif  /* WITH_COMPOSITOR_LEGACY */
index 3decbe8d2306f6ff0bb77c21db77eecc4bb91c97..8e639aaa35739d0d887a0ff6a5d95d72b6b28ef0 100644 (file)
 
 /* **************** Z COMBINE ******************** */
        /* lazy coder note: node->custom2 is abused to send signal */
-static bNodeSocketTemplate cmp_node_zcombine_in[]= {
+static bNodeSocketTemplate cmp_node_zcombine_in[] = {
        {       SOCK_RGBA, 1, N_("Image"),              1.0f, 1.0f, 1.0f, 1.0f},
        {       SOCK_FLOAT, 1, N_("Z"),                 1.0f, 1.0f, 1.0f, 1.0f, 0.0f, 10000.0f, PROP_NONE},
        {       SOCK_RGBA, 1, N_("Image"),              1.0f, 1.0f, 1.0f, 1.0f},
        {       SOCK_FLOAT, 1, N_("Z"),                 1.0f, 1.0f, 1.0f, 1.0f, 0.0f, 10000.0f, PROP_NONE},
        {       -1, 0, ""       }
 };
-static bNodeSocketTemplate cmp_node_zcombine_out[]= {
+static bNodeSocketTemplate cmp_node_zcombine_out[] = {
        {       SOCK_RGBA, 0, N_("Image")},
        {       SOCK_FLOAT, 0, N_("Z")},
        {       -1, 0, ""       }
@@ -60,10 +60,10 @@ static void do_zcombine(bNode *node, float *out, float *src1, float *z1, float *
                        // use alpha in combine operation
                        alpha= src1[3];
                        malpha= 1.0f - alpha;
-                       out[0]= malpha*src2[0] + alpha*src1[0];
-                       out[1]= malpha*src2[1] + alpha*src1[1];
-                       out[2]= malpha*src2[2] + alpha*src1[2];
-                       out[3]= malpha*src2[3] + alpha*src1[3];
+                       out[0] = malpha*src2[0] + alpha*src1[0];
+                       out[1] = malpha*src2[1] + alpha*src1[1];
+                       out[2] = malpha*src2[2] + alpha*src1[2];
+                       out[3] = malpha*src2[3] + alpha*src1[3];
                }
                else {
                        // do combination based solely on z value
@@ -75,10 +75,10 @@ static void do_zcombine(bNode *node, float *out, float *src1, float *z1, float *
                        // use alpha in combine operation
                        alpha= src2[3];
                        malpha= 1.0f - alpha;
-                       out[0]= malpha*src1[0] + alpha*src2[0];
-                       out[1]= malpha*src1[1] + alpha*src2[1];
-                       out[2]= malpha*src1[2] + alpha*src2[2];
-                       out[3]= malpha*src1[3] + alpha*src2[3];
+                       out[0] = malpha*src1[0] + alpha*src2[0];
+                       out[1] = malpha*src1[1] + alpha*src2[1];
+                       out[2] = malpha*src1[2] + alpha*src2[2];
+                       out[3] = malpha*src1[3] + alpha*src2[3];
                }
                else {
                        // do combination based solely on z value
@@ -111,20 +111,20 @@ static void do_zcombine_add(bNode *node, float *out, float *col1, float *col2, f
                        malpha= 1.0f - alpha;
                
                
-                       out[0]= malpha*col1[0] + alpha*col2[0];
-                       out[1]= malpha*col1[1] + alpha*col2[1];
-                       out[2]= malpha*col1[2] + alpha*col2[2];
-                       out[3]= malpha*col1[3] + alpha*col2[3];
+                       out[0] = malpha*col1[0] + alpha*col2[0];
+                       out[1] = malpha*col1[1] + alpha*col2[1];
+                       out[2] = malpha*col1[2] + alpha*col2[2];
+                       out[3] = malpha*col1[3] + alpha*col2[3];
                }
                else {
                        alpha= col1[3];
                        malpha= 1.0f - alpha;
                
                
-                       out[0]= malpha*col2[0] + alpha*col1[0];
-                       out[1]= malpha*col2[1] + alpha*col1[1];
-                       out[2]= malpha*col2[2] + alpha*col1[2];
-                       out[3]= malpha*col2[3] + alpha*col1[3];
+                       out[0] = malpha*col2[0] + alpha*col1[0];
+                       out[1] = malpha*col2[1] + alpha*col1[1];
+                       out[2] = malpha*col2[2] + alpha*col1[2];
+                       out[3] = malpha*col2[3] + alpha*col1[3];
                }
        }
        else {
@@ -132,10 +132,10 @@ static void do_zcombine_add(bNode *node, float *out, float *col1, float *col2, f
                alpha = *acol;
                malpha= 1.0f - alpha;
                
-               out[0]= malpha*col1[0] + alpha*col2[0];
-               out[1]= malpha*col1[1] + alpha*col2[1];
-               out[2]= malpha*col1[2] + alpha*col2[2];
-               out[3]= malpha*col1[3] + alpha*col2[3];
+               out[0] = malpha*col1[0] + alpha*col2[0];
+               out[1] = malpha*col1[1] + alpha*col2[1];
+               out[2] = malpha*col1[2] + alpha*col2[2];
+               out[3] = malpha*col1[3] + alpha*col2[3];
        }
 }
 
@@ -202,8 +202,8 @@ static void node_composit_exec_zcombine(void *data, bNode *node, bNodeStack **in
                aabuf= MEM_mallocN(cbuf->x*cbuf->y, "aa buf");
                fp= mbuf->rect;
                for (x= cbuf->x*cbuf->y-1; x>=0; x--)
-                       if (fp[x]==0.0f) aabuf[x]= 0;
-                       else aabuf[x]= 255;
+                       if (fp[x]==0.0f) aabuf[x] = 0;
+                       else aabuf[x] = 255;
                
                antialias_tagbuf(cbuf->x, cbuf->y, aabuf);
                
@@ -211,7 +211,7 @@ static void node_composit_exec_zcombine(void *data, bNode *node, bNodeStack **in
                fp= mbuf->rect;
                for (x= cbuf->x*cbuf->y-1; x>=0; x--)
                        if (aabuf[x]>1)
-                               fp[x]= (1.0f/255.0f)*(float)aabuf[x];
+                               fp[x] = (1.0f/255.0f)*(float)aabuf[x];
                
                composit3_pixel_processor(node, stackbuf, in[0]->data, in[0]->vec, in[2]->data, in[2]->vec, mbuf, NULL, 
                                                                  do_zcombine_add, CB_RGBA, CB_RGBA, CB_VAL);
index d01ef2e2d52966bb10afa232aa91f263cad96391..d63a13fad00bd8ab6105e8e0805c2eeaf472747c 100644 (file)
@@ -88,7 +88,7 @@ void node_init_output_index(bNodeSocket *sock, int *index)
 static struct bNodeStack *setup_stack(bNodeStack *stack, bNodeSocket *sock)
 {
        bNodeStack *ns = node_get_socket_stack(stack, sock);
-       float null_value[4]= {0.0f, 0.0f, 0.0f, 0.0f};
+       float null_value[4] = {0.0f, 0.0f, 0.0f, 0.0f};
        
        /* don't mess with remote socket stacks, these are initialized by other nodes! */
        if (sock->link)
index 56704b981beaf222c29eb49ce9fad57857c84889..6130fe72af3dd3b45045a4cd684b0b07796f467f 100644 (file)
@@ -50,9 +50,9 @@ void nodestack_get_vec(float *in, short type_in, bNodeStack *ns)
        }
        else if (type_in==SOCK_VECTOR) {
                if (ns->sockettype==SOCK_FLOAT) {
-                       in[0]= from[0];
-                       in[1]= from[0];
-                       in[2]= from[0];
+                       in[0] = from[0];
+                       in[1] = from[0];
+                       in[2] = from[0];
                }
                else {
                        copy_v3_v3(in, from);
@@ -63,14 +63,14 @@ void nodestack_get_vec(float *in, short type_in, bNodeStack *ns)
                        copy_v4_v4(in, from);
                }
                else if (ns->sockettype==SOCK_FLOAT) {
-                       in[0]= from[0];
-                       in[1]= from[0];
-                       in[2]= from[0];
-                       in[3]= 1.0f;
+                       in[0] = from[0];
+                       in[1] = from[0];
+                       in[2] = from[0];
+                       in[3] = 1.0f;
                }
                else {
                        copy_v3_v3(in, from);
-                       in[3]= 1.0f;
+                       in[3] = 1.0f;
                }
        }
 }
index ee8513a4119a86a1cf67931e744db5341ae0af9b..ec868b2cc38b67d4a73b77a7e3658e855c636b41 100644 (file)
 
 /* **************** OUTPUT ******************** */
 
-static bNodeSocketTemplate sh_node_add_shader_in[]= {
+static bNodeSocketTemplate sh_node_add_shader_in[] = {
        {       SOCK_SHADER, 1, N_("Shader")},
        {       SOCK_SHADER, 1, N_("Shader")},
        {       -1, 0, ""       }
 };
 
-static bNodeSocketTemplate sh_node_add_shader_out[]= {
+static bNodeSocketTemplate sh_node_add_shader_out[] = {
        {       SOCK_SHADER, 0, N_("Shader")},
        {       -1, 0, ""       }
 };
index 9c65323337efebfe6bdf1602015e3fb6eb44429d..9b2ed2f14f075871ae19a40365cfa8ce59524cf6 100644 (file)
@@ -29,7 +29,7 @@
 
 /* **************** OUTPUT ******************** */
 
-static bNodeSocketTemplate sh_node_attribute_out[]= {
+static bNodeSocketTemplate sh_node_attribute_out[] = {
        {       SOCK_RGBA, 0, N_("Color")},
        {       SOCK_VECTOR, 0, N_("Vector"), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
        {       SOCK_FLOAT, 0, N_("Fac"), 0.0f, 0.0f, 0.0f, 0.0f, -FLT_MAX, FLT_MAX},
index 7d13c359a2b691dd5d6f0b6e554653bc8815b6eb..d82c513540c17f733fa1ce95b15f10833f5d5594 100644 (file)
 
 /* **************** OUTPUT ******************** */
 
-static bNodeSocketTemplate sh_node_background_in[]= {
+static bNodeSocketTemplate sh_node_background_in[] = {
        {       SOCK_RGBA, 1, N_("Color"),              0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
        {       SOCK_FLOAT, 1, N_("Strength"),  1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1000000.0f},
        {       -1, 0, ""       }
 };
 
-static bNodeSocketTemplate sh_node_background_out[]= {
+static bNodeSocketTemplate sh_node_background_out[] = {
        {       SOCK_SHADER, 0, N_("Background")},
        {       -1, 0, ""       }
 };
index 2735553cdad9312a0be93eb9e057e58fc21a446d..9c23a29cae945f09c9341a781664a8d7119b27ac 100644 (file)
 
 /* **************** Brigh and contrsast  ******************** */
 
-static bNodeSocketTemplate sh_node_brightcontrast_in[]= {
+static bNodeSocketTemplate sh_node_brightcontrast_in[] = {
        {       SOCK_RGBA, 1, N_("Color"),                      1.0f, 1.0f, 1.0f, 1.0f},
        {       SOCK_FLOAT, 1, N_("Bright"),            0.0f, 0.0f, 0.0f, 0.0f, -100.0f, 100.0f, PROP_NONE},
        {       SOCK_FLOAT, 1, N_("Contrast"),          0.0f, 0.0f, 0.0f, 0.0f, -100.0f, 100.0f, PROP_NONE},
        {       -1, 0, ""       }
 };
 
-static bNodeSocketTemplate sh_node_brightcontrast_out[]= {
+static bNodeSocketTemplate sh_node_brightcontrast_out[] = {
        {       SOCK_RGBA, 0, N_("Color")},
        {       -1, 0, ""       }
 };
index af4b6e1b8d062dc9aaf22923c1cb71350cb8d43d..7e023ff854773dde46d5a74695f10b7022aa912a 100644 (file)
@@ -29,7 +29,7 @@
 
 /* **************** OUTPUT ******************** */
 
-static bNodeSocketTemplate sh_node_bsdf_anisotropic_in[]= {
+static bNodeSocketTemplate sh_node_bsdf_anisotropic_in[] = {
        {       SOCK_RGBA, 1, N_("Color"),                      0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
        {       SOCK_FLOAT, 1, N_("Roughness U"),       0.2f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
        {       SOCK_FLOAT, 1, N_("Roughness V"),       0.2f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
@@ -38,7 +38,7 @@ static bNodeSocketTemplate sh_node_bsdf_anisotropic_in[]= {
        {       -1, 0, ""       }
 };
 
-static bNodeSocketTemplate sh_node_bsdf_anisotropic_out[]= {
+static bNodeSocketTemplate sh_node_bsdf_anisotropic_out[] = {
        {       SOCK_SHADER, 0, N_("BSDF")},
        {       -1, 0, ""       }
 };
index 021373ac40a78bd1584c2459732c8b2d5a7c2635..ad9f197afb84c3870e794e02de10e5fa15f73b2f 100644 (file)
 
 /* **************** OUTPUT ******************** */
 
-static bNodeSocketTemplate sh_node_bsdf_diffuse_in[]= {
+static bNodeSocketTemplate sh_node_bsdf_diffuse_in[] = {
        {       SOCK_RGBA, 1, N_("Color"),              0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
        {       SOCK_FLOAT, 1, N_("Roughness"), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
        {       SOCK_VECTOR, 1, N_("Normal"),   0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f, PROP_NONE, SOCK_HIDE_VALUE},
        {       -1, 0, ""       }
 };
 
-static bNodeSocketTemplate sh_node_bsdf_diffuse_out[]= {
+static bNodeSocketTemplate sh_node_bsdf_diffuse_out[] = {
        {       SOCK_SHADER, 0, N_("BSDF")},
        {       -1, 0, ""       }
 };
index 827e349aca39c42d552fdb4b41f9b2ad466f0a36..9e18809257076257c6d7614b659a46674714cbdc 100644 (file)
@@ -29,7 +29,7 @@
 
 /* **************** OUTPUT ******************** */
 
-static bNodeSocketTemplate sh_node_bsdf_glass_in[]= {
+static bNodeSocketTemplate sh_node_bsdf_glass_in[] = {
        {       SOCK_RGBA, 1, N_("Color"),              0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
        {       SOCK_FLOAT, 1, N_("Roughness"), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
        {       SOCK_FLOAT, 1, N_("IOR"),               1.45f, 0.0f, 0.0f, 0.0f, 1.0f, 1000.0f},
@@ -37,7 +37,7 @@ static bNodeSocketTemplate sh_node_bsdf_glass_in[]= {
        {       -1, 0, ""       }
 };
 
-static bNodeSocketTemplate sh_node_bsdf_glass_out[]= {
+static bNodeSocketTemplate sh_node_bsdf_glass_out[] = {
        {       SOCK_SHADER, 0, N_("BSDF")},
        {       -1, 0, ""       }
 };
index 2c1adb4f0a3d4013f32036b1d4538358959bdd43..5e32930b707d3d892f23b1d5dad01f218a910d20 100644 (file)
 
 /* **************** OUTPUT ******************** */
 
-static bNodeSocketTemplate sh_node_bsdf_glossy_in[]= {
+static bNodeSocketTemplate sh_node_bsdf_glossy_in[] = {
        {       SOCK_RGBA,  1, N_("Color"),             0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
        {       SOCK_FLOAT, 1, N_("Roughness"), 0.2f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
        {       SOCK_VECTOR, 1, N_("Normal"),   0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f, PROP_NONE, SOCK_HIDE_VALUE},
        {       -1, 0, ""       }
 };
 
-static bNodeSocketTemplate sh_node_bsdf_glossy_out[]= {
+static bNodeSocketTemplate sh_node_bsdf_glossy_out[] = {
        {       SOCK_SHADER, 0, N_("BSDF")},
        {       -1, 0, ""       }
 };
index 7412ce81dd1c03a223c09bf63734ab9397e53f87..3c7084886b790455719eb07f46ecbfac4e53684f 100644 (file)
 
 /* **************** OUTPUT ******************** */
 
-static bNodeSocketTemplate sh_node_bsdf_translucent_in[]= {
+static bNodeSocketTemplate sh_node_bsdf_translucent_in[] = {
        {       SOCK_RGBA, 1, N_("Color"),              0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
        {       SOCK_VECTOR, 1, N_("Normal"),   0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f, PROP_NONE, SOCK_HIDE_VALUE},
        {       -1, 0, ""       }
 };
 
-static bNodeSocketTemplate sh_node_bsdf_translucent_out[]= {
+static bNodeSocketTemplate sh_node_bsdf_translucent_out[] = {
        {       SOCK_SHADER, 0, N_("BSDF")},
        {       -1, 0, ""       }
 };
index 8c945abdd0dd81c96284c3f9ef2b6d216c18bac3..7fb452ad78d1efd1984bac6691778a6182ea6eb2 100644 (file)
 
 /* **************** OUTPUT ******************** */
 
-static bNodeSocketTemplate sh_node_bsdf_transparent_in[]= {
+static bNodeSocketTemplate sh_node_bsdf_transparent_in[] = {
        {       SOCK_RGBA, 1, N_("Color"),              1.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f},
        {       -1, 0, ""       }
 };
 
-static bNodeSocketTemplate sh_node_bsdf_transparent_out[]= {
+static bNodeSocketTemplate sh_node_bsdf_transparent_out[] = {
        {       SOCK_SHADER, 0, N_("BSDF")},
        {       -1, 0, ""       }
 };
index a32aec54b320895735ef57b5f8f0637a0d830bfb..a4d25d42d4e164ebccde8e704fa4d94e0a5c6518 100644 (file)
 
 /* **************** OUTPUT ******************** */
 
-static bNodeSocketTemplate sh_node_bsdf_velvet_in[]= {
+static bNodeSocketTemplate sh_node_bsdf_velvet_in[] = {
        {       SOCK_RGBA, 1, N_("Color"),              0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
        {       SOCK_FLOAT, 1, N_("Sigma"),             1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
        {       SOCK_VECTOR, 1, N_("Normal"),   0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f, PROP_NONE, SOCK_HIDE_VALUE},
        {       -1, 0, ""       }
 };
 
-static bNodeSocketTemplate sh_node_bsdf_velvet_out[]= {
+static bNodeSocketTemplate sh_node_bsdf_velvet_out[] = {
        {       SOCK_SHADER, 0, N_("BSDF")},
        {       -1, 0, ""       }
 };
index 665ff582aa8bf9dbea137390fd97baae7dd16a6f..24ed825c36e2823f54f64cd4b6961633f08b94e0 100644 (file)
 
 
 /* **************** BUMP ******************** */ 
-static bNodeSocketTemplate sh_node_bump_in[]= { 
+static bNodeSocketTemplate sh_node_bump_in[] = {
        { SOCK_FLOAT, 1, "Strength",    0.1f, 0.0f, 0.0f, 0.0f, -1000.0f, 1000.0f},
        { SOCK_FLOAT, 1, "Height",              1.0f, 1.0f, 1.0f, 1.0f, -1000.0f, 1000.0f, PROP_NONE, SOCK_HIDE_VALUE},
        { -1, 0, "" }
 };
 
-static bNodeSocketTemplate sh_node_bump_out[]= {
+static bNodeSocketTemplate sh_node_bump_out[] = {
        {       SOCK_VECTOR, 0, "Normal"},
        { -1, 0, "" }
 };
index 17cec8196e8cb13b9287219a1aab8248b963e18f..fd36a94516e74da8bb30a1b67047e8d8995e2440 100644 (file)
@@ -33,7 +33,7 @@
 #include "node_shader_util.h"
 
 /* **************** CAMERA INFO  ******************** */
-static bNodeSocketTemplate sh_node_camera_out[]= {
+static bNodeSocketTemplate sh_node_camera_out[] = {
        {       SOCK_VECTOR, 0, N_("View Vector")},
        {       SOCK_FLOAT, 0, N_("View Z Depth")},
        {       SOCK_FLOAT, 0, N_("View Distance")},
@@ -47,8 +47,8 @@ static void node_shader_exec_camera(void *data, bNode *UNUSED(node), bNodeStack
                ShadeInput *shi= ((ShaderCallData *)data)->shi;  /* Data we need for shading. */
                
                copy_v3_v3(out[0]->vec, shi->co);               /* get view vector */
-               out[1]->vec[0]= fabs(shi->co[2]);               /* get view z-depth */
-               out[2]->vec[0]= normalize_v3(out[0]->vec);      /* get view distance */
+               out[1]->vec[0] = fabs(shi->co[2]);              /* get view z-depth */
+               out[2]->vec[0] = normalize_v3(out[0]->vec);     /* get view distance */
        }
 }
 
index 83cb1d336284f0e52e36813e145959e239e4424b..9fa654c9740869ccce659e6e1b77de2181fdaafc 100644 (file)
 
 
 /* **************** CURVE VEC  ******************** */
-static bNodeSocketTemplate sh_node_curve_vec_in[]= {
+static bNodeSocketTemplate sh_node_curve_vec_in[] = {
        {       SOCK_FLOAT, 0, N_("Fac"),       1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, PROP_FACTOR},
        {       SOCK_VECTOR, 1, N_("Vector"),   0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f, PROP_NONE},
        {       -1, 0, ""       }
 };
 
-static bNodeSocketTemplate sh_node_curve_vec_out[]= {
+static bNodeSocketTemplate sh_node_curve_vec_out[] = {
        {       SOCK_VECTOR, 0, N_("Vector")},
        {       -1, 0, ""       }
 };
@@ -88,13 +88,13 @@ void register_node_type_sh_curve_vec(bNodeTreeType *ttype)
 
 
 /* **************** CURVE RGB  ******************** */
-static bNodeSocketTemplate sh_node_curve_rgb_in[]= {
+static bNodeSocketTemplate sh_node_curve_rgb_in[] = {
        {       SOCK_FLOAT, 1, N_("Fac"),       1.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f, PROP_FACTOR},
        {       SOCK_RGBA, 1, N_("Color"),      0.0f, 0.0f, 0.0f, 1.0f},
        {       -1, 0, ""       }
 };
 
-static bNodeSocketTemplate sh_node_curve_rgb_out[]= {
+static bNodeSocketTemplate sh_node_curve_rgb_out[] = {
        {       SOCK_RGBA, 0, N_("Color")},
        {       -1, 0, ""       }
 };
index 4854d887592f1e5161a1bb35bae862a337e7e477..0c4cb7ed51c3648120ec40f064c53e79b4a3474f 100644 (file)
 
 /* **************** OUTPUT ******************** */
 
-static bNodeSocketTemplate sh_node_emission_in[]= {
+static bNodeSocketTemplate sh_node_emission_in[] = {
        {       SOCK_RGBA, 1, N_("Color"),              0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
        {       SOCK_FLOAT, 1, N_("Strength"),  1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1000000.0f},
        {       -1, 0, ""       }
 };
 
-static bNodeSocketTemplate sh_node_emission_out[]= {
+static bNodeSocketTemplate sh_node_emission_out[] = {
        {       SOCK_SHADER, 0, N_("Emission")},
        {       -1, 0, ""       }
 };
index 610a214901188e3e5eceb3a4803daeda3d3e068d..80913e6b07a685b8bc7c58506574815402891a8e 100644 (file)
 #include "../node_shader_util.h"
 
 /* **************** Fresnel ******************** */
-static bNodeSocketTemplate sh_node_fresnel_in[]= {
+static bNodeSocketTemplate sh_node_fresnel_in[] = {
        {       SOCK_FLOAT, 1, N_("IOR"),       1.45f, 0.0f, 0.0f, 0.0f, 1.0f, 1000.0f},
        {       -1, 0, ""       }
 };
 
-static bNodeSocketTemplate sh_node_fresnel_out[]= {
+static bNodeSocketTemplate sh_node_fresnel_out[] = {
        {       SOCK_FLOAT, 0, N_("Fac"),       0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
        {       -1, 0, ""       }
 };
index 526868f73d35bf33407c4f5dc2b152f70a4cc20b..c49554c44be1c9973f39a2c89a1d734723d2f4ab 100644 (file)
 
 /* **************** Gamma Tools  ******************** */
   
-static bNodeSocketTemplate sh_node_gamma_in[]= {
+static bNodeSocketTemplate sh_node_gamma_in[] = {
        {       SOCK_RGBA, 1, N_("Color"),                      1.0f, 1.0f, 1.0f, 1.0f},
        {       SOCK_FLOAT, 1, N_("Gamma"),                     1.0f, 0.0f, 0.0f, 0.0f, 0.001f, 10.0f, PROP_UNSIGNED},
        {       -1, 0, ""       }
 };
 
-static bNodeSocketTemplate sh_node_gamma_out[]= {
+static bNodeSocketTemplate sh_node_gamma_out[] = {
        {       SOCK_RGBA, 0, N_("Color")},
        {       -1, 0, ""       }
 };
index f23158ab5d42339e18e8682e510e795d5340039f..eb3d462d61618ef3b434dc3c88b42e4cca5ec61d 100644 (file)
@@ -37,7 +37,7 @@
 /* **************** GEOMETRY  ******************** */
 
 /* output socket type definition */
-static bNodeSocketTemplate sh_node_geom_out[]= {
+static bNodeSocketTemplate sh_node_geom_out[] = {
        {       SOCK_VECTOR, 0, N_("Global")},
        {       SOCK_VECTOR, 0, N_("Local")},
        {       SOCK_VECTOR, 0, N_("View")},
@@ -92,12 +92,12 @@ static void node_shader_exec_geom(void *data, bNode *node, bNodeStack **UNUSED(i
                        }
 
                        copy_v3_v3(out[GEOM_OUT_VCOL]->vec, scol->col);
-                       out[GEOM_OUT_VCOL]->vec[3]= scol->col[3];
-                       out[GEOM_OUT_VCOL_ALPHA]->vec[0]= scol->col[3];
+                       out[GEOM_OUT_VCOL]->vec[3] = scol->col[3];
+                       out[GEOM_OUT_VCOL_ALPHA]->vec[0] = scol->col[3];
                }
                else {
                        memcpy(out[GEOM_OUT_VCOL]->vec, defaultvcol, sizeof(defaultvcol));
-                       out[GEOM_OUT_VCOL_ALPHA]->vec[0]= 1.0f;
+                       out[GEOM_OUT_VCOL_ALPHA]->vec[0] = 1.0f;
                }
                
                if (shi->osatex) {
@@ -116,7 +116,7 @@ static void node_shader_exec_geom(void *data, bNode *node, bNodeStack **UNUSED(i
                }
                
                /* front/back, normal flipping was stored */
-               out[GEOM_OUT_FRONTBACK]->vec[0]= (shi->flippednor)? 0.0f: 1.0f;
+               out[GEOM_OUT_FRONTBACK]->vec[0] = (shi->flippednor)? 0.0f: 1.0f;
        }
 }
 
index 2ebd93218d63c634ba6ba1ce8224d01236460f7b..acef885d2d4952b28ff403dea50231c45968aff8 100644 (file)
@@ -29,7 +29,7 @@
 
 /* **************** OUTPUT ******************** */
 
-static bNodeSocketTemplate sh_node_geometry_out[]= {
+static bNodeSocketTemplate sh_node_geometry_out[] = {
        {       SOCK_VECTOR, 0, N_("Position"),                 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
        {       SOCK_VECTOR, 0, N_("Normal"),                   0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
        {       SOCK_VECTOR, 0, N_("Tangent"),                  0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
index dbd4ed8ab6735b962c02cf08b3df789b884ae7d0..18ad4994c9b68141e2de96506027937151b33e2a 100644 (file)
 
 /* **************** OUTPUT ******************** */
 
-static bNodeSocketTemplate sh_node_holdout_in[]= {
+static bNodeSocketTemplate sh_node_holdout_in[] = {
        {       -1, 0, ""       }
 };
 
-static bNodeSocketTemplate sh_node_holdout_out[]= {
+static bNodeSocketTemplate sh_node_holdout_out[] = {
        {       SOCK_SHADER, 0, N_("Holdout")},
        {       -1, 0, ""       }
 };
index b07650e33c067c2df1f70d219760a8dc0ced06a2..b635ad1edd99dc13b3fc17149c07f9ef08756d82 100644 (file)
@@ -34,7 +34,7 @@
 
 
 /* **************** Hue Saturation ******************** */
-static bNodeSocketTemplate sh_node_hue_sat_in[]= {
+static bNodeSocketTemplate sh_node_hue_sat_in[] = {
        {       SOCK_FLOAT, 1, N_("Hue"),                       0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_NONE},
        {       SOCK_FLOAT, 1, N_("Saturation"),                1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 2.0f, PROP_FACTOR},
        {       SOCK_FLOAT, 1, N_("Value"),                     1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 2.0f, PROP_FACTOR},
@@ -42,7 +42,7 @@ static bNodeSocketTemplate sh_node_hue_sat_in[]= {
        {       SOCK_RGBA, 1, N_("Color"),                      0.8f, 0.8f, 0.8f, 1.0f},
        {       -1, 0, ""       }
 };
-static bNodeSocketTemplate sh_node_hue_sat_out[]= {
+static bNodeSocketTemplate sh_node_hue_sat_out[] = {
        {       SOCK_RGBA, 0, N_("Color")},
        {       -1, 0, ""       }
 };
@@ -60,9 +60,9 @@ static void do_hue_sat_fac(bNode *UNUSED(node), float *out, float *hue, float *s
                hsv[2]*= *val;
                hsv_to_rgb(hsv[0], hsv[1], hsv[2], col, col+1, col+2);
                
-               out[0]= mfac*in[0] + *fac*col[0];
-               out[1]= mfac*in[1] + *fac*col[1];
-               out[2]= mfac*in[2] + *fac*col[2];
+               out[0] = mfac*in[0] + *fac*col[0];
+               out[1] = mfac*in[1] + *fac*col[1];
+               out[2] = mfac*in[2] + *fac*col[2];
        }
        else {
                copy_v4_v4(out, in);
index d1b773916d40999de42d7da0b88f711141819caa..2ea858f4e343df7b151356eeffe631f7f396ab6b 100644 (file)
 
 
 /* **************** INVERT ******************** */ 
-static bNodeSocketTemplate sh_node_invert_in[]= { 
+static bNodeSocketTemplate sh_node_invert_in[] = {
        { SOCK_FLOAT, 1, N_("Fac"), 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_FACTOR},
        { SOCK_RGBA, 1, N_("Color"), 0.0f, 0.0f, 0.0f, 1.0f},
        { -1, 0, "" }
 };
 
-static bNodeSocketTemplate sh_node_invert_out[]= { 
+static bNodeSocketTemplate sh_node_invert_out[] = {
        { SOCK_RGBA, 0, N_("Color")},
        { -1, 0, "" }
 };
index 6eacea10b5bf8b7171a1cbc7605551670c541047..3058483ebef3e6b3a63badae54cd525c8316d667 100644 (file)
 
 /* **************** Layer Weight ******************** */
 
-static bNodeSocketTemplate sh_node_layer_weight_in[]= {
+static bNodeSocketTemplate sh_node_layer_weight_in[] = {
        {       SOCK_FLOAT, 1, N_("Blend"),             0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
        {       -1, 0, ""       }
 };
 
-static bNodeSocketTemplate sh_node_layer_weight_out[]= {
+static bNodeSocketTemplate sh_node_layer_weight_out[] = {
        {       SOCK_FLOAT, 0, N_("Fresnel"),   0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
        {       SOCK_FLOAT, 0, N_("Facing"),    0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
        {       -1, 0, ""       }
index aab5fa8060d9658346fb90cd15f2ed9b52df59c3..2dec244ae3a1fe19231b3275504660f525499979 100644 (file)
@@ -29,7 +29,7 @@
 
 /* **************** INPUT ********************* */
 
-static bNodeSocketTemplate sh_node_light_falloff_in[]= {
+static bNodeSocketTemplate sh_node_light_falloff_in[] = {
        {       SOCK_FLOAT, 0, N_("Strength"),                  100.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1000000.0f},
        {       SOCK_FLOAT, 0, N_("Smooth"),                    0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1000.0f},
        {       -1, 0, ""       }
@@ -37,7 +37,7 @@ static bNodeSocketTemplate sh_node_light_falloff_in[]= {
 
 /* **************** OUTPUT ******************** */
 
-static bNodeSocketTemplate sh_node_light_falloff_out[]= {
+static bNodeSocketTemplate sh_node_light_falloff_out[] = {
        {       SOCK_FLOAT, 0, N_("Quadratic"),                 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
        {       SOCK_FLOAT, 0, N_("Linear"),                    0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
        {       SOCK_FLOAT, 0, N_("Constant"),                  0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
index 264b139068822dd236d221ec410bca2a814df297..b4a3d4e01e1980241ac554f508ae79c9a89dd38d 100644 (file)
@@ -29,7 +29,7 @@
 
 /* **************** OUTPUT ******************** */
 
-static bNodeSocketTemplate sh_node_light_path_out[]= {
+static bNodeSocketTemplate sh_node_light_path_out[] = {
        {       SOCK_FLOAT, 0, N_("Is Camera Ray"),                     0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
        {       SOCK_FLOAT, 0, N_("Is Shadow Ray"),                     0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
        {       SOCK_FLOAT, 0, N_("Is Diffuse Ray"),            0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
index 4508f66543e1dcde7b45c6742a19c633667f3f9f..cedd3a4910cf19786f4eb0b6d92e401369663931 100644 (file)
 #include "node_shader_util.h"
 
 /* **************** MAPPING  ******************** */
-static bNodeSocketTemplate sh_node_mapping_in[]= {
+static bNodeSocketTemplate sh_node_mapping_in[] = {
        {       SOCK_VECTOR, 1, N_("Vector"),   0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f, PROP_NONE},
        {       -1, 0, ""       }
 };
 
-static bNodeSocketTemplate sh_node_mapping_out[]= {
+static bNodeSocketTemplate sh_node_mapping_out[] = {
        {       SOCK_VECTOR, 0, N_("Vector")},
        {       -1, 0, ""       }
 };
@@ -55,14 +55,14 @@ static void node_shader_exec_mapping(void *UNUSED(data), bNode *node, bNodeStack
        mul_m4_v3(texmap->mat, vec);
        
        if (texmap->flag & TEXMAP_CLIP_MIN) {
-               if (vec[0]<texmap->min[0]) vec[0]= texmap->min[0];
-               if (vec[1]<texmap->min[1]) vec[1]= texmap->min[1];
-               if (vec[2]<texmap->min[2]) vec[2]= texmap->min[2];
+               if (vec[0]<texmap->min[0]) vec[0] = texmap->min[0];
+               if (vec[1]<texmap->min[1]) vec[1] = texmap->min[1];
+               if (vec[2]<texmap->min[2]) vec[2] = texmap->min[2];
        }
        if (texmap->flag & TEXMAP_CLIP_MAX) {
-               if (vec[0]>texmap->max[0]) vec[0]= texmap->max[0];
-               if (vec[1]>texmap->max[1]) vec[1]= texmap->max[1];
-               if (vec[2]>texmap->max[2]) vec[2]= texmap->max[2];
+               if (vec[0]>texmap->max[0]) vec[0] = texmap->max[0];
+               if (vec[1]>texmap->max[1]) vec[1] = texmap->max[1];
+               if (vec[2]>texmap->max[2]) vec[2] = texmap->max[2];
        }
 }
 
index bec43e05b2463e79b8835ff025cc25dbae20d068..bccf6d349cf38429e64fd4504d8613aacc581fe8 100644 (file)
@@ -34,7 +34,7 @@
 
 /* **************** MATERIAL ******************** */
 
-static bNodeSocketTemplate sh_node_material_in[]= {
+static bNodeSocketTemplate sh_node_material_in[] = {
        {       SOCK_RGBA, 1, N_("Color"),              0.0f, 0.0f, 0.0f, 1.0f},
        {       SOCK_RGBA, 1, N_("Spec"),               0.0f, 0.0f, 0.0f, 1.0f},
        {       SOCK_FLOAT, 1, N_("Refl"),              0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_FACTOR},
@@ -42,7 +42,7 @@ static bNodeSocketTemplate sh_node_material_in[]= {
        {       -1, 0, ""       }
 };
 
-static bNodeSocketTemplate sh_node_material_out[]= {
+static bNodeSocketTemplate sh_node_material_out[] = {
        {       SOCK_RGBA, 0, N_("Color")},
        {       SOCK_FLOAT, 0, N_("Alpha")},
        {       SOCK_VECTOR, 0, N_("Normal")},
@@ -51,7 +51,7 @@ static bNodeSocketTemplate sh_node_material_out[]= {
 
 /* **************** EXTENDED MATERIAL ******************** */
 
-static bNodeSocketTemplate sh_node_material_ext_in[]= {
+static bNodeSocketTemplate sh_node_material_ext_in[] = {
        {       SOCK_RGBA, 1, N_("Color"),              0.0f, 0.0f, 0.0f, 1.0f},
        {       SOCK_RGBA, 1, N_("Spec"),               0.0f, 0.0f, 0.0f, 1.0f},
        {       SOCK_FLOAT, 1, N_("Refl"),              0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_FACTOR},
@@ -66,7 +66,7 @@ static bNodeSocketTemplate sh_node_material_ext_in[]= {
        {       -1, 0, ""       }
 };
 
-static bNodeSocketTemplate sh_node_material_ext_out[]= {
+static bNodeSocketTemplate sh_node_material_ext_out[] = {
        {       SOCK_RGBA, 0, N_("Color")},
        {       SOCK_FLOAT, 0, N_("Alpha")},
        {       SOCK_VECTOR, 0, N_("Normal")},
@@ -84,7 +84,7 @@ static void node_shader_exec_material(void *data, bNode *node, bNodeStack **in,
                ShaderCallData *shcd= data;
                float col[4];
                bNodeSocket *sock;
-               char hasinput[NUM_MAT_IN]= {'\0'};
+               char hasinput[NUM_MAT_IN] = {'\0'};
                int i;
                
                /* note: cannot use the in[]->hasinput flags directly, as these are not necessarily
@@ -157,20 +157,20 @@ static void node_shader_exec_material(void *data, bNode *node, bNodeStack **in,
                        copy_v3_v3(col, shrnode.spec);
                }
                else
-                       col[0]= col[1]= col[2]= 0.0f;
+                       col[0] = col[1] = col[2] = 0.0f;
                
-               col[3]= shrnode.alpha;
+               col[3] = shrnode.alpha;
                
                if (shi->do_preview)
                        nodeAddToPreview(node, col, shi->xs, shi->ys, shi->do_manage);
                
                copy_v3_v3(out[MAT_OUT_COLOR]->vec, col);
-               out[MAT_OUT_ALPHA]->vec[0]= shrnode.alpha;
+               out[MAT_OUT_ALPHA]->vec[0] = shrnode.alpha;
                
                if (node->custom1 & SH_NODE_MAT_NEG) {
-                       shi->vn[0]= -shi->vn[0];
-                       shi->vn[1]= -shi->vn[1];
-                       shi->vn[2]= -shi->vn[2];
+                       shi->vn[0] = -shi->vn[0];
+                       shi->vn[1] = -shi->vn[1];
+                       shi->vn[2] = -shi->vn[2];
                }
                
                copy_v3_v3(out[MAT_OUT_NORMAL]->vec, shi->vn);
@@ -222,7 +222,7 @@ static int gpu_shader_material(GPUMaterial *mat, bNode *node, GPUNodeStack *in,
                GPUShadeInput shi;
                GPUShadeResult shr;
                bNodeSocket *sock;
-               char hasinput[NUM_MAT_IN]= {'\0'};
+               char hasinput[NUM_MAT_IN] = {'\0'};
                int i;
                
                /* note: cannot use the in[]->hasinput flags directly, as these are not necessarily
index 956b4af80307b7526acd4a601679bba65a326b71..a70134b2325af0b016dfd443328ead2b7b5e06f5 100644 (file)
 
 
 /* **************** SCALAR MATH ******************** */ 
-static bNodeSocketTemplate sh_node_math_in[]= { 
+static bNodeSocketTemplate sh_node_math_in[] = {
        { SOCK_FLOAT, 1, N_("Value"), 0.5f, 0.5f, 0.5f, 1.0f, -10000.0f, 10000.0f, PROP_NONE},
        { SOCK_FLOAT, 1, N_("Value"), 0.5f, 0.5f, 0.5f, 1.0f, -10000.0f, 10000.0f, PROP_NONE},
        { -1, 0, "" }
 };
 
-static bNodeSocketTemplate sh_node_math_out[]= { 
+static bNodeSocketTemplate sh_node_math_out[] = {
        { SOCK_FLOAT, 0, N_("Value")},
        { -1, 0, "" }
 };
@@ -51,44 +51,44 @@ bNodeStack **out)
        switch (node->custom1) {
        
        case 0: /* Add */
-               out[0]->vec[0]= in[0]->vec[0] + in[1]->vec[0]; 
+               out[0]->vec[0] = in[0]->vec[0] + in[1]->vec[0];
                break; 
        case 1: /* Subtract */
-               out[0]->vec[0]= in[0]->vec[0] - in[1]->vec[0];
+               out[0]->vec[0] = in[0]->vec[0] - in[1]->vec[0];
                break; 
        case 2: /* Multiply */
-               out[0]->vec[0]= in[0]->vec[0] * in[1]->vec[0]; 
+               out[0]->vec[0] = in[0]->vec[0] * in[1]->vec[0];
                break; 
        case 3: /* Divide */
                {
                        if (in[1]->vec[0]==0)   /* We don't want to divide by zero. */
-                               out[0]->vec[0]= 0.0;
+                               out[0]->vec[0] = 0.0;
                        else
-                               out[0]->vec[0]= in[0]->vec[0] / in[1]->vec[0];
+                               out[0]->vec[0] = in[0]->vec[0] / in[1]->vec[0];
                        }
                break;
        case 4: /* Sine */
                {
                        if (in[0]->hasinput || !in[1]->hasinput)  /* This one only takes one input, so we've got to choose. */
-                               out[0]->vec[0]= sin(in[0]->vec[0]);
+                               out[0]->vec[0] = sin(in[0]->vec[0]);
                        else
-                               out[0]->vec[0]= sin(in[1]->vec[0]);
+                               out[0]->vec[0] = sin(in[1]->vec[0]);
                }
                break;
        case 5: /* Cosine */
                {
                        if (in[0]->hasinput || !in[1]->hasinput)  /* This one&nb