Import Scene Operators

bpy.ops.import_scene.fbx(filepath='', directory='', filter_glob='*.fbx', files=None, ui_tab='MAIN', use_manual_orientation=False, global_scale=1.0, bake_space_transform=False, use_custom_normals=True, use_image_search=True, use_alpha_decals=False, decal_offset=0.0, use_anim=True, anim_offset=1.0, use_subsurf=False, use_custom_props=True, use_custom_props_enum_as_string=True, ignore_leaf_bones=False, force_connect_children=False, automatic_bone_orientation=False, primary_bone_axis='Y', secondary_bone_axis='X', use_prepost_rot=True, axis_forward='-Z', axis_up='Y')

Load a FBX file

Parameters
  • filepath (string, (optional, never None)) – File Path, Filepath used for importing the file

  • directory (string, (optional, never None)) – directory

  • filter_glob (string, (optional, never None)) – filter_glob

  • files (bpy_prop_collection of OperatorFileListElement, (optional)) – File Path

  • ui_tab (enum in ['MAIN', 'ARMATURE'], (optional)) –

    ui_tab, Import options categories

    • MAIN Main, Main basic settings.

    • ARMATURE Armatures, Armature-related settings.

  • use_manual_orientation (boolean, (optional)) – Manual Orientation, Specify orientation and scale, instead of using embedded data in FBX file

  • global_scale (float in [0.001, 1000], (optional)) – Scale

  • bake_space_transform (boolean, (optional)) – Apply Transform, Bake space transform into object data, avoids getting unwanted rotations to objects when target space is not aligned with Blender’s space (WARNING! experimental option, use at own risks, known broken with armatures/animations)

  • use_custom_normals (boolean, (optional)) – Custom Normals, Import custom normals, if available (otherwise Blender will recompute them)

  • use_image_search (boolean, (optional)) – Image Search, Search subdirs for any associated images (WARNING: may be slow)

  • use_alpha_decals (boolean, (optional)) – Alpha Decals, Treat materials with alpha as decals (no shadow casting)

  • decal_offset (float in [0, 1], (optional)) – Decal Offset, Displace geometry of alpha meshes

  • use_anim (boolean, (optional)) – Import Animation, Import FBX animation

  • anim_offset (float in [-inf, inf], (optional)) – Animation Offset, Offset to apply to animation during import, in frames

  • use_subsurf (boolean, (optional)) – Subdivision Data, Import FBX subdivision information as subdivision surface modifiers

  • use_custom_props (boolean, (optional)) – Custom Properties, Import user properties as custom properties

  • use_custom_props_enum_as_string (boolean, (optional)) – Import Enums As Strings, Store enumeration values as strings

  • ignore_leaf_bones (boolean, (optional)) – Ignore Leaf Bones, Ignore the last bone at the end of each chain (used to mark the length of the previous bone)

  • force_connect_children (boolean, (optional)) – Force Connect Children, Force connection of children bones to their parent, even if their computed head/tail positions do not match (can be useful with pure-joints-type armatures)

  • automatic_bone_orientation (boolean, (optional)) – Automatic Bone Orientation, Try to align the major bone axis with the bone children

  • primary_bone_axis (enum in ['X', 'Y', 'Z', '-X', '-Y', '-Z'], (optional)) – Primary Bone Axis

  • secondary_bone_axis (enum in ['X', 'Y', 'Z', '-X', '-Y', '-Z'], (optional)) – Secondary Bone Axis

  • use_prepost_rot (boolean, (optional)) – Use Pre/Post Rotation, Use pre/post rotation from FBX transform (you may have to disable that in some cases)

  • axis_forward (enum in ['X', 'Y', 'Z', '-X', '-Y', '-Z'], (optional)) – Forward

  • axis_up (enum in ['X', 'Y', 'Z', '-X', '-Y', '-Z'], (optional)) – Up

File

addons/io_scene_fbx/__init__.py:205

bpy.ops.import_scene.gltf(filepath='', filter_glob='*.glb;*.gltf', files=None, loglevel=0, import_pack_images=True, merge_vertices=False, import_shading='NORMALS', bone_heuristic='TEMPERANCE', guess_original_bind_pose=True)

Load a glTF 2.0 file

Parameters
  • filepath (string, (optional, never None)) – File Path, Filepath used for importing the file

  • filter_glob (string, (optional, never None)) – filter_glob

  • files (bpy_prop_collection of OperatorFileListElement, (optional)) – File Path

  • loglevel (int in [-inf, inf], (optional)) – Log Level, Log Level

  • import_pack_images (boolean, (optional)) – Pack Images, Pack all images into .blend file

  • merge_vertices (boolean, (optional)) – Merge Vertices, The glTF format requires discontinuous normals, UVs, and other vertex attributes to be stored as separate vertices, as required for rendering on typical graphics hardware. This option attempts to combine co-located vertices where possible. Currently cannot combine verts with different normals

  • import_shading (enum in ['NORMALS', 'FLAT', 'SMOOTH'], (optional)) – Shading, How normals are computed during import

  • bone_heuristic (enum in ['BLENDER', 'TEMPERANCE', 'FORTUNE'], (optional)) –

    Bone Dir, Heuristic for placing bones. Tries to make bones pretty

    • BLENDER Blender (best for re-importing), Good for re-importing glTFs exported from Blender. Bone tips are placed on their local +Y axis (in glTF space).

    • TEMPERANCE Temperance (average), Decent all-around strategy. A bone with one child has its tip placed on the local axis closest to its child.

    • FORTUNE Fortune (may look better, less accurate), Might look better than Temperance, but also might have errors. A bone with one child has its tip placed at its child’s root. Non-uniform scalings may get messed up though, so beware.

  • guess_original_bind_pose (boolean, (optional)) – Guess Original Bind Pose, Try to guess the original bind pose for skinned meshes from the inverse bind matrices. When off, use default/rest pose as bind pose

File

addons/io_scene_gltf2/__init__.py:973

bpy.ops.import_scene.obj(filepath='', filter_glob='*.obj;*.mtl', use_edges=True, use_smooth_groups=True, use_split_objects=True, use_split_groups=False, use_groups_as_vgroups=False, use_image_search=True, split_mode='ON', global_clight_size=0.0, axis_forward='-Z', axis_up='Y')

Load a Wavefront OBJ File

Parameters
  • filepath (string, (optional, never None)) – File Path, Filepath used for importing the file

  • filter_glob (string, (optional, never None)) – filter_glob

  • use_edges (boolean, (optional)) – Lines, Import lines and faces with 2 verts as edge

  • use_smooth_groups (boolean, (optional)) – Smooth Groups, Surround smooth groups by sharp edges

  • use_split_objects (boolean, (optional)) – Object, Import OBJ Objects into Blender Objects

  • use_split_groups (boolean, (optional)) – Group, Import OBJ Groups into Blender Objects

  • use_groups_as_vgroups (boolean, (optional)) – Poly Groups, Import OBJ groups as vertex groups

  • use_image_search (boolean, (optional)) – Image Search, Search subdirs for any associated images (Warning, may be slow)

  • split_mode (enum in ['ON', 'OFF'], (optional)) –

    Split

    • ON Split, Split geometry, omits unused verts.

    • OFF Keep Vert Order, Keep vertex order from file.

  • global_clight_size (float in [0, 1000], (optional)) – Clamp Size, Clamp bounds under this value (zero to disable)

  • axis_forward (enum in ['X', 'Y', 'Z', '-X', '-Y', '-Z'], (optional)) – Forward

  • axis_up (enum in ['X', 'Y', 'Z', '-X', '-Y', '-Z'], (optional)) – Up

File

addons/io_scene_obj/__init__.py:121

bpy.ops.import_scene.x3d(filepath='', filter_glob='*.x3d;*.wrl', axis_forward='Z', axis_up='Y')

Import an X3D or VRML2 file

Parameters
  • filepath (string, (optional, never None)) – File Path, Filepath used for importing the file

  • filter_glob (string, (optional, never None)) – filter_glob

  • axis_forward (enum in ['X', 'Y', 'Z', '-X', '-Y', '-Z'], (optional)) – Forward

  • axis_up (enum in ['X', 'Y', 'Z', '-X', '-Y', '-Z'], (optional)) – Up

File

addons/io_scene_x3d/__init__.py:66