Message 1 of 5
Deselecting selected after unhide a child
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Good day to all!
I am very very new to the maxscript and to the English language too
I had a lot of fun programming the script via ChatGT, but I encountered a problem that it can't solve.
Task: When selecting one of several cameras, it is necessary that the child plane to it is unhide.
Problem: The planes are displayed as they should be, but when clicking on an unselected camera, if the plane was previously hidden, the selection is removed from the camera. This only happens when the camera is selected onclick. If you select the camera with a selection area or in layers, then the selection stays. The selection also remains if the linked plane to the camera has not been hidden.
try(destroydialog myRollout)catch()
rollout myRollout "MyRollout" width:140 height:265 (
fn SelectionChanged =
(
selection[1].children.ishidden = false
)
on myRollout open do(
callbacks.removescripts id:#MySelectionChange
callbacks.addscript #selectionSetChanged "myRollout.SelectionChanged()" id:#MySelectionChange
)
on myRollout close do (callbacks.removescripts id:#MySelectionChange)
)
createdialog myRollout