HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
16.5: Major Changes In The HDK

Renaming VRAY library as RAY

The VEX Ray-Tracing library (VRAY) was renamed to RAY. This affects all class names and header files used for mantra plug-ins. Backward compatibility headers are provided for H16.5.

SOHO API gCreate deprecation

The gCreate() method in the low level SOHO API has been deprecated in favour of gCreate2(). gCreate2() returns a tuple of the geometry handle and an error message which should be set if the returned handle is invalid. This allows SOHO to access the error message on the SOP and give better diagnostics.

Reorganisation and renaming of STY library

Several classes and in STY library got renamed to clarify their purpose:

STY_OverrideScriptEntry -> STY_OverrideScript
STY_OverrideEntry -> STY_Override
STY_OverridesEntry -> STY_OverrideCategory
STY_OverrideSetsEntry -> STY_OverrideBlock
STY_StyleEntry -> STY_Style
STY_StyleEntryFlags -> STY_StyleFlags
STY_MaterialEntry -> STY_Material
STY_OverrideValue -> STY_Result
STY_OverrideValueMap -> STY_ResultMap
STY_OverrideValues -> STY_Results
STY_OverrideValuesFilter -> STY_ResultsFilter
STY_Value -> STY_Constant
#endcode
Furthermore the @ Handle and the @ Map counterparts got renamed too. Eg,
@code
STY_OverrideEntryHandle -> STY_OverrideHandle
STY_OverrideEntryMap -> STY_OverrideMap

Several functions were also renamed to match the data type name changes. For example, STY_Styler::getOverrides() was changed to STY_Styler::getResults().

Boost

Stock Boost C++ libraries are no longer shipped with the HDK.

The HDK instead ships with custom Boost librares that place public symbols in an hboost namespace.

You can continue using Boost in HDK plugins but you are now required to supply the headers and libraries. Note that any version of Boost can be used.

One caveat for Houdini 16.5 is that the _1, _2, ..., _9 symbols in the boost/bind/placeholders.hpp header must be prefixed with the boost::placeholders:: namespace when referenced.

For example, rather than:

auto does_not_work = boost::bind(foobar,_1);

Do instead:

auto works = boost::bind(foobar,boost::placeholders::_1);

Otherwise you may run into ambiguous symbol errors during compilation.

Alternatively, you can use the custom Boost libraries that ship with the HDK. This requires porting code to work with the hboost namespace instead of the boost namespace. This generally involves making three changes to code:

  1. Change references to the boost namespace to hboost instead.
  2. Change references to BOOST_* preprocessor variables to HBOOST_* instead.
  3. Change <boost/...> header includes to <hboost/...> instead.

It also involves linking against hboost libraries by replacing -lboost_iostreams with -lhboost_iostreams for example.

String Attributes Using UT_StringHolder

String attributes now use a lighter data structure using UT_StringHolder, making copying faster, and allowing use of cached string hashes, for fast use in hash tables. GA_ROHandleS::get now returns const UT_StringHolder&, instead of const char*, and GA_RWHandleS::set now accepts const UT_StringHolder& instead of const char* . Note that GA_ATIString is no longer a subclass of GA_ATIBlob.