Material hierarchy
![miki3d](https://farnsworth-prod.uc.r.appspot.com/forums/uploads/userpics/973/n6M1G1XAXF3UO.jpg)
Hi there!
I have an item with a child, and to make the color change easy I made a material.duf starting from a saved with "hierarchical material preset".
Here are the items, a mask and a "hide mouth" geograft as child.
here's the code of the material.duf:
"scene" : {
"nodes" : [
{
"id" : "LatexMask",
"url" : "name://@selection/LatexMask_1623:"
},
{
"id" : "HideMouth",
"url" : "name://@selection/HideMouth_58:",
"parent" : "#LatexMask"
}
],
"animations" : [
{
"url" : "LatexMask#materials/LatexMask:?diffuse/value",
"keys" : [ [ 0, [ 1.00, 0.00, 0.00 ] ] ]
},
{
"url" : "HideMouth#materials/LatexMask:?diffuse/value",
"keys" : [ [ 0, [ 1.00, 0.00, 0.00 ] ] ]
}
]
}
This way, applying the material to the parent also changes the child color
Now my question is, since all the items have the same material name (latexmask), is there a way to change the material.duf so it can apply the color to all the "latexmask" materials of the parent and childs without the need of writing all the nodes hierarchy?
This will help me adding more items to the same parent without changing the material code.
Thanks :)