
Yield ImageSpec( image, size, frame_start, offset - 1, frames)

# This number is only valid when read a second time in 2.77Įlif frames > 1: # Not movie, but multiple frames -> image sequence # Size is unavailable for sequences, so we grab it early Image = load_image( filename, directory, check_existing = True, force_reload = force_reload) If find_sequences: # if finding sequences, we need some pre-processing firstįile_iter = find_image_sequences( filenames)įile_iter = zip( filenames, repeat( 1), repeat( 1))įor filename, offset, frames in file_iter:
#Import photo blender generator#
Returns a generator of ImageSpec wrapper objects later used for texture setup Loads a set of images, movies, or even image sequences Yield prev_file, matches, lengthĭef load_images( filenames, directory, force_reload = False, frame_start = 1, find_sequences = False): # No continuation -> spit out what we found and reset counters # if there are multiple sets of numbers, figure out what changedįor i, prev, cur in zip( count(), matches, new_matches): # this file looks like it may be in sequence from the previous New_matches = list( map( int, nums_regex. Start frame, and length of the detected sequence This returns a generator of tuples, which contain the filename, """From a group of files, detect image sequences. # -ĭef add_driver_prop( driver, name, type, id, path): "doc_url": " # used to trigger compositor updates on scene updates "description": "Imports images and creates planes with the appropriate aspect ratio. "location": "File > Import > Images as Planes or Add > Mesh > Images as Planes",

"author": "Florian Meyer (tstscr), mont29, matali, Ted Schundler (SpkyElctrc)",

# SPDX-License-Identifier: GPL-2.0-or-later Add_driver_prop Function find_image_sequences Function load_images Function offset_planes Function compute_camera_size Function center_in_camera Function get_input_nodes Function auto_align_nodes Function align Function clean_node_tree Function get_shadeless_node Function check_drivers Function register_watched_object Function find_plane_corner Function register_driver Function group_in_frame Function position_frame_bottom_left Function setup_compositing Function IMPORT_IMAGE_OT_to_plane Class update_size_mode Function draw_import_config Function draw_material_config Function draw_spatial_config Function draw Function invoke Function execute Function import_images Function single_image_spec_to_plane Function apply_image_options Function apply_texture_options Function apply_material_options Function create_cycles_texnode Function create_cycles_material Function create_image_plane Function compute_plane_size Function align_plane Function import_images_button Function register Function unregister Function
