Added: #1469 Base for parsing of camera animation modifiers

--HG--
branch : gsoc2012-fabien
hg/feature/gsoc2012-fabien
Fabien_HENON 13 years ago
parent ed42786901
commit a1c8a2561e

@ -92,11 +92,11 @@ bool CCameraAnimationManager::parseCameraAnimations(const IPrimitive* prim, cons
for (uint i = 0; i < prim->getNumChildren(); i++)
{
const IPrimitive* child;
prim->getChild(child, 1);
prim->getChild(child, i);
// We tell the factory to load the instructions in function of the type of instruction we have
string stepType;
if (!prim->getPropertyByName("class", stepType))
if (!child->getPropertyByName("class", stepType))
{
nlwarning("<CCameraAnimationManager parseCameraAnimations> Error while getting the class of a camera animation step in primitive number '%s'", filename.c_str());
continue;

@ -32,12 +32,23 @@ ICameraAnimationStep* ICameraAnimationStepFactory::parseStep(const NLLIGO::IPrim
nlerror("BUG IN CAMERA ANIMATION STEP FACTORY : BAD INIT CODE");
return NULL;
}
// We parse the step
if (!ret->parseStep(prim, filename))
{
nlerror("building camera animation step failed");
delete ret;
return NULL;
}
// We look for children (modifiers or sound triggers)
for (uint i = 0; i < prim->getNumChildren(); i++)
{
const NLLIGO::IPrimitive* child;
prim->getChild(child, i);
}
return ret;
}
}

Loading…
Cancel
Save