PixarAnimationStudios / OpenUSD

Universal Scene Description
http://www.openusd.org
Other
6.06k stars 1.2k forks source link

[usdHoudini] H18: Can't convert GT_String to std::string #833

Closed AlexSchwank closed 4 years ago

AlexSchwank commented 5 years ago

Description of Issue

With Houdini 18, GT_String is no longer defined as const char* but it's a UT_StringHolder. That leads to two compilation errors:

/.../houdini/plugin/ROP_usdoutput.cpp:2184:24: error: could not convert 'v' from 'GT_String {aka UT_StringHolder}' to 'std::string {aka std::basic_string<char>}'
                  return v;
/.../houdini/plugin/ROP_usdoutput.cpp:2192:24: error: could not convert 'v' from 'GT_String {aka UT_StringHolder}' to 'std::string {aka std::basic_string<char>}'
                  return v;

See https://github.com/PixarAnimationStudios/USD/blob/dev/third_party/houdini/plugin/OP_gusd/ROP_usdoutput.cpp#L2184 and https://github.com/PixarAnimationStudios/USD/blob/dev/third_party/houdini/plugin/OP_gusd/ROP_usdoutput.cpp#L2192

If SideFX confirms that this won't change in the full release of H18, we can add some

#if HOUDINI_MAJOR_VERSION == 18
     return v.c_str()
#else
     return v;
#endif

to fix the issue and remain backwards compatible.

Steps to Reproduce

  1. Compile USD with for Houdini 18

Package Versions

19.05

jilliene commented 5 years ago

Filed as internal issue #USD-5246

sunyab commented 4 years ago

Closing this out as we are no longer distributing a Houdini plugin with USD in favor of native USD support in Solaris.