Hello,
Apologies for the basic question, but I cannot for the life of me figure out how to get the SBS file location of the file I have open currently in SD2018.3 even after going through some of the API documentation
import sd
import sdplugins
from LTools.Tools import Exporter
class ExportToTGAFullSize(sdplugins.Plugin):
sPluginDesc = sdplugins.PluginDesc(
aLabel = 'Export To TGA - FullSize',
aTooltip = 'Exports the TGAs of the current Substance Graph to the Data Folder',
aPluginLocation = sdplugins.PluginLocationMenu(sdplugins.MenuId.Scripts, 'LTools', 0),
aIconFileAbsPath = '')
def run(self, aContext) :
#How to get the current file location so exporter knows where to mirror this in Project>Data?
Exporter.Export(ArtSourceFileLocation, 100)
pass
# Register module classes
sd.getContext().getSDApplication().registerModule(__name__)
Basically what I'm looking for is something like:
pm.sceneName() in Pymel/Maya which returns a value like-
P:/LTP4/Projects/ArtSource/Environments/Props/Crate_Clean.mb
Something like this but, in SBS format.... So
P:/LTP4/Projects/ArtSource/Environments/Materials/Shared/Wood_Clean.sbs
I also apologies for it being SD2018.3, but it is what our studio is running currently and I do not believe we are upgrading to a newer version of SD just yet

TIA