Jump to content

Getting the start/end frames in a ROP


Guest xionmark

Recommended Posts

Guest xionmark

Greetings,

I've got a ROP (the Real Flow ROP) that I'm having trouble getting the start and end frames from the ROP's GUI.

The IFD_RenderParms has myNFrames. myStartTime and myTimeInc member variables but apparently no way to simply retrieve the start and end frames. I thought I'd be able to calculate them with the use of the 3 member vars mentioned above but myTimeInc isn't a constant value!

I would have assumed myTimeInc was the inverse of the FPS, but it isn't ... it changes when the length of the frames changes ... one would think, no problem, I've got myNFrames to work out the correct frame range ... but myTimeInc changes in what seems to be a non-linear fashion.

I've also looked through IFD_Scene and can't find anything related.

Would anyone know what myTimeInc really represents?

--Mark

P.S. One of these days I'll have the time to answer more questions than I post ... :blink:

Link to comment
Share on other sites

Guest xionmark
You can call 'float FSTART()' and float 'FEND()' to get the start/end frames. To see if the user has turned on frame range rendering, call 'int DORANGE()' to see if the toggle is enabled. (See ROP_Node.h)

15371[/snapback]

Hi Mark,

Dag nabbit! I shoulda just looked further up the class hierarchy! :rolleyes:

Thanks Mark!!!

--Mark

Link to comment
Share on other sites

Guest xionmark
You can call 'float FSTART()' and float 'FEND()' to get the start/end frames. To see if the user has turned on frame range rendering, call 'int DORANGE()' to see if the toggle is enabled. (See ROP_Node.h)

15371[/snapback]

Ahh ... I remember what the issue was (it's been a few months since I last looked at this).

The trick is getting the values from the GUI (via ROP_Node) into the IFD_Scene (where the real rendering work is done) ... For example, in the case for the Real Flow ROP, I have a toggle to allow the user to switch from "matrix" to "vertex" mode for the SD file to be written. This is done by "hijacking" the depth of field parameter (which is not being used for this ROP), and getting the value in IFD_Scene with a call such as:

myRFSDFile->myRF_SD_Obj_Header.obj_mode = (char)scene.doDepthOfField(now);

I need to read the docs again, that's where I found this trick, but isn't there a better way to pass values from the ROP_Node to IFD_Scene?

It'd be nice if there was some sort of generic "shared memory" area that can be accessed from both classes ... ? Maybe there's already a better way to do this? Something new in HDK7.0 perhaps? :)

--Mark

Link to comment
Share on other sites

I need to read the docs again, that's where I found this trick, but isn't there a better way to pass values from the ROP_Node to IFD_Scene?

15377[/snapback]

Override ROP_Node::getRenderTag() which will return the information from your parameters to the IFD_Scene. Then in your IFD subclass, you can just use getRenderTag() to get at the ROP data.

Link to comment
Share on other sites

  • 3 months later...

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...