for (id = first; id; id = id->next) { \
AnimData *adt = BKE_animdata_from_id(id); \
if (adt) func(id, adt, user_data); \
- }
+ } (void)0
-
+
/* "embedded" nodetree cases (i.e. scene/material/texture->nodetree) */
#define ANIMDATA_NODETREE_IDS_CB(first, NtId_Type) \
for (id = first; id; id = id->next) { \
if (adt2) func(id, adt2, user_data); \
} \
if (adt) func(id, adt, user_data); \
- }
+ } (void)0
-
+
/* nodes */
ANIMDATA_IDS_CB(mainptr->nodetree.first);
-
+
/* textures */
ANIMDATA_NODETREE_IDS_CB(mainptr->tex.first, Tex);
-
+
/* lamps */
ANIMDATA_IDS_CB(mainptr->lamp.first);
}
}
+ if (main->versionfile < 263 || (main->versionfile == 263 && main->subversionfile < 8))
+ {
+ /* set new deactivation values for game settings */
+ Scene *sce;
+
+ for (sce = main->scene.first; sce; sce = sce->id.next) {
+ /* Game Settings */
+ sce->gm.lineardeactthreshold = 0.8f;
+ sce->gm.angulardeactthreshold = 1.0f;
+ sce->gm.deactivationtime = 2.0f;
+ }
+ }
+
+ /* default values in Freestyle settings */
+ {
+ Scene *sce;
+ SceneRenderLayer *srl;
+ FreestyleLineStyle *linestyle;
+
+ for(sce = main->scene.first; sce; sce = sce->id.next) {
+ if (sce->r.line_thickness_mode == 0) {
+ sce->r.line_thickness_mode= R_LINE_THICKNESS_ABSOLUTE;
+ sce->r.unit_line_thickness= 1.f;
+ }
+ for(srl= sce->r.layers.first; srl; srl= srl->next) {
+ if (srl->freestyleConfig.mode == 0)
+ srl->freestyleConfig.mode= FREESTYLE_CONTROL_EDITOR_MODE;
+ if (srl->freestyleConfig.raycasting_algorithm == 0)
+ srl->freestyleConfig.raycasting_algorithm= FREESTYLE_ALGO_CULLED_ADAPTIVE_CUMULATIVE;
+ }
+ }
+ for(linestyle = main->linestyle.first; linestyle; linestyle = linestyle->id.next) {
+ if (linestyle->thickness_position == 0) {
+ linestyle->thickness_position= LS_THICKNESS_CENTER;
+ linestyle->thickness_ratio= 0.5f;
+ }
+ if (linestyle->chaining == 0)
+ linestyle->chaining= LS_CHAINING_PLAIN;
+ if (linestyle->rounds == 0)
+ linestyle->rounds= 3;
+ }
+ }
+
/* WATCH IT!!!: pointers from libdata have not been converted yet here! */
/* WATCH IT 2!: Userdef struct init has to be in editors/interface/resources.c! */
{