HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
STY_MaterialProperties.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: STY_MaterialProperties.h ( STY Library, C++)
7  *
8  * COMMENTS:
9  */
10 
11 #ifndef __STY_MaterialProperties__
12 #define __STY_MaterialProperties__
13 
14 #include "STY_API.h"
15 #include "STY_Types.h"
16 
17 class UT_JSONValue;
18 class UT_JSONValueMap;
19 
20 /// Provides values for the properties of materials defined in a style sheet.
22 {
23 public:
25 
26  /// Loads the material properties from json value.
27  void loadStyleSheetMaterialProperties(const UT_JSONValue *json);
28 
29  /// Checks if there are any properties for the material.
30  bool isEmpty() const
31  { return myProperties.empty(); }
32 
33  /// Represents the material properties object as options.
35  { return myProperties; }
36 
37  /// Save these material properties as JSON to a style sheet.
38  void saveStyleSheet(UT_JSONValueMap *map) const;
39 
40 private:
41  /// Internal representation of properties.
42  STY_ConstantMap myProperties;
43 };
44 
45 #endif
46 
UT_JSONValueMap stores a map/dictionary of UT_JSONValue objects.
Provides values for the properties of materials defined in a style sheet.
#define STY_API
Definition: STY_API.h:10
Class to store JSON objects as C++ objects.
Definition: UT_JSONValue.h:99
const STY_ConstantMap & getProperties() const
Represents the material properties object as options.
bool isEmpty() const
Checks if there are any properties for the material.