HDK
|
Custom expression callback functions now take an extra "func_flags" parameter. Please see the expr/channel.C and expr/functions.C for the recommended method of declaring them in a backwards compatible manner using the EV_START_FN macro.
Parameter and channel evaluation time values have been changed from single to double precision. This type conversion is still an ongoing process so not all places in the HDK have been modified yet. Please use the double
type from now on for all time variables.
If you are manually spawning threads, then a UT_TaskScope object is now probably required to created in your parent thread. See Creating Child Threads for more info.
In an effort to make the interfaces more thread-safe, the following class methods that deal with obtaining transforms have been removed. At the same time, alternate versions of the functions are provided that return the transform matrix in an output reference parameter as well as returning a bool indicating success.
OP_Node
virtual const UT_DMatrix4 &getWorldTransform(OP_Context &);
virtual const UT_DMatrix4 &getIWorldTransform(OP_Context &);
OBJ_Node
virtual const UT_DMatrix4 &getTransform(OP_Context &);
virtual const UT_DMatrix4 &getWorldTransform(OP_Context &);
virtual const UT_DMatrix4 &getIWorldTransform(OP_Context &);
const UT_DMatrix4 &getInverseLocalToWorldTransform(OP_Context &);
const UT_DMatrix4 &getLocalToWorldTransform(OP_Context &);
OBJ_SubNet
const UT_DMatrix4 &getSubnetTransform(OP_Context &);
ROP_RenderableThing
virtual const UT_DMatrix4 &getWorldTransform(OP_Context &) = 0;
(and corresponding subclassed methods)The alternate forms of these functions now behave differently. Previously, for nodes which did not support transforms, they would return false
and then leave their output matrix parameters uninitialized. To unify the semantics of the two function forms, the alternate forms for such nodes now return true
instead, and initialize their output matrix parameters to the identity. The affected functions are:
OP_Node::getWorldTransform()
OP_Node::getIWorldTransform()
OP_Node::getRelativeTransform()
OP_Node::getRelativeCaptureTransform()
In earlier versions of the HDK, attributes were referenced by an integer value. Houdini 11.0 replaces this with the new GB_AttributeRef class.
This may require significant changes to existing source code.
We realize that you may not have the time or resources to change all your code at the current time. In order to facilitate making the change, you can define HDK_RELAXED_GB
in your make (or in your code).
This will provide convenience methods which should allow integer values to be used transparently with GB_AttributeRef objects.
If you need your code to compile with earlier versions of Houdini as well, you can include <GB/GB_AttributeRef.h>
(which was added in 10.0.XXX. The salient parts of this file are:
Old attribute code looks something like:
The equivalent new code would look like:
The method isValid()
is not backward compatible with earlier versions of Houdini. If you need to compile your code with earlier versions, please use the global function GBisAttributeRefValid()
This code will compile in 10.0 if you include <GB/GB_AttributeRef.h>
The example file SOP_SParticle.C has been modified to compile with either 10.0 or newer versions of the HDK.
While making changes in the Houdini baseline, we noticed some of the following common code patterns:
In earlier versions of the HDK, it was possible to access the GB_AttributeData associated with a GB_AttributeElem object. In H11.0, this data is now private.
As with the changes to GB_AttributeRef, it is possible to defer these changes. However, a future release of Houdini will see radical changes with attribute data so it is important to make these changes at some point.
The changes for the privatization of GB_AttributeData are fairly straightforward.
Until 11.0, the only way to access attribute data was by using the castAttribData<T>()
method. This method gave the caller direct access to the storage of the attribute data. While efficient, this method makes assumptions about how the data is stored inside attributes.
castAttribData()
should be replaced with the newer get/set or the attribute handle interfaces.
One of the reasons why you might have had to use GB_AttributeData rather than GB_AttributeElem is that your code needed to handle detail attributes. These are stored in a GB_AttributeTable object which had attribute data. The GB_AttributeTable object now stores a GB_AttributeElem object which can be used to access attribute data.
For example, old code:
This should be replaced with:
Often, code would perform operations on attribute data. This was often used when performing interpolation of attribute data, etc.
There are new methods available on GB_AttributeElem which more than make up for the methods on GB_AttributeData
In addition there are short-cut methods which are now available on GB_AttributeElem which required multiple operations when accessing GB_AttributeData.
There have been several deprecations in the geometry library. These methods will disappear in the future, so please make your code future compatible by using the future-proof replacements