Skip to content
Advertisement

Opening a specific file with the program specified in Python.

This is the python code I wrote to open a specific nuke file and a specific 3de file. The nuke works and opens the specific nuke file but the 3de doesn’t. I get an error saying “3de: command not found”. I’m trying to run this in from Maya to open through the terminal.

nFile="/sam/stuff/new.nk"
tFile="/sam/stuff/new.3de"



os.system("nuke %s &" %(nFile))    
os.system("3de %s &" %(tFile))

Advertisement

Answer

The 3de needed the full filepath and the 3de flag open in front of the project filepath. Easy fix thanks to /user/that other guy.

nFile="/sam/stuff/new.nk"
tFile="/sam/stuff/new.3de"



os.system("nuke %s &" %(nFile))    
os.system("/c/3de/3de -open %s &" %(tFile))
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement