HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GA_Options.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: GA_Options.h ( GA Library, C++)
7  *
8  * COMMENTS: Common option names for attributes. These are the keys used to
9  * lookup values in the UT_Options for each attribute.
10  *
11  * Keys should only use [a-z], [A-Z], [0-9] and '_', though
12  * there's no particular rule per se.
13  */
14 
15 #ifndef __GA_Options__
16 #define __GA_Options__
17 
18 #include "GA_API.h"
19 //---------------------------------------------------------------------
20 //
21 // Attribute Creation Options
22 //
23 // These options are used when creating attributes.
24 //---------------------------------------------------------------------
25 
26 // Specify the "default" values for the attribute. The value of this default
27 // changes based on different attribute types.
28 #define GA_OPTION_DEFAULTS "defaults"
29 
30 // The "ordered_group" option can be passed into creation of groups to
31 // make the group keep order information.
32 // bool "ordered_group" true|false
33 //
34 #define GA_OPTION_ORDERED_GROUP "ordered_group"
35 
36 // The "interleaved_defaults" option can be passed into creation
37 // of indexpair attributes to indicate that the supplied defaults interleave
38 // indices and values. Primarily used for loading old .geo/.bgeo files.
39 // bool "interleaved_defaults" true|false
40 //
41 #define GA_OPTION_INTERLEAVED_DEFAULTS "interleaved_defaults"
42 
43 // The "tuple_size" option can be specified during creation of certain
44 // attributes to control the number of components.
45 // int "tuple_size" 3
46 //
47 #define GA_OPTION_TUPLE_SIZE "tuple_size"
48 
49 // The "storage" option can be specified during creation of certain
50 // attributes to control the type of storage used for the values.
51 // int "storage" GA_STORE_REAL32|GA_STORE_INT16|...
52 //
53 #define GA_OPTION_STORAGE "storage"
54 
55 // The "entry_count" option can be specified during creation of certain
56 // (e.g. indexpair) attributes to control the number of entries. Some
57 // attribute values can consist of "entry_count" tuples, each tuple with
58 // "tuple_size" components.
59 // int "entry_count" 3
60 //
61 #define GA_OPTION_ENTRY_COUNT "entry_count"
62 
63 // The "file_load_flag" option can be passed during attribute creation as
64 // a hint that a GA_AIFFile::load() call will follow. Attributes can use
65 // this hint as an opportunity to avoid any initializations that would be
66 // overridden during the load.
67 // bool "file_load_flag" true|false
68 //
69 #define GA_OPTION_FILE_LOAD_FLAG "file_load_flag"
70 
71 //---------------------------------------------------------------------
72 //
73 // Per-Attribute Options
74 //
75 // Although any option can be set on a GA_Attribute, these are some common
76 // names and their meanings.
77 //---------------------------------------------------------------------
78 
79 // The "export_on_save" option controls whether an attribute can be saved
80 // when saving a .geo/.bgeo file. The default value depends on the scope
81 // of the attribute: GA_SCOPE_PUBLIC=true, GA_SCOPE_PRIVATE=false
82 // bool "export_on_save" true|false
83 //
84 #define GA_OPTION_EXPORT_ON_SAVE "export_on_save"
85 
86 // The "export_on_merge" option controls whether an attribute will be merged.
87 // The default value depends on the scope of the attribute:
88 // GA_SCOPE_PUBLIC=true, GA_SCOPE_PRIVATE=false
89 // bool "export_on_merge" true|false
90 //
91 #define GA_OPTION_EXPORT_ON_MERGE "export_on_merge"
92 
93 // The "export_to_infoblock" option controls whether a detail attribute
94 // is saved to the meta-data of a .geo/.bgeo files. This allows it
95 // to be retrieved without loading the entire file. The default is
96 // false.
97 #define GA_OPTION_EXPORT_TO_INFOBLOCK "export_to_infoblock"
98 
99 // Flags the attribute as non-transforming despite being of point type
100 #define GA_OPTION_NON_TRANSFORMING "attribute:non_transforming"
101 
102 // Flags the string attribute to store a set rather than unique
103 #define GA_OPTION_STRINGSET "blob:stringset"
104 
105 // It's possible to store options on attributes to help with exporting the data
106 // to RIB. The "rsl_type" allows you to store the type information for the RIB
107 // variable. The "rsl_offset" and "rsl_length" allow you to extract a
108 // sub-component of tuples.
109 // Example: Pass an attribute as a color to RIB
110 // string "rsl_type" "uniform color"
111 // int "rsl_offset" 0
112 // int "rsl_length" 3 # Assume RiColor is 3-tuple
113 //
114 // Example: Extract the 'v' component from a 3-tuple as a scalar value
115 // string "rsl_type" "vertex float"
116 // int "rsl_offset" 1 # Extract 2nd component
117 // int "rsl_length" 1 # Force length to 1
118 //
119 #define GA_OPTION_RSL_TYPE "rsl_type"
120 #define GA_OPTION_RSL_OFFSET "rsl_offset"
121 #define GA_OPTION_RSL_LENGTH "rsl_length"
122 
123 #endif