Typedefs | Functions
AtEnum API

Arnold AtEnum type. More...

Typedefs

typedef const char ** AtEnum
 String-based enumerated data type. More...
 

Functions

AI_API AI_PURE int AiEnumGetValue (AtEnum enum_type, const char *string)
 Return the corresponding integer value (or index) of an enum string. More...
 
AI_API AI_PURE const char * AiEnumGetString (AtEnum enum_type, int index)
 Get the corresponding string value of an integer in an enum. More...
 

Detailed Description

Arnold AtEnum type.

Typedef Documentation

◆ AtEnum

typedef const char** AtEnum

String-based enumerated data type.

AtNode parameters of type AI_TYPE_ENUM are stored as AtEnum. The AtEnum data type is just an array of strings that ends with a NULL string (not an empty string, but a NULL pointer).

Note that, in order to keep backwards compatibility, any value strings beginning with a digit will be interpreted as a number.

Function Documentation

◆ AiEnumGetValue()

AI_API AI_PURE int AiEnumGetValue ( AtEnum  enum_type,
const char *  string 
)

Return the corresponding integer value (or index) of an enum string.

Parameters
enum_typethe enumerated type
stringthe text-string of the enumerated type whose corresponding value is being queried
Returns
index corresponding to string, or -1 if enum_type is NULL or the string is not one of the allowed strings in the enum

◆ AiEnumGetString()

AI_API AI_PURE const char * AiEnumGetString ( AtEnum  enum_type,
int  index 
)

Get the corresponding string value of an integer in an enum.

Parameters
enum_typethe enumerated type
indexthe integer value of the enumerated type whose corresponding text-string is being queried
Returns
text-string corresponding to index, or NULL if enum_type is NULL or the index is not one of the allowed integers in the enum

© 2023 Autodesk, Inc. · All rights reserved · www.arnoldrenderer.com