jon3de Posted October 22, 2019 Share Posted October 22, 2019 I have a switch with some inputs. Swtich input is linked to $F to loop through. For all of the inputs I created a detail attribute "type" e.g. "sphere" / "torus" / "box". The null node reads the detail attribute and writes the value in its parameter. I want to setup the rendering in a way that it will skip the render if the null node detects that I am rendering a "box". I thought of doing that with a pre frame script that checks the parameter of the null node if its == "box" and then skip the render. What would be the best way to skip the render here? Is there a hscript or python expression for that? Jon skipFramesByAttributeValue.hip Quote Link to comment Share on other sites More sharing options...
jeremiah Posted October 24, 2019 Share Posted October 24, 2019 Hi, try this in your pre-frame script read_node = hou.node('/obj/skip_frames_based_on_attribute/read_Detail_attribute') path = read_node.path() value = read_node.evalParm(path+"/obj_type") switch = hou.node("/obj/skip_frames_based_on_attribute/switch1") if "box" in value: offsetvalue = switch.evalParm("offset") offsetvalue +=1 switch.setParms({"offset":"%d"%offsetvalue}) Also i had to do some change for the switch sop. Cheers, 1 Quote Link to comment Share on other sites More sharing options...
jeremiah Posted October 24, 2019 Share Posted October 24, 2019 Here's the hip file. @jon3de skipFramesByAttributeValue_modified.hip Quote Link to comment Share on other sites More sharing options...
jon3de Posted October 25, 2019 Author Share Posted October 25, 2019 Hey Jeremiah, thank you for your post. If I got it correct, in your file the renderer does not skip or abort the rendering prozess for that frame it just renders the next object in the switch. And then in the next Frame it renders that object again. Which is not what I want. Lets say I render this project for the first time. I have rendered frames 1 - 10 and I have 10 ifd files on disk . Then I have to rerender the images because of some adjustments on the sphere and the torus. I want to be able to send the whole sequenz to the farm again but the script should prevent oversaving the ifds where it detects that there is the e.g. "box" attribute on it. This scene file is a small simplified part of an automated pipeline Im working on with thousands of images. Maybe my plan will sound a little bit strange Quote Link to comment Share on other sites More sharing options...
3dome Posted October 25, 2019 Share Posted October 25, 2019 maybe you could try a different approach, like creating an array with the frames you want to render and then use a few lines of python as discussed here 1 Quote Link to comment Share on other sites More sharing options...
jon3de Posted October 25, 2019 Author Share Posted October 25, 2019 Hi Dominik, That sounds not to bad. I will dig into that. Since Im rendering with Deadline I could also create the array with a python script and paste that in the override Frames parameter in the deadline Submission Dialog. That could work. Thank you!! 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.