AnimalLogic / AL_USDMaya

This repo is no longer updated. Please see https://github.com/Autodesk/maya-usd
Other
266 stars 69 forks source link

error: invalid initialization of reference of type ‘const SdfPathVector& {aka const std::vector<pxrInternal_v0_8__pxrReserved__::SdfPath>&}’ #79

Open 21cores opened 6 years ago

21cores commented 6 years ago

I got these error when running "make", [ 18%] Building CXX object lib/AL_USDMaya/CMakeFiles/AL_USDMaya.dir/AL/usdmaya/nodes/ProxyShape.cpp.o /myshare/AL_USDMaya-master/lib/AL_USDMaya/AL/usdmaya/nodes/ProxyShape.cpp: In member function ‘void AL::usdmaya::nodes::ProxyShape::onObjectsChanged(const pxrInternal_v0_8pxrReserved::UsdNotice::ObjectsChanged&, const UsdStageWeakPtr&)’: /myshare/AL_USDMaya-master/lib/AL_USDMaya/AL/usdmaya/nodes/ProxyShape.cpp:1059:64: error: invalid initialization of reference of type ‘const SdfPathVector& {aka const std::vector&}’ from expression of type ‘pxrInternal_v0_8pxrReserved::UsdNotice::ObjectsChanged::PathRange’ const SdfPathVector& resyncedPaths = notice.GetResyncedPaths(); ^ /myshare/AL_USDMaya-master/lib/AL_USDMaya/AL/usdmaya/nodes/ProxyShape.cpp:1067:78: error: invalid initialization of reference of type ‘const SdfPathVector& {aka const std::vector&}’ from expression of type ‘pxrInternal_v0_8pxrReserved::UsdNotice::ObjectsChanged::PathRange’ const SdfPathVector& changedInfoOnlyPaths = notice.GetChangedInfoOnlyPaths(); ^ make[2]: [lib/AL_USDMaya/CMakeFiles/AL_USDMaya.dir/AL/usdmaya/nodes/ProxyShape.cpp.o] Error 1 make[1]: [lib/AL_USDMaya/CMakeFiles/AL_USDMaya.dir/all] Error 2 make: *** [all] Error 2

cbillingham commented 6 years ago

What version of USD are you building against? I got this same error attempting to build against USD v0.8.4. I think this was introduced in a recent change for USD v0.8.4. I believe the AL_USDMaya plugin has only been tested against USD v0.8.3 for now. I'm able to build fine against USD v0.8.3.

murphyeoin commented 6 years ago

Hello - that's correct, it's currently built currently 0.8.3. We are testing 0.8.4 build internally and will likely push this to Open source by the end of the week. Alternatively, you can pre-empt the change locally if you like, i think you just need to change any calls to that API method from "const UsdNotice::ObjectsChanged::PathRange" to "const SdfPathVector" (and so on)

fabal commented 6 years ago

The version of USD used by AL_USDMaya is also available in this documentation.

21cores commented 6 years ago

I used USD v0.8.4 also.

21cores commented 6 years ago

I have change the method in ProxyShape.h as Murphyeoin said. void ProxyShape::onObjectsChanged(UsdNotice::ObjectsChanged const& notice, UsdStageWeakPtr const& sender) to void ProxyShape::onObjectsChanged(SdfPathVector const& notice, UsdStageWeakPtr const& sender) and I got another error: error: ‘const SdfPathVector’ has no member named ‘GetResyncedPaths