Tagged 'General Scripting'

Add Slice Modifier to the selected objects

what is the best way to add one Slice Modifier to the all selected objects with the Slice Plane set to Z=-100 and then Collapse them to EditableMesh

Add Slice Modifier to the selected objects

what is the best way to add one Slice Modifier to the all selected objects with the Slice Plane set to Z=-100 and then Collapse them to EditableMesh

Changing the Area to render via a script.

Hi all i have the following code

 

<code>

try(DestroyDialog SB_Tools_Region_Render)catch()

Rollout SB_Tools_Region_Render "Render Region"

(

   dropdownlist render_dd "Please select a render type" items:#("View", "Selected", "Region", "Crop", "Blowup")

on render_dd selected i do

setRenderType render_dd.items[i]

 

)

CreateDialog SB_Tools_Region_Render

<code\>

Recover instance from a reference

Hi,
I found on Autodesk forum a line of script to recover the instance from a reference object.

I mean :
- I create an Object A
- I copy it as a reference ( B) , I apply a modifier on it
- I select B and apply the script, I get an instance of A.

The line of script is : Line baseObject:$.baseObject

I don't find any explanation, why "line" ?

And it works on some files, but in a heavy file I work it don't work, ans use another object...

Anybody have any idea ? Or an another solution ?
Thanks.

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
        (

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,

Syndicate content