Jump to content

Making a selection Gui


Recommended Posts

I saw this link today:

http://www.animschoolblog.com/2013/04/animschool-picker-released.html

and wondered how I might add something like this to my DA character. I've already got control nulls in place for the various bones and IK controllers. And I've got these exporting the relevant params to the DA, so when you select one of the controllers you get the appropriate handle, and so forth.

I started experimenting with a an object (the gui element) that when selected performs a selection script and selects another object (the controller null). I can get this to work, but what happens is that it selects the right node, but then it moves you into the DA, as opposed to staying put and just displaying the translator handle. So there's something I'm not understanding here, but I'm not sure what all is going on.

Link to comment
Share on other sites

Here's a simple example of what I'm talking about:

Here's hte scene

post-4235-0-34054900-1367962609_thumb.jp

I want to select the shape in the "gui"

post-4235-0-61747000-1367962625_thumb.jp

and have that immediately select the correct controller in the rig

post-4235-0-06853400-1367962635_thumb.jp

which I can then manipulate and rotate (or translate or whatever)

post-4235-0-89829700-1367962642_thumb.jp

And have this all wrapped up in the DA. Then to view the GUI, I figured that you could open up another floating pane, set it to a Scene View, and an ortho view that's centered on the GUI shapes. Does that make any sense?

anim-gui.hipnc

myanimobj.otl

Link to comment
Share on other sites

  • 4 weeks later...

Edward, thanks for the suggestion, I had a chance to get back to this, this time just using plain old buttons in the Parameter intereface. I can select an object by using

ctrl = hou.node(.....)

ctrl.setSelected()

but it always takes you into the asset, regardless of whether show_asset_if_selected is true or false. Is there an alternate way of selecting the ctrls without being taken into the DA? It does this even if the asset is locked.

Link to comment
Share on other sites

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...