How to set condition

   1342   4   1
User Avatar
Member
38 posts
Joined: Oct. 2021
Offline
Hi guys,
I need to set condition based on a wedge attribute to set an other wedge, how could I set this?


Thank you for help
Wow factor
User Avatar
Staff
586 posts
Joined: May 2014
Offline
You can refer to wedge attribute values using the @attrib syntax or the pdgattrib(..) function in an HScript expression. For example, @scale.2 or pdgattrib("scale", 2) will both access the "scale" attribute at index 2.

On the wedge node itself it's possible to change the Wedge Type from Range to Value. You can then type in an expression that uses other prior wedge attributes to control the value.
User Avatar
Member
38 posts
Joined: Oct. 2021
Offline
COuld you share a simple scene with wedges please? I can't get it work with attributes in interface.. SOmething I'm doing wrong for sure...
Wow factor
User Avatar
Staff
586 posts
Joined: May 2014
Offline
I've attached an example with a wedge that randomly creates one attribute, and then creates another one derived from the first one. I also included an example of how you might use the Split node based on a wedge value to separate out work items that match a condition.

Attachments:
wedge_example.hip (96.1 KB)

User Avatar
Member
38 posts
Joined: Oct. 2021
Offline
Thank you very much Tpetrick!!
Wow factor
  • Quick Links