Tagged 'General Scripting'

UVW MAP

$.modifiers[#UVW_Map].maptype = 4

cant seem to get this command to work on my selected group.

thanks in advance

Repeat Script delete

This is my script..
It merges all the Objects Named "Box03" in All the Max files within that folder.

Then plays an actions for each object it merged sometimes it can merge up to 50 objects how can i make it repeat the Action field for each object that it merged named "Box03" before it Prints "done"

thanks in Advance

mergeObj = #("Box03")
files = GetFiles "C:/Users/Workstation\Desktop\AdScript/*.max"
for f in files do
MergeMaxFile f mergeObj

--Action field--
-----------------------------------------------------------
select $Box03
$.wirecolor = color 138 8 110

Error when used with more then one object

Hi,
I tried to make a script to "Freeze" some objects:
I have spline object with subdivide, tyconform,.. in the stack, so to remove the need max calculate these objects, I do :
- create a snapshot of the object
- deactivate all modifiers
- add editpoly modifier
- remove all geometry in the modifier
- attach snapshot to the geometry.
It works fine for one object.( and I did a script to revert to "normal" geometry )
But when I use this script on multiple selection I got error.
"-- Runtime error: Requested sub-object level out of range: 1"
Anybody could help ? Thanks

(

How to select Edges relative to the selected Face

Hi!
I'm quite new to MaxSxript and i'd like to bevel two selected side-by-side faces and chamfer the edges of the new beveled faces.

The selected Faces for this action will be always side-by-side.

I've enabled the MacroRecorder while executing the bevel/chamfer on the edidable poly shown on the left side of the Screenshot , and the commands look like this:

 
$.modifiers[#Edit_Poly].SetOperation #Bevel
$.modifiers[#Edit_Poly].bevelType = 1
$.modifiers[#Edit_Poly].bevelHeight = 3.6
$.modifiers[#Edit_Poly].bevelOutline = -4
$.modifiers[#Edit_Poly].Commit ()

Problem with Callbacks's first start

Hello guys, first post here.

I'm a noob in scripting.

In a script I'm trying to write, I wanted to show in a listbox the objects's name of the current selection, but the first time I launch it it doesn't work (got this error: "Unknown property: "selectedobjs" in undefined"), then the next times it works.
What did I do wrong?

Thank you in advance guys

function SetupDropDownList = (
 
	sel_names_array= for obj in selection collect obj.name
 
	tmpArr = for grp in selection where isGroupHead grp collect grp
	numgroups = tmpArr.count as string

"Make Paths Absolute"

In the Asset Tracking Dialog box there is a "Make Paths Absolute" option for selected assets in a 3DS Max scene.

Is there anyway to make this the default for all assets so that I don't need to go into this dialog box for every project?

If so, could someone please help me to code this?

Many thanks.

Baking to texture Max 2021

So i'm working with this script to bake all the textures to export it as fbx eventually. It's a script that is used here: 

https://www.youtube.com/watch?v=xBYkVS3ctbo

Unfortunatly it does not work yet on my mesh models. I'm getting an active render error and i'm not sure what it means. It won't render the completemap. We use vray. Hoping for some help. And perhaps other people can use it then too. 

 

SCRIPT:

(

-- capture selected objects

selectedObjectsAll = deepcopy (selection as array)

Script for VRay light icon text turn on/off toggle

Hello,

I am looking a script of VRay light icon text turn on/off toggle.

anyone have script?

Actually i am done something like

(
 
On Execute Do
 
(
 
$.icon_text = $.on = not $.on
 
)
 
)

It works but it turn on & off light as well as icon text
i want only icon text turn on & off

anyone can update the code.

Thanks

Count Array Name Problem

Hi Everyone
trying to add a name to this code
------------
allObjects = helpers as array
for i = 1 to allObjects.count do
------------

similar to this but with array like the top script
------------
for OBJ in helpers where ( OBJ.name == "360" ) do
------------

thanks in advance.

Select all path-missing VrayProxy objects?

Is there a way to just select all Vrayproxies (which are missing path) in the opened scene?

Sometimes, empty VRayproxy causes crashing error in 3ds Max when rendering with MultiScatters, and they're nowhere to be found on projects folders. So it's easier to just select all of them, manually check those missing/empty VrayProxies and delete from the scene.

There's old script called Vrayproxies Manager in here but it's too old, >10 years ago and no longer works, the interface looks neat though (scriptspot.com/3ds-max/scripts/vrayproxies-manager)

Syndicate content