About this site
ScriptSpot is a diverse online community of artists and developers who come together to find and share scripts that empower their creativity with 3ds Max. Our users come from all parts of the world and work in everything from visual effects to gaming, architecture, students or hobbyists.
Comments
In the previous post Panayot
In the previous post Panayot gave you a very detailed explanation about everyting you need to know about "rule of thumb".You need to store all interface functions or structs inside button event or use variables if you want to define your custom function
bga
No probs, I'll keep trying to
No probs, I'll keep trying to work this one out. I was more after general protocols and I guess you are right in that Panayot described some of these quite well. The thing is when you are fairly experienced with all the associated terms everything makes sense straight away.
I will take your advice and look over all these things again. I would post my end goal, but I kind of want to get there with a little help but not have someone do it all for me, hence the guidance and not "can someone write this for me".
Thank you both for your help. I think you have given me a few things to consider and look at.
+1
I alsway glad to meet peoples who not ask someone to do their entire job. It's correct to make example code where to isolate the problem. Keep going like this ;)
my recent MAXScripts RSS (archive here)
Hi Claire
There a lot of problems in this code :) but then ask question please tell us what's the main aim, else you may get a bit chaotic help :)
What I'll say is almost the same.
*
maxFileName
is a read-only variable that will be empty string if the current scene is Untitled.* If you need (by some reason) to show only first 9 characters, need to be sure if the string length is larger than this value.
* Next but more grave problem is that you try to use
Rollout
as replacement ofFunction
:) For example, if you just copy/paste my code into the body of your rollout... hehe, read the error message ;)In the body of the Rollout you can declare local/global variables, functions, etc., but calling functions (and MessageBox is also function) can do that only from some of the Events of the Rollout itself (like #open), or from the Events of UI-controlls inside (like button #pressed, etc.).
Cheers!
my recent MAXScripts RSS (archive here)
Firstly thanks for the
Firstly thanks for the examples barigazy. Most helpful.
Anubis,
Sorry for the confusion. I left a few other code lines in because I was having problems accessing certain code lines. From a bit more researching I think this has more to do with "scoping" I think? I have looked through the scoping info but it still doesn't seem very clear. Is there any "rule of thumb" to use with scoping if this is the problem.
Another example of what i am testing. This too doesn't work.
try(destroyDialog ::testRoll)catch()
rollout testRoll "test"
(
renderSceneDialog.close()
curmaxFileName = maxFileName + "//" + "sub folder" + "//" + "test.tga"
rendSaveFile = on
rendOutputFilename = curmaxFileName
button render_btn "render"
on render_btn pressed do
(
max quick render
)
)
createDialog testRoll
Many thanks for any help.
You need to have saved
You need to have saved current file, and if you want to show messageBox just use
or in your case solution with button
or solution when rollaut open
bga