|
![]() |
#1 |
Administrator
Professional user
Join Date: Jun 2003
Posts: 4,541
|
![]()
From within tcl, ac3d commands are generally called like this:
Code:
ac3d select_all Code:
set numselobs [ac3d selection_get_num_objects ] Code:
ac3d list Rather than using 'toplevel' to create a new window, we recommend you use 'new_toplevel <windowpath> <title>'. This is a multi-platform friendly function. Using this means that the script will run on any platform. If you do not use this, the new window can easily get lost behind others. Under Windows, set File->Settings->Advanced->show-windows-console on. Any puts output will be shown in the console window that will stay visible after AC3D starts. This message is under construction... |
![]() |
![]() |
![]() |
#2 |
Junior Member
Member
Join Date: Sep 2005
Posts: 10
|
![]()
How does one enter tcl commands from within ac3d?
|
![]() |
![]() |
![]() |
#3 |
Administrator
Professional user
Join Date: Jun 2003
Posts: 4,541
|
![]()
If you put a tcl script file (something.tcl) into the script folder, AC3D will read the script when starting.
|
![]() |
![]() |
![]() |
#4 |
Senior Member
Professional user
Join Date: Feb 2008
Location: Brighton, England
Posts: 231
|
![]()
and where do these scripts appear in the program itself?
__________________
MarshallARTS, Playtime for the professionals! http://www.turbosquid.com/Search/Ind...lAuthorExact/y |
![]() |
![]() |
![]() |
#5 |
Junior Member
Member
Join Date: Aug 2013
Location: London UK
Posts: 22
|
![]()
Rather a long time since these questions were asked. Editing scripts - use notepad. Or a much more complete editor with context help, syntax colouring etc is Komodo Edit (http://www.activestate.com/komodo-edit).
To learn Tcl, download and install Tcl. I recommend the ActiveState version - http://www.activestate.com/activetcl and look for the Community free edition. There is a manual with it. Demo. Create a file (in notepad or KomodoEdit) containing the following line: .mbar.tools.menu add command -label "Hello world" -command "tk_messageBox -message {Hello World}" -underline 0 (it is all one line, no carriage returns). Save in your AC3D program directory as <Program File>/AC3D <VVV>/scripts/helloworld.tcl (substitute the correct directories for Program File and VVV version). Start AC3D; there should be a menu entry under Tools "Hello world". Select that option and a popup window saying "Hello World" appears. YOU did that. There are many other commands that could replace tk_messageBox, for example "ac3d select_all" instead of "tk_messageBox -message {Hello World}" will cause the Hello World menu entry to select all objects in your display. |
![]() |
![]() |
![]() |
#6 |
Junior Member
Member
Join Date: Aug 2007
Location: Hungary
Posts: 14
|
![]()
Please help me!
I want to write a tcl file, but I don't know how to. I just want to save a selection to an .ac file and then import it, because i want to do something else with it, but i don't know the ac3d commands, and i don't know how to write a tcl. Anybody help me? (sorry for bad english) |
![]() |
![]() |
![]() |
Thread Tools | |
Display Modes | |
|
|