Tagged 'General Scripting'

Textmap coordonate default mode "Spherical" for "screen" mode with a MaxScript

Hi everybody !
I want to change the default mode "Spherical" for "screen" mode with a MaxScript !
it is possible ?
Where can I find a code, for doing that?
I'm trying with this code, but it d'ont work!

Code:
envmap = bitmapTexture filename:bimppath
envmap.coords.mappingType = 1
envmap.coords.mapping = 3

anybody know a good thread about it ?
tank's

to find the vertex with the most z value among the vertices of the selected face

hi frends .
good new year .

i have a question .

i made Triangular face.

i converted editable poly

in there

i would like to find the vertex with the most z value among the vertices of the selected face

I'm sorry for lacking

Unable to convert: BitMap to type TextureMap

Hi all.
How to convert BitMap to type: TextureMap ?

--------------------------------------------------------------------
displaceBitmapStr = getBitmapOpenFileName caption:"Select displace image file" filename:locDir types:"All|*.*|"

renderWidth = displaceBitmap.width
renderHeight = displaceBitmap.height

displaceBitMap = bitmap renderWidth renderHeight filename:displaceBitmapStr

displaceTextureMap = bitmaptexture.displaceBitMap
--------------------------------------------------------------------

World Machine fast Import to 3dsmax

Very fast import height map and textures map.

Fit World Machine Very large pixels(2048*2048*25)
2012.10.10
free

A free version supports 5x5tile unlimited pixels.

"&"???????

Can anyone please tell me what it means to add a "&" to a variable? as in &variable??

 

I am debugging a script that I inherited and this keeps screwing me up.

 

Thanks,

 

MB

"Array of common values of the non-empty arrays"-question

Hello. I have a question:

I have 4 ui-spinners (which are blank Indeterminate: true) and 4 empty Arrays.
changing a spinner fills up an Array.

for example 3 spinner have a value:

	Marr = #(1,2,3,4,5)
	Rarr = #(3,4,5,6,7,8)  /*just changed */
	Larr = #()
	Tarr = #(4,5,6)

I want to create a 5th Array which contains all the common values of the non-empty arrays

    ComArr = #(4,5)  

with 2 Array i can do:

	ComArr = #()
	If Marr.count >= 1 do (
		Locarr = #()
		for j=1 to Marr.count do (
			N = findItem Rarr Marr[j] 

"Easy way" to check if object have not reseted transform

Objects that have been scaled or mirrored at the object level, attached also will result in a transform matrix that doesn't have all of its axes at right angles to each other. I looking the way to find out which scene objects have bed transform
and reset their transform.

I don't know is this right way

fn doRXF obj = 
(
	if obj.transform as string != obj.objectTransform as string do 
	(
		obj.pivot = obj.center
		ResetXForm obj
		convertToPoly obj -- this is optional
	)
)

"Group with no dialog" script problem

hi
here is simple script which group object without naming dialog and with pivot at the bottom. nice one. but it just after grouping press undo it put selected objects down
why it happens and how to fix?

(
on isenabled return selection.count>1
on execute do (
local grname=selection[1].name
local grhead
if selection.count >1 do group selection name:(grname + "_01")
select $(grname + "_01")
for i in selection where (isgrouphead i) do
i.pivot = [($.max.x+$.min.x)/2, ($.max.y+$.min.y)/2, $.min.z]
)
)

thank you in advance

"isFolderEmpty" function

Does anyone know what is the best way to check if some directory is empty or not.
This fn need to be very "light" for efficient use within a for-loop. I already have a solution but I'm curious if there better solution.
This fn need to have only one argument which represent directory path.
Something like this

fn isFolderEmpty folder:/*path String*/ = ( )

"Make Paths Absolute"

In the Asset Tracking Dialog box there is a "Make Paths Absolute" option for selected assets in a 3DS Max scene.

Is there anyway to make this the default for all assets so that I don't need to go into this dialog box for every project?

If so, could someone please help me to code this?

Many thanks.

Syndicate content