Message 1 of 2
[SOLVED] script to place points on a mesh surface - mouseTrack or customFunction?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I'm attempting to write a little script that will place markers (points) on the surface of a mesh. There are three things I want it to do, A) show a box aligning to the surface of the mesh as the cursor is moved around so the user knows exactly where the marker will be placed, B) create a new marker on the surface whenever the user clicks the left mouse button, and C) allow the user to right-click and exit the script at any time.
I first tried writing the code myself, but realised that mouse.buttonStates is unreliable (quad menu disrupts right-click to cancel).
Then after a little research I noticed there was a mouseTrack function. I can achieve my two latter goals with this function, however I'm unclear on how to push a box around the surface using mouseTrack without my script looking like a hack...
I thought of simply using mouseTrack as a means of getting mouse input and sticking to a custom script - again it seems like I'm missing something.
Anyone have any tips or suggestions on what would be the most efficient way of writing this script?
Note that I'm a novice scripter so if I missed something that is blatantly obvious please let me know.
CL Audio
I'm attempting to write a little script that will place markers (points) on the surface of a mesh. There are three things I want it to do, A) show a box aligning to the surface of the mesh as the cursor is moved around so the user knows exactly where the marker will be placed, B) create a new marker on the surface whenever the user clicks the left mouse button, and C) allow the user to right-click and exit the script at any time.
I first tried writing the code myself, but realised that mouse.buttonStates is unreliable (quad menu disrupts right-click to cancel).
Then after a little research I noticed there was a mouseTrack function. I can achieve my two latter goals with this function, however I'm unclear on how to push a box around the surface using mouseTrack without my script looking like a hack...
I thought of simply using mouseTrack as a means of getting mouse input and sticking to a custom script - again it seems like I'm missing something.
Anyone have any tips or suggestions on what would be the most efficient way of writing this script?
Note that I'm a novice scripter so if I missed something that is blatantly obvious please let me know.
CL Audio
---
3DSMax 2012 SP2
3DSMax 2012 SP2