Jump to content
Marcomeeuwse

attribute selection in switch node, or wrangle

Recommended Posts

hi odforce,

how comes

`if(@materialnr=1,1,0)`

does not work in a switch. I have 2 incoming nodes with an attribute named materialnr. I want to use switch to assign the right material on the right value. lets say material 1 and material 2

also, is this also possible in a pointwrangle?

Cheers

 

Share this post


Link to post
Share on other sites

Hi,

you can do this with the material node:

material_node.JPG.ec07f9675116fa9da64576b67e335f18.JPG

It's also possible with a wrangle by setting the "shop_materialpath" attribute based on the @materialnr variable. Using the material node is more convenient is this case though.

wrangle.jpg

Here's a file that showcases both methods:

material_assignment_by_variable.hip

Edited by LucaScheller

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

×