jungjaehwa Posted October 17, 2012 Share Posted October 17, 2012 (edited) Hi, I want to get start and end frame sequence length in file SOP. How to get that information ; sequence info(start & end) I can not find variable or expression out in Houdini. Please let me know. Edited October 17, 2012 by jungjaehwa Quote Link to comment Share on other sites More sharing options...
strages Posted October 17, 2012 Share Posted October 17, 2012 Again the first thing that comes to mind is a cheap solution using just 2 things: In the File sop you can flag "Missing Frame" as "No Geometry" and using the expression "haspointattrib" with for example the attr "P", you can know if it has geometry loaded yes or no. And maybe do this within a solver sop? interested what the final solution would be. Quote Link to comment Share on other sites More sharing options...
sadhu Posted October 17, 2012 Share Posted October 17, 2012 (edited) I think arg expression can be useful in this case. If you follow a typical patter for naming the file , for example $HIP/name_10_50 .$F.bgeo then arg(chs("../file2/file"),1) should give you 10 and arg(chs("../file2/file"),2 ) should give you 50 Where file2 is the node you are using to read the written files. Write these expressions in inrange1 and inrange2 para of time warp sop. Refer attached image. Edited October 17, 2012 by sadhu Quote Link to comment Share on other sites More sharing options...
Scratch Posted October 17, 2012 Share Posted October 17, 2012 (edited) Check this detailed list of global expression variables. I'm sure there is one that suites your needs: http://www.sidefx.co...houdini12.1/expressions/_globals EDIT: For some reason the link is interpreted wrong here, so please just copy paste it into your browser. It will work then. I'd suggest $RFSTART and $RFEND or just $FSTART and $FEND Hope that helps! Edited October 17, 2012 by Scratch Quote Link to comment Share on other sites More sharing options...
ben Posted October 17, 2012 Share Posted October 17, 2012 (edited) import ospath = "C:\\TEMP\\"splitCharacter = "_"list = []for filename in os.listdir(path) :basename, extension = filename.split('.')prefix, value1, value2, number = basename.split('_')list.append(number)highestnumber = max(int(i) for i in list)lowestnumber = min(int(i) for i in list)return highestnumber[/CODE]change your timewarp node from hscript to python and paste the code.just change it to return lowestnumber for the min range.It should work with you naming convention : prefix_value1_value2_number.bgeoEdit: it assume there's only one sequence in your path. Edited October 17, 2012 by ben Quote Link to comment Share on other sites More sharing options...
jungjaehwa Posted October 17, 2012 Author Share Posted October 17, 2012 Thanks ALL really good idea. These days I am charge of game effect design for fx concept of previz. I have been used Houdini that is my lovely tool. In Game Effect, Houdini is powerful and fast. According to your advice, I will try to define file naming. When finishing, I will upload with other questions. Talk to you continuously. 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.