publish_node

Module Contents

Classes

HoudiniNodePublishPlugin

This hook handles whether to accept, and the validation and publishes

HookBaseClass[source]
class HoudiniNodePublishPlugin[source]

Bases: HookBaseClass

This hook handles whether to accept, and the validation and publishes for the Render node item. This doesn’t actually publish anything but acts as a parent to render output items and the render session.

accept(self, settings, item)[source]

Method called by the publisher to determine if an item is of any interest to this plugin. Only items matching the filters defined via the item_filters property will be presented to this method. A publish task will be generated for each item accepted here. Returns a dictionary with the following booleans:

  • accepted: Indicates if the plugin is interested in this value at all. Required.

  • enabled: If True, the plugin will be enabled in the UI, otherwise it will be disabled. Optional, True by default.

  • visible: If True, the plugin will be visible in the UI, otherwise it will be hidden. Optional, True by default.

  • checked: If True, the plugin will be checked in the UI, otherwise it will be unchecked. Optional, True by default.

Parameters
  • settings – Dictionary of Settings. The keys are strings, matching the keys returned in the settings property. The values are Setting instances.

  • item – Item to process.

Returns

dictionary with boolean keys accepted, visible, required and enabled.

property description(self)[source]

Verbose, multi-line description of what the plugin does. This can contain simple html for formatting (str)

finalize(self, settings, item)[source]

Does nothing.

Parameters
  • settings – Dictionary of Settings. The keys are strings, matching the keys returned in the settings property. The values are Setting instances.

  • item – Item to process

property icon(self)[source]

The path to an icon on disk that is representative of this plugin (str).

property item_filters(self)[source]

List of item types that this plugin is interested in. Only items matching entries in this list will be presented to the accept() method. Strings can contain glob patters such as , for example [“katana.”, “katana.session”]

publish(self, settings, item)[source]

Inherits the publish data from the parent item to pass to the child items.

Parameters
  • settings – Dictionary of Settings. The keys are strings, matching the keys returned in the settings property. The values are Setting instances.

  • item – Item to process.

property settings(self)[source]

Dictionary defining the settings that this plugin expects to recieve through the settings parameter in the accept, validate, publish and finalize methods. A dictionary on the following form:

{
    "Settings Name": {
        "type": "settings_type",
        "default": "default_value",
        "description": "One line description of the setting"
}

The type string should be one of the data types that toolkit accepts as part of its environment configuration.

There are no settings for this item.

Returns

A dictionary of settings.

validate(self, settings, item)[source]

Validates the given item to check that it is ok to publish.

Returns a boolean to indicate validity.

Parameters
  • settings – Dictionary of Settings. The keys are strings, matching the keys returned in the settings property. The values are Setting instances.

  • item – Item to process

Returns

True if item is valid, False otherwise.