What's New in Katana 3.1

Introduction

This document describes notable changes introduced in Katana 3.1. These changes include:

  • Full compatibility with the VFX Reference Platform CY2017 specification, most notably including porting the codebase to Qt 5.
  • Improved support for working with very large attributes.
  • Improved user interface performance.
  • Improved Alembic read performance.
  • An experimental new Hydra Viewer layer that shows pixels from the Monitor tab.

Technical Changes

Third-party Software

The table below summarizes changes to shipped versions of third-party software. Katana 3.1v1 aims for compatibility with VFX Reference Platform CY2017.

Katana 3.1 Katana 3.0
Qt 5.6.1 4.8.5
PyQt 5.6 4.11.4
SIP 4.18.1 4.17
OpenSubdiv 3.1.1 3.0.5
Ptex 2.1.28 2.1.10
fmt 4.1.0 Not shipped
Fontconfig Not shipped 2.8.0 (Linux only)

Due to the port from Qt 4 to Qt 5, the following user interface APIs have changed:

  • Any Qt widget that opted in to Katana's 'key-based-dragging' protocol must be updated as follows. Previously, Katana would emit a dynamic PyQt keyBasedDragRequested signal from a widget when the user hovered the mouse over it and pressed Ctrl+B. As of Katana 3.1, your widget must instead override the customEvent() method to handle QT4Widgets.GlobalEventFilter.KeyBasedDragEvent Qt events. A widget should accept the event, and initiate a drag using a QT4Widgets.InteractiveDrag object.

  • Any Qt widget that previously set a Python attribute of drawInteractiveHighlight to False should now set a boolean QObject property of the same name instead. This property allows a widget to opt out of the standard highlight effect Katana applies to a target widget of a drag-and-drop operation.

  • Any Qt widget that previously set a Python attribute of STOP_GLOBAL_SCROLLING or SKIP_GLOBAL_SCROLLING should now set a boolean QObject property of the same name instead. This property allows a widget to opt out of Katana's default 'global scrolling' behaviour, initiated by holding Alt and dragging with the middle mouse button while the cursor is over a QScrollArea-based widget.

  • The class UI4.Widgets.TextInfoDialog was defunct and has been removed.

Viewer API Improvements

  • The Viewer API has been reworked to add support for a single OpenGL context, shared between all the Viewports. The ViewportWidget class now inherits from QWidget.

  • FnViewerDelegate::getPartialXform() has been given 3 new arguments to configure which xform groups are included in the returned matrix, with the default values being consistent with existing behaviour. This change follows on from a fix made available in 3.0v2 for incorrect results when manipulating a looked-through camera with multiple transformation groups (TP 346989).

FnAttribute Improvements

Katana now supports creating attributes with 232 or more values per time sample, and error handing relating to internal size limits has been made more robust. Previously, Katana could crash or generate malformed attributes if certain internal limits were breached, and there was no formal documentation for these limits. Internal data limits of FnAttribute (which are now documented in the C++ headers) are as follows:

  • DataAttribute (int, float, double, string):
    • value count (per time sample): [0, 263]
    • time sample count: [0, 213]
    • tuple size: [0, 216]
  • GroupAttribute
    • child count: [0, 228]

OpScript can now inspect and create attributes with more than 227 values per time sample using a new getSamples() method; available on any data attribute. The 'sample accessor' object returned by getSamples() supports inspecting a read-only view of time sample data, as well as creating a mutable copy of a sample buffer in order to manipulate the existing data. Full documentation is available in the Katana Developer Guide, but a contrived example is as follows:

local myIntAttr = Interface.GetAttr('myAttr')

local newSamples = {}
for _, sample in ipairs(myIntAttr:getSamples()) do
  -- Create a mutable copy of the sample buffer
  local buffer = sample:toArray()
  for i, elem in ipairs(buffer) do
    buffer:set(i, elem * 2)
  end

  local t = sample:getSampleTime()
  newSamples[t] = buffer
end

Interface.SetAttr('myAttr', IntAttribute(newSamples))

For backwards compatibility, myDataAttr:getNearestSample(time) continues to return a copy of a time sample as a Lua table, and is subject to a maximum of 227 values. Please note that the getSamples() API requires the new LuaJIT-based OpScript backend, and is not available in the legacy Lua 5.1 backend.

Performance Improvements

The performance of application startup, user interface interaction, and idle CPU usage has been improved by optimizing the Katana event system and removing instances where Katana polls for events.

The performance of Ogawa-based Alembic reads has also been improved by using memory-mapped I/O.

New Features

ProfilingMockRenderer

  • A new example renderer plug-in is now shipped with Katana: ProfilingMockRenderer. The plug-in performs no rendering of pictures. Instead, its purpose is to profile Katana's scene graph expansion from the context of a renderer plug-in, implementing different traversal strategies for accessing scene graph location data. The plug-in's source code is available in plugins/Src/.

    As part of adding the ProfilingMockRenderer example, the existing Renderer Plug-ins page in the Katana Developer Guide has been split into two sections: Overview and Render API. The new plug-in is documented in a new section named Profiling Mock Renderer.

Experimental Features

Monitor Front Buffer

An experimental viewer layer that shows pixel data from the Monitor tab has been added to the Viewer (Hydra) tab.

When setting the KATANA_EXPERIMENTAL_MONITOR_OVERLAY environment variable in a Katana launch environment to 1, a Monitor Front Buffer toggled menu item is added to the tab's View menu. When View > Monitor Front Buffer is turned on, an image layer is inserted in the tab's viewer layers, which shows the pixel data of the catalog item that is shown as the front buffer in Katana's Monitor tab.