Group in object

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

Comment viewing options

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

Error

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

max 2017

sable806's picture

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.

AttachmentSize
grouptomesh.mcr 1.18 KB
ibm's picture

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/

sable806's picture

Sorry

I've just seen why it did that, it's fixed it should work as you need.

AttachmentSize
grouptomesh_v2.1.mcr 1.18 KB
ibm's picture

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

sable806's picture

Fixed

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

Feel free to give some feedback.

AttachmentSize
grouptomesh_v2.2.mcr 1.25 KB
ibm's picture

Super work

Great thanks

ibm's picture

a mixed group where there is

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.

sable806's picture

Update

This should work.

AttachmentSize
grouptomesh.mcr 1.13 KB
sable806's picture

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 ?

AttachmentSize
grouptomesh.mcr 689 bytes

Comment viewing options

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