Material animation include model directory
Include model directory in the texture path - to allows short paths relative to model root when set via a texture-prop
This commit is contained in:
@@ -419,6 +419,11 @@ private:
|
|||||||
SGMaterialAnimation::SGMaterialAnimation(simgear::SGTransientModelData &modelData) :
|
SGMaterialAnimation::SGMaterialAnimation(simgear::SGTransientModelData &modelData) :
|
||||||
SGAnimation(modelData), texturePathList(modelData.getOptions()->getDatabasePathList())
|
SGAnimation(modelData), texturePathList(modelData.getOptions()->getDatabasePathList())
|
||||||
{
|
{
|
||||||
|
// add model directory to texture path - this allows short paths relative to
|
||||||
|
// model root.
|
||||||
|
SGPath modelDir(_modelData.getPath());
|
||||||
|
texturePathList.insert(texturePathList.begin(), modelDir.dir());
|
||||||
|
|
||||||
if (modelData.getConfigNode()->hasChild("global"))
|
if (modelData.getConfigNode()->hasChild("global"))
|
||||||
SG_LOG(SG_IO, SG_DEV_ALERT, modelData.getPath() <<
|
SG_LOG(SG_IO, SG_DEV_ALERT, modelData.getPath() <<
|
||||||
": Use of <global> in material animation is "
|
": Use of <global> in material animation is "
|
||||||
|
|||||||
Reference in New Issue
Block a user