View Full Version : Automating Wings with macros?
Stutz Jr 06-15-2005, 10:15 AM I use Wings3D primarily in windows, and was wondering if anyone has any good ways of automating multi-step tasks by way of macros or some external program? I'm also interested to know if it is possible to make scripts for creating primitives without the need of an erlang compiler?
thanks
| |
thedaemon
06-15-2005, 10:37 PM
nope. and not at all.
StephanD
06-16-2005, 11:22 AM
I've said it and I'll say it again.
Wings3D need script recording like Nendo used to have.(think Zscripts)
Nothin' to do with the current question but I'm sure the community would make good use of this.
Stutz Jr
06-16-2005, 11:49 AM
Never used Nendo, but script recording would be as good as any other way of automating tasks. I'm interested in looking at mac OS X 10.4 to see if the automator app is compatible with wings.. anybody here tried it?
NB. The reason I asked about the need for an erlang compiler is that the only tutorial i could find on scripting http://www.redrival.com/scorpius/tut-wings-plugin.htm is pretty vague on the steps required to go from your primitive function to an actual mesh in wings.
ycarry
06-17-2005, 08:43 AM
Hi. I use QuickeysX3 to send shortcuts to Wings3D.
e.g. to make a circle in a face with a beveled vert. (selected),
With [Alt-1] QK send for me : [S][delete][V][$][Tab][100][Enter]
or 'smooth the face, collapse, select vertices, RMB choose Deform/Inflate, input value=100 and finish'.
Problem is: Menus must have shortcut (here: RMB choose Deform/Inflate=[$]) and Move or values need the Input form=[Tab].
Stutz Jr
06-17-2005, 10:14 AM
Sounds perfect! I'll have to check it out. Seems there is a windows version as well
Stutz Jr
06-17-2005, 11:08 AM
I've started playing with an open source program called AutoHotKey http://www.autohotkey.com/ by Chris Mallet that seems to work fine with Wings3D in windows xp. I think it has a lot of potential and has the benefit of being a free download..
I was able to quickly record a little macro to create a cube and inset a face that was saved as a 1kb file that i could execute without any background app already running:
WinWait, Wings 3D,
IfWinNotActive, Wings 3D, , WinActivate, Wings 3D,
WinWaitActive, Wings 3D,
MouseClick, right, 345, 304
Sleep, 10
MouseClick, left, 325, 384 ; create cube
Sleep, 10
MouseClick, left, 526, 91 ; face mode
Sleep, 10
MouseClick, left, 401, 395 ; select face
Sleep, 10
MouseClick, right, 402, 395
Sleep, 10
MouseClick, left, 393, 446 ; inset operation
Sleep, 10
Send, {TAB}10{ENTER}
From there it's trivial to add scripts like these to hotkeys with the app running in the background (~3.1 MB memory)
!I:: ; wait for ALT-I
WinWait, Wings 3D,
IfWinNotActive, Wings 3D, , WinActivate, Wings 3D,
WinWaitActive, Wings 3D,
MouseClick, right, 345, 304
Sleep, 10
MouseClick, left, 325, 384 ; create cube
Sleep, 10
MouseClick, left, 526, 91 ; face mode
Sleep, 10
MouseClick, left, 401, 395 ; select face
Sleep, 10
MouseClick, right, 402, 395
Sleep, 10
MouseClick, left, 393, 446 ; inset operation
Sleep, 10
Send, {TAB}10{ENTER}
return
Lastly, I noticed that repeating the same task mutiple times is not foolproof in that different manu actions would be chosen if the menu is not always initialised from the same point. I'm sure if you were careful in recording, such as right clicking in an empty corner.., you could iron out any bugs. If I'd bothered to create key assignemnts in wings first then even that would not be an issue..
ycarry
06-17-2005, 04:14 PM
Good!
Im on Mac and maybe someone have some test with Automator (I dont have Tiger yet).
One big problem with Wings on Mac is the menu or element selection because all is encapsulated in the ESDL, so you must send mouse coord (e.g. to have the cube: Right Clic at location x,y then Left Clic y=+90)... or have many shortcut.
One good thing with QK is the ability to wait for user action (selection, mouse move, etc) during a macro or to record 'all' mouse/keyboard action (...with 'all' hesitation or mistake :hmm: ! ).
But I use macro for multi Circle-Inflate, or multi rotation for bending*, etc, and remembering shortcut is faster, no?
-----
(*) Now is the new Napert's 'Bend' plugin.
Stutz Jr
06-17-2005, 11:40 PM
To be honest I never even tried Quickeys, I was so impressed with AutoHotKey I spent the rest of the night fooling around with that.. (great site + forum too).
I've made a little headway, noticed that you need to minimise reliance on the mouse as it will only record the position of clicks, not movement, bu nonetheless it does exactly what I asked for.
This is a little recorded script of me creating a hollow dome in a fresh instance of wings.
I recorded the macro at 1024x768 resolution with advanced menus enabled so hopefully the mouseclicks are consistent. Also, check the program directory or use a current instance by commenting the run line and uncomenting the line for WinActivate..
;ASSUMES ADVANCED MENUS AT 1024x768 for menu positions
Run, "C:\Program Files\wings3d_0.98.29b\Wings3D.exe"
Sleep, 100
WinWait, Wings 3D,
;IfWinNotActive, Wings 3D, , WinActivate, Wings 3D,
WinWaitActive, Wings 3D,
MouseClick, left, 364, 16
Sleep, 100
Send, {SPACE}rb{CTRLDOWN}a{CTRLUP}{DEL}
MouseClick, right, 85, 139
Sleep, 100
MouseClick, left, 59, 171
Sleep, 100
Send, f
MouseClick, left, 498, 253
Sleep, 100
Send, v{DEL}f
MouseClick, left, 514, 495
Sleep, 100
MouseClick, left, 416, 485
Sleep, 100
MouseClick, left, 471, 550
Sleep, 100
Send, i
Sleep, 100
Send, {CTRLDOWN}{SHIFTDOWN}i{SHIFTUP}{CTRLUP}
Sleep, 100
Send, {BACKSPACE}{SPACE}
MouseClick, left, 491, 369
Sleep, 100
MouseClick, right, 85, 178
Sleep, 100
MouseClick, left, 107, 365
Sleep, 100
Send, {TAB}.3{ENTER}{SPACE}b
MouseClick, left, 437, 469
Sleep, 100
Send, ss{SPACE}
MouseClick, left, 59, 171
Fro Lee
06-18-2005, 06:28 AM
I think that if Wings is going to adopt a macro system, it should be a front end to erlang. From what I understand, Wings3d runs like a script in erlang instead of a compiled OS dependant binary. By providing wings users with an easy way to repeat steps/record steps in native erlang, it would also increase the amount of erlang knowledgeable users and might further wings development in the long run
… or not, you never know.
- Fro
CGTalk Moderation
06-18-2005, 06:28 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2008, Jelsoft Enterprises Ltd.