Tagged 'General Scripting'

Extract jpg from Max Thumbnail

Hey all you good People!

We're working on a huge pile of assets at the moment, and it's super annoying to always do screenshots by hand for the database. I know theres this MaxThumbnailShellExt.dll in the maxrootfolder to use the max thumbnail as Icon. What would be even better, if there's a way to extract the Max Thumbnail as a jpg, which we can put in the database. Any Idea how to achieve this?

Thank you so much!

Align Vertices to Terrain

Is there a way to align all vertices in a spline to a terrain? I have a complicated terrain and I have drawn a spline with say 10 vertices above the terrain. Is there any way to essentially drop each vertex individually to where it hits the terrain? I need each vertex to hit the terrain, where I will in turn place proxies at each vertex. I have done a similar thing with the Soulburn script ObjectDropper, but this will only handle objects, not vertices.

Request for script to assign materials from mat. library's to Layers

I'm in need of a script to load and assign materials form material library's and assign the materials to the specific layers layers based on the material name to the layer name.

I was hoping I could add directories to the script.

Example: Layers: AFUPA-3D-TL-GL, AFUPA-3D-TL-BK assign Material "black plastic 123" from material library in a directory on my D-Drive an so on.

Also if the layer does not exist to skip it and move on.

Here is what I have based on Miauu awesome help.

I would appreciate any help! I'm trying to learn maxcript but is a bit overwhelming. :)

 

Hide custom toolbar when mouse leaves it

Hi!

Is there support to hide a custom toolbar after a certain time once the mouse leaves its area?

Easy thing that I'm struggling, Select by "name"

Hi!

I'm really new into scripting, I'm making a script to select some objects that have "SPR" inside theyr name, but... I can only make it work if the name is exactly "SPR"

really basic stuff sorry, maybe my approach is all wrong.

on btn1 pressed do
(
local springs = #()
for i in selection where classof i == point do
(
if ( i.name == "SPR") do
(
print "hello"
)

)
)

this succesfully prints hello when detects SPR as a name, but I tried to put *SPR* so, if it has SPR inside the name, it prints it too but... wont work...

Generate Grass - Vray Fur

Hello everyone ! I'm a beginner at MAXScripting, and I'm trying to make a script to generate a Vray Fur with specific parameters, as you can see on the screenshot. However, I'm facing a problem with units and scale. With some scenes it works fine, but with some others(with different units), it goes wrong, either with having my grass scaled down or the previous elements of the scene scaled up like x1000.

So I'd like it to work with these constant settings on ANY scene.

In addition, I would like to automatically affect a material in my library to this Vray Fur.

Unable to convert: $selection to type: <node> ----- Why?

Hi all you good people!

I'm writing on a small script which is putting all objects in a scene into a container.
The script looks like this:

global assetproxyPUB
select objects
assetUnproxyPUB = $

cnt01 = container size:50 name:h1
cnt01.displaylabel = true
cnt01.localDefinitionFilename = h1 + "_container"
cnt01.AddNodeToContent assetproxyPUB
cnt01.SetAccessType #anythingUnlocked
cnt01.ClearLockedContents()
cnt01.SetLockedContents #lockAllAnimation true
cnt01.saveContainer true
cnt01.setOpen false

Sometimes it works, sometimes it doesn't.

reaction controller problem

Hello,

I'm trying to create a script that automatically makes a morph target react to a control object, I haven't finished yet, as I hit a wall, every time I execute the script(pressing the button) , I get an "unknown system exception".

the code creates a rollout that has a pick morph button with a field to input the channel name, another to pick the control object, and a "wire" button to make the morph react to the control object, every time i click the wire button i get the error.

global morphObjectchannel
global cont
global controlObject
 
rollout test "pick"
(

Request for script to create layers from object base name

Hello,

I'm in need of a script that could create layers based on names of CAD objects imported into Max, Max brings the CAD geometry and names it based on on its CAD layer, however when adding multiple of the same, it add a numeric sequence to those object.

Example: 3 objects of the same CAD objects.

CAD layer:
AFUPA-3D-TL-GL

Max Imported Object names:
AFUPA-3D-TL-GL.001, AFUPA-3D-TL-GL.002, AFUPA-3D-TL-GL.003

Script to rename Vrayproxies to their reference file

I would love to have script to rename vrayproxies to their file reference.

For example:

VRayProxy01

should be renamed to

VRayProxy01_iTrees-02-Hawthorn_04

Is this possible???

Syndicate content