code cleanup
authorCampbell Barton <ideasman42@gmail.com>
Mon, 18 Mar 2013 18:25:05 +0000 (18:25 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 18 Mar 2013 18:25:05 +0000 (18:25 +0000)
202 files changed:
source/blender/blenkernel/BKE_node.h
source/blender/blenkernel/BKE_texture.h
source/blender/blenkernel/intern/dynamicpaint.c
source/blender/blenkernel/intern/image.c
source/blender/blenkernel/intern/node.c
source/blender/blenkernel/intern/pointcache.c
source/blender/blenkernel/intern/texture.c
source/blender/blenloader/intern/readfile.c
source/blender/blenloader/intern/versioning_250.c
source/blender/blenloader/intern/versioning_legacy.c
source/blender/blenloader/intern/writefile.c
source/blender/collada/MeshImporter.cpp
source/blender/collada/SceneExporter.cpp
source/blender/collada/collada_utils.cpp
source/blender/compositor/nodes/COM_GroupNode.cpp
source/blender/editors/interface/interface_templates.c
source/blender/editors/interface/resources.c
source/blender/editors/interface/view2d.c
source/blender/editors/object/object_constraint.c
source/blender/editors/space_logic/logic_window.c
source/blender/editors/space_node/drawnode.c
source/blender/editors/space_node/node_add.c
source/blender/editors/space_node/node_buttons.c
source/blender/editors/space_node/node_draw.c
source/blender/editors/space_node/node_edit.c
source/blender/editors/space_node/node_group.c
source/blender/editors/space_node/node_ops.c
source/blender/editors/space_node/node_relationships.c
source/blender/editors/space_node/node_select.c
source/blender/editors/space_node/node_templates.c
source/blender/editors/space_node/node_view.c
source/blender/editors/space_node/space_node.c
source/blender/editors/space_view3d/view3d_draw.c
source/blender/gpu/intern/gpu_draw.c
source/blender/makesrna/RNA_enum_types.h
source/blender/makesrna/intern/rna_define.c
source/blender/makesrna/intern/rna_material.c
source/blender/makesrna/intern/rna_nodetree.c
source/blender/makesrna/intern/rna_space.c
source/blender/makesrna/intern/rna_texture.c
source/blender/makesrna/intern/rna_ui_api.c
source/blender/makesrna/intern/rna_userdef.c
source/blender/nodes/composite/node_composite_tree.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_bilateralblur.c
source/blender/nodes/composite/nodes/node_composite_blur.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_common.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_dilate.c
source/blender/nodes/composite/nodes/node_composite_directionalblur.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_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_mapRange.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_movieclip.c
source/blender/nodes/composite/nodes/node_composite_moviedistortion.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_outputFile.c
source/blender/nodes/composite/nodes/node_composite_pixelate.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_scale.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_texture.c
source/blender/nodes/composite/nodes/node_composite_tonemap.c
source/blender/nodes/composite/nodes/node_composite_transform.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_vecBlur.c
source/blender/nodes/composite/nodes/node_composite_viewer.c
source/blender/nodes/composite/nodes/node_composite_zcombine.c
source/blender/nodes/intern/node_common.c
source/blender/nodes/intern/node_exec.c
source/blender/nodes/intern/node_socket.c
source/blender/nodes/shader/node_shader_tree.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_ambient_occlusion.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_refraction.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_common.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_hair_info.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_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_normal_map.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_script.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_tangent.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/node_texture_tree.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_common.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/blender/nodes/texture/nodes/node_texture_viewer.c
source/blender/render/intern/source/convertblender.c
source/blender/render/intern/source/pipeline.c
source/blender/windowmanager/intern/wm_init_exit.c
source/blender/windowmanager/intern/wm_playanim.c

index 513851ce18fe55f3b4cc4082ed7ace32fa161389..d9a311b7e1392f4fe844edea4022b45dc74ac879 100644 (file)
@@ -329,8 +329,8 @@ typedef struct bNodeTreeType {
 /* ************** GENERIC API, TREES *************** */
 
 struct bNodeTreeType *ntreeTypeFind(const char *idname);
-void ntreeTypeAdd(struct bNodeTreeTypent);
-void ntreeTypeFreeLink(struct bNodeTreeTypent);
+void ntreeTypeAdd(struct bNodeTreeType *nt);
+void ntreeTypeFreeLink(struct bNodeTreeType *nt);
 struct GHashIterator *ntreeTypeGetIterator(void);
 
 /* helper macros for iterating over tree types */
@@ -405,8 +405,8 @@ void ntreeInterfaceTypeUpdate(struct bNodeTree *ntree);
 /* ************** GENERIC API, NODES *************** */
 
 struct bNodeType *nodeTypeFind(const char *idname);
-void                   nodeRegisterType(struct bNodeTypentype);
-void                   nodeUnregisterType(struct bNodeTypentype);
+void                   nodeRegisterType(struct bNodeType *ntype);
+void                   nodeUnregisterType(struct bNodeType *ntype);
 struct GHashIterator *nodeTypeGetIterator(void);
 
 /* helper macros for iterating over node types */
@@ -422,8 +422,8 @@ struct GHashIterator *nodeTypeGetIterator(void);
 }
 
 struct bNodeSocketType *nodeSocketTypeFind(const char *idname);
-void                   nodeRegisterSocketType(struct bNodeSocketTypestype);
-void                   nodeUnregisterSocketType(struct bNodeSocketTypestype);
+void                   nodeRegisterSocketType(struct bNodeSocketType *stype);
+void                   nodeUnregisterSocketType(struct bNodeSocketType *stype);
 struct GHashIterator *nodeSocketTypeGetIterator(void);
 const char *   nodeStaticSocketType(int type, int subtype);
 const char *   nodeStaticSocketInterfaceType(int type, int subtype);
@@ -485,7 +485,7 @@ void                        nodeSetSelected(struct bNode *node, int select);
 void            nodeSetActive(struct bNodeTree *ntree, struct bNode *node);
 struct bNode   *nodeGetActive(struct bNodeTree *ntree);
 struct bNode   *nodeGetActiveID(struct bNodeTree *ntree, short idtype);
-int             nodeSetActiveID(struct bNodeTree *ntree, short idtype, struct ID *id);
+bool            nodeSetActiveID(struct bNodeTree *ntree, short idtype, struct ID *id);
 void            nodeClearActive(struct bNodeTree *ntree);
 void            nodeClearActiveID(struct bNodeTree *ntree, short idtype);
 struct bNode   *nodeGetActiveTexture(struct bNodeTree *ntree);
@@ -519,13 +519,13 @@ extern const bNodeInstanceKey NODE_INSTANCE_KEY_BASE;
 
 bNodeInstanceKey       BKE_node_instance_key(bNodeInstanceKey parent_key, struct bNodeTree *ntree, struct bNode *node);
 
-bNodeInstanceHash *    BKE_node_instance_hash_new(const char *info);
+bNodeInstanceHash     *BKE_node_instance_hash_new(const char *info);
 void                   BKE_node_instance_hash_free(bNodeInstanceHash *hash, bNodeInstanceValueFP valfreefp);
 void                   BKE_node_instance_hash_insert(bNodeInstanceHash *hash, bNodeInstanceKey key, void *value);
-void*                  BKE_node_instance_hash_lookup(bNodeInstanceHash *hash, bNodeInstanceKey key);
+void                  *BKE_node_instance_hash_lookup(bNodeInstanceHash *hash, bNodeInstanceKey key);
 int                    BKE_node_instance_hash_remove(bNodeInstanceHash *hash, bNodeInstanceKey key, bNodeInstanceValueFP valfreefp);
 void                   BKE_node_instance_hash_clear(bNodeInstanceHash *hash, bNodeInstanceValueFP valfreefp);
-void*                  BKE_node_instance_hash_pop(bNodeInstanceHash *hash, bNodeInstanceKey key);
+void                  *BKE_node_instance_hash_pop(bNodeInstanceHash *hash, bNodeInstanceKey key);
 int                    BKE_node_instance_hash_haskey(bNodeInstanceHash *hash, bNodeInstanceKey key);
 int                    BKE_node_instance_hash_size(bNodeInstanceHash *hash);
 
@@ -540,7 +540,7 @@ BLI_INLINE bNodeInstanceHashIterator *BKE_node_instance_hash_iterator_new(bNodeI
 BLI_INLINE void                       BKE_node_instance_hash_iterator_init(bNodeInstanceHashIterator *iter, bNodeInstanceHash *hash) { BLI_ghashIterator_init(iter, hash->ghash); }
 BLI_INLINE void                       BKE_node_instance_hash_iterator_free(bNodeInstanceHashIterator *iter) { BLI_ghashIterator_free(iter); }
 BLI_INLINE bNodeInstanceKey           BKE_node_instance_hash_iterator_get_key(bNodeInstanceHashIterator *iter) { return *(bNodeInstanceKey *)BLI_ghashIterator_getKey(iter); }
-BLI_INLINE void*                      BKE_node_instance_hash_iterator_get_value(bNodeInstanceHashIterator *iter) { return BLI_ghashIterator_getValue(iter); }
+BLI_INLINE void                      *BKE_node_instance_hash_iterator_get_value(bNodeInstanceHashIterator *iter) { return BLI_ghashIterator_getValue(iter); }
 BLI_INLINE void                       BKE_node_instance_hash_iterator_step(bNodeInstanceHashIterator *iter) { BLI_ghashIterator_step(iter); }
 BLI_INLINE bool                       BKE_node_instance_hash_iterator_not_done(bNodeInstanceHashIterator *iter) { return BLI_ghashIterator_notDone(iter); }
 
@@ -553,8 +553,8 @@ BLI_INLINE bool                       BKE_node_instance_hash_iterator_not_done(b
 /* Node Previews */
 
 int             BKE_node_preview_used(struct bNode *node);
-bNodePreview*   BKE_node_preview_verify(struct bNodeInstanceHash *previews, bNodeInstanceKey key, int xsize, int ysize, int create);
-bNodePreview*   BKE_node_preview_copy(struct bNodePreview *preview);
+bNodePreview   *BKE_node_preview_verify(struct bNodeInstanceHash *previews, bNodeInstanceKey key, int xsize, int ysize, int create);
+bNodePreview   *BKE_node_preview_copy(struct bNodePreview *preview);
 void            BKE_node_preview_free(struct bNodePreview *preview);
 void            BKE_node_preview_init_tree(struct bNodeTree *ntree, int xsize, int ysize, int create_previews);
 void            BKE_node_preview_free_tree(struct bNodeTree *ntree);
index f1796373367c6a719f0edefa19df121b7825a7e2..621fc13af674c972ff324e6be793d342c28fb46d 100644 (file)
@@ -61,8 +61,8 @@ struct World;
 
 void BKE_texture_free(struct Tex *t); 
 
-void init_colorband(struct ColorBand *coba, int rangetype);
-struct ColorBand *add_colorband(int rangetype);
+void init_colorband(struct ColorBand *coba, bool rangetype);
+struct ColorBand *add_colorband(bool rangetype);
 int do_colorband(const struct ColorBand *coba, float in, float out[4]);
 void colorband_table_RGBA(struct ColorBand *coba, float **array, int *size);
 struct CBData *colorband_element_add(struct ColorBand *coba, float position);
index 4b05f1c10502e473a4ec0d736f9b37458e2d9fc1..24fb949481fbce722468762d53fc91063a466af8 100644 (file)
@@ -1152,7 +1152,7 @@ int dynamicPaint_createType(struct DynamicPaintModifierData *pmd, int type, stru
                        {
                                CBData *ramp;
 
-                               brush->paint_ramp = add_colorband(0);
+                               brush->paint_ramp = add_colorband(false);
                                if (!brush->paint_ramp)
                                        return 0;
                                ramp = brush->paint_ramp->data;
@@ -1168,7 +1168,7 @@ int dynamicPaint_createType(struct DynamicPaintModifierData *pmd, int type, stru
                        {
                                CBData *ramp;
 
-                               brush->vel_ramp = add_colorband(0);
+                               brush->vel_ramp = add_colorband(false);
                                if (!brush->vel_ramp)
                                        return 0;
                                ramp = brush->vel_ramp->data;
index 355541557ea461da4e0a8259433916c42f3c6e83..4e79c086d4d0c84814587b4607fe32bec982ab49 100644 (file)
@@ -2171,7 +2171,7 @@ void BKE_image_walk_all_users(const Main *mainp, void *customdata,
                                }
                                else if (sa->spacetype == SPACE_NODE) {
                                        SpaceNode *snode = sa->spacedata.first;
-                                       if (snode->nodetree && snode->nodetree->type==NTREE_COMPOSIT) {
+                                       if (snode->nodetree && snode->nodetree->type == NTREE_COMPOSIT) {
                                                bNode *node;
                                                for (node = snode->nodetree->nodes.first; node; node = node->next) {
                                                        if (node->id && node->type == CMP_NODE_IMAGE) {
index 0b63c4d8842446edeae8e0de2ce55b5817baec52..94feaed022f6e92d4f4aef480030a97f157e02c3 100644 (file)
@@ -205,29 +205,29 @@ static void update_typeinfo(Main *bmain, const struct bContext *C, bNodeTreeType
                
                ntree->init |= NTREE_TYPE_INIT;
                
-               if (treetype && strcmp(ntree->idname, treetype->idname)==0)
+               if (treetype && STREQ(ntree->idname, treetype->idname))
                        ntree_set_typeinfo(ntree, unregister ? NULL : treetype);
                
                /* initialize nodes */
-               for (node=ntree->nodes.first; node; node=node->next) {
-                       if (nodetype && strcmp(node->idname, nodetype->idname)==0)
+               for (node = ntree->nodes.first; node; node = node->next) {
+                       if (nodetype && STREQ(node->idname, nodetype->idname))
                                node_set_typeinfo(C, ntree, node, unregister ? NULL : nodetype);
                        
                        /* initialize node sockets */
-                       for (sock=node->inputs.first; sock; sock=sock->next)
-                               if (socktype && strcmp(sock->idname, socktype->idname)==0)
+                       for (sock = node->inputs.first; sock; sock = sock->next)
+                               if (socktype && STREQ(sock->idname, socktype->idname))
                                        node_socket_set_typeinfo(ntree, sock, unregister ? NULL : socktype);
-                       for (sock=node->outputs.first; sock; sock=sock->next)
-                               if (socktype && strcmp(sock->idname, socktype->idname)==0)
+                       for (sock = node->outputs.first; sock; sock = sock->next)
+                               if (socktype && STREQ(sock->idname, socktype->idname))
                                        node_socket_set_typeinfo(ntree, sock, unregister ? NULL : socktype);
                }
                
                /* initialize tree sockets */
-               for (sock=ntree->inputs.first; sock; sock=sock->next)
-                       if (socktype && strcmp(sock->idname, socktype->idname)==0)
+               for (sock = ntree->inputs.first; sock; sock = sock->next)
+                       if (socktype && STREQ(sock->idname, socktype->idname))
                                node_socket_set_typeinfo(ntree, sock, unregister ? NULL : socktype);
-               for (sock=ntree->outputs.first; sock; sock=sock->next)
-                       if (socktype && strcmp(sock->idname, socktype->idname)==0)
+               for (sock = ntree->outputs.first; sock; sock = sock->next)
+                       if (socktype && STREQ(sock->idname, socktype->idname))
                                node_socket_set_typeinfo(ntree, sock, unregister ? NULL : socktype);
        }
        FOREACH_NODETREE_END
@@ -250,37 +250,37 @@ void ntreeSetTypes(const struct bContext *C, bNodeTree *ntree)
        for (node = ntree->nodes.first; node; node = node->next) {
                node_set_typeinfo(C, ntree, node, nodeTypeFind(node->idname));
                
-               for (sock=node->inputs.first; sock; sock=sock->next)
+               for (sock = node->inputs.first; sock; sock = sock->next)
                        node_socket_set_typeinfo(ntree, sock, nodeSocketTypeFind(sock->idname));
-               for (sock=node->outputs.first; sock; sock=sock->next)
+               for (sock = node->outputs.first; sock; sock = sock->next)
                        node_socket_set_typeinfo(ntree, sock, nodeSocketTypeFind(sock->idname));
        }
        
-       for (sock=ntree->inputs.first; sock; sock=sock->next)
+       for (sock = ntree->inputs.first; sock; sock = sock->next)
                node_socket_set_typeinfo(ntree, sock, nodeSocketTypeFind(sock->idname));
-       for (sock=ntree->outputs.first; sock; sock=sock->next)
+       for (sock = ntree->outputs.first; sock; sock = sock->next)
                node_socket_set_typeinfo(ntree, sock, nodeSocketTypeFind(sock->idname));
 }
 
 
-static GHash *nodetreetypes_hash= NULL;
-static GHash *nodetypes_hash= NULL;
-static GHash *nodesockettypes_hash= NULL;
+static GHash *nodetreetypes_hash = NULL;
+static GHash *nodetypes_hash = NULL;
+static GHash *nodesockettypes_hash = NULL;
 
 bNodeTreeType *ntreeTypeFind(const char *idname)
 {
-       bNodeTreeTypent;
+       bNodeTreeType *nt;
 
        if (idname[0]) {
-               nt= BLI_ghash_lookup(nodetreetypes_hash, idname);
-               if(nt)
+               nt = BLI_ghash_lookup(nodetreetypes_hash, idname);
+               if (nt)
                        return nt;
        }
 
        return NULL;
 }
 
-void ntreeTypeAdd(bNodeTreeTypent)
+void ntreeTypeAdd(bNodeTreeType *nt)
 {
        BLI_ghash_insert(nodetreetypes_hash, (void *)nt->idname, nt);
        /* XXX pass Main to register function? */
@@ -296,12 +296,12 @@ static void ntree_free_type(void *treetype_v)
        MEM_freeN(treetype);
 }
 
-void ntreeTypeFreeLink(bNodeTreeTypent)
+void ntreeTypeFreeLink(bNodeTreeType *nt)
 {
        BLI_ghash_remove(nodetreetypes_hash, nt->idname, NULL, ntree_free_type);
 }
 
-GHashIterator *ntreeTypeGetIterator()
+GHashIterator *ntreeTypeGetIterator(void)
 {
        return BLI_ghashIterator_new(nodetreetypes_hash);
 }
@@ -313,11 +313,11 @@ int ntreeIsValid(bNodeTree *ntree)
 
 bNodeType *nodeTypeFind(const char *idname)
 {
-       bNodeTypent;
+       bNodeType *nt;
 
        if (idname[0]) {
-               nt= BLI_ghash_lookup(nodetypes_hash, idname);
-               if(nt)
+               nt = BLI_ghash_lookup(nodetypes_hash, idname);
+               if (nt)
                        return nt;
        }
 
@@ -326,14 +326,14 @@ bNodeType *nodeTypeFind(const char *idname)
 
 static void free_dynamic_typeinfo(bNodeType *ntype)
 {
-       if(ntype->type==NODE_DYNAMIC) {
-               if(ntype->inputs) {
+       if (ntype->type == NODE_DYNAMIC) {
+               if (ntype->inputs) {
                        MEM_freeN(ntype->inputs);
                }
-               if(ntype->outputs) {
+               if (ntype->outputs) {
                        MEM_freeN(ntype->outputs);
                }
-               if(ntype->ui_name) {
+               if (ntype->ui_name) {
                        MEM_freeN((void *)ntype->ui_name);
                }
        }
@@ -347,7 +347,7 @@ static void node_free_type(void *nodetype_v)
        update_typeinfo(G.main, NULL, NULL, nodetype, NULL, true);
        
        /* XXX deprecated */
-       if (nodetype->type==NODE_DYNAMIC)
+       if (nodetype->type == NODE_DYNAMIC)
                free_dynamic_typeinfo(nodetype);
        
        if (nodetype->needs_free)
@@ -365,23 +365,23 @@ void nodeRegisterType(bNodeType *nt)
        update_typeinfo(G.main, NULL, NULL, nt, NULL, false);
 }
 
-void nodeUnregisterType(bNodeTypent)
+void nodeUnregisterType(bNodeType *nt)
 {
        BLI_ghash_remove(nodetypes_hash, nt->idname, NULL, node_free_type);
 }
 
-GHashIterator *nodeTypeGetIterator()
+GHashIterator *nodeTypeGetIterator(void)
 {
        return BLI_ghashIterator_new(nodetypes_hash);
 }
 
 bNodeSocketType *nodeSocketTypeFind(const char *idname)
 {
-       bNodeSocketTypest;
+       bNodeSocketType *st;
 
        if (idname[0]) {
-               st= BLI_ghash_lookup(nodesockettypes_hash, idname);
-               if(st)
+               st = BLI_ghash_lookup(nodesockettypes_hash, idname);
+               if (st)
                        return st;
        }
 
@@ -398,14 +398,14 @@ static void node_free_socket_type(void *socktype_v)
        MEM_freeN(socktype);
 }
 
-void nodeRegisterSocketType(bNodeSocketTypest)
+void nodeRegisterSocketType(bNodeSocketType *st)
 {
        BLI_ghash_insert(nodesockettypes_hash, (void *)st->idname, st);
        /* XXX pass Main to register function? */
        update_typeinfo(G.main, NULL, NULL, NULL, st, false);
 }
 
-void nodeUnregisterSocketType(bNodeSocketTypest)
+void nodeUnregisterSocketType(bNodeSocketType *st)
 {
        BLI_ghash_remove(nodesockettypes_hash, st->idname, NULL, node_free_socket_type);
 }
@@ -419,20 +419,20 @@ void nodeMakeDynamicType(bNode *UNUSED(node))
 {
        #if 0   /* XXX deprecated */
        /* find SH_DYNAMIC_NODE ntype */
-       bNodeType *ntype= ntreeType_Shader->node_types.first;
-       while(ntype) {
-               if(ntype->type==NODE_DYNAMIC)
+       bNodeType *ntype = ntreeType_Shader->node_types.first;
+       while (ntype) {
+               if (ntype->type == NODE_DYNAMIC)
                        break;
-               ntype= ntype->next;
+               ntype = ntype->next;
        }
 
        /* make own type struct to fill */
-       if(ntype) {
+       if (ntype) {
                /*node->typeinfo= MEM_dupallocN(ntype);*/
-               bNodeType *newtype= MEM_callocN(sizeof(bNodeType), "dynamic bNodeType");
-               *newtype= *ntype;
+               bNodeType *newtype = MEM_callocN(sizeof(bNodeType), "dynamic bNodeType");
+               *newtype = *ntype;
                BLI_strncpy(newtype->name, ntype->name, sizeof(newtype->name));
-               node->typeinfo= newtype;
+               node->typeinfo = newtype;
        }
        #endif
 }
@@ -440,8 +440,8 @@ void nodeMakeDynamicType(bNode *UNUSED(node))
 struct bNodeSocket *nodeFindSocket(bNode *node, int in_out, const char *identifier)
 {
        bNodeSocket *sock = (in_out == SOCK_IN ? node->inputs.first : node->outputs.first);
-       for (; sock; sock=sock->next) {
-               if (strcmp(sock->identifier, identifier)==0)
+       for (; sock; sock = sock->next) {
+               if (STREQ(sock->identifier, identifier))
                        return sock;
        }
        return NULL;
@@ -453,7 +453,7 @@ static bool unique_identifier_check(void *arg, const char *identifier)
        struct ListBase *lb = arg;
        bNodeSocket *sock;
        for (sock = lb->first; sock; sock = sock->next) {
-               if (strcmp(sock->identifier, identifier)==0)
+               if (STREQ(sock->identifier, identifier))
                        return true;
        }
        return false;
@@ -792,10 +792,10 @@ bNode *nodeAddNode(const struct bContext *C, bNodeTree *ntree, const char *idnam
 
 bNode *nodeAddStaticNode(const struct bContext *C, bNodeTree *ntree, int type)
 {
-       const char *idname=NULL;
+       const char *idname = NULL;
        
        NODE_TYPES_BEGIN(ntype)
-               if(ntype->type==type) {
+               if (ntype->type == type) {
                        idname = ntype->idname;
                        break;
                }
@@ -1075,7 +1075,7 @@ bNodeTree *ntreeAddTree(Main *bmain, const char *name, const char *idname)
         * node groups and other tree types are created as library data.
         */
        if (bmain) {
-               ntree= BKE_libblock_alloc(&bmain->nodetree, ID_NT, name);
+               ntree = BKE_libblock_alloc(&bmain->nodetree, ID_NT, name);
        }
        else {
                ntree = MEM_callocN(sizeof(bNodeTree), "new node tree");
@@ -1593,7 +1593,7 @@ void nodeFreeNode(bNodeTree *ntree, bNode *node)
                        ntree->execdata = NULL;
                }
                
-               if(node->typeinfo && node->typeinfo->freefunc)
+               if (node->typeinfo && node->typeinfo->freefunc)
                        node->typeinfo->freefunc(node);
        }
        
@@ -1987,7 +1987,7 @@ static bNodeSocket *make_socket_template(bNodeTree *ntree, int in_out,
        }
        
        sock = MEM_callocN(sizeof(bNodeSocket), "socket template");
-       sock->typeinfo= stype;
+       sock->typeinfo = stype;
        BLI_strncpy(sock->idname, stype->idname, sizeof(sock->idname));
        sock->in_out = in_out;
        sock->type = SOCK_CUSTOM;       /* int type undefined by default */
@@ -2021,7 +2021,7 @@ bNodeSocket *ntreeFindSocketInterface(bNodeTree *ntree, int in_out, const char *
 {
        bNodeSocket *iosock = (in_out == SOCK_IN ? ntree->inputs.first : ntree->outputs.first);
        for (; iosock; iosock = iosock->next)
-               if (strcmp(iosock->identifier, identifier)==0)
+               if (STREQ(iosock->identifier, identifier))
                        return iosock;
        return NULL;
 }
@@ -2097,7 +2097,7 @@ void ntreeRemoveSocketInterface(bNodeTree *ntree, bNodeSocket *sock)
 static void ntree_interface_identifier_base(bNodeTree *ntree, char *base)
 {
        /* generate a valid RNA identifier */
-       sprintf(base, "NodeTreeInterface_%s", ntree->id.name+2);
+       sprintf(base, "NodeTreeInterface_%s", ntree->id.name + 2);
        RNA_identifier_sanitize(base, FALSE);
 }
 
@@ -2117,8 +2117,8 @@ static void ntree_interface_identifier(bNodeTree *ntree, const char *base, char
        identifier[0] = '\0';
        BLI_uniquename_cb(ntree_interface_unique_identifier_check, NULL, base, '_', identifier, maxlen);
        
-       sprintf(name, "Node Tree %s Interface", ntree->id.name+2);
-       sprintf(description, "Interface properties of node group %s", ntree->id.name+2);
+       sprintf(name, "Node Tree %s Interface", ntree->id.name + 2);
+       sprintf(description, "Interface properties of node group %s", ntree->id.name + 2);
 }
 
 static void ntree_interface_type_create(bNodeTree *ntree)
@@ -2126,7 +2126,7 @@ static void ntree_interface_type_create(bNodeTree *ntree)
        StructRNA *srna;
        bNodeSocket *sock;
        /* strings are generated from base string + ID name, sizes are sufficient */
-       char base[MAX_ID_NAME+64], identifier[MAX_ID_NAME+64], name[MAX_ID_NAME+64], description[MAX_ID_NAME+64];
+       char base[MAX_ID_NAME + 64], identifier[MAX_ID_NAME + 64], name[MAX_ID_NAME + 64], description[MAX_ID_NAME + 64];
        
        /* generate a valid RNA identifier */
        ntree_interface_identifier_base(ntree, base);
@@ -2158,7 +2158,7 @@ StructRNA *ntreeInterfaceTypeGet(bNodeTree *ntree, int create)
 {
        if (ntree->interface_type) {
                /* strings are generated from base string + ID name, sizes are sufficient */
-               char base[MAX_ID_NAME+64], identifier[MAX_ID_NAME+64], name[MAX_ID_NAME+64], description[MAX_ID_NAME+64];
+               char base[MAX_ID_NAME + 64], identifier[MAX_ID_NAME + 64], name[MAX_ID_NAME + 64], description[MAX_ID_NAME + 64];
                
                /* A bit of a hack: when changing the ID name, update the RNA type identifier too,
                 * so that the names match. This is not strictly necessary to keep it working,
@@ -2270,9 +2270,9 @@ bNode *nodeGetActiveID(bNodeTree *ntree, short idtype)
                                return node;
        
        /* no node with active ID in this tree, look inside groups */
-       for(node= ntree->nodes.first; node; node= node->next) {
-               if(node->type==NODE_GROUP) {
-                       tnode = nodeGetActiveID((bNodeTree*)node->id, idtype);
+       for (node = ntree->nodes.first; node; node = node->next) {
+               if (node->type == NODE_GROUP) {
+                       tnode = nodeGetActiveID((bNodeTree *)node->id, idtype);
                        if (tnode)
                                return tnode;
                }
@@ -2281,10 +2281,10 @@ bNode *nodeGetActiveID(bNodeTree *ntree, short idtype)
        return NULL;
 }
 
-int nodeSetActiveID(bNodeTree *ntree, short idtype, ID *id)
+bool nodeSetActiveID(bNodeTree *ntree, short idtype, ID *id)
 {
        bNode *node;
-       int ok = FALSE;
+       bool ok = false;
 
        if (ntree == NULL) return ok;
 
@@ -2304,9 +2304,9 @@ int nodeSetActiveID(bNodeTree *ntree, short idtype, ID *id)
         * if active ID node has been found already,
         * just pass NULL so other matching nodes are deactivated.
         */
-       for(node= ntree->nodes.first; node; node= node->next) {
-               if(node->type==NODE_GROUP)
-                       ok |= nodeSetActiveID((bNodeTree*)node->id, idtype, (ok==FALSE ? id : NULL));
+       for (node = ntree->nodes.first; node; node = node->next) {
+               if (node->type == NODE_GROUP)
+                       ok |= nodeSetActiveID((bNodeTree *)node->id, idtype, (ok == false ? id : NULL));
        }
 
        return ok;
@@ -2336,9 +2336,9 @@ void nodeSetSelected(bNode *node, int select)
                node->flag &= ~NODE_SELECT;
                
                /* deselect sockets too */
-               for (sock=node->inputs.first; sock; sock=sock->next)
+               for (sock = node->inputs.first; sock; sock = sock->next)
                        sock->flag &= ~NODE_SELECT;
-               for (sock=node->outputs.first; sock; sock=sock->next)
+               for (sock = node->outputs.first; sock; sock = sock->next)
                        sock->flag &= ~NODE_SELECT;
        }
 }
@@ -2563,7 +2563,7 @@ bNodeInstanceKey BKE_node_instance_key(bNodeInstanceKey parent_key, bNodeTree *n
 {
        bNodeInstanceKey key;
        
-       key = node_hash_int_str(parent_key, ntree->id.name+2);
+       key = node_hash_int_str(parent_key, ntree->id.name + 2);
        
        if (node)
                key = node_hash_int_str(key, node->name);
@@ -2673,7 +2673,7 @@ void BKE_node_instance_hash_remove_untagged(bNodeInstanceHash *hash, bNodeInstan
        /* NOTE: Hash must not be mutated during iterating!
         * Store tagged entries in a separate list and remove items afterward.
         */
-       bNodeInstanceKey *untagged = MEM_mallocN(sizeof(bNodeInstanceKey)*BKE_node_instance_hash_size(hash), "temporary node instance key list");
+       bNodeInstanceKey *untagged = MEM_mallocN(sizeof(bNodeInstanceKey) * BKE_node_instance_hash_size(hash), "temporary node instance key list");
        bNodeInstanceHashIterator iter;
        int num_untagged, i;
        
@@ -2922,7 +2922,7 @@ int nodeUpdateID(bNodeTree *ntree, ID *id)
        ntree->is_updating = TRUE;
        
        for (node = ntree->nodes.first; node; node = node->next) {
-               if(node->id == id) {
+               if (node->id == id) {
                        change = TRUE;
                        node->update |= NODE_UPDATE_ID;
                        if (node->typeinfo->updatefunc)
@@ -2952,15 +2952,15 @@ void nodeUpdateInternalLinks(bNodeTree *ntree, bNode *node)
 /* nodes that use ID data get synced with local data */
 void nodeSynchronizeID(bNode *node, bool copy_to_id)
 {
-       if (node->id==NULL) return;
+       if (node->id == NULL) return;
        
        if (ELEM(node->type, SH_NODE_MATERIAL, SH_NODE_MATERIAL_EXT)) {
                bNodeSocket *sock;
-               Material *ma= (Material *)node->id;
+               Material *ma = (Material *)node->id;
                int a;
                
                /* hrmf, case in loop isn't super fast, but we don't edit 100s of material at same time either! */
-               for (a=0, sock= node->inputs.first; sock; sock= sock->next, a++) {
+               for (a = 0, sock = node->inputs.first; sock; sock = sock->next, a++) {
                        if (!nodeSocketIsHidden(sock)) {
                                if (copy_to_id) {
                                        switch (a) {
@@ -2969,7 +2969,7 @@ void nodeSynchronizeID(bNode *node, bool copy_to_id)
                                                case MAT_IN_SPEC:
                                                        copy_v3_v3(&ma->specr, ((bNodeSocketValueRGBA *)sock->default_value)->value); break;
                                                case MAT_IN_REFL:
-                                                       ma->ref= ((bNodeSocketValueFloat *)sock->default_value)->value; break;
+                                                       ma->ref = ((bNodeSocketValueFloat *)sock->default_value)->value; break;
                                                case MAT_IN_MIR:
                                                        copy_v3_v3(&ma->mirr, ((bNodeSocketValueRGBA *)sock->default_value)->value); break;
                                                case MAT_IN_AMB:
@@ -2993,7 +2993,7 @@ void nodeSynchronizeID(bNode *node, bool copy_to_id)
                                                case MAT_IN_SPEC:
                                                        copy_v3_v3(((bNodeSocketValueRGBA *)sock->default_value)->value, &ma->specr); break;
                                                case MAT_IN_REFL:
-                                                       ((bNodeSocketValueFloat *)sock->default_value)->value= ma->ref; break;
+                                                       ((bNodeSocketValueFloat *)sock->default_value)->value = ma->ref; break;
                                                case MAT_IN_MIR:
                                                        copy_v3_v3(((bNodeSocketValueRGBA *)sock->default_value)->value, &ma->mirr); break;
                                                case MAT_IN_AMB:
@@ -3098,11 +3098,11 @@ void node_type_base_custom(bNodeType *ntype, const char *idname, const char *nam
 static bool unique_socket_template_identifier_check(void *arg, const char *name)
 {
        bNodeSocketTemplate *ntemp;
-       struct {bNodeSocketTemplate *list; bNodeSocketTemplate *ntemp;} *data= arg;
+       struct {bNodeSocketTemplate *list; bNodeSocketTemplate *ntemp;} *data = arg;
        
        for (ntemp = data->list; ntemp->type >= 0; ++ntemp) {
                if (ntemp != data->ntemp) {
-                       if (!strcmp(ntemp->identifier, name)) {
+                       if (STREQ(ntemp->identifier, name)) {
                                return true;
                        }
                }
@@ -3114,7 +3114,7 @@ static bool unique_socket_template_identifier_check(void *arg, const char *name)
 static void unique_socket_template_identifier(bNodeSocketTemplate *list, bNodeSocketTemplate *ntemp, const char defname[], char delim)
 {
        struct {bNodeSocketTemplate *list; bNodeSocketTemplate *ntemp;} data;
-       data.list= list;
+       data.list = list;
        data.ntemp = ntemp;
 
        BLI_uniquename_cb(unique_socket_template_identifier_check, &data, defname, delim, ntemp->identifier, sizeof(ntemp->identifier));
@@ -3130,20 +3130,20 @@ void node_type_socket_templates(struct bNodeType *ntype, struct bNodeSocketTempl
        /* automatically generate unique identifiers */
        if (inputs) {
                /* clear identifier strings (uninitialized memory) */
-               for (ntemp=inputs; ntemp->type >= 0; ++ntemp)
+               for (ntemp = inputs; ntemp->type >= 0; ++ntemp)
                        ntemp->identifier[0] = '\0';
                
-               for (ntemp=inputs; ntemp->type >= 0; ++ntemp) {
+               for (ntemp = inputs; ntemp->type >= 0; ++ntemp) {
                        BLI_strncpy(ntemp->identifier, ntemp->name, sizeof(ntemp->identifier));
                        unique_socket_template_identifier(inputs, ntemp, ntemp->identifier, '_');
                }
        }
        if (outputs) {
                /* clear identifier strings (uninitialized memory) */
-               for (ntemp=outputs; ntemp->type >= 0; ++ntemp)
+               for (ntemp = outputs; ntemp->type >= 0; ++ntemp)
                        ntemp->identifier[0] = '\0';
                
-               for (ntemp=outputs; ntemp->type >= 0; ++ntemp) {
+               for (ntemp = outputs; ntemp->type >= 0; ++ntemp) {
                        BLI_strncpy(ntemp->identifier, ntemp->name, sizeof(ntemp->identifier));
                        unique_socket_template_identifier(outputs, ntemp, ntemp->identifier, '_');
                }
@@ -3472,20 +3472,20 @@ void init_nodesystem(void)
 void free_nodesystem(void) 
 {
        NODE_TYPES_BEGIN(nt)
-               if(nt->ext.free) {
+               if (nt->ext.free) {
                        nt->ext.free(nt->ext.data);
                }
        NODE_TYPES_END
        
        NODE_SOCKET_TYPES_BEGIN(st)
-               if(st->ext_socket.free)
+               if (st->ext_socket.free)
                        st->ext_socket.free(st->ext_socket.data);
-               if(st->ext_interface.free)
+               if (st->ext_interface.free)
                        st->ext_interface.free(st->ext_interface.data);
        NODE_SOCKET_TYPES_END
        
        NODE_TREE_TYPES_BEGIN(nt)
-               if(nt->ext.free) {
+               if (nt->ext.free) {
                        nt->ext.free(nt->ext.data);
                }
        NODE_TREE_TYPES_END
index c900d08e4e9361a8f8c250995807b2c8f691f589..968e9fe3206526a11f3191e66379458ab23fd685 100644 (file)
@@ -1362,7 +1362,7 @@ static int ptcache_filename(PTCacheID *pid, char *filename, int cfra, short do_p
                newname += len;
        }
        if (pid->cache->name[0] == '\0' && (pid->cache->flag & PTCACHE_EXTERNAL)==0) {
-               idname = (pid->ob->id.name+2);
+               idname = (pid->ob->id.name + 2);
                /* convert chars to hex so they are always a valid filename */
                while ('\0' != *idname) {
                        BLI_snprintf(newname, MAX_PTCACHE_FILE, "%02X", (char)(*idname++));
index c6d4cf1412d56e9d5c2e49d471c1559dcded3246..2517324242b29b5ddc1750d6d4569ab9e4b8d7dc 100644 (file)
@@ -148,7 +148,7 @@ void default_color_mapping(ColorMapping *colormap)
 {
        memset(colormap, 0, sizeof(ColorMapping));
 
-       init_colorband(&colormap->coba, 1);
+       init_colorband(&colormap->coba, true);
 
        colormap->bright = 1.0;
        colormap->contrast = 1.0;
@@ -163,7 +163,7 @@ void default_color_mapping(ColorMapping *colormap)
 
 /* ****************** COLORBAND ******************* */
 
-void init_colorband(ColorBand *coba, int rangetype)
+void init_colorband(ColorBand *coba, bool rangetype)
 {
        int a;
        
@@ -205,7 +205,7 @@ void init_colorband(ColorBand *coba, int rangetype)
        
 }
 
-ColorBand *add_colorband(int rangetype)
+ColorBand *add_colorband(bool rangetype)
 {
        ColorBand *coba;
        
@@ -1285,7 +1285,7 @@ PointDensity *BKE_add_pointdensity(void)
        pd->noise_depth = 1;
        pd->noise_fac = 1.0f;
        pd->noise_influence = TEX_PD_NOISE_STATIC;
-       pd->coba = add_colorband(1);
+       pd->coba = add_colorband(true);
        pd->speed_scale = 1.0f;
        pd->totpoints = 0;
        pd->object = NULL;
index ea5610af3b5ad19aafabe18e5e6f8bacb8156723..fdd34eb2475f7990dedf8c8b1076d644e438e0e6 100644 (file)
@@ -1401,7 +1401,7 @@ void blo_make_movieclip_pointer_map(FileData *fd, Main *oldmain)
        for (; sce; sce = sce->id.next) {
                if (sce->nodetree) {
                        bNode *node;
-                       for (node = sce->nodetree->nodes.first; node; node= node->next)
+                       for (node = sce->nodetree->nodes.first; node; node = node->next)
                                if (node->type == CMP_NODE_MOVIEDISTORTION)
                                        oldnewmap_insert(fd->movieclipmap, node->storage, node->storage, 0);
                }
@@ -2332,15 +2332,15 @@ static void lib_link_ntree(FileData *fd, ID *id, bNodeTree *ntree)
                
                node->id= newlibadr_us(fd, id->lib, node->id);
 
-               for (sock=node->inputs.first; sock; sock=sock->next)
+               for (sock = node->inputs.first; sock; sock = sock->next)
                        lib_link_node_socket(fd, id, sock);
-               for (sock=node->outputs.first; sock; sock=sock->next)
+               for (sock = node->outputs.first; sock; sock = sock->next)
                        lib_link_node_socket(fd, id, sock);
        }
        
-       for (sock=ntree->inputs.first; sock; sock=sock->next)
+       for (sock = ntree->inputs.first; sock; sock = sock->next)
                lib_link_node_socket(fd, id, sock);
-       for (sock=ntree->outputs.first; sock; sock=sock->next)
+       for (sock = ntree->outputs.first; sock; sock = sock->next)
                lib_link_node_socket(fd, id, sock);
 }
 
@@ -2367,7 +2367,7 @@ static void lib_node_do_versions_group_indices(bNode *gnode)
        bNodeSocket *sock;
        bNodeLink *link;
        
-       for (sock=gnode->outputs.first; sock; sock=sock->next) {
+       for (sock=gnode->outputs.first; sock; sock = sock->next) {
                int old_index = sock->to_index;
                
                for (link = ngroup->links.first; link; link = link->next) {
@@ -2380,7 +2380,7 @@ static void lib_node_do_versions_group_indices(bNode *gnode)
                        }
                }
        }
-       for (sock=gnode->inputs.first; sock; sock=sock->next) {
+       for (sock=gnode->inputs.first; sock; sock = sock->next) {
                int old_index = sock->to_index;
                
                for (link = ngroup->links.first; link; link = link->next) {
@@ -4245,9 +4245,9 @@ static void lib_link_object(FileData *fd, Main *main)
                                        ob->proxy = NULL;
                                        
                                        if (ob->id.lib)
-                                               printf("Proxy lost from  object %s lib %s\n", ob->id.name+2, ob->id.lib->name);
+                                               printf("Proxy lost from  object %s lib %s\n", ob->id.name + 2, ob->id.lib->name);
                                        else
-                                               printf("Proxy lost from  object %s lib <NONE>\n", ob->id.name+2);
+                                               printf("Proxy lost from  object %s lib <NONE>\n", ob->id.name + 2);
                                }
                                else {
                                        /* this triggers object_update to always use a copy */
@@ -4261,9 +4261,9 @@ static void lib_link_object(FileData *fd, Main *main)
                        
                        if (ob->data==NULL && poin!=NULL) {
                                if (ob->id.lib)
-                                       printf("Can't find obdata of %s lib %s\n", ob->id.name+2, ob->id.lib->name);
+                                       printf("Can't find obdata of %s lib %s\n", ob->id.name + 2, ob->id.lib->name);
                                else
-                                       printf("Object %s lost data.\n", ob->id.name+2);
+                                       printf("Object %s lost data.\n", ob->id.name + 2);
                                
                                ob->type = OB_EMPTY;
                                warn = 1;
@@ -4984,7 +4984,7 @@ static void composite_patch(bNodeTree *ntree, Scene *scene)
 {
        bNode *node;
        
-       for (node= ntree->nodes.first; node; node= node->next) {
+       for (node = ntree->nodes.first; node; node = node->next) {
                if (node->id==NULL && ELEM4(node->type, CMP_NODE_R_LAYERS, CMP_NODE_COMPOSITE, CMP_NODE_DEFOCUS, CMP_NODE_OUTPUT_FILE))
                        node->id = &scene->id;
        }
@@ -5681,7 +5681,7 @@ static void lib_link_screen(FileData *fd, Main *main)
 
 static bool restore_pointer(ID *id, ID *newid, int user)
 {
-       if (strcmp(newid->name+2, id->name+2) == 0) {
+       if (strcmp(newid->name + 2, id->name + 2) == 0) {
                if (newid->lib == id->lib) {
                        if (user == 1) {
                                if (newid->us == 0) {
@@ -7238,7 +7238,7 @@ static void do_versions_nodetree_multi_file_output_format_2_62_1(Scene *sce, bNo
                                nimf->format = sce->r.im_format;
                        
                        /* transfer render format toggle to node format toggle */
-                       for (sock=node->inputs.first; sock; sock=sock->next) {
+                       for (sock = node->inputs.first; sock; sock = sock->next) {
                                NodeImageMultiFileSocket *simf = sock->storage;
                                simf->use_node_format = simf->use_render_format;
                        }
@@ -7292,7 +7292,7 @@ static void do_versions_nodetree_file_output_layers_2_64_5(bNodeTree *ntree)
        for (node=ntree->nodes.first; node; node=node->next) {
                if (node->type == CMP_NODE_OUTPUT_FILE) {
                        bNodeSocket *sock;
-                       for (sock=node->inputs.first; sock; sock=sock->next) {
+                       for (sock = node->inputs.first; sock; sock = sock->next) {
                                NodeImageMultiFileSocket *input = sock->storage;
                                
                                /* multilayer names are stored as separate strings now,
@@ -7487,15 +7487,15 @@ static void do_versions_nodetree_customnodes(bNodeTree *ntree, int UNUSED(is_gro
                        node->flag |= NODE_INIT;
                        
                        /* sockets idname */
-                       for (sock=node->inputs.first; sock; sock=sock->next)
+                       for (sock = node->inputs.first; sock; sock = sock->next)
                                BLI_strncpy(sock->idname, node_socket_get_static_idname(sock), sizeof(sock->idname));
-                       for (sock=node->outputs.first; sock; sock=sock->next)
+                       for (sock = node->outputs.first; sock; sock = sock->next)
                                BLI_strncpy(sock->idname, node_socket_get_static_idname(sock), sizeof(sock->idname));
                }
                /* tree sockets idname */
-               for (sock=ntree->inputs.first; sock; sock=sock->next)
+               for (sock = ntree->inputs.first; sock; sock = sock->next)
                        BLI_strncpy(sock->idname, node_socket_get_static_idname(sock), sizeof(sock->idname));
-               for (sock=ntree->outputs.first; sock; sock=sock->next)
+               for (sock = ntree->outputs.first; sock; sock = sock->next)
                        BLI_strncpy(sock->idname, node_socket_get_static_idname(sock), sizeof(sock->idname));
        }
        
@@ -7505,14 +7505,14 @@ static void do_versions_nodetree_customnodes(bNodeTree *ntree, int UNUSED(is_gro
                bNodeSocket *sock;
                
                for (node=ntree->nodes.first; node; node=node->next) {
-                       for (sock=node->inputs.first; sock; sock=sock->next)
+                       for (sock = node->inputs.first; sock; sock = sock->next)
                                sock->in_out = SOCK_IN;
-                       for (sock=node->outputs.first; sock; sock=sock->next)
+                       for (sock = node->outputs.first; sock; sock = sock->next)
                                sock->in_out = SOCK_OUT;
                }
-               for (sock=ntree->inputs.first; sock; sock=sock->next)
+               for (sock = ntree->inputs.first; sock; sock = sock->next)
                        sock->in_out = SOCK_IN;
-               for (sock=ntree->outputs.first; sock; sock=sock->next)
+               for (sock = ntree->outputs.first; sock; sock = sock->next)
                        sock->in_out = SOCK_OUT;
        }
        
@@ -7522,20 +7522,20 @@ static void do_versions_nodetree_customnodes(bNodeTree *ntree, int UNUSED(is_gro
                bNodeSocket *sock;
                
                for (node=ntree->nodes.first; node; node=node->next) {
-                       for (sock=node->inputs.first; sock; sock=sock->next) {
+                       for (sock = node->inputs.first; sock; sock = sock->next) {
                                BLI_strncpy(sock->identifier, sock->name, sizeof(sock->identifier));
                                BLI_uniquename(&node->inputs, sock, sock->identifier, '.', offsetof(bNodeSocket, identifier), sizeof(sock->identifier));
                        }
-                       for (sock=node->outputs.first; sock; sock=sock->next) {
+                       for (sock = node->outputs.first; sock; sock = sock->next) {
                                BLI_strncpy(sock->identifier, sock->name, sizeof(sock->identifier));
                                BLI_uniquename(&node->outputs, sock, sock->identifier, '.', offsetof(bNodeSocket, identifier), sizeof(sock->identifier));
                        }
                }
-               for (sock=ntree->inputs.first; sock; sock=sock->next) {
+               for (sock = ntree->inputs.first; sock; sock = sock->next) {
                        BLI_strncpy(sock->identifier, sock->name, sizeof(sock->identifier));
                        BLI_uniquename(&ntree->inputs, sock, sock->identifier, '.', offsetof(bNodeSocket, identifier), sizeof(sock->identifier));
                }
-               for (sock=ntree->outputs.first; sock; sock=sock->next) {
+               for (sock = ntree->outputs.first; sock; sock = sock->next) {
                        BLI_strncpy(sock->identifier, sock->name, sizeof(sock->identifier));
                        BLI_uniquename(&ntree->outputs, sock, sock->identifier, '.', offsetof(bNodeSocket, identifier), sizeof(sock->identifier));
                }
@@ -8980,7 +8980,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
                        for (sa= sc->areabase.first; sa; sa= sa->next) {
                                SpaceLink *sl;
                                for (sl= sa->spacedata.first; sl; sl= sl->next) {
-                                       if(sl->spacetype==SPACE_NODE) {
+                                       if (sl->spacetype==SPACE_NODE) {
                                                SpaceNode *snode = (SpaceNode *)sl;
                                                
                                                /* reset pointers to force tree path update from context */
@@ -10331,7 +10331,7 @@ static void give_base_to_groups(Main *mainvar, Scene *scene)
                        Base *base;
                        
                        /* BKE_object_add(...) messes with the selection */
-                       Object *ob = BKE_object_add_only_object(mainvar, OB_EMPTY, group->id.name+2);
+                       Object *ob = BKE_object_add_only_object(mainvar, OB_EMPTY, group->id.name + 2);
                        ob->type = OB_EMPTY;
                        ob->lay = scene->lay;
                        
@@ -10345,7 +10345,7 @@ static void give_base_to_groups(Main *mainvar, Scene *scene)
                        /* assign the group */
                        ob->dup_group = group;
                        ob->transflag |= OB_DUPLIGROUP;
-                       rename_id(&ob->id, group->id.name+2);
+                       rename_id(&ob->id, group->id.name + 2);
                        copy_v3_v3(ob->loc, scene->cursor);
                }
        }
@@ -10733,7 +10733,7 @@ static void read_libraries(FileData *basefd, ListBase *mainlist)
                                                                        BKE_reportf_wrap(fd->reports, RPT_WARNING,
                                                                                         TIP_("LIB ERROR: %s: '%s' missing from '%s'"),
                                                                                         BKE_idcode_to_name(GS(id->name)),
-                                                                                        id->name+2, mainptr->curlib->filepath);
+                                                                                        id->name + 2, mainptr->curlib->filepath);
                                                                }
                                                                
                                                                change_idid_adr(mainlist, basefd, id, realid);
index f92a8678300a92f9164c76861b3378db6c1cd4af..3827a31ae95bcad8afa3560006fbeb114ef2d1c7 100644 (file)
@@ -747,14 +747,14 @@ static void do_versions_nodetree_default_value_259(bNodeTree *ntree)
        bNode *node;
        bNodeSocket *sock;
        for (node=ntree->nodes.first; node; node=node->next) {
-               for (sock=node->inputs.first; sock; sock=sock->next)
+               for (sock = node->inputs.first; sock; sock = sock->next)
                        do_versions_socket_default_value_259(sock);
-               for (sock=node->outputs.first; sock; sock=sock->next)
+               for (sock = node->outputs.first; sock; sock = sock->next)
                        do_versions_socket_default_value_259(sock);
        }
-       for (sock=ntree->inputs.first; sock; sock=sock->next)
+       for (sock = ntree->inputs.first; sock; sock = sock->next)
                do_versions_socket_default_value_259(sock);
-       for (sock=ntree->outputs.first; sock; sock=sock->next)
+       for (sock = ntree->outputs.first; sock; sock = sock->next)
                do_versions_socket_default_value_259(sock);
 }
 
@@ -2378,17 +2378,17 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *main)
                        
                        /* first make sure the own_index for new sockets is valid */
                        for (node=ntree->nodes.first; node; node=node->next) {
-                               for (sock=node->inputs.first; sock; sock=sock->next)
+                               for (sock = node->inputs.first; sock; sock = sock->next)
                                        if (sock->own_index >= ntree->cur_index)
                                                ntree->cur_index = sock->own_index+1;
-                               for (sock=node->outputs.first; sock; sock=sock->next)
+                               for (sock = node->outputs.first; sock; sock = sock->next)
                                        if (sock->own_index >= ntree->cur_index)
                                                ntree->cur_index = sock->own_index+1;
                        }
                        
                        /* add ntree->inputs/ntree->outputs sockets for all unlinked sockets in the group tree. */
                        for (node=ntree->nodes.first; node; node=node->next) {
-                               for (sock=node->inputs.first; sock; sock=sock->next) {
+                               for (sock = node->inputs.first; sock; sock = sock->next) {
                                        if (!sock->link && !nodeSocketIsHidden(sock)) {
                                                
                                                gsock = do_versions_node_group_add_socket_2_56_2(ntree, sock->name, sock->type, SOCK_IN);
@@ -2399,18 +2399,18 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *main)
                                                /* XXX nodeAddLink does not work with incomplete (node==NULL) links any longer,
                                                 * have to create these directly here. These links are updated again in subsequent do_version!
                                                 */
-                                               link= MEM_callocN(sizeof(bNodeLink), "link");
+                                               link = MEM_callocN(sizeof(bNodeLink), "link");
                                                BLI_addtail(&ntree->links, link);
-                                               link->fromnode= NULL;
-                                               link->fromsock= gsock;
-                                               link->tonode= node;
-                                               link->tosock= sock;
+                                               link->fromnode = NULL;
+                                               link->fromsock = gsock;
+                                               link->tonode = node;
+                                               link->tosock = sock;
                                                ntree->update |= NTREE_UPDATE_LINKS;
                                                
                                                sock->link = link;
                                        }
                                }
-                               for (sock=node->outputs.first; sock; sock=sock->next) {
+                               for (sock = node->outputs.first; sock; sock = sock->next) {
                                        if (nodeCountSocketLinks(ntree, sock)==0 && !nodeSocketIsHidden(sock)) {
                                                gsock = do_versions_node_group_add_socket_2_56_2(ntree, sock->name, sock->type, SOCK_OUT);
                                                
@@ -2420,12 +2420,12 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *main)
                                                /* XXX nodeAddLink does not work with incomplete (node==NULL) links any longer,
                                                 * have to create these directly here. These links are updated again in subsequent do_version!
                                                 */
-                                               link= MEM_callocN(sizeof(bNodeLink), "link");
+                                               link = MEM_callocN(sizeof(bNodeLink), "link");
                                                BLI_addtail(&ntree->links, link);
-                                               link->fromnode= node;
-                                               link->fromsock= sock;
-                                               link->tonode= NULL;
-                                               link->tosock= gsock;
+                                               link->fromnode = node;
+                                               link->fromsock = sock;
+                                               link->tonode = NULL;
+                                               link->tosock = gsock;
                                                ntree->update |= NTREE_UPDATE_LINKS;
                                                
                                                gsock->link = link;
index 31410631ce0059f35f20fca15e674a958d958ce8..c6856d8b71d337d398a2e905b8de967a54fbd7fb 100644 (file)
@@ -2306,7 +2306,7 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *main)
                        Image *ima;
                        for (ima = main->image.first; ima; ima = ima->id.next)
                                if (strcmp(ima->name, "Compositor") == 0) {
-                                       strcpy(ima->id.name+2, "Viewer Node");
+                                       strcpy(ima->id.name + 2, "Viewer Node");
                                        strcpy(ima->name, "Viewer Node");
                                }
                }
@@ -2495,11 +2495,11 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *main)
                                ima->gen_x = 256; ima->gen_y = 256;
                                ima->gen_type = 1;
 
-                               if (0 == strncmp(ima->id.name+2, "Viewer Node", sizeof(ima->id.name) - 2)) {
+                               if (0 == strncmp(ima->id.name + 2, "Viewer Node", sizeof(ima->id.name) - 2)) {
                                        ima->source = IMA_SRC_VIEWER;
                                        ima->type = IMA_TYPE_COMPOSITE;
                                }
-                               if (0 == strncmp(ima->id.name+2, "Render Result", sizeof(ima->id.name) - 2)) {
+                               if (0 == strncmp(ima->id.name + 2, "Render Result", sizeof(ima->id.name) - 2)) {
                                        ima->source = IMA_SRC_VIEWER;
                                        ima->type = IMA_TYPE_R_RESULT;
                                }
index d78c6687e1652db4cd661c6b855a86d51ace30b5..9a4736449a2d30f595a0b19bdb4bdc297ddc7095 100644 (file)
@@ -738,7 +738,7 @@ static void write_nodetree(WriteData *wd, bNodeTree *ntree)
        
        if (ntree->adt) write_animdata(wd, ntree->adt);
        
-       for (node= ntree->nodes.first; node; node= node->next) {
+       for (node = ntree->nodes.first; node; node = node->next) {
                writestruct(wd, DATA, "bNode", 1, node);
 
                if (node->prop)
@@ -774,12 +774,12 @@ static void write_nodetree(WriteData *wd, bNodeTree *ntree)
                
                if (node->type==CMP_NODE_OUTPUT_FILE) {
                        /* inputs have own storage data */
-                       for (sock=node->inputs.first; sock; sock=sock->next)
+                       for (sock = node->inputs.first; sock; sock = sock->next)
                                writestruct(wd, DATA, "NodeImageMultiFileSocket", 1, sock->storage);
                }
                if (node->type==CMP_NODE_IMAGE) {
                        /* write extra socket info */
-                       for (sock=node->outputs.first; sock; sock=sock->next)
+                       for (sock = node->outputs.first; sock; sock = sock->next)
                                writestruct(wd, DATA, "NodeImageLayer", 1, sock->storage);
                }
        }
index b8c70871ea17bfbaf5b4e1a1153771e363d78fb6..c3efac55fe7a4e281f3b01397f06ea1d32824a50 100644 (file)
@@ -353,7 +353,7 @@ void MeshImporter::allocate_poly_data(COLLADAFW::Mesh *collada_mesh, Mesh *me)
                                size_t prim_poly_count    = mpvc->getFaceCount();
 
                                size_t prim_loop_count    = 0;
-                               for(int index=0; index < prim_poly_count; index++) {
+                               for (int index=0; index < prim_poly_count; index++) {
                                        prim_loop_count += get_vertex_count(mpvc, index);
                                }
 
index 89f8bb3226b2ee9424ec137962e5fe8657cbf798..604e131b44b9f3f5040c231c14bdfe9b82b929ff 100644 (file)
@@ -178,7 +178,7 @@ void SceneExporter::writeNodes(Object *ob, Scene *sce)
                if ((ob->transflag & OB_DUPLIGROUP) == OB_DUPLIGROUP && ob->dup_group) {
                        GroupObject *go = NULL;
                        Group *gr = ob->dup_group;
-                       /* printf("group detected '%s'\n", gr->id.name+2); */
+                       /* printf("group detected '%s'\n", gr->id.name + 2); */
                        for (go = (GroupObject *)(gr->gobject.first); go; go = go->next) {
                                printf("\t%s\n", go->ob->id.name);
                        }
index 66f7feb8928578389a21ba7e446035f8db5e2734..84b81f4d332a6b3d233678b84f90a8413ddd266c 100644 (file)
@@ -143,7 +143,7 @@ Mesh *bc_get_mesh_copy(Scene *scene, Object *ob, BC_export_mesh_type export_mesh
        Mesh *tmpmesh;
        CustomDataMask mask = CD_MASK_MESH;
        DerivedMesh *dm = NULL;
-       if(apply_modifiers) {
+       if (apply_modifiers) {
                switch (export_mesh_type) {
                        case BC_MESH_TYPE_VIEW: {
                                dm = mesh_create_derived_view(scene, ob, mask);
index 3b67d0912d49139126722b20e05889d8682b3e65..09824a7b439c7570b7f268daa8e1b006d129598a 100644 (file)
@@ -44,7 +44,7 @@ static int find_group_input(GroupNode *gnode, const char *identifier, InputSocke
        int index;
        for (index = 0; index < gnode->getNumberOfInputSockets(); ++index) {
                InputSocket *sock = gnode->getInputSocket(index);
-               if (strcmp(sock->getbNodeSocket()->identifier, identifier)==0) {
+               if (STREQ(sock->getbNodeSocket()->identifier, identifier)) {
                        *r_sock = sock;
                        return index;
                }
@@ -58,7 +58,7 @@ static int find_group_output(GroupNode *gnode, const char *identifier, OutputSoc
        int index;
        for (index = 0; index < gnode->getNumberOfOutputSockets(); ++index) {
                OutputSocket *sock = gnode->getOutputSocket(index);
-               if (strcmp(sock->getbNodeSocket()->identifier, identifier)==0) {
+               if (STREQ(sock->getbNodeSocket()->identifier, identifier)) {
                        *r_sock = sock;
                        return index;
                }
index ee2625cf94b10d78678ea6b1c01f013babe22dca..7d8be7ae9c9849e6c79ea6f6796e443933b42b1c 100644 (file)
@@ -3076,7 +3076,7 @@ typedef struct ComponentMenuArgs {
 /* NOTE: this is a block-menu, needs 0 events, otherwise the menu closes */
 static uiBlock *component_menu(bContext *C, ARegion *ar, void *args_v)
 {
-       ComponentMenuArgs *args = (ComponentMenuArgs*)args_v;
+       ComponentMenuArgs *args = (ComponentMenuArgs *)args_v;
        uiBlock *block;
        uiLayout *layout;
        
index 6b278358db9d03b815c1979e2f508e79c26b514a..39a6109bd62d6dc1573a8e714d8d21d9ccf1b56e 100644 (file)
@@ -390,7 +390,7 @@ const unsigned char *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colo
                                case TH_NODE_GROUP:
                                        cp = ts->syntaxc; break;
                                case TH_NODE_INTERFACE:
-                                       cp= ts->console_output; break;
+                                       cp = ts->console_output; break;
                                case TH_NODE_FRAME:
                                        cp = ts->movie; break;
                                case TH_NODE_MATTE:
@@ -1538,7 +1538,7 @@ void init_userdef_do_versions(void)
                        rgba_char_args_set(btheme->tv3d.editmesh_active, 255, 255, 255, 128);
                }
                if (U.coba_weight.tot == 0)
-                       init_colorband(&U.coba_weight, 1);
+                       init_colorband(&U.coba_weight, true);
        }
        if ((bmain->versionfile < 245) || (bmain->versionfile == 245 && bmain->subversionfile < 11)) {
                bTheme *btheme;
index fe7e6d0195589b73782ee949385db6559c1ff81a..013b6d3c606f643b91205e5d9ae7e24b02413489 100644 (file)
@@ -2081,20 +2081,17 @@ void UI_view2d_getscale_inverse(View2D *v2d, float *x, float *y)
 void UI_view2d_getcenter(struct View2D *v2d, float *x, float *y)
 {
        /* get center */
-       if (x) *x = 0.5f*(v2d->cur.xmin + v2d->cur.xmax);
-       if (y) *y = 0.5f*(v2d->cur.ymin + v2d->cur.ymax);
+       if (x) *x = BLI_rctf_cent_x(&v2d->cur);
+       if (y) *y = BLI_rctf_cent_y(&v2d->cur);
 }
 void UI_view2d_setcenter(struct View2D *v2d, float x, float y)
 {
        /* get delta from current center */
-       float dx = x - 0.5f*(v2d->cur.xmin + v2d->cur.xmax);
-       float dy = y - 0.5f*(v2d->cur.ymin + v2d->cur.ymax);
-       
+       float dx = x - BLI_rctf_cent_x(&v2d->cur);
+       float dy = y - BLI_rctf_cent_y(&v2d->cur);
+
        /* add to cur */
-       v2d->cur.xmin += dx;
-       v2d->cur.xmax += dx;
-       v2d->cur.ymin += dy;
-       v2d->cur.ymax += dy;
+       BLI_rctf_translate(&v2d->cur, dx, dy);
        
        /* make sure that 'cur' rect is in a valid state as a result of these changes */
        UI_view2d_curRect_validate(v2d);
index 8e2a87c7c6419eaf90da051704d2f9bfd77249f7..9b61fa449557e6a5fce70554c94a982c735937e4 100644 (file)
@@ -604,7 +604,7 @@ static bConstraint *edit_constraint_property_get(wmOperator *op, Object *ob, int
                        list = &pchan->constraints;
                else {
                        //if (G.debug & G_DEBUG)
-                       //printf("edit_constraint_property_get: No active bone for object '%s'\n", (ob)? ob->id.name+2 : "<None>");
+                       //printf("edit_constraint_property_get: No active bone for object '%s'\n", (ob)? ob->id.name + 2 : "<None>");
                        return NULL;
                }
        }
index fa7e888f8d7a303e585e70216a72e0bff48e80aa..816ad9960df03e6ebcd909187d5b36b0f90385b7 100644 (file)
@@ -2321,7 +2321,7 @@ void logic_buttons(bContext *C, ARegion *ar)
                uiItemR(split, &settings_ptr, "show_state_panel", UI_ITEM_R_NO_BG, "", ICON_DISCLOSURE_TRI_RIGHT);
 
                row = uiLayoutRow(split, TRUE);
-               uiDefButBitS(block, TOG, OB_SHOWCONT, B_REDR, ob->id.name+2, (short)(xco - U.widget_unit / 2), yco, (short)(width - 1.5f * U.widget_unit), UI_UNIT_Y, &ob->scaflag, 0, 31, 0, 0, TIP_("Object name, click to show/hide controllers"));
+               uiDefButBitS(block, TOG, OB_SHOWCONT, B_REDR, ob->id.name + 2, (short)(xco - U.widget_unit / 2), yco, (short)(width - 1.5f * U.widget_unit), UI_UNIT_Y, &ob->scaflag, 0, 31, 0, 0, TIP_("Object name, click to show/hide controllers"));
 
                RNA_pointer_create((ID *)ob, &RNA_Object, ob, &object_ptr);
                uiLayoutSetContextPointer(row, "object", &object_ptr);
@@ -2418,7 +2418,7 @@ void logic_buttons(bContext *C, ARegion *ar)
                if ((ob->scavisflag & OB_VIS_SENS) == 0) continue;
 
                row = uiLayoutRow(layout, TRUE);
-               uiDefButBitS(block, TOG, OB_SHOWSENS, B_REDR, ob->id.name+2, (short)(xco - U.widget_unit / 2), yco, (short)(width - 1.5f * U.widget_unit), UI_UNIT_Y, &ob->scaflag, 0, 31, 0, 0, TIP_("Object name, click to show/hide sensors"));
+               uiDefButBitS(block, TOG, OB_SHOWSENS, B_REDR, ob->id.name + 2, (short)(xco - U.widget_unit / 2), yco, (short)(width - 1.5f * U.widget_unit), UI_UNIT_Y, &ob->scaflag, 0, 31, 0, 0, TIP_("Object name, click to show/hide sensors"));
 
                RNA_pointer_create((ID *)ob, &RNA_Object, ob, &object_ptr);
                uiLayoutSetContextPointer(row, "object", &object_ptr);
@@ -2489,7 +2489,7 @@ void logic_buttons(bContext *C, ARegion *ar)
                }
 
                row = uiLayoutRow(layout, TRUE);
-               uiDefButBitS(block, TOG, OB_SHOWACT, B_REDR, ob->id.name+2, (short)(xco - U.widget_unit / 2), yco, (short)(width - 1.5f * U.widget_unit), UI_UNIT_Y, &ob->scaflag, 0, 31, 0, 0, TIP_("Object name, click to show/hide actuators"));
+               uiDefButBitS(block, TOG, OB_SHOWACT, B_REDR, ob->id.name + 2, (short)(xco - U.widget_unit / 2), yco, (short)(width - 1.5f * U.widget_unit), UI_UNIT_Y, &ob->scaflag, 0, 31, 0, 0, TIP_("Object name, click to show/hide actuators"));
 
                RNA_pointer_create((ID *)ob, &RNA_Object, ob, &object_ptr);
                uiLayoutSetContextPointer(row, "object", &object_ptr);
index fddecf267a96bcc1b6cf32f4041326af74054de8..0b02aef2fabef7dba9eed206bf17c300d75b10e1 100644 (file)
 
 static void node_add_menu_class(bContext *C, uiLayout *layout, void *arg_nodeclass)
 {
-       Scene *scene= CTX_data_scene(C);
-       SpaceNode *snode= CTX_wm_space_node(C);
+       Scene *scene = CTX_data_scene(C);
+       SpaceNode *snode = CTX_wm_space_node(C);
        bNodeTree *ntree;
-       int nodeclass= GET_INT_FROM_POINTER(arg_nodeclass);
-       int event, compatibility= 0;
+       int nodeclass = GET_INT_FROM_POINTER(arg_nodeclass);
+       int event, compatibility = 0;
        
        ntree = snode->nodetree;
        
-       if(!ntree) {
+       if (!ntree) {
                uiItemS(layout);
                return;
        }
 
-       if(ntree->type == NTREE_SHADER) {
-               if(BKE_scene_use_new_shading_nodes(scene))
-                       compatibility= NODE_NEW_SHADING;
+       if (ntree->type == NTREE_SHADER) {
+               if (BKE_scene_use_new_shading_nodes(scene))
+                       compatibility = NODE_NEW_SHADING;
                else
-                       compatibility= NODE_OLD_SHADING;
+                       compatibility = NODE_OLD_SHADING;
        }
        
-       if (nodeclass==NODE_CLASS_GROUP) {
-               Main *bmain= CTX_data_main(C);
+       if (nodeclass == NODE_CLASS_GROUP) {
+               Main *bmain = CTX_data_main(C);
                bNodeTree *ngroup;
                const char *ngroup_type, *node_type;
                PointerRNA ptr;
                
                NODE_TYPES_BEGIN(ntype)
-                       if (ntype->nclass!=nodeclass || !ntype->ui_name)
+                       if (ntype->nclass != nodeclass || !ntype->ui_name)
                                continue;
                        if (!ntype->poll(ntype, ntree))
                                continue;
@@ -132,33 +132,32 @@ static void node_add_menu_class(bContext *C, uiLayout *layout, void *arg_nodecla
                        RNA_string_set(&ptr, "node_type", node_type);
                        
                        uiItemS(layout);
-                       
-                       for(ngroup=bmain->nodetree.first, event=0; ngroup; ngroup= ngroup->id.next, ++event) {
+
+                       for (ngroup = bmain->nodetree.first, event = 0; ngroup; ngroup = ngroup->id.next, ++event) {
                                /* only use group trees of the right type */
-                               if (strcmp(ngroup->idname, ngroup_type)!=0)
+                               if (STRNEQ(ngroup->idname, ngroup_type))
                                        continue;
                                if (!nodeGroupPoll(ntree, ngroup))
                                        continue;
                                
-                               ptr = uiItemFullO(layout, "NODE_OT_add_group_node", ngroup->id.name+2, ntype->ui_icon, NULL, WM_OP_INVOKE_DEFAULT, UI_ITEM_O_RETURN_PROPS);
+                               ptr = uiItemFullO(layout, "NODE_OT_add_group_node", ngroup->id.name + 2, ntype->ui_icon, NULL, WM_OP_INVOKE_DEFAULT, UI_ITEM_O_RETURN_PROPS);
                                RNA_string_set(&ptr, "type", ntype->idname);
-                               RNA_string_set(&ptr, "grouptree", ngroup->id.name+2);
+                               RNA_string_set(&ptr, "grouptree", ngroup->id.name + 2);
                        }
                NODE_TYPES_END
        }
-       else if (nodeclass==NODE_DYNAMIC) {
+       else if (nodeclass == NODE_DYNAMIC) {
                /* disabled */
        }
-       else 
-       {
+       else {
                PointerRNA ptr;
                
                NODE_TYPES_BEGIN(ntype)
-                       if (ntype->nclass!=nodeclass || !ntype->ui_name)
+                       if (ntype->nclass != nodeclass || !ntype->ui_name)
                                continue;
                        if (!ntype->poll(ntype, ntree))
                                continue;
-                       if (compatibility && (ntype->compatibility & compatibility)==0)
+                       if (compatibility && (ntype->compatibility & compatibility) == 0)
                                continue;
                        
                        ptr = uiItemFullO(layout, "NODE_OT_add_node", IFACE_(ntype->ui_name), ntype->ui_icon, NULL, WM_OP_INVOKE_DEFAULT, UI_ITEM_O_RETURN_PROPS);
@@ -169,15 +168,15 @@ static void node_add_menu_class(bContext *C, uiLayout *layout, void *arg_nodecla
 
 static void node_add_menu_foreach_class_cb(void *calldata, int nclass, const char *name)
 {
-       uiLayout *layout= calldata;
+       uiLayout *layout = calldata;
        uiItemMenuF(layout, IFACE_(name), 0, node_add_menu_class, SET_INT_IN_POINTER(nclass));
 }
 
 static void node_add_menu_default(const bContext *C, uiLayout *layout, bNodeTree *ntree)
 {
-       Scene *scene= CTX_data_scene(C);
+       Scene *scene = CTX_data_scene(C);
        
-       if(ntree->typeinfo->foreach_nodeclass)
+       if (ntree->typeinfo->foreach_nodeclass)
                ntree->typeinfo->foreach_nodeclass(scene, layout, node_add_menu_foreach_class_cb);
 }
 
index cd04957c0a5275f63dfb79942838323c69d3cb5e..765f2b675492acef409435454af37d46686bc6c5 100644 (file)
@@ -324,7 +324,7 @@ static int node_add_file_exec(bContext *C, wmOperator *op)
        SpaceNode *snode = CTX_wm_space_node(C);
        bNode *node;
        Image *ima = NULL;
-       int type= 0;
+       int type = 0;
 
        /* check input variables */
        if (RNA_struct_property_is_set(op->ptr, "filepath")) {
@@ -427,7 +427,7 @@ void NODE_OT_add_file(wmOperatorType *ot)
 
 static int new_node_tree_exec(bContext *C, wmOperator *op)
 {
-       SpaceNode *snode= CTX_wm_space_node(C);
+       SpaceNode *snode = CTX_wm_space_node(C);
        Main *bmain = CTX_data_main(C);
        bNodeTree *ntree;
        PointerRNA ptr, idptr;
index 30cc3b93e8aea7c5cd103fd3399f412496aaa768..31e3cebeb3fcda4bd9070716e94b79a46acaef47 100644 (file)
@@ -162,7 +162,7 @@ static void node_sockets_panel(const bContext *C, Panel *pa)
 
 static int node_tree_interface_poll(const bContext *C, PanelType *UNUSED(pt))
 {
-       SpaceNode *snode= CTX_wm_space_node(C);
+       SpaceNode *snode = CTX_wm_space_node(C);
        
        return (snode && snode->edittree && (snode->edittree->inputs.first || snode->edittree->outputs.first));
 }
@@ -192,14 +192,14 @@ static int node_tree_find_active_socket(bNodeTree *ntree, bNodeSocket **r_sock,
 
 static void node_tree_interface_panel(const bContext *C, Panel *pa)
 {
-       SpaceNode *snode= CTX_wm_space_node(C);
-       bNodeTree *ntree= (snode) ? snode->edittree : NULL;
+       SpaceNode *snode = CTX_wm_space_node(C);
+       bNodeTree *ntree = (snode) ? snode->edittree : NULL;
        bNodeSocket *sock;
        int in_out;
-       uiLayout *layout= pa->layout, *row, *split, *col;
+       uiLayout *layout = pa->layout, *row, *split, *col;
        PointerRNA ptr, sockptr, opptr;
-       
-       if(!ntree)
+
+       if (!ntree)
                return;
        
        RNA_id_pointer_create((ID *)ntree, &ptr);
@@ -212,13 +212,13 @@ static void node_tree_interface_panel(const bContext *C, Panel *pa)
        split = uiLayoutRow(row, TRUE);
        col = uiLayoutColumn(split, TRUE);
        uiItemL(col, "Inputs:", ICON_NONE);
-       uiTemplateList(col, (bContext*)C, "NODE_UL_interface_sockets", "", &ptr, "inputs", &ptr, "active_input", 0, 0, 0);
+       uiTemplateList(col, (bContext *)C, "NODE_UL_interface_sockets", "", &ptr, "inputs", &ptr, "active_input", 0, 0, 0);
        opptr = uiItemFullO(col, "NODE_OT_tree_socket_add", "", ICON_PLUS, NULL, WM_OP_EXEC_DEFAULT, UI_ITEM_O_RETURN_PROPS);
        RNA_enum_set(&opptr, "in_out", SOCK_IN);
        
        col = uiLayoutColumn(split, TRUE);
        uiItemL(col, "Outputs:", ICON_NONE);
-       uiTemplateList(col, (bContext*)C, "NODE_UL_interface_sockets", "", &ptr, "outputs", &ptr, "active_output", 0, 0, 0);
+       uiTemplateList(col, (bContext *)C, "NODE_UL_interface_sockets", "", &ptr, "outputs", &ptr, "active_output", 0, 0, 0);
        opptr = uiItemFullO(col, "NODE_OT_tree_socket_add", "", ICON_PLUS, NULL, WM_OP_EXEC_DEFAULT, UI_ITEM_O_RETURN_PROPS);
        RNA_enum_set(&opptr, "in_out", SOCK_OUT);
        
@@ -236,7 +236,7 @@ static void node_tree_interface_panel(const bContext *C, Panel *pa)
                uiItemS(layout);
                
                if (sock->typeinfo->interface_draw)
-                       sock->typeinfo->interface_draw((bContext*)C, layout, &sockptr);
+                       sock->typeinfo->interface_draw((bContext *)C, layout, &sockptr);
        }
 }
 
@@ -261,11 +261,11 @@ void node_buttons_register(ARegionType *art)
        pt->flag |= PNL_DEFAULT_CLOSED;
        BLI_addtail(&art->paneltypes, pt);
 
-       pt= MEM_callocN(sizeof(PanelType), "spacetype node panel tree interface");
+       pt = MEM_callocN(sizeof(PanelType), "spacetype node panel tree interface");
        strcpy(pt->idname, "NODE_PT_node_tree_interface");
        strcpy(pt->label, "Interface");
-       pt->draw= node_tree_interface_panel;
-       pt->poll= node_tree_interface_poll;
+       pt->draw = node_tree_interface_panel;
+       pt->poll = node_tree_interface_poll;
        BLI_addtail(&art->paneltypes, pt);
 
        pt = MEM_callocN(sizeof(PanelType), "spacetype node panel gpencil");
index 80a6ff1a3934c195785b368c7aa1e73d155cfebb..0636dee9bc5eb5c8c0fd53f0242d1d61a3a737d6 100644 (file)
@@ -89,17 +89,17 @@ static bNodeTree *node_tree_from_ID(ID *id)
        
                switch (idtype) {
                case ID_NT:
-                       return (bNodeTree*)id;
+                       return (bNodeTree *)id;
                case ID_MA:
-                       return ((Material*)id)->nodetree;
+                       return ((Material *)id)->nodetree;
                case ID_LA:
-                       return ((Lamp*)id)->nodetree;
+                       return ((Lamp *)id)->nodetree;
                case ID_WO:
-                       return ((World*)id)->nodetree;
+                       return ((World *)id)->nodetree;
                case ID_SCE:
-                       return ((Scene*)id)->nodetree;
+                       return ((Scene *)id)->nodetree;
                case ID_TE:
-                       return ((Tex*)id)->nodetree;
+                       return ((Tex *)id)->nodetree;
                }
        }
        
@@ -339,7 +339,7 @@ static void node_update_basis(const bContext *C, bNodeTree *ntree, bNode *node)
                RNA_pointer_create(&ntree->id, &RNA_NodeSocket, nsock, &sockptr);
                
                layout = uiBlockLayout(node->block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL,
-                                      locx+NODE_DYS, dy, NODE_WIDTH(node)-NODE_DY, NODE_DY, UI_GetStyle());
+                                      locx + NODE_DYS, dy, NODE_WIDTH(node) - NODE_DY, NODE_DY, UI_GetStyle());
                /* context pointers for current node and socket */
                uiLayoutSetContextPointer(layout, "node", &nodeptr);
                uiLayoutSetContextPointer(layout, "socket", &sockptr);
@@ -427,7 +427,7 @@ static void node_update_basis(const bContext *C, bNodeTree *ntree, bNode *node)
                RNA_pointer_create(&ntree->id, &RNA_NodeSocket, nsock, &sockptr);
                
                layout = uiBlockLayout(node->block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL,
-                                      locx+NODE_DYS, dy, NODE_WIDTH(node)-NODE_DY, NODE_DY, UI_GetStyle());
+                                      locx + NODE_DYS, dy, NODE_WIDTH(node) - NODE_DY, NODE_DY, UI_GetStyle());
                /* context pointers for current node and socket */
                uiLayoutSetContextPointer(layout, "node", &nodeptr);
                uiLayoutSetContextPointer(layout, "socket", &sockptr);
index 2012284f39b5d1dc7bb5650920980ca4ec594307..98f5939b36763ba630532eb7bfb15122c4019191 100644 (file)
@@ -290,11 +290,11 @@ void snode_notify(bContext *C, SpaceNode *snode)
 {
        WM_event_add_notifier(C, NC_NODE | NA_EDITED, NULL);
 
-       if(ED_node_is_shader(snode))
+       if (ED_node_is_shader(snode))
                WM_event_add_notifier(C, NC_MATERIAL | ND_NODES, snode->id);
-       else if(ED_node_is_compositor(snode))
+       else if (ED_node_is_compositor(snode))
                WM_event_add_notifier(C, NC_SCENE | ND_NODES, snode->id);
-       else if(ED_node_is_texture(snode))
+       else if (ED_node_is_texture(snode))
                WM_event_add_notifier(C, NC_TEXTURE | ND_NODES, snode->id);
 }
 
@@ -308,17 +308,17 @@ void ED_node_set_tree_type(SpaceNode *snode, bNodeTreeType *typeinfo)
 
 int ED_node_is_compositor(struct SpaceNode *snode)
 {
-       return (strcmp(snode->tree_idname, ntreeType_Composite->idname)==0);
+       return STREQ(snode->tree_idname, ntreeType_Composite->idname);
 }
 
 int ED_node_is_shader(struct SpaceNode *snode)
 {
-       return (strcmp(snode->tree_idname, ntreeType_Shader->idname)==0);
+       return STREQ(snode->tree_idname, ntreeType_Shader->idname);
 }
 
 int ED_node_is_texture(struct SpaceNode *snode)
 {
-       return (strcmp(snode->tree_idname, ntreeType_Texture->idname)==0);
+       return STREQ(snode->tree_idname, ntreeType_Texture->idname);
 }
 
 /* assumes nothing being done in ntree yet, sets the default in/out node */
@@ -513,8 +513,9 @@ void snode_set_context(const bContext *C)
                snode->flag &= ~SNODE_NEW_SHADERS;
        
        /* check the tree type */
-       if (!treetype
-           || (treetype->poll && !treetype->poll(C, treetype))) {
+       if (!treetype ||
+           (treetype->poll && !treetype->poll(C, treetype)))
+       {
                /* invalid tree type, disable */
                snode->tree_idname[0] = '\0';
                ED_node_tree_start(snode, NULL, NULL, NULL);
@@ -533,8 +534,9 @@ void snode_set_context(const bContext *C)
                        treetype->get_from_context(C, treetype, &ntree, &id, &from);
        }
        
-       if (snode->nodetree!=ntree || snode->id!=id || snode->from!=snode->from)
+       if (snode->nodetree != ntree || snode->id != id || snode->from != snode->from) {
                ED_node_tree_start(snode, ntree, id, from);
+       }
 }
 
 void snode_update(SpaceNode *snode, bNode *node)
@@ -547,11 +549,11 @@ void snode_update(SpaceNode *snode, bNode *node)
         */
        
        /* update all edited group nodes */
-       path=snode->treepath.last;
+       path = snode->treepath.last;
        if (path) {
                bNodeTree *ngroup = path->nodetree;
-               for (path=path->prev; path; path=path->prev) {
-                       nodeUpdateID(path->nodetree, (ID*)ngroup);
+               for (path = path->prev; path; path = path->prev) {
+                       nodeUpdateID(path->nodetree, (ID *)ngroup);
                        ngroup = path->nodetree;
                }
        }
@@ -2077,15 +2079,15 @@ static int ntree_socket_add_exec(bContext *C, wmOperator *op)
 void NODE_OT_tree_socket_add(wmOperatorType *ot)
 {
        /* identifiers */
-       ot->name= "Add Node Tree Interface Socket";
-       ot->idname= "NODE_OT_tree_socket_add";
+       ot->name = "Add Node Tree Interface Socket";
+       ot->idname = "NODE_OT_tree_socket_add";
        
        /* api callbacks */
-       ot->exec= ntree_socket_add_exec;
-       ot->poll= ED_operator_node_active;
+       ot->exec = ntree_socket_add_exec;
+       ot->poll = ED_operator_node_active;
        
        /* flags */
-       ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+       ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
        
        RNA_def_enum(ot->srna, "in_out", node_socket_in_out_items, SOCK_IN, "Socket Type", "");
 }
@@ -2120,15 +2122,15 @@ static int ntree_socket_remove_exec(bContext *C, wmOperator *UNUSED(op))
 void NODE_OT_tree_socket_remove(wmOperatorType *ot)
 {
        /* identifiers */
-       ot->name= "Remove Node Tree Interface Socket";
-       ot->idname= "NODE_OT_tree_socket_remove";
+       ot->name = "Remove Node Tree Interface Socket";
+       ot->idname = "NODE_OT_tree_socket_remove";
        
        /* api callbacks */
-       ot->exec= ntree_socket_remove_exec;
-       ot->poll= ED_operator_node_active;
+       ot->exec = ntree_socket_remove_exec;
+       ot->poll = ED_operator_node_active;
        
        /* flags */
-       ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+       ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
 }
 
 /********************** Move interface socket operator *********************/
@@ -2185,15 +2187,15 @@ static int ntree_socket_move_exec(bContext *C, wmOperator *op)
 void NODE_OT_tree_socket_move(wmOperatorType *ot)
 {
        /* identifiers */
-       ot->name= "Move Node Tree Socket";
-       ot->idname= "NODE_OT_tree_socket_move";
+       ot->name = "Move Node Tree Socket";
+       ot->idname = "NODE_OT_tree_socket_move";
        
        /* api callbacks */
-       ot->exec= ntree_socket_move_exec;
-       ot->poll= ED_operator_node_active;
+       ot->exec = ntree_socket_move_exec;
+       ot->poll = ED_operator_node_active;
        
        /* flags */
-       ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+       ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
        
        RNA_def_enum(ot->srna, "direction", move_direction_items, 1, "Direction", "");
 }
index ba98f9ea94d854e62765f08ff7444391387c0229..f460c68638f6f7db80672a65fbb853fa2f7cedd3 100644 (file)
@@ -137,7 +137,7 @@ static bNode *node_group_get_active(bContext *C, const char *node_idname)
        SpaceNode *snode = CTX_wm_space_node(C);
        bNode *node = nodeGetActive(snode->edittree);
        
-       if (node && strcmp(node->idname, node_idname)==0)
+       if (node && STREQ(node->idname, node_idname))
                return node;
        else
                return NULL;
@@ -161,7 +161,7 @@ static int node_group_edit_exec(bContext *C, wmOperator *op)
        MEM_freeN(node_idname);
        
        if (gnode && !exit) {
-               bNodeTree *ngroup= (bNodeTree*)gnode->id;
+               bNodeTree *ngroup = (bNodeTree *)gnode->id;
                
                if (ngroup) {
                        if (ngroup->id.lib)
@@ -240,8 +240,8 @@ static int node_group_ungroup(bNodeTree *ntree, bNode *gnode)
        wgroup = ntreeCopyTree_ex(ngroup, FALSE);
        
        /* Add the nodes into the ntree */
-       for(node= wgroup->nodes.first; node; node= nextnode) {
-               nextnode= node->next;
+       for (node = wgroup->nodes.first; node; node = nextnode) {
+               nextnode = node->next;
                
                /* Remove interface nodes.
                 * This also removes remaining links to and from interface nodes.
@@ -329,7 +329,7 @@ static int node_group_ungroup(bNodeTree *ntree, bNode *gnode)
                        
                        /* find external links to this input */
                        for (tlink = ntree->links.first; tlink; tlink = tlink->next) {
-                               if (tlink->tonode == gnode && strcmp(tlink->tosock->identifier, identifier)==0) {
+                               if (tlink->tonode == gnode && STREQ(tlink->tosock->identifier, identifier)) {
                                        nodeAddLink(ntree, tlink->fromnode, tlink->fromsock, link->tonode->new_node, link->tosock->new_sock);
                                        ++num_external_links;
                                }
@@ -356,7 +356,7 @@ static int node_group_ungroup(bNodeTree *ntree, bNode *gnode)
                        for (tlink = ngroup->links.first; tlink; tlink = tlink->next) {
                                /* only use active output node */
                                if (tlink->tonode->type == NODE_GROUP_OUTPUT && (tlink->tonode->flag & NODE_DO_OUTPUT)) {
-                                       if (strcmp(tlink->tosock->identifier, identifier)==0) {
+                                       if (STREQ(tlink->tosock->identifier, identifier)) {
                                                nodeAddLink(ntree, tlink->fromnode->new_node, tlink->fromsock->new_sock, link->tonode, link->tosock);
                                                ++num_internal_links;
                                        }
@@ -642,19 +642,19 @@ void NODE_OT_group_separate(wmOperatorType *ot)
 
 /* ****************** Make Group operator ******************* */
 
-static int node_group_make_use_node(bNode *node, bNode *gnode)
+static bool node_group_make_use_node(bNode *node, bNode *gnode)
 {
-       return (node != gnode
-               && !ELEM(node->type, NODE_GROUP_INPUT, NODE_GROUP_OUTPUT)
-               && (node->flag & NODE_SELECT));
+       return (node != gnode &&
+               !ELEM(node->type, NODE_GROUP_INPUT, NODE_GROUP_OUTPUT) &&
+               (node->flag & NODE_SELECT));
 }
 
-static int node_group_make_test_selected(bNodeTree *ntree, bNode *gnode, const char *ntree_idname, struct ReportList *reports)
+static bool node_group_make_test_selected(bNodeTree *ntree, bNode *gnode, const char *ntree_idname, struct ReportList *reports)
 {
        bNodeTree *ngroup;
        bNode *node;
        bNodeLink *link;
-       int ok = TRUE;
+       int ok = true;
        
        /* make a local pseudo node tree to pass to the node poll functions */
        ngroup = ntreeAddTree(NULL, "Pseudo Node Group", ntree_idname);
@@ -664,7 +664,7 @@ static int node_group_make_test_selected(bNodeTree *ntree, bNode *gnode, const c
                if (node_group_make_use_node(node, gnode)) {
                        if (!node->typeinfo->poll_instance(node, ngroup)) {
                                BKE_reportf(reports, RPT_WARNING, "Can not add node '%s' in a group", node->name);
-                               ok = FALSE;
+                               ok = false;
                                break;
                        }
                }
@@ -676,7 +676,7 @@ static int node_group_make_test_selected(bNodeTree *ntree, bNode *gnode, const c
        ntreeFreeTree(ngroup);
        MEM_freeN(ngroup);
        if (!ok)
-               return FALSE;
+               return false;
        
        /* check if all connections are OK, no unselected node has both
         * inputs and outputs to a selection */
@@ -687,12 +687,14 @@ static int node_group_make_test_selected(bNodeTree *ntree, bNode *gnode, const c
                        link->fromnode->done |= 2;
        }
        for (node = ntree->nodes.first; node; node = node->next) {
-               if (!(node->flag & NODE_SELECT)
-                   && node != gnode
-                   && node->done == 3)
-                       return FALSE;
+               if (!(node->flag & NODE_SELECT) &&
+                   node != gnode &&
+                   node->done == 3)
+               {
+                       return false;
+               }
        }
-       return TRUE;
+       return true;
 }
 
 static int node_get_selected_minmax(bNodeTree *ntree, bNode *gnode, float *min, float *max)
index db664265466dc5e45ee9164d98356b7e461dadef..1e4e02b6ae187e6d031a4808fd848d1b07372d37 100644 (file)
@@ -213,11 +213,11 @@ static void node_group_operators(wmKeyMap *keymap, const char *node_type)
        kmi = WM_keymap_add_item(keymap, "NODE_OT_group_separate", PKEY, KM_PRESS, 0, 0);
        RNA_string_set(kmi->ptr, "node_type", node_type);
        
-       kmi= WM_keymap_add_item(keymap, "NODE_OT_group_edit", TABKEY, KM_PRESS, 0, 0);
+       kmi = WM_keymap_add_item(keymap, "NODE_OT_group_edit", TABKEY, KM_PRESS, 0, 0);
        RNA_string_set(kmi->ptr, "node_type", node_type);
        RNA_boolean_set(kmi->ptr, "exit", FALSE);
        
-       kmi= WM_keymap_add_item(keymap, "NODE_OT_group_edit", TABKEY, KM_PRESS, KM_SHIFT, 0);
+       kmi = WM_keymap_add_item(keymap, "NODE_OT_group_edit", TABKEY, KM_PRESS, KM_SHIFT, 0);
        RNA_string_set(kmi->ptr, "node_type", node_type);
        RNA_boolean_set(kmi->ptr, "exit", TRUE);
 }
@@ -263,7 +263,7 @@ void node_keymap(struct wmKeyConfig *keyconf)
        kmi = WM_keymap_add_item(keymap, "NODE_OT_link", LEFTMOUSE, KM_PRESS, KM_SHIFT, 0);
                RNA_boolean_set(kmi->ptr, "detach", FALSE);
                RNA_boolean_set(kmi->ptr, "expose", TRUE);
-       kmi = WM_keymap_add_item(keymap, "NODE_OT_link", LEFTMOUSE, KM_PRESS, KM_SHIFT|KM_CTRL, 0);
+       kmi = WM_keymap_add_item(keymap, "NODE_OT_link", LEFTMOUSE, KM_PRESS, KM_SHIFT | KM_CTRL, 0);
                RNA_boolean_set(kmi->ptr, "detach", TRUE);
                RNA_boolean_set(kmi->ptr, "expose", TRUE);
        WM_keymap_add_item(keymap, "NODE_OT_resize", LEFTMOUSE, KM_PRESS, 0, 0);
index d95487bb24e3ed2bf1849574540b7b2cfb9ef48b..8ff964aa9327b7cd409b4cd0038cac993cb7392b 100644 (file)
@@ -108,7 +108,7 @@ static bNodeSocket *best_socket_output(bNodeTree *ntree, bNode *node, bNodeSocke
 
                /* check for same types */
                if (sock->type == sock_target->type) {
-                       if (strcmp(sock->name, sock_target->name) == 0)
+                       if (STREQ(sock->name, sock_target->name))
                                return sock;
                }
        }
@@ -547,7 +547,7 @@ static int node_link_modal(bContext *C, wmOperator *op, const wmEvent *event)
                                                        
                                                        {
                                                                /* place the node at the mouse pointer */
-                                                               float sockx = 42.f + 3*HIDDEN_RAD;      /* XXX totally arbitrary initial hidden node size ... */
+                                                               float sockx = 42.0f + 3 * HIDDEN_RAD;  /* XXX totally arbitrary initial hidden node size ... */
                                                                float socky = -HIDDEN_RAD;
                                                                
                                                                ionode->locx = snode->cursor[0] - sockx;
index 291fe86e01661b4f1cd2afcf7512eaeb87a0fe5b..faebeabdbba8b904c1bfe9d259918e8258572ff7 100644 (file)
@@ -359,8 +359,9 @@ static int node_mouse_select(Main *bmain, SpaceNode *snode, ARegion *ar, const i
                node = node_under_mouse_select(snode->edittree, mx, my);
                
                if (node) {
-                       for (tnode = snode->edittree->nodes.first; tnode; tnode = tnode->next)
-                                       nodeSetSelected(tnode, FALSE);
+                       for (tnode = snode->edittree->nodes.first; tnode; tnode = tnode->next) {
+                               nodeSetSelected(tnode, false);
+                       }
                        nodeSetSelected(node, TRUE);
                        ED_node_set_active(bmain, snode->edittree, node);
                        selected = 1;
index e4b0512d992fb75a09538789a46a9750f1a5626f..0bc2fba0d0bacadff4e27f6386893126c2e24652 100644 (file)
@@ -172,7 +172,8 @@ static void node_socket_add_replace(const bContext *C, bNodeTree *ntree, bNode *
 
        /* XXX how can this be done nicely? bNodeTemplate is removed, it doesn't work for generic custom nodes */
        if (node_prev && node_prev->type == type &&
-           (type != NODE_GROUP || node_prev->id == &ngroup->id)) {
+           (type != NODE_GROUP || node_prev->id == &ngroup->id))
+       {
                /* keep the previous node if it's the same type */
                node_from = node_prev;
        }
@@ -182,8 +183,8 @@ static void node_socket_add_replace(const bContext *C, bNodeTree *ntree, bNode *
                node_from->locy = node_to->locy;
                
                /* XXX bad, should be dispatched to generic operator or something ... */
-               if (type==NODE_GROUP) {
-                       node_from->id = (ID*)ngroup;
+               if (type == NODE_GROUP) {
+                       node_from->id = (ID *)ngroup;
                }
                
                if (node_from->id)
@@ -206,7 +207,7 @@ static void node_socket_add_replace(const bContext *C, bNodeTree *ntree, bNode *
                                if (nodeCountSocketLinks(ntree, sock_from) >= sock_from->limit)
                                        continue;
 
-                               if (strcmp(sock_prev->name, sock_from->name) == 0 && sock_prev->type == sock_from->type) {
+                               if (STREQ(sock_prev->name, sock_from->name) && sock_prev->type == sock_from->type) {
                                        bNodeLink *link = sock_prev->link;
 
                                        if (link && link->fromnode) {
@@ -377,8 +378,8 @@ static void ui_node_menu_column(NodeLinkArg *arg, int nclass, const char *cname)
                        else
                                BLI_strncpy(name, IFACE_(ntype->ui_name), UI_MAX_NAME_STR);
                        
-                       but = uiDefBut(block, BUT, 0, name, 0, 0, UI_UNIT_X*4, UI_UNIT_Y,
-                               NULL, 0.0, 0.0, 0.0, 0.0, TIP_("Add node to input"));
+                       but = uiDefBut(block, BUT, 0, name, 0, 0, UI_UNIT_X * 4, UI_UNIT_Y,
+                                      NULL, 0.0, 0.0, 0.0, 0.0, TIP_("Add node to input"));
                        
                        argN = MEM_dupallocN(arg);
                        argN->type = ntype->type;
index 1241227c9d8cdd9d38056b15e6aa7cbdf0959c0f..293913dff11d2d61813de765a55a9a9c00bd93c4 100644 (file)
@@ -371,7 +371,7 @@ int ED_space_node_color_sample(SpaceNode *snode, ARegion *ar, int mval[2], float
        float fx, fy, bufx, bufy;
        int ret = FALSE;
 
-       if (strcmp(snode->tree_idname, ntreeType_Composite->idname)==0 || (snode->flag & SNODE_BACKDRAW) == 0) {
+       if (STREQ(snode->tree_idname, ntreeType_Composite->idname) || (snode->flag & SNODE_BACKDRAW) == 0) {
                /* use viewer image for color sampling only if we're in compositor tree
                 * with backdrop enabled
                 */
index ac2f36ed51dccedb7d439e699ba2b6d76d76080e..2d5207e69dbcdb16b330fb1701dfff6314ca7b8c 100644 (file)
@@ -65,7 +65,7 @@
 void ED_node_tree_start(SpaceNode *snode, bNodeTree *ntree, ID *id, ID *from)
 {
        bNodeTreePath *path, *path_next;
-       for (path=snode->treepath.first; path; path=path_next) {
+       for (path = snode->treepath.first; path; path = path_next) {
                path_next = path->next;
                MEM_freeN(path);
        }
@@ -76,7 +76,7 @@ void ED_node_tree_start(SpaceNode *snode, bNodeTree *ntree, ID *id, ID *from)
                path->nodetree = ntree;
                path->parent_key = NODE_INSTANCE_KEY_BASE;
                if (id)
-                       BLI_strncpy(path->node_name, id->name+2, sizeof(path->node_name));
+                       BLI_strncpy(path->node_name, id->name + 2, sizeof(path->node_name));
                BLI_addtail(&snode->treepath, path);
        }
        
@@ -86,7 +86,7 @@ void ED_node_tree_start(SpaceNode *snode, bNodeTree *ntree, ID *id, ID *from)
        snode->from = from;
        
        /* listener updates the View2D center from edittree */
-       WM_main_add_notifier(NC_SCENE|ND_NODES, NULL);
+       WM_main_add_notifier(NC_SCENE | ND_NODES, NULL);
 }
 
 void ED_node_tree_push(SpaceNode *snode, bNodeTree *ntree, bNode *gnode)
@@ -111,7 +111,7 @@ void ED_node_tree_push(SpaceNode *snode, bNodeTree *ntree, bNode *gnode)
        snode->edittree = ntree;
        
        /* listener updates the View2D center from edittree */
-       WM_main_add_notifier(NC_SCENE|ND_NODES, NULL);
+       WM_main_add_notifier(NC_SCENE | ND_NODES, NULL);
 }
 
 void ED_node_tree_pop(SpaceNode *snode)
@@ -130,7 +130,7 @@ void ED_node_tree_pop(SpaceNode *snode)
        snode->edittree = path->nodetree;
        
        /* listener updates the View2D center from edittree */
-       WM_main_add_notifier(NC_SCENE|ND_NODES, NULL);
+       WM_main_add_notifier(NC_SCENE | ND_NODES, NULL);
 }
 
 int ED_node_tree_depth(SpaceNode *snode)
@@ -142,7 +142,7 @@ bNodeTree *ED_node_tree_get(SpaceNode *snode, int level)
 {
        bNodeTreePath *path;
        int i;
-       for (path = snode->treepath.last, i = 0; path; path=path->prev, ++i) {
+       for (path = snode->treepath.last, i = 0; path; path = path->prev, ++i) {
                if (i == level)
                        return path->nodetree;
        }
@@ -154,7 +154,7 @@ int ED_node_tree_path_length(SpaceNode *snode)
        bNodeTreePath *path;
        int length = 0;
        int i;
-       for (path=snode->treepath.first, i=0; path; path=path->next, ++i) {
+       for (path = snode->treepath.first, i = 0; path; path = path->next, ++i) {
                length += strlen(path->node_name);
                if (i > 0)
                        length += 1;    /* for separator char */
@@ -168,7 +168,7 @@ void ED_node_tree_path_get(SpaceNode *snode, char *value)
        int i;
        
        value[0] = '\0';
-       for (path=snode->treepath.first, i=0; path; path=path->next, ++i) {
+       for (path = snode->treepath.first, i = 0; path; path = path->next, ++i) {
                if (i == 0) {
                        strcpy(value, path->node_name);
                        value += strlen(path->node_name);
@@ -186,7 +186,7 @@ void ED_node_tree_path_get_fixedbuf(SpaceNode *snode, char *value, int max_lengt
        int size, i;
        
        value[0] = '\0';
-       for (path=snode->treepath.first, i=0; path; path=path->next, ++i) {
+       for (path = snode->treepath.first, i = 0; path; path = path->next, ++i) {
                if (i == 0) {
                        BLI_strncpy(value, path->node_name, max_length);
                        size = strlen(path->node_name);
@@ -337,10 +337,10 @@ static SpaceLink *node_new(const bContext *UNUSED(C))
 
 static void node_free(SpaceLink *sl)
 {
-       SpaceNode *snode = (SpaceNode*)sl;
+       SpaceNode *snode = (SpaceNode *)sl;
        bNodeTreePath *path, *path_next;
 
-       for (path=snode->treepath.first; path; path=path_next) {
+       for (path = snode->treepath.first; path; path = path_next) {
                path_next = path->next;
                MEM_freeN(path);
        }
@@ -521,7 +521,7 @@ static void node_area_refresh(const struct bContext *C, ScrArea *sa)
 
 static SpaceLink *node_duplicate(SpaceLink *sl)
 {
-       SpaceNode *snode = (SpaceNode*)sl;
+       SpaceNode *snode = (SpaceNode *)sl;
        SpaceNode *snoden = MEM_dupallocN(snode);
 
        /* clear or remove stuff from old */
index d18ec225c5f4cff5f0521971f98d905e40f7cb3a..e27f00de7489d9e8a652198882522be75b7719f0 100644 (file)
@@ -2041,11 +2041,11 @@ static void draw_dupli_objects_color(Scene *scene, ARegion *ar, View3D *v3d, Bas
                            (dob->type == OB_DUPLIGROUP && dob->animated) ||
                            !(bb_tmp = BKE_object_boundbox_get(dob->ob)))
                        {
-                               // printf("draw_dupli_objects_color: skipping displist for %s\n", dob->ob->id.name+2);
+                               // printf("draw_dupli_objects_color: skipping displist for %s\n", dob->ob->id.name + 2);
                                use_displist = FALSE;
                        }
                        else {
-                               // printf("draw_dupli_objects_color: using displist for %s\n", dob->ob->id.name+2);
+                               // printf("draw_dupli_objects_color: using displist for %s\n", dob->ob->id.name + 2);
                                bb = *bb_tmp; /* must make a copy  */
 
                                /* disable boundbox check for list creation */
index fc3bf75e7840c16f9f241c81966fd50d439ade0b..e153651caca89b23de4c875aecb16985396520b9 100644 (file)
@@ -1264,7 +1264,7 @@ static void gpu_material_to_fixed(GPUMaterialFixed *smat, const Material *bmat,
 static Material *gpu_active_node_material(Material *ma)
 {
        if (ma && ma->use_nodes && ma->nodetree) {
-               bNode *node= nodeGetActiveID(ma->nodetree, ID_MA);
+               bNode *node = nodeGetActiveID(ma->nodetree, ID_MA);
 
                if (node)
                        return (Material *)node->id;
index 2719ae889d42cb844eac438d042e6519ce209cde..b6ae2b87743cefd0ac44a41ce214bee86c55a3dc 100644 (file)
@@ -140,12 +140,12 @@ EnumPropertyItem *rna_node_tree_type_itemf(void *data, int (*poll)(void *data, s
 int rna_node_type_to_enum(struct bNodeType *typeinfo);
 int rna_node_idname_to_enum(const char *idname);
 struct bNodeType *rna_node_type_from_enum(int value);
-EnumPropertyItem *rna_node_type_itemf(void *data, int (*poll)(void *data, struct bNodeType*), int *free);
+EnumPropertyItem *rna_node_type_itemf(void *data, int (*poll)(void *data, struct bNodeType *), int *free);
 
 int rna_node_socket_type_to_enum(struct bNodeSocketType *typeinfo);
 int rna_node_socket_idname_to_enum(const char *idname);
 struct bNodeSocketType *rna_node_socket_type_from_enum(int value);
-EnumPropertyItem *rna_node_socket_type_itemf(void *data, int (*poll)(void *data, struct bNodeSocketType*), int *free);
+EnumPropertyItem *rna_node_socket_type_itemf(void *data, int (*poll)(void *data, struct bNodeSocketType *), int *free);
 
 extern EnumPropertyItem node_socket_in_out_items[];
 extern EnumPropertyItem node_icon_items[];
index 61e67ad329899d184ba4ab987408d4b90f77968e..02cacb00bec29112af16dc9d6696cfce3e0b48a3 100644 (file)
@@ -506,7 +506,7 @@ void RNA_identifier_sanitize(char *identifier, int property)
                        /* this keyword is reserved by python.
                         * just replace the last character by '_' to keep it readable.
                         */
-                       identifier[strlen(identifier)-1] = '_';
+                       identifier[strlen(identifier) - 1] = '_';
                        break;
                }
        }
@@ -523,7 +523,7 @@ void RNA_identifier_sanitize(char *identifier, int property)
                                /* this keyword is reserved by python.
                                * just replace the last character by '_' to keep it readable.
                                */
-                               identifier[strlen(identifier)-1] = '_';
+                               identifier[strlen(identifier) - 1] = '_';
                                break;
                        }
                }
index 57ae217cff69de125dfecf986b30cb1eb188953b..8936609c7db6a35cf05bbd6d93781a5b3bc88685 100644 (file)
@@ -274,7 +274,7 @@ static void rna_Material_use_diffuse_ramp_set(PointerRNA *ptr, int value)
        else ma->mode &= ~MA_RAMP_COL;
 
        if ((ma->mode & MA_RAMP_COL) && ma->ramp_col == NULL)
-               ma->ramp_col = add_colorband(0);
+               ma->ramp_col = add_colorband(false);
 }
 
 static void rna_Material_use_specular_ramp_set(PointerRNA *ptr, int value)
@@ -285,7 +285,7 @@ static void rna_Material_use_specular_ramp_set(PointerRNA *ptr, int value)
        else ma->mode &= ~MA_RAMP_SPEC;
 
        if ((ma->mode & MA_RAMP_SPEC) && ma->ramp_spec == NULL)
-               ma->ramp_spec = add_colorband(0);
+               ma->ramp_spec = add_colorband(false);
 }
 
 static void rna_Material_use_nodes_update(bContext *C, PointerRNA *ptr)
index 99b4f5a794dcf557fa588c9371eb33296602e219..277f3251042bbc54e8dfd072cb0232f314a25193 100644 (file)
@@ -102,7 +102,7 @@ EnumPropertyItem node_chunksize_items[] = {
 #define DEF_VICO(name)
 EnumPropertyItem node_icon_items[] = {
 #include "UI_icons.h"
-               {0, NULL, 0, NULL, NULL}};
+       {0, NULL, 0, NULL, NULL}};
 #undef DEF_ICON_BLANK_SKIP
 #undef DEF_ICON
 #undef DEF_VICO
@@ -208,7 +208,7 @@ EnumPropertyItem prop_wave_items[] = {
 
 int rna_node_tree_type_to_enum(bNodeTreeType *typeinfo)
 {
-       int i=0, result=-1;
+       int i = 0, result = -1;
        NODE_TREE_TYPES_BEGIN(nt)
                if (nt == typeinfo) {
                        result = i;
@@ -221,9 +221,9 @@ int rna_node_tree_type_to_enum(bNodeTreeType *typeinfo)
 
 int rna_node_tree_idname_to_enum(const char *idname)
 {
-       int i=0, result=-1;
+       int i = 0, result = -1;
        NODE_TREE_TYPES_BEGIN(nt)
-               if (strcmp(nt->idname, idname)==0) {
+               if (STREQ(nt->idname, idname)) {
                        result = i;
                        break;
                }
@@ -234,8 +234,8 @@ int rna_node_tree_idname_to_enum(const char *idname)
 
 bNodeTreeType *rna_node_tree_type_from_enum(int value)
 {
-       int i=0;
-       bNodeTreeType *result=NULL;
+       int i = 0;
+       bNodeTreeType *result = NULL;
        NODE_TREE_TYPES_BEGIN(nt)
                if (i == value) {
                        result = nt;
@@ -250,7 +250,7 @@ EnumPropertyItem *rna_node_tree_type_itemf(void *data, int (*poll)(void *data, b
 {
        EnumPropertyItem tmp = {0, "", 0, "", ""};
        EnumPropertyItem *item = NULL;
-       int totitem=0, i=0;
+       int totitem = 0, i = 0;
        
        NODE_TREE_TYPES_BEGIN(nt)
                if (poll && !poll(data, nt)) {
@@ -277,9 +277,9 @@ EnumPropertyItem *rna_node_tree_type_itemf(void *data, int (*poll)(void *data, b
 
 int rna_node_type_to_enum(bNodeType *typeinfo)
 {
-       int i=0, result=-1;
+       int i = 0, result = -1;
        NODE_TYPES_BEGIN(ntype)
-               if (ntype==typeinfo) {
+               if (ntype == typeinfo) {
                        result = i;
                        break;
                }
@@ -290,9 +290,9 @@ int rna_node_type_to_enum(bNodeType *typeinfo)
 
 int rna_node_idname_to_enum(const char *idname)
 {
-       int i=0, result=-1;
+       int i = 0, result = -1;
        NODE_TYPES_BEGIN(ntype)
-               if (strcmp(ntype->idname, idname)==0) {
+               if (STREQ(ntype->idname, idname)) {
                        result = i;
                        break;
                }
@@ -303,10 +303,10 @@ int rna_node_idname_to_enum(const char *idname)
 
 bNodeType *rna_node_type_from_enum(int value)
 {
-       int i=0;
-       bNodeType *result=NULL;
+       int i = 0;
+       bNodeType *result = NULL;
        NODE_TYPES_BEGIN(ntype)
-               if (i==value) {
+               if (i == value) {
                        result = ntype;
                        break;
                }
@@ -319,7 +319,7 @@ EnumPropertyItem *rna_node_type_itemf(void *data, int (*poll)(void *data, bNodeT
 {
        EnumPropertyItem *item = NULL;
        EnumPropertyItem tmp = {0, "", 0, "", ""};
-       int totitem=0, i=0;
+       int totitem = 0, i = 0;
        
        NODE_TYPES_BEGIN(ntype)
                if (poll && !poll(data, ntype)) {
@@ -345,9 +345,9 @@ EnumPropertyItem *rna_node_type_itemf(void *data, int (*poll)(void *data, bNodeT
 
 int rna_node_socket_type_to_enum(bNodeSocketType *typeinfo)
 {
-       int i=0, result=-1;
+       int i = 0, result = -1;
        NODE_SOCKET_TYPES_BEGIN(stype)
-               if (stype==typeinfo) {
+               if (stype == typeinfo) {
                        result = i;
                        break;
                }
@@ -358,9 +358,9 @@ int rna_node_socket_type_to_enum(bNodeSocketType *typeinfo)
 
 int rna_node_socket_idname_to_enum(const char *idname)
 {
-       int i=0, result=-1;
+       int i = 0, result = -1;
        NODE_SOCKET_TYPES_BEGIN(stype)
-               if (strcmp(stype->idname, idname)==0) {
+               if (STREQ(stype->idname, idname)) {
                        result = i;
                        break;
                }
@@ -371,10 +371,10 @@ int rna_node_socket_idname_to_enum(const char *idname)
 
 bNodeSocketType *rna_node_socket_type_from_enum(int value)
 {
-       int i=0;
-       bNodeSocketType *result=NULL;
+       int i = 0;
+       bNodeSocketType *result = NULL;
        NODE_SOCKET_TYPES_BEGIN(stype)
-               if (i==value) {
+               if (i == value) {
                        result = stype;
                        break;
                }
@@ -387,7 +387,7 @@ EnumPropertyItem *rna_node_socket_type_itemf(void *data, int (*poll)(void *data,
 {
        EnumPropertyItem *item = NULL;
        EnumPropertyItem tmp = {0, "", 0, "", ""};
-       int totitem=0, i=0;
+       int totitem = 0, i = 0;
        StructRNA *srna;
        
        NODE_SOCKET_TYPES_BEGIN(stype)
@@ -417,7 +417,7 @@ static EnumPropertyItem *rna_node_static_type_itemf(bContext *UNUSED(C), Pointer
 {
        EnumPropertyItem *item = NULL;
        EnumPropertyItem tmp;
-       int totitem=0;
+       int totitem = 0;
        
        /* hack, don't want to add include path to RNA just for this, since in the future RNA types
         * for nodes should be defined locally at runtime anyway ...
@@ -438,7 +438,7 @@ static EnumPropertyItem *rna_node_static_type_itemf(bContext *UNUSED(C), Pointer
        RNA_enum_item_add(&item, &totitem, &tmp);
        
        #define DefNode(Category, ID, DefFunc, EnumName, StructName, UIName, UIDesc) \
-       if (strcmp(#Category, "Node")==0) { \
+       if (STREQ(#Category, "Node")) { \
                tmp.value = ID; \
                tmp.identifier = EnumName; \
                tmp.name = UIName; \
@@ -451,7 +451,7 @@ static EnumPropertyItem *rna_node_static_type_itemf(bContext *UNUSED(C), Pointer
        
        if (RNA_struct_is_a(ptr->type, &RNA_ShaderNode)) {
                #define DefNode(Category, ID, DefFunc, EnumName, StructName, UIName, UIDesc) \
-               if (strcmp(#Category, "ShaderNode")==0) { \
+               if (STREQ(#Category, "ShaderNode")) { \
                        tmp.value = ID; \
                        tmp.identifier = EnumName; \
                        tmp.name = UIName; \
@@ -465,7 +465,7 @@ static EnumPropertyItem *rna_node_static_type_itemf(bContext *UNUSED(C), Pointer
 
        if (RNA_struct_is_a(ptr->type, &RNA_CompositorNode)) {
                #define DefNode(Category, ID, DefFunc, EnumName, StructName, UIName, UIDesc) \
-               if (strcmp(#Category, "CompositorNode")==0) { \
+               if (STREQ(#Category, "CompositorNode")) { \
                        tmp.value = ID; \
                        tmp.identifier = EnumName; \
                        tmp.name = UIName; \
@@ -479,7 +479,7 @@ static EnumPropertyItem *rna_node_static_type_itemf(bContext *UNUSED(C), Pointer
        
        if (RNA_struct_is_a(ptr->type, &RNA_TextureNode)) {
                #define DefNode(Category, ID, DefFunc, EnumName, StructName, UIName, UIDesc) \
-               if (strcmp(#Category, "TextureNode")==0) { \
+               if (STREQ(#Category, "TextureNode")) { \
                        tmp.value = ID; \
                        tmp.identifier = EnumName; \
                        tmp.name = UIName; \
@@ -501,7 +501,7 @@ static EnumPropertyItem *rna_node_static_type_itemf(bContext *UNUSED(C), Pointer
 
 static StructRNA *rna_NodeTree_refine(struct PointerRNA *ptr)
 {
-       bNodeTree *ntree= (bNodeTree*)ptr->data;
+       bNodeTree *ntree = (bNodeTree *)ptr->data;
        
        if (ntree->typeinfo && ntree->typeinfo->ext.srna)
                return ntree->typeinfo->ext.srna;
@@ -527,7 +527,7 @@ static int rna_NodeTree_poll(const bContext *C, bNodeTreeType *ntreetype)
        ntreetype->ext.call((bContext *)C, &ptr, func, &list);
 
        RNA_parameter_get_lookup(&list, "visible", &ret);
-       visible = *(int*)ret;
+       visible = *(int *)ret;
 
        RNA_parameter_list_free(&list);
 
@@ -585,11 +585,11 @@ static void rna_NodeTree_get_from_context(const bContext *C, bNodeTreeType *ntre
 
 static void rna_NodeTree_unregister(Main *UNUSED(bmain), StructRNA *type)
 {
-       bNodeTreeType *nt= RNA_struct_blender_type_get(type);
+       bNodeTreeType *nt = RNA_struct_blender_type_get(type);
 
-       if(!nt)
+       if (!nt)
                return;
-       
+
        RNA_struct_free_extension(type, &nt->ext);
 
        ntreeTypeFreeLink(nt);
@@ -597,7 +597,7 @@ static void rna_NodeTree_unregister(Main *UNUSED(bmain), StructRNA *type)
        RNA_struct_free(&BLENDER_RNA, type);
 
        /* update while blender is running */
-       WM_main_add_notifier(NC_NODE|NA_EDITED, NULL);
+       WM_main_add_notifier(NC_NODE | NA_EDITED, NULL);
 }
 
 static StructRNA *rna_NodeTree_register(Main *bmain, ReportList *reports, void *data, const char *identifier,
@@ -611,34 +611,34 @@ static StructRNA *rna_NodeTree_register(Main *bmain, ReportList *reports, void *
        /* setup dummy tree & tree type to store static properties in */
        memset(&dummynt, 0, sizeof(bNodeTreeType));
        memset(&dummyntree, 0, sizeof(bNodeTree));
-       dummyntree.typeinfo= &dummynt;
+       dummyntree.typeinfo = &dummynt;
        RNA_pointer_create(NULL, &RNA_NodeTree, &dummyntree, &dummyptr);
 
        /* validate the python class */
-       if(validate(&dummyptr, data, have_function) != 0)
+       if (validate(&dummyptr, data, have_function) != 0)
                return NULL;
-       
-       if(strlen(identifier) >= sizeof(dummynt.idname)) {
+
+       if (strlen(identifier) >= sizeof(dummynt.idname)) {
                BKE_reportf(reports, RPT_ERROR, "registering node tree class: '%s' is too long, maximum length is %d",
                            identifier, (int)sizeof(dummynt.idname));
                return NULL;
        }
 
        /* check if we have registered this tree type before, and remove it */
-       nt= ntreeTypeFind(dummynt.idname);
-       if(nt)
+       nt = ntreeTypeFind(dummynt.idname);
+       if (nt)
                rna_NodeTree_unregister(bmain, nt->ext.srna);
        
        /* create a new node tree type */
-       nt= MEM_callocN(sizeof(bNodeTreeType), "node tree type");
+       nt = MEM_callocN(sizeof(bNodeTreeType), "node tree type");
        memcpy(nt, &dummynt, sizeof(dummynt));
 
        nt->type = NTREE_CUSTOM;
 
-       nt->ext.srna= RNA_def_struct_ptr(&BLENDER_RNA, nt->idname, &RNA_NodeTree); 
-       nt->ext.data= data;
-       nt->ext.call= call;
-       nt->ext.free= free;
+       nt->ext.srna = RNA_def_struct_ptr(&BLENDER_RNA, nt->idname, &RNA_NodeTree); 
+       nt->ext.data = data;
+       nt->ext.call = call;
+       nt->ext.free = free;
        RNA_struct_blender_type_set(nt->ext.srna, nt);
 
        RNA_def_struct_ui_text(nt->ext.srna, nt->ui_name, nt->ui_description);
@@ -651,7 +651,7 @@ static StructRNA *rna_NodeTree_register(Main *bmain, ReportList *reports, void *
        ntreeTypeAdd(nt);
 
        /* update while blender is running */
-       WM_main_add_notifier(NC_NODE|NA_EDITED, NULL);
+       WM_main_add_notifier(NC_NODE | NA_EDITED, NULL);
        
        return nt->ext.srna;
 }
@@ -696,7 +696,7 @@ static bNode *rna_NodeTree_node_new(bNodeTree *ntree, bContext *C, ReportList *r
        bNode *node;
        
        if (!ntreeIsValid(ntree)) {
-               BKE_reportf(reports, RPT_ERROR, "Node tree %s invalid", ntree->id.name+2);
+               BKE_reportf(reports, RPT_ERROR, "Node tree %s invalid", ntree->id.name + 2);
                return NULL;
        }
        
@@ -707,7 +707,7 @@ static bNode *rna_NodeTree_node_new(bNodeTree *ntree, bContext *C, ReportList *r
        }
        
        if (ntype->poll && !ntype->poll(ntype, ntree)) {
-               BKE_reportf(reports, RPT_ERROR, "Cannot add node of type %s to node tree '%s'", type, ntree->id.name+2);
+               BKE_reportf(reports, RPT_ERROR, "Cannot add node of type %s to node tree '%s'", type, ntree->id.name + 2);
                return NULL;
        }
        
@@ -715,22 +715,22 @@ static bNode *rna_NodeTree_node_new(bNodeTree *ntree, bContext *C, ReportList *r
        BLI_assert(node && node->typeinfo);
        
        /* XXX ugly stuff, should be done with specialized operators (after actual node creation)! */
-       if (ntree->type==NTREE_COMPOSIT) {
-               if(ELEM4(node->type, CMP_NODE_COMPOSITE, CMP_NODE_DEFOCUS, CMP_NODE_OUTPUT_FILE, CMP_NODE_R_LAYERS)) {
+       if (ntree->type == NTREE_COMPOSIT) {
+               if (ELEM4(node->type, CMP_NODE_COMPOSITE, CMP_NODE_DEFOCUS, CMP_NODE_OUTPUT_FILE, CMP_NODE_R_LAYERS)) {
                        /* annoying, find the node tree we are in, scene can be NULL */
                        Scene *scene;
-                       for(scene= CTX_data_main(C)->scene.first; scene; scene= scene->id.next) {
-                               if(scene->nodetree == ntree) {
+                       for (scene = CTX_data_main(C)->scene.first; scene; scene = scene->id.next) {
+                               if (scene->nodetree == ntree) {
                                        break;
                                }
                        }
-                       node->id= (ID *)scene;
+                       node->id = (ID *)scene;
                        id_us_plus(node->id);
                }
                
                ntreeCompositForceHidden(ntree, CTX_data_scene(C));
        }
-       else if (ntree->type==NTREE_TEXTURE) {
+       else if (ntree->type == NTREE_TEXTURE) {
                ntreeTexCheckCyclics(ntree);
        }
        
@@ -746,7 +746,7 @@ static void rna_NodeTree_node_remove(bNodeTree *ntree, ReportList *reports, Poin
        bNode *node = node_ptr->data;
        
        if (!ntreeIsValid(ntree)) {
-               BKE_reportf(reports, RPT_ERROR, "Node tree %s invalid", ntree->id.name+2);
+               BKE_reportf(reports, RPT_ERROR, "Node tree %s invalid", ntree->id.name + 2);
                return;
        }
        
@@ -768,7 +768,7 @@ static void rna_NodeTree_node_clear(bNodeTree *ntree, ReportList *reports)
        bNode *node = ntree->nodes.first;
 
        if (!ntreeIsValid(ntree)) {
-               BKE_reportf(reports, RPT_ERROR, "Node tree %s invalid", ntree->id.name+2);
+               BKE_reportf(reports, RPT_ERROR, "Node tree %s invalid", ntree->id.name + 2);
                return;
        }
 
@@ -818,7 +818,7 @@ static bNodeLink *rna_NodeTree_link_new(bNodeTree *ntree, ReportList *reports,
        bNode *fromnode = NULL, *tonode = NULL;
 
        if (!ntreeIsValid(ntree)) {
-               BKE_reportf(reports, RPT_ERROR, "Node tree %s invalid", ntree->id.name+2);
+               BKE_reportf(reports, RPT_ERROR, "Node tree %s invalid", ntree->id.name + 2);
                return NULL;
        }
 
@@ -856,7 +856,7 @@ static void rna_NodeTree_link_remove(bNodeTree *ntree, ReportList *reports, Poin
        bNodeLink *link = link_ptr->data;
 
        if (!ntreeIsValid(ntree)) {
-               BKE_reportf(reports, RPT_ERROR, "Node tree %s invalid", ntree->id.name+2);
+               BKE_reportf(reports, RPT_ERROR, "Node tree %s invalid", ntree->id.name + 2);
                return;
        }
 
@@ -877,7 +877,7 @@ static void rna_NodeTree_link_clear(bNodeTree *ntree, ReportList *reports)
        bNodeLink *link = ntree->links.first;
 
        if (!ntreeIsValid(ntree)) {
-               BKE_reportf(reports, RPT_ERROR, "Node tree %s invalid", ntree->id.name+2);
+               BKE_reportf(reports, RPT_ERROR, "Node tree %s invalid", ntree->id.name + 2);
                return;
        }
 
@@ -895,7 +895,7 @@ static void rna_NodeTree_link_clear(bNodeTree *ntree, ReportList *reports)
 
 static int rna_NodeTree_active_input_get(PointerRNA *ptr)
 {
-       bNodeTree *ntree = (bNodeTree*)ptr->data;
+       bNodeTree *ntree = (bNodeTree *)ptr->data;
        bNodeSocket *gsock;
        int index;
 
@@ -907,7 +907,7 @@ static int rna_NodeTree_active_input_get(PointerRNA *ptr)
 
 static void rna_NodeTree_active_input_set(PointerRNA *ptr, int value)
 {
-       bNodeTree *ntree = (bNodeTree*)ptr->data;
+       bNodeTree *ntree = (bNodeTree *)ptr->data;
        bNodeSocket *gsock;
        int index;
        
@@ -924,7 +924,7 @@ static void rna_NodeTree_active_input_set(PointerRNA *ptr, int value)
 
 static int rna_NodeTree_active_output_get(PointerRNA *ptr)
 {
-       bNodeTree *ntree = (bNodeTree*)ptr->data;
+       bNodeTree *ntree = (bNodeTree *)ptr->data;
        bNodeSocket *gsock;
        int index;
 
@@ -936,7 +936,7 @@ static int rna_NodeTree_active_output_get(PointerRNA *ptr)
 
 static void rna_NodeTree_active_output_set(PointerRNA *ptr, int value)
 {
-       bNodeTree *ntree = (bNodeTree*)ptr->data;
+       bNodeTree *ntree = (bNodeTree *)ptr->data;
        bNodeSocket *gsock;
        int index;
        
@@ -972,14 +972,14 @@ static bNodeSocket *rna_NodeTree_inputs_new(bNodeTree *ntree, ReportList *report
        bNodeSocket *sock;
        
        if (!ntreeIsValid(ntree)) {
-               BKE_reportf(reports, RPT_ERROR, "Node tree %s invalid", ntree->id.name+2);
+               BKE_reportf(reports, RPT_ERROR, "Node tree %s invalid", ntree->id.name + 2);
                return NULL;
        }
        
        sock = ntreeAddSocketInterface(ntree, SOCK_IN, type, name);
        
        ntreeUpdateTree(ntree);
-       WM_main_add_notifier(NC_NODE|NA_EDITED, ntree);
+       WM_main_add_notifier(NC_NODE | NA_EDITED, ntree);
        
        return sock;
 }
@@ -989,14 +989,14 @@ static bNodeSocket *rna_NodeTree_outputs_new(bNodeTree *ntree, ReportList *repor
        bNodeSocket *sock;
        
        if (!ntreeIsValid(ntree)) {
-               BKE_reportf(reports, RPT_ERROR, "Node tree %s invalid", ntree->id.name+2);
+               BKE_reportf(reports, RPT_ERROR, "Node tree %s invalid", ntree->id.name + 2);
                return NULL;
        }
        
        sock = ntreeAddSocketInterface(ntree, SOCK_OUT, type, name);
        
        ntreeUpdateTree(ntree);
-       WM_main_add_notifier(NC_NODE|NA_EDITED, ntree);
+       WM_main_add_notifier(NC_NODE | NA_EDITED, ntree);
        
        return sock;
 }
@@ -1004,7 +1004,7 @@ static bNodeSocket *rna_NodeTree_outputs_new(bNodeTree *ntree, ReportList *repor
 static void rna_NodeTree_socket_remove(bNodeTree *ntree, ReportList *reports, bNodeSocket *sock)
 {
        if (!ntreeIsValid(ntree)) {
-               BKE_reportf(reports, RPT_ERROR, "Node tree %s invalid", ntree->id.name+2);
+               BKE_reportf(reports, RPT_ERROR, "Node tree %s invalid", ntree->id.name + 2);
                return;
        }
        
@@ -1015,7 +1015,7 @@ static void rna_NodeTree_socket_remove(bNodeTree *ntree, ReportList *reports, bN
                ntreeRemoveSocketInterface(ntree, sock);
                
                ntreeUpdateTree(ntree);
-               WM_main_add_notifier(NC_NODE|NA_EDITED, ntree);
+               WM_main_add_notifier(NC_NODE | NA_EDITED, ntree);
        }
 }
 
@@ -1024,7 +1024,7 @@ static void rna_NodeTree_inputs_clear(bNodeTree *ntree, ReportList *reports)
        bNodeSocket *sock, *nextsock;
        
        if (!ntreeIsValid(ntree)) {
-               BKE_reportf(reports, RPT_ERROR, "Node tree %s invalid", ntree->id.name+2);
+               BKE_reportf(reports, RPT_ERROR, "Node tree %s invalid", ntree->id.name + 2);
                return;
        }
        
@@ -1034,7 +1034,7 @@ static void rna_NodeTree_inputs_clear(bNodeTree *ntree, ReportList *reports)
        }
 
        ntreeUpdateTree(ntree);
-       WM_main_add_notifier(NC_NODE|NA_EDITED, ntree);
+       WM_main_add_notifier(NC_NODE | NA_EDITED, ntree);
 }
 
 static void rna_NodeTree_outputs_clear(bNodeTree *ntree, ReportList *reports)
@@ -1042,7 +1042,7 @@ static void rna_NodeTree_outputs_clear(bNodeTree *ntree, ReportList *reports)
        bNodeSocket *sock, *nextsock;
        
        if (!ntreeIsValid(ntree)) {
-               BKE_reportf(reports, RPT_ERROR, "Node tree %s invalid", ntree->id.name+2);
+               BKE_reportf(reports, RPT_ERROR, "Node tree %s invalid", ntree->id.name + 2);
                return;
        }
        
@@ -1052,7 +1052,7 @@ static void rna_NodeTree_outputs_clear(bNodeTree *ntree, ReportList *reports)
        }
 
        ntreeUpdateTree(ntree);
-       WM_main_add_notifier(NC_NODE|NA_EDITED, ntree);
+       WM_main_add_notifier(NC_NODE | NA_EDITED, ntree);
 }
 
 static void rna_NodeTree_interface_update(bNodeTree *ntree, bContext *C)
@@ -1150,7 +1150,7 @@ static StructRNA *rna_Node_refine(struct PointerRNA *ptr)
 
 static char *rna_Node_path(PointerRNA *ptr)
 {
-       bNode *node = (bNode*)ptr->data;
+       bNode *node = (bNode *)ptr->data;
 
        return BLI_sprintfN("nodes[\"%s\"]", node->name);
 }
@@ -1173,7 +1173,7 @@ static int rna_Node_poll(bNodeType *ntype, bNodeTree *ntree)
        ntype->ext.call(NULL, &ptr, func, &list);
 
        RNA_parameter_get_lookup(&list, "visible", &ret);
-       visible = *(int*)ret;
+       visible = *(int *)ret;
 
        RNA_parameter_list_free(&list);
 
@@ -1201,7 +1201,7 @@ static int rna_Node_poll_instance(bNode *node, bNodeTree *ntree)
        node->typeinfo->ext.call(NULL, &ptr, func, &list);
 
        RNA_parameter_get_lookup(&list, "visible", &ret);
-       visible = *(int*)ret;
+       visible = *(int *)ret;
 
        RNA_parameter_list_free(&list);
 
@@ -1350,11 +1350,11 @@ static void rna_Node_is_registered_node_type_runtime(bContext *UNUSED(C), Report
 
 static void rna_Node_unregister(Main *UNUSED(bmain), StructRNA *type)
 {
-       bNodeType *nt= RNA_struct_blender_type_get(type);
+       bNodeType *nt = RNA_struct_blender_type_get(type);
 
-       if(!nt)
+       if (!nt)
                return;
-       
+
        RNA_struct_free_extension(type, &nt->ext);
 
        /* this also frees the allocated nt pointer, no MEM_free call needed! */
@@ -1363,7 +1363,7 @@ static void rna_Node_unregister(Main *UNUSED(bmain), StructRNA *type)
        RNA_struct_free(&BLENDER_RNA, type);
 
        /* update while blender is running */
-       WM_main_add_notifier(NC_NODE|NA_EDITED, NULL);
+       WM_main_add_notifier(NC_NODE | NA_EDITED, NULL);
 }
 
 /* Generic internal registration function.
@@ -1386,34 +1386,34 @@ static bNodeType *rna_Node_register_base(Main *bmain, ReportList *reports, Struc
        node_type_base_custom(&dummynt, identifier, "", 0, 0);
 
        memset(&dummynode, 0, sizeof(bNode));
-       dummynode.typeinfo= &dummynt;
+       dummynode.typeinfo = &dummynt;
        RNA_pointer_create(NULL, basetype, &dummynode, &dummyptr);
 
        /* validate the python class */
-       if(validate(&dummyptr, data, have_function) != 0)
+       if (validate(&dummyptr, data, have_function) != 0)
                return NULL;
-       
-       if(strlen(identifier) >= sizeof(dummynt.idname)) {
+
+       if (strlen(identifier) >= sizeof(dummynt.idname)) {
                BKE_reportf(reports, RPT_ERROR, "registering node class: '%s' is too long, maximum length is %d",
                            identifier, (int)sizeof(dummynt.idname));
                return NULL;
        }
 
        /* check if we have registered this node type before, and remove it */
-       nt= nodeTypeFind(dummynt.idname);
-       if(nt)
+       nt = nodeTypeFind(dummynt.idname);
+       if (nt)
                rna_Node_unregister(bmain, nt->ext.srna);
        
        /* create a new node type */
-       nt= MEM_callocN(sizeof(bNodeType), "node type");
+       nt = MEM_callocN(sizeof(bNodeType), "node type");
        memcpy(nt, &dummynt, sizeof(dummynt));
        /* make sure the node type struct is freed on unregister */
        nt->needs_free = 1;
 
-       nt->ext.srna= RNA_def_struct_ptr(&BLENDER_RNA, nt->idname, basetype);
-       nt->ext.data= data;
-       nt->ext.call= call;
-       nt->ext.free= free;
+       nt->ext.srna = RNA_def_struct_ptr(&BLENDER_RNA, nt->idname, basetype);
+       nt->ext.data = data;
+       nt->ext.call = call;
+       nt->ext.free = free;
        RNA_struct_blender_type_set(nt->ext.srna, nt);
 
        RNA_def_struct_ui_text(nt->ext.srna, nt->ui_name, nt->ui_description);
@@ -1454,7 +1454,7 @@ static StructRNA *rna_Node_register(Main *bmain, ReportList *reports,
        nodeRegisterType(nt);
        
        /* update while blender is running */
-       WM_main_add_notifier(NC_NODE|NA_EDITED, NULL);
+       WM_main_add_notifier(NC_NODE | NA_EDITED, NULL);
        
        return nt->ext.srna;
 }
@@ -1470,7 +1470,7 @@ static StructRNA *rna_NodeGroup_register(Main *bmain, ReportList *reports,
        nodeRegisterType(nt);
        
        /* update while blender is running */
-       WM_main_add_notifier(NC_NODE|NA_EDITED, NULL);
+       WM_main_add_notifier(NC_NODE | NA_EDITED, NULL);
        
        return nt->ext.srna;
 }
@@ -1486,7 +1486,7 @@ static StructRNA *rna_ShaderNode_register(Main *bmain, ReportList *reports,
        nodeRegisterType(nt);
        
        /* update while blender is running */
-       WM_main_add_notifier(NC_NODE|NA_EDITED, NULL);
+       WM_main_add_notifier(NC_NODE | NA_EDITED, NULL);
        
        return nt->ext.srna;
 }
@@ -1502,7 +1502,7 @@ static StructRNA *rna_CompositorNode_register(Main *bmain, ReportList *reports,
        nodeRegisterType(nt);
        
        /* update while blender is running */
-       WM_main_add_notifier(NC_NODE|NA_EDITED, NULL);
+       WM_main_add_notifier(NC_NODE | NA_EDITED, NULL);
        
        return nt->ext.srna;
 }
@@ -1518,7 +1518,7 @@ static StructRNA *rna_TextureNode_register(Main *bmain, ReportList *reports,
        nodeRegisterType(nt);
        
        /* update while blender is running */
-       WM_main_add_notifier(NC_NODE|NA_EDITED, NULL);
+       WM_main_add_notifier(NC_NODE | NA_EDITED, NULL);
        
        return nt->ext.srna;
 }
@@ -1578,7 +1578,7 @@ static int rna_Node_parent_poll(PointerRNA *ptr, PointerRNA value)
 
 static void rna_Node_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr)
 {
-       bNodeTree *ntree = (bNodeTree*)ptr->id.data;
+       bNodeTree *ntree = (bNodeTree *)ptr->id.data;
        ED_node_tag_update_nodetree(bmain, ntree);
 }
 
@@ -1589,14 +1589,14 @@ static void rna_Node_socket_value_update(ID *id, bNode *UNUSED(node), bContext *
 
 static void rna_Node_select_set(PointerRNA *ptr, int value)
 {
-       bNode *node= (bNode*)ptr->data;
+       bNode *node = (bNode *)ptr->data;
        nodeSetSelected(node, value);
 }
 
 static void rna_Node_name_set(PointerRNA *ptr, const char *value)
 {
-       bNodeTree *ntree = (bNodeTree*)ptr->id.data;
-       bNode *node = (bNode*)ptr->data;
+       bNodeTree *ntree = (bNodeTree *)ptr->id.data;
+       bNode *node = (bNode *)ptr->data;
        char oldname[sizeof(node->name)];
        
        /* make a copy of the old name first */
@@ -1643,7 +1643,7 @@ static bNodeSocket *rna_Node_inputs_new(ID *id, bNode *node, ReportList *reports
        }
        else {
                ntreeUpdateTree(ntree);
-               WM_main_add_notifier(NC_NODE|NA_EDITED, ntree);
+               WM_main_add_notifier(NC_NODE | NA_EDITED, ntree);
        }
        
        return sock;
@@ -1666,7 +1666,7 @@ static bNodeSocket *rna_Node_outputs_new(ID *id, bNode *node, ReportList *report
        }
        else {
                ntreeUpdateTree(ntree);
-               WM_main_add_notifier(NC_NODE|NA_EDITED, ntree);
+               WM_main_add_notifier(NC_NODE | NA_EDITED, ntree);
        }
        
        return sock;
@@ -1688,7 +1688,7 @@ static void rna_Node_socket_remove(ID *id, bNode *node, ReportList *reports, bNo
                nodeRemoveSocket(ntree, node, sock);
                
                ntreeUpdateTree(ntree);
-               WM_main_add_notifier(NC_NODE|NA_EDITED, ntree);
+               WM_main_add_notifier(NC_NODE | NA_EDITED, ntree);
        }
 }
 
@@ -1708,7 +1708,7 @@ static void rna_Node_inputs_clear(ID *id, bNode *node, ReportList *reports)
        }
 
        ntreeUpdateTree(ntree);
-       WM_main_add_notifier(NC_NODE|NA_EDITED, ntree);
+       WM_main_add_notifier(NC_NODE | NA_EDITED, ntree);
 }
 
 static void rna_Node_outputs_clear(ID *id, bNode *node, ReportList *reports)
@@ -1727,7 +1727,7 @@ static void rna_Node_outputs_clear(ID *id, bNode *node, ReportList *reports)
        }
 
        ntreeUpdateTree(ntree);
-       WM_main_add_notifier(NC_NODE|NA_EDITED, ntree);
+       WM_main_add_notifier(NC_NODE | NA_EDITED, ntree);
 }
 
 static void rna_Node_width_range(PointerRNA *ptr, float *min, float *max, float *softmin, float *softmax)
@@ -1758,7 +1758,7 @@ static void rna_Node_height_range(PointerRNA *ptr, float *min, float *max, float
 
 static void rna_Node_bl_idname_get(PointerRNA *ptr, char *value)
 {
-       bNode *node= ptr->data;
+       bNode *node = ptr->data;
        if (node->typeinfo)
                strcpy(value, node->typeinfo->idname);
        else
@@ -1775,7 +1775,7 @@ static int rna_Node_bl_idname_length(PointerRNA *ptr)
 
 static void rna_Node_bl_label_get(PointerRNA *ptr, char *value)
 {
-       bNode *node= ptr->data;
+       bNode *node = ptr->data;
        if (node->typeinfo)
                strcpy(value, node->typeinfo->ui_name);
        else
@@ -1792,7 +1792,7 @@ static int rna_Node_bl_label_length(PointerRNA *ptr)
 
 static void rna_Node_bl_description_get(PointerRNA *ptr, char *value)
 {
-       bNode *node= ptr->data;
+       bNode *node = ptr->data;
        if (node->typeinfo)
                strcpy(value, node->typeinfo->ui_description);
        else
@@ -1877,8 +1877,8 @@ static void rna_NodeSocket_draw_color(bContext *C, PointerRNA *ptr, PointerRNA *
 
 static void rna_NodeSocket_unregister(Main *UNUSED(bmain), StructRNA *type)
 {
-       bNodeSocketType *st= RNA_struct_blender_type_get(type);
-       if(!st)
+       bNodeSocketType *st = RNA_struct_blender_type_get(type);
+       if (!st)
                return;
        
        RNA_struct_free_extension(type, &st->ext_socket);
@@ -1888,7 +1888,7 @@ static void rna_NodeSocket_unregister(Main *UNUSED(bmain), StructRNA *type)
        RNA_struct_free(&BLENDER_RNA, type);
 
        /* update while blender is running */
-       WM_main_add_notifier(NC_NODE|NA_EDITED, NULL);
+       WM_main_add_notifier(NC_NODE | NA_EDITED, NULL);
 }
 
 static StructRNA *rna_NodeSocket_register(Main *bmain, ReportList *reports, void *data, const char *identifier,
@@ -1903,24 +1903,24 @@ static StructRNA *rna_NodeSocket_register(Main *bmain, ReportList *reports, void
        memset(&dummyst, 0, sizeof(bNodeSocketType));
        
        memset(&dummysock, 0, sizeof(bNodeSocket));
-       dummysock.typeinfo= &dummyst;
+       dummysock.typeinfo = &dummyst;
        RNA_pointer_create(NULL, &RNA_NodeSocket, &dummysock, &dummyptr);
 
        /* validate the python class */
-       if(validate(&dummyptr, data, have_function) != 0)
+       if (validate(&dummyptr, data, have_function) != 0)
                return NULL;
        
-       if(strlen(identifier) >= sizeof(dummyst.idname)) {
+       if (strlen(identifier) >= sizeof(dummyst.idname)) {
                BKE_reportf(reports, RPT_ERROR, "registering node socket class: '%s' is too long, maximum length is %d",
                            identifier, (int)sizeof(dummyst.idname));
                return NULL;
        }
 
        /* check if we have registered this socket type before */
-       st= nodeSocketTypeFind(dummyst.idname);
+       st = nodeSocketTypeFind(dummyst.idname);
        if (!st) {
                /* create a new node socket type */
-               st= MEM_callocN(sizeof(bNodeSocketType), "node socket type");
+               st = MEM_callocN(sizeof(bNodeSocketType), "node socket type");
                memcpy(st, &dummyst, sizeof(dummyst));
                
                nodeRegisterSocketType(st);
@@ -1932,10 +1932,10 @@ static StructRNA *rna_NodeSocket_register(Main *bmain, ReportList *reports, void
                RNA_struct_free_extension(srna, &st->ext_socket);
                RNA_struct_free(&BLENDER_RNA, srna);
        }
-       st->ext_socket.srna= RNA_def_struct_ptr(&BLENDER_RNA, st->idname, &RNA_NodeSocket); 
-       st->ext_socket.data= data;
-       st->ext_socket.call= call;
-       st->ext_socket.free= free;
+       st->ext_socket.srna = RNA_def_struct_ptr(&BLENDER_RNA, st->idname, &RNA_NodeSocket); 
+       st->ext_socket.data = data;
+       st->ext_socket.call = call;
+       st->ext_socket.free = free;
        RNA_struct_blender_type_set(st->ext_socket.srna, st);
        
        /* XXX bad level call! needed to initialize the basic draw functions ... */
@@ -1945,7 +1945,7 @@ static StructRNA *rna_NodeSocket_register(Main *bmain, ReportList *reports, void
        st->draw_color = (have_function[1]) ? rna_NodeSocket_draw_color : NULL;
 
        /* update while blender is running */
-       WM_main_add_notifier(NC_NODE|NA_EDITED, NULL);
+       WM_main_add_notifier(NC_NODE | NA_EDITED, NULL);
        
        return st->ext_socket.srna;
 }
@@ -2009,7 +2009,7 @@ static int rna_NodeSocket_bl_idname_length(PointerRNA *ptr)
 
 static PointerRNA rna_NodeSocket_node_get(PointerRNA *ptr)
 {
-       bNodeTree *ntree = (bNodeTree*)ptr->id.data;
+       bNodeTree *ntree = (bNodeTree *)ptr->id.data;
        bNodeSocket *sock = (bNodeSocket *)ptr->data;
        bNode *node;
        PointerRNA r_ptr;
@@ -2022,7 +2022,7 @@ static PointerRNA rna_NodeSocket_node_get(PointerRNA *ptr)
 
 static void rna_NodeSocket_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr)
 {
-       bNodeTree *ntree = (bNodeTree*)ptr->id.data;
+       bNodeTree *ntree = (bNodeTree *)ptr->id.data;
        ED_node_tag_update_nodetree(bmain, ntree);
 }
 
@@ -2158,8 +2158,8 @@ static void rna_NodeSocketInterface_from_socket(bNodeTree *ntree, bNodeSocket *s
 
 static void rna_NodeSocketInterface_unregister(Main *UNUSED(bmain), StructRNA *type)
 {
-       bNodeSocketType *st= RNA_struct_blender_type_get(type);
-       if(!st)
+       bNodeSocketType *st = RNA_struct_blender_type_get(type);
+       if (!st)
                return;
        
        RNA_struct_free_extension(type, &st->ext_interface);
@@ -2167,7 +2167,7 @@ static void rna_NodeSocketInterface_unregister(Main *UNUSED(bmain), StructRNA *t
        RNA_struct_free(&BLENDER_RNA, type);
        
        /* update while blender is running */
-       WM_main_add_notifier(NC_NODE|NA_EDITED, NULL);
+       WM_main_add_notifier(NC_NODE | NA_EDITED, NULL);
 }
 
 static StructRNA *rna_NodeSocketInterface_register(Main *bmain, ReportList *reports, void *data, const char *identifier,
@@ -2182,7 +2182,7 @@ static StructRNA *rna_NodeSocketInterface_register(Main *bmain, ReportList *repo
        memset(&dummyst, 0, sizeof(bNodeSocketType));
        
        memset(&dummysock, 0, sizeof(bNodeSocket));
-       dummysock.typeinfo= &dummyst;
+       dummysock.typeinfo = &dummyst;
        RNA_pointer_create(NULL, &RNA_NodeSocketInterface, &dummysock, &dummyptr);
 
        /* validate the python class */
@@ -2190,13 +2190,13 @@ static StructRNA *rna_NodeSocketInterface_register(Main *bmain, ReportList *repo
                return NULL;
 
        /* check if we have registered this socket type before */
-       st= nodeSocketTypeFind(dummyst.idname);
+       st = nodeSocketTypeFind(dummyst.idname);
        if (st) {
                /* basic socket type registered by a socket class before. */
        }
        else {
                /* create a new node socket type */
-               st= MEM_callocN(sizeof(bNodeSocketType), "node socket type");
+               st = MEM_callocN(sizeof(bNodeSocketType), "node socket type");
                memcpy(st, &dummyst, sizeof(dummyst));
                
                nodeRegisterSocketType(st);
@@ -2208,10 +2208,10 @@ static StructRNA *rna_NodeSocketInterface_register(Main *bmain, ReportList *repo
                RNA_struct_free_extension(srna, &st->ext_interface);
                RNA_struct_free(&BLENDER_RNA, srna);
        }
-       st->ext_interface.srna= RNA_def_struct_ptr(&BLENDER_RNA, identifier, &RNA_NodeSocketInterface); 
-       st->ext_interface.data= data;
-       st->ext_interface.call= call;
-       st->ext_interface.free= free;
+       st->ext_interface.srna = RNA_def_struct_ptr(&BLENDER_RNA, identifier, &RNA_NodeSocketInterface); 
+       st->ext_interface.data = data;
+       st->ext_interface.call = call;
+       st->ext_interface.free = free;
        RNA_struct_blender_type_set(st->ext_interface.srna, st);
        
        st->interface_draw = (have_function[0]) ? rna_NodeSocketInterface_draw : NULL;
@@ -2221,7 +2221,7 @@ static StructRNA *rna_NodeSocketInterface_register(Main *bmain, ReportList *repo
        st->interface_from_socket = (have_function[4]) ? rna_NodeSocketInterface_from_socket : NULL;
        
        /* update while blender is running */
-       WM_main_add_notifier(NC_NODE|NA_EDITED, NULL);
+       WM_main_add_notifier(NC_NODE | NA_EDITED, NULL);
        
        return st->ext_interface.srna;
 }
@@ -2555,35 +2555,35 @@ static EnumPropertyItem *rna_Node_channel_itemf(bContext *UNUSED(C), PointerRNA
        
        switch (node->custom1) {
                case CMP_NODE_CHANNEL_MATTE_CS_RGB:
-                       tmp.identifier = "R"; tmp.name= "R"; tmp.value= 1;
+                       tmp.identifier = "R"; tmp.name = "R"; tmp.value = 1;
                        RNA_enum_item_add(&item, &totitem, &tmp);
-                       tmp.identifier = "G"; tmp.name= "G"; tmp.value= 2;
+                       tmp.identifier = "G"; tmp.name = "G"; tmp.value = 2;
                        RNA_enum_item_add(&item, &totitem, &tmp);
-                       tmp.identifier = "B"; tmp.name= "B"; tmp.value= 3;
+                       tmp.identifier = "B"; tmp.name = "B"; tmp.value = 3;
                        RNA_enum_item_add(&item, &totitem, &tmp);
                        break;
                case CMP_NODE_CHANNEL_MATTE_CS_HSV:
-                       tmp.identifier = "H"; tmp.name= "H"; tmp.value= 1;
+                       tmp.identifier = "H"; tmp.name = "H"; tmp.value = 1;
                        RNA_enum_item_add(&item, &totitem, &tmp);
-                       tmp.identifier = "S"; tmp.name= "S"; tmp.value= 2;
+                       tmp.identifier = "S"; tmp.name = "S"; tmp.value = 2;
                        RNA_enum_item_add(&item, &totitem, &tmp);
-                       tmp.identifier = "V"; tmp.name= "V"; tmp.value= 3;
+                       tmp.identifier = "V"; tmp.name = "V"; tmp.value = 3;
                        RNA_enum_item_add(&item, &totitem, &tmp);
                        break;
                case CMP_NODE_CHANNEL_MATTE_CS_YUV:
-                       tmp.identifier = "Y"; tmp.name= "Y"; tmp.value= 1;
+                       tmp.identifier = "Y"; tmp.name = "Y"; tmp.value = 1;
                        RNA_enum_item_add(&item, &totitem, &tmp);
-                       tmp.identifier = "G"; tmp.name= "U"; tmp.value= 2;
+                       tmp.identifier = "G"; tmp.name = "U"; tmp.value = 2;
                        RNA_enum_item_add(&item, &totitem, &tmp);
-                       tmp.identifier = "V"; tmp.name= "V"; tmp.value= 3;
+                       tmp.identifier = "V"; tmp.name = "V"; tmp.value = 3;
                        RNA_enum_item_add(&item, &totitem, &tmp);
                        break;
                case CMP_NODE_CHANNEL_MATTE_CS_YCC:
-                       tmp.identifier = "Y"; tmp.name= "Y"; tmp.value= 1;
+                       tmp.identifier = "Y"; tmp.name = "Y"; tmp.value = 1;
                        RNA_enum_item_add(&item, &totitem, &tmp);
-                       tmp.identifier = "CB"; tmp.name= "Cr"; tmp.value= 2;
+                       tmp.identifier = "CB"; tmp.name = "Cr"; tmp.value = 2;
                        RNA_enum_item_add(&item, &totitem, &tmp);
-                       tmp.identifier = "CR"; tmp.name= "Cb"; tmp.value= 3;
+                       tmp.identifier = "CR"; tmp.name = "Cb"; tmp.value = 3;
                        RNA_enum_item_add(&item, &totitem, &tmp);
                        break;
                default:
@@ -6314,29 +6314,29 @@ static void rna_def_node_sockets_api(BlenderRNA *brna, PropertyRNA *cprop, int i
        const char *clearfunc = (in_out == SOCK_IN ? "rna_Node_inputs_clear" : "rna_Node_outputs_clear");
 
        RNA_def_property_srna(cprop, structtype);
-       srna= RNA_def_struct(brna, structtype, NULL);
+       srna = RNA_def_struct(brna, structtype, NULL);
        RNA_def_struct_sdna(srna, "bNode");
        RNA_def_struct_ui_text(srna, uiname, "Collection of Node Sockets");
 
-       func= RNA_def_function(srna, "new", newfunc);
+       func = RNA_def_function(srna, "new", newfunc);
        RNA_def_function_ui_description(func, "Add a socket to this node");
        RNA_def_function_flag(func, FUNC_USE_SELF_ID | FUNC_USE_REPORTS);
-       parm= RNA_def_string(func, "type", "", MAX_NAME, "Type", "Data type");
+       parm = RNA_def_string(func, "type", "", MAX_NAME, "Type", "Data type");
        RNA_def_property_flag(parm, PROP_REQUIRED);
-       parm= RNA_def_string(func, "name", "", MAX_NAME, "Name", "");
+       parm = RNA_def_string(func, "name", "", MAX_NAME, "Name", "");
        RNA_def_property_flag(parm, PROP_REQUIRED);
        RNA_def_string(func, "identifier", "", MAX_NAME, "Identifier", "Unique socket identifier");
        /* return value */
-       parm= RNA_def_pointer(func, "socket", "NodeSocket", "", "New socket");
+       parm = RNA_def_pointer(func, "socket", "NodeSocket", "", "New socket");
        RNA_def_function_return(func, parm);
 
-       func= RNA_def_function(srna, "remove", "rna_Node_socket_remove");
+       func = RNA_def_function(srna, "remove", "rna_Node_socket_remove");
        RNA_def_function_ui_description(func, "Remove a socket from this node");
        RNA_def_function_flag(func, FUNC_USE_SELF_ID | FUNC_USE_REPORTS);
-       parm= RNA_def_pointer(func, "socket", "NodeSocket", "", "The socket to remove");
+       parm = RNA_def_pointer(func, "socket", "NodeSocket", "", "The socket to remove");
        RNA_def_property_flag(parm, PROP_REQUIRED);
 
-       func= RNA_def_function(srna, "clear", clearfunc);
+       func = RNA_def_function(srna, "clear", clearfunc);
        RNA_def_function_ui_description(func, "Remove all sockets from this node");
        RNA_def_function_flag(func, FUNC_USE_SELF_ID | FUNC_USE_REPORTS);
 }
@@ -6493,7 +6493,7 @@ static void rna_def_node(BlenderRNA *brna)
        prop = RNA_def_property(srna, "bl_idname", PROP_STRING, PROP_NONE);
        RNA_def_property_string_sdna(prop, NULL, "typeinfo->idname");
        RNA_def_property_string_funcs(prop, "rna_Node_bl_idname_get", "rna_Node_bl_idname_length", NULL);
-       RNA_def_property_flag(prop, PROP_REGISTER|PROP_NEVER_CLAMP);
+       RNA_def_property_flag(prop, PROP_REGISTER | PROP_NEVER_CLAMP);
        RNA_def_property_ui_text(prop, "ID Name", "");
 
        prop = RNA_def_property(srna, "bl_label", PROP_STRING, PROP_NONE);
@@ -6568,22 +6568,22 @@ static void rna_def_node(BlenderRNA *brna)
        RNA_def_function_ui_description(func, "Draw node buttons");
        RNA_def_function_flag(func, FUNC_REGISTER_OPTIONAL);
        parm = RNA_def_pointer(func, "context", "Context", "", "");
-       RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
+       RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL);
        parm = RNA_def_property(func, "layout", PROP_POINTER, PROP_NONE);
        RNA_def_property_struct_type(parm, "UILayout");
        RNA_def_property_ui_text(parm, "Layout", "Layout in the UI");
-       RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
+       RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL);
 
        /* draw buttons extended */
        func = RNA_def_function(srna, "draw_buttons_ext", NULL);
        RNA_def_function_ui_description(func, "Draw node buttons in the sidebar");
        RNA_def_function_flag(func, FUNC_REGISTER_OPTIONAL);
        parm = RNA_def_pointer(func, "context", "Context", "", "");
-       RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
+       RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL);
        parm = RNA_def_property(func, "layout", PROP_POINTER, PROP_NONE);
        RNA_def_property_struct_type(parm, "UILayout");
        RNA_def_property_ui_text(parm, "Layout", "Layout in the UI");
-       RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
+       RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL);
 }
 
 static void rna_def_node_link(BlenderRNA *brna)
@@ -6638,27 +6638,27 @@ static void rna_def_nodetree_nodes_api(BlenderRNA *brna, PropertyRNA *cprop)
        FunctionRNA *func;
 
        RNA_def_property_srna(cprop, "Nodes");
-       srna= RNA_def_struct(brna, "Nodes", NULL);
+       srna = RNA_def_struct(brna, "Nodes", NULL);
        RNA_def_struct_sdna(srna, "bNodeTree");
        RNA_def_struct_ui_text(srna, "Nodes", "Collection of Nodes");
 
-       func= RNA_def_function(srna, "new", "rna_NodeTree_node_new");
+       func = RNA_def_function(srna, "new", "rna_NodeTree_node_new");
        RNA_def_function_ui_description(func, "Add a node to this node tree");
        RNA_def_function_flag(func, FUNC_USE_CONTEXT | FUNC_USE_REPORTS);
-       parm= RNA_def_string(func, "type", "", MAX_NAME, "Type", "Type of node to add");
+       parm = RNA_def_string(func, "type", "", MAX_NAME, "Type", "Type of node to add");
        RNA_def_property_flag(parm, PROP_REQUIRED);
        /* return value */
-       parm= RNA_def_pointer(func, "node", "Node", "", "New node");
+       parm = RNA_def_pointer(func, "node", "Node", "", "New node");
        RNA_def_function_return(func, parm);
 
-       func= RNA_def_function(srna, "remove", "rna_NodeTree_node_remove");
+       func = RNA_def_function(srna, "remove", "rna_NodeTree_node_remove");
        RNA_def_function_ui_description(func, "Remove a node from this node tree");
        RNA_def_function_flag(func, FUNC_USE_REPORTS);
-       parm= RNA_def_pointer(func, "node", "Node", "", "The node to remove");
+       parm = RNA_def_pointer(func, "node", "Node", "", "The node to remove");
        RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL | PROP_RNAPTR);
        RNA_def_property_clear_flag(parm, PROP_THICK_WRAP);
 
-       func= RNA_def_function(srna, "clear", "rna_NodeTree_node_clear");
+       func = RNA_def_function(srna, "clear", "rna_NodeTree_node_clear");
        RNA_def_function_ui_description(func, "Remove all nodes from this node tree");
        RNA_def_function_flag(func, FUNC_USE_REPORTS);
 
@@ -6716,28 +6716,28 @@ static void rna_def_node_tree_sockets_api(BlenderRNA *brna, PropertyRNA *cprop,
        const char *clearfunc = (in_out == SOCK_IN ? "rna_NodeTree_inputs_clear" : "rna_NodeTree_outputs_clear");
 
        RNA_def_property_srna(cprop, structtype);
-       srna= RNA_def_struct(brna, structtype, NULL);
+       srna = RNA_def_struct(brna, structtype, NULL);
        RNA_def_struct_sdna(srna, "bNodeTree");
        RNA_def_struct_ui_text(srna, uiname, "Collection of Node Tree Sockets");
 
-       func= RNA_def_function(srna, "new", newfunc);
+       func = RNA_def_function(srna, "new", newfunc);
        RNA_def_function_ui_description(func, "Add a socket to this node tree");
        RNA_def_function_flag(func, FUNC_USE_REPORTS);
-       parm= RNA_def_string(func, "type", "", MAX_NAME, "Type", "Data type");
+       parm = RNA_def_string(func, "type", "", MAX_NAME, "Type", "Data type");
        RNA_def_property_flag(parm, PROP_REQUIRED);
-       parm= RNA_def_string(func, "name", "", MAX_NAME, "Name", "");
+       parm = RNA_def_string(func, "name", "", MAX_NAME, "Name", "");
        RNA_def_property_flag(parm, PROP_REQUIRED);
        /* return value */
-       parm= RNA_def_pointer(func, "socket", "NodeSocketInterface", "", "New socket");
+       parm = RNA_def_pointer(func, "socket", "NodeSocketInterface", "", "New socket");
        RNA_def_function_return(func, parm);
 
-       func= RNA_def_function(srna, "remove", "rna_NodeTree_socket_remove");
+       func = RNA_def_function(srna, "remove", "rna_NodeTree_socket_remove");
        RNA_def_function_ui_description(func, "Remove a socket from this node tree");
        RNA_def_function_flag(func, FUNC_USE_REPORTS);
-       parm= RNA_def_pointer(func, "socket", "NodeSocketInterface", "", "The socket to remove");
+       parm = RNA_def_pointer(func, "socket", "NodeSocketInterface", "", "The socket to remove");
        RNA_def_property_flag(parm, PROP_REQUIRED);
 
-       func= RNA_def_function(srna, "clear", clearfunc);
+       func = RNA_def_function(srna, "clear", clearfunc);
        RNA_def_function_ui_description(func, "Remove all sockets from this node tree");
        RNA_def_function_flag(func, FUNC_USE_REPORTS);
 }
@@ -6832,7 +6832,7 @@ static void rna_def_nodetree(BlenderRNA *brna)
        prop = RNA_def_property(srna, "bl_idname", PROP_STRING, PROP_NONE);
        RNA_def_property_string_sdna(prop, NULL, "typeinfo->idname");
        RNA_def_property_string_funcs(prop, "rna_NodeTree_bl_idname_get", "rna_NodeTree_bl_idname_length", NULL);
-       RNA_def_property_flag(prop, PROP_REGISTER|PROP_NEVER_CLAMP);
+       RNA_def_property_flag(prop, PROP_REGISTER | PROP_NEVER_CLAMP);
        RNA_def_property_ui_text(prop, "ID Name", "");
 
        prop = RNA_def_property(srna, "bl_label", PROP_STRING, PROP_NONE);
@@ -6867,11 +6867,11 @@ static void rna_def_nodetree(BlenderRNA *brna)
        RNA_def_function_ui_description(func, "Draw the menu for adding nodes");
        RNA_def_function_flag(func, FUNC_REGISTER_OPTIONAL);
        parm = RNA_def_pointer(func, "context", "Context", "", "");
-       RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
+       RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL);
        parm = RNA_def_property(func, "layout", PROP_POINTER, PROP_NONE);
        RNA_def_property_struct_type(parm, "UILayout");
        RNA_def_property_ui_text(parm, "Layout", "Menu layout in the UI");
-       RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
+       RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL);
 
        /* get a node tree from context */
        func = RNA_def_function(srna, "get_from_context", NULL);
index f365352ca3059bf596a266e6774576d31e80fc59..a756fdab4f8f4f8561feab164903294ee3dbf18e 100644 (file)
@@ -1038,12 +1038,12 @@ static void rna_SpaceNodeEditor_node_tree_update(const bContext *C, PointerRNA *
 
 static int rna_SpaceNodeEditor_tree_type_get(PointerRNA *ptr)
 {
-       SpaceNode *snode= (SpaceNode*)ptr->data;
+       SpaceNode *snode = (SpaceNode *)ptr->data;
        return rna_node_tree_idname_to_enum(snode->tree_idname);
 }
 static void rna_SpaceNodeEditor_tree_type_set(PointerRNA *ptr, int value)
 {
-       SpaceNode *snode= (SpaceNode*)ptr->data;
+       SpaceNode *snode = (SpaceNode *)ptr->data;
        ED_node_set_tree_type(snode, rna_node_tree_type_from_enum(value));
 }
 static int rna_SpaceNodeEditor_tree_type_poll(void *Cv, bNodeTreeType *type)
@@ -3266,7 +3266,7 @@ static void rna_def_space_node(BlenderRNA *brna)
        RNA_def_property_clear_flag(prop, PROP_EDITABLE);
        RNA_def_property_ui_text(prop, "ID From", "Datablock from which the edited datablock is linked");
 
-       prop= RNA_def_property(srna, "path", PROP_COLLECTION, PROP_NONE);
+       prop = RNA_def_property(srna, "path", PROP_COLLECTION, PROP_NONE);
        RNA_def_property_collection_sdna(prop, NULL, "treepath", NULL);
        RNA_def_property_struct_type(prop, "NodeTreePath");
        RNA_def_property_ui_text(prop, "Node Tree Path", "Path from the data block to the currently edited node tree");
@@ -3279,16 +3279,16 @@ static void rna_def_space_node(BlenderRNA *brna)
        RNA_def_property_ui_text(prop, "Node Tree", "Base node tree from context");
        RNA_def_property_update(prop, NC_SPACE | ND_SPACE_NODE, "rna_SpaceNodeEditor_node_tree_update");
 
-       prop= RNA_def_property(srna, "edit_tree", PROP_POINTER, PROP_NONE);
+       prop = RNA_def_property(srna, "edit_tree", PROP_POINTER, PROP_NONE);
        RNA_def_property_pointer_sdna(prop, NULL, "edittree");
        RNA_def_property_clear_flag(prop, PROP_EDITABLE);
        RNA_def_property_ui_text(prop, "Edit Tree", "Node tree being displayed and edited");
 
-       prop= RNA_def_property(srna, "pin", PROP_BOOLEAN, PROP_NONE);
+       prop = RNA_def_property(srna, "pin", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "flag", SNODE_PIN);
        RNA_def_property_ui_text(prop, "Pinned", "Use the pinned node tree");
        RNA_def_property_ui_icon(prop, ICON_UNPINNED, 1);
-       RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NODE, NULL);
+       RNA_def_property_update(prop, NC_SPACE | ND_SPACE_NODE, NULL);
 
        prop = RNA_def_property(srna, "show_backdrop", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "flag", SNODE_BACKDRAW);
index 009823555f04049637db7b9019e96ca9bd2ef42e..e8f812506e2234a70594327ac3d40e9e4dab2a9e 100644 (file)
@@ -382,7 +382,7 @@ static void rna_Texture_use_color_ramp_set(PointerRNA *ptr, int value)
        else tex->flag &= ~TEX_COLORBAND;
 
        if ((tex->flag & TEX_COLORBAND) && tex->coba == NULL)
-               tex->coba = add_colorband(0);
+               tex->coba = add_colorband(false);
 }
 
 static void rna_Texture_use_nodes_update(bContext *C, PointerRNA *ptr)
index 41d1411d35c19c4f12d5dda80fc9466d41171a72..b2f17bfed8bc4cb12aef4e63aa070ce26ce63db6 100644 (file)
@@ -834,7 +834,7 @@ void RNA_api_ui_layout(StructRNA *srna)
        func = RNA_def_function(srna, "template_component_menu", "uiTemplateComponentMenu");
        RNA_def_function_ui_description(func, "Item. Display expanded property in a popup menu");
        parm = RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take property");
-       RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR);
+       RNA_def_property_flag(parm, PROP_REQUIRED | PROP_RNAPTR);
        parm = RNA_def_string(func, "property", "", 0, "", "Identifier of property in data");
        RNA_def_property_flag(parm, PROP_REQUIRED);
        RNA_def_string(func, "name", "", 0, "", "");
index 12fac82fb75d7c64460bc2a0a23ebd8502bd72a3..0023f164edcc6ce9cde6eafc3e5c2d171f78c30e 100644 (file)
@@ -1884,7 +1884,7 @@ static void rna_def_userdef_theme_space_node(BlenderRNA *brna)
        RNA_def_property_ui_text(prop, "Group Node", "");
        RNA_def_property_update(prop, 0, "rna_userdef_update");
 
-       prop= RNA_def_property(srna, "group_socket_node", PROP_FLOAT, PROP_COLOR_GAMMA);
+       prop = RNA_def_property(srna, "group_socket_node", PROP_FLOAT, PROP_COLOR_GAMMA);
        RNA_def_property_float_sdna(prop, NULL, "console_output");
        RNA_def_property_array(prop, 3);
        RNA_def_property_ui_text(prop, "Group Socket Node", "");
index d10ab9d8d498d5a89647b3796334f300fd9d5de3..200e5341868b6349de7a7c4cea429c7b167fce74 100644 (file)
@@ -107,7 +107,7 @@ static void free_node_cache(bNodeTree *UNUSED(ntree), bNode *node)
 static void free_cache(bNodeTree *ntree)
 {
        bNode *node;
-       for (node= ntree->nodes.first; node; node= node->next)
+       for (node = ntree->nodes.first; node; node = node->next)
                free_node_cache(ntree, node);
 }
 
@@ -117,7 +117,7 @@ static void localize(bNodeTree *localtree, bNodeTree *ntree)
        bNode *node, *node_next;
        bNodeSocket *sock;
        
-       for (node= ntree->nodes.first; node; node= node->next) {
+       for (node = ntree->nodes.first; node; node = node->next) {
                /* ensure new user input gets handled ok */
                node->need_exec= 0;
                node->new_node->original = node;
@@ -142,7 +142,7 @@ static void localize(bNodeTree *localtree, bNodeTree *ntree)
        }
        
        /* replace muted nodes and reroute nodes by internal links */
-       for (node= localtree->nodes.first; node; node= node_next) {
+       for (node = localtree->nodes.first; node; node = node_next) {
                node_next = node->next;
                
                if (node->flag & NODE_MUTED || node->type == NODE_REROUTE) {
@@ -217,7 +217,7 @@ static void update(bNodeTree *ntree)
 
 bNodeTreeType *ntreeType_Composite;
 
-void register_node_tree_type_cmp()
+void register_node_tree_type_cmp(void)
 {
        bNodeTreeType *tt = ntreeType_Composite = MEM_callocN(sizeof(bNodeTreeType), "compositor node tree type");
        
index b125473d5faaa4b5a478366a14407a07dbb9f849..6209ca6aa4f54dd905e15b2eb8a83d5747ed6798 100644 (file)
@@ -40,7 +40,7 @@ int cmp_node_poll_default(bNodeType *UNUSED(ntype), bNodeTree *ntree)
 void cmp_node_update_default(bNodeTree *UNUSED(ntree), bNode *node)
 {
        bNodeSocket *sock;
-       for(sock= node->outputs.first; sock; sock= sock->next) {
+       for (sock= node->outputs.first; sock; sock= sock->next) {
                if(sock->cache) {
                        //free_compbuf(sock->cache);
                        //sock->cache= NULL;
index d7c452e406e57b21652b15cdecd58355f2210b52..cdfcf045e35cbaad7f42f9b48419ea30dedfe215 100644 (file)
@@ -48,7 +48,7 @@ static void node_alphaover_init(bNodeTree *UNUSED(ntree), bNode *node)
        node->storage= MEM_callocN(sizeof(NodeTwoFloats), "NodeTwoFloats");
 }
 
-void register_node_type_cmp_alphaover()
+void register_node_type_cmp_alphaover(void)
 {
        static bNodeType ntype;
 
index bb2f90238660f553ecbeb73fc725b1357eb80d2b..1f80df602dfaa0779f6b586e4186de2f62fa0bf5 100644 (file)
@@ -51,7 +51,7 @@ static void node_composit_init_bilateralblur(bNodeTree *UNUSED(ntree), bNode *no
        nbbd->sigma_space = 5.0;
 }
 
-void register_node_type_cmp_bilateralblur()
+void register_node_type_cmp_bilateralblur(void)
 {
        static bNodeType ntype;
 
index e531f1080cdd38789963ab523d584ceb34be401a..e544ec7d9d84969861dd22bbf2a53b3f384f1ae7 100644 (file)
@@ -51,7 +51,7 @@ static void node_composit_init_blur(bNodeTree *UNUSED(ntree), bNode *node)
        node->storage = data;
 }
 
-void register_node_type_cmp_blur()
+void register_node_type_cmp_blur(void)
 {
        static bNodeType ntype;
 
index babb753a98bd1c6eeb38225b4102b3619fab2e72..669668fa65413bf0c0e548340f272cf0d03d10e1 100644 (file)
@@ -48,7 +48,7 @@ static bNodeSocketTemplate cmp_node_brightcontrast_out[] = {
 };
 
 
-void register_node_type_cmp_brightcontrast()
+void register_node_type_cmp_brightcontrast(void)
 {
        static bNodeType ntype;
        
index b68bc066b12ee17ae9999bbc9f2678dd9fc0f199..92cc55f511f45f75b1c4b1ccd4a361b2636829c5 100644 (file)
@@ -60,7 +60,7 @@ static void node_composit_init_channel_matte(bNodeTree *UNUSED(ntree), bNode *no
        node->custom2= 2; /* Green Channel */
 }
 
-void register_node_type_cmp_channel_matte()
+void register_node_type_cmp_channel_matte(void)
 {
        static bNodeType ntype;
 
index f119c5ae04fbefd8a007b9c2cc9962a94ad51c9c..2e04ddb4f9fe3e6c1528704b310a495f04ba3c84 100644 (file)
@@ -56,7 +56,7 @@ static void node_composit_init_chroma_matte(bNodeTree *UNUSED(ntree), bNode *nod
        c->fstrength= 1.0f;
 }
 
-void register_node_type_cmp_chroma_matte()
+void register_node_type_cmp_chroma_matte(void)
 {
        static bNodeType ntype;
 
index c1ed315adcbf919457552032e0fd0d923ee24eda..2ecb5e3fb7c6d1253aad666e3f6452c8174128fa 100644 (file)
@@ -56,7 +56,7 @@ static void node_composit_init_color_matte(bNodeTree *UNUSED(ntree), bNode *node
        c->fstrength= 1.0f;
 }
 
-void register_node_type_cmp_color_matte()
+void register_node_type_cmp_color_matte(void)
 {
        static bNodeType ntype;
 
index 848a5280992d178b8fbec974ce8e1392433a2f4a..60cfd7c90f3ea39d6a5b77a07fd735167dbd1083 100644 (file)
@@ -54,7 +54,7 @@ static void node_composit_init_color_spill(bNodeTree *UNUSED(ntree), bNode *node
        ncs->unspill=0;   /* do not use unspill */
 }
 
-void register_node_type_cmp_color_spill()
+void register_node_type_cmp_color_spill(void)
 {
        static bNodeType ntype;
        
index ebd41441b3168d5d40b47fb629b7bc562be89c45..693680f58a8a1052ffc8341adb83db5552f48ef8 100644 (file)
@@ -55,7 +55,7 @@ static void node_composit_init_colorbalance(bNodeTree *UNUSED(ntree), bNode *nod
        n->gain[0] = n->gain[1] = n->gain[2] = 1.0f;
 }
 
-void register_node_type_cmp_colorbalance()
+void register_node_type_cmp_colorbalance(void)
 {
        static bNodeType ntype;
 
index 384653e7b4142e2abdb37b850e6bd4525cb44984..44643724073801e58f0b8e812590e9c9b1fe87b1 100644 (file)
@@ -41,7 +41,7 @@
 
 #include "RNA_access.h"
 
-void register_node_type_cmp_group()
+void register_node_type_cmp_group(void)
 {
        static bNodeType ntype;
        
index 42e284e0c527a16d23e2580f12d026f628ec28a7..7fa7a5048ab38e974608a476e3337258175d292b 100644 (file)
@@ -39,7 +39,7 @@ static bNodeSocketTemplate cmp_node_composite_in[] = {
        {       -1, 0, ""       }
 };
 
-void register_node_type_cmp_composite()
+void register_node_type_cmp_composite(void)
 {
        static bNodeType ntype;
 
index bae36024b88e3dc9d287e301e4116fd932f28173..677dafeb527b42a7af34c4e3eee438920854fd34 100644 (file)
@@ -53,7 +53,7 @@ static void node_composit_init_crop(bNodeTree *UNUSED(ntree), bNode *node)
        nxy->y2= 0;
 }
 
-void register_node_type_cmp_crop()
+void register_node_type_cmp_crop(void)
 {
        static bNodeType ntype;
 
index 18999cdc985808c3b763329df540a18d05f03390..2bf901491bf3331871f620f2c9d006bc64f29a96 100644 (file)
@@ -48,7 +48,7 @@ static void node_composit_init_curves_time(bNodeTree *UNUSED(ntree), bNode *node
        node->storage= curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f);
 }
 
-void register_node_type_cmp_curve_time()
+void register_node_type_cmp_curve_time(void)
 {
        static bNodeType ntype;
 
@@ -79,7 +79,7 @@ static void node_composit_init_curve_vec(bNodeTree *UNUSED(ntree), bNode *node)
        node->storage= curvemapping_add(3, -1.0f, -1.0f, 1.0f, 1.0f);
 }
 
-void register_node_type_cmp_curve_vec()
+void register_node_type_cmp_curve_vec(void)
 {
        static bNodeType ntype;
 
@@ -112,7 +112,7 @@ static void node_composit_init_curve_rgb(bNodeTree *UNUSED(ntree), bNode *node)
        node->storage= curvemapping_add(4, 0.0f, 0.0f, 1.0f, 1.0f);
 }
 
-void register_node_type_cmp_curve_rgb()
+void register_node_type_cmp_curve_rgb(void)
 {
        static bNodeType ntype;
 
index 95d9e6115846f876ddcb4f0b32ae37ca01904311..9581ef981cb8282d5c4be27b8b86e043b99a4f88 100644 (file)
@@ -61,7 +61,7 @@ static void node_composit_init_defocus(bNodeTree *UNUSED(ntree), bNode *node)
        node->storage = nbd;
 }
 
-void register_node_type_cmp_defocus()
+void register_node_type_cmp_defocus(void)
 {
        static bNodeType ntype;
 
index 9811e2762dfb250f320ca046e3ccd76d3624d143..486c69caba0d7bb0286c9856e069854171bcdc76 100644 (file)
@@ -48,7 +48,7 @@ static void node_composit_init_despeckle(bNodeTree *UNUSED(ntree), bNode *node)
        node->custom4 = 0.5f;
 }
 
-void register_node_type_cmp_despeckle()
+void register_node_type_cmp_despeckle(void)
 {
        static bNodeType ntype;
 
index 1faf1d1e82c64c750ab7cff99cfe4cbffe98432a..99170c294dee77b6618815617445cf7a3cf895e7 100644 (file)
@@ -53,7 +53,7 @@ static void node_composit_init_diff_matte(bNodeTree *UNUSED(ntree), bNode *node)
        c->t2= 0.1f;
 }
 
-void register_node_type_cmp_diff_matte()
+void register_node_type_cmp_diff_matte(void)
 {
        static bNodeType ntype;
 
index d68a8c340d76cd9c7ee089447792c45a12a0542c..d9caff0d495294589dd459c3a56a89d4d945b33c 100644 (file)
@@ -51,7 +51,7 @@ static void node_composit_init_dilateerode(bNodeTree *UNUSED(ntree), bNode *node
        node->storage = data;
 }
 
-void register_node_type_cmp_dilateerode()
+void register_node_type_cmp_dilateerode(void)
 {
        static bNodeType ntype;
        
index 3a9c49281751afa8c82d494455b25e8cf8c25002..7edef3bf31995662c9192846de298e3b11acbfcd 100644 (file)
@@ -50,7 +50,7 @@ static void node_composit_init_dblur(bNodeTree *UNUSED(ntree), bNode *node)
        ndbd->center_y = 0.5;
 }
 
-void register_node_type_cmp_dblur()
+void register_node_type_cmp_dblur(void)
 {
        static bNodeType ntype;
 
index 2ae7423b31b4873b5ce9c81208e539c2191c9e02..33f82355629c916e6f28651b664c6391de10074d 100644 (file)
@@ -47,7 +47,7 @@ static bNodeSocketTemplate cmp_node_displace_out[] = {
        {       -1, 0, ""       }
 };
 
-void register_node_type_cmp_displace()
+void register_node_type_cmp_displace(void)
 {
        static bNodeType ntype;
 
index 1bbe71810c3ac880cb8c71383acb014b05314348..b75301676e6bfc041ef3468448b977e4ca077bb3 100644 (file)
@@ -54,7 +54,7 @@ static void node_composit_init_distance_matte(bNodeTree *UNUSED(ntree), bNode *n
        c->t2= 0.1f;
 }
 
-void register_node_type_cmp_distance_matte()
+void register_node_type_cmp_distance_matte(void)
 {
        static bNodeType ntype;
 
index 767dfce4d59ffb2836f085cf10becc8b3262124a..0659a353afbf9003f288e629a08fd81a0b01d212 100644 (file)
@@ -42,7 +42,7 @@ static bNodeSocketTemplate cmp_node_doubleedgemask_out[] = {
        { -1, 0, "" }                                   // output socket array terminator
 };
 
-void register_node_type_cmp_doubleedgemask()
+void register_node_type_cmp_doubleedgemask(void)
 {
        static bNodeType ntype; // allocate a node type data structure
 
index cdd3e136874d207bd8e4648b3b8b0f55f58e3511..408c2ff8d7357ba5dfabd32a9ae5caedcc6adddf 100644 (file)
@@ -43,7 +43,7 @@ static bNodeSocketTemplate cmp_node_filter_out[] = {
        {       -1, 0, ""       }
 };
 
-void register_node_type_cmp_filter()
+void register_node_type_cmp_filter(void)
 {
        static bNodeType ntype;
 
index 0041cdfd44e0018ad9e2e1575d5acf2ac313e365..f05447d79c2d8e7519df8f7599f23cfccb3c9884 100644 (file)
@@ -43,7 +43,7 @@ static bNodeSocketTemplate cmp_node_flip_out[] = {
        {       -1, 0, ""       }
 };
 
-void register_node_type_cmp_flip()
+void register_node_type_cmp_flip(void)
 {
        static bNodeType ntype;
 
index 43eaa26c863e7561b60b97dc5886e7bd0cb22cac..27bf72d53b49042974d792063967a23334b070bf 100644 (file)
@@ -45,7 +45,7 @@ static bNodeSocketTemplate cmp_node_gamma_out[] = {
        {       -1, 0, ""       }
 };
 
-void register_node_type_cmp_gamma()
+void register_node_type_cmp_gamma(void)
 {
        static bNodeType ntype;
        
index c2f889a7bf5e26adbef52d9e444cdd3c656eba22..19f5ab10a15be48ab2bd1986f409aea4bcb44579 100644 (file)
@@ -57,7 +57,7 @@ static void node_composit_init_glare(bNodeTree *UNUSED(ntree), bNode *node)
        node->storage = ndg;
 }
 
-void register_node_type_cmp_glare()
+void register_node_type_cmp_glare(void)
 {
        static bNodeType ntype;
 
index 06ba1ba4851310873fa9c3e6aa22209b48e7922f..01c6f639cbb9620880116565599c09e2691acb22 100644 (file)
@@ -53,7 +53,7 @@ static void node_composit_init_hue_sat(bNodeTree *UNUSED(ntree), bNode *node)
        nhs->val= 1.0f;
 }
 
-void register_node_type_cmp_hue_sat()
+void register_node_type_cmp_hue_sat(void)
 {
        static bNodeType ntype;
 
index 3ec4a9c9a4a459f6b09692b7340ce2488f5d3657..71e4df04911bf5a6b7d04c0d87a95d33b9bf2885 100644 (file)
@@ -59,7 +59,7 @@ static void node_composit_init_huecorrect(bNodeTree *UNUSED(ntree), bNode *node)
        cumapping->cur = 1;
 }
 
-void register_node_type_cmp_huecorrect()
+void register_node_type_cmp_huecorrect(void)
 {
        static bNodeType ntype;
 
index 2d4fcc76462166c9bcbd8d11ef8f8c25deac2cf8..529bc83946b0e4791a18e91ab9fbdceb1ac936a1 100644 (file)
@@ -44,7 +44,7 @@ static bNodeSocketTemplate cmp_node_idmask_out[] = {
        {       -1, 0, ""       }
 };
 
-void register_node_type_cmp_idmask()
+void register_node_type_cmp_idmask(void)
 {
        static bNodeType ntype;
 
index f9f289297d7e1f71521cde8710985e00249574c4..aa218252472072e45f507ad304e6f5b089ecd7cd 100644 (file)
@@ -202,8 +202,8 @@ static bNodeSocket *cmp_node_image_output_find_match(bNode *UNUSED(node), bNodeS
 {
        bNodeSocket *sock;
        
-       for (sock=oldsocklist->first; sock; sock=sock->next)
-               if (strcmp(sock->name, newsock->name)==0)
+       for (sock=oldsocklist->first; sock; sock = sock->next)
+               if (STREQ(sock->name, newsock->name))
                        return sock;
        return NULL;
 }
@@ -213,8 +213,8 @@ static bNodeSocket *cmp_node_image_output_relink(bNode *node, bNodeSocket *oldso
        bNodeSocket *sock;
        
        /* first try to find matching socket name */
-       for (sock=node->outputs.first; sock; sock=sock->next)
-               if (strcmp(sock->name, oldsock->name)==0)
+       for (sock = node->outputs.first; sock; sock = sock->next)
+               if (STREQ(sock->name, oldsock->name))
                        return sock;
        
        /* no matching name, simply link to same index */
@@ -241,7 +241,7 @@ static void cmp_node_image_verify_outputs(bNodeTree *ntree, bNode *node)
        /* XXX make callback */
        cmp_node_image_create_outputs(ntree, node);
        
-       for (newsock=node->outputs.first; newsock; newsock=newsock->next) {
+       for (newsock = node->outputs.first; newsock; newsock=newsock->next) {
                /* XXX make callback */
                oldsock = cmp_node_image_output_find_match(node, newsock, &oldsocklist);
                if (oldsock) {
@@ -299,7 +299,7 @@ static void node_composit_free_image(bNode *node)
        bNodeSocket *sock;
        
        /* free extra socket info */
-       for (sock=node->outputs.first; sock; sock=sock->next)
+       for (sock = node->outputs.first; sock; sock = sock->next)
                MEM_freeN(sock->storage);
        
        MEM_freeN(node->storage);
@@ -312,11 +312,11 @@ static void node_composit_copy_image(bNodeTree *UNUSED(dest_ntree), bNode *dest_
        dest_node->storage= MEM_dupallocN(src_node->storage);
        
        /* copy extra socket info */
-       for (sock=src_node->outputs.first; sock; sock=sock->next)
+       for (sock=src_node->outputs.first; sock; sock = sock->next)
                sock->new_sock->storage = MEM_dupallocN(sock->storage);
 }
 
-void register_node_type_cmp_image()
+void register_node_type_cmp_image(void)
 {
        static bNodeType ntype;
 
@@ -340,7 +340,7 @@ static int node_composit_poll_rlayers(bNodeType *UNUSED(ntype), bNodeTree *ntree
        return (strcmp(ntree->idname, "CompositorNodeTree")==0 && RNA_boolean_get(&ptr, "is_local_tree"));
 }
 
-void register_node_type_cmp_rlayers()
+void register_node_type_cmp_rlayers(void)
 {
        static bNodeType ntype;
 
index 9765c3c8764cedd3228e33b100ee82bcde2ab3a9..6a3da2c854b00699e0112be35d62a96e74dc7ab5 100644 (file)
@@ -49,7 +49,7 @@ static void node_composit_init_invert(bNodeTree *UNUSED(ntree), bNode *node)
 }
 
 /* custom1 = mix type */
-void register_node_type_cmp_invert()
+void register_node_type_cmp_invert(void)
 {
        static bNodeType ntype;
 
index 78eeccbe4b1c784caa5002299e0e94d22253ba56..c093d5633634374105a1693aee7c42e5063ea3cd 100644 (file)
@@ -51,7 +51,7 @@ static void node_composit_init_lensdist(bNodeTree *UNUSED(ntree), bNode *node)
 }
 
 
-void register_node_type_cmp_lensdist()
+void register_node_type_cmp_lensdist(void)
 {
        static bNodeType ntype;
 
index 2d24dfadbd37be96d486ef4f18a511e18a511484..e2b3895a96f657cfc779b091e2e12081998e3730 100644 (file)
@@ -50,7 +50,7 @@ static void node_composit_init_view_levels(bNodeTree *UNUSED(ntree), bNode *node
        node->custom1=1; /*All channels*/
 }
 
-void register_node_type_cmp_view_levels()
+void register_node_type_cmp_view_levels(void)
 {
        static bNodeType ntype;
 
index 2155db9ae2023d8939ddf213856ede7b5f1d4d99..606c95b495dcc302e36464dc3ee1a19d4726b3bc 100644 (file)
@@ -53,7 +53,7 @@ static void node_composit_init_luma_matte(bNodeTree *UNUSED(ntree), bNode *node)
        c->t2= 0.0f;
 }
 
-void register_node_type_cmp_luma_matte()
+void register_node_type_cmp_luma_matte(void)
 {
        static bNodeType ntype;
 
index 43d359db0a5dcfec80c4a58fb7efa4b931e0abad..74c36a3e25a098c8311ec5a650082a6022313d97 100644 (file)
@@ -46,7 +46,7 @@ static bNodeSocketTemplate cmp_node_map_range_out[] = {
        {       -1, 0, ""       }
 };
 
-void register_node_type_cmp_map_range()
+void register_node_type_cmp_map_range(void)
 {
        static bNodeType ntype;
 
index eca8dea047094cfe8ef7e4d060b8a9378a0cd570..0d2c53f241c4cb7b4be40e02cf34e9e535b16e0a 100644 (file)
@@ -44,7 +44,7 @@ static bNodeSocketTemplate cmp_node_mapuv_out[] = {
        {       -1, 0, ""       }
 };
 
-void register_node_type_cmp_mapuv()
+void register_node_type_cmp_mapuv(void)
 {
        static bNodeType ntype;
 
index e12c7e2d2c778bd11dc44813d59348b1c5637341..a61ecd417467789e6888309dcb95746670dea055 100644 (file)
@@ -47,7 +47,7 @@ static void node_composit_init_map_value(bNodeTree *UNUSED(ntree), bNode *node)
        node->storage= add_tex_mapping();
 }
 
-void register_node_type_cmp_map_value()
+void register_node_type_cmp_map_value(void)
 {
        static bNodeType ntype;
 
index 90c0d6ce30aa479c6bf1cc7b2eab698ba08601f7..802a370f8822a8924b9703734b0de91c26dd257d 100644 (file)
@@ -45,7 +45,7 @@ static bNodeSocketTemplate cmp_node_math_out[] = {
 };
 
 
-void register_node_type_cmp_math()
+void register_node_type_cmp_math(void)
 {
        static bNodeType ntype;
 
index 0a6559d4f2f58adfbbfa7bd45e14264c6e24d851..a3415761bf806c3617f9c4786906aafb2e2828ec 100644 (file)
@@ -44,7 +44,7 @@ static bNodeSocketTemplate cmp_node_mix_rgb_out[] = {
 };
 
 /* custom1 = mix type */
-void register_node_type_cmp_mix_rgb()
+void register_node_type_cmp_mix_rgb(void)
 {
        static bNodeType ntype;
 
index ae6f02452b49146f5c1ae480ef299da500284f0e..34d7eeb570d19950aa014ba4d709fbd13fdb006b 100644 (file)
@@ -50,7 +50,7 @@ static void init(bNodeTree *UNUSED(ntree), bNode *node)
        user->framenr = 1;
 }
 
-void register_node_type_cmp_movieclip()
+void register_node_type_cmp_movieclip(void)
 {
        static bNodeType ntype;
 
index b8770d1670e4f29796f127e8a749a03f32043e34..86666a38f1d637d85aa5a2fb382ce626b342bba8 100644 (file)
@@ -66,7 +66,7 @@ static void storage_copy(bNodeTree *UNUSED(dest_ntree), bNode *dest_node, bNode
                dest_node->storage = BKE_tracking_distortion_copy(src_node->storage);
 }
 
-void register_node_type_cmp_moviedistortion()
+void register_node_type_cmp_moviedistortion(void)
 {
        static bNodeType ntype;
 
index 7a6d2fcd8e85b6e246ab91264d3e65c01f8afc9c..0f7fdb53693caa3cb06369036d53b80c731844fc 100644 (file)
@@ -44,7 +44,7 @@ static bNodeSocketTemplate cmp_node_normal_out[] = {
        {       -1, 0, ""       }
 };
 
-void register_node_type_cmp_normal()
+void register_node_type_cmp_normal(void)
 {
        static bNodeType ntype;
 
index 2f19c6bc52302e19f912087fd07a86b3ec2ca3c3..c101d7edec4084d32c84e708606b2652ea903a2a 100644 (file)
@@ -43,7 +43,7 @@ static bNodeSocketTemplate cmp_node_normalize_out[] = {
        {   -1, 0, ""   }
 };
 
-void register_node_type_cmp_normalize()
+void register_node_type_cmp_normalize(void)
 {
        static bNodeType ntype;
        
index e008e17cbb08adb5918fbca6aca41f3fd91e6c5f..18bb97c70ed53cd13487cae6812f29a49604eacb 100644 (file)
@@ -53,10 +53,10 @@ static bool unique_path_unique_check(void *arg, const char *name)
 {
        struct {ListBase *lb; bNodeSocket *sock;} *data= arg;
        bNodeSocket *sock;
-       for (sock=data->lb->first; sock; sock=sock->next) {
+       for (sock=data->lb->first; sock; sock = sock->next) {
                if (sock != data->sock) {
                        NodeImageMultiFileSocket *sockdata = sock->storage;
-                       if (strcmp(sockdata->path, name)==0)
+                       if (STREQ(sockdata->path, name))
                                return true;
                }
        }
@@ -82,10 +82,10 @@ static bool unique_layer_unique_check(void *arg, const char *name)
 {
        struct {ListBase *lb; bNodeSocket *sock;} *data= arg;
        bNodeSocket *sock;
-       for (sock=data->lb->first; sock; sock=sock->next) {
+       for (sock=data->lb->first; sock; sock = sock->next) {
                if (sock != data->sock) {
                        NodeImageMultiFileSocket *sockdata = sock->storage;
-                       if (strcmp(sockdata->layer, name)==0)
+                       if (STREQ(sockdata->layer, name))
                                return true;
                }
        }
@@ -202,7 +202,7 @@ static void free_output_file(bNode *node)
        bNodeSocket *sock;
        
        /* free storage data in sockets */
-       for (sock=node->inputs.first; sock; sock=sock->next) {
+       for (sock = node->inputs.first; sock; sock = sock->next) {
                MEM_freeN(sock->storage);
        }
        
@@ -229,7 +229,7 @@ static void update_output_file(bNodeTree *ntree, bNode *node)
        cmp_node_update_default(ntree, node);
        
        /* automatically update the socket type based on linked input */
-       for (sock=node->inputs.first; sock; sock=sock->next) {
+       for (sock = node->inputs.first; sock; sock = sock->next) {
                if (sock->link) {
                        RNA_pointer_create((ID *)ntree, &RNA_NodeSocket, sock, &ptr);
                        RNA_enum_set(&ptr, "type", sock->link->fromsock->type);
@@ -237,7 +237,7 @@ static void update_output_file(bNodeTree *ntree, bNode *node)
        }
 }
 
-void register_node_type_cmp_output_file()
+void register_node_type_cmp_output_file(void)
 {
        static bNodeType ntype;
 
index bb8df65ee235ad76224791272dea21e689336026..d12c09cb25e89eae7fccdeb3d78d648dbde931c6 100644 (file)
@@ -45,7 +45,7 @@ static bNodeSocketTemplate cmp_node_pixelate_out[] = {
        {   -1, 0, ""   }
 };
 
-void register_node_type_cmp_pixelate()
+void register_node_type_cmp_pixelate(void)
 {
        static bNodeType ntype;
 
index 75e34335c3a533b8f4cdd867aed8d4aafff7f1d8..bfc5a54cf737891e0ed24059b27744fcf02f8a89 100644 (file)
@@ -44,7 +44,7 @@ static bNodeSocketTemplate cmp_node_premulkey_out[] = {
        {       -1, 0, ""       }
 };
 
-void register_node_type_cmp_premulkey()
+void register_node_type_cmp_premulkey(void)
 {
        static bNodeType ntype;
 
index d2ebd84487d9aa5aa47a9d0f3880156f10748a85..e3209844319a4697d1450c7ef08b4ada1dfdb8a6 100644 (file)
@@ -38,7 +38,7 @@ static bNodeSocketTemplate cmp_node_rgb_out[] = {
        {       -1, 0, ""       }
 };
 
-void register_node_type_cmp_rgb()
+void register_node_type_cmp_rgb(void)
 {
        static bNodeType ntype;
 
index f52d54b9c649cd63b1b9c6565c295667921ca016..1f51e25798d5723f340d43c8a7b5ddd03b5ce023 100644 (file)
@@ -49,7 +49,7 @@ static void node_composit_init_rotate(bNodeTree *UNUSED(ntree), bNode *node)
        node->custom1= 1; /* Bilinear Filter*/
 }
 
-void register_node_type_cmp_rotate()
+void register_node_type_cmp_rotate(void)
 {
        static bNodeType ntype;
 
index 284b6dca72dcfbf0bd48de5ee4a19574953d9aa4..0d8763bf321f33103e6dff4d6d6b2d02470b132c 100644 (file)
@@ -45,7 +45,7 @@ static bNodeSocketTemplate cmp_node_scale_out[] = {
        {   -1, 0, ""   }
 };
 
-void register_node_type_cmp_scale()
+void register_node_type_cmp_scale(void)
 {
        static bNodeType ntype;
 
index 2043812c6eb1f93c00c1196103b94365895fec89..9aa64138cd679ed528903a88821287f52a7092ea 100644 (file)
@@ -46,7 +46,7 @@ static bNodeSocketTemplate cmp_node_sephsva_out[] = {
        {       -1, 0, ""       }
 };
 
-void register_node_type_cmp_sephsva()
+void register_node_type_cmp_sephsva(void)
 {
        static bNodeType ntype;
 
@@ -70,7 +70,7 @@ static bNodeSocketTemplate cmp_node_combhsva_out[] = {
        {       -1, 0, ""       }
 };
 
-void register_node_type_cmp_combhsva()
+void register_node_type_cmp_combhsva(void)
 {
        static bNodeType ntype;
 
index 6b522184fe7ecd4a6839f1ff0041c7b38e68d6c0..603cc01c25946c90213326ac8b3d57aa907b9458 100644 (file)
@@ -45,7 +45,7 @@ static bNodeSocketTemplate cmp_node_seprgba_out[] = {
        {       -1, 0, ""       }
 };
 
-void register_node_type_cmp_seprgba()
+void register_node_type_cmp_seprgba(void)
 {
        static bNodeType ntype;
 
@@ -70,7 +70,7 @@ static bNodeSocketTemplate cmp_node_combrgba_out[] = {
        {       -1, 0, ""       }
 };
 
-void register_node_type_cmp_combrgba()
+void register_node_type_cmp_combrgba(void)
 {
        static bNodeType ntype;
 
index 5940cf18c8af6956a5fa4d6f1c86a7218227ef22..cae70efc85d8b65e8ec062d3700caa7d312baaae 100644 (file)
@@ -47,7 +47,7 @@ static bNodeSocketTemplate cmp_node_sepycca_out[] = {
 };
 
 
-void register_node_type_cmp_sepycca()
+void register_node_type_cmp_sepycca(void)
 {
        static bNodeType ntype;
 
@@ -72,7 +72,7 @@ static bNodeSocketTemplate cmp_node_combycca_out[] = {
        {       -1, 0, ""       }
 };
 
-void register_node_type_cmp_combycca()
+void register_node_type_cmp_combycca(void)
 {
        static bNodeType ntype;
 
index 01dfd3b1abd64817b31cf3ba83d39bd66f03483f..74c840adef1ce9897e401447113100b9785eb6e3 100644 (file)
@@ -46,7 +46,7 @@ static bNodeSocketTemplate cmp_node_sepyuva_out[] = {
        {  -1, 0, ""   }
 };
 
-void register_node_type_cmp_sepyuva()
+void register_node_type_cmp_sepyuva(void)
 {
        static bNodeType ntype;
 
@@ -71,7 +71,7 @@ static bNodeSocketTemplate cmp_node_combyuva_out[] = {
        {       -1, 0, ""       }
 };
 
-void register_node_type_cmp_combyuva()
+void register_node_type_cmp_combyuva(void)
 {
        static bNodeType ntype;
 
index 30e408dcccb293d77eb31a08d111376f929c2af6..a162936c9a2fccc6252112224c27bfef94f45564 100644 (file)
@@ -43,7 +43,7 @@ static bNodeSocketTemplate cmp_node_setalpha_out[] = {
        {       -1, 0, ""       }
 };
 
-void register_node_type_cmp_setalpha()
+void register_node_type_cmp_setalpha(void)
 {
        static bNodeType ntype;
 
index 9fd61eca668a6a3b710dd49df08a73185dfcb93d..7cb1cf1d65d4013f91113977eb7f1a105013a397 100644 (file)
@@ -49,7 +49,7 @@ static void node_composit_init_splitviewer(bNodeTree *UNUSED(ntree), bNode *node
        node->custom1= 50;      /* default 50% split */
 }
 
-void register_node_type_cmp_splitviewer()
+void register_node_type_cmp_splitviewer(void)
 {
        static bNodeType ntype;
 
index 2aa2906d67a587742ffa3f680681ded9ca6bc3d5..3b85b4a6b8cae52f881b69f29a242ab1e238bf44 100644 (file)
@@ -45,7 +45,7 @@ static bNodeSocketTemplate cmp_node_stabilize2d_out[] = {
        {       -1, 0, ""       }
 };
 
-void register_node_type_cmp_stabilize2d()
+void register_node_type_cmp_stabilize2d(void)
 {
        static bNodeType ntype;
 
index 3793dd4669ae9435e55774a70f906e9e208b5fc4..320b8f6aabe90e7ed428c36914b829e5b3d21800 100644 (file)
@@ -44,7 +44,7 @@ static bNodeSocketTemplate cmp_node_texture_out[] = {
        {       -1, 0, ""       }
 };
 
-void register_node_type_cmp_texture()
+void register_node_type_cmp_texture(void)
 {
        static bNodeType ntype;
 
index 4f43297a18223c6f02f8d29729a8f068a128f61b..6f6fbc21a40752a16a9737e7dcea508e286e9ea7 100644 (file)
@@ -57,7 +57,7 @@ static void node_composit_init_tonemap(bNodeTree *UNUSED(ntree), bNode *node)
        node->storage = ntm;
 }
 
-void register_node_type_cmp_tonemap()
+void register_node_type_cmp_tonemap(void)
 {
        static bNodeType ntype;
 
index 9618cc8581185fd3b63966099435f0ecdc782c56..8dc272adf38f26887c90b28176ad815e79d4160f 100644 (file)
@@ -48,7 +48,7 @@ static bNodeSocketTemplate cmp_node_transform_out[] = {
        {       -1, 0, ""       }
 };
 
-void register_node_type_cmp_transform()
+void register_node_type_cmp_transform(void)
 {
        static bNodeType ntype;
 
index 2449f614fe063b909f1fcb45e27e867ee91b5194..ae293170004b98358e8b7b7978265eaf1540d660 100644 (file)
@@ -52,7 +52,7 @@ static void node_composit_init_translate(bNodeTree *UNUSED(ntree), bNode *node)
        node->storage = data;
 }
 
-void register_node_type_cmp_translate()
+void register_node_type_cmp_translate(void)
 {
        static bNodeType ntype;
 
index db02c51c95f4e4b4a060815fd137e92315eed78b..a1d51bdf1718e7bf56d850221f6067f5a13f7e82 100644 (file)
@@ -46,10 +46,10 @@ static bNodeSocketTemplate cmp_node_valtorgb_out[] = {
 
 static void node_composit_init_valtorgb(bNodeTree *UNUSED(ntree), bNode *node)
 {
-       node->storage= add_colorband(1);
+       node->storage= add_colorband(true);
 }
 
-void register_node_type_cmp_valtorgb()
+void register_node_type_cmp_valtorgb(void)
 {
        static bNodeType ntype;
 
@@ -74,7 +74,7 @@ static bNodeSocketTemplate cmp_node_rgbtobw_out[] = {
        {       -1, 0, ""       }
 };
 
-void register_node_type_cmp_rgbtobw()
+void register_node_type_cmp_rgbtobw(void)
 {
        static bNodeType ntype;
        
index 491c01c465aea6b52d8e1779d3213218a2ec5a86..87c774409858748a060ed2545103f642ff0fe0e8 100644 (file)
@@ -38,7 +38,7 @@ static bNodeSocketTemplate cmp_node_value_out[] = {
        {       -1, 0, ""       }
 };
 
-void register_node_type_cmp_value()
+void register_node_type_cmp_value(void)
 {
        static bNodeType ntype;
 
index 02a5fdcc0e5b9de88c79fe2407975054ad596fba..b00cfc315b0b26e6815591b1f7315b2f16d2e5fa 100644 (file)
@@ -54,7 +54,7 @@ static void node_composit_init_vecblur(bNodeTree *UNUSED(ntree), bNode *node)
 }
 
 /* custom1: itterations, custom2: maxspeed (0 = nolimit) */
-void register_node_type_cmp_vecblur()
+void register_node_type_cmp_vecblur(void)
 {
        static bNodeType ntype;
 
index a1e6640dcb6d77efe9c7479e8b10c38fa8f2edf5..70aae460af7f95f0b1d6089740b009236b305997 100644 (file)
@@ -52,7 +52,7 @@ static void node_composit_init_viewer(bNodeTree *UNUSED(ntree), bNode *node)
        node->custom4 = 0.5f;
 }
 
-void register_node_type_cmp_viewer()
+void register_node_type_cmp_viewer(void)
 {
        static bNodeType ntype;
 
index ca7258c5b97d88fa9f8a6a721b653e6a140130bf..6e5f38e1fab13f95060e08b94d9f83f67ac55147 100644 (file)
@@ -48,7 +48,7 @@ static bNodeSocketTemplate cmp_node_zcombine_out[] = {
        {       -1, 0, ""       }
 };
 
-void register_node_type_cmp_zcombine()
+void register_node_type_cmp_zcombine(void)
 {
        static bNodeType ntype;
 
index 85e2f775ad936784a983a8a1bddb1d2125888407..92789eef81677678f33471bd5e22f6842427af6a 100644 (file)
@@ -66,8 +66,8 @@
 bNodeSocket *node_group_find_input_socket(bNode *groupnode, const char *identifier)
 {
        bNodeSocket *sock;
-       for (sock=groupnode->inputs.first; sock; sock=sock->next)
-               if (strcmp(sock->identifier, identifier)==0)
+       for (sock=groupnode->inputs.first; sock; sock = sock->next)
+               if (STREQ(sock->identifier, identifier))
                        return sock;
        return NULL;
 }
@@ -75,8 +75,8 @@ bNodeSocket *node_group_find_input_socket(bNode *groupnode, const char *identifi
 bNodeSocket *node_group_find_output_socket(bNode *groupnode, const char *identifier)
 {
        bNodeSocket *sock;
-       for (sock=groupnode->outputs.first; sock; sock=sock->next)
-               if (strcmp(sock->identifier, identifier)==0)
+       for (sock=groupnode->outputs.first; sock; sock = sock->next)
+               if (STREQ(sock->identifier, identifier))
                        return sock;
        return NULL;
 }
@@ -119,8 +119,8 @@ static bNodeSocket *group_verify_socket(bNodeTree *ntree, bNode *gnode, bNodeSoc
        bNodeSocket *sock;
        
        for (sock= verify_lb->first; sock; sock= sock->next) {
-               if (strcmp(sock->identifier, iosock->identifier)==0)
-                               break;
+               if (STREQ(sock->identifier, iosock->identifier))
+                       break;
        }
        if (sock) {
                strcpy(sock->name, iosock->name);
@@ -334,8 +334,8 @@ static void node_group_input_init(bNodeTree *ntree, bNode *node)
 bNodeSocket *node_group_input_find_socket(bNode *node, const char *identifier)
 {
        bNodeSocket *sock;
-       for (sock=node->outputs.first; sock; sock=sock->next)
-               if (strcmp(sock->identifier, identifier)==0)
+       for (sock = node->outputs.first; sock; sock = sock->next)
+               if (STREQ(sock->identifier, identifier))
                        return sock;
        return NULL;
 }
@@ -421,8 +421,8 @@ static void node_group_output_init(bNodeTree *ntree, bNode *node)
 bNodeSocket *node_group_output_find_socket(bNode *node, const char *identifier)
 {
        bNodeSocket *sock;
-       for (sock=node->inputs.first; sock; sock=sock->next)
-               if (strcmp(sock->identifier, identifier)==0)
+       for (sock = node->inputs.first; sock; sock = sock->next)
+               if (STREQ(sock->identifier, identifier))
                        return sock;
        return NULL;
 }
index 8fb23064bf0e6c8f72ce7ab48ad5b622a8f35690..f6bf1db5254c237c8b337d74aae56ade6006fc2b 100644 (file)
@@ -177,15 +177,15 @@ bNodeTreeExec *ntree_exec_begin(bNodeExecContext *context, bNodeTree *ntree, bNo
                node->stack_index = index;
                
                /* init node socket stack indexes */
-               for (sock=node->inputs.first; sock; sock=sock->next)
+               for (sock = node->inputs.first; sock; sock = sock->next)
                        node_init_input_index(sock, &index);
                
                if (node->flag & NODE_MUTED || node->type == NODE_REROUTE) {
-                       for (sock=node->outputs.first; sock; sock=sock->next)
+                       for (sock = node->outputs.first; sock; sock = sock->next)
                                node_init_output_index(sock, &index, &node->internal_links);
                }
                else {
-                       for (sock=node->outputs.first; sock; sock=sock->next)
+                       for (sock = node->outputs.first; sock; sock = sock->next)
                                node_init_output_index(sock, &index, NULL);
                }
        }
@@ -206,7 +206,7 @@ bNodeTreeExec *ntree_exec_begin(bNodeExecContext *context, bNodeTree *ntree, bNo
                node = nodeexec->node = nodelist[n];
                
                /* tag inputs */
-               for (sock=node->inputs.first; sock; sock=sock->next) {
+               for (sock = node->inputs.first; sock; sock = sock->next) {
                        /* disable the node if an input link is invalid */
                        if (sock->link && !(sock->link->flag & NODE_LINK_VALID))
                                node->need_exec= 0;
@@ -217,7 +217,7 @@ bNodeTreeExec *ntree_exec_begin(bNodeExecContext *context, bNodeTree *ntree, bNo
                }
                
                /* tag all outputs */
-               for (sock=node->outputs.first; sock; sock=sock->next) {
+               for (sock = node->outputs.first; sock; sock = sock->next) {
                        /* ns = */ setup_stack(exec->stack, ntree, node, sock);
                }
                
index a67fa4a0fd5c6d8d740d2522a76a3999138ddbd0..86a8331e5dd29278215d376c8e95f95dd85ba5c6 100644 (file)
@@ -328,7 +328,7 @@ static bNodeSocketType *make_socket_type_virtual(void)
 }
 
 
-void register_standard_node_socket_types()
+void register_standard_node_socket_types(void)
 {
        /* draw callbacks are set in drawnode.c to avoid bad-level calls */
        
index 30da509c09d62fa59937143c54dcaf7de20110b4..68846255983d2103e5df648803e90d3a5bbc350f 100644 (file)
@@ -156,7 +156,7 @@ static void update(bNodeTree *ntree)
 
 bNodeTreeType *ntreeType_Shader;
 
-void register_node_tree_type_sh()
+void register_node_tree_type_sh(void)
 {
        bNodeTreeType *tt = ntreeType_Shader = MEM_callocN(sizeof(bNodeTreeType), "shader node tree type");
        
index 040172d9998cdcc5bced1fa4ecc6d985b2088f7c..c8c4b49edb792a18d8dd0768062c8059a62e0197 100644 (file)
@@ -98,7 +98,7 @@ void ntreeShaderGetTexcoMode(bNodeTree *ntree, int r_mode, short *texco, int *mo
        bNodeSocket *sock;
        int a;
        
-