How to get and set attribute immediately in vex

   1604   5   1
User Avatar
Member
54 posts
Joined: Oct. 2017
Offline
void SetRoot(int primnum)
{
int boolRoot=prim(0,“Root”,primnum);//boolRoot=3
printf(“%d before:%d ”,primnum,boolRoot);
setprimattrib(0,“Root”,primnum,1,“set”);
setvertexattrib(0,“Cd”,primnum,1,{1,1,1});
setvertexattrib(0,“Cd”,primnum,0,{1,1,1});

boolRoot=prim(0,“Root”,primnum);//boolRoot=3
//getattribute(0, boolRoot, “primitive”, “Root”, primnum);
printf(“ after : %d \n”,boolRoot);

}
in attribute wrangle with Runover (Detail once) mode, after setting the primattrib,can not get the primattrib immediately,

above example, boolRoot should changed from 3 to 1,but not work;

This is Bug?

Attachments:
vex.png (309.1 KB)

User Avatar
Member
7836 posts
Joined: Sept. 2011
Offline
dreamerflyer19
This is Bug?

No, you can't write to the geometry being read.
User Avatar
Member
54 posts
Joined: Oct. 2017
Offline
jsmack
dreamerflyer19
This is Bug?

No, you can't write to the geometry being read.
but in spread sheet can see write attribute sucessed.
Edited by dreamerflyer19 - Oct. 14, 2020 03:26:39

Attachments:
vex2.png (68.7 KB)

User Avatar
Member
201 posts
Joined: July 2015
Offline
You can't read any changes from the geometry that you're applying from the same code.
Hope that makes sense.
Manuel Köster - Senior Technical Artist @Remedy Entertainment

https://www.remedygames.com/ [www.remedygames.com]
http://shadesoforange.de/ [shadesoforange.de]
https://twitter.com/ShadesOfOrange_ [twitter.com]
User Avatar
Member
54 posts
Joined: Oct. 2017
Offline
shadesoforange
You can't read any changes from the geometry that you're applying from the same code.
Hope that makes sense.
Get that,thanks all.It seems Must use other array to controll this.
User Avatar
Member
38 posts
Joined: Jan. 2018
Offline
You can only read the geometry from the input and write to output. But cannot get the middle state in VEX.
  • Quick Links