Tagged 'General Scripting'

STICKY - Forum Guidelines

The ScriptSpot community is a place for professional artists, developers, students or others to come discuss relevent topics. Topics which are deemed inappropriate or inflammatory may be removed at moderator disgression. This is an open community, but it is not a place to air our differences - keep on topic and everyone will benefit from the collective knowledge here.

Content that does not adhere to the following guidelines may be removed or edited without warning at moderator disgression:

autoexposure toggle button

hi, this is a very basic question, but I'm trying to make a button that alters the autoexposure state of vray.
I have the code to turn it on and pressing it again turns it off, but I would like the same button to work as a toggle.
So with the button on the autoexposure mode would be true and with the button off the autoexposure mode would be false.
Would it be possible to improve the code so that the button is somehow checked when the exposure state is true and the button is unchecked when the auto exposure is false?


Optimizing code

I am trying to optimize my code. Need to select a object class in a specific layer.
I am working with code that consists of two stages:
1: Selecting all objects in the layer.
2: Selecting splines from selected objects.

local allNodes = #(), theNodes = #()
for n in selection do (n.layer.nodes &theNodes ; join allNodes theNodes)
select allNodes
select(for obj in selection where classof obj.baseObject==line collect obj)

I am looking for a way to exclude the first part while keeping the result.
Any ideas on how to do this? Any help appreciated.

base pivot and use pivot point center

hello, i need someone to help me,
I need to bind a script that binds the CenterPivot to the base of the object and at the same time change the mode to "Use Pivot Point Center".

Attribute Holder Button

I want to access the reset option inside a custom attribute.

I look at the code like this

def=custAttributes.getDef $.modifiers[1] 2

custAttributes.getDefSource def

$Character_root_Ctrl.modifiers[1].pmAtt.pmAtts.loadSaveRoll._rst.pressed() --------->Wrong Path!!!

I need to find the exact path to activate the reset option contained in the Reset button. Can anyone help me? Thank you very much.

Animated Gif

3dsmax scene:

Automate - save specified segments of a long bip


- I have long .bip file with multiple takes in it. (with garbage between them.)

- How to automate saving specified segments from such a long .bip animation file?

Thank you for your help!

Papagayo script not timing correctly


This script reads from a text file which corresponds frame number to a morph target.

But for some reason there is discrepancy between what the text file contains and where the script puts in the frame/morph.

Could someone please have a quick look? Happy to buy a beer/coffee for them.



geting bones from skin modifier

So I want to get all bones from a skin modifier, something like this:

getBones skin

unfortunatelly there is no such function in max, at least haven´t found it. The solution with geting the names of every bone and than searching for the nod with the same name is useless, as names are not uniq and there are defenetly more than 1 node with the same name. So any solution for the problem?

why does the timer not work ???

Hello !!!
There is a camera in the scene -- PhysCamera001.
I'm trying to change her parameter

try (DestroyDialog Dist) catch()
rollout Dist "Dist" width:90 height:50
local CamPar = $PhysCamera001.clip_near
checkbutton cbn_Plus "+" checked:false tooltip:"Far from Camera"
timer MC "P" interval:10 active:false

on Dist open do
$PhysCamera001.clip_on = true
on cbn_Plus changed theState do
if ( cbn_Plus.checked == true ) then
MC.active = true
MC.active = false
on MC tick do
CamPar += 1

how to scale the selected vertices of the spline using the script?

Hello everyone.

how to scale the selected vertices of the spline using the script?


ddd = getKnotSelection $ 1
for i in ddd do
Scale setKnotSelection $ 1 i [0.99,0.99,0.99]
updateShape $

not performed....

Syndicate content