bpy.data.libraries.load returns bpy_lib and not 2 objects #96212
Labels
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
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#96212
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Operating system: Windows-10-10.0.22000-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 3060/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 511.79
Blender Version
Broken: version: 3.2.0 Alpha, branch: master, commit date: 2022-03-07 06:49, hash:
ad2948face
Worked: (newest version of Blender that worked as expected)
Short description of error
When doing a link library load, the return python object is bpy_lib and not 2 objects. Also this objects doesn't seem to be fully exposed to python since it doesn't have any methods.
Exact steps for others to reproduce the error
PS: This happens with any file
Added subscriber: @dgsantana
Added subscriber: @lichtwerk
Changed status from 'Needs Triage' to: 'Needs User Info'
Just checking if the filename path really exists? (on my linux, I dont have $TMP defined).
Does the following equally fail for you? (this is working fine on my end -- meaning it does not error and prints the selected objects in the end...)
Sorry, my bad about the path I was using windows. Weird that worked, my blender should have been in a weird state.
But still happens in a larger script.
Added subscriber: @PratikPB2123
Added subscriber: @ideasman42
Changed status from 'Needs User Info' to: 'Archived'
This isn't a bug
for obj in data_to:
should befor obj in data_to.objects:
.Thanks Campbell,
Sorry for my mistake. Even though it shouldn't leave blender in a weird state, because any subsequent calls to
bpy.data.libraries.load
stop working.@dgsantana could you please report a bug with a script to redo the error.
Ok course.
Ok, maybe it's just bad usage on my part, I was doing this on the console, which gives the error, so it only works with
with
context:Right, you'll need to use a context manager.