AL_USDMaya  0.29.4
USD to Maya Bridge
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StageCache.h
1 //
2 // Copyright 2017 Animal Logic
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.//
6 // You may obtain a copy of the License at
7 //
8 // http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 //
16 #pragma once
17 
18 #include "./Api.h"
19 
20 #include "pxr/pxr.h"
21 #include "pxr/usd/usd/stageCache.h"
22 #include "AL/maya/event/MayaEventManager.h"
23 
24 PXR_NAMESPACE_USING_DIRECTIVE
25 
26 namespace AL {
27 namespace usdmaya {
28 
33 {
34 public:
35 
39  AL_USDMAYA_PUBLIC
40  static UsdStageCache& Get();
41 
42 
44  AL_USDMAYA_PUBLIC
45  static void Clear();
46 
48  AL_USDMAYA_PUBLIC
49  static void removeCallbacks();
50 private:
51  static AL::event::CallbackId g_beforeNewCallbackId;
52  static AL::event::CallbackId g_beforeLoadCallbackId;
53 };
54 
55 } // usdmaya
56 } // AL
static AL_USDMAYA_PUBLIC UsdStageCache & Get()
Return the singleton stage cache for use by all USD clients within Maya.
static AL_USDMAYA_PUBLIC void removeCallbacks()
deletes the callbacks constructed to manage the stage cache
static AL_USDMAYA_PUBLIC void Clear()
Clear the cache.
Maintains a cache of all active stages within the current process. It's really just a wrapper around ...
Definition: StageCache.h:32