K. Hoercher wrote:
>  Hi,
>
>  some more or less printf style debugging led me to the conclusion,
>  that the immediate culprits are in l. 1847f and 1894f of
>  simgear/scene/model/animation.cxx
>
>  Those conditions seemingly are never true, when this code gets
>  executed. Even more when bypassing the if-statement, the
>  textranslate/rotate won't work if the looked for property doesn't
>  exist at execution time. As far as I looked, I found that some model
>  specific nasal or xml that does eventually create the pertinent
>  nodes, does so too late. Only when I forced the creation in the
>  -set.xml the textransformations did work again.
>
>  Some other workaround I checked, was to test only for non-emptiness
>  of the propertyName in the mentioned if-statements and subsequent
>  calling of getNode() with forced creation of the node. While that
>  does seem to work, I'm unsure if that is the desired or even a
>  correct solution.
>
>  So the quick hack would be:
>
>  --- simgear/scene/model/animation.cxx.orig 2007-12-29
>  13:27:00.000000000 +0100 +++ simgear/scene/model/animation.cxx
>  2007-12-29 13:26:07.000000000 +0100 @@ -1844,8 +1844,8 @@ {
>  std::string propertyName = config->getStringValue("property",
>  "/null"); SGSharedPtr<SGExpressiond> value; - if
>  (getModelRoot()->hasChild(propertyName)) - value = new
>  SGPropertyExpression<double>(getModelRoot()->getNode(propertyName));
>  + if (!propertyName.empty()) + value = new
>  SGPropertyExpression<double>(getModelRoot()->getNode(propertyName,
>  true)); else value = new SGConstExpression<double>(0);
>
>  @@ -1891,8 +1891,8 @@ { std::string propertyName =
>  config->getStringValue("property", "/null");
>  SGSharedPtr<SGExpressiond> value; - if
>  (getModelRoot()->hasChild(propertyName)) - value = new
>  SGPropertyExpression<double>(getModelRoot()->getNode(propertyName));
>  + if (!propertyName.empty()) + value = new
>  SGPropertyExpression<double>(getModelRoot()->getNode(propertyName,
>  true)); else value = new SGConstExpression<double>(0);
>
>
>  regards K. Hoercher
>
>

Hi,

I applied your patch and the textranslate animation came back, I'll keep 
it :)

Thanks a lot,

Alexis

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Flightgear-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to