subframe caches into a file node - help!!!!!

   7541   4   0
User Avatar
Member
85 posts
Joined: Aug. 2010
Offline
Hi All
I am caching geo out of maya with subframes

the formating i am using for frame numbers is myGeoCache.0101.1.obj

how do i get a file node to read this as valid frame numbers?
I have been trying the following expression to no avail:

myGeoCache.`pythonexprs(“%06.1f” % hou.expandStringAtFrame('$FF'))`.obj

ideally i could just use a python expression but I am not having much luck
any ideas?
thanks in advance
Sam Swift-Glasman
Art Director
Five AI
User Avatar
Member
85 posts
Joined: Aug. 2010
Offline
I have solved this issue

this is the crazy expression that i came up with:

myGeoCache.`padzero(4,floor($FF))`.`ifs(strmatch(“*.*”,$FF),substr($FF, 4, 4),“0”)`.obj

my main issue was that when using non-integer frames in houdini, frame 101.0 is called 101 with no decimals, i had to use the ifs expression!
Sam Swift-Glasman
Art Director
Five AI
User Avatar
Member
12999 posts
Joined: July 2005
Offline
You can also just multiply the frame number by, like, 100 for write and read.

eg. myfile.`int($FF*100)`.bgeo
Jason Iversen, Technology Supervisor & FX Pipeline/R+D Lead @ Weta FX
also, http://www.odforce.net [www.odforce.net]
User Avatar
Member
85 posts
Joined: Aug. 2010
Offline
thank you jason, this is what i have settled on thanks to yourself and jenny at sesi support. it supports two digits of decimal places

cache.`pythonexprs(“'%04d.%02d' % (int(hou.frame()),int(hou.frame()*100)%100)”)`.obj
Sam Swift-Glasman
Art Director
Five AI
User Avatar
Member
1 posts
Joined: Oct. 2013
Offline
Thanks Sam for this great tip

I'm using Houdini 17 and had to change the quotations to the other way around. guessing they changed it at some point. Just thought id mention if anyone has issues.

cache.`pythonexprs('“%04d.%02d” % (int(hou.frame()),int(hou.frame()*100)%100)')`.obj
  • Quick Links