bentraje Posted May 27, 2021 Share Posted May 27, 2021 Hi, Is there away to automate my Output File parameter in ROP FBX Output node based on the Geometry File parameter in File node? For example, Input: Geometry File: D:/chair_big.fbx Output: Output File: D:/chair_big_fixed.fbx I have a lot of these fbx files that needs fixing and it would be nice if I can just swap them out and click save disk rather than changing the output file everytime. I can use the copy/paste relative reference but there is the "_fixed" suffix that I don't know how to insert lol Quote Link to comment Share on other sites More sharing options...
toadstorm Posted May 28, 2021 Share Posted May 28, 2021 Throw this in your Python Source Editor and run it: import hou import os fbx_rops = [f for f in hou.root().allSubChildren() if f.type().name() == "rop_fbx"] if fbx_rops: for rop in fbx_rops: outparm = rop.parm("sopoutput") if "_fixed" not in outparm.eval(): basepath = os.path.splitext(outparm.unexpandedString())[0] newpath = basepath + "_fixed.fbx" outparm.set(newpath) 1 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.