New functions have been added to the ArrayKnobI interface which should be implemented to allow querying of keys, synchronizing of keys with other ArrayKnobI instances and resizing:
virtual bool has_key_at(double time, int index = -1) const
virtua bool has_key(int index = -1) cons
virtual size_t array_size() const
virtual bool resize(int w, int h = 1)
virtual void matchAnimation(const ArrayKnobI* sourceKnob, int sourceKnobIndex, int thisKnobIndex)
Show and hide functions have been added to the Axis_KnobI interface:
virtual void hide()
virtual void show()
A function which wraps an ImagePlane into a Blink::Image has been added to the Blink namespace:
bool ImagePlaneAsBlinkImage(ImagePlane& imagePlane, ::Blink::Image& blinkImage)
Additional intersection methods have been added to the Box class:
bool intersects(const Box& other) const
bool intersects(int x, int y, int r, int t) const
Better support for custom camera projections using the new LENS_USER_CAMERA projection has been added to the CameraOp. For an example of how to use this see the FishEye.cpp example.
New functions have been added to Enumeration_KnobI for querying the current selected item:
virtual int getSelectedItemIndex() const
virtual std::string getSelectedItemString() const
New functions have been added to FileOp for adding and querying Aliases:
static void AddAlias(const char* from, const char* to)
static const char* LookupAlias(const char* from)
New filter types have been added to Filter: Lanczos4, Lanczos6, Sinc4
Additional information regarding these filter types can be found here.
This is a new class which provides a cache-like system, allowing caching to be diverted to use specified file locations instead of ImageCache.
Functions have been added to Format for converting to and from uv based screen space to xy based format space:
void from_uv_centre(float u, float v, int& X, int& Y, bool ignore_pixel_aspect = false) const
void to_uv_centre(int X, int Y, float& u, float& v, bool ignore_pixel_aspect = false) const
This is a new interface which can be used for Ops that can provide frame extent information, defining the frame range over which they operate. It is called in order to determine clip range bars in the dope sheet:
virtual double getFirstFrame() const
virtual double getLastFrame() const
virtual void setFirstFrame(double value)
virtual void setLastFrame(double value)
virtual void setCentre(double value)
This interface is used by the FrameExtent_knob. See FrameExtent_knob under Knobs section for more information.
The API for Tile has changed, to allow Tiles direct access into ops that prefer to output image planes, without needing an additional layer of Cache.
The old Tile class has been renamed to RowCacheTile.
Tile is now a typedef for RawGeneralTile. This is close to being a drop-in replacement for Tile, so code should usually compile without changing. The largest difference is that the type returned by RawGeneralTile::operator[](Channel) const is a RawGeneralTile::LinePointers, rather than a pointer to an array. The LinePointers itself has an operator[] which returns a const float*, so again, changes should be minimal.
Because of this requirement to return a const float* the RawGeneralTile can only return direct pointers into unpacked planar data. The DirectGeneralTile is also available, identical apart from the fact the DirectGeneralTile::LinePointers::operator[] returns an ImageTileReadOnlyPtr, which is a pointer with a stride. This will sometimes avoid an unnecessary unpacking, but it depends on the plugin code whether or not that is worth the additional overhead of carrying the stride around.
A new method has been added for getting the selected items as an Op::ItemSelectionList:
virtual bool getSelectedItems(SelectionMode3D selMode, Op::ItemSelectionList& selectionList)
This structure contains some of the information that Iop::_validate() and DeepOp::_validate() must calculate.
A new method has been added for returning the planar interface if the op has one:
PlanarI* getPlanarI()
A new peek function has been added which calls the PixelCallbackI::process(...) function for each pixel within a given rectangle:
bool peek(int x, int y, int w, int h, ChannelMask pixelChannels, PixelCallbackI & callback)
A new interface has been added for Lookup curve knobs: LookupCurves_KnobI.
New Knob flags:
New String Knob flag:
New SceneView Knob flags:
A new method has been added which can be implemented to provide a widget which fits in the label column, beneath the label, on the Node Panel. By default returns NULL:
virtual WidgetPointer make_secondary_widget(const WidgetContext& context)
Some new methods have been added for grouping of undos. Placing these calls around any code which modifies a knob’s keys or values will ensure that their undo event will be added to the same undo group as the most recently changed knob (resulting in a single undo event undoing both knobs’ changes):
void add_to_undo()
void stop_add_to_undo()
Some new Knob types have been added:
A new WireframeShader Iop has been added.
Registration of memory holder objects has changed. See Breaking Changes section for more information.
A new method has been added which enables the “luminance mix” slider:
NukeWrapper* mixLuminance()
Some new methods have been added which access PlanarI and ImagePlane:
PlanarI* getPlanarI();
void doFetchPlane(DD::Image::ImagePlane& ip)
Some new DopeSheet related functions have been added:
Can override virtual DopeItemFlags::mask getDopeItemFlags() const to influence how an op can be represented in the DopeSheet. See also DopeItemFlags.
Can override virtual DD::Image::Knob* getDopeItemKnob() const to specify specific knob’s keys to appear in its dope item in the DopeSheet. This is intended for use by time nodes, where the bar representing a time clip is driven by animation keys on a knob.
Can override virtual `bool shouldHideInDopeSheet(Knob* knob) const` to specify whether to hide certain knobs in the dope sheet.
There are also a selection of functions for managing frame transforms in the dopesheet:
virtual bool frameTransformImplemented() const
virtual bool frameTransformDownstream(const OutputContext& context, unsigned int input, float inFrame, float& outFrame) const
virtual bool frameTransformUpstream(const OutputContext& context, unsigned int input, float outFrame, float& inFrame) const
These functions are intended to be used to transform the times on keyframes which would be displayed on the Dope Sheet, the Curve Editor, as well as the Viewer timeline. See in source documentation for more information.
Online Help related functions.
virtual std::string docsPath() const; can be overridden to point to a path containing the help docs for the Op.
New functions have been added for reading and writing to the new ParticleCache.
A new function, ParticleSystem* getParticleSystem(...), has been added to allow developers to access the generated particle system.
PlanarI is a mix-in class to be implemented by Iops which prefer to be accessed in a planar way (i.e. with fetchPlane). This is intended for Iops that implement their own caching, the methods to be implemented provide descriptions of the way it should be accessed.
It is imagined that the output of the Iop (the full extend of the bbox) is divided into a number of stripes, that are all the full width of the bbox, but of varying heights. The function rowToStripeIndex() should turn a y index into a box number; getStripeBox() should return the full extent of the stripe. getStripeCount() returns the number of stripes necessary to cover the entire bbox. packedPreference() should return whether the op prefers providing data as packed, unpacked, or other.
You can then implement doFetchPlane() with the knowledge that Nuke will try to prefer your native box size etc. (Since fetchPlane() might be called directly, you should still implement a fallback case.)
PlanarIop provides a simple subclass of PlanarI and Iop that handles box size calculation and stripe caching. It implements its own doFetchPlane() which calls renderStripe(). The key difference is that virtual void renderStripe(ImagePlane& plane) = 0; will only ever be called in the manner the Iop mandates.
The other functions that need to be implemented are:
virtual bool useStripes() const
virtual size_t stripeHeight() const
virtual PackedPreference packedPreference() const
Overriding the _request function on PlanarIops is deprecated, and you should use getRequests() instead:
virtual void getRequests( const Box& box,
const ChannelSet& channels,
int count,
RequestOutput &reqData) const
Updated to make use of PlanarIop functionality.
An interface has been added for the new ResizableArray_knob:
virtual void addItemToCurveEditor(int index)
virtual bool visibleInCurveEditor(int index) const
virtual void removeItemFromCurveEditor(int index)
virtual void addItemToDopeSheet(int index)
virtual bool visibleInDopeSheet(int index) const
virtual void removeItemFromDopeSheet(int index)
virtual void setItemLabel(int index, const std::string& name)
virtual std::string getItemLabel(int index) const
See ResizableArray_knob under Knobs section for more information.
New SceneView Knob functionality has been added including the ability to change the selection mode, add custom menus, and get a list of Highlighted items.
Added an interface to the StringKnob class to allow plugins to get/set the cursor position from/to its widget.
New method bool needsIndividualHandles() const has been added. This allows multiple clients to have separate transform jack handles. To enable this, reimplement this function and return true. The default version returns false.
A new method void setEventCallback(DD::Image::Op* owner, EventCallback* cb) has been added.This allows developers to set a callback to be notified about handle events. Setting this callback will mean that transform events will not be sent to the clients individually, replacing TransformJack_ClientI::transformEvent, TransformJack_ClientI::aboutToChange, and TransformJack_ClientI::finishedChange.
The ValueStuffI interface has been extended to allow setting of int and int64 arrays:
bool set_values(const int* array, int n)
bool set_values_at(const int* array, int n, double time)
bool set_values(const U64* array, int n)
bool set_values_at(const U64* array, int n, double time)
A new ‘’set_key_at’’ method has been added:
bool set_key_at(double time, int channel = -1, int view = -1)