'VBScript example showing Singleton and Branch values properties of an object
newscene ,false
set oSphere = ActiveSceneRoot.AddGeometry( "Sphere","MeshSurface")
'There are already default properties on any X3DObject, and we can also
'add another
oSphere.AddProperty "CustomProperty",, "MyCustomParam"
logmessage "Properties of " & oSphere
for each oProp in oSphere.Properties
logmessage vbTab & oProp.Name & vbLf & _
vbTab & vbTab & "Singleton: " & oProp.Singleton & vbLf & _
vbTab & vbTab & "Branch: " & oProp.Branch
next
'Output of this script:
'INFO : "Property info on sphere"
'INFO : " Kinematics
' Singleton: False
' Branch: False"
'INFO : " Visibility
' Singleton: True
' Branch: False"
'INFO : " Ambient Lighting
' Singleton: True
' Branch: True"
'INFO : " Scene_Material
' Singleton: True
' Branch: True"
'INFO : " Geometry Approximation
' Singleton: True
' Branch: True"
'INFO : " Display
' Singleton: True
' Branch: True"
'INFO : " MyCustomParam
' Singleton: False
' Branch: False"
|