'This example creates two primitives
newscene
dim preset, object, primitive
'Create an implicit sphere. Name it.
set object = GetPrim( "Sphere", "MySphere" , , primitive )
'Logged information:
'INFO : "Sphere information"
'INFO : "X3DObject, MySphere"
'INFO : "Primitive, Sphere"
LogMessage "Sphere information"
LogMessage TypeName( object ) & ", " & object.name
LogMessage TypeName( primitive ) & ", " & primitive.name
'Create an implicit cone. Name it and make it child of MySphere
set object = GetPrim( "Cone", "MyCone" ,"MySphere" , primitive )
'Logged information:
'INFO : "Cone information"
'INFO : "X3DObject, MyCone"
'INFO : "Primitive, Cone"
LogMessage "Cone information"
LogMessage TypeName( object ) & ", " & object.name
LogMessage TypeName( primitive ) & ", " & primitive.name
' Create primitive using preset selected by user (Will pop UI for selection)
set preset = SIGetPreset( "Primitives" )
set object = GetPrim( preset, , , primitive )
'Logged information, here we selected a square.
'INFO : "Your primitive's information"
'INFO : "X3DObject, square"
'INFO : "Primitive, Square"
LogMessage "Your primitive's information"
LogMessage TypeName( object ) & ", " & object.name
LogMessage TypeName( primitive ) & ", " & primitive.name |