'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
' This example demonstrates the differences between the name information you can
' access in Softimage. Specifically, it shows when you can use the Name, FullName,
' ScriptingName, and ScriptName properties and what information they return.
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CreateParticleCloud()
Application.LogMessage "PARTICLE CLOUD INFO.............."
showNames selection(0), "particle cloud"
set oCube = activesceneroot.addgeometry( "cube", "meshsurface" )
Application.LogMessage typename( oCube.parameters(0) )
Application.LogMessage "OBJECT INFO.............."
showNames oCube, "oCube"
Application.LogMessage "PRIMITIVE INFO.............."
showNames oCube.activeprimitive, "oCube.activeprimitive"
Application.LogMessage "GEOMETRY INFO.............."
showNames oCube.activeprimitive.geometry, "oCube.activeprimitive.geometry"
Application.LogMessage "PARAMETER INFO.............."
showNames oCube.activeprimitive.parameters(0), "oCube.activeprimitive.parameters(0)"
Application.LogMessage "PROPERTIES INFO.............."
showNames oCube.properties(0), "oCube.properties(0)"
Application.LogMessage "PARAMETER INFO.............."
showNames oCube.parameters(0), "oCube.parameters(0)"
Application.LogMessage "COMMAND INFO.............."
showNames application.commands(0), "application.commands(0)"
removefromselection oCloud
addtoselection oCube
set oOps = applyop( "twist" )
Application.LogMessage "OPERATOR INFO.............."
showNames oOps(0), "oOps(0)"
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
function showNames( in_ShowMe, in_ErrWhere )
Application.LogMessage "-------------------------------------------------------------------"
if typename( in_ShowMe ) <> "Nothing" then
Application.LogMessage "Name = " & in_ShowMe.Name
Application.LogMessage "FullName = " & in_ShowMe.FullName
if typename( in_ShowMe ) = "Command" then
Application.LogMessage "ScriptingName = " & in_ShowMe.ScriptingName
else
Application.LogMessage "ScriptingName is not available for the " _
& in_ShowMe.Name & " (it's only for commands)"
end if
if typename( in_ShowMe ) = "Parameter" then
Application.LogMessage "ScriptName = " & in_ShowMe.ScriptName
else
Application.LogMessage "ScriptName is not available for the " _
& in_ShowMe.Name & " (it's only for parameters)"
end if
else
Application.LogMessage "Object required for " & in_ErrWhere
end if
Application.LogMessage "-------------------------------------------------------------------"
end function
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
' OUTPUT OF THIS SCRIPT IS:
'INFO : "PARTICLE CLOUD INFO.............."
'INFO : "-------------------------------------------------------------------"
'INFO : "Name = cloud"
'INFO : "FullName = cloud"
'INFO : "ScriptingName is not available for the cloud (it's only for commands)"
'INFO : "ScriptName is not available for the cloud (it's only for parameters)"
'INFO : "-------------------------------------------------------------------"
'INFO : "Parameter"
'INFO : "OBJECT INFO.............."
'INFO : "-------------------------------------------------------------------"
'INFO : "Name = cube"
'INFO : "FullName = cube"
'INFO : "ScriptingName is not available for the cube (it's only for commands)"
'INFO : "ScriptName is not available for the cube (it's only for parameters)"
'INFO : "-------------------------------------------------------------------"
'INFO : "PRIMITIVE INFO.............."
'INFO : "-------------------------------------------------------------------"
'INFO : "Name = Polygon Mesh"
'INFO : "FullName = cube.polymsh"
'INFO : "ScriptingName is not available for the Polygon Mesh (it's only for commands)"
'INFO : "ScriptName is not available for the Polygon Mesh (it's only for parameters)"
'INFO : "-------------------------------------------------------------------"
'INFO : "GEOMETRY INFO.............."
'INFO : "-------------------------------------------------------------------"
'INFO : "Name = polymsh"
'INFO : "FullName = polymsh"
'INFO : "ScriptingName is not available for the polymsh (it's only for commands)"
'INFO : "ScriptName is not available for the polymsh (it's only for parameters)"
'INFO : "-------------------------------------------------------------------"
'INFO : "PARAMETER INFO.............."
'INFO : "-------------------------------------------------------------------"
'INFO : "Object required for oCube.activeprimitive.parameters(0)"
'INFO : "-------------------------------------------------------------------"
'INFO : "PROPERTIES INFO.............."
'INFO : "-------------------------------------------------------------------"
'INFO : "Name = Kinematics"
'INFO : "FullName = cube.kine"
'INFO : "ScriptingName is not available for the Kinematics (it's only for commands)"
'INFO : "ScriptName is not available for the Kinematics (it's only for parameters)"
'INFO : "-------------------------------------------------------------------"
'INFO : "PARAMETER INFO.............."
'INFO : "-------------------------------------------------------------------"
'INFO : "Name = Name"
'INFO : "FullName = cube.Name"
'INFO : "ScriptingName is not available for the Name (it's only for commands)"
'INFO : "ScriptName = Name"
'INFO : "-------------------------------------------------------------------"
'INFO : "COMMAND INFO.............."
'INFO : "-------------------------------------------------------------------"
'INFO : "Name = Volumic"
'INFO : "FullName = Volumic"
'INFO : "ScriptingName = AddProp"
'INFO : "ScriptName is not available for the Volumic (it's only for parameters)"
'INFO : "-------------------------------------------------------------------"
'INFO : "OPERATOR INFO.............."
'INFO : "-------------------------------------------------------------------"
'INFO : "Name = Twist Op"
'INFO : "FullName = cube.polymsh.twistop"
'INFO : "ScriptingName is not available for the Twist Op (it's only for commands)"
'INFO : "ScriptName is not available for the Twist Op (it's only for parameters)"
'INFO : "-------------------------------------------------------------------"
|