![]() |
#1 |
Senior Member
Professional user
Join Date: Jul 2003
Posts: 899
|
![]()
Hi all,
Is there a way to create a toolbar button (as in toolbar.tcl) to toggle Orth/3D view elements (like wireframe, headlight, etc) so that it will sync with the menu checkboxes? I'm sure it's a matter of calling the menu items, but I'm not sure how to do this... Dennis |
![]() |
![]() |
![]() |
#2 |
Administrator
Professional user
Join Date: Jun 2003
Posts: 4,565
|
![]()
For most of the visual settings, there are two variables (one for orth and 3d) - so you can have different settings in each type of view.
Adding check buttons is more complicated but it's easy to add some buttons to the toolbar. You can put this in a file in the scripts folder (e.g. wirefilled.tcl) Code:
toolbar_add_button "Wire" "set prefs_view3dmode 1; set prefs_filled_orth 0; ac3d redraw_all" "set views to wireframe" toolbar_add_button "Filled" "set prefs_view3dmode 0; set prefs_filled_orth 1; ac3d redraw_all" "set views to filled" Note that it's probably currently easier to press 'w' for this function (in orth or 3d windows) but it's a simple example. For other variables that control the views, look in tcl/ac3d.tcl, at the menu commands. Andy |
![]() |
![]() |
![]() |
#3 |
Senior Member
Professional user
Join Date: Jul 2003
Posts: 899
|
![]()
Thanks Andy --- any way to make a single button that toggles the state (like a single "headlight" button)? Would be nice to save on the toolbar real estate...
|
![]() |
![]() |
![]() |
#4 |
Administrator
Professional user
Join Date: Jun 2003
Posts: 4,565
|
![]() Code:
global UI checkbutton $UI(toolbar).light3d -text "3D Light" -variable prefs_headlight -command "ac3d redraw_3d" pack $UI(toolbar).light3d -side left |
![]() |
![]() |
![]() |
#5 |
Senior Member
Professional user
Join Date: Jul 2003
Posts: 899
|
![]()
Perfect --- thanks again.
|
![]() |
![]() |
![]() |
|
|