PDA

View Full Version : getVertexPosition returns incorrect values


soulburn3d
10-06-2009, 09:26 PM
Think I found a bug, just looking for confirmation (or an explanation as to what I'm doing wrong <G>)

1) Open attached file in max. It's just a simple polygon with a UVW unwrap modifier ontop.
2) Select Plane01
3) Go to modify panel, open up the unwrap, click edit, you should see the object's uvs.
4) Run the following code...

obj1 = $Plane01
sourceverts = polyop.getMapFace obj1 1 1
for v in sourceverts do
(
print (obj1.modifiers[1].unwrap.getVertexPosition currenttime v)
)

You should see results like this...

[0,1,0]
[0,0,0]
[0.5,0,0]
[0.5,1,0]

These are the results you expect.

5) Close the UV Window.
6) Click on the modifier to get out of subobject mode
7) Deselect the object
8) run the code a second time

You should see results like this...

[0.5,1,0]
[0.5,1,0]
[0.5,1,0]
[0.5,1,0]

which is totally wrong.

Anyone know what might be going on. happens in max 2009 and 2010, 64bit. Thanks.

- Neil

Bobo
10-06-2009, 10:10 PM
I am quite sure any Unwrap-related scripts MUST be run with the modifier selected in the Modify Panel, but I could be wrong.

soulburn3d
10-06-2009, 10:42 PM
Yup, that looks to be the case. I'm gonna mark that as a bug and pass it to autodesk, it may be a known limitation, but it's gonna make my script really messy. Thanks for the info Bobo.

- Neil

denisT
10-06-2009, 11:21 PM
Yup, that looks to be the case. I'm gonna mark that as a bug and pass it to autodesk, it may be a known limitation, but it's gonna make my script really messy. Thanks for the info Bobo.

- Neil

it's not a bug. UVW Unwrap modifier interfaces always worked only if this modifier is modpanel's current object and UVW Editor is opened.

soulburn3d
10-06-2009, 11:33 PM
Just because something never worked doesn't mean it's not a bug.

I'll give it a more PC label then, I will mark it as a "workflow enhancement" :)

- Neil

denisT
10-06-2009, 11:52 PM
Just because something never worked doesn't mean it's not a bug.

I'll give it a more PC label then, I will mark it as a "workflow enhancement" :)

- Neil

good luck... also you can mark Edit Normals, and Skin modifiers. It will be nice to get them fixed too. ;)

PEN
10-07-2009, 02:22 AM
Looks like it is in many of the tools that Peter developed years ago.

JHN
10-07-2009, 01:47 PM
I really dislike some interfaces that require the modifier to be set to the current, with the modpanel open as well. I think pointcache has this problem too...

-Johan

CGTalk Moderation
10-07-2009, 01:47 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.