Anyway to get filename of object by script ?
Widdershins Studio
Posts: 539
I want to write a script to get the originating filename of the currently selected object in the scene.
I know how to get various details of the object, but can't find anything that contains the filename. Is there anything that I have missed ?
Many thanks.
Comments
Does this help? http://www.daz3d.com/forums/discussion/comment/810601/#Comment_810601
Yes it does, but for some reason it's not returning any filenames. Hmm.
Gone off at a tangent slightly. I found some code which is suppoesed to get the filename from a selected asset in the Content Manager.
Trouble is that again no filename is being returned. I am at a bit of a loss as to how to get the actual value of properties from objects.
Is that one of Rob's sample scripts? If you do use those to help with your own script please remember to credit the original. I'm not sure why it's failing - is this in 4.8 or 4.9? Does it matter which of the types of folder you are in (soemthing-Formats, Products or Categories)?
I've moved this to the scripting sub-forum so it's more likely to be noticed by those who may help.
Sorry there was no name that I could see. I just took a few elements and adpated it to do what I needed.
Thanks for moving it.
This is 4.8 64bit
Not sure about the folders, I'll play with it.
If it was one of the sample scripts, the license terms are linked at the top of the page http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/eula/start (you are right that there's no name on the samples, but as far as I am aware all or almost all are by Rob Whisenant).