8#include <unordered_map>
10namespace Json {
class Value; }
35 MRVIEWER_API
static const std::unordered_map<std::string, VisualObjectTag>&
storage();
47 MRVIEWER_API
static std::vector<std::shared_ptr<Object>>
getAllObjectsWithTag(
Object* root,
const std::string& visTagId,
const ObjectSelectivityType& type = ObjectSelectivityType::Selectable );
53 struct ProtectedTag {};
56 boost::signals2::scoped_connection onTagAdded_;
57 boost::signals2::scoped_connection onTagRemoved_;
61 std::unordered_map<std::string, VisualObjectTag> storage_;
named object in the data model
Definition MRObject.h:62
class for storing and changing visual object properties based on the object tags
Definition MRVisualObjectTag.h:29
static MRVIEWER_API void registerTag(std::string id, VisualObjectTag tag)
add visual object tag with custom id
static MRVIEWER_API std::string registerTag(VisualObjectTag tag)
add visual object tag
static MRVIEWER_API std::vector< std::shared_ptr< Object > > getAllObjectsWithTag(Object *root, const std::string &visTagId, const ObjectSelectivityType &type=ObjectSelectivityType::Selectable)
find all object in given object tree with the visual object tag
friend MRVIEWER_API void deserializeFromJson(const Json::Value &, VisualObjectTagManager &)
static MRVIEWER_API void update(VisualObject &visObj, const std::string &visTagId)
update visual object properties according to whether given object has the visual object tag or not
static MRVIEWER_API void unregisterTag(const std::string &visTagId)
remove visual object tag; linked objects are NOT updated automatically
static MRVIEWER_API VisualObjectTagManager & instance()
get access to the global instance
static MRVIEWER_API void updateTag(const std::string &visTagId, VisualObjectTag tag)
update visual object tag; linked objects are NOT updated automatically
static MRVIEWER_API const std::unordered_map< std::string, VisualObjectTag > & storage()
get read-only access to the visual object tags' storage
Visual Object.
Definition MRVisualObject.h:122
Definition MRCameraOrientationPlugin.h:8
MRMESH_API void serializeToJson(const EndMillCutter &cutter, Json::Value &root)
MRMESH_API Expected< void > deserializeFromJson(const Json::Value &root, EndMillCutter &cutter)
Definition MRMesh/MRColor.h:9
modified color set for visual objects
Definition MRVisualObjectTag.h:17
Color selectedColor
Definition MRVisualObjectTag.h:20
MRVIEWER_API std::string canonicalName() const
canonical name for indexing
std::string name
Definition MRVisualObjectTag.h:18
Color unselectedColor
Definition MRVisualObjectTag.h:21