Go Back   AC3D Forums > General > AC3D General
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 15th March 2006, 09:46 AM   #1
Spinner
Senior Member
Professional user
 
Join Date: May 2005
Posts: 147
Default AC3D6 - saving the background image setup

I've looked and cant see a answer anywhere, so...
Is there a save background images method in the new version?
I dont get to sit n model for hours, as all my modelling is done inbetween other obligations. I waste so much time setting up each session.
I love AC3D but this is a real issue for my use of it.
Thanks, and appologies if its been answered already
__________________
Spinner

Blessed are the cracks,
For they let in the light
Spinner is offline   Reply With Quote
Old 15th March 2006, 10:53 AM   #2
Andy
Administrator
Professional user
 
Andy's Avatar
 
Join Date: Jun 2003
Posts: 4,563
Default

Yes - there is a tool which saves the background image config to a file.
Andy is offline   Reply With Quote
Old 16th March 2006, 04:46 AM   #3
Spinner
Senior Member
Professional user
 
Join Date: May 2005
Posts: 147
Default

Thanks Andy
__________________
Spinner

Blessed are the cracks,
For they let in the light
Spinner is offline   Reply With Quote
Old 12th May 2006, 12:14 PM   #4
Spinner
Senior Member
Professional user
 
Join Date: May 2005
Posts: 147
Default

Andy,
I cant seem to find this option to save background images in AC3D6.
Could you direct me to the tool you spoke of, please?
__________________
Spinner

Blessed are the cracks,
For they let in the light
Spinner is offline   Reply With Quote
Old 12th May 2006, 12:45 PM   #5
Andy
Administrator
Professional user
 
Andy's Avatar
 
Join Date: Jun 2003
Posts: 4,563
Default script for loading and saving background image configs

Until we add a 'Scripts and mods' section on this forum - here's a script which adds loading and saving of the background images.

Save this text into a file called 'viewsave.tcl' and place the file in the 'scripts' folder which is within the AC3D program folder.

When AC3D starts it will read this script and add two items to the Tools menu.


Code:
# simple AC3D script that adds two items to tool menu - to save and load the background image setup	
# for AC3D 6 - 24th Jan 2006
	
proc saveview { viewid file} {

	# get the view entity
	set v [ac3d viewid_to_entity $viewid]

	#get the background image entity from the view
	set image [ac3d entity_get_value $v "background_image" ]

	if {$image != 0 } {
		# if there's an image, read the relavent values for the layout, along with the image name from the image entity
		set x [ac3d entity_get_value $v "background_image_xoffset" ]
		set y [ac3d entity_get_value $v "background_image_yoffset" ]
		set scale [ac3d entity_get_value $v "background_image_scale" ]
		set picname [ac3d entity_get_value $image "name"]
		
		puts $file "$viewid|$picname|$x|$y|$scale"
	}
}


proc save_view_config { } {

    set filename [tk_getSaveFile -title "Save bg image config" -filetypes {{"AC3D project" { acp }}} -defaultextension .acp ]

    if { $filename == "" } {
	    return
	}
	    

	set path [file dirname $filename]
	set file [open $filename w]

	saveview 0 $file
	saveview 1 $file
	saveview 2 $file
	saveview 3 $file

	close $file
}

proc load_view_config { } {

    set filename [tk_getOpenFile -title "Load bg image config" -filetypes {{"AC3D project" { acp }}} -defaultextension .acp ]

    if { $filename == "" } {
	    return
	}
	    
	set file [open $filename r]
	gets $file line
	while {$line != ""} {
#		puts $line
		set parts [split $line "|" ]
		set vid [lindex $parts 0]
		set bgname [lindex $parts 1]
		set x [lindex $parts 2]
		set y [lindex $parts 3]
		set scale [lindex $parts 4]

		#puts "view $vid bg image $bgname, $x $y, $scale"

		set vent [ac3d viewid_to_entity $vid]
		ac3d entity_set_value $vent background_image_xoffset $x
		ac3d entity_set_value $vent background_image_yoffset $y
		ac3d entity_set_value $vent background_image_scale $scale 
		ac3d load_background_image $bgname $vid
		ac3d redraw_all

		gets $file line
		}
}


add_tools_menu_item "Load background image config" load_view_config "Load a view configuration"
add_tools_menu_item "Save background image config" save_view_config "Save the view configuration"
Note that we decided not to add this information into the .ac files since it would break many systems which use .ac files to store geometry. In the future the .ac file format will probably be changed so that it can store information like the background image setup.
Andy is offline   Reply With Quote
Old 12th May 2006, 12:55 PM   #6
Spinner
Senior Member
Professional user
 
Join Date: May 2005
Posts: 147
Default

Thanks, Andy.
I model in lots of short sessions, so its a big help.
Hope my meshes look as clean as your software does now.
Very nice.
__________________
Spinner

Blessed are the cracks,
For they let in the light
Spinner is offline   Reply With Quote
Old 12th May 2006, 01:47 PM   #7
luuckyy
Senior Member
Professional user
 
luuckyy's Avatar
 
Join Date: Jul 2005
Location: France
Posts: 737
Default

Great 8)
__________________
OL.
luuckyy is offline   Reply With Quote
Old 13th May 2006, 09:30 PM   #8
MIKX
Junior Member
Member
 
Join Date: Mar 2005
Posts: 18
Default

Hi Andy,

Congrats on the new version - still coming to grips with it but so far looks and feels great.


Thanks for the "Save Background script - this is very much appreciated by X-Plane airport scenery developers - lining up terminal models with aerial pics is a pain.

Michael
__________________
Mac DP 2 Ghz 3 gig ram ATI X800XT 256mb Vram
MIKX is offline   Reply With Quote
Old 7th September 2009, 04:07 PM   #9
Reino
Junior Member
Member
 
Join Date: Jan 2006
Location: Germany
Posts: 16
Default Re: AC3D6 - saving the background image setup

Great. The search lead me to this plugin. And it works in the new version as well. What a relief.
Reino is offline   Reply With Quote
Old 14th September 2009, 08:14 PM   #10
davidb45
Junior Member
Junior member
 
Join Date: Jan 2004
Posts: 6
Default Re: script for loading and saving background image configs

I could use this script. But it doesn't work in 6.5.28 for me. Any suggestions?
Thanks in advance.
davidb45 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 06:46 AM.


AC3D Forum
(C) Inivis Limited 2020