Hi!
I’m trying to get the name of an FBX file in a script, but I am having some issues.
In the script below, I have one button to import, one button to display the file name in a note. For some reason, when I press the button to display the note, if the file is an OBJ, I see the file name. If the file is an FBX, I do not see the file name.
How do I get the file name of an FBX?
Thanks in advance!
[VarDef, importFile, ""] // define the variable to hold the file name
[ISubPalette,"ZPlugin:MyScript"] // make subpalette
[IButton, "ZPlugin:MyScript:Import File", "Import File", // make button
//[VarSet, importFile, [ FileNameAsk, "OBJ(*.obj)|*.obj||", , "Select OBJ..."]] // ask for file
[VarSet, importFile, [ FileNameAsk, "FBX(*.fbx)|*.fbx||", , "Select FBX..."]] // ask for file
[FileNameSetNext, importFile] // set next file
[IPress, Tool:Import] // import
,,1]//end button
[IButton,"ZPlugin:MyScript:Print Screen","Print Screen", // print the file name to screen
[Note, [StrMerge, "File Name: ", importFile]] // show note with the file name
,,1]//end button