X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fbuilders%2Fsequencetemplate.cpp;h=5d7f4d0b2104caf5474bbd2155677e5bf95c0736;hp=c125823eb8344da53d4013a6137a44f6897b5f46;hb=ae45c0397e2cb8f0a01f2f31d01c95ff3870271e;hpb=23d4100160bfa33359ce297b6b36244abcaa5f82 diff --git a/source/builders/sequencetemplate.cpp b/source/builders/sequencetemplate.cpp index c125823e..5d7f4d0b 100644 --- a/source/builders/sequencetemplate.cpp +++ b/source/builders/sequencetemplate.cpp @@ -123,14 +123,9 @@ void SequenceTemplate::Loader::step_with_slot(const string &tag, const string &r Step stp; stp.tag = tag; stp.slot_name = rend; - if(coll) - { - Step::Loader ldr(stp, *coll); - ldr.set_inline_base_name(format("%s/%d.step", get_source(), obj.steps.size())); - load_sub_with(ldr); - } - else - load_sub(stp); + Step::Loader ldr(stp, *coll); + ldr.set_inline_base_name(format("%s/%d.step", get_source(), obj.steps.size())); + load_sub_with(ldr); obj.steps.push_back(stp); } @@ -160,8 +155,8 @@ void SequenceTemplate::ClearLoader::stencil(int s) } -SequenceTemplate::Step::Loader::Loader(Step &p, Collection *c): - DataFile::CollectionObjectLoader(p, c) +SequenceTemplate::Step::Loader::Loader(Step &p, Collection &c): + DataFile::CollectionObjectLoader(p, &c) { add("blend", &Loader::blend); add("blend", &Loader::blend_factors); @@ -202,7 +197,7 @@ void SequenceTemplate::Step::Loader::depth_compare(Predicate c) void SequenceTemplate::Step::Loader::lighting_inline() { RefPtr lightn = new Lighting; - load_sub(*lightn); + load_sub(*lightn, get_collection()); get_collection().add(inline_base_name+".lightn", lightn.get()); obj.lighting = lightn.release(); }