I have a problem. I have a complex scene where are over 10 objects which all should get a transparency fade at the same time. They all have different cycle materials.
Is there a way to fade them all at the same time to a special value?
I started to write a Python script to help me with that but it seems I have to add transparency to every single material.
Any ideas how i can manage this? I don’t want to use the compositor.
It would be great if i could get a custom property from the parent object where all other objects are in.
hacked a lil script together which adds a given property to all children objects.
simply get the property in cycles.
allchildren = 
for each in parent.children:
for eachsub in each.children:
for eachsubsub in eachsub.children:
for eachsubsubsub in eachsubsub.children:
for each in children:
each[property] = value
for each in children:
# get all children till third generation
children = get_children(bpy.data.objects['main'])
# set the property
The simpliest way is to use NodeGroup. Create a node group to mix the final material with a TransparencyShader, and add this nodegroup to all your materials. Then you can animate the mix factor inside the node group, and all the material with that node group will reflect the changes.
Woah. thats it. Thanks. I will modify my script to add the group to every child.
I’ve set up a Node Group to use to fade multiple materials too, but have a problem. Once the keyed value is inside a Node Group, it no longer updates in the view port in Materials mode. However, it renders correctly. This makes it so I have to render out my animations in order to see if they are correct; Not ideal.
Attached is a blend file showing the problem. If there is something I’m doing wrong or a fix for this, please advise.
AnimNodGrpProb.blend (524 KB)
which version of blender are you using? I’m using 2.73a and it’s working ok here…
I’m using the latest; 2.74. I tried re-installing 2.73a but found the same problem (perhaps it didn’t replace some of the blender libraries back to 2.73a?)
Here is a screenshot of the problem found in my attached .blend file:
This view shows that while changing the fac in the edited Node Group, the view port shows the change in transparency.
This view shows that while playing through timeline, the fac value changes but is NOT updated in the view port.
Any help is appreciated. Thanks,
Instead of having your viewport shading set to ‘Material’, you need to set it to ‘Rendered’.
I tried that and it didn’t work before. But I’ve done an overhaul of the scenes and materials with many changes… and now it does work in the viewport using Rendered. Your response made me check it again. Thanks for your help.