Hi, just came across a funny thing that I don’t understand:
invoking the children() function on a group of materials, doesn’t return the expected array.
To make myself clear, here it is a basic hierarchy:
Mainly 2 groups, 1 made of 1 plane and 1 made of 1 material.
Now this code, which compare an array manually built and the one returned by the children() function:
var planesArray_1 = [];
planesArray_1[0] = symbol.nodes.Plane_1;
var planesArray_2 = [];
planesArray_2 = symbol.nodes.planes.children();
if( planesArray_1[0] === planesArray_2[0] ) symbol.nodes.debug_2.text("Yes");
else symbol.nodes.debug_2.text("No");
For the group of planes, the result is ‘yes’ : the arrays are identical.
Now the same code with materials:
var materialsArray_1 = [];
materialsArray_1[0] = symbol.nodes.Material_1;
var materialsArray_2 = [];
materialsArray_2 = symbol.nodes.materials.children();
if( materialsArray_1[0] === materialsArray_2[0] ) symbol.nodes.debug_1.text("Yes");
else symbol.nodes.debug_1.text("No");
Here the result is “No”.
Are materials a different sort of nodes?
Thanks,