diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-11-30 06:20:41 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-11-30 06:23:10 +0300 |
commit | 0b044a4ab2c9d18f0561e15dddaa790bfad6ab48 (patch) | |
tree | d53d13a2016ebe5fc775365097981a1f23679e31 /source/blender/blenloader/intern/versioning_250.c | |
parent | dd8469608bc80369929cc7ddb95b553ecbe20e88 (diff) |
Cleanup: style
Diffstat (limited to 'source/blender/blenloader/intern/versioning_250.c')
-rw-r--r-- | source/blender/blenloader/intern/versioning_250.c | 482 |
1 files changed, 241 insertions, 241 deletions
diff --git a/source/blender/blenloader/intern/versioning_250.c b/source/blender/blenloader/intern/versioning_250.c index 28720ef5145..28ab7b2842e 100644 --- a/source/blender/blenloader/intern/versioning_250.c +++ b/source/blender/blenloader/intern/versioning_250.c @@ -108,11 +108,11 @@ static void area_add_header_region(ScrArea *sa, ListBase *lb) /* initialize view2d data for header region, to allow panning */ /* is copy from ui_view2d.c */ - ar->v2d.keepzoom = (V2D_LOCKZOOM_X|V2D_LOCKZOOM_Y|V2D_LIMITZOOM|V2D_KEEPASPECT); + ar->v2d.keepzoom = (V2D_LOCKZOOM_X | V2D_LOCKZOOM_Y | V2D_LIMITZOOM | V2D_KEEPASPECT); ar->v2d.keepofs = V2D_LOCKOFS_Y; ar->v2d.keeptot = V2D_KEEPTOT_STRICT; - ar->v2d.align = V2D_ALIGN_NO_NEG_X|V2D_ALIGN_NO_NEG_Y; - ar->v2d.flag = (V2D_PIXELOFS_X|V2D_PIXELOFS_Y); + ar->v2d.align = V2D_ALIGN_NO_NEG_X | V2D_ALIGN_NO_NEG_Y; + ar->v2d.flag = (V2D_PIXELOFS_X | V2D_PIXELOFS_Y); } static void sequencer_init_preview_region(ARegion *ar) @@ -151,7 +151,7 @@ static void area_add_window_regions(ScrArea *sa, SpaceLink *sl, ListBase *lb) BLI_addtail(lb, ar); ar->regiontype = RGN_TYPE_CHANNELS; ar->alignment = RGN_ALIGN_LEFT; - ar->v2d.scroll = (V2D_SCROLL_RIGHT|V2D_SCROLL_BOTTOM); + ar->v2d.scroll = (V2D_SCROLL_RIGHT | V2D_SCROLL_BOTTOM); /* for some reason, this doesn't seem to go auto like for NLA... */ ar = MEM_callocN(sizeof(ARegion), "area region from do_versions"); @@ -193,7 +193,7 @@ static void area_add_window_regions(ScrArea *sa, SpaceLink *sl, ListBase *lb) BLI_addtail(lb, ar); ar->regiontype = RGN_TYPE_UI; ar->alignment = RGN_ALIGN_LEFT; - ar->v2d.scroll = (V2D_SCROLL_RIGHT|V2D_SCROLL_BOTTOM); + ar->v2d.scroll = (V2D_SCROLL_RIGHT | V2D_SCROLL_BOTTOM); ar->v2d.flag = V2D_VIEWSYNC_AREA_VERTICAL; /* temporarily hide it */ ar->flag = RGN_FLAG_HIDDEN; @@ -210,7 +210,7 @@ static void area_add_window_regions(ScrArea *sa, SpaceLink *sl, ListBase *lb) ar->alignment = RGN_ALIGN_TOP; break; case SPACE_SEQ: - ar_main = (ARegion*) lb->first; + ar_main = (ARegion *)lb->first; for (; ar_main; ar_main = ar_main->next) { if (ar_main->regiontype == RGN_TYPE_WINDOW) break; @@ -233,7 +233,7 @@ static void area_add_window_regions(ScrArea *sa, SpaceLink *sl, ListBase *lb) BLI_addtail(lb, ar); ar->regiontype = RGN_TYPE_TOOL_PROPS; - ar->alignment = RGN_ALIGN_BOTTOM|RGN_SPLIT_PREV; + ar->alignment = RGN_ALIGN_BOTTOM | RGN_SPLIT_PREV; ar->flag = RGN_FLAG_HIDDEN; /* buttons/list view */ @@ -273,145 +273,145 @@ static void area_add_window_regions(ScrArea *sa, SpaceLink *sl, ListBase *lb) break; case SPACE_OUTLINER: - { - SpaceOops *soops = (SpaceOops *)sl; + { + SpaceOops *soops = (SpaceOops *)sl; - memcpy(&ar->v2d, &soops->v2d, sizeof(View2D)); + memcpy(&ar->v2d, &soops->v2d, sizeof(View2D)); - ar->v2d.scroll &= ~V2D_SCROLL_LEFT; - ar->v2d.scroll |= (V2D_SCROLL_RIGHT|V2D_SCROLL_BOTTOM); - ar->v2d.align = (V2D_ALIGN_NO_NEG_X|V2D_ALIGN_NO_POS_Y); - ar->v2d.keepzoom |= (V2D_LOCKZOOM_X|V2D_LOCKZOOM_Y|V2D_KEEPASPECT); - ar->v2d.keeptot = V2D_KEEPTOT_STRICT; - ar->v2d.minzoom = ar->v2d.maxzoom = 1.0f; - //ar->v2d.flag |= V2D_IS_INITIALISED; - } + ar->v2d.scroll &= ~V2D_SCROLL_LEFT; + ar->v2d.scroll |= (V2D_SCROLL_RIGHT | V2D_SCROLL_BOTTOM); + ar->v2d.align = (V2D_ALIGN_NO_NEG_X | V2D_ALIGN_NO_POS_Y); + ar->v2d.keepzoom |= (V2D_LOCKZOOM_X | V2D_LOCKZOOM_Y | V2D_KEEPASPECT); + ar->v2d.keeptot = V2D_KEEPTOT_STRICT; + ar->v2d.minzoom = ar->v2d.maxzoom = 1.0f; + //ar->v2d.flag |= V2D_IS_INITIALISED; break; + } case SPACE_TIME: - { - SpaceTime *stime = (SpaceTime *)sl; - memcpy(&ar->v2d, &stime->v2d, sizeof(View2D)); - - ar->v2d.scroll |= (V2D_SCROLL_BOTTOM|V2D_SCROLL_SCALE_HORIZONTAL); - ar->v2d.align |= V2D_ALIGN_NO_NEG_Y; - ar->v2d.keepofs |= V2D_LOCKOFS_Y; - ar->v2d.keepzoom |= V2D_LOCKZOOM_Y; - ar->v2d.tot.ymin = ar->v2d.cur.ymin = -10.0; - ar->v2d.min[1] = ar->v2d.max[1] = 20.0; - } + { + SpaceTime *stime = (SpaceTime *)sl; + memcpy(&ar->v2d, &stime->v2d, sizeof(View2D)); + + ar->v2d.scroll |= (V2D_SCROLL_BOTTOM | V2D_SCROLL_SCALE_HORIZONTAL); + ar->v2d.align |= V2D_ALIGN_NO_NEG_Y; + ar->v2d.keepofs |= V2D_LOCKOFS_Y; + ar->v2d.keepzoom |= V2D_LOCKZOOM_Y; + ar->v2d.tot.ymin = ar->v2d.cur.ymin = -10.0; + ar->v2d.min[1] = ar->v2d.max[1] = 20.0; break; + } case SPACE_IPO: - { - SpaceIpo *sipo = (SpaceIpo *)sl; - memcpy(&ar->v2d, &sipo->v2d, sizeof(View2D)); + { + SpaceIpo *sipo = (SpaceIpo *)sl; + memcpy(&ar->v2d, &sipo->v2d, sizeof(View2D)); - /* init mainarea view2d */ - ar->v2d.scroll |= (V2D_SCROLL_BOTTOM|V2D_SCROLL_SCALE_HORIZONTAL); - ar->v2d.scroll |= (V2D_SCROLL_LEFT|V2D_SCROLL_SCALE_VERTICAL); + /* init mainarea view2d */ + ar->v2d.scroll |= (V2D_SCROLL_BOTTOM | V2D_SCROLL_SCALE_HORIZONTAL); + ar->v2d.scroll |= (V2D_SCROLL_LEFT | V2D_SCROLL_SCALE_VERTICAL); - ar->v2d.min[0] = FLT_MIN; - ar->v2d.min[1] = FLT_MIN; + ar->v2d.min[0] = FLT_MIN; + ar->v2d.min[1] = FLT_MIN; - ar->v2d.max[0] = MAXFRAMEF; - ar->v2d.max[1] = FLT_MAX; + ar->v2d.max[0] = MAXFRAMEF; + ar->v2d.max[1] = FLT_MAX; - //ar->v2d.flag |= V2D_IS_INITIALISED; - break; - } + //ar->v2d.flag |= V2D_IS_INITIALISED; + break; + } case SPACE_NLA: - { - SpaceNla *snla = (SpaceNla *)sl; - memcpy(&ar->v2d, &snla->v2d, sizeof(View2D)); + { + SpaceNla *snla = (SpaceNla *)sl; + memcpy(&ar->v2d, &snla->v2d, sizeof(View2D)); - ar->v2d.tot.ymin = (float)(-sa->winy) / 3.0f; - ar->v2d.tot.ymax = 0.0f; + ar->v2d.tot.ymin = (float)(-sa->winy) / 3.0f; + ar->v2d.tot.ymax = 0.0f; - ar->v2d.scroll |= (V2D_SCROLL_BOTTOM|V2D_SCROLL_SCALE_HORIZONTAL); - ar->v2d.scroll |= (V2D_SCROLL_RIGHT); - ar->v2d.align = V2D_ALIGN_NO_POS_Y; - ar->v2d.flag |= V2D_VIEWSYNC_AREA_VERTICAL; - break; - } + ar->v2d.scroll |= (V2D_SCROLL_BOTTOM | V2D_SCROLL_SCALE_HORIZONTAL); + ar->v2d.scroll |= (V2D_SCROLL_RIGHT); + ar->v2d.align = V2D_ALIGN_NO_POS_Y; + ar->v2d.flag |= V2D_VIEWSYNC_AREA_VERTICAL; + break; + } case SPACE_ACTION: - { - SpaceAction *saction = (SpaceAction *) sl; - - /* we totally reinit the view for the Action Editor, as some old instances had some weird cruft set */ - ar->v2d.tot.xmin = -20.0f; - ar->v2d.tot.ymin = (float)(-sa->winy) / 3.0f; - ar->v2d.tot.xmax = (float)((sa->winx > 120) ? (sa->winx) : 120); - ar->v2d.tot.ymax = 0.0f; - - ar->v2d.cur = ar->v2d.tot; - - ar->v2d.min[0] = 0.0f; - ar->v2d.min[1] = 0.0f; - - ar->v2d.max[0] = MAXFRAMEF; - ar->v2d.max[1] = FLT_MAX; - - ar->v2d.minzoom = 0.01f; - ar->v2d.maxzoom = 50; - ar->v2d.scroll = (V2D_SCROLL_BOTTOM|V2D_SCROLL_SCALE_HORIZONTAL); - ar->v2d.scroll |= (V2D_SCROLL_RIGHT); - ar->v2d.keepzoom = V2D_LOCKZOOM_Y; - ar->v2d.align = V2D_ALIGN_NO_POS_Y; - ar->v2d.flag = V2D_VIEWSYNC_AREA_VERTICAL; - - /* for old files with ShapeKey editors open + an action set, clear the action as - * it doesn't make sense in the new system (i.e. violates concept that ShapeKey edit - * only shows ShapeKey-rooted actions only) - */ - if (saction->mode == SACTCONT_SHAPEKEY) - saction->action = NULL; - break; - } + { + SpaceAction *saction = (SpaceAction *)sl; + + /* we totally reinit the view for the Action Editor, as some old instances had some weird cruft set */ + ar->v2d.tot.xmin = -20.0f; + ar->v2d.tot.ymin = (float)(-sa->winy) / 3.0f; + ar->v2d.tot.xmax = (float)((sa->winx > 120) ? (sa->winx) : 120); + ar->v2d.tot.ymax = 0.0f; + + ar->v2d.cur = ar->v2d.tot; + + ar->v2d.min[0] = 0.0f; + ar->v2d.min[1] = 0.0f; + + ar->v2d.max[0] = MAXFRAMEF; + ar->v2d.max[1] = FLT_MAX; + + ar->v2d.minzoom = 0.01f; + ar->v2d.maxzoom = 50; + ar->v2d.scroll = (V2D_SCROLL_BOTTOM | V2D_SCROLL_SCALE_HORIZONTAL); + ar->v2d.scroll |= (V2D_SCROLL_RIGHT); + ar->v2d.keepzoom = V2D_LOCKZOOM_Y; + ar->v2d.align = V2D_ALIGN_NO_POS_Y; + ar->v2d.flag = V2D_VIEWSYNC_AREA_VERTICAL; + + /* for old files with ShapeKey editors open + an action set, clear the action as + * it doesn't make sense in the new system (i.e. violates concept that ShapeKey edit + * only shows ShapeKey-rooted actions only) + */ + if (saction->mode == SACTCONT_SHAPEKEY) + saction->action = NULL; + break; + } case SPACE_SEQ: - { - SpaceSeq *sseq = (SpaceSeq *)sl; - memcpy(&ar->v2d, &sseq->v2d, sizeof(View2D)); + { + SpaceSeq *sseq = (SpaceSeq *)sl; + memcpy(&ar->v2d, &sseq->v2d, sizeof(View2D)); - ar->v2d.scroll |= (V2D_SCROLL_BOTTOM|V2D_SCROLL_SCALE_HORIZONTAL); - ar->v2d.scroll |= (V2D_SCROLL_LEFT|V2D_SCROLL_SCALE_VERTICAL); - ar->v2d.align = V2D_ALIGN_NO_NEG_Y; - ar->v2d.flag |= V2D_IS_INITIALISED; - break; - } + ar->v2d.scroll |= (V2D_SCROLL_BOTTOM | V2D_SCROLL_SCALE_HORIZONTAL); + ar->v2d.scroll |= (V2D_SCROLL_LEFT | V2D_SCROLL_SCALE_VERTICAL); + ar->v2d.align = V2D_ALIGN_NO_NEG_Y; + ar->v2d.flag |= V2D_IS_INITIALISED; + break; + } case SPACE_NODE: - { - SpaceNode *snode = (SpaceNode *)sl; - memcpy(&ar->v2d, &snode->v2d, sizeof(View2D)); + { + SpaceNode *snode = (SpaceNode *)sl; + memcpy(&ar->v2d, &snode->v2d, sizeof(View2D)); - ar->v2d.scroll = (V2D_SCROLL_RIGHT|V2D_SCROLL_BOTTOM); - ar->v2d.keepzoom = V2D_LIMITZOOM|V2D_KEEPASPECT; - break; - } + ar->v2d.scroll = (V2D_SCROLL_RIGHT | V2D_SCROLL_BOTTOM); + ar->v2d.keepzoom = V2D_LIMITZOOM | V2D_KEEPASPECT; + break; + } case SPACE_BUTS: - { - SpaceButs *sbuts = (SpaceButs *)sl; - memcpy(&ar->v2d, &sbuts->v2d, sizeof(View2D)); + { + SpaceButs *sbuts = (SpaceButs *)sl; + memcpy(&ar->v2d, &sbuts->v2d, sizeof(View2D)); - ar->v2d.scroll |= (V2D_SCROLL_RIGHT|V2D_SCROLL_BOTTOM); - break; - } + ar->v2d.scroll |= (V2D_SCROLL_RIGHT | V2D_SCROLL_BOTTOM); + break; + } case SPACE_FILE: - { - // SpaceFile *sfile = (SpaceFile *)sl; - ar->v2d.tot.xmin = ar->v2d.tot.ymin = 0; - ar->v2d.tot.xmax = ar->winx; - ar->v2d.tot.ymax = ar->winy; - ar->v2d.cur = ar->v2d.tot; - ar->regiontype = RGN_TYPE_WINDOW; - ar->v2d.scroll = (V2D_SCROLL_RIGHT|V2D_SCROLL_BOTTOM); - ar->v2d.align = (V2D_ALIGN_NO_NEG_X|V2D_ALIGN_NO_POS_Y); - ar->v2d.keepzoom = (V2D_LOCKZOOM_X|V2D_LOCKZOOM_Y|V2D_LIMITZOOM|V2D_KEEPASPECT); - break; - } + { + // SpaceFile *sfile = (SpaceFile *)sl; + ar->v2d.tot.xmin = ar->v2d.tot.ymin = 0; + ar->v2d.tot.xmax = ar->winx; + ar->v2d.tot.ymax = ar->winy; + ar->v2d.cur = ar->v2d.tot; + ar->regiontype = RGN_TYPE_WINDOW; + ar->v2d.scroll = (V2D_SCROLL_RIGHT | V2D_SCROLL_BOTTOM); + ar->v2d.align = (V2D_ALIGN_NO_NEG_X | V2D_ALIGN_NO_POS_Y); + ar->v2d.keepzoom = (V2D_LOCKZOOM_X | V2D_LOCKZOOM_Y | V2D_LIMITZOOM | V2D_KEEPASPECT); + break; + } case SPACE_TEXT: - { - SpaceText *st = (SpaceText *)sl; - st->flags |= ST_FIND_WRAP; - } + { + SpaceText *st = (SpaceText *)sl; + st->flags |= ST_FIND_WRAP; + } //case SPACE_XXX: // FIXME... add other ones // memcpy(&ar->v2d, &((SpaceXxx *)sl)->v2d, sizeof(View2D)); // break; @@ -435,13 +435,13 @@ static void do_versions_windowmanager_2_50(bScreen *screen) /* space imageselect is deprecated */ for (sl = sa->spacedata.first; sl; sl = sl->next) { if (sl->spacetype == SPACE_IMASEL) - sl->spacetype = SPACE_EMPTY; /* spacedata then matches */ + sl->spacetype = SPACE_EMPTY; /* spacedata then matches */ } /* space sound is deprecated */ for (sl = sa->spacedata.first; sl; sl = sl->next) { if (sl->spacetype == SPACE_SOUND) - sl->spacetype = SPACE_EMPTY; /* spacedata then matches */ + sl->spacetype = SPACE_EMPTY; /* spacedata then matches */ } /* it seems to be possible in 2.5 to have this saved, filewindow probably */ @@ -464,7 +464,7 @@ static void versions_gpencil_add_main(ListBase *lb, ID *id, const char *name) BLI_addtail(lb, id); id->us = 1; id->flag = LIB_FAKEUSER; - *( (short *)id->name )= ID_GD; + *( (short *)id->name) = ID_GD; new_id(lb, id, name); /* alphabetic insertion: is in new_id */ @@ -482,29 +482,29 @@ static void do_versions_gpencil_2_50(Main *main, bScreen *screen) for (sa = screen->areabase.first; sa; sa = sa->next) { for (sl = sa->spacedata.first; sl; sl = sl->next) { if (sl->spacetype == SPACE_VIEW3D) { - View3D *v3d = (View3D*) sl; + View3D *v3d = (View3D *)sl; if (v3d->gpd) { versions_gpencil_add_main(&main->gpencil, (ID *)v3d->gpd, "GPencil View3D"); v3d->gpd = NULL; } } else if (sl->spacetype == SPACE_NODE) { - SpaceNode *snode = (SpaceNode *) sl; + SpaceNode *snode = (SpaceNode *)sl; if (snode->gpd) { versions_gpencil_add_main(&main->gpencil, (ID *)snode->gpd, "GPencil Node"); snode->gpd = NULL; } } else if (sl->spacetype == SPACE_SEQ) { - SpaceSeq *sseq = (SpaceSeq *) sl; + SpaceSeq *sseq = (SpaceSeq *)sl; if (sseq->gpd) { versions_gpencil_add_main(&main->gpencil, (ID *)sseq->gpd, "GPencil Node"); sseq->gpd = NULL; } } else if (sl->spacetype == SPACE_IMAGE) { - SpaceImage *sima = (SpaceImage *) sl; -#if 0 /* see comment on r28002 */ + SpaceImage *sima = (SpaceImage *)sl; +#if 0 /* see comment on r28002 */ if (sima->gpd) { versions_gpencil_add_main(&main->gpencil, (ID *)sima->gpd, "GPencil Image"); sima->gpd = NULL; @@ -538,45 +538,45 @@ static void do_version_mtex_factor_2_50(MTex **mtex_array, short idtype) if (neg & MAP_NORM) mtex->norfac = -mtex->norfac; if (neg & MAP_WARP) mtex->warpfac = -mtex->warpfac; - mtex->colspecfac = (neg & MAP_COLSPEC)? -colfac: colfac; - mtex->mirrfac = (neg & MAP_COLMIR)? -colfac: colfac; - mtex->alphafac = (neg & MAP_ALPHA)? -varfac: varfac; - mtex->difffac = (neg & MAP_REF)? -varfac: varfac; - mtex->specfac = (neg & MAP_SPEC)? -varfac: varfac; - mtex->emitfac = (neg & MAP_EMIT)? -varfac: varfac; - mtex->hardfac = (neg & MAP_HAR)? -varfac: varfac; - mtex->raymirrfac = (neg & MAP_RAYMIRR)? -varfac: varfac; - mtex->translfac = (neg & MAP_TRANSLU)? -varfac: varfac; - mtex->ambfac = (neg & MAP_AMB)? -varfac: varfac; - mtex->colemitfac = (neg & MAP_EMISSION_COL)? -colfac: colfac; - mtex->colreflfac = (neg & MAP_REFLECTION_COL)? -colfac: colfac; - mtex->coltransfac = (neg & MAP_TRANSMISSION_COL)? -colfac: colfac; - mtex->densfac = (neg & MAP_DENSITY)? -varfac: varfac; - mtex->scatterfac = (neg & MAP_SCATTERING)? -varfac: varfac; - mtex->reflfac = (neg & MAP_REFLECTION)? -varfac: varfac; - - mtex->timefac = (neg & MAP_PA_TIME)? -varfac: varfac; - mtex->lengthfac = (neg & MAP_PA_LENGTH)? -varfac: varfac; - mtex->clumpfac = (neg & MAP_PA_CLUMP)? -varfac: varfac; - mtex->kinkfac = (neg & MAP_PA_KINK)? -varfac: varfac; - mtex->roughfac = (neg & MAP_PA_ROUGH)? -varfac: varfac; - mtex->padensfac = (neg & MAP_PA_DENS)? -varfac: varfac; - mtex->lifefac = (neg & MAP_PA_LIFE)? -varfac: varfac; - mtex->sizefac = (neg & MAP_PA_SIZE)? -varfac: varfac; - mtex->ivelfac = (neg & MAP_PA_IVEL)? -varfac: varfac; - - mtex->shadowfac = (neg & LAMAP_SHAD)? -colfac: colfac; - - mtex->zenupfac = (neg & WOMAP_ZENUP)? -colfac: colfac; - mtex->zendownfac = (neg & WOMAP_ZENDOWN)? -colfac: colfac; - mtex->blendfac = (neg & WOMAP_BLEND)? -varfac: varfac; + mtex->colspecfac = (neg & MAP_COLSPEC) ? -colfac : colfac; + mtex->mirrfac = (neg & MAP_COLMIR) ? -colfac : colfac; + mtex->alphafac = (neg & MAP_ALPHA) ? -varfac : varfac; + mtex->difffac = (neg & MAP_REF) ? -varfac : varfac; + mtex->specfac = (neg & MAP_SPEC) ? -varfac : varfac; + mtex->emitfac = (neg & MAP_EMIT) ? -varfac : varfac; + mtex->hardfac = (neg & MAP_HAR) ? -varfac : varfac; + mtex->raymirrfac = (neg & MAP_RAYMIRR) ? -varfac : varfac; + mtex->translfac = (neg & MAP_TRANSLU) ? -varfac : varfac; + mtex->ambfac = (neg & MAP_AMB) ? -varfac : varfac; + mtex->colemitfac = (neg & MAP_EMISSION_COL) ? -colfac : colfac; + mtex->colreflfac = (neg & MAP_REFLECTION_COL) ? -colfac : colfac; + mtex->coltransfac = (neg & MAP_TRANSMISSION_COL) ? -colfac : colfac; + mtex->densfac = (neg & MAP_DENSITY) ? -varfac : varfac; + mtex->scatterfac = (neg & MAP_SCATTERING) ? -varfac : varfac; + mtex->reflfac = (neg & MAP_REFLECTION) ? -varfac : varfac; + + mtex->timefac = (neg & MAP_PA_TIME) ? -varfac : varfac; + mtex->lengthfac = (neg & MAP_PA_LENGTH) ? -varfac : varfac; + mtex->clumpfac = (neg & MAP_PA_CLUMP) ? -varfac : varfac; + mtex->kinkfac = (neg & MAP_PA_KINK) ? -varfac : varfac; + mtex->roughfac = (neg & MAP_PA_ROUGH) ? -varfac : varfac; + mtex->padensfac = (neg & MAP_PA_DENS) ? -varfac : varfac; + mtex->lifefac = (neg & MAP_PA_LIFE) ? -varfac : varfac; + mtex->sizefac = (neg & MAP_PA_SIZE) ? -varfac : varfac; + mtex->ivelfac = (neg & MAP_PA_IVEL) ? -varfac : varfac; + + mtex->shadowfac = (neg & LAMAP_SHAD) ? -colfac : colfac; + + mtex->zenupfac = (neg & WOMAP_ZENUP) ? -colfac : colfac; + mtex->zendownfac = (neg & WOMAP_ZENDOWN) ? -colfac : colfac; + mtex->blendfac = (neg & WOMAP_BLEND) ? -varfac : varfac; if (idtype == ID_MA) - mtex->colfac = (neg & MAP_COL)? -colfac: colfac; + mtex->colfac = (neg & MAP_COL) ? -colfac : colfac; else if (idtype == ID_LA) - mtex->colfac = (neg & LAMAP_COL)? -colfac: colfac; + mtex->colfac = (neg & LAMAP_COL) ? -colfac : colfac; else if (idtype == ID_WO) - mtex->colfac = (neg & WOMAP_HORIZ)? -colfac: colfac; + mtex->colfac = (neg & WOMAP_HORIZ) ? -colfac : colfac; } } } @@ -590,7 +590,7 @@ static void do_version_mdef_250(Main *main) for (ob = main->object.first; ob; ob = ob->id.next) { for (md = ob->modifiers.first; md; md = md->next) { if (md->type == eModifierType_MeshDeform) { - mmd = (MeshDeformModifierData*) md; + mmd = (MeshDeformModifierData *)md; if (mmd->bindcos) { /* make bindcos NULL in order to trick older versions @@ -665,14 +665,14 @@ static bNodeSocket *do_versions_node_group_add_socket_2_56_2(bNodeTree *ngroup, gsock->link = NULL; /* assign new unique index */ gsock->own_index = ngroup->cur_index++; - gsock->limit = (in_out==SOCK_IN ? 0xFFF : 1); + gsock->limit = (in_out == SOCK_IN ? 0xFFF : 1); // if (stype->value_structsize > 0) // gsock->default_value = MEM_callocN(stype->value_structsize, "default socket value"); - BLI_addtail(in_out==SOCK_IN ? &ngroup->inputs : &ngroup->outputs, gsock); + BLI_addtail(in_out == SOCK_IN ? &ngroup->inputs : &ngroup->outputs, gsock); - ngroup->update |= (in_out==SOCK_IN ? NTREE_UPDATE_GROUP_IN : NTREE_UPDATE_GROUP_OUT); + ngroup->update |= (in_out == SOCK_IN ? NTREE_UPDATE_GROUP_IN : NTREE_UPDATE_GROUP_OUT); return gsock; } @@ -749,7 +749,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain) for (ob = bmain->object.first; ob; ob = ob->id.next) { for (act = ob->actuators.first; act; act = act->next) { if (act->type == ACT_SOUND) { - bSoundActuator *sAct = (bSoundActuator*) act->data; + bSoundActuator *sAct = (bSoundActuator *)act->data; if (sAct->sound) { sound = blo_do_versions_newlibadr(fd, lib, sAct->sound); sAct->flag = (sound->flags & SOUND_FLAGS_3D) ? ACT_SND_3D_SOUND : 0; @@ -775,7 +775,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain) for (scene = bmain->scene.first; scene; scene = scene->id.next) { if (scene->ed && scene->ed->seqbasep) { - SEQ_BEGIN (scene->ed, seq) + SEQ_BEGIN(scene->ed, seq) { if (seq->type == SEQ_TYPE_SOUND_HD) { char str[FILE_MAX]; @@ -787,7 +787,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain) #define SEQ_USE_PROXY_CUSTOM_FILE (1 << 21) /* don't know, if anybody used that this way, but just in case, upgrade to new way... */ if ((seq->flag & SEQ_USE_PROXY_CUSTOM_FILE) && - !(seq->flag & SEQ_USE_PROXY_CUSTOM_DIR)) + !(seq->flag & SEQ_USE_PROXY_CUSTOM_DIR)) { BLI_snprintf(seq->strip->proxy->dir, FILE_MAXDIR, "%s/BL_proxy", seq->strip->dir); } @@ -857,7 +857,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain) /* copy standard draw flag to meshes(used to be global, is not available here) */ for (me = bmain->mesh.first; me; me = me->id.next) { - me->drawflag = ME_DRAWEDGES|ME_DRAWFACES|ME_DRAWCREASES; + me->drawflag = ME_DRAWEDGES | ME_DRAWFACES | ME_DRAWCREASES; } /* particle draw and render types */ @@ -939,7 +939,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain) ob->matbits = MEM_calloc_arrayN(ob->totcol, sizeof(char), "ob->matbits"); for (a = 0; a < ob->totcol; a++) - ob->matbits[a] = (ob->colbits & (1<<a)) != 0; + ob->matbits[a] = (ob->colbits & (1 << a)) != 0; } } @@ -962,7 +962,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain) ma->mode &= ~MA_HALO; } - if (ma->mode & (MA_ZTRANSP|MA_RAYTRANSP)) { + if (ma->mode & (MA_ZTRANSP | MA_RAYTRANSP)) { ma->mode |= MA_TRANSP; } else { @@ -979,7 +979,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain) ma->mtex[a]->texflag |= MTEX_BUMP_OBJECTSPACE; } else { - tex = (Tex*) blo_do_versions_newlibadr(fd, ma->id.lib, tex); + tex = (Tex *)blo_do_versions_newlibadr(fd, ma->id.lib, tex); if (tex && tex->type == 0) { /* invalid type */ ma->mtex[a]->texflag |= MTEX_3TAP_BUMP; ma->mtex[a]->texflag |= MTEX_BUMP_OBJECTSPACE; @@ -1060,9 +1060,9 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain) sce->gm.depth = sce->r.depth; /* Physic (previously stored in world) */ - sce->gm.gravity =9.8f; + sce->gm.gravity = 9.8f; sce->gm.physicsEngine = WOPHY_BULLET; /* Bullet by default */ - sce->gm.mode = WO_DBVT_CULLING; /* DBVT culling by default */ + sce->gm.mode = WO_DBVT_CULLING; /* DBVT culling by default */ sce->gm.occlusionRes = 128; sce->gm.ticrate = 60; sce->gm.maxlogicstep = 5; @@ -1131,7 +1131,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain) for (ob = bmain->object.first; ob; ob = ob->id.next) { /* fluid-sim stuff */ - FluidsimModifierData *fluidmd = (FluidsimModifierData *) modifiers_findByType(ob, eModifierType_Fluidsim); + FluidsimModifierData *fluidmd = (FluidsimModifierData *)modifiers_findByType(ob, eModifierType_Fluidsim); if (fluidmd) fluidmd->fss->fmd = fluidmd; @@ -1186,7 +1186,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain) /* Assign proper global gravity weights for dynamics (only z-coordinate is taken into account) */ if (do_gravity) { for (part = bmain->particle.first; part; part = part->id.next) - part->effector_weights->global_gravity = part->acc[2]/-9.81f; + part->effector_weights->global_gravity = part->acc[2] / -9.81f; } for (ob = bmain->object.first; ob; ob = ob->id.next) { @@ -1194,13 +1194,13 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain) if (do_gravity) { for (md = ob->modifiers.first; md; md = md->next) { - ClothModifierData *clmd = (ClothModifierData *) modifiers_findByType(ob, eModifierType_Cloth); + ClothModifierData *clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth); if (clmd) - clmd->sim_parms->effector_weights->global_gravity = clmd->sim_parms->gravity[2]/-9.81f; + clmd->sim_parms->effector_weights->global_gravity = clmd->sim_parms->gravity[2] / -9.81f; } if (ob->soft) - ob->soft->effector_weights->global_gravity = ob->soft->grav/9.81f; + ob->soft->effector_weights->global_gravity = ob->soft->grav / 9.81f; } /* Normal wind shape is plane */ @@ -1268,7 +1268,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain) for (lt = bmain->latt.first; lt; lt = lt->id.next) { if ((key = blo_do_versions_newlibadr(fd, lib, lt->key)) && key->refkey) { data = key->refkey->data; - tot = MIN2(lt->pntsu*lt->pntsv*lt->pntsw, key->refkey->totelem); + tot = MIN2(lt->pntsu * lt->pntsv * lt->pntsw, key->refkey->totelem); for (a = 0; a < tot; a++, data += 3) copy_v3_v3(lt->def[a].vec, data); @@ -1284,16 +1284,16 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain) BezTriple *bezt = nu->bezt; for (a = 0; a < nu->pntsu; a++, bezt++) { - copy_v3_v3(bezt->vec[0], data); data+=3; - copy_v3_v3(bezt->vec[1], data); data+=3; - copy_v3_v3(bezt->vec[2], data); data+=3; + copy_v3_v3(bezt->vec[0], data); data += 3; + copy_v3_v3(bezt->vec[1], data); data += 3; + copy_v3_v3(bezt->vec[2], data); data += 3; bezt->alfa = *data; data++; } } else if (nu->bp) { BPoint *bp = nu->bp; - for (a = 0; a < nu->pntsu*nu->pntsv; a++, bp++) { + for (a = 0; a < nu->pntsu * nu->pntsv; a++, bp++) { copy_v3_v3(bp->vec, data); data += 3; bp->alfa = *data; data++; } @@ -1350,7 +1350,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain) for (sa = screen->areabase.first; sa; sa = sa->next) { for (sl = sa->spacedata.first; sl; sl = sl->next) { if (sl->spacetype == SPACE_VIEW3D) { - View3D *v3d = (View3D *) sl; + View3D *v3d = (View3D *)sl; if (v3d->drawtype == OB_MATERIAL) v3d->drawtype = OB_SOLID; } @@ -1439,7 +1439,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain) multires_load_old_250(me); for (ob = bmain->object.first; ob; ob = ob->id.next) { - MultiresModifierData *mmd = (MultiresModifierData *) modifiers_findByType(ob, eModifierType_Multires); + MultiresModifierData *mmd = (MultiresModifierData *)modifiers_findByType(ob, eModifierType_Multires); if (mmd) { mmd->totlvl--; @@ -1533,7 +1533,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain) if (sseq->mainb == 0) sseq->mainb = SEQ_DRAW_IMG_IMBUF; - ar_main = (ARegion*)regionbase->first; + ar_main = (ARegion *)regionbase->first; for (; ar_main; ar_main = ar_main->next) { if (ar_main->regiontype == RGN_TYPE_WINDOW) break; @@ -1693,7 +1693,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain) regionbase = &sl->regionbase; if (ELEM(sl->spacetype, SPACE_ACTION, SPACE_NLA)) { - for (ar = (ARegion*) regionbase->first; ar; ar = ar->next) { + for (ar = (ARegion *)regionbase->first; ar; ar = ar->next) { if (ar->regiontype == RGN_TYPE_WINDOW) { ar->v2d.cur.ymax = ar->v2d.tot.ymax = 0.0f; ar->v2d.cur.ymin = ar->v2d.tot.ymin = (float)(-sa->winy) / 3.0f; @@ -1795,7 +1795,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain) regionbase = &sl->regionbase; } - ar_preview = (ARegion*) regionbase->first; + ar_preview = (ARegion *)regionbase->first; for (; ar_preview; ar_preview = ar_preview->next) { if (ar_preview->regiontype == RGN_TYPE_PREVIEW) break; @@ -1810,7 +1810,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain) } /* sequencer changes */ } - if (bmain->versionfile <= 251) { /* 2.5.1 had no subversions */ + if (bmain->versionfile <= 251) { /* 2.5.1 had no subversions */ bScreen *sc; /* Blender 2.5.2 - subversion 0 introduced a new setting: V3D_RENDER_OVERRIDE. @@ -1847,7 +1847,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain) ModifierData *md; for (md = ob->modifiers.first; md; md = md->next) { if (md->type == eModifierType_Fluidsim) { - FluidsimModifierData *fmd = (FluidsimModifierData *) md; + FluidsimModifierData *fmd = (FluidsimModifierData *)md; fmd->fss->flag |= OB_FLUIDSIM_ACTIVE; fmd->fss->flag |= OB_FLUIDSIM_OVERRIDE_TIME; } @@ -1861,7 +1861,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain) while (node) { if (node->type == CMP_NODE_COLORBALANCE) { - NodeColorBalance *n = (NodeColorBalance *) node->storage; + NodeColorBalance *n = (NodeColorBalance *)node->storage; n->lift[0] += 1.f; n->lift[1] += 1.f; n->lift[2] += 1.f; @@ -1876,7 +1876,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain) while (node) { if (node->type == CMP_NODE_COLORBALANCE) { - NodeColorBalance *n = (NodeColorBalance *) node->storage; + NodeColorBalance *n = (NodeColorBalance *)node->storage; n->lift[0] += 1.f; n->lift[1] += 1.f; n->lift[2] += 1.f; @@ -1907,7 +1907,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain) for (sl = sa->spacedata.first; sl; sl = sl->next) { if (sl->spacetype == SPACE_IMAGE) { - SpaceImage *sima = (SpaceImage *) sl; + SpaceImage *sima = (SpaceImage *)sl; scopes_new(&sima->scopes); } } @@ -1929,7 +1929,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain) for (sl = sa->spacedata.first; sl; sl = sl->next) { if (sl->spacetype == SPACE_NODE) { - SpaceNode *snode = (SpaceNode *) sl; + SpaceNode *snode = (SpaceNode *)sl; ListBase *regionbase; ARegion *ar; @@ -1953,12 +1953,12 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain) } } else if (sl->spacetype == SPACE_TIME) { - SpaceTime *stime = (SpaceTime *) sl; + SpaceTime *stime = (SpaceTime *)sl; /* enable all cache display */ stime->cache_display |= TIME_CACHE_DISPLAY; - stime->cache_display |= (TIME_CACHE_SOFTBODY|TIME_CACHE_PARTICLES); - stime->cache_display |= (TIME_CACHE_CLOTH|TIME_CACHE_SMOKE|TIME_CACHE_DYNAMICPAINT); + stime->cache_display |= (TIME_CACHE_SOFTBODY | TIME_CACHE_PARTICLES); + stime->cache_display |= (TIME_CACHE_CLOTH | TIME_CACHE_SMOKE | TIME_CACHE_DYNAMICPAINT); } } } @@ -1969,32 +1969,32 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain) /* parent type to modifier */ for (ob = bmain->object.first; ob; ob = ob->id.next) { if (ob->parent) { - Object *parent = (Object *) blo_do_versions_newlibadr(fd, lib, ob->parent); + Object *parent = (Object *)blo_do_versions_newlibadr(fd, lib, ob->parent); if (parent) { /* parent may not be in group */ if (parent->type == OB_ARMATURE && ob->partype == PARSKEL) { ArmatureModifierData *amd; - bArmature *arm = (bArmature *) blo_do_versions_newlibadr(fd, lib, parent->data); + bArmature *arm = (bArmature *)blo_do_versions_newlibadr(fd, lib, parent->data); - amd = (ArmatureModifierData*) modifier_new(eModifierType_Armature); + amd = (ArmatureModifierData *)modifier_new(eModifierType_Armature); amd->object = ob->parent; - BLI_addtail((ListBase*)&ob->modifiers, amd); + BLI_addtail((ListBase *)&ob->modifiers, amd); amd->deformflag = arm->deformflag; ob->partype = PAROBJECT; } else if (parent->type == OB_LATTICE && ob->partype == PARSKEL) { LatticeModifierData *lmd; - lmd = (LatticeModifierData*) modifier_new(eModifierType_Lattice); + lmd = (LatticeModifierData *)modifier_new(eModifierType_Lattice); lmd->object = ob->parent; - BLI_addtail((ListBase*)&ob->modifiers, lmd); + BLI_addtail((ListBase *)&ob->modifiers, lmd); ob->partype = PAROBJECT; } else if (parent->type == OB_CURVE && ob->partype == PARCURVE) { CurveModifierData *cmd; - cmd = (CurveModifierData*) modifier_new(eModifierType_Curve); + cmd = (CurveModifierData *)modifier_new(eModifierType_Curve); cmd->object = ob->parent; - BLI_addtail((ListBase*)&ob->modifiers, cmd); + BLI_addtail((ListBase *)&ob->modifiers, cmd); ob->partype = PAROBJECT; } } @@ -2005,8 +2005,8 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain) for (scene = bmain->scene.first; scene; scene = scene->id.next) { int i; for (i = 0; i < 20; i++) { - if (scene->lay & (1<<i)) { - scene->layact = 1<<i; + if (scene->lay & (1 << i)) { + scene->layact = 1 << i; break; } } @@ -2029,7 +2029,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain) for (scene = bmain->scene.first; scene; scene = scene->id.next) { if (scene) { Sequence *seq; - SEQ_BEGIN (scene->ed, seq) + SEQ_BEGIN(scene->ed, seq) { if (seq->sat == 0.0f) { seq->sat = 1.0f; @@ -2091,11 +2091,11 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain) /* spacing was originally in pixels, convert it to percentage for new version * size should not be zero due to sanity check above */ - brush->spacing = (int)(100 * ((float)brush->spacing) / ((float) brush->size)); + brush->spacing = (int)(100 * ((float)brush->spacing) / ((float)brush->size)); if (brush->add_col[0] == 0 && - brush->add_col[1] == 0 && - brush->add_col[2] == 0) + brush->add_col[1] == 0 && + brush->add_col[2] == 0) { brush->add_col[0] = 1.00f; brush->add_col[1] = 0.39f; @@ -2103,8 +2103,8 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain) } if (brush->sub_col[0] == 0 && - brush->sub_col[1] == 0 && - brush->sub_col[2] == 0) + brush->sub_col[1] == 0 && + brush->sub_col[2] == 0) { brush->sub_col[0] = 0.39f; brush->sub_col[1] = 0.39f; @@ -2143,11 +2143,11 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain) smd->domain->vorticity = 2.0f; smd->domain->time_scale = 1.0f; - if (!(smd->domain->flags & (1<<4))) + if (!(smd->domain->flags & (1 << 4))) continue; /* delete old MOD_SMOKE_INITVELOCITY flag */ - smd->domain->flags &= ~(1<<4); + smd->domain->flags &= ~(1 << 4); /* for now just add it to all flow objects in the scene */ { @@ -2200,7 +2200,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain) SpaceLink *sl; for (sl = sa->spacedata.first; sl; sl = sl->next) { if (sl->spacetype == SPACE_INFO) { - SpaceInfo *sinfo = (SpaceInfo *) sl; + SpaceInfo *sinfo = (SpaceInfo *)sl; ARegion *ar; sinfo->rpt_mask = INFO_RPT_OP; @@ -2208,9 +2208,9 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain) for (ar = sa->regionbase.first; ar; ar = ar->next) { if (ar->regiontype == RGN_TYPE_WINDOW) { ar->v2d.scroll = (V2D_SCROLL_RIGHT); - ar->v2d.align = V2D_ALIGN_NO_NEG_X|V2D_ALIGN_NO_NEG_Y; /* align bottom left */ + ar->v2d.align = V2D_ALIGN_NO_NEG_X | V2D_ALIGN_NO_NEG_Y; /* align bottom left */ ar->v2d.keepofs = V2D_LOCKOFS_X; - ar->v2d.keepzoom = (V2D_LOCKZOOM_X|V2D_LOCKZOOM_Y|V2D_LIMITZOOM|V2D_KEEPASPECT); + ar->v2d.keepzoom = (V2D_LOCKZOOM_X | V2D_LOCKZOOM_Y | V2D_LIMITZOOM | V2D_KEEPASPECT); ar->v2d.keeptot = V2D_KEEPTOT_BOUNDS; ar->v2d.minzoom = ar->v2d.maxzoom = 1.0f; } @@ -2284,7 +2284,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain) SpaceLink *sl; for (sl = sa->spacedata.first; sl; sl = sl->next) { if (sl->spacetype == SPACE_IMAGE) { - SpaceImage *sima = (SpaceImage *) sl; + SpaceImage *sima = (SpaceImage *)sl; if (sima->sample_line_hist.height == 0) sima->sample_line_hist.height = 100; } @@ -2338,21 +2338,21 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain) /* node sockets are not exposed automatically any more, * this mimics the old behavior by adding all unlinked sockets to groups. */ - for (ntree=bmain->nodetree.first; ntree; ntree=ntree->id.next) { + for (ntree = bmain->nodetree.first; ntree; ntree = ntree->id.next) { /* this adds copies and links from all unlinked internal sockets to group inputs/outputs. */ /* first make sure the own_index for new sockets is valid */ - for (node=ntree->nodes.first; node; node=node->next) { + for (node = ntree->nodes.first; node; node = node->next) { for (sock = node->inputs.first; sock; sock = sock->next) if (sock->own_index >= ntree->cur_index) - ntree->cur_index = sock->own_index+1; + ntree->cur_index = sock->own_index + 1; for (sock = node->outputs.first; sock; sock = sock->next) if (sock->own_index >= ntree->cur_index) - ntree->cur_index = sock->own_index+1; + 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 (node = ntree->nodes.first; node; node = node->next) { for (sock = node->inputs.first; sock; sock = sock->next) { if (!sock->link && !nodeSocketIsHidden(sock)) { @@ -2376,7 +2376,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain) } } for (sock = node->outputs.first; sock; sock = sock->next) { - if (nodeCountSocketLinks(ntree, sock)==0 && !nodeSocketIsHidden(sock)) { + if (nodeCountSocketLinks(ntree, sock) == 0 && !nodeSocketIsHidden(sock)) { gsock = do_versions_node_group_add_socket_2_56_2(ntree, sock->name, sock->type, SOCK_OUT); /* initialize the default socket value */ @@ -2429,7 +2429,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain) /* weak! material alpha could be animated */ if (mat->alpha < 1.0f || mat->fresnel_tra > 0.0f || transp_tex) { mat->mode |= MA_TRANSP; - mat->mode &= ~(MA_ZTRANSP|MA_RAYTRANSP); + mat->mode &= ~(MA_ZTRANSP | MA_RAYTRANSP); } } } @@ -2439,7 +2439,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain) if (sc->redraws_flag == 0) { /* just initialize to default? */ /* XXX: we could also have iterated through areas, and taken them from the first timeline available... */ - sc->redraws_flag = TIME_ALL_3D_WIN|TIME_ALL_ANIM_WIN; + sc->redraws_flag = TIME_ALL_3D_WIN | TIME_ALL_ANIM_WIN; } } @@ -2453,7 +2453,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain) ModifierData *md; for (md = ob->modifiers.first; md; md = md->next) { if (md->type == eModifierType_Solidify) { - SolidifyModifierData *smd = (SolidifyModifierData *) md; + SolidifyModifierData *smd = (SolidifyModifierData *)md; if (smd->flag & MOD_SOLIDIFY_RIM_MATERIAL) { smd->mat_ofs_rim = 1; smd->flag &= ~MOD_SOLIDIFY_RIM_MATERIAL; @@ -2554,7 +2554,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain) if (act->type == ACT_CAMERA) { bCameraActuator *ba = act->data; - ba->damping = 1.0/32.0; + ba->damping = 1.0 / 32.0; } } } @@ -2577,7 +2577,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain) for (scene = bmain->scene.first; scene; scene = scene->id.next) { scene->r.ffcodecdata.audio_channels = 2; scene->audio.volume = 1.0f; - SEQ_BEGIN (scene->ed, seq) + SEQ_BEGIN(scene->ed, seq) { seq->pitch = 1.0f; } @@ -2631,7 +2631,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain) for (act = bmain->action.first; act; act = act->id.next) { for (fcu = act->curves.first; fcu; fcu = fcu->next) { BezTriple *bezt; - unsigned int i = 0; + uint i = 0; /* only need to touch curves that had this flag set */ if ((fcu->flag & FCURVE_AUTO_HANDLES) == 0) @@ -2704,7 +2704,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain) bNode *node; bNodeSocket *sock; - for (node=ntree->nodes.first; node; node=node->next) { + for (node = ntree->nodes.first; node; node = node->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) @@ -2755,7 +2755,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain) if (sce->gm.recastData.cellheight == 0.0f) sce->gm.recastData.cellheight = 0.2f; if (sce->gm.recastData.agentmaxslope == 0.0f) - sce->gm.recastData.agentmaxslope = (float)M_PI/4; + sce->gm.recastData.agentmaxslope = (float)M_PI / 4; if (sce->gm.recastData.agentmaxclimb == 0.0f) sce->gm.recastData.agentmaxclimb = 0.9f; if (sce->gm.recastData.agentheight == 0.0f) @@ -2770,7 +2770,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain) sce->gm.recastData.regionminsize = 8.f; if (sce->gm.recastData.regionmergesize == 0.0f) sce->gm.recastData.regionmergesize = 20.f; - if (sce->gm.recastData.vertsperpoly<3) + if (sce->gm.recastData.vertsperpoly < 3) sce->gm.recastData.vertsperpoly = 6; if (sce->gm.recastData.detailsampledist == 0.0f) sce->gm.recastData.detailsampledist = 6.0f; |