Tagged 'General Scripting'

Assigning vertex colors to selected poly vertices

Hi,
I'm trying to create a script to define vertex color from select vertices from a vol. select modifier. I don't have any knowledge in scripting and was trying to record Macros to achieve this.
First created the vol. select then used the output vertices into a Data Channel that assigns the vertex colors.
The modifier stack does exactly what I want although when running the macro it errors and the output vertex colors are random. (MacroRecorder doesn't seam to record the output and input of the Operators)

Maxscript Error When Selecting Object

I’m trying to write a maxscript that will create a custom modifier. That modifier will point the normals of the applied object toward the center of a selected object. Here’s my code:

plugin modifier MyModifier
name:"My Modifier"
classID:#(0x12345678, 0x87654321)
 
(
    parameters main rollout:params
    (
        pickedObject type:#node ui:pickedObjectButton
    )
 
    rollout params "My Modifier Parameters"
    (
        button pickedObjectButton "Pick Object" width:100 align:#center
 
        on pickedObjectButton pressed do
        (

Maxscript Cgsociety forums

Hi everybody
Is Cgsociety forums Maxscript section Dead?!
I can't access any page of that forums!!

Create material in focused viewport SME

Hi everybody.There is a script: create materials in the Slate Materials Editor from the Temporary Materials Library:
local matlib = currentMaterialLibrary
for i = 1 to matlib.count do (SME.getView SME.activeView).createNode matlib[i] [(i - 1) * 50, (i - 1) * 50]

but he creates materials behind the scenes of an open SME viewport.
how to create materials where the view of an open SME is focused?

Please help with selection face intersections

Hi!
1) I have 3 x 3 faces (or much more) deformed poly for example (tris and quads).
2) I have column (or a bunch of any poly in space) that intersect this plane in the
middle polygon (with no edge or vertex intersection) and sometimes with edges intersections at the same time
3) I need script that can detect (and select) intersected polygons in base poly

Please help, very usefull!

Looking for a formula to convert for Camera.Zoom attribute from degrees to pixels...

In After Effects, the camera layer has a .zoom attribute
Attribute Units: Pixels, Millimeters, Inches

app.project.item(1).layer("Camera 1").Zoom.value --> 1777,7778 Pixels

In 3DS MAX app, camera has .fov attribute
Attribute units: degree

$Camera001.fov --> 39.598 degree

If you dive deep into the theory about the conversion of these quantities, for a real camera, then there
you can drown...

Let's say that in the After Effects scene there is a camera that has the following parameters.

(see attached file)

How to save the FOV values exported camera to a TXT file

Good afternoon.

Now I studied the RPF format for exporting data from 3DS Max to After Effect.
I learned that from the sequence of RPF files, you can create a camera in After Effect,
via the "RPF camera import" command. But for such a camera, only its orientation is calculated.
And the change in FOV during the animation is not calculated. Of course there are third-party scripts,

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.

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

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))
Syndicate content