Adding Objects in Path using Primwrangle

   998   5   1
User Avatar
Member
4 posts
Joined: Oct. 2017
Offline
Hi i want to add objects to specific path based on there name using vex i write something but its merging mesh in to one object any help is appreciated i am attaching my file with this thanks!

if(@name ~= "sphere*"){
s@path = ("/shop/assets/Sphere");
}
Edited by vpfx - July 5, 2023 13:05:00

Attachments:
vexpath.hip (135.0 KB)

User Avatar
Member
1008 posts
Joined: April 2017
Offline
I would go like this:


if(find(s@name, "sphere") >= 0){  // if it finds the word sphere, it will give a number above zero
s@path = "/shop/assets/Sphere";
}
Edited by olivierth - July 5, 2023 14:20:32
User Avatar
Member
4 posts
Joined: Oct. 2017
Offline
olivierth
I would go like this:


if(find(s@name, "sphere") >= 0){  // if it finds the word sphere, it will give a number above zero
s@path = "/shop/assets/Sphere";
}


Thanks for the reply olivierth , the result is same for me.. its merging anything that names sphere in to one object mesh instead of adding them individually on the xform

Attachments:
vex03.png (140.9 KB)

User Avatar
Member
130 posts
Joined: June 2016
Offline
to avoid merging, you would need to add the existing @name to the path
if(@name ~= "sphere*"){
s@path = concat("/shop/assets/Sphere/",s@name);
}

Edited by Mohanpugaz - July 6, 2023 03:53:57

Attachments:
Screenshot 2023-07-06 132104.png (269.4 KB)

Mohan Pugaz
movfx
https://www.instagram.com/movfx/ [www.instagram.com]
https://www.youtube.com/channel/@_movfx
User Avatar
Member
130 posts
Joined: June 2016
Offline
If you have multiple objects in each of the categories then you could set it up like this




Also attached .hiplc file if you wanna take a look

Attachments:
Screenshot 2023-07-06 133157.png (421.0 KB)
vexpath_movfx.hiplc (143.2 KB)

Mohan Pugaz
movfx
https://www.instagram.com/movfx/ [www.instagram.com]
https://www.youtube.com/channel/@_movfx
User Avatar
Member
4 posts
Joined: Oct. 2017
Offline
Mohanpugaz
If you have multiple objects in each of the categories then you could set it up like this

Image Not Found



Also attached .hiplc file if you wanna take a look

Thanks a lot Mohan Pugaz this is Extremally helpful and Works Like a Charm
  • Quick Links