Tagged 'General Scripting'

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
--------------------------------------------------------------------

Camera rename

Hi all.

I haven’t used Maxscript in my work for a long time, I forgot a lot...
There is a camera in the scene. It is known that the camera class is Freecamera. I want to rename it using a script.

But that doesn't happen

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
for v in geometry do (
if (classof v == Freecamera) then
(
select v
$.name = "Camera"
)
)
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

Select only the containers to update

Hallo everybody!
I have a lot of containers in many scenes. Is there a method for select only the containers witch need to update?

Someone save my life and my brain! Thanks.

Need help to simplify script for area cropping

This script do perfect job to crop all mesh object in the scene to the rectangle area
Since last versions of 3dsMax allows to Slice Along both X and Y would it be possible to use only two Slice Modifiers which will be located at top-left and bottom-right of the rectangle shape and be applied to all mesh objects in the scene rather then one-by-one?

(

fn shapeFilt o = (superClassOf o == Shape)
rectObj = pickObject prompt:"Pick Rectangle" filter:shapeFilt

if rectObj != undefined then
(

"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] 

I need a really easy custom 3DS Max script written for me, can anyone help?

I need a script written and I'm looking for some help from you experts out there (I'm sure it'll take you guys literally seconds to write this one :) ).

Here's the design;

a) I have around 100 folders, and in each folder there a varying number of splines between 2 and 10 I'd say in each one.

b) I have a Master_Spline that's to be used as the master path for sweeping each those splines that are in each of those 100 Folders.

Here's what I want the script to do.

Small script, works in 3ds 2012 to 2020 but error in 2024

Hi,

this script sample uses custom dot net controls from lonerobot. Whenever mouse is up on the thumbnails the script shows error. Method not found. You have to load attached dll to make it work. Can anybody help me to bypass it, pls. Its shows a method not found errorbox when mouse hovering.

(

rollout HitchHikerRollout "smallbrowser" width:240 height:270
(
dotNetControl 'HitchHiker' "Lonerobot.ui.controls.hitchhiker" pos:[0,0] width:240 height:270
on HitchHikerRollout open do
(

HitchHiker.filetype = (dotNetclass "LoneRobot.UI.Controls.HitchHiker+filetypes").jpg

3ds Max to CSV file

"Hi, is there a way to export a CSV file in 3ds Max using a script? The CSV should have two columns: '3D Object Name' and 'Material Name', listing only the file names of the selected 3D objects along with their corresponding material names." Thank you in Advance

CSV example screenshot.

FTP Download and scope...

Hi Guys, It's been a long time since i needed your help, but i'm stuck with a scope issue for my license script.

I'll Try to explain:
- I've got a mse file, with a few critical functions and a variable into.
- The script download the file into a specific folder,then i call "FileIn Thefile" and the next line is supposed to execute a function found into this file.
-If i launch max, and evaluate the script, the function is not found, but if i evaluate it a second time, the function is found and the script continue... A classic scope issue.

Here is the code:

 

Is it possible to switch on/off Macro recorder from a script?

I would like to know if it is possible to switch on/off Macro recorder from a script.
Thank you.

Syndicate content