Breaking Changes
================

Op
--

``Op::memUsage()`` has been removed.

New Memory tracking/management functions and classes have been added to replace this.

See the :ref:`advanced-memory` section for details on how to use this.


The ``anyHandles()``, ``anyInputHandles()``, ``anyKnobHandles()`` and ``doAnyHandles()`` functions have been modified to return an ``HandlesMode`` enum type
instead of the ``bool`` they previously did. This allows more fine-grained control over whether expensive OpTree generation needs to be called.


The ``bool preValidate(ViewerContext* ctx, ...)`` function has been changed to return an enum and it now takes a ``PreValidateContext`` class pointer.


GeoInfo
-------

The ``getObjectCollisionGrid()`` and ``setObjectCollisionGrid()`` functions have been removed.

Similar functionality can be achieved by obtaining a ``RegularGrid`` via the ``buildGrid()`` function in ``ViewerContext``.

GeoOp
-----

The ``objectGrid()`` function has been removed.

Similar functionality can be achieved by obtaining a ``RegularGrid`` via the ``buildGrid()`` function in ``ViewerContext``.

 
ReadGeo
-------

``GeoReader::Description`` has been moved to the ``GeoDescription`` class (in DDImage/GeoReaderDescription.h).


Member variables ``constructor`` and ``test`` have been renamed to ``_constructor`` and ``_test`` respectively.


GeoSelection
------------

The GeoSelection class used for querying and modifying selected Geometry within Nuke has been refactored to inherit privately from
the OrderedMap class to prevent tinkering with the innards of Nuke in precarious ways.

Generally, API-wise, existing functionality has stayed the same with a few additions, with a new interface ``ReadWriteHandle`` to allow
more direct access to the selection index arrays.


Mesh
----

The ``bool IntersectsRay(const Ray& ray, ...)`` function's signature has been changed.


ParticleOp
----------

The ``void setNodeState(Node* node, ...)`` and ``ParticleNodeState* nodeState(Node* node)`` functions have been removed, and are replaced with
a new function ``ParticleNodeState* nodeState(Node* node, ParticleNodeStateFactory* factory)``.


Scene
-----

The ``void buildGrid()`` function has been removed. Similar functionality can be achieved by obtaining a ``RegularGrid`` via the ``buildGrid()`` function in ``ViewerContext``.


Triangle
--------

The ``Vector3 average_center_and_bounds(const PointList* points, ...)`` function has been removed.


ViewerContext
-------------

The ``RegularGrid* getGrid()`` function has been removed. Similar functionality can be achieved by obtaining a ``RegularGrid`` via the ``buildGrid()`` function in ``ViewerContext``.


Other
-----

Several instances of the ``using`` directive have been removed from DDImage headers. This may mean you have to add namespace
qualifiers to certain classes or functions where you didn't previously need to.
