13 #ifndef __GA_AttributeSet__
14 #define __GA_AttributeSet__
60 template <
typename T>
class UT_Array;
139 attribute_options, attribtype);
193 int search_order_size)
const
198 for (
int i = 0; i < search_order_size; i++)
211 int search_order_size)
215 (
this)->findAttribute(scope, name,
222 int search_order_size)
const
231 int search_order_size)
241 {
return findAttribute(scope, name, &owner, 1); }
253 {
return findAttribute(scope, name, &owner, 1); }
263 int search_order_size,
267 int search_order_size,
272 {
return matchAttributes(filter, &owner,1, list); }
276 {
return matchAttributes(filter, &owner,1, list); }
326 tuple_size, defaults, creation_args,
327 attribute_options,
r);
368 creation_args, attribute_options, attribtype,
391 creation_args, attribute_options, attribtype,
477 SYS_DEPRECATED_REPLACE(19.5,
"Use more nuanced hardening as, for example, groups are not thread-safe even if hardened.")
482 GA_Offset start_offset = GA_Offset(0),
483 GA_Offset end_offset = GA_INVALID_OFFSET);
537 int64 getMemoryUsage(
bool inclusive) const;
557 static
bool saveDictH9(std::ostream &os, const
char *
label,
568 void clearAllAttributes(
bool for_deletion);
583 return myAttributes[owner];
598 bool full_copy =
false);
606 void mergeDestroyGlobalDestination(
GA_MergeMap &map)
614 return myAttributes[owner].begin();
619 return myAttributes[owner].begin(scope);
622 {
return myAttributes[owner].end(); }
625 {
return myAttributes[owner].end(scope); }
639 void enableDataIdGeneration();
642 bool isGeneratingDataIds()
const
643 {
return myGenerateDataIds; }
650 myAttributes[owner].setNumBuckets(scope, nbuckets);
708 return myAttributes[owner].findProxy(scope, name);
722 {
return destroy(owner,
find(owner, scope, name)); }
730 template<
typename OP,
typename FILL_OPT_OP>
733 FILL_OPT_OP &fill_opt_op,
745 bool myGenerateDataIds : 1;
746 bool myPreferredPrec64 : 1;
A class to manage an ordered array which has fixed offset handles.
Definition of a geometry attribute.
SYS_FORCE_INLINE GA_Attribute * findPointAttribute(const UT_StringRef &name)
Specify when and how to reuse an existing attribute.
SYS_FORCE_INLINE GA_Attribute * findAttribute(GA_AttributeOwner owner, const UT_StringRef &name)
GLuint GLsizei const GLchar * label
Used to pass options and map offset values during saving.
SYS_FORCE_INLINE GA_Attribute * createDictAttribute(GA_AttributeOwner owner, const UT_StringHolder &name, int tuple_size=1, const UT_Options *creation_args=NULL, const GA_AttributeOptions *attribute_options=NULL, const UT_StringRef &attribtype="dict", const GA_ReuseStrategy &r=GA_ReuseStrategy())
SYS_FORCE_INLINE GA_Attribute * getAttribute()
SYS_FORCE_INLINE bool destroyAttribute(GA_AttributeOwner owner, const UT_StringRef &name)
GA_AttributeDict::iterator begin(GA_AttributeOwner owner, GA_AttributeScope scope) const
Class which stores the default values for a GA_Attribute.
getFileOption("OpenEXR:storage") storage
void matchAttributes(const GA_AttributeFilter &filter, GA_AttributeOwner owner, UT_Array< const GA_Attribute * > &list) const
SYS_FORCE_INLINE const GA_Attribute * findAttribute(GA_AttributeOwner owner, GA_AttributeScope scope, const UT_StringRef &name) const
GA_AttributeDict::iterator end(GA_AttributeOwner owner, GA_AttributeScope scope) const
The merge map keeps track of information when merging details.
GA_AttributeDict::iterator begin(GA_AttributeOwner owner) const
JSON reader class which handles parsing of JSON or bJSON files.
SYS_FORCE_INLINE GA_Attribute * createAttribute(GA_AttributeOwner owner, const UT_StringHolder &name, const UT_Options *creation_args, const GA_AttributeOptions *attribute_options, const UT_StringRef &attribtype, const GA_ReuseStrategy &r=GA_ReuseStrategy())
Convenience method to add a public attribute.
Class used to map H9 geometry files to a form used by GA.
Class which writes ASCII or binary JSON streams.
Standard user attribute level.
SYS_FORCE_INLINE GA_Attribute * findPrimitiveAttribute(const UT_StringRef &name)
GA_ElementGroup * findVertexGroup(const UT_StringRef &name)
#define GA_INVALID_OFFSET
A string map of attributes to ease backward compatibility In the GB/GEO/GU library code would often p...
#define SYS_DEPRECATED_REPLACE(__V__, __R__)
SYS_FORCE_INLINE GA_Attribute * findPrimitiveAttribute(GA_AttributeScope scope, const UT_StringRef &name)
SYS_FORCE_INLINE GA_Attribute * findAttribute(GA_AttributeOwner owner, GA_AttributeScope scope, const UT_StringRef &name)
GA_AttributeDict::iterator end(GA_AttributeOwner owner) const
This class holds a reference to an attribute. Such an indirection level allows an easy way to invalid...
std::string OIIO_UTIL_API replace(string_view str, string_view pattern, string_view replacement, bool global=false)
SYS_FORCE_INLINE GA_Attribute * findVertexAttribute(const UT_StringRef &name)
SYS_FORCE_INLINE const GA_Attribute * findAttribute(GA_AttributeOwner owner, const UT_StringRef &name) const
GA_ElementGroup * findPointGroup(const UT_StringRef &name)
Defragmentation of IndexMaps.
GLuint const GLchar * name
SYS_FORCE_INLINE const GA_AttributeDict & getDict(GA_AttributeOwner owner) const
Raw access to the GA_AttributeDict for a particular owner.
MX_CORE_API bool isValidName(const string &name)
Return true if the given string is a valid MaterialX name.
UT_UniquePtr< GA_Attribute > GA_AttributeUPtr
GA_ElementGroup * findPrimitiveGroup(const UT_StringRef &name)
Attribute Interface for file I/O.
A map of string to various well defined value types.
Class to return information about a GA_Detail.
SYS_FORCE_INLINE GA_Attribute * findVertexAttribute(GA_AttributeScope scope, const UT_StringRef &name)
Class to allow custom AIF interfaces to be built.
LeafData & operator=(const LeafData &)=delete
SYS_FORCE_INLINE GA_Attribute * findPointAttribute(GA_AttributeScope scope, const UT_StringRef &name)
SYS_FORCE_INLINE bool UTisstring(const char *s)
Class used to map the GA attribute into a form for H9 geometry files.
OIIO_API bool attribute(string_view name, TypeDesc type, const void *val)
SYS_FORCE_INLINE GA_Attribute * findGlobalAttribute(GA_AttributeScope scope, const UT_StringRef &name)
Container class for all geometry.
GLubyte GLubyte GLubyte GLubyte w
SYS_FORCE_INLINE GA_Attribute * createStringAttribute(GA_AttributeOwner owner, const UT_StringHolder &name, int tuple_size=1, const UT_Options *creation_args=NULL, const GA_AttributeOptions *attribute_options=NULL, const UT_StringRef &attribtype="string", const GA_ReuseStrategy &r=GA_ReuseStrategy())
ImageBuf OIIO_API add(Image_or_Const A, Image_or_Const B, ROI roi={}, int nthreads=0)
SYS_FORCE_INLINE GA_Attribute * createTupleAttribute(GA_AttributeOwner owner, const UT_StringHolder &name, GA_Storage storage, int tuple_size, const GA_Defaults &defaults, const UT_Options *creation_args=NULL, const GA_AttributeOptions *attribute_options=NULL, const GA_ReuseStrategy &r=GA_ReuseStrategy())
SYS_FORCE_INLINE const GA_Attribute * findAttribute(GA_AttributeScope scope, const UT_StringRef &name, const GA_AttributeOwner search_order[], int search_order_size) const
void matchAttributes(const GA_AttributeFilter &filter, GA_AttributeOwner owner, UT_Array< GA_Attribute * > &list)
void renameAttribute(PointDataTreeT &tree, const Name &oldName, const Name &newName)
Rename an attribute in a VDB tree.
UT_UniquePtr< GA_ATINumeric > GA_ATINumericUPtr
SYS_FORCE_INLINE GA_Attribute * findAttribute(const UT_StringRef &name, const GA_AttributeOwner search_order[], int search_order_size)
SYS_FORCE_INLINE GA_Attribute * findGlobalAttribute(const UT_StringRef &name)
SYS_FORCE_INLINE const GA_Attribute * findAttribute(const UT_StringRef &name, const GA_AttributeOwner search_order[], int search_order_size) const
namevalidandfreecertificate()
SYS_FORCE_INLINE GA_Attribute * findAttribute(GA_AttributeScope scope, const UT_StringRef &name, const GA_AttributeOwner search_order[], int search_order_size)
FMT_CONSTEXPR auto find(Ptr first, Ptr last, T value, Ptr &out) -> bool
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter