CiaranM Posted April 4, 2013 Share Posted April 4, 2013 Hi, is it possible to pass a python string as one of the arguments to an hscript command called through hou.hscript? I'm calling the hscript command fbximport, which AFAIK has no Python equivalent. So how can I get the path argument from the rest of my code into the hscript command? Thanks. Quote Link to comment Share on other sites More sharing options...
CiaranM Posted April 4, 2013 Author Share Posted April 4, 2013 never mind...I just needed to concatenate everything into a big string.... Quote Link to comment Share on other sites More sharing options...
ben Posted April 18, 2013 Share Posted April 18, 2013 (edited) Hi, Im trying to batch import a lot of fbx files. Could you elaborate on how you pass the path argument to the hscript command. So far I think it's the only thing I'm missing ... import osdirectory = "//xxxxxxx/fbx/"listFiles = os.listdir(directory)for fbx in listFiles : fbxFullPath = directory+fbx print fbxFullPath hou.hscript("fbximport fbxFullPath")[/CODE]thx for you help Edited April 18, 2013 by ben Quote Link to comment Share on other sites More sharing options...
ben Posted April 18, 2013 Share Posted April 18, 2013 (edited) ok, get it ! Big string as you said... for the record : import os directory = "//xxxxxxx/fbx/" listFiles = os.listdir(directory) for fbx in listFiles : fbxFullPath = directory+fbx print fbxFullPath command = "fbximport "+fbxFullPath hou.hscript(command) Edited April 18, 2013 by ben Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.