Go Back   AC3D Forums > Resources > AC3D Scripts and Mods
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Thread Tools Display Modes
Old 19th September 2014, 08:17 PM   #1
Expert member
Join Date: Sep 2009
Posts: 59
Cool Hack: Shift/Nudge in TCE

I edited the UI of the TCE and changed the Shift section to instead edit the nudge variable(s)

you can now set a custom x and y nudge distance using this area of the TCE

(edit the code or download the attached tcl file and replace it in the tcl folder... be sure to make a copy of the old one in case of errors or you dont like the changes)

in ac3duvedit.tcl :

first, add these globals to the 'proc menu_uveditor { }' section

global nudgeX
global nudgeY
then edit and replace the shift section with this code:

set shiftf [section_frame $cp.shiftf "Shift/Nudge" ]
	pack $cp.shiftf -fill x
	set nudgeX prefs_uv_shift_x
	set nudgeY prefs_uv_shift_y
	entry $shiftf.mx -width 7 -textvariable prefs_uv_shift_x
	grid $shiftf.mx -row 0 -column 0
	entry $shiftf.my -width 7  -textvariable prefs_uv_shift_y
	grid $shiftf.my -row 0 -column 1
	set UI(uvmoveabs) [cbutton $shiftf.b2  "  set  " { set nudgeX $prefs_uv_shift_x ; set nudgeY $prefs_uv_shift_y  } "set the nudge variables"]
	grid $UI(uvmoveabs) -row 1 -column 0  -sticky e
	set UI(uvmoveabsneg) [cbutton $shiftf.b3  " shift " {set nudgeX $prefs_uv_shift_x ; set nudgeY $prefs_uv_shift_y ; ac3d uv_move_relative $nudgeX $nudgeY } "manually shift selected uvs by this amount"]
	grid $UI(uvmoveabsneg) -row 1 -column 1  -sticky w
	bind .uvedit <Up> { ac3d uv_move_relative 0 $nudgeY }
	bind .uvedit <Down> { ac3d uv_move_relative 0 -$nudgeY }
	bind .uvedit <Left> { ac3d uv_move_relative -$nudgeX 0 }
	bind .uvedit <Right> { ac3d uv_move_relative $nudgeX 0 }
once applied, start a new session of AC3D, open the TCE, set the desired nudge variables (then hit the 'set' button) and simply use the arrow keys to nudge the selected surface around.

I'm sure someone could improve on this. Maybe even make a better version. I simply just used the shift variables to set the nudge variables. :P

edit: special thanks to Andy for the nudge code in that other thread!
Attached Files
File Type: zip ac3duvedit.zip (4.9 KB, 238 views)

Last edited by avesthefox; 19th September 2014 at 08:27 PM.
avesthefox is offline   Reply With Quote
Old 23rd September 2014, 09:44 AM   #2
Senior Member
Professional user
Join Date: Jun 2003
Location: Greensboro NC, USA
Posts: 337
Default Re: Hack: Shift/Nudge in TCE

Thanks for your work, I will try this out.
foxa is offline   Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

All times are GMT -4. The time now is 08:32 AM.

AC3D Forum
(C) Inivis Limited 2020