Tagged 'General Scripting'

Vray Properties in maxscript

Hello to everyone,

 i'm trying to find all the names of the Vray Properties in vray. By now ik know:

     "VRay_Matte_Enable" (bool)

     "VRay_Matte_Alpha" (bool)

DETECT AND CLEAN UNUSED TEXTURE FROM THE SCENE

how to detect is a texture used on any object or not!
Lets say I have in my scene missing textures that are not used at all in my scene, or may be I have an object with ids: 1,2,3 with a multimaterial with 4 IDs where the textures

001.jpg for ID 1
002.jpg for ID 2
003.jpg for ID 3 and
004.jpg for ID 4!

It means there are 2 situation:
004.jpg is used in material and is unused in object!
It would be wonderful to list textures as following:

in objects
d:\folder\textures\001.jpg used
d:\folder\textures\002.jpg used
d:\folder\textures\003.jpg used

How to run a script? (yes I'm asking that)

Hello, im new at maxscript. Ive read the help (not complete, of course) and searched google, and to my suirprise, i cant find the way to run (or execute, or apply) a script I wrote.
Let me be clear: I open Notepad, type the code, change the extension to .ms, open max, click on maxscript, click on run script, load the script, and nothing happens. Where's the secret button to make it actually run?

Regards,
Mariolillo

Select object by name

In scene present $box01, in maxscript I have string a="box01" .
Can I select object $box01 in scene use string like
"select a as object" ????

[Solved] How to get position [x,y,z] of vertex of a Line

Hi,

I'm completely new to Maxscript (and to 3ds max), and I'm trying to do something that sounds very simple but for some reason I cannot find the solution online. Namely, I want to move an object to the position of a selected vertex on a spline. All I'm missing is the script to find the [x,y,z] position of a selected vertex. Can anyone help me out?

Open All groups (and sub-groups)

Hi everybody!

I need to create a script to simplify my work. I need to open all groups in the scene, but it means all sub-groups too (groups inside antoher group). Something like a loop in the command "Select All" and "Group Open", until open all groups, that's what I'm doing manually.
To close is simple, one time command, but to open...
I don't know script, my only experience are recording actions and create scripts with it. Very, very, very basic...

Can anyone help me?

Regards,

Caetano Brasil

get vertex-pos with maxscript

Hello,

how can i print the position of every vertex in a editable poly object for each frame with maxscript?

thanks

How to extrude polygons by a random amount?

Hi there!

I got an editable poly here and some polygons selected. Now I want to extrude each polygon by some random amount. The problem is I don't konw how to have a loop iterating over each polygon. I also don't know how to get each polygon into an array in order to iterate over each variable of the array.
All that I am currently capable of is to extrude ALL polygons by a random amount which is not what i want.
Is there any existing script for that, or how can i solve my problem?

Sublime Text Editor - MXS support

Hi,

Is there anyone who has looked at opportunities to get support for the MXS to the Sublime Text Editor? (http://www.sublimetext.com/)

I have not investigated this much, but this should probably be able to do?

I see it already is language defenition files to notepad++ here(Notepad++ MXS Language Definition)

Have any of you tips, tricks and suggestions around this they would have been received with great thanks.

May i know how to sent byte array to serial port using maxscript?

May i know how to sent byte array to serial port using maxscript?
I have a device which requires me to sent data through serial port. In order to achieve serial communication i use dotnet object SerialPort.Write (Byte(), Int32, Int32) to sent my data but i have no idea how to sent byte array (byte()) in maxscript, can anyone tell me how?

port = dotNetObject "System.IO.Ports.SerialPort"
port.portname = "COM1"
port.baudrate = 2400
port.parity = port.parity.none
port.databits = 8
port.stopbits = port.stopbits.one
port.handshake= port.handshake.RequestToSend

Syndicate content