Hi,
trying to get pattern matching to work in Solaris, I got stuck a bit. This is one of the accepted patterns according to the documentation:
It does work as advertised, but seems to have some serious limitations.
For example, it seems to be limited to single digit numbers, for example, you can't select primitives containing numbers 11, 12, 13. (when I write , I always get the selection containing items 1, 2 and 3)
Also, I haven't worked out a way to do a range, for example 8-13. Is this kind of pattern possible?
PS: I'm using the Collection node to test this.
Thanks.
Cheers,
Ivan
Solaris pattern matching
2301 9 4- ivanmalek
- Member
- 143 posts
- Joined: Sept. 2017
- Offline
- traileverse
- Member
- 361 posts
- Joined: Nov. 2015
- Offline
- ivanmalek
- Member
- 143 posts
- Joined: Sept. 2017
- Offline
- traileverse
- Member
- 361 posts
- Joined: Nov. 2015
- Offline
- ivanmalek
- Member
- 143 posts
- Joined: Sept. 2017
- Offline
well... they're gone now... I found the square brackets way to be a bit lacking at first, but after I realized, that the inside of the brackets represents a character in a specific index of a string and not a number, that can be more digits, it is starting to make sense finally.
My second trouble was with the VEX version, since unlike the AssignMaterial node, the Collection node doesn't seem to support VEX. After realizing, that the Collections node is actually just a primitive and can be edited using a Wrangle node, I can now edit Collection using VEX in the Wrangle node.
So pretty much problem solved.
Thanks for your patience with me... takes a while to get into the whole USD thing.
Cheers,
Ivan
My second trouble was with the VEX version, since unlike the AssignMaterial node, the Collection node doesn't seem to support VEX. After realizing, that the Collections node is actually just a primitive and can be edited using a Wrangle node, I can now edit Collection using VEX in the Wrangle node.
So pretty much problem solved.
Thanks for your patience with me... takes a while to get into the whole USD thing.
Cheers,
Ivan
- traileverse
- Member
- 361 posts
- Joined: Nov. 2015
- Offline
ivanmalek
well... they're gone now... I found the square brackets way to be a bit lacking at first, but after I realized, that the inside of the brackets represents a character in a specific index of a string and not a number, that can be more digits, it is starting to make sense finally.
My second trouble was with the VEX version, since unlike the AssignMaterial node, the Collection node doesn't seem to support VEX. After realizing, that the Collections node is actually just a primitive and can be edited using a Wrangle node, I can now edit Collection using VEX in the Wrangle node.
So pretty much problem solved.
Thanks for your patience with me... takes a while to get into the whole USD thing.
Cheers,
Ivan
Great yeah man we have to help each other learn this stuff, it's a bit complex but as we start to use it more why understand that the complexity is necessary, because of what USD allows us to do. To be honest, I'd have taken anything over having to use the object context for lighting and rendering lol.
hou.f*ckatdskmaya().forever()
- tamte
- Member
- 8766 posts
- Joined: July 2007
- Offline
ivanmalekdoes the fact that it makes sense help you figure out how to specify a range as a pattern?
well... they're gone now... I found the square brackets way to be a bit lacking at first, but after I realized, that the inside of the brackets represents a character in a specific index of a string and not a number, that can be more digits, it is starting to make sense finally.
To me it also makes sense that every
[]
represents possible characters for a single characterhowever over the years I haven't been able to figure out how to use it for arbitrary range like 09-20
I must admit that I've mostly tried this in Group syntax as a range for digits in group name or atribute name, but looking at Pattern Syntax it seems to have similar limitation
also looking at the file I don't see it having the range specified as a pattern and that VEX will work only if the matched prims contain all the numbers
there is of course always a possibility to parse the whole names in VEX, but that's much more code than being able to do explicit ranges in the code
Edited by tamte - April 6, 2023 23:28:57
Tomas Slancik
FX Supervisor
Method Studios, NY
FX Supervisor
Method Studios, NY
- ivanmalek
- Member
- 143 posts
- Joined: Sept. 2017
- Offline
tamteivanmalekdoes the fact that it makes sense help you figure out how to specify a range as a pattern?
well... they're gone now... I found the square brackets way to be a bit lacking at first, but after I realized, that the inside of the brackets represents a character in a specific index of a string and not a number, that can be more digits, it is starting to make sense finally.
To me it also makes sense that every[]
represents possible characters for a single character
however over the years I haven't been able to figure out how to use it for arbitrary range like 09-20
I must admit that I've mostly tried this in Group syntax as a range for digits in group name or atribute name, but looking at Pattern Syntax it seems to have similar limitation
also looking at the file I don't see it having the range specified as a pattern and that VEX will work only if the matched prims contain all the numbers
there is of course always a possibility to parse the whole names in VEX, but that's much more code than being able to do explicit ranges in the code
Hi Tomáš,
Yeah, arbitrary ranges like those definitely look like a problem. But at least I'm not trying to find a syntax for specifying it inside the brackets anymore😁... That cost me quite some time.
You're also right about VEX only starting to make sense in few specific cases for this, at least in my type of work.
I mean, if this thread were to spark a RFE, I'm all for it.
Cheers,
Ivan
- Mário Domingos
- Member
- 13 posts
- Joined: July 2013
- Offline
Hi. I was looking for a similar solution. Can I use a random number between 1-10 for example? Is there a way to do that somehow?
I have this object where each bit has a piece attrib. I want to randomly assign a different material to each piece. Or do something like @pice > 3...
Cheers
Mario
I have this object where each bit has a piece attrib. I want to randomly assign a different material to each piece. Or do something like @pice > 3...
Cheers
Mario
Edited by Mário Domingos - Dec. 10, 2023 20:17:57
- AnimGraphLab
- Member
- 66 posts
- Joined: May 2019
- Offline
Mário Domingos
I want to randomly assign a different material to each piece
Hey Mario, possibly you're looking for a Material Variation LOP node [www.sidefx.com].
Videos
Edited by AnimGraphLab - March 29, 2024 13:21:10
Generalist. Transforming still images to 3D animation 🔮
Socials: https://linktr.ee/AnimGraphLab [linktr.ee]
Socials: https://linktr.ee/AnimGraphLab [linktr.ee]
-
- Quick Links