Notifications
Clear all

[Closed] MAXScript: References + Modifier Stack

Hi All,

we are using a lot of symmetrical BREP data, so a lot of the geometry we use is mirrored. In some cases these are instances and in others they are references. To bring down the size of the files we are handling it is desirable to convert our data to edit mesh. However we also want to maintain instance geometry to save time – i.e. updating one side of the geometry will update the other because the geometry is still mirrored. If you right-click a piece of geometry and select “convert to editable mesh” – all instances/references are made unique.

Therefore I’m attempting to create a custom ” convert to editable mesh’ method which

  • For Unique Geometry
    -> collapse the modifier stack to an “edit mesh”
  • Maintain instance relationships (i.e. objects which have been mirrored)
    -> Add an “Edit Mesh” to the modifier stack + “collapse to it”
  • Maintain reference relationships
    -> Add an “Edit Mesh” to the (common non-unique) modifier stack + “collapse to it”
    -> Leave the unique modifiers of the references as they are

To do this I need to

  1. Be able identify when an object is a reference.

  2. Be able to see when or where on the modifier stack the nodes are references and when they are unique

  3. Also is there a way in MAXScript to make an object a reference?

I’m new to MAXScript so I very much appreciate any help/advice you might be able to provide.
Thanks in advance

Jon

2 Replies

there is a simpler way to convert instanced/referenced objects:

select one instance
add a editmesh modifier on top
rightclick on the added modifier and choose “collapse to”

all instances are preserved and the base are meshes

1 Reply
(@jodonov)
Joined: 11 months ago

Posts: 0

Hi Stefan,

Thanks for your post.

Yes this is what I am basically trying to achieve but with a MAXScript. We are dealing with big files with many different parts – we want to maintain instanced relationships also as this will save our artists time later in the process.

So I want to create a MAXScript which automatically “collapses to” mesh these items:

  • non-instances
  • instances
  • references

The first 2 we are not having any issues with at all. The issue is with references* (see below for explanation of references).

How do I recognise which node on the modifier stack is where the reference starts?

We need this modifier node in order to:

  • add a “Edit Mesh” to and
  • collapse to.

Otherwise the modifier will be added to the unique modifier part – Then when we convert to “edit mesh” the entire object will be made unique. Which is really what I am trying to avoid.

Its a bit complicated to explain sorry – so hopefully Im making sense.

Again thanks in advance for any help that you might be able to provide
Cheers,
J

  • REFERENCES: For a detail explanation of references see this link . But basically a reference is ” a clone dependent on the original up to the point when the object is cloned. Changing parameters for modifiers that were applied to the object before the object was referenced, will change both objects. However, a new modifier can be applied to one of the reference objects, and it will affect only the object to which it is applied.”