Import Scene Operators API Documentation update #79449

Closed
opened 2020-08-01 18:05:29 +02:00 by vprime · 4 comments

System Information
Operating system: Windows-10-10.0.19041-SP0 64 Bits
Graphics card: GeForce GTX 1650/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 451.67

Blender Version
Broken: version: 2.83.3, branch: master, commit date: 2020-07-22 06:01, hash: 353e5bd749
Worked: (newest version of Blender that worked as expected)

While using the gltf import code from this link
https://docs.blender.org/api/blender2.8/bpy.ops.import_scene.html#bpy.ops.import_scene.gltf

The copy pasted code from this site does not work

bpy.ops.import_scene.gltf(filepath=r"C:\Users\PC\Desktop\imp.glb", 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)

and the reported error is

IMPORT_SCENE_OT_gltf.files expected a sequence for an RNA collection, not NoneType

Removing merge_vertices=False and files=None will make it work again

This code works

bpy.ops.import_scene.gltf(filepath= r"C:\Users\PC\Desktop\imp.glb", filter_glob="*.glb;*.gltf", loglevel=0, import_pack_images=True, import_shading='NORMALS', bone_heuristic='TEMPERANCE', guess_original_bind_pose=True)

As a beginner stating to code the file export code works seamlessly when copy pasted and the import code gave this error .So i just wanted to report about this

**System Information** Operating system: Windows-10-10.0.19041-SP0 64 Bits Graphics card: GeForce GTX 1650/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 451.67 **Blender Version** Broken: version: 2.83.3, branch: master, commit date: 2020-07-22 06:01, hash: `353e5bd749` Worked: (newest version of Blender that worked as expected) While using the gltf import code from this link https://docs.blender.org/api/blender2.8/bpy.ops.import_scene.html#bpy.ops.import_scene.gltf The copy pasted code from this site does not work ``` bpy.ops.import_scene.gltf(filepath=r"C:\Users\PC\Desktop\imp.glb", 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) ``` and the reported error is ``` IMPORT_SCENE_OT_gltf.files expected a sequence for an RNA collection, not NoneType ``` Removing **merge_vertices=False** and **files=None** will make it work again This code works ``` bpy.ops.import_scene.gltf(filepath= r"C:\Users\PC\Desktop\imp.glb", filter_glob="*.glb;*.gltf", loglevel=0, import_pack_images=True, import_shading='NORMALS', bone_heuristic='TEMPERANCE', guess_original_bind_pose=True) ``` As a beginner stating to code the file export code works seamlessly when copy pasted and the import code gave this error .So i just wanted to report about this
Author

Added subscriber: @V-prime

Added subscriber: @V-prime

Added subscriber: @iss

Added subscriber: @iss

Changed status from 'Needs Triage' to: 'Archived'

Changed status from 'Needs Triage' to: 'Archived'
Richard Antalik self-assigned this 2020-08-02 02:32:00 +02:00

Pasted link is documentation, not an example. Arguments listed are there to document order and default values.
While files=None is default value, lower you can see that only bpy_prop_collection type is valid value for this argument.

You can use just bpy.ops.import_scene.gltf(filepath=r"C:\Users\PC\Desktop\imp.glb")
It should work with merge_vertices=False though.

For help using Blender, please try one of the community websites: https://www.blender.org/community/

Pasted link is documentation, not an example. Arguments listed are there to document order and default values. While `files=None` is default value, lower you can see that only `bpy_prop_collection` type is valid value for this argument. You can use just `bpy.ops.import_scene.gltf(filepath=r"C:\Users\PC\Desktop\imp.glb")` It should work with `merge_vertices=False` though. For help using Blender, please try one of the community websites: https://www.blender.org/community/
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#79449
No description provided.