Ability to refer to related object in Material driver
Usecase: vary mix of shaders by a diver based on an objects shape key value. Examples: redden a characters cheeks if pinched; add a red glow to rifle tip when fired/compressed.
There should be a way to reference the current object from python in a material driver node like:
self(material).current_object.to_mesh().shape_keys.key_blocks['cannon fire'].value
current_object would be null/NoneType during editing mode, refer to an object during viewport/render modes.
The workaround is to have single-user duplicates of the Material on each duplicate-linked object.
0 Comments