76
76
global bit_map_path
78
78
frame $BASE -relief groove -borderwidth 2
79
set panel [St_create {window name size priority} $BASE "Keyframe Animation" 2 5]
80
Nv_mkPanelname $BASE "Keyframe Animation Panel"
79
set panel [St_create {window name size priority} $BASE [G_msg "Keyframe Animation"] 2 5]
80
Nv_mkPanelname $BASE [G_msg "Keyframe Animation Panel"]
82
82
# Create the top section containing play control, framerate, and Add and Delete buttons
83
83
frame $BASE.playcontrol -relief groove -borderwidth 2
93
93
-command "keyanimOneForward $BASE"
94
94
button $rname.forward -height 20 -width 20 -bitmap @$bit_map_path/right \
95
95
-command "keyanimPlayForward $BASE"
96
button $rname.label -text "Framerate :" -command "keyanimChangeFramerate $BASE"
96
button $rname.label -text [G_msg "Framerate :"] -command "keyanimChangeFramerate $BASE"
97
97
label $rname.val -textvariable keyanimFrameRate
98
98
pack $rname.back $rname.slow_back $rname.stop $rname.slow_forward \
99
99
$rname.forward -side left -padx 4 -pady 2 -fill y -expand no
103
103
frame $BASE.commands -relief groove -borderwidth 2
104
104
set rname $BASE.commands
105
label $rname.label -text "File: "
106
button $rname.save -text "Save" -command "keyanimSaveAnim $BASE"
107
button $rname.load -text "Load" -command "keyanimLoadAnim $BASE"
105
label $rname.label -text [G_msg "File: "]
106
button $rname.save -text [G_msg "Save"] -command "keyanimSaveAnim $BASE"
107
button $rname.load -text [G_msg "Load"] -command "keyanimLoadAnim $BASE"
109
label $rname.label2 -text "Animation: "
110
button $rname.rands -text "Run and Save" -command "keyanimRunAndSave $BASE"
111
button $rname.close -text "Close" -command "Nv_closePanel $BASE"
109
label $rname.label2 -text [G_msg "Animation: "]
110
button $rname.rands -text [G_msg "Run and Save"] -command "keyanimRunAndSave $BASE"
111
button $rname.close -text [G_msg "Close"] -command "Nv_closePanel $BASE"
113
113
pack $rname.label2 $rname.rands $rname.label $rname.save $rname.load \
114
114
-side left -padx 2 -pady 2 -padx 2 -fill y -expand no
127
127
# Create bottom section containing current keytime
128
128
frame $BASE.keytime -relief groove -borderwidth 2
129
129
set rname $BASE.keytime
130
button $rname.add -text "Add" -command "keyanimAddKey $BASE"
131
button $rname.delete -text "Delete" -command "keyanimDeleteKeys $BASE"
132
button $rname.change -text "New Key Time:" -command "keyanimChangeKeytime $BASE"
130
button $rname.add -text [G_msg "Add"] -command "keyanimAddKey $BASE"
131
button $rname.delete -text [G_msg "Delete"] -command "keyanimDeleteKeys $BASE"
132
button $rname.change -text [G_msg "New Key Time:"] -command "keyanimChangeKeytime $BASE"
133
133
label $rname.current -textvariable keyanimCurrentKeyTime
134
134
pack $rname.add $rname.delete -side left -padx 2 -pady 2 -fill y -expand no
135
135
pack $rname.current $rname.change -side right -padx 2 -fill y -expand no
140
140
frame $BASE.other_commands -relief groove -borderwidth 2
141
141
set rname $BASE.other_commands
142
142
menubutton $rname.menu1 -menu $rname.menu1.m1 \
143
-indicatoron 1 -text "Show Feature" -relief raised
143
-indicatoron 1 -text [G_msg "Show Feature"] -relief raised
145
145
menu $rname.menu1.m1
146
$rname.menu1.m1 add checkbutton -label "Path" -variable keyanimPathState \
146
$rname.menu1.m1 add checkbutton -label [G_msg "Path"] -variable keyanimPathState \
147
147
-command {Nshow_path $keyanimPathState} -onvalue on -offvalue off
148
$rname.menu1.m1 add checkbutton -label "Vect Lines/Polygons" -variable keyanimVectState \
148
$rname.menu1.m1 add checkbutton -label [G_msg "Vect Lines/Polygons"] -variable keyanimVectState \
149
149
-command {Nshow_vect $keyanimVectState} -onvalue on -offvalue off
150
$rname.menu1.m1 add checkbutton -label "Vect Points" -variable keyanimSiteState \
150
$rname.menu1.m1 add checkbutton -label [G_msg "Vect Points"] -variable keyanimSiteState \
151
151
-command {Nshow_site $keyanimSiteState} -onvalue on -offvalue off
152
$rname.menu1.m1 add checkbutton -label "Volume" -variable keyanimVolState \
152
$rname.menu1.m1 add checkbutton -label [G_msg "Volume"] -variable keyanimVolState \
153
153
-command {Nshow_vol $keyanimVolState} -onvalue on -offvalue off
154
$rname.menu1.m1 add checkbutton -label "Labels/Legend" \
154
$rname.menu1.m1 add checkbutton -label [G_msg "Labels/Legend"] \
155
155
-variable keyanimLabState \
156
156
-command {Nshow_lab $keyanimLabState} -onvalue on -offvalue off
158
158
menubutton $rname.menu2 -menu $rname.menu2.m1 \
159
-indicatoron 1 -text "Interp." -relief raised
159
-indicatoron 1 -text [G_msg "Interp."] -relief raised
161
161
menu $rname.menu2.m1
162
$rname.menu2.m1 add radiobutton -label "linear" \
162
$rname.menu2.m1 add radiobutton -label [G_msg "linear"] \
163
163
-variable keyanimInterpType -value linear \
164
164
-command "Nset_interp_mode linear ; Nupdate_frames ; $rname.tension configure -state disabled -background gray80"
165
$rname.menu2.m1 add radiobutton -label "spline" \
165
$rname.menu2.m1 add radiobutton -label [G_msg "spline"] \
166
166
-variable keyanimInterpType -value spline \
167
167
-command "Nset_interp_mode spline ; Nupdate_frames ; $rname.tension configure -state normal -background gray90"
168
scale $rname.tension -label "tension" -orient h \
168
scale $rname.tension -label [G_msg "tension"] -orient h \
169
169
-showvalue f -from 0 -to 1000 -command keyanimChangeTension \
170
170
-activebackground gray80 -background gray90
444
444
append name [keyanimGenTag]
447
label $name.label -text "New Key Time"
447
label $name.label -text [G_msg "New Key Time"]
450
450
frame $name.lgroup -relief groove
451
label $name.lgroup.mlabel -text "Minute:" -relief raised
452
label $name.lgroup.slabel -text "Second:" -relief raised
453
label $name.lgroup.flabel -text "Frame:" -relief raised
451
label $name.lgroup.mlabel -text [G_msg "Minute:"] -relief raised
452
label $name.lgroup.slabel -text [G_msg "Second:"] -relief raised
453
label $name.lgroup.flabel -text [G_msg "Frame:"] -relief raised
454
454
pack $name.lgroup.mlabel $name.lgroup.slabel \
455
455
$name.lgroup.flabel -fill both -padx 2 -pady 2
456
456
pack $name.lgroup -side left -fill both
463
463
$name.egroup.fentry -fill both -padx 2 -pady 2
464
464
pack $name.egroup -side right -fill both
466
button $name.ok -text "Ok" -command "set button 1"
466
button $name.ok -text [G_msg "Ok"] -command "set button 1"
467
467
pack $name.ok -side bottom -fill both -before $name.label
493
493
if { [string length $frames] == 0 } then { set frames 0 }
495
495
if { ($minutes < 0) || ($seconds < 0) || ($frames < 0) } then {
496
tk_dialog .kt_error "KeyTime Error" "Error - All values must be at least zero." \
496
tk_dialog .kt_error [G_msg "KeyTime Error"] [G_msg "Error - All values must be at least zero."] \
497
{} 0 [G_msg "Dismiss"
503
503
if { $frames >= $keyanimFrameRate } then {
504
tk_dialog .kt_error "KeyTime Error" \
505
"Error - Frame number must be less than frame rate." \
504
tk_dialog .kt_error [G_msg "KeyTime Error"] [G_msg "Error - Frame number must be less than frame rate."] \
505
{} 0 [G_msg "Dismiss"]
538
537
append name [keyanimGenTag]
541
label $name.label -text "New Frame Rate"
540
label $name.label -text [G_msg "New Frame Rate"]
544
543
frame $name.lgroup -relief groove
545
label $name.lgroup.flabel -text "Framerate:" -relief raised
544
label $name.lgroup.flabel -text [G_msg "Framerate:"] -relief raised
546
545
pack $name.lgroup.flabel -fill both -padx 2 -pady 2
547
546
pack $name.lgroup -side left -fill both
551
550
pack $name.egroup.fentry -fill both -padx 2 -pady 2
552
551
pack $name.egroup -side right -fill both
554
button $name.ok -text "Ok" -command "set button 1"
553
button $name.ok -text [G_msg "Ok"] -command "set button 1"
555
554
pack $name.ok -side bottom -fill both -before $name.label
676
675
if {$tag_name == ""} then {
677
tk_dialog .ierror "Internal Error" \
678
"Internal Error - Can't find channel $cname for keyframe $i" \
676
tk_dialog .ierror [G_msg "Internal Error"] \
677
[format [G_msg "Internal Error - Can't find channel %s for keyframe %s"] $cname $i] \
678
{} 0 [G_msg "Dismiss"]
856
855
# Popup a dialog to verify the delete
857
set ans [tk_dialog .delete_keys "Delete Keys" \
858
"Delete the selected keys?" \
856
set ans [tk_dialog .delete_keys [G_msg "Delete Keys"] \
857
[G_msg "Delete the selected keys?"] \
858
{} 1 [G_msg "Ok"] [G_msg "Dismiss"]]
860
859
if {$ans == 1} then { return }
862
861
# Delete each key in turn
869
868
# Deleted the specified key internally
870
869
set internal_time [lindex [lindex $keyanimKeyList $where] 0]
871
870
if {[Ndelete_key $internal_time 0 1] == 0} then {
872
tk_dialog .ierror "Internal Error" \
873
"Internal Error - Failed to delete keyframe in GK key list" \
871
tk_dialog .ierror [G_msg "Internal Error"] \
872
[G_msg "Internal Error - Failed to delete keyframe in GK key list"] \
873
{} 0 [G_msg "Dismiss"]
1004
1003
# Move the key internally
1005
1004
if {[Nmove_key $old_time 0 $new_time] == 0} then {
1006
tk_dialog .ierror "Internal Error" \
1007
"Internal Error - Failed to move keyframe in GK key list" \
1005
tk_dialog .ierror [G_msg "Internal Error"] \
1006
[G_msg "Internal Error - Failed to move keyframe in GK key list"] \
1007
{} 0 [G_msg "Dismiss"]
1011
1010
# After everything's said and done, redraw the keyframes
1122
1121
if { $extract_where != -1} then {
1124
1123
# Found the new key, do a popup for the replace
1125
set ans [tk_dialog .replace "Replace Key" \
1126
"There is already a keyframe at this time, replace it?" \
1124
set ans [tk_dialog .replace [G_msg "Replace Key"] \
1125
[G_msg "There is already a keyframe at this time, replace it?"] \
1126
{} 1 [G_msg "Ok"] [G_msg "Dismiss"]]
1128
1127
if {$ans == 1} then { return }
1130
1129
# Otherwise do the replace
1219
1218
append BASE .keycontrol
1221
1220
# Create canvas to hold channels for keyframes
1222
label $BASE.title -text "Keyframe Attributes"
1221
label $BASE.title -text [G_msg "Keyframe Attributes"]
1223
1222
canvas $BASE.key_channels -width 10c -height 2c -yscrollcommand "$BASE.scrolly set" \
1224
1223
-xscrollcommand "$BASE.scrollx set" -confine true -xscrollincrement 1 \
1225
1224
-yscrollincrement 1
1247
1246
frame $BASE.key_times.hold_times -width 10c -height 10c
1248
1247
label $BASE.key_times.hold_times.spacer1 -width 10 -text ""
1249
1248
checkbutton $BASE.key_times.hold_times.spacer2 \
1250
-text "On" -state disabled -relief flat -bd 0 -padx 3
1249
-text [G_msg "On"] -state disabled -relief flat -bd 0 -padx 3
1251
1250
$BASE.key_times.hold_times.spacer2 configure \
1252
1251
-disabledforeground [lindex [$BASE.key_times.hold_times.spacer2 \
1253
1252
configure -background] 4]
1697
1696
frame .ras_fname.frame3
1698
1697
frame .ras_fname.frame4
1699
1698
frame .ras_fname.frame5
1700
label .ras_fname.title -text "Enter a base name:"
1699
label .ras_fname.title -text [G_msg "Enter a base name:"]
1701
1700
entry .ras_fname.enter -relief sunken
1703
label .ras_fname.label -text "Render:"
1704
radiobutton .ras_fname.norm -text "Wireframe" \
1702
label .ras_fname.label -text [G_msg "Render:"]
1703
radiobutton .ras_fname.norm -text [G_msg "Wireframe"] \
1705
1704
-variable keyanimSaveRenderStyle -value 0
1706
radiobutton .ras_fname.fancy -text "Full Rendering" \
1705
radiobutton .ras_fname.fancy -text [G_msg "Full Rendering"] \
1707
1706
-variable keyanimSaveRenderStyle -value 1
1709
button .ras_fname.ok -text "Ok" -command "set keyanimWaitPress true"
1708
button .ras_fname.ok -text [G_msg "Ok"] -command "set keyanimWaitPress true"
1711
label .ras_fname.label1 -text "Image:"
1710
label .ras_fname.label1 -text [G_msg "Image:"]
1712
1711
# Start at value 2. 1 used to be SGI .rgb support
1713
radiobutton .ras_fname.img2 -text "PPM" -variable IMG -value 2
1714
radiobutton .ras_fname.img3 -text "TIFF" -variable IMG -value 3
1715
radiobutton .ras_fname.img4 -text "MPEG-1" -variable IMG -value 4
1712
radiobutton .ras_fname.img2 -text [G_msg "PPM"] -variable IMG -value 2
1713
radiobutton .ras_fname.img3 -text [G_msg "TIFF"] -variable IMG -value 3
1714
radiobutton .ras_fname.img4 -text [G_msg "MPEG-1"] -variable IMG -value 4
1717
label .ras_fname.label2 -text "Start Frame:"
1716
label .ras_fname.label2 -text [G_msg "Start Frame:"]
1718
1717
entry .ras_fname.enter2 -relief sunken -width 6
1719
checkbutton .ras_fname.check1 -text "Off-Screen" \
1718
checkbutton .ras_fname.check1 -text [G_msg "Off-Screen"] \
1720
1719
-variable "keyanimOff"
1906
1905
global keyanimKeyList keyanimFrameRate keyanimSaved keyanimUniqueTag
1908
1907
if {($keyanimSaved == 0) && ([llength $keyanimKeyList] != 0)} then {
1909
set status [tk_dialog .ka_check "Verify" \
1910
"Warning - Current animation has not been saved, continue?" \
1908
set status [tk_dialog .ka_check [G_msg "Verify"] \
1909
[G_msg "Warning - Current animation has not been saved, continue?"] \
1910
{} 1 [G_msg "Ok"] [G_msg "Cancel"]]
1912
1911
if {$status == 1} return
1922
1921
set file_handle ""
1923
1922
if {[catch "open $file_name r" file_handle] != 0} then {
1924
tk_dialog .ka_error "File Error" \
1925
"Error - Could not open file $file_name for reading" \
1923
tk_dialog .ka_error [G_msg "File Error"] \
1924
[format [G_msg "Error - Could not open file %s for reading"] $file_name] \
1925
{} 0 [G_msg "Dismiss"]