|
![]() |
#1 |
Member
Expert member
Join Date: Nov 2010
Posts: 79
|
![]()
I swear I've seen this question somewhere in these forums, but I can't find it.
Is there a way to "record" repetitive actions to a script, assign it to a menu/button/tool so that it can be quickly re-applied, when needed? For example, a macro that does the following with the selected features... (switch to Object mode) Object -> Merge (switch to Vertex mode) Vertex -> Weld (switch to Surface mode) Surface -> Combine |
![]() |
![]() |
![]() |
#2 |
Administrator
Professional user
Join Date: Jun 2003
Posts: 4,565
|
![]()
There's not a way to record actions but you could put these in a script and have them activated from a button or menu item.
|
![]() |
![]() |
![]() |
#3 |
Member
Expert member
Join Date: Nov 2010
Posts: 79
|
![]()
I'm good with VBA (Excel,etc) but I can usually record actions then tweak the code, as needed. I wouldn't even know where to begin with .TCL
Unless there's a script out there that does something similar that I can tweak? Last edited by Tomkat; 14th December 2021 at 06:52 PM. |
![]() |
![]() |
![]() |
#4 |
Administrator
Professional user
Join Date: Jun 2003
Posts: 4,565
|
![]()
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" |
![]() |
![]() |
![]() |
#5 |
Member
Expert member
Join Date: Nov 2010
Posts: 79
|
![]()
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. |
![]() |
![]() |
![]() |
#6 |
Administrator
Professional user
Join Date: Jun 2003
Posts: 4,565
|
![]()
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. |
![]() |
![]() |
![]() |
#7 | |
Member
Expert member
Join Date: Nov 2010
Posts: 79
|
![]() 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. |
|
![]() |
![]() |
![]() |
#8 |
Administrator
Professional user
Join Date: Jun 2003
Posts: 4,565
|
![]()
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. |
![]() |
![]() |
![]() |
#9 |
Junior Member
Junior member
Join Date: Jan 2024
Posts: 1
|
![]()
si se puede, los script de tcl permiten no solo llamar las funciones compiladas de ac3d, sino activar los modos de seleccion, punto vertice u objeto, cambiar las variables de entorno o incluso hacer conversion de archivos con ello he podido hacer un Replicador de objetos que permite seleccionar un objeto y copiarlo multiples veces o hacer extrude del original y sus copias, cambiando la posicion, el giro en x,y, z para hacer un tornillos porque la version 2.0 tenia un error y no permitia hacer un extrude apartir de un path.
entonces hice un script que hiciera copias con extrude que si funcionaba. poligonos es un script que del perfil de un diente genera el piņon por lo que pide el numero de lados, calcula el centro del piņon que requiere para que con un diente tenga n dientes y copia los dientes en vectores y luego unifica en un objeto y optimiza los puntos y vertices. animacion y render cambia la posicion de los objetos y la camara, genera un POV y una vez povray lo genera lo convierte en gif animado. pues tcl ya tiene soporte para hacer gif animados. |
![]() |
![]() |
![]() |
#10 |
Administrator
Professional user
Join Date: Jun 2003
Posts: 4,565
|
![]()
Wow - AC3D 2.0! Does that really still work on the current Windows?
Have you tried your scripts on the latest AC3D? |
![]() |
![]() |
![]() |
|
|