Possible bug with persistent_id and duplicated linked collections #60881

Closed
opened 2019-01-25 22:02:30 +01:00 by Jonathan Dent · 6 comments

Running new appleseed through various tests and I might have found a bug with the persistent_id of depsgraph.object_instances.

The attached scene file has a number of linked objects, including a collection that is duplicated (i.e. two empties reference the same linked collection).

When retrieving the object_instance.persistent_id it appears they are only counted for one collection and then repeated:

for inst in C.depsgraph.object_instances:
...         if inst.is_instance:
...         print(list(inst.persistent_id))
...         print(inst.instance_object.name_full)
...         
[0, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 0, 0, 0, 0, 0, 0, 0, 0]
Gem [Lib]
[1, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 0, 0, 0, 0, 0, 0, 0, 0]
dobj [Lib]
[2, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 0, 0, 0, 0, 0, 0, 0, 0]
Teapot [Lib]
[0, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 0, 0, 0, 0, 0, 0, 0, 0]
Gem [Lib]
[1, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 0, 0, 0, 0, 0, 0, 0, 0]
dobj [Lib]
[2, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 0, 0, 0, 0, 0, 0, 0, 0]
Teapot [Lib]

file linking.zip

Running new appleseed through various tests and I might have found a bug with the persistent_id of depsgraph.object_instances. The attached scene file has a number of linked objects, including a collection that is duplicated (i.e. two empties reference the same linked collection). When retrieving the object_instance.persistent_id it appears they are only counted for one collection and then repeated: ``` for inst in C.depsgraph.object_instances: ... if inst.is_instance: ... print(list(inst.persistent_id)) ... print(inst.instance_object.name_full) ... [0, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 0, 0, 0, 0, 0, 0, 0, 0] Gem [Lib] [1, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 0, 0, 0, 0, 0, 0, 0, 0] dobj [Lib] [2, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 0, 0, 0, 0, 0, 0, 0, 0] Teapot [Lib] [0, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 0, 0, 0, 0, 0, 0, 0, 0] Gem [Lib] [1, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 0, 0, 0, 0, 0, 0, 0, 0] dobj [Lib] [2, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 0, 0, 0, 0, 0, 0, 0, 0] Teapot [Lib] ``` [file linking.zip](https://archive.blender.org/developer/F6403442/file_linking.zip)
Author

Added subscriber: @jdent02

Added subscriber: @jdent02

Added subscriber: @brecht

Added subscriber: @brecht

I believe it's the parent + persistent_id that gives you a unique key. But this is less obvious now that it's one flat list, so perhaps it should be included in there.

I believe it's the parent + persistent_id that gives you a unique key. But this is less obvious now that it's one flat list, so perhaps it should be included in there.
Author

That's how I ended up getting around it, and I wasn't sure if it was a bug or intended behavior (I could see the case being made for either)

That's how I ended up getting around it, and I wasn't sure if it was a bug or intended behavior (I could see the case being made for either)

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Brecht Van Lommel self-assigned this 2019-02-01 19:57:37 +01:00

Not considering it a bug then.

Not considering it a bug then.
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#60881
No description provided.