FnUsdAbstractionLib 0.6.0
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
usg::ShaderProperty Class Reference

#include <ShaderProperty.h>

Inheritance diagram for usg::ShaderProperty:
usg::SchemaProperty

Public Member Functions

 ShaderProperty ()
 Default ctor builds an empty (invalid) ShaderProperty.
 
 ShaderProperty (int inputOrOutput, Value::Type type, const char *name, const Value &value, size_t arraySize=0)
 Simple ctor for input properties and no extras - populates the local property data.
 
 ShaderProperty (int inputOrOutput, Value::Type type, const char *name, const Value &value, const fdk::KeyValueMap &metadata)
 Simple ctor for typical output property with a default value and metadata - populates the local property data.
 
 ShaderProperty (int inputOrOutput, Value::Type type, const char *name, const fdk::KeyValueMap &metadata=fdk::KeyValueMap())
 Simple ctor for typical output property with metadata and no default value - populates the local property data.
 
 ShaderProperty (int inputOrOutput, Value::Type type, const char *name, const Value &value, size_t arraySize, const fdk::KeyValueMap &metadata, const fdk::KeyValueMap &hints, const fdk::StringList &options)
 Ctor with all params exposed - populates the local property data.
 
 ShaderProperty (const ShaderProperty &)
 If const property reference is valid any local property data is NOT copied.
 
ShaderPropertyoperator= (const ShaderProperty &)
 
std::string getInfoString () const
 
const std::string & getLabel () const
 Metadata tag 'label' value, if it exists.
 
std::string getHelp () const
 Metadata tag 'help' value, if it exists.
 
const std::string & getPage () const
 Metadata tag 'page' value, if it exists.
 
const std::string & getWidget () const
 Metadata tag 'widget' value, if it exists.
 
fdk::KeyValueMap getHints () const
 
fdk::StringList getOptions () const
 
 ShaderProperty (ShaderPropertyHandle *handle)
 Assigns _pImpl and takes ownership of handle. For internal use only!
 
- Public Member Functions inherited from usg::SchemaProperty
 SchemaProperty ()
 Default ctor builds an empty (invalid) SchemaProperty.
 
 SchemaProperty (int category, Value::Type type, const char *name, const Value &value, size_t arraySize=0)
 
 SchemaProperty (int category, Value::Type type, const char *name, const Value &value, const fdk::KeyValueMap &metadata)
 
 SchemaProperty (int category, Value::Type type, const char *name, const fdk::KeyValueMap &metadata=fdk::KeyValueMap())
 
 SchemaProperty (int category, Value::Type type, const char *name, const Value &value, size_t arraySize, const fdk::KeyValueMap &metadata, const fdk::KeyValueMap &hints, const fdk::StringList &options)
 
 SchemaProperty (const SchemaProperty &)
 If const property reference is valid any localized property data is NOT copied.
 
SchemaPropertyoperator= (const SchemaProperty &)
 
virtual ~SchemaProperty ()
 Dtor in implementation required for std::unique_ptr to work.
 
bool isValid () const
 True if SchemaPropertyHandle has either a valid reference or contains localized property data.
 
 operator bool () const
 
const std::string & getName () const
 Property's identifer name.
 
virtual std::string getFullName () const
 Property's identifer name with any additional namespace modifiers.
 
const std::string & getType () const
 
Value::Type getValueType () const
 
Value::Type getSdfValueType () const
 
bool isReference () const
 True if SchemaPropertyHandle is bound to const property reference.
 
bool isOverriden () const
 True if SchemaPropertyHandle contains localized property data.
 
bool isOutput () const
 Is this property an output?
 
bool isArray () const
 Is property an array type?
 
bool isDynamicArray () const
 Is this property's array type dynamically-sized?
 
int getArraySize () const
 
const Value getValue () const
 
void setValueTime (const fdk::TimeValue &time)
 Assigns a time to the value stored in the property, for animating overrides.
 
fdk::TimeValue getValueTime () const
 
fdk::KeyValueMap getMetadata () const
 
bool isConnectable () const
 
bool canConnectTo (const SchemaProperty &output) const
 
void print (std::ostream &) const
 Print the name, type and default value to stream.
 
 SchemaProperty (SchemaPropertyHandle *handle)
 Assigns _pImpl and takes ownership of handle. For internal use only!
 
SchemaPropertyHandle * impl ()
 
const SchemaPropertyHandle * impl () const
 

Additional Inherited Members

- Protected Attributes inherited from usg::SchemaProperty
std::unique_ptr< SchemaPropertyHandle, void(*)(SchemaPropertyHandle *)> _pImpl
 

Detailed Description

Specialization of SchemaProperty intended for shader nodes.

Member Function Documentation

◆ getInfoString()

std::string usg::ShaderProperty::getInfoString ( ) const

Gets a string with basic information about this property. Helpful for things like adding this property to a log.

◆ getHints()

fdk::KeyValueMap usg::ShaderProperty::getHints ( ) const

Any UI "hints" that are associated with this property. "Hints" are simple key/value pairs.

◆ getOptions()

fdk::StringList usg::ShaderProperty::getOptions ( ) const

If the property has a set of valid values that are pre-determined, this will return the valid option names and corresponding string values (if the option was specified with a value). Commonly used for enumeration types.



©2025 The Foundry Visionmongers, Ltd. All Rights Reserved.
www.thefoundry.co.uk