Fix: Dont unpack resources that are packed in linked files #122092

Merged
Philipp Oeser merged 2 commits from lichtwerk/blender:122033_a into main 2024-05-22 14:50:36 +02:00
Member

These remain linked, so data remains to be read/loaded from the packed
version from the library (making this a useless and wasteful
duplication, also changes could be perceived as lost). Tooltip was also
reading "Unpack all files packed into this .blend to external ones",
so that bring it in line with the tooltip.

This came up in #122033

These remain linked, so data remains to be read/loaded from the packed version from the library (making this a useless and wasteful duplication, also changes could be perceived as lost). Tooltip was also reading "Unpack all files packed **into this .blend** to external ones", so that bring it in line with the tooltip. This came up in #122033
Philipp Oeser added 1 commit 2024-05-22 11:39:44 +02:00
These remain linked, so data remains to be read/loaded from the packed
version from the library (making this a useless and wasteful
duplication, also changes could be perceived as lost). Tooltip was also
reading "Unpack all files packed **into this .blend** to external ones",
so that bring it in line with the tooltip.

This came up in #122033
Philipp Oeser requested review from Bastien Montagne 2024-05-22 11:39:56 +02:00
Philipp Oeser added this to the Core project 2024-05-22 11:40:03 +02:00
Bastien Montagne requested changes 2024-05-22 11:54:46 +02:00
Dismissed
Bastien Montagne left a comment
Owner

Think for a bugfix this patch is fine (besides mistake noted below).

But this shows how horrible our packedfile handling code is currently, will have to refactor this into a much more generic handling at some point.

Think for a bugfix this patch is fine (besides mistake noted below). But this shows how horrible our packedfile handling code is currently, will have to refactor this into a much more generic handling at some point.
@ -845,3 +845,3 @@
case ID_IM: {
Image *ima = (Image *)id;
if (BKE_image_has_packedfile(ima)) {
if (BKE_image_has_packedfile(ima) && !ID_IS_LINKED(ima)) {

This should be checked at the start of this function (that way also no risk to forget other types of IDs like below ;) ).

This should be checked at the start of this function (that way also no risk to forget other types of IDs like below ;) ).
Philipp Oeser added 1 commit 2024-05-22 12:23:52 +02:00
check once at the start of the function
Bastien Montagne approved these changes 2024-05-22 14:38:30 +02:00
Philipp Oeser merged commit c6aa1fec2b into main 2024-05-22 14:50:36 +02:00
Philipp Oeser deleted branch 122033_a 2024-05-22 14:50:39 +02:00

It should actually check ID_IS_EDITABLE now. I can fix it.

It should actually check `ID_IS_EDITABLE` now. I can fix it.
Author
Member

It should actually check ID_IS_EDITABLE now. I can fix it.

thx!

> It should actually check `ID_IS_EDITABLE` now. I can fix it. thx!
Author
Member

It should actually check ID_IS_EDITABLE now. I can fix it.

we should probably do !122199 too, right?

> It should actually check `ID_IS_EDITABLE` now. I can fix it. we should probably do !122199 too, right?
Sign in to join this conversation.
No reviewers
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
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
Asset Browser Project
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#122092
No description provided.