|
I’m adding some error trapping into my script so if the group that I’m toggling the visibility isn’t there it tells you so. If the group is a child of a model and not the scene root it doesn’t work at all. All it says is the group doesn’t exist, but if I tell it to select oGroup instead of the if statement, the group is selected.
[INDENT]Set oRoot = ActiveSceneRoot
Set oBiped = oRoot.FindChild("Biped")
Set oGroup = oBiped.Findchild("Bones")
If oGroup Is Nothing Then
LogMessage “The group ‘Bones’ does not exit.”
Else
If GetValue ("biped.hk_bones.viewvis") = 1 Then
SetValue “biped.hk_bones.viewvis”, 0
Else
SetValue"biped.bones.viewvis", 1
End If
End If
[/INDENT]
|
|
|
|
You probably what to do this:
Set oGroup = dictionary.getobject(oBiped&".Bones",false)
If typename(oGroup) = “Nothing” Then
|
|
|