I want to have a small script that checks if the insert file name has the extension in it if not it should add the correct file extension to it
as for test callback script i have made this one and it doesn't work:
// Hscrpt
if ( ${script_value:e} != “.jsx” ) then
set $script_parm = $script_value + “.jsx”
EDIT: it looks like strcmp should be used but when i insert it still won't work.
the first version i have made a python version in my script(otl /PythonModule) that works but it changes the $HIP to full path so i loss the $HIP what i don't want:
# Python
def getSelectedFile(ropNode):
node = ropNode.parm(“save_file”)
path = node.eval() # Eval doesnt come as $HIP
if path != “.jsx”:
path = path + “.jsx”
node.set(path)
return path
has someone a solution hscript or python?
thanks