Jump to content

attribute selection in switch node, or wrangle


Saya

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

 

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