Find Coinstances

Tagged with terms:
2
points
Date Updated: 
05/08/2008
Author Name: 
Colin Senner
Version: 
v1.01

Find CoInstances works in two ways:

1. With Multiple Objects selected it will find objects that are cloned on top of each other resulting in animation flickering

2. With a Single object selected it will find and select faces that are coinstanced

To select all faces which are coplanar use the list-box to "Select All", or
To select only those faces which are copies of the original, use "Select Only Duplicates"

Additional Info: 

1. Run script

2. In Max goto "Customize->Customize User Interface...->Toolbars tab->Category: ColinScripts" and drag "Find Coinstances" to a toolbar, click to run.

Version Requirement: 
3dsmax 7+
AttachmentSize
Find Coinstances v1.01.ms5.82 KB

defex's picture

This is great, except with

This is great, except with multiple objects, it would be nice to only pick one of the duplicates, so you can just delete them right away, the way it is now, you still have to go through them 1 by one, and it takes ages with 10000 trees!

colinsenner's picture

I'm not quite sure I

I'm not quite sure I understand what you mean, the script will find coinstanced objects that are on top of each other. Let me know if this isn't what you mean.

defex's picture

after the script is run on

after the script is run on multiple objects both coincident objects are selected. so say you wanted to find all duplicates and then delete just 1 of them it will still be a chore.

i made a little quick and dirty mod to one of your functions


fn findCoinstancedObjects arr = (
local dupObjs = #()

for o in arr do (
for j in arr where o != j do (
if ((o.transform as string) == (j.transform as string)) and (o.min == j.min) and (o.max == j.max) and (o.wirecolor ==j.wirecolor)then
(
append dupObjs j
j.wirecolor = red
)
)
)
trim_dupsArray dupObjs
)

this way the first duplicate gets selected and the wireframe color is changed, it no longer gets counted as a duplicate because the wireframe color is compared as well as position etc.

of course it wont work if your wireframes are already red! :) could be fixed by using a color nobody would likely use because its not in the color picker.

colinsenner's picture

Ah, figured out what you're

Ah, figured out what you're saying, the functionality was built in, that's why there is a list in there allowing the user to select "only duplicates" or "all objects" but for whatever reason it got broken, I'll update and upload the fix today. Thanks for the good eye.

-Colin

colinsenner's picture

Used and commented your code

Used and commented your code till I think of a more graceful way, thank you, great suggestion. 1.01 is up.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.