#include <msp/core/maputils.h>
#include <msp/datafile/collection.h>
+#include <msp/strings/format.h>
#include "ambientocclusion.h"
#include "blend.h"
#include "bloom.h"
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);
}
}
-SequenceTemplate::Step::Loader::Loader(Step &p):
- DataFile::CollectionObjectLoader<Step>(p, 0)
-{
- init();
-}
-
SequenceTemplate::Step::Loader::Loader(Step &p, Collection &c):
DataFile::CollectionObjectLoader<Step>(p, &c)
-{
- init();
-}
-
-void SequenceTemplate::Step::Loader::init()
{
add("blend", &Loader::blend);
add("blend", &Loader::blend_factors);
void SequenceTemplate::Step::Loader::lighting_inline()
{
RefPtr<Lighting> lightn = new Lighting;
- load_sub(*lightn);
+ load_sub(*lightn, get_collection());
get_collection().add(inline_base_name+".lightn", lightn.get());
obj.lighting = lightn.release();
}