Tagged 'General Scripting'

MaxScript for Unwrap UVW

Hello everyone,

I am trying to automate my UV Unwrapping - but the script is not working properly.

Background:

I have several Objects with the exact same mesh - but after manipulating these models (scaling) I want to automate the pelt-mapping of the uvs.

Since all object have a copy of the same mesh, I simply tried to apply the "edit seams" of my pelt mapping and perform a "quick-peel", but the first step "applying edit seams" does not work.

Here is what I do:

for i in selection do (
--enter Unwrap modifier
i.modifiers[#Unwrap_UVW]

-- faces subobjectLevel

Select only vertical faces of the EditableMesh object

Is there any solution to select vertical faces of the Editable Mesh object?

ELEMENT WITH HIGHEST POLYGONS NUMBER COUNT IN ONE OBJECT

Hello guys,
It has been a while since I start looking for this solution, but nothing.

I need to find and select the element with the highest poly number count in one object. There is no poly count target number, it is totally aleatory.

Another approach would be detaching the elements into objects and find the object with the highest poly number count in this object array selection.

Make referenced objects unique?

I’m having trouble with something I figured would be trivial to achieve with the built-in functions.

I have a bunch of reference objects, which I would like to turn unique, without affecting the modifiers on top.

But for some reason I can’t get InstanceMgr.MakeObjectsUnique function to work. It works fine on instances, but not on references.
The InstanceMgr.CanMakeObjectsUnique also returns false, whenever I try it on a reference.

Named Selection Set by object or Layer by object

Hello guys !

do you know how can i make selection set by object automatically ?
Like i'm select 20 object, and it copy each name, and create a namedselectionset for each object ?

And the same trick but layer as namedselectionset ?

Add Slice Modifier to the selected objects

what is the best way to add one Slice Modifier to the all selected objects with the Slice Plane set to Z=-100 and then Collapse them to EditableMesh

Add Slice Modifier to the selected objects

what is the best way to add one Slice Modifier to the all selected objects with the Slice Plane set to Z=-100 and then Collapse them to EditableMesh

Recover instance from a reference

Hi,
I found on Autodesk forum a line of script to recover the instance from a reference object.

I mean :
- I create an Object A
- I copy it as a reference ( B) , I apply a modifier on it
- I select B and apply the script, I get an instance of A.

The line of script is : Line baseObject:$.baseObject

I don't find any explanation, why "line" ?

And it works on some files, but in a heavy file I work it don't work, ans use another object...

Anybody have any idea ? Or an another solution ?
Thanks.

How to stop maxscript dialogue box from opening at start-up

Hello gentlemen,

I have a hard time with my 3ds Max 2009 every time I open the software it always starts with the maxscript dialogue box open. I would like to know if there is a way to start the 3ds max without the maxscript dialogue box open.

I have tried to uncheck the load startup scripts under MAXscrips but didn't work.

Please any help solving this little thing with be appreciated.

Thanks,

Assigning vertex colors to selected poly vertices

Hi,
I'm trying to create a script to define vertex color from select vertices from a vol. select modifier. I don't have any knowledge in scripting and was trying to record Macros to achieve this.
First created the vol. select then used the output vertices into a Data Channel that assigns the vertex colors.
The modifier stack does exactly what I want although when running the macro it errors and the output vertex colors are random. (MacroRecorder doesn't seam to record the output and input of the Operators)