From e6667ecf9bca6d0fe2d7aab93a38dc9a5fba9dd5 Mon Sep 17 00:00:00 2001 From: Leonid Onokhov Date: Tue, 18 Sep 2018 09:23:25 +0000 Subject: [PATCH 1/3] Export SdfLayerStateDelegate members from dll --- pxr/usd/lib/sdf/layerStateDelegate.h | 29 ++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/pxr/usd/lib/sdf/layerStateDelegate.h b/pxr/usd/lib/sdf/layerStateDelegate.h index 29cd87354a..8afb7950c1 100644 --- a/pxr/usd/lib/sdf/layerStateDelegate.h +++ b/pxr/usd/lib/sdf/layerStateDelegate.h @@ -60,26 +60,35 @@ class SdfLayerStateDelegateBase , public TfWeakBase { public: + SDF_API virtual ~SdfLayerStateDelegateBase(); + SDF_API bool IsDirty(); + SDF_API void SetField( const SdfAbstractDataSpecId& id, const TfToken& field, const VtValue& value, const VtValue *oldValue=NULL); + + SDF_API void SetField( const SdfAbstractDataSpecId& id, const TfToken& field, const SdfAbstractDataConstValue& value, const VtValue *oldValue=NULL); + + SDF_API void SetFieldDictValueByKey( const SdfAbstractDataSpecId& id, const TfToken& field, const TfToken& keyPath, const VtValue& value, const VtValue *oldValue=NULL); + + SDF_API void SetFieldDictValueByKey( const SdfAbstractDataSpecId& id, const TfToken& field, @@ -87,54 +96,70 @@ class SdfLayerStateDelegateBase const SdfAbstractDataConstValue& value, const VtValue *oldValue=NULL); + SDF_API void SetTimeSample( const SdfAbstractDataSpecId& id, double time, const VtValue& value); + + SDF_API void SetTimeSample( const SdfAbstractDataSpecId& id, double time, const SdfAbstractDataConstValue& value); + SDF_API void CreateSpec( const SdfPath& path, SdfSpecType specType, bool inert); + SDF_API void DeleteSpec( const SdfPath& path, bool inert); + SDF_API void MoveSpec( const SdfPath& oldPath, const SdfPath& newPath); + SDF_API void PushChild( const SdfPath& parentPath, const TfToken& field, const TfToken& value); + + SDF_API void PushChild( const SdfPath& parentPath, const TfToken& field, const SdfPath& value); + + SDF_API void PopChild( const SdfPath& parentPath, const TfToken& field, const TfToken& oldValue); + + SDF_API void PopChild( const SdfPath& parentPath, const TfToken& field, const SdfPath& oldValue); protected: + SDF_API SdfLayerStateDelegateBase(); /// Returns the layer associated with this state delegate. /// May be NULL if no layer is associated. + SDF_API SdfLayerHandle _GetLayer() const; /// Returns the underlying data object for the layer associated with /// this state delegate. May be NULL if no layer is associated. + SDF_API SdfAbstractDataPtr _GetLayerData() const; /// Returns true if the associated layer has been authored to since @@ -192,7 +217,7 @@ class SdfLayerStateDelegateBase SdfSpecType specType, bool inert) = 0; - /// Invoked when a spec and its children are deleted from the associated + /// Invoked when a spec and its children are deleted from the associated /// layer. virtual void _OnDeleteSpec( const SdfPath& path, @@ -229,7 +254,7 @@ class SdfLayerStateDelegateBase private: friend class SdfLayer; - void _SetLayer(const SdfLayerHandle& layer); + SDF_API void _SetLayer(const SdfLayerHandle& layer); private: SdfLayerHandle _layer; From 508a2dfe099a5f5b64dcdc6ba49ff14f9321b693 Mon Sep 17 00:00:00 2001 From: Leonid Onokhov Date: Tue, 18 Sep 2018 09:56:28 +0000 Subject: [PATCH 2/3] Add missing export to SdfData::Has --- pxr/usd/lib/sdf/data.h | 1 + 1 file changed, 1 insertion(+) diff --git a/pxr/usd/lib/sdf/data.h b/pxr/usd/lib/sdf/data.h index 0715713bbd..10715d9a3e 100644 --- a/pxr/usd/lib/sdf/data.h +++ b/pxr/usd/lib/sdf/data.h @@ -68,6 +68,7 @@ class SdfData : public SdfAbstractData SDF_API virtual SdfSpecType GetSpecType(const SdfAbstractDataSpecId& id) const; + SDF_API virtual bool Has(const SdfAbstractDataSpecId& id, const TfToken &fieldName, SdfAbstractDataValue* value) const; SDF_API From 4b6d8f9b146f09029486fc2db7b4a4d192fde11b Mon Sep 17 00:00:00 2001 From: Leonid Onokhov Date: Mon, 24 Sep 2018 08:20:42 +0000 Subject: [PATCH 3/3] Add api.h import to layerStateDelegate --- pxr/usd/lib/sdf/layerStateDelegate.h | 1 + 1 file changed, 1 insertion(+) diff --git a/pxr/usd/lib/sdf/layerStateDelegate.h b/pxr/usd/lib/sdf/layerStateDelegate.h index 8afb7950c1..08b03ace13 100644 --- a/pxr/usd/lib/sdf/layerStateDelegate.h +++ b/pxr/usd/lib/sdf/layerStateDelegate.h @@ -25,6 +25,7 @@ #define SDF_LAYER_STATE_DELEGATE_H #include "pxr/pxr.h" +#include "pxr/usd/sdf/api.h" #include "pxr/usd/sdf/declareHandles.h" #include "pxr/usd/sdf/types.h" #include "pxr/base/tf/declarePtrs.h"