Attach objects by name suffix
Hello,
I have a situation where objects are split in two parts after importing .obj originating from Archicad, named for example:
wall_white_flat_part
wall_white_smooth_part
There might be over 100 object pairs like this. Some objects are not split, thus they have no _..._part suffix.
I'm looking for a script that is able to attach objects by their name suffixes (and to weld vertices), but haven't found any. Anybody have ideas before I start scripting?
Best regards,
Jukka
Comments
try this FN
bga
Barigazy, thanks for the
Barigazy, thanks for the function. I tried it, but it attaches everything to one object.
The point is, that there is always a pair of objects with suffixes "_flat_part" and "_smooth_part" which should be attached together.
I was able to get desired results by this apporoach: first strip name suffixes off the object names and then attach objects with same names together.
If I understand you correctly
If I understand you correctly you want to attach only the pair of objects with same sufix. Post some simple example file for testing, and i try to fix function
bga
example object names
Sorry for the delay, the point was to attach objects with different name suffixes. Example scene with 6 objects, result should be two objects:
from:
OBJ_MAASTO_MAALI_01
OBJ_MAASTO_MAALI_01_FLAT_PART
OBJ_MAASTO_MAALI_01_SMOOTH_PART
OBJ_MAASTO_METALLI_ALUMIINI
OBJ_MAASTO_METALLI_ALUMIINI_FLAT_PART
OBJ_MAASTO_METALLI_ALUMIINI_SMOOTH_PART
to:
OBJ_MAASTO_MAALI_01
OBJ_MAASTO_METALLI_ALUMIINI
The problem is, there is not always this object without any suffix like in this example.
sorry Kino but can't resist :)
you said almost 3 months ago:
Anybody have ideas before I start scripting?
are you start scripting finally?
and if so, show what you done so far
my recent MAXScripts RSS (archive here)
solution#2
Not have the time to test this tool but this is the concept scrit after all.
Just type (or paste) object name OBJ_MAASTO_MAALI_01 (like prefix)
and press the button. Next add next name OBJ_MAASTO_METALLI_ALUMIINI
etc.
bga