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:
parent
7ac90850d3
commit
148ba367ee
@ -419,6 +419,11 @@ private:
|
||||
SGMaterialAnimation::SGMaterialAnimation(simgear::SGTransientModelData &modelData) :
|
||||
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"))
|
||||
SG_LOG(SG_IO, SG_DEV_ALERT, modelData.getPath() <<
|
||||
": Use of <global> in material animation is "
|
||||
|
Loading…
Reference in New Issue
Block a user