PDA

View Full Version : fileopenButton = maxscript? Max GUI question.


Pixero
12-12-2006, 08:24 AM
I found that I can "enhance" a Mentalray shader Max GUI declaration by using "fileopenButton" to browse for files
but I cant find any info on "fileopenButton" in the Max script help or the Max MR help.

Here is a working example (part) of a Max GUI for a MR shader:



control "colortree" "string" (
"uiName" "Shader path",
"fileopenButton" "DarkTree(*.dsts)|*.dsts|All(*.*)|*.*|"
)

And here is one from the Contour PS:

control "file_name" "string" (
"uiName" "Filename",
"filesaveButton" "Postscript(*.ps)|*.ps|All(*.*)|*.*|"
)

If "fileopenButton" isnt maxscript what is it? Windows ui declaration?
Are there any examples of how to create a dropdownlist in the same way?

Here is my unsuccessful try that gives an error:

control "space" "integer" (
"uiName" "Space:int,obj,world,cam,screen",
"dropdownlist" "items:#("int", "obj", "world", "cam", "screen")",
"value" 1,
"range" 0 4
)

Using MR shaders in Max would be so much easier if this could be solved so any help would be much appreciated.

erilaz
12-12-2006, 08:47 AM
Try this:
http://sparks.discreet.com/knowledgebase/techdocs/searchable/techdoc_mentalrayshaders/Wrting_MR_Shaders.htm

It doesn't help you entirely with your question, but it may be useful.

This may answer your question better:
http://forum.lamrug.org/viewtopic.php?t=386&sid=a953203583d14d830123b1fb99115060

ypuech
12-12-2006, 09:04 AM
Hi Pixeiro,

Nobody can help you on lamrug forum ? dlanier develops mental ray shaders for Max, maybe he could know how to do that.

I think that "fileopenButton" comes from Max UI parser generator for mi files.

I cant find any info on "fileopenButton" in the Max script help or the Max MR help.
Yes, Max lacks an up to date documentation for mental ray integration.

Pixero
12-12-2006, 09:18 AM
Thanks erilaz I've seen those.

ypuech:

I think that "fileopenButton" comes from Max UI parser generator for mi files.


Do you know where to find more info about it? I cant find anything about what is and what isnt avalible?

If a Max shader is needed I cant understand why no one who knows how to do it, provides us with a "skeleton" for such a shader to learn from.
Is there really no way to solve this through scripting? :sad:

ypuech
12-12-2006, 09:45 AM
Hi Pixeiro,

As mentioned by erilaz there's some answers at http://forum.lamrug.org/viewtopic.php?t=386&sid=a953203583d14d830123b1fb99115060.

If a Max shader is needed I cant understand why no one who knows how to do it, provides us with a "skeleton" for such a shader to learn from.

In the lamrug post dlanier said :

Yes you can create a pure 3DSMax shader with the standard 3DSMax GUI (so with buttons and list or whatever http://forum.lamrug.org/images/smiles/icon_smile.gif). And you can make your shader usable to Mental Ray for 3DSMax.

The trick is to use the "imrShaderTranslation" class with Paramblocks in your material.

In 3DSMax 7 and probably in 3DSMax 8 ( but not Max 6 http://forum.lamrug.org/images/smiles/icon_sad.gif ) you have a PDF document talking about translating shaders from Max to Mental Ray :
It is called : "SDK - mental ray for 3ds max.pdf" located in the 3dsmax7\maxsdk\help folder.

Is there really no way to solve this through scripting?
MAXScript Extensions for mental ray are very (very...) limited. So, I think that scripting is too limited in this area.

CGTalk Moderation
12-12-2006, 09:45 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.