Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2016-03-22 09:18:35 +0300
committerCampbell Barton <ideasman42@gmail.com>2016-03-22 09:20:17 +0300
commit121e273bb3c9fedc8bf7ccbb7891f8c709f4c9b5 (patch)
tree58767093d6a50fff29fe9df88556e72c7b1c630e /source/blender/blenloader/intern/versioning_defaults.c
parent0f63ce61c52fce82f18df687369d513c3b6c19b1 (diff)
Cleanup: reduce scope for versioning vars
Diffstat (limited to 'source/blender/blenloader/intern/versioning_defaults.c')
-rw-r--r--source/blender/blenloader/intern/versioning_defaults.c56
1 files changed, 23 insertions, 33 deletions
diff --git a/source/blender/blenloader/intern/versioning_defaults.c b/source/blender/blenloader/intern/versioning_defaults.c
index 5b30aed01d2..e9d93a1a95d 100644
--- a/source/blender/blenloader/intern/versioning_defaults.c
+++ b/source/blender/blenloader/intern/versioning_defaults.c
@@ -75,17 +75,11 @@ void BLO_update_defaults_userpref_blend(void)
* This function can be emptied each time the startup.blend is updated. */
void BLO_update_defaults_startup_blend(Main *bmain)
{
- Scene *scene;
- SceneRenderLayer *srl;
- FreestyleLineStyle *linestyle;
- Mesh *me;
- Material *mat;
-
- for (scene = bmain->scene.first; scene; scene = scene->id.next) {
+ for (Scene *scene = bmain->scene.first; scene; scene = scene->id.next) {
scene->r.im_format.planes = R_IMF_PLANES_RGBA;
scene->r.im_format.compress = 15;
- for (srl = scene->r.layers.first; srl; srl = srl->next) {
+ for (SceneRenderLayer *srl = scene->r.layers.first; srl; srl = srl->next) {
srl->freestyleConfig.sphere_radius = 0.1f;
srl->pass_alpha_threshold = 0.5f;
}
@@ -158,7 +152,7 @@ void BLO_update_defaults_startup_blend(Main *bmain)
scene->r.ffcodecdata.audio_mixrate = 48000;
}
- for (linestyle = bmain->linestyle.first; linestyle; linestyle = linestyle->id.next) {
+ for (FreestyleLineStyle *linestyle = bmain->linestyle.first; linestyle; linestyle = linestyle->id.next) {
linestyle->flag = LS_SAME_OBJECT | LS_NO_SORTING | LS_TEXTURE;
linestyle->sort_key = LS_SORT_KEY_DISTANCE_FROM_CAMERA;
linestyle->integration_type = LS_INTEGRATION_MEAN;
@@ -166,42 +160,38 @@ void BLO_update_defaults_startup_blend(Main *bmain)
linestyle->chain_count = 10;
}
- {
- bScreen *screen;
-
- for (screen = bmain->screen.first; screen; screen = screen->id.next) {
- ScrArea *area;
- for (area = screen->areabase.first; area; area = area->next) {
- SpaceLink *space_link;
- ARegion *ar;
-
- for (space_link = area->spacedata.first; space_link; space_link = space_link->next) {
- if (space_link->spacetype == SPACE_CLIP) {
- SpaceClip *space_clip = (SpaceClip *) space_link;
- space_clip->flag &= ~SC_MANUAL_CALIBRATION;
- }
+ for (bScreen *screen = bmain->screen.first; screen; screen = screen->id.next) {
+ ScrArea *area;
+ for (area = screen->areabase.first; area; area = area->next) {
+ SpaceLink *space_link;
+ ARegion *ar;
+
+ for (space_link = area->spacedata.first; space_link; space_link = space_link->next) {
+ if (space_link->spacetype == SPACE_CLIP) {
+ SpaceClip *space_clip = (SpaceClip *) space_link;
+ space_clip->flag &= ~SC_MANUAL_CALIBRATION;
}
+ }
- for (ar = area->regionbase.first; ar; ar = ar->next) {
- /* Remove all stored panels, we want to use defaults (order, open/closed) as defined by UI code here! */
- BLI_freelistN(&ar->panels);
+ for (ar = area->regionbase.first; ar; ar = ar->next) {
+ /* Remove all stored panels, we want to use defaults (order, open/closed) as defined by UI code here! */
+ BLI_freelistN(&ar->panels);
- /* some toolbars have been saved as initialized,
- * we don't want them to have odd zoom-level or scrolling set, see: T47047 */
- if (ELEM(ar->regiontype, RGN_TYPE_UI, RGN_TYPE_TOOLS, RGN_TYPE_TOOL_PROPS)) {
- ar->v2d.flag &= ~V2D_IS_INITIALISED;
- }
+ /* some toolbars have been saved as initialized,
+ * we don't want them to have odd zoom-level or scrolling set, see: T47047 */
+ if (ELEM(ar->regiontype, RGN_TYPE_UI, RGN_TYPE_TOOLS, RGN_TYPE_TOOL_PROPS)) {
+ ar->v2d.flag &= ~V2D_IS_INITIALISED;
}
}
}
}
- for (me = bmain->mesh.first; me; me = me->id.next) {
+ for (Mesh *me = bmain->mesh.first; me; me = me->id.next) {
me->smoothresh = DEG2RADF(180.0f);
me->flag &= ~ME_TWOSIDED;
}
- for (mat = bmain->mat.first; mat; mat = mat->id.next) {
+ for (Material *mat = bmain->mat.first; mat; mat = mat->id.next) {
mat->line_col[0] = mat->line_col[1] = mat->line_col[2] = 0.0f;
mat->line_col[3] = 1.0f;
}