Help with snap markers - max 2019
Hey guys, how are you?
I had a script that was written by a friend of mine, but it´s not working properly in max 2019. In fact it works, but it doesn’t show the snap markers when clicking the points in the viewport (http://prntscr.com/n6lnm0). The script moves an object in Z angle, using two reference points (similar to Autocad’s move command). Does anyone knows how to solve this? Below is the code:
(
snapmode.active = true
posSource = undefined
posTarget = undefined
pickedPoint = undefined
tool pickOnePoint
(
on mousePoint click_no do
(
if click_no == 1 then
(
pickedPoint = worldPoint
)
)
)
pick_result = startTool pickOnePoint numPoints:1
if pick_result != undefined and pick_result != #abort and pick_result != #escape then
(
posSource = pickedPoint
pick_result = startTool pickOnePoint numPoints:1
if pick_result != undefined and pick_result != #abort and pick_result != #escape then
(
posTarget = pickedPoint
)
)
moveValue = [0, 0, (posTarget.z - posSource.z)]
for obj in selection where not isGroupMember obj or isOpenGroupMember obj do move obj moveValue
)
Thanks in advance,
Jsrocha
Comments
Thanks Miauu, works just
Thanks Miauu, works just fine!
Cheers,
Jsrocha
.
Tools and Scripts for Autodesk 3dsMax