Expresion driven parameters in Maya

   3493   2   2
User Avatar
Member
1904 posts
Joined: Nov. 2006
Offline
We have an otl that is basically a wrapper around some ocean tools and one of the parameters is the Time parameter from the ocean evaluate which set to $T. In Maya this is not evident of course, however the attribute is animated in the interface and the ocean is properly doing it's thing. We have built some tools that can export the maya attributes for the otl to a file so that animators can set up the oceans in Maya and then export the settings back to Houdini for fx/lighting/rendering.

Our issue is that when we process the otl in Maya there doesn't seem to be a way to tell that the time parameter is animated or driven by Houdini and not itself so we end up with a constant value in our settings file. Is there some sort of way we can determine that the parm is being driven magically by Houdini (ideally even the expression or whatever that is modifying things)? I might be missing something as I'm not a Maya person.

Thanks
Graham Thompson, Technical Artist @ Rockstar Games
User Avatar
Member
1799 posts
Joined: Oct. 2010
Offline
Hey Graham, this is not super magical, but how about simply outputting the $T variable to an output plug? in an older houdini engine build, you could output it to the transform of a dummy object (which will show up in the engine as one of the output.outputObjects transforms, OR, if you have the latest and greatest, I believe you can pass it as an attribute to maya which the engine will convert it to a maya attribute

once you have an output attribute which passes the data, you should be able to do a simple getAttr
-G
User Avatar
Member
818 posts
Joined: Sept. 2013
Offline
graham
Our issue is that when we process the otl in Maya there doesn't seem to be a way to tell that the time parameter is animated or driven by Houdini and not itself so we end up with a constant value in our settings file. Is there some sort of way we can determine that the parm is being driven magically by Houdini (ideally even the expression or whatever that is modifying things)? I might be missing something as I'm not a Maya person.

Hm, there isn't a good way to determine that at the moment. Do you actually need the evaluated value? If getting the expression itself is acceptable, then you could change the float parm into a string parm, but keep the expression there. The expression will continue to evaluate inside the asset. When it's loaded into Maya, the string parameter will appear as the expression itself. And a simple parse could determine whether this is an expression or not. This is not pretty, but depending on your need, it might be sufficient. See the attached asset.

Attachments:
string_expression.hda (14.3 KB)

Andrew / アンドリュー
  • Quick Links