Get Map Path of Element Property

DraagonStormDraagonStorm Posts: 748

I'm trying to get the path and file name of the texture file assigned to a Property.. GetMapValue is returning a DzNumericProperty.

Here's the code so far...

      

 var nProperties = m_oElement.getNumProperties();
 for( var p = 0; p < nProperties; p++ )
 {
  var oProperty = m_oElement.getProperty( p );
  if( oProperty )
  {
   if( oProperty.inherits( "DzNumericProperty" ) )
   {
    if( oProperty.isMappable || oProperty.isMapped() )
    {
     //HERE'S WHERE I WANT TO FIND THE PATH AND NAME OF THE TEXT FILE...
    }
   }
  }
 }


Comments

  • Richard HaseltineRichard Haseltine Posts: 100,842
    edited December 2013

    tex = oProperty.getMapValue();
    // tex is DzTexture
    filename = tex.getFilename();
    Post edited by Richard Haseltine on
  • DraagonStormDraagonStorm Posts: 748
    edited December 1969

    tex = oProperty.getMapValue();
    // tex is DzTexture
    filename = tex.getFilename();

    Thank you Richard

Sign In or Register to comment.