PDA

View Full Version : Scripted Material and TextureMap plugin Question


Zbuffer
10-21-2008, 04:05 PM
Hi all ;)

I am writing a Material and TextureMap plugin.
It extends an existing class, and replaceUI is set to true.
So I loose the coordinates rollout for the Material and the Output rollout for the TextureMap.
For the Material, I managed to recreate the coordinates rollout fine.
But for the TextureMap, I need to recreate the Output rollout.
And here comes the problem:
How to link my curveControl to the delegate ?
there is no #curveControl parameter type...
I am stuck here and would like to avoid building the TextureMap as a subMap of an Output TextureMap.

Also, in the Help: Scripted Plug-in Clauses - Parameters
there is a #colorChannel parameter

How does it work ? What type is it ?

Thx in advance.

ZeBoxx2
10-21-2008, 09:53 PM
I don't think you can. Unless the curve you use is very simple (only an end point and start point, no key changes, etc.), you're going to be stuck. You can't add/remove points on existing plugin curve controls like you can with the MaxScript curvecontrol UI element and inherent data, for example.

The only 'reasonable' solution I've found is not replacing the UI at all if you need the coordinates / output rollouts. That does mean there will be two UIs, but if the user needs coodinate / output control.

As for #colorChannel.. I think that might be the 'correct' data type to use when dealing with Color RGB controllers, although how that might impact a scripted plugin.. no idea.. they all deal with 0.0 .. 255.0 ranges anyway.

PiXeL_MoNKeY
10-21-2008, 10:12 PM
Have you looked at the TextureMap Shared Classes in the Maxscript reference?

-Eric

ZeBoxx2
10-21-2008, 11:18 PM
yes - the 'problem' is that they are 'created' by the map plugin itself, and script code can't invoke them on a scripted texture map plugin. Replacing the UI of the texture map ends up replacing all rollouts, instead of just the non-shared one.
The same occurs with e.g. scripted light plugins - the atmospheres&effects rollout disappears (the mental ray ones stay put as they're tacked on after-the-fact, I think).

Zbuffer
10-22-2008, 07:17 AM
Thx Richard and Eric.

The TextureMap Shared Classes Help topic is indeed an interesting read.
well, I guess I'll have to live without the curveControl, then.

CGTalk Moderation
10-22-2008, 07:17 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.