Tagged 'General Scripting'

Saving only diffuse channel from a exr sequence

Hi everybody. Is there a way to Save only diffuse channel from an Exr sequence. The thing is, I rendered using vray with dnoiser channels and now the files are too heavy to store or easy compositing.Do I need to use videopost? Can anybody help to make a scirpt?

ps. using openbitmap() which works. But I realized I need the Z-depth channel too. This command seems not to load z-buffer channels.

Expand the Active Layer in the Layer Manager

I'm trying to expand the Active Layer in my Layer Manager.
But I cannot for the life of me figure out the correct approach to doing this.

There is an ExpandSelected function in the Scene Explorer Manager, but there doesn't seem to be a way to actually select a layer. There is a .select function in the LayerManager, but this selects all the nodes in the layer.

Does anyone know how to do this?

Since when getFacesMatId is available ?

Since when polyop.getFacesMatId is available ?
I just found it on Max 2023 I'm sure there was no such option in 2020.
What about 21, 22 ?
There is nothing in documentation about it, or I can't find it. It just there now :)
I glad it appaired, though, really useful. Makes things a bit easier :)

I will clarify that I'm not talking about getFaceMatID, but getFacesMatId.

A = getFaceSelection $ 
 
print (makeUniqueArray (polyop.getFacesMatId $ A as Array))

X,Y,Z Coordinate Generator with numbered labelling based on ranges

Hi everyone, I am trying to work out the best way to have a script created. at the moment we import CAD layouts of housing developments in to Max, and we place 3d models of houses over that layout.

Hotkey Shortcut Table to Tetxfile

How can i get All the Shortcuts/ Hotkey Table into a textfile /excl / PDf ?

Sometime i forget how i configured some Shortcuts, so i`d like to look them up im a printed list....

Thansk a lot in Advance

Cybertect

3ds Sequoia integration Script not working - please help

Hello everyone, apologies upfront as I lack the programming knowledge to understand the problem I am having. I have been trying to utilize Thinkbox Sequoia Meshing, the program comes with 3ds integration maxscript for loading Seq. .xmesh into 3ds.

They have provided a .ms file which I have loaded and run. This creates a toolbar button that loads the sequential xmesh files. Whenever I run the script and point the macro to the correct file, once I click load I get this error.

-- MAXScript Rollout Handler Exception:
-- Type error: Call needs function or class, got: undefined

Display Names Script

I took this code from Autodesk Help, the code is displaying names of objects in viewport, and I have two questions about how to improve it.
The first question is: I have a group of objects, script shows me the names of every object in this group, but I want it to show me just the name of the group, how to do this?
And the second question is: When script displays the name of camera, it also displays the name of camera target, but I don't want it. How to exclude taget name? I tried something like "if o != Targetobject", but it not helped.

And here is the code:

Import/Merge/Open 3d file from a web address into 3ds max scene

Does anyone know whether it is possible to import/merge/open a 3d model file from a web address via maxscript? The script here would work if the address is local but not for a web address. This is what I have:

rollout Lib "Library" width:412 height:362
(

button 'generate' "model Library" pos:[117,243] width:171 height:38 align:#left

on generate pressed do

(
fobj_names = getmaxfileobjectnames "mergetest.max"
mergemaxfile "https://webaddress.com/mergetest.max" fobj_names #select
)
)
CreateDialog Lib

editable poly>detach faces>uvw map: 1 click script

greetings, im using max 2021 and some of my scripts arent working from 2014. i had one that would take a selected mesh, convert it to editable poly, then detach faces and apply a uvwmap all with one click. this was used to easily make imported geometry easily texturable for rendering.
my scripts got wiped with the old version of max, and this little bit is all thats left-and its giving me an error in max 2021. can yall help me sort this out? Thanks!

selected objects only:

for o in selection where classof o == Editable_mesh do (
addmodifier o (Poly_Select())

Accessing noise parameters from position list

I'm trying to get this script to attach a position list.

Then make it active.

Then add a noise controller. This works...

But I would then like to be able to animate the strength of the noise controller. This is where I have a problem. I cant seem to get that to work:

$.pos.controller = PositionList () -- adds position list

$.pos.controller.setActive 1 -- makes controller active

$.pos.Available.controller = Noise_position () -- adds noise controller 

Syndicate content