UI incorrectly permits changing material in materal_slots on linked mesh, but changes are not saved #40411
Labels
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
6 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#40411
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Linux bubastis 3.10.25-gentoo #10 SMP Thu Jan 30 22:17:35 UTC 2014 x86_64 Intel(R) Core(TM) i7-4800MQ CPU @ 2.70GHz GenuineIntel GNU/Linux
01:00.0 VGA compatible controller: NVIDIA Corporation GK107GLM [Quadro K1100M] (rev a1) (prog-if 00 [VGA controller])
Blender Version
Broken: git
bc9e66f083
and probably 2.70
Short description of error
The blender UI allows the user to change which material is in the material_slot of a linked mesh and these alterations affect any renders done during the session, however the alterations are NOT saved and will not take effect for any command-line renders.
To reproduce, link (not append) a mesh object from another .blend file. Make a local copy of the object, but leave the mesh as a link to the external file. You can change the material in the material_slots and see the effects in the UI and rendered images and animations. However, if you save the file and open it again, the changes have been lost since the material_slots are pulled from the linked mesh.
I feel the bug is that the UI does not prevent the user from altering the materials in the material_slots of the mesh.
A workaround for this "problem" is to use the per-object material_slots instead of the per-mesh material slots. Fixing the UI will take a little bit of ingenuity since the material combo box will have to be read-only for per-mesh slots and read/write for per-object slots. (although the per-object slots will have to be read-only if the object is still linked to an external file, eh)
See #40393 for some .blend files I was working with that helped me discover and characterize this shortcoming.
Changed status to: 'Open'
Added subscriber: @mutantbob
Added subscriber: @willi-2
I agree. Assigning a different material to the linked mesh works temporarily but it shouldn't because it assigns it to the material slot of a linked mesh, which is actually read-only.
Added subscriber: @mont29
Not sure we consider that a bug or a TODO? It’s gonna be tough to handle this nicely, I bet. ID template is some kind of spaghetti code spreading all over the place, with a (too?) high factorization between all kind of IDs (objects, materials, textures, etc.)…
Added subscribers: @ideasman42, @brecht
Good news is, getting a working patch was not that hard. Bad news is, it’s adding a very specific case handling in an area supposed to be generic… Not sure there is a better solution though.
P72: #40411
Campbell and/or Brecht, again would rather have your feeling about it before I commit. :)
I think it's possible to create a
RNA_def_property_editable_func
for this property? Then you don't have to add a hack in this generic code.Further, editing the material should be allowed if the material is linked to the mesh, just not when then mesh is linked, so when
me->id.lib
is notNULL
.This issue was referenced by
47bf77951a
Changed status from 'Open' to: 'Resolved'
Closed by commit
47bf77951a
.After testing a recent home-built blender from git with this .blend file, I find the UI to behave in a reasonable and correct manner for the test cases I could come up with.