AL_USDMaya  0.29.4
USD to Maya Bridge
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
SelectabilityDB.h
1 #pragma once
2 
3 #include "./Api.h"
4 
5 #include "pxr/pxr.h"
6 #include "pxr/usd/usd/prim.h"
7 #include "pxr/usd/sdf/path.h"
8 #include <algorithm>
9 
10 PXR_NAMESPACE_USING_DIRECTIVE
11 
12 namespace AL {
13 namespace usdmaya {
14 
19 public:
20 
25  AL_USDMAYA_PUBLIC
26  bool isPathUnselectable(const SdfPath& path) const;
27 
32  AL_USDMAYA_PUBLIC
33  void addPathsAsUnselectable(const SdfPathVector& paths);
34 
39  AL_USDMAYA_PUBLIC
40  void addPathAsUnselectable(const SdfPath& path);
41 
45  inline const SdfPathVector& getUnselectablePaths() const
46  { return m_unselectablePaths; }
47 
52  AL_USDMAYA_PUBLIC
53  void removePathsAsUnselectable(const SdfPathVector& paths);
54 
59  AL_USDMAYA_PUBLIC
60  void removePathAsUnselectable(const SdfPath& path);
61 
62 private:
63  inline void sort(){std::sort(m_unselectablePaths.begin(), m_unselectablePaths.end());}
64  bool addUnselectablePath(const SdfPath& path);
65  bool removeUnselectablePath(const SdfPath& path);
66 
67 private:
68  SdfPathVector m_unselectablePaths;
69 };
70 
71 //----------------------------------------------------------------------------------------------------------------------
72 } // usdmaya
73 } // AL
74 //----------------------------------------------------------------------------------------------------------------------
const SdfPathVector & getUnselectablePaths() const
Gets the currently explictly tracked unseletable paths
Definition: SelectabilityDB.h:45
AL_USDMAYA_PUBLIC void addPathAsUnselectable(const SdfPath &path)
Adds a path to the unselectable list.
AL_USDMAYA_PUBLIC void addPathsAsUnselectable(const SdfPathVector &paths)
Adds a list of paths to the selectable list.
AL_USDMAYA_PUBLIC void removePathAsUnselectable(const SdfPath &path)
Remove a path from the selectable list if the exist.
Logic that stores a sorted list of paths which represent Selectable points in the USD hierarchy ...
Definition: SelectabilityDB.h:18
AL_USDMAYA_PUBLIC bool isPathUnselectable(const SdfPath &path) const
Determines this path is unselectable.
AL_USDMAYA_PUBLIC void removePathsAsUnselectable(const SdfPathVector &paths)
Removes a list of paths from the selectable list if the exist.