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:
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/readfile.c3
-rw-r--r--source/blender/blenloader/intern/versioning_280.c29
-rw-r--r--source/blender/blenloader/intern/writefile.c7
3 files changed, 12 insertions, 27 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index b40321f75d1..fdd65add6d1 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -2902,7 +2902,6 @@ static void direct_link_workspace(FileData *fd, WorkSpace *workspace, const Main
link_list(fd, BKE_workspace_layouts_get(workspace));
link_list(fd, &workspace->hook_layout_relations);
link_list(fd, &workspace->scene_viewlayer_relations);
- link_list(fd, BKE_workspace_transform_orientations_get(workspace));
link_list(fd, &workspace->owner_ids);
for (WorkSpaceDataRelation *relation = workspace->hook_layout_relations.first;
@@ -6258,7 +6257,7 @@ static void direct_link_scene(FileData *fd, Scene *sce, Main *bmain)
}
link_list(fd, &(sce->markers));
- link_list(fd, &(sce->transform_spaces)); /* only for old files */
+ link_list(fd, &(sce->transform_spaces));
link_list(fd, &(sce->r.layers));
link_list(fd, &(sce->r.views));
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c
index d8314cb232c..0b2e44bff86 100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@ -95,7 +95,6 @@ static void do_version_workspaces_create_from_screens(Main *bmain)
Scene *scene = screen->scene;
WorkSpace *workspace;
ViewLayer *layer = BKE_view_layer_from_scene_get(scene);
- ListBase *transform_orientations;
if (screen_parent) {
/* fullscreen with "Back to Previous" option, don't create
@@ -116,9 +115,6 @@ static void do_version_workspaces_create_from_screens(Main *bmain)
BLI_strncpy(workspace->view_render.engine_id, RE_engine_id_BLENDER_EEVEE,
sizeof(workspace->view_render.engine_id));
#endif
-
- transform_orientations = BKE_workspace_transform_orientations_get(workspace);
- BLI_duplicatelist(transform_orientations, &scene->transform_spaces);
}
}
@@ -750,25 +746,6 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *main)
}
if (!MAIN_VERSION_ATLEAST(main, 280, 2)) {
- if (!DNA_struct_elem_find(fd->filesdna, "View3D", "short", "custom_orientation_index")) {
- for (bScreen *screen = main->screen.first; screen; screen = screen->id.next) {
- for (ScrArea *area = screen->areabase.first; area; area = area->next) {
- for (SpaceLink *sl = area->spacedata.first; sl; sl = sl->next) {
- if (sl->spacetype == SPACE_VIEW3D) {
- View3D *v3d = (View3D *)sl;
- if (v3d->twmode >= V3D_MANIP_CUSTOM) {
- v3d->custom_orientation_index = v3d->twmode - V3D_MANIP_CUSTOM;
- v3d->twmode = V3D_MANIP_CUSTOM;
- }
- else {
- v3d->custom_orientation_index = -1;
- }
- }
- }
- }
- }
- }
-
if (!DNA_struct_elem_find(fd->filesdna, "Lamp", "float", "cascade_max_dist")) {
for (Lamp *la = main->lamp.first; la; la = la->id.next) {
la->cascade_max_dist = 1000.0f;
@@ -947,6 +924,12 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *main)
con = con_next;
}
}
+
+ if (!DNA_struct_elem_find(fd->filesdna, "Scene", "int", "orientation_index_custom")) {
+ for (Scene *scene = main->scene.first; scene; scene = scene->id.next) {
+ scene->orientation_index_custom = -1;
+ }
+ }
}
if (!MAIN_VERSION_ATLEAST(main, 280, 6)) {
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index c6523dc99e2..ab71676b3df 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -2648,6 +2648,11 @@ static void write_scene(WriteData *wd, Scene *sce)
writestruct(wd, DATA, TimeMarker, 1, marker);
}
+ /* writing dynamic list of TransformOrientations to the blend file */
+ for (TransformOrientation *ts = sce->transform_spaces.first; ts; ts = ts->next) {
+ writestruct(wd, DATA, TransformOrientation, 1, ts);
+ }
+
/* writing MultiView to the blend file */
for (SceneRenderView *srv = sce->r.views.first; srv; srv = srv->next) {
writestruct(wd, DATA, SceneRenderView, 1, srv);
@@ -3625,14 +3630,12 @@ static void write_cachefile(WriteData *wd, CacheFile *cache_file)
static void write_workspace(WriteData *wd, WorkSpace *workspace)
{
ListBase *layouts = BKE_workspace_layouts_get(workspace);
- ListBase *transform_orientations = BKE_workspace_transform_orientations_get(workspace);
writestruct(wd, ID_WS, WorkSpace, 1, workspace);
writelist(wd, DATA, WorkSpaceLayout, layouts);
writelist(wd, DATA, WorkSpaceDataRelation, &workspace->hook_layout_relations);
writelist(wd, DATA, WorkSpaceDataRelation, &workspace->scene_viewlayer_relations);
writelist(wd, DATA, wmOwnerID, &workspace->owner_ids);
- writelist(wd, DATA, TransformOrientation, transform_orientations);
}
/* Keep it last of write_foodata functions. */