Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
21cores opened this issue Apr 11, 2018 · 5 comments

Comments

@21cores
Copy link

21cores commented Apr 11, 2018

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_8__pxrReserved__::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<pxrInternal_v0_8__pxrReserved__::SdfPath>&}’ from expression of type ‘pxrInternal_v0_8__pxrReserved__::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<pxrInternal_v0_8__pxrReserved__::SdfPath>&}’ from expression of type ‘pxrInternal_v0_8__pxrReserved__::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
Copy link

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
Copy link
Contributor

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
Copy link
Collaborator

fabal commented Apr 12, 2018

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

@21cores
Copy link
Author

21cores commented Apr 12, 2018

I used USD v0.8.4 also.

@21cores
Copy link
Author

21cores commented Apr 12, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants