PDA

View Full Version : problem with VMSELECT vertexmaps



Alexx
11-15-2007, 02:53 PM
Hi,

I'm stuck on adding points in a VMSELECT vertexmap... this type of vmap has a dimension of 0, so no value has to be specified for the vertex, it should only be mapped or not into the vmap... but how to do this ?

myvertexmap.setValue(pointID,1); returns an error

myvertexmap.setValue(pointID); no error, but does nothing, the vertex is not mapped

so, how to do ?

thanks

Alexx

Dodgy
11-15-2007, 04:53 PM
editbegin();
mygroup=VMap(VMSELECT,mygroupname[1],1);
foreach(p,mypoints)
{
mygroup.setValue(p,1);
}
editend();

Alexx
11-16-2007, 01:19 AM
thanks, but could you explain this line please :

VMap(VMSELECT,mygroupname[1],1);

what means the last '1', and where did you find this ?

bye

Alexx

Alexx
11-16-2007, 02:48 AM
Re...

Sorry, but this doesn't works as expected : I want to add points into an existing group, and you example only allows to create a new group :/

so ? any idea to fix this ?

thanks

Alexx

Sensei
11-16-2007, 08:17 AM
Use same name for vmap as already existing..

Alexx
11-16-2007, 09:11 AM
Use same name for vmap as already existing..

this is exactly what I have done, and it doesn't works :(
the points are not mapped to the vmap.

"GroupA" is an existing point group
selmode(USER);
editbegin();
mygroup=VMap(VMSELECT,"GroupA",1);
foreach(p,points)
{
mygroup.setValue(p,1);
}
editend();

after this, no point is added to the vmap....

Sensei
11-16-2007, 09:38 AM
Stupid question - you know that to test whether it's working you need to open Statistics window, pick up group in last entry, and press +, all in Point mode... ?

Alexx
11-16-2007, 10:08 AM
of course... this is my first test after running the script :p

Dodgy
11-16-2007, 10:42 AM
This works for me.

Alexx
11-16-2007, 11:07 AM
doesn't works for me...

To reproduce the problem : create a sphere, select some points, and create a group with the classic modeler function

deselect all points

then run your script, use the same name as the group you've juste created
it should add all the points to the group... but it doesn't

if you create the vmap from the script, then it's ok,if you want to update an existing map, not

Dodgy
11-16-2007, 11:22 AM
Looks like a bug. Fog it with example code and object.

Alexx
11-16-2007, 11:53 AM
test object :

http://www.alesk.fr/vrax/test.lwo

a sphere with the bottom points mapped to a VMSELECT map called "Test"

then run your script on it, keep "Test" for the vmap name => all points should be mapped

but it does not :/

Alexx
11-19-2007, 11:12 AM
Hi !

So any idea to fix this ?

thanks

Alexx