How to pattern match to assign materials in Solaris

   2765   2   0
User Avatar
Member
654 posts
Joined: Aug. 2013
Online
Hi

I am trying to pattern match to assign materials in Solaris with the assign material LOP.
If my setup looks like this:
Primitives: /sopcreate1_box
MaterialPath: /materials/box_mat

All is fine. If I try to replicate how I used to do this before Solaris it would have looked like this:
Primitives: /sopcreate1_box*
MaterialPath: /materials/box*

And it would have worked. How to you mass assign materials to the same name of objects now? (box, box1, box 2 etc). It looks like I need to specify Material and object using CVEX or Vexpression but digging around I am a little lost. I have had a Hip file included. Thanks for any help.

OK What a plonker. I just realaized it needs to be like this..

Primitives: /sopcreate*_box*
MaterialPath: /materials/box*

I forgot to add a * after the sopcreate.
Edited by Mark Wallman - March 9, 2020 16:26:45

Attachments:
patternMatchingTest.hipnc (329.8 KB)

User Avatar
Staff
1449 posts
Joined: July 2005
Offline
You can use pattern in Primitives parameter but not in Material Path. Looking at the hip file, there are only two materials, so you should not need to use pattern for the Material Path anyway. Try

Primitives: /sopcreate1_box*
Material Path: /materials/box_mat
and
Primitiveas: /sopcreate1_ball*
Material Path: /materials/ball_mat

Otherwise, could you attach a quick .hip example of how you used to do this before Solaris?
User Avatar
Member
654 posts
Joined: Aug. 2013
Online
Hi Rafal

This is perfect. It was user error on my part getting it wrong.

Thanks

Mark
  • Quick Links