Chaos Corona Forum

Chaos Scatter => [Scatter] I need help! => Topic started by: harumscarum on 2025-05-13, 15:37:16

Title: Chaos Scatter: Remove Distribute-on objects with the MaxScript
Post by: harumscarum on 2025-05-13, 15:37:16
Is there any way in Chaos Scatter to remove object named "landuse_residential" from the Distribute-on list with the MaxScript command?
thanks
Title: Re: Chaos Scatter: Remove Distribute-on objects with the MaxScript
Post by: Aram Avetisyan on 2025-05-13, 15:59:58
Hi,

There should definitely be way to do it through maxscript, but are you having issues deleted it with UI?

For maxscript, I believe you need to create a new array for distribute-on object nodes, which will be empty or just the specified object deleted/missing from it.
Title: Re: Chaos Scatter: Remove Distribute-on objects with the MaxScript
Post by: Frood on 2025-05-13, 16:35:18
I think you can delete it directly from the array parameter if you know the index. Select the scatter object and try

Code: [Select]
i=for o in $.targetNodes where o.name=="landuse_residential" collect o
ix=finditem $.targetNodes i[1]
deleteitem $.targetNodes ix
deleteitem $.targetfactors ix

Good Luck