Jump to content

Writing VEX SOPs


Stremik

Recommended Posts

I'm tying to write an SOP OP that would allow multiple inputs.

How is it usually taken care of?

For instance I want to be able to pipe two sphere OPs in to this one and modify appearance of the spheres individually. Based on the R of each sphere.

Bigeer R of the sphere will resault in bigger displasement of the surfase of this individual sphere and vice versa.

Any help?

Thank you!

Link to comment
Share on other sites

OK. Let me put it this way.

When I do "Create Type From" in Houdini, I'm presented with an option

to spesify a minimum and maximum numbers of inputs.

How do I do it in VEX by hand? How does a custop VEX OP reads in inputs

and tells them apart?

Thanks!

Link to comment
Share on other sites

Doesn't this work for you?

I think he is trying to do it by hand.

Try these out.

#pragma opname [your opname]

#pragma oplabel [your op's label, (the friendly name)]

#pragma opmininputs [min number of inputs]

#pragma opmaxinputs [max number of inputs]

jim.

Link to comment
Share on other sites

How does a custop VEX OP reads in inputs

and tells them apart?

I don't see anything off the bat that would tell which input the point is coming from. For second place..... you could always append a group SOPs right before each of the inputs. Then use the ingroup() function.

jim.

Link to comment
Share on other sites

BTW. I wander if you happen to know wether "Quick Function Reference" includes oll of the VEX functions or is there something else?

It seems like this is the case. For instance, I couldn't find "maxinputs" and "mininputs" pragmas in there.

Link to comment
Share on other sites

Doesn't this work for you?

I think he is trying to do it by hand.

Try these out.

#pragma opname [your opname]

#pragma oplabel [your op's label, (the friendly name)]

#pragma opmininputs [min number of inputs]

#pragma opmaxinputs [max number of inputs]

jim.

You're right. I have missread this topic... (I think it's because of Stremik's reply. It made it look as if he was talking about VOPs).

Please excuse me for the inconvenience :ph34r:

Link to comment
Share on other sites

It seems like this is the case. For instance, I couldn't find "maxinputs" and "mininputs" pragmas in there.

The quick reference is here $HFS\houdini\vex\html\quickref.html

and the pragmas are here

$HFS/houdini/vex/html/compiler.html#cg_pragma

Those that I listed I found by creating a VOP with multiple inputs then started digging through the vex code. :)

jim.

Link to comment
Share on other sites

Those that I listed I found by creating a VOP with multiple inputs then started digging through the vex code.

I've tried this with SOPs but it wouldn't show any VEX code. :(

Please excuse me for the inconvenience

Don't be ridiculous man.

There can't be any.

Link to comment
Share on other sites

I've tried this with SOPs but it wouldn't show any VEX code. :(

Try right clicking VOP and choose "View Code". That should work. :unsure:

Please excuse me for the inconvenience

I'm sorry, I wasn't trying to be mean or anything. I just wanted to make sure we were all on the same page of music. :D

jim.

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