box uvw to each in selection

Bueno!
My first own script actually, was working before i save it....
dunno what happend?? any help please!

mycount = selection.count
addmodifier selection (Uvwmap ())
(
for i =1 to mycount do
$[i].modifiers[#UVW_Mapping].maptype = 4;
)

Comments

Comment viewing options

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

well i'm silly small nOOb

well i'm silly small nOOb might you guys can just point me to some tutor or something, cause i tryed to check max script reference and can't understand a shit in there! Got some oldSchool book on max script for beginners, but there is too much beginner stuff...
The problems i have to solve mostly some mechanic actions with arrays of objects.

pls help nooobie!

br0t's picture

Ive read most of the

Ive read most of the "MAXScript Essentials" book, which is pretty nice. But imho you will learn a lot faster in conjunction with video tutorials like the "MAXScript 101" on the start page:
http://www.scriptspot.com/

About arrays, Anubis has published an article of using them in MAXScript:
http://www.scriptspot.com/3ds-max/tutorials/lets-play-with-array

Cheers

Never get low & slow & out of ideas

antokhio's picture

would love if someone could

would love if someone could help me on this one too:

$.EditablePoly.SetSelection #Face #{$position}
$.EditablePoly.detachToElement #Face keepOriginal:off

just to detach selected object with one click

br0t's picture

You should avoid using the

You should avoid using the "$" character when working on a selection of multiple objects, as it can reference subanimations instead of nodes. Better loop over your selection and use the loop index to reference the objects in the selection like so:

for i=1 to selection.count do
(
    selection[i].wirecolor = random black white
)--end for

About your problem:
If you see something like this in the help file:
< void >< EditablePoly >.SetSelection < enum >selectionLevel < bitArray >selection

It means that the command "SetSelection" will return nothing (void), will work on EditablePolygons only and you have to give it the selection level as a enum value (#Whatever) as well as a number of polygons/vertices or whatever to work on as a bitarray value (#{1,2,3,5..12}).
Example:

myEPoly = selection[1]
myEPoly.SetSelection #Face #{1..10} --will select the first ten polygons of that editable poly
myEPoly.detachToElement #Face keepOriginal:off --will detach the selected faces as an element

I guess what you want to do is to select some polygons and detach them without the dialog popping up? Then there would be no need to set a face selection, just use the detach command.

Never get low & slow & out of ideas

antokhio's picture

thank you! thank you! thank

thank you! thank you! thank you!
the problem that i had is array's of boxes like 400+
and i needed special order on that arrays so it goes from left top corner to bottom right, the only way achive that change hierarchy of the objects, what i don't know how to do in max directly, so i just detach them one-by-one in the order i need....

The problem with thouse books and tut's thay all have examples working with objects you created in max script, witch is ok if you have up to 3 objects, have't seen any tutor yet concerning current selection workflow...

thank you again! Going to study that stuff anyway!

antokhio's picture

hmm seems don't work with

hmm seems don't work with groups :[

Comment viewing options

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