Outliner: Linking object hierachies to a collection is buggy #90165

Open
opened 2021-07-26 14:10:16 +02:00 by Debuk · 9 comments

System Information
Operating system: Windows-10-10.0.19041-SP0 64 Bits
Graphics card: Radeon RX Vega ATI Technologies Inc. 4.5.14830 Core Profile Context 21.4.1 27.20.21002.112

Blender Version
Broken: version: 2.93.2 Release Candidate, branch: master, commit date: 2021-07-07 05:52, hash: 9e64fd461a
Worked: Unknown
Linking objects with parent child relationship has inconsistent display behaviour in outliner

Short description of error
This bugreport is about linking an object in the outliner to an additional collection.

A linked object can have children. Normally they are displayed in a greyed out state until they are also linked to the same collection as the parent. But there is a bug or at least an inconsistent behaviour if these childs are displayed in a greyed out state or not at all.

Exact steps for others to reproduce the error

The following script adds 3 cubes ,creates a collection and links the cubes to it.
I deleted everything from the Scene Collection and did run the script.

This will work: Working.jpg

But just one more child-level in the tree and it starts to behave inconsistent as can be seen in the outliner shown in the screenshot of some reruns of the same script on a totally empty scene.

Bug.jpg

Bug2.jpg

Bug3.jpg


import bpy

# create some cubes
bpy.ops.mesh.primitive_cube_add(location=(0,0,0))
cube0= bpy.context.active_object
bpy.ops.mesh.primitive_cube_add(location=(5,0,0))
cube1= bpy.context.active_object
bpy.ops.mesh.primitive_cube_add(location=(10,0,0))
cube2= bpy.context.active_object
bpy.ops.mesh.primitive_cube_add(location=(10,0,0))
cube3= bpy.context.active_object

#create a new coll
collection = bpy.data.collections.new("Test")
bpy.context.scene.collection.children.link(collection)

# establish parent child relationships

cube1.parent = cube0
cube2.parent = cube1
cube3.parent = cube2

# link root cube to new coll
collection.objects.link(cube0)


**System Information** Operating system: Windows-10-10.0.19041-SP0 64 Bits Graphics card: Radeon RX Vega ATI Technologies Inc. 4.5.14830 Core Profile Context 21.4.1 27.20.21002.112 **Blender Version** Broken: version: 2.93.2 Release Candidate, branch: master, commit date: 2021-07-07 05:52, hash: `9e64fd461a` Worked: Unknown Linking objects with parent child relationship has inconsistent display behaviour in outliner **Short description of error** This bugreport is about linking an object in the outliner to an additional collection. A linked object can have children. Normally they are displayed in a greyed out state until they are also linked to the same collection as the parent. But there is a bug or at least an inconsistent behaviour if these childs are displayed in a greyed out state or not at all. **Exact steps for others to reproduce the error** The following script adds 3 cubes ,creates a collection and links the cubes to it. I deleted everything from the Scene Collection and did run the script. This will work: ![Working.jpg](https://archive.blender.org/developer/F10238409/Working.jpg) But just one more child-level in the tree and it starts to behave inconsistent as can be seen in the outliner shown in the screenshot of some reruns of the same script on a totally empty scene. ![Bug.jpg](https://archive.blender.org/developer/F10238411/Bug.jpg) ![Bug2.jpg](https://archive.blender.org/developer/F10238413/Bug2.jpg) ![Bug3.jpg](https://archive.blender.org/developer/F10238415/Bug3.jpg) ``` import bpy # create some cubes bpy.ops.mesh.primitive_cube_add(location=(0,0,0)) cube0= bpy.context.active_object bpy.ops.mesh.primitive_cube_add(location=(5,0,0)) cube1= bpy.context.active_object bpy.ops.mesh.primitive_cube_add(location=(10,0,0)) cube2= bpy.context.active_object bpy.ops.mesh.primitive_cube_add(location=(10,0,0)) cube3= bpy.context.active_object #create a new coll collection = bpy.data.collections.new("Test") bpy.context.scene.collection.children.link(collection) # establish parent child relationships cube1.parent = cube0 cube2.parent = cube1 cube3.parent = cube2 # link root cube to new coll collection.objects.link(cube0) ```
Author

Added subscriber: @Debuk

Added subscriber: @Debuk
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

Can confirm.

Can confirm.
Member

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

Changed status from 'Needs Triage' to: 'Confirmed'
Philipp Oeser changed title from Linking object hierachies to a collection is buggy to Outliner: Linking object hierachies to a collection is buggy (via script, if run more than once) 2021-07-26 17:12:11 +02:00
Author

Can confirm.

Thanks @lichtwerk , just a note as I think the renamed title is a bit misleading now. The scripts shows the inconsistency of the operations , but its not just happening that way. Creating the objects, collections, the parenting and linking can all be done manually and will also fail.

And the script also does often fail in the first run.

Heres a screenshot of a manual creation

Manually.jpg

> Can confirm. Thanks @lichtwerk , just a note as I think the renamed title is a bit misleading now. The scripts shows the inconsistency of the operations , but its not just happening that way. Creating the objects, collections, the parenting and linking can all be done manually and will also fail. And the script also does often fail in the first run. Heres a screenshot of a manual creation ![Manually.jpg](https://archive.blender.org/developer/F10238900/Manually.jpg)
Member

Hm, weird, I was testing this manually as well and it didnt happen then.
If I repro the steps exactly as in the script, it happens manually for me as well (so assume there is a difference if one of the cubes is in the collection already).
Will change the title back.

Hm, weird, I was testing this manually as well and it didnt happen then. If I repro the steps exactly as in the script, it happens manually for me as well (so assume there is a difference if one of the cubes is in the collection already). Will change the title back.
Philipp Oeser changed title from Outliner: Linking object hierachies to a collection is buggy (via script, if run more than once) to Outliner: Linking object hierachies to a collection is buggy 2021-07-26 21:11:12 +02:00
Author

Ok, yes I see, its simply not happening everytime, thats why its easier reproduced by script. If the depthlevels of the unlinked hierarchy displayed is less or equal to 2 it seems to work. If its more most times it fails.

Ok, yes I see, its simply not happening everytime, thats why its easier reproduced by script. If the depthlevels of the unlinked hierarchy displayed is less or equal to 2 it seems to work. If its more most times it fails.

Added subscriber: @Sparazza

Added subscriber: @Sparazza

Also confirm.. I've seen the same behaviour while creating a 3 object hierarchy, having some into a collection and the others in another collection. I think is related to the same linking problem.
By reloading the file a bunch of times, the inner children will be shown out from the parent relation (at random).

I've made a video of the issue with a brand new file:
Bug Outliner Parent Link-1.mp4
Sorry for the jumping video.. but you can clearly see at every reload of the scene that Son and Daughter jumps off from the father into the outliner.

Also confirm.. I've seen the same behaviour while creating a 3 object hierarchy, having some into a collection and the others in another collection. I think is related to the same linking problem. By reloading the file a bunch of times, the inner children will be shown out from the parent relation (at random). I've made a video of the issue with a brand new file: [Bug Outliner Parent Link-1.mp4](https://archive.blender.org/developer/F12676200/Bug_Outliner_Parent_Link-1.mp4) Sorry for the jumping video.. but you can clearly see at every reload of the scene that Son and Daughter jumps off from the father into the outliner.
Philipp Oeser removed the
Interest
User Interface
label 2023-02-10 09:23:14 +01:00
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
3 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#90165
No description provided.