Page MenuHome

T90401: Link images when applying material assets.
DraftPublic

Authored by Jeroen Bakker (jbakker) on Aug 3 2021, 4:23 PM.
This is a draft revision that has not yet been submitted for review.

Details

Summary

Currently Materials and its linked resources are appended. When a material is
used multiple times the resources are appended again. Inside blender Images
(unique id) are used as key for many caches (including GPU textures).

This task will link images:

  • Reducing the amount of needed resources.
  • Declutter the image list.
  • When having an image multiple times in the list they can get out of sync in blender and would also confuse users which one has local changes.

Materials will still be local and the image nodes can still be changed.
settings in the texture nodes are stored in the image (due to caching) So
interpolation would be grayed out.

Diff Detail

Repository
rB Blender
Branch
T90401 (branched from master)
Build Status
Buildable 16190
Build 16190: arc lint + arc unit

Event Timeline

source/blender/windowmanager/intern/wm_dragdrop.c
389

This isn't the best location. I tried several things but reverted to this one until we decide where the best location is.

  • IDTypeInfo: doesn't have control data this would be the first.
  • wmDragAsset: would move this code to the UI level where it is created. Even a worse location that in this patch.