ScriptSpot home

Forum topic · Scripts Wanted

Group in object

By ibm · 2017-03-23

Description

Hi,

Searched but did not find or did not see

There is a group called "group 1" is required to attach the objects inside it and assign the group name.
Preferably the division into a spline, mesh, if the group and the spline and mesh the two objects "group 1_000" and "group 1_001".

Thank you.

Comments (10)
ibm

Error(
---------------------------
MAXScript MacroScript Error Exception
---------------------------
-- No ""+"" function for undefined
---------------------------

max 2017

Reply to ibm
Robert

Screenshot

Can you post a screenshot of the complete error in the listener window ? I know that max 2017 has less errors informations printed than max 2016 so maybe that's everything you get.

Could you try this on max 2016 if you have one and tell me if it's working or not ? If you do this a screenshot is more than welcome.

I tried the .mcr cause i only tested the .ms, and rewrote part of it so if you can try this new version. This is working for me in max 2016.

Attachments
Reply to Robert
ibm

Good job

thank you very much, now it works

small bug. if the object does not change within a group, the object name is not changed.

example:
the name of the group 1:
group =
>>>>>>>> mesh (box1,box2,вох3)
>>>>>>>> spline (shape_23423)
run script
name mesh - group 1_001, spline - shape_23423

Sorry for my language/

Reply to Robert
ibm

MacroScript Error

-- MAXScript MacroScript Error Exception:

-- Unknown property: "name" in undefined

-- MAXScript callstack:

--thread data: threadID:7308

--------------------------------------------------------

--[stack level: 0]

--In codeblock macroScript: ARTools_GroupToMesh; filename: C:\Users\%username%\AppData\Local\Autodesk\3dsMax\2017 - 64bit\ENU\usermacros\ARTools-GroupToMesh.mcr; position: 554; line: 28

--Locals:

--polyToAttach: #()

--selArray: #($Editable_Spline:1.2-1.006001 @ [1264733.875000,1472399.250000,0.000000], $Editable_Spline:1.2-1.006002 @ [1264751.875000,1473022.250000,0.000000], ...)

--groupName: "1.2-1.006"

--shapeToAttach: #($Editable_Spline:1.2-1.006001 @ [1264733.875000,1472399.250000,0.000000], $Editable_Spline:1.2-1.006002 @ [1264751.875000,1473022.250000,0.000000], ...)

--Externals:

--------------------------------------------------------

--[stack level: 1]

--called from top-level

Reply to ibm
Robert

Fixed

I've just realized what my mistake was ! And i fixed it. It should work fine now.

Feel free to give some feedback.

Attachments
ibm

a mixed group where there is mesh and spline. your script converts to poly and attached. and you need to split the mesh and the spline with attached and assign a group name to the object.

all splines are combined into one spline, the entire mesh in a single mesh. set the group name to these objects. this group remove.

Robert

Working Script

Here is a script i already wrote a few months before. It should works as you need. Except for the second part about spline where your request is not that explicit. Can you rephrase it or explain it with screenshots or what ?

What i understand so far is that you want to attach all geometry in group to one geometry, all spline in group to one spline is that it ?

Attachments