Could anyone please help me delete all Point Helper objects in the scene that have no linked objects (Children)? Your assistance would be greatly appreciated. Thank you!
Forum topic · General Scripting
How to delete all Helpers with no Children?
By harumscarum · 2023-07-06
Description
Comments (8)
harumscarum · 2023-07-20
weird! now is working! )))
thanks once again
harumscarum · 2023-07-20
Thank you! Unfortunately, I couldn't make it work. When I run the script, nothing happens. I made some edits by removing the portion 'and (h.children).count == 0' because in this case, all helpers are moving to HLP layers, not just the empty ones.
Appreciate your efforts!
harumscarum · 2023-07-20
I would also appreciate help with the MaxScript command to move all Helper objects to the 'HLP' layer. Thank you!
.
miauu · 2023-07-20
For the Point helpers only:
(
hlpLayer = layerManager.getLayerFromName "HLP"
if hlpLayer == undefined do hlpLayer = layerManager.newLayerFromName "HLP"
for h in helpers where (classof h == Point) and (h.children).count == 0 do hlpLayer.addNode h
)
For all helpers:
(
hlpLayer = layerManager.getLayerFromName "HLP"
if hlpLayer == undefined do hlpLayer = layerManager.newLayerFromName "HLP"
for h in helpers where (h.children).count == 0 do hlpLayer.addNode h
)
harumscarum · 2023-07-08
works like a charm - thank you!
Thanks
harumscarum · 2023-07-08
unfortunately nothing is happens with the Helper object once I run script
.
miauu · 2023-07-08
delete (for h in helpers where (classof h == Point) and (h.children).count == 0 collect h)
.
jahman · 2023-07-06
try this
delete (for h in helpers where (classof h == Point) and (h.children == undefined) collect h)