|
15th December 2021, 10:29 AM | #1 |
Administrator
Professional user
Join Date: Jun 2003
Posts: 4,565
|
Re: Macro Recorder?
Put the attached file in your scripts folder (within the AC3D program folder).
When AC3D starts, it reads that script and adds an item to the Tools menu. The code is this: Code:
proc tomkat_run {} { #(switch to Object mode) ac3d set_select_mode 1 #Object -> Merge ac3d object_merge #(switch to Vertex mode) ac3d set_select_mode 3 #Vertex -> Weld ac3d weld_vertices #Surface -> Combine ac3d combine_surfaces } .mbar.tools.menu add command -label "Tomkat Super Combine" -command "tomkat_run" puts "Tomkat script complete" |
15th December 2021, 11:28 AM | #2 |
Member
Expert member
Join Date: Nov 2010
Posts: 79
|
Re: Macro Recorder?
Oh wow... thanks!
I can't wait to try this out when I get home from work! I was going to ask how one could ever figure out that vertex mode was "set_select_mode 3", but it appears you've given me a way to do that... so thanks for that also! EDIT: I just noticed that the script doesn't seem to switch to Surface mode before combining... Would that be as follows... (I'm guessing at the select_mode) ??? Code:
#(switch to Surface mode) ac3d set_select_mode 2 Last edited by Tomkat; 15th December 2021 at 11:32 AM. |
15th December 2021, 12:50 PM | #3 |
Administrator
Professional user
Join Date: Jun 2003
Posts: 4,565
|
Re: Macro Recorder?
That will work yes.
Generally most of the functions that work on surfaces will work in Vertex mode - they look for surfaces that have all their vertices selected but there's no harm in changing mode like that. There are clues on the parameters if you do and "ac3d list", you'll see: set_select_mode <int select-mode-num> which shows that the parameter is an integer. You can also search in the tcl folder and see how that command is used. |
15th December 2021, 01:04 PM | #4 |
Member
Expert member
Join Date: Nov 2010
Posts: 79
|
Re: Macro Recorder?
Perfect. I will try this out as soon as possible... thanks!
|
17th December 2021, 07:11 PM | #5 | |
Member
Expert member
Join Date: Nov 2010
Posts: 79
|
Re: Macro Recorder?
Quote:
Maybe my AC3D is too old? Here is what my "Advanced" options look like... Also... what does "Enable material name editing" do? It seems pretty straightforward, but I can't find WHERE to edit the material names. |
|
18th December 2021, 09:53 AM | #6 |
Administrator
Professional user
Join Date: Jun 2003
Posts: 4,565
|
Re: Macro Recorder?
Tick "Show Windows Console". That will make it stay open after AC3D starts.
Then if you put an "ac3d list" command in the script, you'll get a list of commands in the console window. Move your mouse over the name of a setting for a short description. If material names are editable, you'll get a text field on the material editor (right click on a material button to see that). Last edited by Andy; 18th December 2021 at 09:56 AM. |
19th December 2021, 12:20 PM | #7 |
Member
Expert member
Join Date: Nov 2010
Posts: 79
|
Re: Macro Recorder?
Ok, so I can now see the console window, but I'm unsure how to utilize the "ac3d list" command. Here's the results of my attempt...
I also tried placing the command earlier in the script, but it yielded nothing in the console. Perhaps my version of AC3d is too old? |
19th December 2021, 02:06 PM | #8 |
Administrator
Professional user
Join Date: Jun 2003
Posts: 4,565
|
Re: Macro Recorder?
Aha, to get the list of commands, you may need to start AC3D with -debug e.g.
ac3d -debug If you output to a file, that'll save the commands in there: ac3d -debug > output.txt |
19th December 2021, 02:59 PM | #9 |
Member
Expert member
Join Date: Nov 2010
Posts: 79
|
Re: Macro Recorder?
OK, I know how to add the -debug hash to a shortcut, which works... but how do I do it for any given file?
|
19th December 2021, 03:43 PM | #10 |
Administrator
Professional user
Join Date: Jun 2003
Posts: 4,565
|
Re: Macro Recorder?
You'll need to start a cmd and cd to the correct directory.
|
|
|