Getting shader parameter type
| Date : Tue, 23 Jan 2007 22:56:15 +0100 |
| To : <XSI(at)Softimage.COM> |
| From : "Daniel Rind" <daniel.rind(at)chello.at> |
| Subject : Getting shader parameter type |
|
Hi!
I'm currently writing code to walk XSI shader
graphs, and I'm having a little problem with shader parameter
types:
What is the correct way to retrieve the parameter
type of a shader's input parameters?
I'm currently trying it with something
like:
Shader current_shader(...);
CParameterRefArray shader_params =
current_shader.GetParameters();
for (int i = 0; i <
shader_params.GetCount(); i++)
{
Parameter
current_parameter(shader_params[i]);
switch
(current_parameter.GetValueType())
{
case siFloat:
...
case siString:
...
}
}
which works only sort of...
Color and Vector shader parameters are always
siEmpty (so I go probing if the parameter contains further parameters, and then
check those), but if I connect another shader to a parameter, the GetValueType
always returns siRef (who had the idea to assign 666 to that :P), and I can't
find out if it's a float or a color or whatever.
I'm sure there is some simple
GetParameterType() function that I'm missing, that returns if it's a color,
a vector, an int, etc... no matter if anything is connected to it or not... or
at least I hope there is?
Ciao, Daniel!
|
| DATE: | << | >> | THREAD: | << | >> | INDEX: | Main | Thread |
|---|
- Previous by Date: RE: Getting shader parameter type
- Next by Date: RE: Getting shader parameter type
- Previous by Thread: RE: Getting shader parameter type
- Next by Thread: RE: Getting shader parameter type
- Index(es):
| Search the XSI List archives here or use the advanced search form to search across mailing lists. Searching help is available. |