Tagged 'General Scripting'

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

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 

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())

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?

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

reset texture list uvw

hi, im trying to reset the texture list on multiple uvw maps on multiple objects. my script it only affecting the first uvw in the modifier list, not any others in the list, please help.

(
for theNode in selection do
for index = theNode.modifiers.count to 1 by -1 do
(
if ((classOf theNode.modifiers[index]) == Uvwmap) do
(
$.modifiers[#Unwrap_UVW].texMapList.count = 0
gc()
$.modifiers[#Unwrap_UVW].texMapIDList.count = 0
gc()
)
)

)

max file watchfolder for render submition.

Hey everyone I am trying to write a script that "watchs" a specified folder for .max files with cameras inside and renders it out.

3dsmax keeps crashing or endless looping on this.
I plan to release this free, so anyone can use it. but I need help to debug it.

take a look and let me know where the error is.

try (destroyDialog renderWatchFolder_tool) catch()
rollout renderWatchFolder_tool "Watch DOG - 4 xewinga Master" width:300 height:160
(
local printFileCount
local renderType
local renderFolder
local rFolder
local tempMap
local filePath
local renFolder

How to resolve this in multiple ways

Hello,
i have a script which has few several buttons. by clicking those buttons it runs .ms files and pre installed macroscript.

        on btn19 pressed do
	(
	filein "scriptsfolder/Delete overlaped objects or proxies.ms"
	)
	on btn9 pressed do
	(
	macros.run "KM-3D.COM Tools" "ConvertToSBObject"
	) 

If there is no .ms or macroscript it shows the following error.

So, i need the solution in the following way,

1.How to suppress the error message (shows nothing).

script problem

Hi,
I would like to make directions of spline more visible.
Yellow dot is sometimes not enough.
So I made a little script which use a real script of Paul Neale.
http://paulneale.com/clone-on-spline/
I did a maxscript.
When I open max and use the script I get an error.
I drag and drop maxscript file in max, and use the script, it works.
Any idea ?

(
if ((selection != undefined )and((classOf selection[1] == SplineShape) or (classOf selection[1] == Line)) ) do
(
	max modify mode
 
 
	spleen=selection[1]
 
	XX = (spleen.max - spleen.min).x
	YY = (spleen.max - spleen.min).y

pivot point and other

Hello,

This may be the wrong place to ask this question. But I am desperate. I have these 2 problems.

I am using 3ds max 2009 and I keep getting frozen shadow on the screen. I have tried everything I have found in the net but didn't work. So if there is anyone with any suggestion please let me know.

The second issue is I use to know what is the short key for the show pivot point so I can move it without going to the pivot editer. So can someone remind me. Thank you all.