Handle Data Dependencies #82653

Open
opened 2020-11-12 15:11:21 +01:00 by Julian Eisel · 9 comments
Member

When dragging in an asset that depends on other data-blocks or files, these dependencies should be handled in a clear way.

    • Indirect datablocks get appended. -- This is done now, including re-using of heavy indirect data-blocks (794c2828af) and proper scene instantiation (df9120b365)
    • External files can use pack, append, then unpack (into e.g. textures/ folder next to .blend) -- In progress, D12423.
When dragging in an asset that depends on other data-blocks or files, these dependencies should be handled in a clear way. * - [x] Indirect datablocks get appended. *-- This is done now, including re-using of heavy indirect data-blocks (794c2828af) and proper scene instantiation (df9120b365)* * - [ ] External files can use pack, append, then unpack (into e.g. textures/ folder next to .blend) *-- In progress, [D12423](https://archive.blender.org/developer/D12423).*
Author
Member

Added subscriber: @JulianEisel

Added subscriber: @JulianEisel

#89986 was marked as duplicate of this issue

#89986 was marked as duplicate of this issue
Author
Member

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

Changed status from 'Needs Triage' to: 'Confirmed'
Julian Eisel changed title from Handle Data Dependencies (Pack Data) to Handle Data Dependencies 2020-11-12 15:12:28 +01:00
Member

Added subscriber: @VilemDuha

Added subscriber: @VilemDuha
Member

It's a question on how to move a file with it's dependencies, at least if these are in relative subfolders. In the Python API, things work strangely. E.g. to change the path where the image will be unpacked, changing image.filepath doesn't work. You need to change image.packed_file.filepath to have the unpack working where you want it. It would be great to be able to pack/unpack without opening the file, and possibly also read unpacked file paths to be able to move them with the .blend.

It's a question on how to move a file with it's dependencies, at least if these are in relative subfolders. In the Python API, things work strangely. E.g. to change the path where the image will be unpacked, changing image.filepath doesn't work. You need to change image.packed_file.filepath to have the unpack working where you want it. It would be great to be able to pack/unpack without opening the file, and possibly also read unpacked file paths to be able to move them with the .blend.

Added subscriber: @BukeBeyond

Added subscriber: @BukeBeyond

I am happy to hear you are thinking of the essential "deduplication" function. I have seen this problem with duplicated materials on various forums reviewing your new Asset Browser.

Imagine a high quality city library, with about a 100 buildings and city detail meshes, sharing about a 100 textures. Upon dragging one building asset into the user project, almost all the 100 textures of about 4GB get uploaded to the GPU. If you drag the same (or a similar) building again, the textures get uploaded again, totaling to 8GB, and waiting the same time (5-10 seconds) again. By the time you are on the 4th asset, you have used up more GPU memory (and waited more) than the entire source library file.

Link importing by default would solve this problem of course. But if you were to put an option into the Asset Browser UI to change the dragging behavior to Append/Copy instead, the duplication of the materials and textures would still make a mess of the scene. Imagine changing the glass reflectivity on all the buildings, now you have to go through them all manually. There is no basic dedup function in Blender either. The current Asset Browser viewport option after dragging to change the import to a Link is currently broken with an "Object Not Found" error. It is also inefficient changing this after the drag and all that uploading to the GPU already.

As idiolistic as it is to embed everything (assets, textures, videos) into a single blender file for sharing with peers, it is also not practical in the industry for serious use. I think the new Asset, Linking and Library Override functions getting built into Blender are paving the way for more complex and higher quality projects. While the Library mentality is very useful for kickstarting new scenes, we must also consider these functions as basic as the "#include" in C++, to break down a scene into manageable modular pieces. Just like textures, it would make sense to include and search for asset blender files within the same directory (say the original link location was not found), not necessarily used as Libraries, but just dependencies. In that case, peer sharing linked data would be just as convenient as including those files in the same directory (or subdirectory), just like textures, without embedding everything into a single grand file.

Currently, the manual Link function of Blender works well in our pipeline, and your new filter by Asset feature is very useful. I am sure you are putting more thought into a robust and flexible API backend than the current UI. We are looking forward trying the Asset Browser with thumbnails when the Link importing becomes functional.

I am happy to hear you are thinking of the essential "deduplication" function. I have seen this problem with duplicated materials on various forums reviewing your new Asset Browser. Imagine a high quality city library, with about a 100 buildings and city detail meshes, sharing about a 100 textures. Upon dragging one building asset into the user project, almost all the 100 textures of about 4GB get uploaded to the GPU. If you drag the same (or a similar) building again, the textures get uploaded again, totaling to 8GB, and waiting the same time (5-10 seconds) again. By the time you are on the 4th asset, you have used up more GPU memory (and waited more) than the entire source library file. Link importing by default would solve this problem of course. But if you were to put an option into the Asset Browser UI to change the dragging behavior to Append/Copy instead, the duplication of the materials and textures would still make a mess of the scene. Imagine changing the glass reflectivity on all the buildings, now you have to go through them all manually. There is no basic dedup function in Blender either. The current Asset Browser viewport option after dragging to change the import to a Link is currently broken with an "Object Not Found" error. It is also inefficient changing this after the drag and all that uploading to the GPU already. As idiolistic as it is to embed everything (assets, textures, videos) into a single blender file for sharing with peers, it is also not practical in the industry for serious use. I think the new Asset, Linking and Library Override functions getting built into Blender are paving the way for more complex and higher quality projects. While the Library mentality is very useful for kickstarting new scenes, we must also consider these functions as basic as the "#include" in C++, to break down a scene into manageable modular pieces. Just like textures, it would make sense to include and search for asset blender files within the same directory (say the original link location was not found), not necessarily used as Libraries, but just dependencies. In that case, peer sharing linked data would be just as convenient as including those files in the same directory (or subdirectory), just like textures, without embedding everything into a single grand file. Currently, the manual Link function of Blender works well in our pipeline, and your new filter by Asset feature is very useful. I am sure you are putting more thought into a robust and flexible API backend than the current UI. We are looking forward trying the Asset Browser with thumbnails when the Link importing becomes functional.
Member

Added subscriber: @Jeroen-Bakker

Added subscriber: @Jeroen-Bakker
Member

When 2 assets share different textures with the same relative paths there can be conflicts. This needs a more in depth design/discussion.
I assume that the first part of this task is already done in master.

When 2 assets share different textures with the same relative paths there can be conflicts. This needs a more in depth design/discussion. I assume that the first part of this task is already done in master.
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#82653
No description provided.