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:

Calling a variable with another variable

Im wondering if there is an easier way to go through my UI variables instead of doing it one at a time. For example, I have 40 text boxes and I named the boxes by increasing number, text1, text2 ... text39, text40. Instead of writing out 40 lines of code to get the information in every text box, I was hoping to do something like

for f=1 to 40 do (
append textArray textf.text
)

Ive tried ("text" + f as string) as object
That didnt work. Is this even possible in maxscript or am I stuck working with a very long script?

alpha lost while saving a render to texture in a bitmap

Hey guys,

small question :

I made a script makes the following steps (sorry I don't have the code on this PC : I'll post it after):

* bakes a a batch of texture (in a folder) made for UV1, on the UV2 :
°select the folder
°assign the texture to a temp mat
°render to texture
°save in a bitmap (my problem is here I think)

* Put all these textures in an atlassed texture
° use a composite map to merge all the generated bitmaps
° render and save

Exporting to a mirror location

Hi I'm new to scripting so I'm asking for some of your time and help.

I have two directories, a C:\Source\Folder01\Test.max and I'd like to export the max file to another location under the same folder name, eg. C:\Game\Folder01\Test.fbx

I'm not sure how to define the export folder?

curObjectName = $.name
exportfolder = ???
exportpath = exportfolder + curObjectName

if doesFileExist exportfolder == false do (makedir exportfolder)

Thanks in advance for your help.

*Edit:

converting animated editable splines

Hi,
I do some tests for an abstract, experimental short. https://vimeo.com/44604173
What do you see: There are some tumbling particles, which trails are converted to splines and checked on 'renderable' parameter- a method using the pfspline-script described by Anselm von Seherr-Thoss somewhere.
I used a Falloff as a heightmap to scale the things down at their end.(and there is an additional animated displacement map ins some of them)

Change modifier

Hi all...

Anyone Know how do I change one modifier in other modifier in all objects ?

P.s - I change all modifiers in scene of "MeshSmooth" to "TurboSmooth"

Thanks

minimized windows in front of listener

my problem, minimize windows are always in front of the listener! Any solution, thoughts?

IK chain script WIP - need some help

I'm trying to code up a script to streamline working with IK chains. I have a number of goals for down the road, but in the immediate future, I am trying to get the following two issues sorted:

1) Switching back and forth between IK and FK across a timeline will often result in popping. This can be fixed by selecting the chain solver, choosing the motion panel, and
clicking IK/FK snap. I think this should happen automatically, as I can't imagine many situations where someone would WANT a sudden, jarring pop from one position to another.

display html doc

Hello, i'm trying to display some text as html.
I was wondering if somebody knows this.
I started looking in
dotnetobject "System.Windows.Forms.HtmlWindow"
dotnetobject "System.Windows.Forms.WebBrowser"
and so.. but dont know if this will work.
Any thoughts?
code so far..

--MaxMail
rollout roll_maxmail "Jos MaxMail"
(
	edittext edtTo "To"
	edittext edtSubject "Subject"
	dotNetControl TextMailControl "System.Windows.Forms.TextBox" height:100
	on roll_maxmail open do
	(
	TextMailControl.AcceptsReturn = true;
	TextMailControl.AcceptsTab = true;

3ds Max 2012 createFile error

If I create a maxscript file with maxscript like this

  • f = createFile "C:\a.ms"
  • close f

and if I drag and drop the file "a.ms" into max, max will crash.This doesn't happen in max 2011

Also I can't delete the file until I close max 2012 because it says that it is open in 3ds max.

can somebody explain why this is happening in 2012 and how to fix it

thanks.

Syndicate content