ikoon Posted August 16, 2017 Share Posted August 16, 2017 (edited) I did it with Hscript, everything is working fine as attached, so you may find it useful. But I would be glad if anybody could help me rewrite the script to Python, because HScript doesn't work with arrays and the python split() is much more convenient than hscript substr(). Or, please, how do you automate the combinations of takes/cams/frameranges renders? In the current project, I had more than 20 takes, multiple cameras and different frame ranges. So I used the Wedge ROP (By Take all the takes) and I have named my takes this way: name_startframe_endframe, e.g.: “magnetic_400_2200” “terrain_600_1800” Name is descriptive, for further comping. The first number is Start of the frame range, the second number is the End of the frame range. //For example this one is to extract the Start Frame or End Frame from the name of the take: { string take = chsop("take"); float first = index(take, "_"); float last = rindex(take, "_"); float start = first + 1; float length = last - first - 1; string startFrameString = substr(take, start, length); float startFrame = atof(startFrameString); float start = last+1; float length = strlen(take) - last - 1; string endFrameString = substr(take, start, length); float endFrame = atof(endFrameString); return startFrame; } The expression to generate the folder and filename (Output Image) e.g. is in the attached file.$HIP/render/magnetic_camL/magnetic_camL_$F4.png wedge.hiplc Edited August 16, 2017 by ikoon cleaned up the .hiplc 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.