Specifying the help file location in SPDL

In 2011 and later, you can’t use OriginPath to find the location of the inspected shader/texture. Instead, use ShaderDef.DefinitionPath.
ShaderDef.DefinitionPath will return something like:

' INFO : C:\Users\blairs\Autodesk\Softimage_2012_SP1\Addons\baVolume\Application\spdl\BA_fluid.spdl

So you could do something like this in your SPDL file to specify the location of your help:

	Sub OnInit()
		Set ppi =PPG.Inspected(0)
		s = ppi.ShaderDef.DefinitionPath
		sHelp = Left( s, InStr( 1, s, "spdl" ) - 1 ) + "../help/index.htm"
		PPG.PPGLayout.SetAttribute siUIHelpFile, sHelp
	End sub

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s