Sign in to follow this  

Working on a maxscript program with a little problem.

Recommended Posts

    local v1 = polyop.getVert pick.Object verts[1]
    local v2 = polyop.getVert pick.Object verts[2]
   local proj = abs (v1.pos - v2.pos)

Here v2.pos reports an error. invalid property or something



Share this post

Link to post
Share on other sites

Looks like (going from this page: ) it returns a position (which is a Point3 IIRC) already



polyOp.getVert <Poly poly> <int vertex> node:<node=unsupplied>

Returns the position of the specified vertex. If <poly> is a node, or if <poly> is an Editable Poly and <node> is specified, the position returned is in the current coordinate system context. If <poly> is an Editable Poly and <node> is not specified, the return value is in the poly's local coordinate system.


So you probably don't want to use v1.pos and v2.pos, just use v1 - v2.


And you probably want the length rather than abs (since v1 - v2 is a vector not a scalar)?

Edited by Paradigm Shifter

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this