[AddOn] Background Images Fast Import

http://romansv.byethost12.com/images/prog/Backgrounds_library.jpg

A simple script to save time on the routine of importing background images for modelling reference, by automating the most common actions taken when adding backgrounds.

This function will search the specified folder for all JPG and PNG image files, and load them to blender as 3D View backgrounds. You can control opacity and scale of all images at once.

Images with the words “TOP”, “BOTTOM”, “FRONT”, “BACK”, “LEFT”, “RIGHT” or “CAMERA” (all case-insensitive) in their file names will automatically be constrained to the respective axis.

Images without these key words will either be ignored (if “Only cardinal directions” is checked) or be loaded for all views.

How to use:

The button for this function is in the 3D View properties menu, under “Background Fast Import” tab. After pressing it, set the operator options:

  • Only cardinal directions - check this to ignore any images without a direction in the filename.
  • Path to folder - select the folder where the images you want to import are located.
  • Scale and opacity - set these commonly used properties for all background images at once.
Download: (current version - 1.1) [Mirror 1](http://roman.svglobe.com/download/Blender_addon_FastBackgrounds.zip) [Mirror 2](http://romansv.byethost12.com/download/Blender_addon_FastBackgrounds.zip)

Very Useful!
Thx for sharing!

Good idea @XArgon, i will try it soon…
Great thanks and congratulations!
Byebye :cool:

Do nothing when I press fast import.

If we use something like the snippet below, we can add it into the regular Background Image Panel.
But i think you have to rewrite your operator a bit (merge all together or so)


def import_draw(self,context):
    layout = self.layout
    col.operator(BackgroundFastImport.bl_idname, text="Fast Import")
     

def register():
   bpy.utils.register_module(__name__)    

    bpy.types.VIEW3D_PT_background_image.prepend(import_draw)

    pass



def unregister():
    
    bpy.utils.unregister_module(__name__)
    
    bpy.types.VIEW3D_PT_background_image.remove(import_draw) 

    pass


if __name__ == "__main__":
    register()

It opens the operator options (normally located to the left of the viewport). There you can select the folder and set all the options. I know it’s a bit unintuitive right now, perhaps I’ll change it later.

mkbreuer, thanks for the hint, I’ll see what I can do about it. :slight_smile:

Operator Tooltip!? = “”“Create an editable Pipe with seperate Path and Cross-section curve objects”""

Nice and much needed addon. If i can I would like to suggest some type or … dialog or button that would autoMAGICALLY scale the chosen background image to the grid scale and dimension. i have to use calc on window or use a pencil and paper to figure out the correct scaling factor

Here is what I mean. Suppose i have downloaded a 740 X 345 (not and actual size, just some numbers that I made up to illustrate what i am talking about ) floor plan for a apartement from somewhere. And that it is proportionately correct within the image. That is all the elements (walls,doors,windows,beds hallways e.t.c) are scaled correctly in the image as they relate to each other Say that the apartment is 20 feet wide by 30 feet deep.

Since blender imports a background image as a 10 unit wide image weather you use feet,meters or blender unit. My math goes like this 740/345 = 10/sf… sf=10 X 345/740 Where sf is the scaling factor that I put in the background image text field. No the image is porportionate to the grid. I then go in and model or rather use Archimesh’s GREAT grease pencil feature To trace the walls and windows and doors out. Then when everything is set I scale the whole set up meshs up to 20 feet by 30 feet using the blender grid as the guide set to imperial units.

This works but seems an awful lot of work to do to get everything proportionate.

Ouch. Thanks, fixed that. :slight_smile:

Not sure if I got your idea exactly as you meant it, but here’s what I’ve implemented in the new version:

Uploaded v.1.1:
Added “Scale as Pixels-per-Unit” option (set by default) to use instead of the standard scaling.

This has the opposite effect than the default scaling (more pixels-per-unit = smaller image in viewport).
Using the “Scale” field you set the number of image pixels per your chosen measurement unit (metric or imperial, with the default Blender units being just another metric.)

With this option enabled all images retain their original proportions relative to each other, instead of being assigned the same width.

Sorry XArgon, but i have installed your 1.1 version but nothing run when i click on the button:

blender last release :
version 2.76 (sub 0), branch b’master’, commit date b’2015-11-03’ b’10:56’, hash b’f337fea’, b’RelWithDebInfo’
build date: b’2015-11-06’, b’22:47:15’
platform: b’Linux’

Spirou4D, do the operator options appear when you click it? (they should appear in the left menu)


yes XArgon, here is the operator:
bpy.ops.view3d.background_images_fast_import()

but nothing!

EDIT: Ha YES I see now but with not open the open windows like the “Import image as plan” add-on and move your option in this windows like others I/O addon? Weird!

It’s easy: read the “io_import_images_as_plans.py” file, please!

Attribute Error!
Any plans for an 2.77 update?