Returns a PropertyCollection containing each Property object installed on the object. For example, if you have a material installed on the node and the branch, and the X3DObject is also in a Group that has a material, then only the group material will appear in this collection.
' Apply a Material on a cylinder set root = Application.Activeproject.ActiveScene.Root set Cyl = root.AddGeometry("Cylinder","MeshSurface") Cyl.AddMaterial "Phong",,"PhongInNode" set mat1 = Cyl.Material mat1.Parameters("name").Value = "MatOnCyl" mat1.Shaders("PhongInNode").Parameters("diffuse").blue = 0.453 ' Create a group containing the Cylinder, apply a material on it. set aGroup = root.AddGroup( Cyl ) aGroup.AddMaterial "Phong" set mat2 = aGroup.Material mat2.Parameters("name").Value = "MatOnGroup" mat2.Shaders("Phong").Parameters("diffuse").red = 0.031 ' Display the applied properties of the cylinder ' the Group material "MatOnGroup" should be there, but not "MatOnCyl" set CylPropColl = Cyl.Properties logmessage "Applied Properties for : " & Cyl for each aCylProp in CylPropColl logmessage " > Branch : " & aCylProp.branch & " - " & aCylProp next |