Appending object/material that references scene property imports whole scene #108047

Closed
opened 2023-05-18 14:49:42 +02:00 by slowburn · 12 comments

System Information
Operating system: Windows-10-10.0.19045-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 3060 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 531.79

Blender Version
Broken: version: 3.5.1, branch: blender-v3.5-release, commit date: 2023-04-24 18:11, hash: e1ccd9d4a1d3

Short description of error
Appending or copying object or material from another .blend file, that is somehow referencing custom scene property, also imports that scene with all objects in it.
I've attached an example file with a material that is using custom scene property as a driver for a value input.

Exact steps for others to reproduce the error

  1. Create a new Blender project.
  2. Append a single object or material from the provided file.
  3. Or use Copy Object command to copy/paste it into another project.
  4. A new scene will be created with multiple objects in it.
**System Information** Operating system: Windows-10-10.0.19045-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 3060 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 531.79 **Blender Version** Broken: version: 3.5.1, branch: blender-v3.5-release, commit date: 2023-04-24 18:11, hash: `e1ccd9d4a1d3` **Short description of error** Appending or copying object or material from another .blend file, that is somehow referencing custom scene property, also imports that scene with all objects in it. I've attached an example file with a material that is using custom scene property as a driver for a value input. **Exact steps for others to reproduce the error** 1. Create a new Blender project. 2. Append a single object or material from the provided file. 3. Or use Copy Object command to copy/paste it into another project. 4. A new scene will be created with multiple objects in it.
slowburn added the
Priority
Normal
Status
Needs Triage
Type
Report
labels 2023-05-18 14:49:43 +02:00
Member

Hi, thanks for the report. Can confirm when appending/copying object that has scene reference in driver.

Hi, thanks for the report. Can confirm when appending/copying object that has scene reference in driver.
Pratik Borhade added
Module
Core
Status
Confirmed
and removed
Status
Needs Triage
labels 2023-05-18 17:57:39 +02:00
Member

Dont think this will be considered a bug.
If there is a reference to the scene, it has to be pulled in as well.
What would be the alternative? Have the driver "break"?
(dont think the current state is fine-grained enough to analyze a driver "in depth" to see what exactly it needs to pull in, but havent checked details)

CC @dr.sybren
CC @mont29

Dont think this will be considered a bug. If there is a reference to the scene, it has to be pulled in as well. What would be the alternative? Have the driver "break"? (dont think the current state is fine-grained enough to analyze a driver "in depth" to see what exactly it needs to pull in, but havent checked details) CC @dr.sybren CC @mont29

This is indeed expected behavior, no bug here.

This is indeed expected behavior, no bug here.
Blender Bot added
Status
Archived
and removed
Status
Confirmed
labels 2023-05-19 15:07:03 +02:00
Author

I don't understand the reasoning here. If a material is referencing a scene property, what's the point of importing entire scene with ALL of its objects (which are unrelated)? This is a terrible workflow and also very confusing for the user. It took me quite a while to figure out why I can't append this one object, until I noticed that there are 10 extra scenes and 50000 objects hidden away in a seemingly empty blend file.
Logical solution would be to copy the property into the new scene. If that's not possible for some reason then breaking the driver would be 100x better than current behaviour.

I don't understand the reasoning here. If a material is referencing a scene property, what's the point of importing entire scene with ALL of its objects (which are unrelated)? This is a terrible workflow and also very confusing for the user. It took me quite a while to figure out why I can't append this one object, until I noticed that there are 10 extra scenes and 50000 objects hidden away in a seemingly empty blend file. Logical solution would be to copy the property into the new scene. If that's not possible for some reason then breaking the driver would be 100x better than current behaviour.

If you do not want to bring in a scene, do not create dependencies to this scene.

The whole point of the linking process is that you get what you link and all its dependencies. This behavior is a fundamental trait of Blender data design since it's very beginning, and Scene are among the 'highest level' type of data-blocks (they 'contain' almost all other type of data).

If you do not want to bring in a scene, do not create dependencies to this scene. The whole point of the linking process is that you get what you link and **all** its dependencies. This behavior is a fundamental trait of Blender data design since it's very beginning, and Scene are among the 'highest level' type of data-blocks (they 'contain' almost all other type of data).
Member

So I think (in the case of this report), instead of having custom properties on the scene (to control "scene-wide" stuff on other obects/materials etc. in drivers), it would be better to have a more isolated "controller object" that holds these properties? That way only those get pulled in when appending (and not a whole scene..)

So I _think_ (in the case of this report), instead of having custom properties on the **scene** (to control "scene-wide" stuff on other obects/materials etc. in drivers), it would be better to have a more isolated "controller object" that holds these properties? That way only those get pulled in when appending (and not a whole scene..)
Contributor

I think, to reopen the discussion hopefully, that if driver is referencing to scene property by Scene ID it should import the scene, but if its referencing it by "Active Scene" context property, it should work on active scene of file in which it was added, and not import the scene.

That makes sense to me. I understand why it needs to import scene when you're referencing Scene ID, but when I set it to "Active Scene", I'm expecting it to work on active scene on any blend file, not of source file.

I think, to reopen the discussion hopefully, that if driver is referencing to scene property by Scene ID it should import the scene, but if its referencing it by "Active Scene" context property, it should work on active scene of file in which it was added, and not import the scene. That makes sense to me. I understand why it needs to import scene when you're referencing Scene ID, but when I set it to "Active Scene", I'm expecting it to work on active scene on any blend file, not of source file.

@nickberckley Not fully sure, but is the 'Active Scene' actually bringing in any scene? I would not expect it to do so (unless you already linked a scene in the 'Single Property' mode, before switching to the 'Context Property' one).

@nickberckley Not fully sure, but is the 'Active Scene' actually bringing in any scene? I would not expect it to do so (unless you already linked a scene in the 'Single Property' mode, before switching to the 'Context Property' one).
Contributor

@mont29 You're right I first set it to Single Property and then switched it to Context Property. When I set it up with Context Property first it works as expected and Active Scene isn't importing anything.

Would you consider it a bug that changing Single Property to Context Property doesn't clear ID?

@mont29 You're right I first set it to Single Property and then switched it to Context Property. When I set it up with Context Property first it works as expected and Active Scene isn't importing anything. Would you consider it a bug that changing Single Property to Context Property doesn't clear ID?

No... Although it can be confusing in some cases, most of the time you do not want to reset settings when switching to another 'mode', even if they become unused then.

And linking code has no way to know whether a property is actually used or not. So am afraid it's up to the user to keep things clean here. :)

No... Although it can be confusing in some cases, most of the time you do not want to reset settings when switching to another 'mode', even if they become unused then. And linking code has no way to know whether a property is actually used or not. So am afraid it's up to the user to keep things clean here. :)
Author

@nickberckley

When I set it up with Context Property first it works as expected and Active Scene isn't importing anything.

How can I setup a driver to reference Active Scene? I don't see such option in the drivers editor.

@nickberckley > When I set it up with Context Property first it works as expected and Active Scene isn't importing anything. How can I setup a driver to reference Active Scene? I don't see such option in the drivers editor.
Contributor
![image](/attachments/fa59e079-9041-4754-843f-5482f8cf722b) @slowburn
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
5 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#108047
No description provided.