Jump to content

How to build a menu parameter that changes a color ramp?


magneto

Recommended Posts

Hi,

 

I am trying to create some presets for my ramp similar to Volume Visualization SOP:

 

x1mIcxw.png

 

I can built a menu but I don't know how I can define what happens when it's clicked. I checked AttribWrangle since it does a similar thing with its snippet menu button but it uses vexpressionmenu, which is not found or documented anywhere.

 

 

Thanks :)

Link to comment
Share on other sites

Guest mantragora

Use menu script to create those options. You set it in similar fashion like when you filling group menu. Just when some option is picked execute callback to Python module to set proper values on ramp.

 

I'm not sure can you do this on normal node. I think you need Digital Asset.

Edited by mantragora
  • Like 1
Link to comment
Share on other sites

Thanks mantragora. So you just use the callback script field of the menu parameter? That makes sense. For presets, like you said it seems like the callback script is limited to a single line?

 

It would be nice if we could treat that field like any other parameter where we could write multi line scripts.

Link to comment
Share on other sites

Guest mantragora

I got example in the works for you. Just give me couple more minutes because I'm making something special just for you... ;)

  • Like 1
Link to comment
Share on other sites

  • 3 years 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...