Jump to content
Sign in to follow this  
magneto

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

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 :)

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post
Share on other sites
On 2015/3/3 at 2:14 PM, Guest mantragora said:

Here it is.

 

TO_ADMINS: Why we cannot attach *.otlnc, *.hdanc ?

for_magneto.zip

Thank you so much! Somehow I cannot hit thank you on your entry...lol

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×