1 回答

TA贡献1820条经验 获得超9个赞
如果你只关心顶点的位置,你可以使用pickPoint函数来代替。否则进行回调以更新选择更改并记录差异。一个例子是(如果您当前的节点是可编辑多边形):
try destroyDialog selectVerts catch()
rollout selectVerts ""
(
local verts, currentSel
fn collectVerts event nodes =
(
local sel = polyop.getVertSelection $
local newVerts = sel - currentSel
local removedVerts = currentSel - sel
for v in removedVerts do if (local index = findItem verts v) > 0 do deleteItem verts index
for v in newVerts do append verts v
currentSel = sel
)
local callback = nodeEventCallback mouseUp:on enabled:off subobjectSelectionChanged:collectVerts
checkButton chbSwitchCallback "Select verts"
on chbSwitchCallback changed state do
(
if state and isKindOf $ Editable_Poly then
(
verts = #()
currentSel = polyop.getVertSelection $
callback.enabled = on
)
else
(
callback.enabled = off
print verts #noMap
)
)
)
createDialog selectVerts
添加回答
举报