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

Reply
 
Thread Tools Display Modes
Old 29th September 2009, 05:02 AM   #1
Andy
Administrator
Professional user
 
Andy's Avatar
 
Join Date: Jun 2003
Posts: 4,563
Default MOD: nudge in Texture Coordinate Editor

Add cursor key control to move the selection inside the TCE.

This mod requires editing of internal AC3D script files. If this is done wrong, you could stop AC3D from working. We recommend this is tested on an alternate installation/copy of AC3D.

With a text editor, edit tcl/ac3duvedit.tcl
Go to near the end of the file and find these two lines:

Code:
    bind .uvedit s { set uvmode surface ; ac3d uv_selectmode 0 ; uv_do_sensitivity } 
    bind .uvedit v { set uvmode vertex; ac3d uv_selectmode 1 ; uv_do_sensitivity }
After these, insert this text:

Code:
    set nudge_dist 0.01
    bind .uvedit <Up> "ac3d uv_move_relative 0 $nudge_dist"
    bind .uvedit <Down> "ac3d uv_move_relative 0 -$nudge_dist"
    bind .uvedit <Left> "ac3d uv_move_relative -$nudge_dist 0"
    bind .uvedit <Right> "ac3d uv_move_relative $nudge_dist 0"
The value for 'nudge_dist' here (0.01) can be changed - this is the distance that the selection will move when one of the keyboard arrow keys is pressed.

Last edited by Andy; 29th September 2009 at 05:10 AM.
Andy is offline   Reply With Quote
Old 27th March 2010, 02:33 PM   #2
avesthefox
Member
Expert member
 
Join Date: Sep 2009
Posts: 59
Default Re: MOD: nudge in Texture Coordinate Editor

I did as suggested, but I cant seem to get this to work
avesthefox is offline   Reply With Quote
Old 23rd September 2012, 05:13 PM   #3
Snow
Member
Advanced member
 
Snow's Avatar
 
Join Date: May 2007
Location: Deiningen, Germany
Posts: 45
Default Re: MOD: nudge in Texture Coordinate Editor

I'm using this modified code:
Code:
        set nudge_dist 0.001
	bind .uvedit <Up> "ac3d uv_move_relative 0 $nudge_dist"
	bind .uvedit <Down> "ac3d uv_move_relative 0 -$nudge_dist"
	bind .uvedit <Left> "ac3d uv_move_relative -$nudge_dist 0"
	bind .uvedit <Right> "ac3d uv_move_relative $nudge_dist 0"
	
	set nudge_far [expr $nudge_dist*10]
	bind .uvedit <Shift-Up> "ac3d uv_move_relative 0 $nudge_far"
	bind .uvedit <Shift-Down> "ac3d uv_move_relative 0 -$nudge_far"
	bind .uvedit <Shift-Left> "ac3d uv_move_relative -$nudge_far 0"
	bind .uvedit <Shift-Right> "ac3d uv_move_relative $nudge_far 0"
	
	set nudge_fine [expr $nudge_dist/10]
	bind .uvedit <Control-Up> "ac3d uv_move_relative 0 $nudge_fine"
	bind .uvedit <Control-Down> "ac3d uv_move_relative 0 -$nudge_fine"
	bind .uvedit <Control-Left> "ac3d uv_move_relative -$nudge_fine 0"
	bind .uvedit <Control-Right> "ac3d uv_move_relative $nudge_fine 0"
As in Andy's code above, the value for "nudge_dist" can be changed.
Using the arrow-keys together with the Shift-key moves the selection 10 times as much as defined for "nudge_dist".
Using the arrow-keys together with the Ctrl-key moves the selection a 10th of the defined value.
__________________
Mac Pro 8-Core - 12 GB RAM - ATI Radeon HD 5870 - VRAM 1024 MB - Mac OS X 10.6.7 - Cinema Display 20''
Whisky Air Charter - Virtual X-Plane Charter Company
Snow is offline   Reply With Quote
Old 24th September 2012, 11:18 AM   #4
Andy
Administrator
Professional user
 
Andy's Avatar
 
Join Date: Jun 2003
Posts: 4,563
Default Re: MOD: nudge in Texture Coordinate Editor

great stuff!
Andy is offline   Reply With Quote
Old 24th September 2012, 11:22 AM   #5
Stiglr
Senior Member
Professional user
 
Stiglr's Avatar
 
Join Date: Feb 2004
Location: Portland, OR
Posts: 604
Default Re: MOD: nudge in Texture Coordinate Editor

Great idea, one I've wished for for some time.

My only question is, what are the units for the nudge distance? Pixels? mm's? Or, can they be custom set?
__________________
Flight Sim Project Contributor

My Gaming Rig:
i5 2500K Quad-Core CPU at 3.3GHz
MSI P67A-C43 mobo
4GB of PC12800 DDR3 memory
Windows 7
1GB Galaxy GeForce GTX550 Ti video card GeForce 270.61 drivers (4/2011)
Cougar joystick/throttle combo
CH Pedals
Stiglr is offline   Reply With Quote
Old 29th September 2012, 02:30 PM   #6
jentron
Senior Member
Professional user
 
Join Date: Nov 2007
Posts: 139
Default Re: MOD: nudge in Texture Coordinate Editor

Quote:
Originally Posted by Stiglr View Post
Great idea, one I've wished for for some time.

My only question is, what are the units for the nudge distance? Pixels? mm's? Or, can they be custom set?
This would be fractions of the texture size. 0.01 is 1/100 of the texture image height or width. The first key bindings were added into the defaults for AC3D 6.7. The control and shift bindings are 1/1000 and 1/10 of the texture image size.
jentron is offline   Reply With Quote
Reply

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 03:52 AM.


AC3D Forum
(C) Inivis Limited 2020