Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenloader/intern/readfile.c
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
| Show First 20 Lines • Show All 6,349 Lines • ▼ Show 20 Lines | static void direct_link_lightcache(FileData *fd, LightCache *cache) | ||||
| } | } | ||||
| cache->cube_data = newdataadr(fd, cache->cube_data); | cache->cube_data = newdataadr(fd, cache->cube_data); | ||||
| cache->grid_data = newdataadr(fd, cache->grid_data); | cache->grid_data = newdataadr(fd, cache->grid_data); | ||||
| } | } | ||||
| /* check for cyclic set-scene, | /* check for cyclic set-scene, | ||||
| * libs can cause this case which is normally prevented, see (T#####) */ | * libs can cause this case which is normally prevented, see (T#####) */ | ||||
| #define USE_SETSCENE_CHECK | #define USE_SETSCENE_CHECK | ||||
| #ifdef USE_SETSCENE_CHECK | #ifdef USE_SETSCENE_CHECK | ||||
| /** | /** | ||||
| * A version of #BKE_scene_validate_setscene with special checks for linked libs. | * A version of #BKE_scene_validate_setscene with special checks for linked libs. | ||||
brecht: This code should not run for the `sce->display.shading` case. Changing UI data on load is ok… | |||||
| */ | */ | ||||
| static bool scene_validate_setscene__liblink(Scene *sce, const int totscene) | static bool scene_validate_setscene__liblink(Scene *sce, const int totscene) | ||||
| { | { | ||||
| Scene *sce_iter; | Scene *sce_iter; | ||||
| int a; | int a; | ||||
| if (sce->set == NULL) { | if (sce->set == NULL) { | ||||
| return 1; | return 1; | ||||
| ▲ Show 20 Lines • Show All 879 Lines • ▼ Show 20 Lines | if (sl->spacetype == SPACE_VIEW3D) { | ||||
| if (v3d->fx_settings.dof) { | if (v3d->fx_settings.dof) { | ||||
| v3d->fx_settings.dof = newdataadr(fd, v3d->fx_settings.dof); | v3d->fx_settings.dof = newdataadr(fd, v3d->fx_settings.dof); | ||||
| } | } | ||||
| if (v3d->fx_settings.ssao) { | if (v3d->fx_settings.ssao) { | ||||
| v3d->fx_settings.ssao = newdataadr(fd, v3d->fx_settings.ssao); | v3d->fx_settings.ssao = newdataadr(fd, v3d->fx_settings.ssao); | ||||
| } | } | ||||
| /* Link ID Properties -- and copy this comment EXACTLY for easy finding | |||||
| * of library blocks that implement this.*/ | |||||
| // IDP_LibLinkProperty(v3d->shading.prop, fd); | |||||
| if (v3d->shading.prop) { | |||||
| v3d->shading.prop = newdataadr(fd, v3d->shading.prop); | |||||
| IDP_DirectLinkGroup_OrFree(&v3d->shading.prop, (fd->flags & FD_FLAGS_SWITCH_ENDIAN), fd); | |||||
| } | |||||
| blo_do_versions_view3d_split_250(v3d, &sl->regionbase); | blo_do_versions_view3d_split_250(v3d, &sl->regionbase); | ||||
| } | } | ||||
| else if (sl->spacetype == SPACE_GRAPH) { | else if (sl->spacetype == SPACE_GRAPH) { | ||||
| SpaceGraph *sipo = (SpaceGraph *)sl; | SpaceGraph *sipo = (SpaceGraph *)sl; | ||||
| sipo->ads = newdataadr(fd, sipo->ads); | sipo->ads = newdataadr(fd, sipo->ads); | ||||
| BLI_listbase_clear(&sipo->runtime.ghost_curves); | BLI_listbase_clear(&sipo->runtime.ghost_curves); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 4,658 Lines • Show Last 20 Lines | |||||
This code should not run for the sce->display.shading case. Changing UI data on load is ok, scene data not so much.