I'm working on improving it, but please take note that this workflow is a work in progress. To begin, I needed a way to have the MagicaVoxel camera move between renders. I tried for quite some time to do this using the built in WSAD camera controls, sending keystrokes to MagicaVoxel using AppleScript. The problem, I quickly discovered was that Applescript seems to have a bug where it sends a "A" keystroke if you try to send a key down command - no matter what input I sent to MagicaVoxel, the camera would only pan left as though the "A" key was pressed. The workaround that I found was to bring in another app, one with a little better keyboard/mouse scripting - QuicKeys. The program has a 30-day free trial, and I've been pleased with it so far. Its available here, or you can just do what I did and google "osx automate mouse" and follow stackoverflow to the program. As a sidenote, I generally hate using third party programs like this, especially for one-off processes, so if anyone has a better way to script mouse movements, I'd love to hear about it - hit me up on twitter. With QuickKeys downloaded and installed, I needed to create a few macros to move the MagicaVoxel camera around. I opted for the simplest setup I could - my macro would run when the "f1" key was pressed and would drag the mouse from a point on my monitor to 1 pixel to the left. Obviously you'll need to adjust the starting and ending coordinates from my example depending on your monitor size - I'd suggest using the "Set Location" button for the Click Location, then copying and adjusting by 1px for the Release Location. This setup is dependent on your MagicaVoxel window position, so I maximized my MagicaVoxel app to give me the most working room. I ended up making two macros - one to orbit, which I bound to (f1) and one to pan which I bound to (f2) - panning was accomplished by adding a "press spacebar" command before the mouse click in QuicKeys You can use these macros to orbit in any direction or pan up/down/left/right.īring up MagicaVoxel and press your f1 key - the view should move just slightly. Next, I created a AppleScript using OSX's "Script Editor" app.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |