Jump to content

how to control / get Curve SOP's current 'tweakable' point


zarti

Recommended Posts

hello to everyone ! ,

i'm currently working in a simple HDA ( purpose ; being able to manually enter point's coordinates as the pseudo-Polyline builds ... )

the HDA currently has a Curve SOP inside it to which i send the new point's coordinates through buttons ( python scripts ) from HDAs interface . i'm in the first steps on building it and i actually want to 'jump' my attention/focus from the latest point to any other one ( similar with the manual selection while interactively drawing / manipulating the Curve in viewport ).

my question is this : is this doable through Python ?

to be fair , i'm not successful 100% of times even when i try to do it manually on viewport , while the curve is inside the HDA. i loose its 'natural' interactivity or at least do not know the Exact State i should be in, in order to have the same interactivity . any advice about this ?

another more general question :

is it possible have printed interactively every command of every action we do ? i'm mostly interested to read / know what 'happens' when we interact with viewports ( selections , manipulators , focus , etc .. )

hope i was clear in my post because i'm new to Hou and Python and ,

thanks in advance for any kind of help !

post-5487-130113742231_thumb.png

Link to comment
Share on other sites

Unfortunately there isn't much you can do with Python, or Hscript for that matter, that can deal with setting specific interactive states in the viewer. Other than selecting different things the only thing you can really do is just enter the current nodes state, which in the case of a Curve SOP would enter the mode where it wants you to click to create points if none exist, or to Shift + click to add points to the end. Focus will be set to the last point and there is no way to create focus to any particular one.

There's not really any way to output everything you do as a script since much of it isn't done like that or available through scripting. There is an Hscript command, "commandecho", that can output very limited actions but it's not really useful. The closest thing you could probably do is take a look at the .py script files in $HH/python2.X/ to see what Houdini is doing when it is doing certain tools and whatnot. Other than that there's really not much.

Edited by graham
Link to comment
Share on other sites

...

There's not really any way to output everything you do as a script since much of it isn't done like that or available through scripting. ...

wd be good for commands that are available though ...

just posted a ' wish ' here : H12 WishList with a video reference .

.cheers

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