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,347 Lines • ▼ Show 20 Lines | for (int i = 0; i < cache->mips_len; i++) { | ||||
| direct_link_lightcache_texture(fd, &cache->cube_mips[i]); | direct_link_lightcache_texture(fd, &cache->cube_mips[i]); | ||||
| } | } | ||||
| } | } | ||||
| 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); | ||||
| } | } | ||||
| static void direct_link_view3dshading(FileData *fd, View3DShading *shading) | |||||
| { | |||||
| if (shading->prop) { | |||||
| shading->prop = newdataadr(fd, shading->prop); | |||||
| IDP_DirectLinkGroup_OrFree(&shading->prop, (fd->flags & FD_FLAGS_SWITCH_ENDIAN), fd); | |||||
| } | |||||
| } | |||||
brecht: This code should not run for the `sce->display.shading` case. Changing UI data on load is ok… | |||||
| /* 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. | ||||
| */ | */ | ||||
| ▲ Show 20 Lines • Show All 618 Lines • ▼ Show 20 Lines | #endif | ||||
| else { | else { | ||||
| /* else try to read the cache from file. */ | /* else try to read the cache from file. */ | ||||
| sce->eevee.light_cache = newdataadr(fd, sce->eevee.light_cache); | sce->eevee.light_cache = newdataadr(fd, sce->eevee.light_cache); | ||||
| if (sce->eevee.light_cache) { | if (sce->eevee.light_cache) { | ||||
| direct_link_lightcache(fd, sce->eevee.light_cache); | direct_link_lightcache(fd, sce->eevee.light_cache); | ||||
| } | } | ||||
| } | } | ||||
| direct_link_view3dshading(fd, &sce->display.shading); | |||||
| sce->layer_properties = newdataadr(fd, sce->layer_properties); | sce->layer_properties = newdataadr(fd, sce->layer_properties); | ||||
| IDP_DirectLinkGroup_OrFree(&sce->layer_properties, (fd->flags & FD_FLAGS_SWITCH_ENDIAN), fd); | IDP_DirectLinkGroup_OrFree(&sce->layer_properties, (fd->flags & FD_FLAGS_SWITCH_ENDIAN), fd); | ||||
| } | } | ||||
| /** \} */ | /** \} */ | ||||
| /* -------------------------------------------------------------------- */ | /* -------------------------------------------------------------------- */ | ||||
| /** \name Read ID: Grease Pencil | /** \name Read ID: Grease Pencil | ||||
| ▲ Show 20 Lines • Show All 252 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); | ||||
| } | } | ||||
| direct_link_view3dshading(fd, &v3d->shading); | |||||
| 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.