Author Topic: Get SBS File Location  (Read 706 times)


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

Code: [Select]
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)

# Register module classes

Basically what I'm looking for is something like: pm.sceneName() in Pymel/Maya which returns a value like-

Something like this but, in SBS format.... So

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 :(


Please see this thread :,33259.0.html

Thank you for responding Cyrille, but in that post I'm unable to use ui_mgr as its something that was added to newer versions of SD and is not present on 2018.3. I'm looking for something like that ...

Nevermind, the studio has agreed to upgrade Painter and Designer to 2020. Dear diary, today was a good day!