Tagged 'General Scripting'

Acessing max file metadata and asset properties

Hi folks,

I wonder if someone can point me in the right direction. Im building an external asset tracker, have managed to relinking the files without issue. I cant seem gain access a max files asset state ie. missing or not.

to relink im using getMAXFileAssetMetadata and setMAXFileAssetMetadata. How do I display #(missing) for each asset from the metadata? do i need to access the asset manager or ATSOps? how is that done on an external file and not opening it?

thanks so much..

Searching directories

Hi Im trying to search directories on our network. Ive successfully used the following dotnet code hoping it would be a bit faster than max script methods.

searchSubDirs=(dotnetClass "System.IO.SearchOption")
sFiles=dotnetClass "System.IO.Directory"
theFile=(sFiles.GetFiles @"\\CGISERVER\BDWCGIWorkC" "B67_P154_HR.jpg" searchSubDirs.AllDirectories)[1]

this tends to be very slow finding the files, it takes 8 minutes. Is there a way of speeding this up?

Open new instance of 3d max?

As the title says, is it possible to open a new instance of 3dmax via maxscript. I have found other posts from past asking the same but with no real answer. Just wondered if it was possible?

Many thanks!

when changes do

I'm interested only construction "when changes do". File contains the code base, and three of the end.The first part of the code works well. When I add loop problems begin.(2-3part)
2 part - he does not see the value(i in loop) as local but he see the value as global (3 part)
3 part - performed only cycle end code

"when changes do"- expression works in the cycle? (Give an example of code)
In the code (2-3 part), value can leave a local variable?

help modifying - copy viewport to clipboard

hello
can any one help in changing gamma of the copied viewport from to 1.0 to 2.2?

http://www.scriptspot.com/3ds-max/scripts/copy-viewport-to-clipboard

..

macroScript Copy_Viewport_To_Clipboard
buttontext:"Copy Viewport"
Category:"CG_Tools" 
tooltip:"Copy Viewport To Clipboard" 
(
if setclipboardbitmap != undefined then		--check whether command is undefined... if so then avg not installed or using pre 3ds max 7...
	(
		therender = gw.getViewportDib() 	--new to max 6...
		if therender != undefined do 

how to select all the faces of a mesh, in one go

I am still somewhat new to max scripting, so this question might be a bit noobish.

I have this ;
polyop.setFaceSelection holCyl #{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48}

Every face of the mesh needs to be mentioned, which is a ridiculous, is there a better faster more elegant way?

Newbie help, changing rectangle

Hi

I am trying to make a simple script to change a selected spline knot type. it goes as as follows:

drawing a rectangle and select a rectangle

and click a script button

convert a editable spline

and all vertex convert a "corner"

any help regarding this problem is also greatly appreciated,
Thanks!!!

messagebox question

Hi, if i got a script as below:

on btn3 pressed do
(
if $selection.count> 0 then
(
for i=1 to $selection.count do
(
$.f_number = 8
$.shutter_speed = 8
$.ISO = 100
$.vignetting = off
$.whiteBalance_preset = 1
)
)
else
(
messagebox "Please select a VrayPhysicalCamera to proceed." title:"VrayPhysicalCamera"
)
)

Cage creation script

Trying to make my cage creation faster and easier for Xnormal from 3ds max.

1.It must clone the object -working-
2.Change the name, add _Cage -working-
3.Add push modifier, controlled by spinner -working-
4.add edit normal modifier, select all normal and unify -in progress-
5.add reset xForm -to do-
6.Collapse all -to do-

Custom Attributes Owner

Hi everyone

I'm trying without success to access the object owner of a CA within its parameters or the on create event...
What I don't understand is that I can access the owner object within the rollout with this :
obj = (refs.dependents (custAttributes.getOwner this))[1]
but it doesn't work either on the parameters block or the on create event...

Does anyone knows how to ?
Thanks in advance

Syndicate content