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
ofOperatorFileListElement
, (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)) – !EXPERIMENTAL! 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)) – Import 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)) – Import Subdivision Surface, Import FBX subdivision information as subdivision surface modifiers
- use_custom_props (boolean, (optional)) – Import User 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:
-
bpy.ops.import_scene.
gltf
(filepath="", filter_glob="*.glb;*.gltf", loglevel=0, import_pack_images=True, import_shading='NORMALS')¶ 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
- loglevel (int in [-inf, inf], (optional)) – Log Level, Log Level
- import_pack_images (boolean, (optional)) – Pack images, Pack all images into .blend file
- import_shading (enum in ['NORMALS', 'FLAT', 'SMOOTH'], (optional)) – Shading, How normals are computed during import
File:
-
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:
-
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: