DerQualle Posted February 8, 2021 Share Posted February 8, 2021 Hi there! I'm trying to make a little ACES image converter HDA and I'm a bit stuck right now. I have a File node in my Cop2 network. This then passes through a vopcop to convert the image. Afterwards I added a rop File output to output the file. Now here is the part where I'm Stuck: I want the File Output to be the same as the file input, with _aces added to the filename, and the file extension taken from the parameters in my hda. For Example: Input in the File Node: D:/Desktop/filename.png File Extension in HDA Parameters set by the user: .exr Output in the ROP Node: D:/Desktop/filename_aces.exr Is this possible? I added a hip file with the current state of the HDA. Thanks! aces_converter.hiplc Quote Link to comment Share on other sites More sharing options...
anim Posted February 9, 2021 Share Posted February 9, 2021 you can construct it using python expression from your input parameters for example root = ".".join(ch("../img").split(".")[:-1]) ext = ch("../output").split(".")[-1] suffix = "_aces" return "{}{}.{}".format(root, suffix, ext) aces_converter_fix.hiplc 1 Quote Link to comment Share on other sites More sharing options...
DerQualle Posted February 9, 2021 Author Share Posted February 9, 2021 Hi Anim, this works perfectly. I didnt even know i could use python directly in the Output window. Learned a lot from your answer. Thanks mate! 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.