Johannes Saam Posted December 29, 2011 Share Posted December 29, 2011 Hey dudes, I know its sounds simple but i am not really sure how to attack a python problem i have efficently. I have camera information stored in one single file for a sequence. Now i wanna create a custom camera hda that reads that file. I tried different ideas so far without enough success. For example using an expression to setWorldTransform of a camera node inside my hda. Worked great but as soon as i make that otl live, changing its content created a permission error. I tried a python script in the hda onUpdate... but change of time does not seam to trigger it. I know i could wirte functions in the hdaModule() but how would that update it? So the basic question is, i have ONE file for a sequence inside there is a world space matrix and some other parameters, i have a python API to read the file and get the values out. How do i go about creating an otl that is fast and updates every frame. Thanks! jo Quote Link to comment Share on other sites More sharing options...
graham Posted December 29, 2011 Share Posted December 29, 2011 Take a look at Python Objects. They allow you to set the world transform for the node when it cooks. Quote Link to comment Share on other sites More sharing options...
Johannes Saam Posted December 29, 2011 Author Share Posted December 29, 2011 but would it recook? Do i create a hidden time dependent attribute? Take a look at Python Objects. They allow you to set the world transform for the node when it cooks. Quote Link to comment Share on other sites More sharing options...
graham Posted December 29, 2011 Share Posted December 29, 2011 To make a node time dependent if it isn't already you just need to have a call to hou.frame() in your cook code. Since you are most likely already doing this in order to index into your sequence you shouldn't have to worry. Quote Link to comment Share on other sites More sharing options...
Nerox Posted January 27, 2012 Share Posted January 27, 2012 I know it has been a month since the last reply, but would it be an option to load the file in to memory? Like hou.session, or a sub-routine that reads in the data from the file and builds a animation curve? Whats the point of reading data from it on every frame? Unless the file is adjusted by another process... 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.