ScriptSpot

Forum topic · Scripts Wanted

GizmoUnify modifier wanted

By harumscarum · 2012-01-21

Description

it is easy to apply certain modifier (UVWMap, Slice, Symmetry, etc) to selection of objects and have common gizmo for all objects. but it is impossible paste this modifier to another objects keeping gizmo in source position. thus need to select objects, delete modifier, add objects to selection and apply modifier again.

i wonder if it is possible to create scripted modifier which will affect all modifiers with gizmos (or 'slice plane' or 'mirror') so if we want joined mapping on objects - just copy and paste instanced UVWMap and GizmoUnify modifiers

i may provide screenshots if needed.

Comments (13)

Thank you Lord!

harumscarum · 2012-01-25

now it works great, there are some issues, but slight ones!
thank you

No problem !

LittleLordPotala · 2012-01-26

I removed the gizmo and center subobjects from the GizmoUnify modifier, so now it's cleaner.

Attachments

+1

Anubis · 2012-01-26

well done!

Thank you Anubis,

LittleLordPotala · 2012-01-26

I have two small tips to optimize the workflow :
1- It will be faster by applying the UnifyGizmo mod at the higher level in the modifier stack (as modifier n°1).
In this way, each time you select an object, the UnifyGizmo mod will be activated and updated.

2- If you really have a lot of objects to update with the UnifyGizmo mod as first modifier, select all the objects you want to update and execute this two lines in the Maxscript Listener:
sel = selection as array
for i in sel do select i

--(It will select each object individually and update it.)

Next update

LittleLordPotala · 2012-01-25

In this last version 1.3, now it works for every modifiers type.
Some modifiers will not update dynamically (in Max 2012), so you just have to go in sub-object mode to update the gizmo.
It can happen especially if you copy / paste-instance a group of modifiers, otherwise it updates normally.

Attachments

An update of my scripted plug-in

LittleLordPotala · 2012-01-25

Now, when you apply the modifier "GizmoUnify", it automatically aligns the instanced modifiers of the current object with the others.
Of course, all the settings and the order of the modifier stack are preserved.
It only works with instanced modifiers.

If later you apply another instanced modifier, you don't need to add a new "GizmoUnify" modifier, it's possible to update it just by clicking on it.

I hope that my contribution will help...

Sorry, but it doesn't seem to work with every modifiers type,
for example : symmetry and uvwmap modifiers have no boundingbox context.
It works with modifiers like bend, noise, melt...
It must have a gizmo with bounding box.

I will see if it's possible to do it with all the types of gizmos.

Best regards.

Attachments

thank you Anubis

harumscarum · 2012-01-23

besides just couple issues it works fine:

1/ unfortunately gizmo resets when script applied. would be great if gizmo position taken from selected object
2/ please add support of Symmetry modifier (gismo has different name - 'Mirror')

i try to get what you say

Anubis · 2012-01-24

"gizmo resets when script applied"
- is not that the aim?

[EDIT] woops, why i thought about Mirror modifier then i reply about Symmetry ? :)

- so you want to include that to the "filtering" i made to can the script affect Symmetry modifier as well? if so no problem.

its a bit filthy job

Anubis · 2012-01-23

..but here is something from me anyway :)
(read the notes as well)

Attachments

a small update

Anubis · 2012-01-23

* now affect only instanced modifiers that has gizmo, as it useful just for this modifiers
* the rest limitations still remains (read notes inside for details)

Attachments

wow!

harumscarum · 2012-01-22

thank you! what a surprise/
it works, but average out two gizmos so result as on screenshot attached.
is it possible to apply source gizmo to new objects if GizmoUnify modifier copied instanced from source objects to new ones - so no need UpdateGizmo button

thanks a lot for your efforts

Attachments

GizmoUnify modifier

LittleLordPotala · 2012-01-22

Try the attached script.
I wrote it in version 2010, two years ago, but I tested it in version 2012 and it still works well. I just renamed it as you suggested in the title.
-------------------------------------------------------------------
How to use it :
if you have a set of objects with an instanced modifier,
then copy and paste as instance this modifier to one new object or new set of objects.
Finally, just apply one times on a single object your "GizmoUnify modifier" and click the button "Update Unify" and all the instanced modifier will be unified with the others.
After that, it's not possible to desactivate the result.

Attachments