armory
armory copied to clipboard
Set material param RGB Node
scene1 object1 material1 scene2 object2 material1
it seems if object1 is spawned from scene1 to scene2, if i use the set material param rgb node with per object option disabled, only object1 changes color, even though both object1 and object2 share the same material1. If i check the name of the material of object1 which was spawned is still material1, but it appears is not referencing to the same material1 of object2.
System Blender: 3.3.0 Armory: 202301 OS: Windows 10
Apparently individual scenes export separate materials, even if the material is from the same data-block originally?
I was able to find a workaround to the issue without touching source code by:
- Getting the material per object instead of by data-block.
- Running the logic in both scenes. Interestingly, I also discovered for the second scene (which I spawn in), I only need to run the logic on one of the objects from the second scene for all of those scene's objects to copy the same logic. NOTE: If the code is not run in the second scene on at least one object, the logic will not affect that scene's materials at all, even if run by the first/original scene.
I think material constants are the issue here.. I personally cannot seem to figure out whether it's a Python or Haxe side of things.