diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2017-11-08 17:16:49 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2017-11-08 23:39:01 +0300 |
commit | 206c94fea98d44ed9667607638c455c7c0e63822 (patch) | |
tree | ddc1f6f30c18d10674daaeeaee6b465550447709 /source/blender/blenloader | |
parent | 670e6cab4319b94c96c6a61cb76199f1054b935a (diff) |
Farewell Scene->base
While getting rid of Scene->base we got the following fixes:
* Fix "Convert To" operator
* Fix "NLA allowing to selected objects that are not selectable
* Fix scene.objects (readonly, no option to link/unlink)
Note: Collada needs to use the context SceneLayer for adding objects
however I added a placeholder, so Collada maintainers can fix this
properly.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 9 | ||||
-rw-r--r-- | source/blender/blenloader/intern/versioning_250.c | 2 | ||||
-rw-r--r-- | source/blender/blenloader/intern/writefile.c | 4 |
3 files changed, 5 insertions, 10 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index c88deeca126..8bdaa1d91bb 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -5831,7 +5831,7 @@ static void lib_link_scene(FileData *fd, Main *main) sce->toolsettings->particle.shape_object = newlibadr(fd, sce->id.lib, sce->toolsettings->particle.shape_object); - for (BaseLegacy *base_legacy_next, *base_legacy = sce->base.first; base_legacy; base_legacy = base_legacy_next) { + for (Base *base_legacy_next, *base_legacy = sce->base.first; base_legacy; base_legacy = base_legacy_next) { base_legacy_next = base_legacy->next; base_legacy->object = newlibadr_us(fd, sce->id.lib, base_legacy->object); @@ -9778,13 +9778,12 @@ static void expand_scene_collection(FileData *fd, Main *mainvar, SceneCollection static void expand_scene(FileData *fd, Main *mainvar, Scene *sce) { - BaseLegacy *base; SceneRenderLayer *srl; FreestyleModuleConfig *module; FreestyleLineSet *lineset; - for (base = sce->base.first; base; base = base->next) { - expand_doit(fd, mainvar, base->object); + for (Base *base_legacy = sce->base.first; base_legacy; base_legacy = base_legacy->next) { + expand_doit(fd, mainvar, base_legacy->object); } expand_doit(fd, mainvar, sce->camera); expand_doit(fd, mainvar, sce->world); @@ -10108,7 +10107,7 @@ static bool object_in_any_scene(Main *mainvar, Object *ob) Scene *sce; for (sce = mainvar->scene.first; sce; sce = sce->id.next) { - if (BKE_scene_base_find(sce, ob)) { + if (BKE_scene_object_find(sce, ob)) { return true; } } diff --git a/source/blender/blenloader/intern/versioning_250.c b/source/blender/blenloader/intern/versioning_250.c index 0895b956563..3ee6891f17f 100644 --- a/source/blender/blenloader/intern/versioning_250.c +++ b/source/blender/blenloader/intern/versioning_250.c @@ -736,7 +736,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *main) if (main->versionfile < 250) { bScreen *screen; Scene *scene; - BaseLegacy *base; + Base *base; Material *ma; Camera *cam; Mesh *me; diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index da41433f6bc..2ad996f197d 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -2604,10 +2604,6 @@ static void write_scene(WriteData *wd, Scene *sce) write_keyingsets(wd, &sce->keyingsets); /* direct data */ - for (BaseLegacy *base = sce->base.first; base; base = base->next) { - writestruct(wd, DATA, BaseLegacy, 1, base); - } - ToolSettings *tos = sce->toolsettings; writestruct(wd, DATA, ToolSettings, 1, tos); if (tos->vpaint) { |