style cleanup
authorCampbell Barton <ideasman42@gmail.com>
Fri, 5 Apr 2013 16:55:12 +0000 (16:55 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 5 Apr 2013 16:55:12 +0000 (16:55 +0000)
12 files changed:
source/blender/blenkernel/intern/bpath.c
source/blender/blenkernel/intern/group.c
source/blender/blenkernel/intern/object.c
source/blender/blenkernel/intern/text.c
source/blender/editors/animation/anim_channels_defines.c
source/blender/editors/animation/anim_filter.c
source/blender/editors/space_view3d/drawobject.c
source/blender/makesrna/intern/rna_color.c
source/blender/makesrna/intern/rna_linestyle.c
source/blender/makesrna/intern/rna_main.c
source/blender/makesrna/intern/rna_main_api.c
source/blender/makesrna/intern/rna_scene.c

index 806b944572f9c4883d94e4a961b0532e3a701fcf..1dbb02df740ec53683b1aea57a9cb4ab9bbff4f5 100644 (file)
@@ -590,8 +590,8 @@ void BKE_bpath_traverse_id(Main *bmain, ID *id, BPathVisitor visit_cb, const int
                                        for (; module; module = module->next) {
                                                rewrite_path_fixed(module->module_path, visit_cb, absbase, bpath_user_data);
                                        }
-                               }
-                       }
+                               }
+                       }
 #endif
                        break;
                }
index d0a9a6efe6b4ad96f680b9acd934b96e4cb55f90..b1d0e8df7548907ea0974144cb5a43a5b218b34a 100644 (file)
@@ -79,7 +79,6 @@ void BKE_group_unlink(Group *group)
        Object *ob;
        Scene *sce;
        SceneRenderLayer *srl;
-       FreestyleLineSet *lineset;
        ParticleSystem *psys;
        
        for (ma = bmain->mat.first; ma; ma = ma->id.next) {
@@ -104,9 +103,11 @@ void BKE_group_unlink(Group *group)
                }
                
                for (srl = sce->r.layers.first; srl; srl = srl->next) {
+                       FreestyleLineSet *lineset;
+
                        if (srl->light_override == group)
                                srl->light_override = NULL;
-                       for(lineset = srl->freestyleConfig.linesets.first; lineset; lineset= lineset->next) {
+                       for (lineset = srl->freestyleConfig.linesets.first; lineset; lineset = lineset->next) {
                                if (lineset->group == group)
                                        lineset->group = NULL;
                        }
index 3750eadb6dba0e88430500efef72295728193736..a5f05053bfcf72b26c7ae2c5c8ba30223879be77 100644 (file)
@@ -681,7 +681,7 @@ void BKE_object_unlink(Object *ob)
                                SEQ_END
                        }
 
-                       for (srl= sce->r.layers.first; srl; srl= srl->next) {
+                       for (srl = sce->r.layers.first; srl; srl = srl->next) {
                                for (lineset = (FreestyleLineSet *)srl->freestyleConfig.linesets.first;
                                     lineset; lineset = lineset->next)
                                {
index 4527d2a5056276253133ff8f732f7e6561041619..842f495dffedd44a80cadc95c69fc02387debf5b 100644 (file)
@@ -614,7 +614,7 @@ void BKE_text_unlink(Main *bmain, Text *text)
        /* Freestyle */
        for (sce = bmain->scene.first; sce; sce = sce->id.next) {
                for (srl = sce->r.layers.first; srl; srl = srl->next) {
-                       for (module = srl->freestyleConfig.modules.first; module; module= module->next) {
+                       for (module = srl->freestyleConfig.modules.first; module; module = module->next) {
                                if (module->script == text)
                                        module->script = NULL;
                        }
index 4b0a99889b3df421e4684ac5d921f3eaf2cab91a..bd580ab590f7c685aaff65213cb4b79d0f238cec 100644 (file)
@@ -2097,7 +2097,7 @@ static void *acf_dslinestyle_setting_ptr(bAnimListElem *ale, int setting, short
 }
 
 /* node tree expander type define */
-static bAnimChannelType ACF_DSLINESTYLE
+static bAnimChannelType ACF_DSLINESTYLE =
 {
        "Line Style Expander",                  /* type name */
        
index df840df05e79ece0567c66bc6b32d30fbbac382d..2561d517a3c8aa5cf45e106c2d17f6f734b65fe5 100644 (file)
@@ -1577,7 +1577,7 @@ static size_t animdata_filter_ds_linestyle (bAnimContext *ac, ListBase *anim_dat
                                /* include anim-expand widget first */
                                if (filter_mode & ANIMFILTER_LIST_CHANNELS) {
                                        /* check if filtering by active status */
-                                       if ANIMCHANNEL_ACTIVEOK(linestyle) {
+                                       if (ANIMCHANNEL_ACTIVEOK(linestyle)) {
                                                ANIMCHANNEL_NEW_CHANNEL(linestyle, ANIMTYPE_DSLINESTYLE, sce);
                                        }
                                }
index cd68fbf126e7375f8a589522097e34eb276125f8..4727502062df4e2eb4d8e11692d282c828cae816 100644 (file)
@@ -3116,7 +3116,7 @@ static void draw_em_fancy(Scene *scene, View3D *v3d, RegionView3D *rv3d,
        
                        draw_dm_edges_freestyle(em, cageDM);
        
-                       glColor3ub(0,0,0);
+                       glColor3ub(0, 0, 0);
                        glLineWidth(1);
                }
 #endif
index 640e91adabfc0e766627d115f3d5548a6536cc03..46420b38224733bfbdc5c4814c82fec725027760 100644 (file)
@@ -336,7 +336,7 @@ static void rna_ColorRamp_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *
                        break;
                        case ID_LS:
                        {
-                               FreestyleLineStyle *linestyle= ptr->id.data;
+                               FreestyleLineStyle *linestyle = ptr->id.data;
 
                                WM_main_add_notifier(NC_LINESTYLE, linestyle);
                                break;
index a1225acb305fcd139cecc10d221cba6890f702b5..84c6827a8f6d05649e358de52e6127069abc49c4 100644 (file)
@@ -504,7 +504,7 @@ static void rna_def_linestyle_modifiers(BlenderRNA *brna)
        rna_def_alpha_modifier(srna);
        rna_def_modifier_curve_common(srna, TRUE, FALSE);
 
-       srna= RNA_def_struct(brna, "LineStyleAlphaModifier_DistanceFromObject", "LineStyleAlphaModifier");
+       srna = RNA_def_struct(brna, "LineStyleAlphaModifier_DistanceFromObject", "LineStyleAlphaModifier");
        RNA_def_struct_ui_text(srna, "Distance from Object",
                               "Change alpha transparency based on the distance from an object");
        rna_def_alpha_modifier(srna);
index 389ec426428f95d99bff2a5d898784cc3cee6497..6a43fed3ac69b0d6bf74973a3d98f989c348746f 100644 (file)
@@ -261,7 +261,7 @@ static void rna_Main_masks_begin(CollectionPropertyIterator *iter, PointerRNA *p
 
 static void rna_Main_linestyle_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
 {
-       Main *bmain = (Main*)ptr->data;
+       Main *bmain = (Main *)ptr->data;
        rna_iterator_listbase_begin(iter, &bmain->linestyle, NULL);
 }
 
index ba45e10ae08cd2b817b17d384d331766f7b05792..a2f9b554d3f7d12a31619f2d8f431cfd7c041300 100644 (file)
@@ -846,7 +846,7 @@ static void rna_Main_grease_pencil_remove(Main *bmain, ReportList *reports, Poin
                            gpd->id.name + 2, ID_REAL_USERS(gpd));
 }
 
-FreestyleLineStyle *rna_Main_linestyles_new(Main *bmain, const charname)
+FreestyleLineStyle *rna_Main_linestyles_new(Main *bmain, const char *name)
 {
        FreestyleLineStyle *linestyle = BKE_new_linestyle(name, bmain);
        id_us_min(&linestyle->id);
@@ -855,10 +855,11 @@ FreestyleLineStyle *rna_Main_linestyles_new(Main *bmain, const char* name)
 
 void rna_Main_linestyles_remove(Main *bmain, ReportList *reports, FreestyleLineStyle *linestyle)
 {
-       if(ID_REAL_USERS(linestyle) <= 0)
+       if (ID_REAL_USERS(linestyle) <= 0)
                BKE_libblock_free(&bmain->linestyle, linestyle);
        else
-               BKE_reportf(reports, RPT_ERROR, "Line style '%s' must have zero users to be removed, found %d", linestyle->id.name+2, ID_REAL_USERS(linestyle));
+               BKE_reportf(reports, RPT_ERROR, "Line style '%s' must have zero users to be removed, found %d",
+                           linestyle->id.name + 2, ID_REAL_USERS(linestyle));
 
        /* XXX python now has invalid pointer? */
 }
index 5cdd0a3935cda7b174a62d5e1fc789caed793e71..1843f44d1a19a63bee82f119b224b5a0c4bd6d8d 100644 (file)
@@ -1465,7 +1465,7 @@ static PointerRNA rna_FreestyleLineSet_linestyle_get(PointerRNA *ptr)
 
 static void rna_FreestyleLineSet_linestyle_set(PointerRNA *ptr, PointerRNA value)
 {
-       FreestyleLineSet *lineset = (FreestyleLineSet*)ptr->data;
+       FreestyleLineSet *lineset = (FreestyleLineSet *)ptr->data;
 
        lineset->linestyle->id.us--;
        lineset->linestyle = (FreestyleLineStyle *)value.data;
@@ -2434,7 +2434,7 @@ static void rna_def_freestyle_settings(BlenderRNA *brna)
                {0, NULL, 0, NULL, NULL}
        };
 
-       static EnumPropertyItem visibility_items[] ={
+       static EnumPropertyItem visibility_items[] = {
                {FREESTYLE_QI_VISIBLE, "VISIBLE", 0, "Visible", "Select visible feature edges"},
                {FREESTYLE_QI_HIDDEN, "HIDDEN", 0, "Hidden", "Select hidden feature edges"},
                {FREESTYLE_QI_RANGE, "RANGE", 0, "QI Range",
@@ -2473,7 +2473,7 @@ static void rna_def_freestyle_settings(BlenderRNA *brna)
         */
        prop = RNA_def_property(srna, "linestyle", PROP_POINTER, PROP_NONE);
        RNA_def_property_struct_type(prop, "FreestyleLineStyle");
-       RNA_def_property_flag(prop, PROP_EDITABLE|PROP_NEVER_NULL);
+       RNA_def_property_flag(prop, PROP_EDITABLE | PROP_NEVER_NULL);
        RNA_def_property_pointer_funcs(prop, "rna_FreestyleLineSet_linestyle_get",
                                       "rna_FreestyleLineSet_linestyle_set", NULL, NULL);
        RNA_def_property_ui_text(prop, "Line Style", "Line style settings");
@@ -3927,7 +3927,7 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
                {R_LINE_THICKNESS_ABSOLUTE, "ABSOLUTE", 0, "Absolute", "Specify unit line thickness in pixels"},
                {R_LINE_THICKNESS_RELATIVE, "RELATIVE", 0, "Relative",
                                            "Unit line thickness is scaled by the proportion of the present vertical image "
-                                    "resolution to 480 pixels"},
+                                           "resolution to 480 pixels"},
                {0, NULL, 0, NULL, NULL}};
 
        rna_def_scene_ffmpeg_settings(brna);