Page MenuHome

Bugfix. Getting default value from hidden material socket after material switch with Python.
AbandonedPublic

Authored by Alexander Romanov (a.romanov) on May 5 2015, 5:09 PM.

Details

Summary

How to reproduce:

  1. Create node Material
  2. Create two materials
  3. Choose the first material in material node and set some value for "DiffuseIntensity"
  4. Choose another material in material node and set another value for "DiffuseIntensity"
  5. Ctrl+H on material node
  6. Try to access default value with Python:

C.active_object.data.materials['Material'].node_tree.nodes['Material'].inputs['DiffuseIntensity'].default_value

  1. Switch material and try the previous step, you will see the same result because the value was not updated

The same bug is reproduced in attached file in Extended Material node.

Alexander (Blend4Web Team)

Diff Detail

Event Timeline

Alexander Romanov (a.romanov) retitled this revision from to Bugfix. Getting default value from hidden material socket after material switch with Python..May 5 2015, 5:09 PM
Alexander Romanov (a.romanov) updated this object.
Alexander Romanov (a.romanov) updated this revision to Diff 4155.

Committed with minor changes 69bf3a9, thanks for the patch!