Cook Interface Utilities (C++)

group FnGeolibCookInterfaceUtilsService
class Foundry::Katana::FnGeolibCookInterfaceUtils
#include <FnGeolibCookInterfaceUtilsService.h>

Provides a number of utility functions commonly used by Ops.

Public Static Functions

static void matchesCEL(MatchesCELInfo &matchesCELInfo, const Foundry::Katana::GeolibCookInterface &interface, const FnAttribute::StringAttribute &cel, const std::string &inputLocationPath = std::string(), int inputIndex = kFnKatGeolibDefaultInput)

Evaluates the CEL expression against the input location path and updates matchesCELInfo based on the results.

Parameters
  • matchesCELInfo – a instance of MatchesCELInfo

  • interface – the GeolibCookInterface passed to your cook()() function.

  • cel – a StringAttribute instance containing the CEL expression to be evaluated

  • inputLocationPath – the input location path the CEL expression will be evaluated against.

  • inputIndex – the input index on the incoming scene to be queried (if for example attributes are reference in the CEL expression)

static FnAttribute::GroupAttribute cookDaps(const Foundry::Katana::GeolibCookInterface &interface, const std::string &attrRoot, const std::string &inputLocationPath = std::string(), int inputIndex = kFnKatGeolibDefaultInput, const FnAttribute::Attribute &cookOrderAttr = FnAttribute::Attribute())

Invoke the Default Attribute Producers (DAPs) and return the result.

See

DefaultAttributeProducer

Parameters
  • interface – the GeolibCookInterface passed to your cook()() function.

  • attrRoot – the attribute from which DAPs will be invoked from, e.g. materials, will only invoke the DAPs for attributes beneath materials.

  • inputLocationPath – the input location path

  • inputIndex – the input index to query the incoming scene

  • cookOrderAttr – an optional FnAttribute::StringAttribute describing the order in which DAPs should be evaluated.

Returns

an FnAttribute::GroupAttribute instance containing the result of evaluating the DAPs.

static BuildLocalsAndGlobalsInfo buildLocalsAndGlobals(const Foundry::Katana::GeolibCookInterface &interface, const std::string &attrRoot)
static FnAttribute::Attribute getDefaultDapCookOrder()
static FnAttribute::GroupAttribute resolveFileNamesWithinGroup(const Foundry::Katana::GeolibCookInterface &interface, const FnAttribute::GroupAttribute &inputGroup, const FnAttribute::StringAttribute &celAttr, int frameNumber)
static FnAttribute::StringAttribute resolveFileNameInString(const Foundry::Katana::GeolibCookInterface &interface, const FnAttribute::StringAttribute &inputString, int frameNumber)
static FnAttribute::Attribute getGlobalAttrGeneric(BaseGlobalAttributeProvider &provider, FnPlatform::StringView name, FnPlatform::StringView locationPath, bool *didAbortPtr = NULL)
static FnAttribute::Attribute getGlobalAttrGeneric(BaseGlobalAttributeProviderLegacy &provider, const std::string &name, const std::string &locationPath, bool *didAbortPtr = NULL)

This function is deprecated. Please use getGlobalAttrGeneric() with the BaseGlobalAttributeProvider type for the provider parameter instead.

Deprecated:

: Please use the variant with BaseGlobalAttributeProvider instead.

struct BuildLocalsAndGlobalsInfo

Public Members

FnAttribute::GroupAttribute locals
FnAttribute::GroupAttribute globals
struct MatchesCELInfo

Public Members

bool matches
bool canMatchChildren
class Foundry::Katana::BaseGlobalAttributeProvider
#include <FnGeolibCookInterfaceUtilsService.h>

Base abstract class representing a generic interface to query global attributes starting from a specified scene graph location.

A global attribute provider walks towards the root location, its getAttr() implementation returning the attribute corresponding to attrPath on each invocation.

Public Functions

inline virtual ~BaseGlobalAttributeProvider()
virtual FnGeolibGlobalAttributeProviderStatus getAttr(FnPlatform::StringView attrPath, FnAttribute::Attribute *attributeOut) = 0
class Foundry::Katana::BaseGlobalAttributeProviderLegacy
#include <FnGeolibCookInterfaceUtilsService.h>

This class is deprecated. Please use BaseGlobalAttributeProvider instead.

Deprecated:

: Please use BaseGlobalAttributeProvider instead.

Public Functions

inline virtual ~BaseGlobalAttributeProviderLegacy()
virtual FnGeolibGlobalAttributeProviderStatus provideAttribute(const std::string &attrPath, const std::string &leafLocationPath, int32_t relativeDepth, FnAttribute::Attribute *attributeOut) = 0