Render.ru

mesh.verts (MaxScript)

Sasquatch

Активный участник
Рейтинг
5
#1
Пытаюсь узнать все координаты вершин объекта:
x = selection[1]
for i=1 to x.mesh.numverts do
(
print x.mesh.verts.pos
)

Теперь передвинаю (вращаю объект).
После этого координаты вершин остаются прежними (через MaxScript),
хотя координаты вершин реально изменились.
В чем дело?
 

Savin Denis

Модератор форума
Команда форума
Рейтинг
138
#2
все правильино координаты всех точек в массиве Vert обьекта заданны
в относительно центра обьекта ( в его локальных координатах)
x = selection[1]
for i=1 to x.mesh.numverts do
(
print x.mesh.verts.pos
coordsys world print (meshop.getVert x i)
)
 
#3
MAXScript User Reference > Editable_Mesh : GeometryClass and TriMesh : Value

The update() method makes any scripted changes to a base object mesh visible to 3ds max and you must call this function at some point after modifying a mesh so that 3ds max sees a valid mesh. Because this update can be a compute-intensive operation, it is made available as a separate function so you perform many changes on a mesh and then invoke the update just once to signal all the changes to 3ds max.

удачи ;)
 
Сверху