UFO Library Functions


Using the UFO (User Function Objects) API, you can create your own Fx operators for use inside the Softimage Fx tree. A custom Fx operator is written as a set of pre-defined user functions which define the setup and rendering of an effect. These user functions communicate with the main body of code via an interface library of support functions. The UFO code is compiled and linked into a Dynamic Shared Object (.so) or Dynamically Linked Library (.dll) which is loaded into Softimage at run-time.

This section of the UFO Reference describes all the UFO library functions.

Table of contents

ufoProcessCreate

ufoProcess ufoProcessCreate(
   char *name,
   int number_inputs,
   int number_outputs,
   int number_parameters,
   int number_parameter_groups);

Refer to the following table for command descriptions:


Command

Description

name

user interface name for process

number_inputs

number of image/mask/RGBA inputs

number_outputs

number of image/mask/RGBA outputs

number_parameters

number of parameters

number_parameter_groups

number of groups the parameters are divided into


ufoProcessCreate creates the initial UFO process definition. All used instances of this process are copied from this one (or copies of copies of this one).

ufoProcessCreate must be called within ufoProcessDefine to get an initial process instance handle to pass to all subsequent functions as required.

ufoProcessSetEffectType

void ufoProcessSetEffectType( 
   ufoProcess process_instance, 
   ufoEffectType effect_type); 

This function may be called to set type of the effect group that the UFO belongs to. Currently the only setting other than the default, ufoUndefinedEffect, is ufoTransitionEffect. This may be set in order to inform the application that a UFO is a transition effect.

Within the application’s Composition Editor, only transition effects may be used for performing transitions between track segments.

If you want parameter keyframes to automatically scale in duration during certain invocations in the application then you should use ufoProcessSetParamAutoTransition passing the specific parameter index.

By default the process effect type is ufoUndefinedEffect.

ufoProcessSetMPSafe

void ufoProcessSetMPSafe(
   ufoProcess process_instance,
   int mp_safe);

Refer to the following table for command descriptions:


Command

Description

mp_safe

1: following renders are MP safe (default), 0: not MP safe


ufoProcessSetMPSafe sets whether the following render is multi-processor safe (MP Safe) or not.

By default, MPSafe is true, and on multi-processor machines (such as SGI Onyx) UFO line and pixel render routines will be called in parallel. If your render routine or a pass of your render routine, is not MP safe then you should call this routine with mp_safe set to 0 for the period in which it is MP unsafe.

ufoProcessSetMPSafe may be called within ufoProcessDefine to set for all renders, within ufoProcessPreRender to set before each frame, or within ufoProcessPreRenderPass to set before each render pass.

ufoProcessSetNumberRenderPasses

void ufoProcessSetNumberRenderPasses(
   ufoProcess process_instance,
   int number_passes);

ufoProcessSetNumberRenderPass sets the number of separate rendering passes, and may be called within ufoProcessDefine to set the number of passes in all renders, or within ufoProcessPreRender to set the number of passes in the following render.

ufoProcessSetRenderPassMode

void ufoProcessSetRenderPassMode(
   ufoProcess process_instance,
   int pass_number,
   ufoPassMode pass_mode);

Refer to the following table for command descriptions:


Command

Description

pass_number

pass for which the mode is being set

ufoPassMode
ufoHorizontalPass

horizontal line scanning (default)

ufoVerticalPass

vertical line scanning


ufoProcessSetRenderPassMode sets the rendering of a particular pass to be either horizontal (the default) or vertical.

If the pass mode is set to ufoVerticalPass then the X and Y arguments passed to UFO render user functions are swapped for that pass.

ufoProcessSetRenderPassMode may be called within ufoProcessDefine to affect all renders, or within ufoProcessPreRender to affect the subsequent render.

ufoProcessSetTilingAllow

void ufoProcessSetTilingAllow(
   ufoProcess process_instance,
   int tiling_allow);

Refer to the following table for command descriptions:


Command

Description

tiling_allow

1: allow tiling/slicing (default)
0: do not allow


ufoProcessSetTilingAllow sets whether tiling or slicing is allowed when rendering.

By default, TilingAllow is on. If tiling is not allowed, then rendering of rectangular regions will not be segmented into slices or tiles. If allowed, slicing is done on processes which are slow to allow checking for a user interrupt, and tiling is optionally performed at the user’s request to subdivide a high resolution render into a set of lower resolution renders.

ufoProcessSetTilingAllow may be called within ufoProcessDefine, to set for all renders, within ufoProcessPreRender to set before each frame, or within ufoProcessPreRenderPass to set before each render pass.

ufoProcessSetPixelTypeCombinations

void ufoProcessSetPixelTypeCombinations(
   ufoProcess process_instance,
   int number_combinations,
   ufoPixelType *input_combinations,
   ufoPixelType *output_combinations,
   ufoPixelType *mask_combinations);

Refer to the following table for command descriptions:


Command

Description

number_combinations

number of combinations supported

input_combinations

2D array of pixel types
[number_inputs] x [number_combinations]

output_combinations

2D array of pixel types
[number_outputs] x [number_combinations]

mask_combinations

set to null


ufoProcessSetPixelTypeCombinations sets the combinations of input and output pixel types supported by the UFO process render functions. The mask_combinations argument should be set to null.

It is recommended that in place of using this function, you should supply the user function ufoProcessSpecifyConvertPixelTypes (see above). ufoProcessSpecifyConvertPixelTypes is easier to use and gives you more precise control of the pixel types of the rasters supplied to the UFO process.

By default, the process supports any pixel type on all inputs and outputs.

ufoProcessSetPixelTypeCombinations may be called within ufoProcessDefine.

ufoProcessRasterInDefine

void ufoProcessRasterInDefine(
   ufoProcess process_instance,
   int input_index,
   char *id,
   char *name,
   ufoCompComb suggested_components);

Refer to the following table for command descriptions:


Command

Description

input_index

index (0..number_inputs-1) of raster input

id

unique (within process) id of input with no spaces

name

user interface title of input

suggested_components

suggested working pixel components

ufoCompComb
ufoAnyCompComb

expects any pixel type

ufoRGBCompComb

expects RGB pixel type

ufoRGBACompComb

expects RGBA pixel type

ufoACompComb

expects A pixel type


ufoProcessRasterInDefine defines one of the (0..number_inputs-1) raster inputs as set in the ufoProcessCreate function call.

The suggested_components argument indicates which component combination of the raster the UFO process expects to work on. This does not force the pixel type of raster supplied when rendering; for this use ufoProcesSetPixelTypeCombinations.

ufoProcessRasterInDefine must be called within ufoProcessDefine for each raster input.

ufoProcessSetRasterInEdgeMode

void ufoProcessSetRasterInEdgeMode(
   ufoProcess process_instance,
   int input_index,
   ufoEdgeMode edge_mode);

Refer to the following table for command descriptions:


Command

Description

ufoEdgeMode
ufoEdgeNoClamp

Do not clamp output render to input bounds

ufoEdgeNoClamp

Clamp output render to input bounds (default)


If an effect can render to an output region which can be outside the bounds of this input, set the edge mode to ufoEdgeNoClamp.

By default ufoProcessSetRasterInEdgeMode is set to ufoEdgeClamp, which means that an output render region is automatically clamped to the limits of the input.

ufoProcessSetRasterInEdgeMode may be called within ufoProcessDefine.

ufoProcessSetRasterInOptional

void ufoProcessSetRasterInOptional(
   ufoProcess process_instance,
   int input_index,
   int optional);

Refer to the following table for command descriptions:


Command

Description

optional

0: Not Optional (Default)
1: Optional


ufoProcessSetRasterInOptional sets the specified input to be optional or not. Optional inputs do not need to be connected in order for the UFO process effect to work.

If an input is set to optional, then ufoProcessIsRasterInDefined should be called to check for whether it is connected or not.

ufoProcessSetRasterInOptional may be called within ufoProcessDefine.

ufoProcessSetRasterInOptionalDefault

void ufoProcessSetRasterInOptional(
   ufoProcess process_instance,
   int input_index,
   int option_select);

Refer to the following table for command descriptions:


Command

Description

option_select

0: Not Selected (Default)
1: Selected


ufoProcessSetRasterInOptional sets the default selection for the optional input (set by ufoProcessSetRasterInOptionalDefault).

ufoProcessSetRasterInOptionalDefault may be called within ufoProcessDefine.

ufoProcessIsRasterInDefined

int ufoProcessIsRasterInDefined(
   ufoProcess process_instance,
   int input_index);

ufoProcesslsRasterInDefined inquires if an optional raster input is connected and set.

These functions should be called for those inputs that have been set optional by ufoProcessSetRasterInOptional to see if the input has been connected and selected.

ufoProcesslsRasterInDefined may be called within ufoProcessRenderPixel, ufoProcessRenderLine, ufoProcessRenderRectangle, ufoProcessCanAvoidRendering, ufoProcessPreRender, ufoProcessPostRender, ufoProcessPreRenderPass, ufoProcessPostRenderPass, ufoProcessCalcDefinedRectangle, ufoProcessCalcNeedRectangles, ufoProcessCalcDefinedPixelTypes, and ufoProcessSpecifyConvertPixelTypes.

ufoProcessIsRasterInDirty

int ufoProcessIsRasterInDirty(
   ufoProcess process_instance,
   int input_index);

ufoProcesslsRasterInDirty returns a value of 1 if input is dirty and a value of 0 if input is not dirty.

Inquire if raster input is dirty. An input is not dirty if it hasn’t changed since the last render and its dirty status was reset with ufoProcessResetRasterInDirty. This may occur during consecutive renders at the same frame during interactive editing, or if there is a hold (or freeze) on the input in a sequence.

ufoProcesslsRasterInDirty may be called within ufoProcessRenderPixel, ufoProcessRenderLine, ufoProcessRenderRectangle, ufoProcessCanAvoidRendering, ufoProcessPreRender, ufoProcessPostRender, ufoProcessPreRenderPass,ufoProcessPostRenderPass, ufoProcessCalcDefinedRectangle, ufoProcessCalcNeedRectangles, ufoProcessCalcDefinedPixelTypes, and ufoProcessSpecifyConvertPixelTypes.

ufoProcessResetRasterInDirty

void ufoProcessIsRasterInDirty(
   ufoProcess process_instance,
   int input_index);

ufoProcessResetRasterInDirty resets dirty status of input, and may be called within ufoProcessRenderPixel, ufoProcessRenderLine, ufoProcessRenderRectangle, ufoProcessCanAvoidRendering, ufoProcessPreRender, ufoProcessPostRender, ufoProcessPreRenderPass, ufoProcessPostRenderPass, ufoProcessCalcDefinedRectangle, ufoProcessCalcNeedRectangles, ufoProcessCalcDefinedPixelTypes, and ufoProcessSpecifyConvertPixelTypes.

ufoProcessRasterOutDefine

void ufoProcessRasterOutDefine(
   ufoProcess process_instance,
   int output_index,
   char *id,
   char *name,
   ufoCompComb suggested_components);

Refer to the following table for command descriptions:


Command

Description

output_index

index (0..number_outputs-1) of raster output

id

unique (within process) id of output with no spaces

name

user interface title of output

suggested_components

suggested working pixel components

ufoCompComb
ufoAnyCompComb

expects any pixel type

ufoRGBCompComb

expects RGB pixel type

ufoRGBACompComb

expects RGBA pixel type

ufoACompComb

expects A (alpha) pixel type


ufoProcessRasterOutDefine define one of the (0..number_outputs-1) raster outputs as set in the ufoProcessCreate function call.

The suggested_components argument indicates which component combination of the raster the UFO process expects to work on. This does not force the pixel type of raster supplied when rendering; for this use ufoProcesSetPixelTypeCombinations.

ufoProcessRasterOutDefine must be called within ufoProcessDefine for each raster output.

ufoProcessSetRasterOutEdgeMode

void ufoProcessSetRasterOutEdgeMode(
   ufoProcess  process_instance,
   int         input_index,
   ufoEdgeMode edge_mode);

Refer to the following table for command descriptions:


Command

Description

ufoEdgeMode
ufoEdgeNoClamp

Do not clamp output render to input bounds

ufoEdgeNoClamp

Clamp output render to input bounds (default)


If an effect can render to an output region which can be outside the bounds of this input, set the edge mode to ufoEdgeNoClamp.

By default ufoProcessSetRasterInEdgeMode is set to ufoEdgeClamp, which means that an output render region is automatically clamped to the limits of the input.

ufoProcessSetRasterInEdgeMode may be called within ufoProcessDefine.

ufoProcessGetRasterIn

ufoRaster ufoProcessGetRasterIn(
   ufoProcess process_instance,
   int input_index);

ufoRaster ufoProcessGetRasterOut(
   ufoProcess process_instance,
   int output_index);

ufoRaster ufoProcessGetObeyMatte(
   ufoProcess process_instance);

ufoProcessGetRasterIn, ufoProcessGetRasterOut and ufoProcessGetObeyMatte return a handle to a ufoRaster instance. Use them to return the raster handle for input or output during rendering.

ufoProcessGetObeyMatte should be used where a process handles its own matte protection. See also [#Rag29752 ufoProcessHandleOwnProtection], [#Rag68064 ufoProcessIsObeyMatteDefined], and [#Rag24499 ufoProcessIsObeyMatteReversed].

The raster handle can be passed in calls to raster functions that take a ufoRaster handle as their first argument. These are functions to set and get pixel values, to inquire raster attributes and buffer pointers, and for raster copying.

ufoProcessGetRasterIn and ufoProcessGetRasterOut may be called within ufoProcessRenderPixel, ufoProcessRenderLine, ufoProcessRenderRectangle, ufoProcessPreRender, ufoProcessPostRender, ufoProcessPreRenderPass, ufoProcessPostRenderPass or from within any editor user function or event function in the editor GUI.

ufoProcessGetRasterOut

ufoRaster ufoProcessGetRasterIn(
   ufoProcess process_instance,
   int input_index);

ufoRaster ufoProcessGetRasterOut(
   ufoProcess process_instance,
   int output_index);

ufoRaster ufoProcessGetObeyMatte(
   ufoProcess process_instance);

ufoProcessGetRasterIn, ufoProcessGetRasterOut and ufoProcessGetObeyMatte return a handle to a ufoRaster instance. Use them to return the raster handle for input or output during rendering.

ufoProcessGetObeyMatte should be used where a process handles its own matte protection. See also [#Rag29752 ufoProcessHandleOwnProtection], [#Rag68064 ufoProcessIsObeyMatteDefined], and [#Rag24499 ufoProcessIsObeyMatteReversed].

The raster handle can be passed in calls to raster functions that take a ufoRaster handle as their first argument. These are functions to set and get pixel values, to inquire raster attributes and buffer pointers, and for raster copying.

ufoProcessGetRasterIn and ufoProcessGetRasterOut may be called within ufoProcessRenderPixel, ufoProcessRenderLine, ufoProcessRenderRectangle, ufoProcessPreRender, ufoProcessPostRender, ufoProcessPreRenderPass, ufoProcessPostRenderPass or from within any editor user function or event function in the editor GUI.

ufoProcessGetObeyMatte

ufoRaster ufoProcessGetRasterIn(
   ufoProcess process_instance,
   int input_index);

ufoRaster ufoProcessGetRasterOut(
   ufoProcess process_instance,
   int output_index);

ufoRaster ufoProcessGetObeyMatte(
   ufoProcess process_instance);

ufoProcessGetRasterIn, ufoProcessGetRasterOut and ufoProcessGetObeyMatte return a handle to a ufoRaster instance. Use them to return the raster handle for input or output during rendering.

ufoProcessGetObeyMatte should be used where a process handles its own matte protection. See also [#Rag29752 ufoProcessHandleOwnProtection], [#Rag68064 ufoProcessIsObeyMatteDefined], and [#Rag24499 ufoProcessIsObeyMatteReversed].

The raster handle can be passed in calls to raster functions that take a ufoRaster handle as their first argument. These are functions to set and get pixel values, to inquire raster attributes and buffer pointers, and for raster copying.

ufoProcessGetRasterIn and ufoProcessGetRasterOut may be called within ufoProcessRenderPixel, ufoProcessRenderLine, ufoProcessRenderRectangle, ufoProcessPreRender, ufoProcessPostRender, ufoProcessPreRenderPass, ufoProcessPostRenderPass or from within any editor user function or event function in the editor GUI.

ufoProcessGetRasterInAtFrame

Related Functions: ufoProcessReleaseRasterInAtFrame

ufoRaster ufoProcessGetRasterInAtFrame(

ufoProcess process_instance,

int input_index,
int frame,
int field);

ufoProcessReleaseRasterInAtFrame(

ufoProcess process_instance,

int input_index,
int frame,
int field);

ufoProcessGetRasterInAtFrame returns a handle to a ufoRaster instance for a specified frame and field.

The field argument is only relevant during field rendering in which case it should be set to 1 or 2. ufoProcessGetRasterInAtFrame returns the raster for an input at the specified frame (and field). The function includes a field argument which is used when field rendering (see [#Rag79712 ufoProcessFieldRendering]).

Each call to ufoProcessGetRasterInAtFrame with a unique frame (and field) will lock a raster in memory by the application memory manager until ufoProcessReleaseRasterInAtFrame is subsequently called with that frame (and field). It is very important to use this function to unlock memory from the memory manager and not keep many frames locked in memory simultaneously. If you don't call ufoProcessReleaseRasterInAtFrame then all accessed frame rasters will remain locked until after the UFO process has finished rendering at that frame.

Temporal access only works if the input is connected directly to a clip. [#Rag18134 ufoProcessIsRasterInTemporal] can be used to test this.

The raster handle returned by can be passed in calls to raster functions that take a ufoRaster handle as their first argument. These are functions to set and get pixel values, to inquire raster attributes and buffer pointers, and for raster copying.

ufoProcessGetRasterInAtFrame and ufoProcessReleaseRasterInAtFrame may be called within ufoProcessRenderPixel, ufoProcessRenderLine, ufoProcessRenderRectangle, ufoProcessPreRender, ufoProcessPostRender, ufoProcessPreRenderPass, and ufoProcessPostRenderPass.

ufoProcessReleaseRasterInAtFrame

Related Functions: ufoProcessGetRasterInAtFrame

ufoRaster ufoProcessGetRasterInAtFrame(

ufoProcess process_instance,

int input_index,
int frame,
int field);

ufoProcessReleaseRasterInAtFrame(

ufoProcess process_instance,

int input_index,
int frame,
int field);

ufoProcessGetRasterInAtFrame returns a handle to a ufoRaster instance for a specified frame and field.

The field argument is only relevant during field rendering in which case it should be set to 1 or 2. ufoProcessGetRasterInAtFrame returns the raster for an input at the specified frame (and field). The function includes a field argument which is used when field rendering (see [#Rag79712 ufoProcessFieldRendering]).

Each call to ufoProcessGetRasterInAtFrame with a unique frame (and field) will lock a raster in memory by the application memory manager until ufoProcessReleaseRasterInAtFrame is subsequently called with that frame (and field). It is very important to use this function to unlock memory from the memory manager and not keep many frames locked in memory simultaneously. If you don't call ufoProcessReleaseRasterInAtFrame then all accessed frame rasters will remain locked until after the UFO process has finished rendering at that frame.

Temporal access only works if the input is connected directly to a clip. [#Rag18134 ufoProcessIsRasterInTemporal] can be used to test this.

The raster handle returned by can be passed in calls to raster functions that take a ufoRaster handle as their first argument. These are functions to set and get pixel values, to inquire raster attributes and buffer pointers, and for raster copying.

ufoProcessGetRasterInAtFrame and ufoProcessReleaseRasterInAtFrame may be called within ufoProcessRenderPixel, ufoProcessRenderLine, ufoProcessRenderRectangle, ufoProcessPreRender, ufoProcessPostRender, ufoProcessPreRenderPass, and ufoProcessPostRenderPass.

ufoProcessIsRasterInTemporal

int ufoProcessIsRasterInTemporal(
   ufoProcess process_instance,
   int input_index);

Returns whether a UFO process raster input can be temporally accessed. For more information, see [#Rag59548 ufoProcessGetRasterInAtFrame], [#Rag52578 ufoProcessReleaseRasterInAtFrame].

ufoProcessIsRasterInTemporal may be called within ufoProcessRenderPixel, ufoProcessRenderLine, ufoProcessRenderRectangle, ufoProcessPreRender, ufoProcessPostRender, ufoProcessPreRenderPass, ufoProcessPostRenderPass, ufoProcessCanAvoidRendering or from within any editor user function or event function in the editor GUI.

ufoProcessGetRasterInTemporalLimits

void ufoProcessGetRasterInTemporalLimits(
   ufoProcess process_instance,
   int input_index,
   int * first_frame,
   int * last_frame);

Returns the frame limits available for temporal access on an inputs.

ufoProcessGetRasterInTemporalLimits may be called within ufoProcessRenderPixel, ufoProcessRenderLine, ufoProcessRenderRectangle, ufoProcessPreRender, ufoProcessPostRender, ufoProcessPreRenderPass, ufoProcessPostRenderPass, ufoProcessCanAvoidRendering, or from within any editor user function or event function in the editor GUI.

ufoProcessHandleOwnProtection

void ufoProcessHandleOwnProtection(
   ufoProcess process_instance);

Sets the UFO process to handle its own obey matte protection, bypassing Media Illusion's internal obey matte functionality.

ufoProcessHandleOwnProtection may be called within ufoProcessDefine.

ufoProcessIsObeyMatteDefined

int ufoProcessIsObeyMatteDefined(
   ufoProcess process_instance);

ufoProcesslsObeyMatteDefined inquires if an optional obey matte raster is connected and set, and may be called within ufoProcessRenderPixel, ufoProcessRenderLine, ufoProcessRenderRectangle, ufoProcessCanAvoidRendering, ufoProcessPreRender, ufoProcessPostRender, ufoProcessPreRenderPass, ufoProcessPostRenderPass, ufoProcessCalcDefinedRectangle, ufoProcessCalcNeedRectangles, ufoProcessCalcDefinedPixelTypes, and ufoProcessSpecifyConvertPixelTypes.

ufoProcessIsObeyMatteReversed

int ufoProcessIsObeyMatteReversed(
   ufoProcess process_instance);

ufoProcessIsObeyMatteReversed inquires if an optional obey matte is reversed, and may be called within ufoProcessRenderPixel, ufoProcessRenderLine, ufoProcessRenderRectangle, ufoProcessCanAvoidRendering, ufoProcessPreRender, ufoProcessPostRender, ufoProcessPreRenderPass, ufoProcessPostRenderPass, ufoProcessCalcDefinedRectangle, ufoProcessCalcNeedRectangles, ufoProcessCalcDefinedPixelTypes, and ufoProcessSpecifyConvertPixelTypes.

ufoProcessIsObeyMatteDirty

int ufoProcessIsObeyMatteDirty(
   ufoProcess process_instance);

ufoProcessIsObeyMatteDirty inquires if the obey matte raster input is dirty.

An input is not dirty if it has not changed since the last render and its dirty status was reset with ufoProcessResetObeyMatteDirty.

A value of 1 is returned if the obey matte raster is dirty or 0 if it is not dirty.

May be called within ufoProcessRenderPixel, ufoProcessRenderLine, ufoProcessRenderRectangle, ufoProcessCanAvoidRendering, ufoProcessPreRender, ufoProcessPostRender, ufoProcessPreRenderPass, ufoProcessPostRenderPass, ufoProcessCalcDefinedRectangle, and ufoProcessCalcNeedRectangles.

ufoProcessResetObeyMatteDirty

void ufoProcessResetObeyMatteDirty(
   ufoProcess process_instance);

ufoProcessResetObeyMatteDirty resets the dirty status of obey matte raster, and may be called within ufoProcessRenderPixel, ufoProcessRenderLine, ufoProcessRenderRectangle, ufoProcessCanAvoidRendering, ufoProcessPreRender, ufoProcessPostRender, ufoProcessPreRenderPass, ufoProcessPostRenderPass, ufoProcessCalcDefinedRectangle, ufoProcessCalcNeedRectangles, ufoProcessCalcDefinedPixelTypes, and ufoProcessSpecifyConvertPixelTypes.

ufoProcessParamDefine

void ufoProcessParamDefine(
   ufoProcess process_instance,
   int param_index,
   int group_index,
   char *id,
   char *name,
   ufoParamType type);

Refer to the following table for command descriptions:


Command

Description

param_index

index (0..number_parameters-1) of parameter

group_index

index (0..number_parameter_groups) of parameter’s group

id

unique (within process) id of parameter with no spaces

name

user interface title of parameter

type

parameter type

ufoParamType
ufoBooleanParam

true/false on/off

ufoIntegerParam

integer

ufoFloatParam

floating point

ufoNormalisedParam

floating point normalized (0..1)

ufoAngleParam

floating point angle

ufoColourRGBParam

RGB colour

ufoColourCMYParam

CMY colour

ufoColourHSVParam

HSV colour

ufoColourHLSParam

HLS colour

ufoRectangleParam

floating point rectangle

ufoPos3dParam

floating point 3D position

ufoScale3dParam

floating point 3D scale

ufoPos2dParam

floating point 2D position

ufoScale2dParam

floating point 2D scale

ufoStringParam

character string


ufoProcessParamDefine defines one of (0..number_parameters) parameters set in ufoProcessCreate.

ufoProcessParamDefine must be called within ufoProcessDefine for each parameter, except for parameters which are of the type ufoEnumParam, which has a special define function, ufoProcessEnumParamDefine.

ufoProcessEnumParamDefine

void ufoProcessEnumParamDefine(
   ufoProcess process_instance,
   int param_index,
   int group_index,
   char *id,
   char *name,
   int number_values,
   char** enum_value_text);

Refer to the following table for command descriptions:


Command

Description

param_index

index (0..number_parameters-1) of parameter

group_index

index (0..number_parameter_groups) of parameter’s group

id

unique (within process) id of parameter with no spaces

name

user interface title of parameter

number_values

number of values in the enumeration

num_value_text

array of (null terminated) strings representing enumeration values


ufoProcessEnumParamDefine defines an enumerated parameter, one of (0..number_parameters) parameters set in ufoProcessCreate.

ufoProcessEnumParamDefine must be called within ufoProcessDefine for each ufoEnumParam type parameter.

ufoProcessParamDefine must be called within ufoProcessDefine for each parameter, except for parameters which are of the type ufoEnumParam, which has a special define function, ufoProcessEnumParamDefine.

ufoProcessParamGroupDefine

void ufoProcessParamGroupDefine(
   ufoProcess process_instance,
   int group_index,
   char *id,
   char *name);

Refer to the following table for command descriptions:


Command

Description

group_index

index (0..number_parameter_groups) of parameter group

id

unique (within process) ID of parameter group with no spaces

name

user interface title of parameter group


ufoProcessParamGropDefine defines a parameter group, one of (0..number_parameter_groups) parameter groups set in ufoProcessCreate.

ufoProcessParamGroupDefine must be called within ufoProcessDefine for each parameter group.

ufoProcessSetParamAnimAllow

void ufoProcessSetParamAnimAllow(
   ufoProcess process_instance,
   int param_index,
   int anim_allow);

Refer to the following table for command descriptions:


Command

Description

param_index

index (0..number_parameters-1) of parameter

anim_allow

1: allow animation (default), 0: do not


ufoProcessSetParamAnimAllow allows or disallows parameter animation, and may be called within ufoProcessDefine after ufoProcessParamDefine.

ufoProcessSetParamAutoTransition

void ufoProcessSetParamAutoTransition(
   ufoProcess process_instance,
   int param_index,
   int auto_transition);

Refer to the following table for command descriptions:


Command

Description

param_index

index (0..number_parameters-1) of parameter

auto_transition

1: auto transition on, 0: off (default)


ufoProcessSetParamAutoTransition automatically fits default parameter animation to a transition period when it is first used. Thereafter, the animation will have to be manually adjusted. This only works if the parameter has at least two keys set in its default values.

ufoProcessSetParamAutoTransition may be called within ufoProcessDefine after ufoProcessParamDefine.

ufoProcessSetParamLimits

void ufoProcessSetParamLimits(
   ufoProcess process_instance,
   int param_index,
   ufoChannelIndex channel_index,
   double minimum,
   double maximum,
   ufoLimits Clamp clamp_flags);

Refer to the following table for command descriptions:


Command

Description

param_index

index (0..number_parameters-1) of parameter

channel_index

index of channel to which limits will be applied (usually 0)

minimum

lower limit

maximum

upper limit

clamp_flags

sets clamping on lower or upper limits

ufoChannelIndex

see ufoTypes.h for complete set of definitions for channel indices

ufoLimitsClamp
ufoLimitsClampNone

no clamping

ufoLimitsClampMin

clamp lower limit only

ufoLimitsClampMax

clamp upper limit only

ufoLimitsClampBoth

clamp both limits


ufoProcessSetParamLimits sets limits and clamping for a parameter. This function should be called for parameters of types ufoIntegerParam, ufoFloatParam, ufoAngleParam, ufoRectangleParam, ufoPos3dParam, ufoScale3dParam, ufoPos2dParam, and ufoScale2dParam, where limits must be defined for user interface purposes. clamp_flags can be set to optionally clamp or not clamp values when they are inquired.

ufoProcessSetParamLimits maybe called within ufoProcessDefine after ufoProcessParamDefine.

ufoProcessSetParamColumnHint

void ufoProcessSetParamColumnHint(
   ufoProcess process_instance,
   int param_index,
   int column);

Refer to the following table for command descriptions:


Command

Description

param_index

index (0..number_parameters-1) of parameter

column

preferred column


ufoProcessSetParamAnimAllow will hint to the host application the column in which the standard editor for the parameter should be built. This hint may be ignored.

ufoProcessSetParamAnimAllow may be called within ufoProcessDefine after ufoProcessParamDefine.

ufoProcessSetParamGang

void ufoProcessSetParamGang(
   ufoProcess process_instance,
   int param_index,
   int number_params);

Refer to the following table for command descriptions:


Command

Description

param_index

index (0..number_parameters-1) of parameter

number_params

number of parameters to gang


ufoProcessSetParamGangLabel

void ufoProcessSetParamGangLabel(
   ufoProcess process_instance,
   int param_index,
   char * label);

ufoProcessSetParamGang will gang certain types of parameters together. The number of ganged parameters is defined by number_params and start from param_index. The supported types are: ufoIntegerParam, ufoFloatParam, ufoNormalisedParam, and ufoAngleParam. Ganged parameters have an extra control to allow all the sliders to be moved simultaneously, such that when the gang control is switched on and any one ganged parameter is changed, then all ganged parameters are changed by the same amount.

ufoProcessSetParamGangLabel sets a collective title for the ganged parameters starting at param_index.

ufoProcessSetParamGang and ufoProcessSetParamGangLabel may be called within ufoProcessDefine after ufoProcessParamDefine.

ufoProcessHideParam

void ufoProcessHideParam(
   ufoProcess process_instance,
   int param_index);

void ufoProcessShowParam(
   ufoProcess process_instance,
   int param_index);

Refer to the following table for command descriptions:


Command

Description

param_index

index (0..number_parameters-1) of parameter


ufoProcessSetHideParam and ufoProcessShowParam can be used to hide or show parameters within the application interface, and may be called within ufoProcessDefine after ufoProcessParamDefine, or from within any editor user function or event function in the editor GUI.

ufoProcessShowParam

void ufoProcessHideParam(
   ufoProcess process_instance,
   int param_index);

void ufoProcessShowParam(
   ufoProcess process_instance,
   int param_index);

Refer to the following table for command descriptions:


Command

Description

param_index

index (0..number_parameters-1) of parameter


ufoProcessSetHideParam and ufoProcessShowParam can be used to hide or show parameters within the application interface, and may be called within ufoProcessDefine after ufoProcessParamDefine, or from within any editor user function or event function in the editor GUI.

ufoProcessSetParamDefaultValue

void ufoProcessSetParamDefaultValue(
   ufoProcess process_instance,
   int param_index,
   ufoChannelIndex channel_index,
   double value);

Refer to the following table for command descriptions:


Command

Description

param_index

index (0..number_parameters-1) of parameter

channel_index

index of channel to which default value will be applied usually 0)

value

default value

ufoChannelIndex

see ufoTypes.h for complete set of definitions for channel indices


ufoProcessSetParamDefaultValues

void ufoProcessSetParamDefaultValues(
   ufoProcess process_instance,
   int param_index,
   double values[]);

Refer to the following table for command descriptions:


Command

Description

param_index

index (0..number_parameters-1) of parameter

values

default values for all parameter channels


ufoProcessSetParamDefaultValue(s) and ufoProcessSetStringParamDefaultValue set multiple default values for parameters.

ufoProcessSetParamDefaultValue(s) and ufoProcessSetStringParamDefaultValue should be called within ufoProcessDefine after ufoProcessParamDefine.

ufoProcessSetStringParamDefaultValue

void ufoProcessSetStringParamDefaultValue(
   ufoProcess process_instance,
   int param_index,
   const char * string);

Refer to the following table for command descriptions:


Command

Description

param_index

index (0..number_parameters-1) of parameter

string

default string value


ufoProcessSetParamDefaultValue(s) and ufoProcessSetStringParamDefaultValue set multiple default values for parameters.

ufoProcessSetParamDefaultValue(s) and ufoProcessSetStringParamDefaultValue should be called within ufoProcessDefine after ufoProcessParamDefine.

ufoProcessSetParamDefaultKey

Related Functions: ufoProcessSetParamDefaultKeys, ufoProcessSetStringParamDefaultKey

void ufoProcessSetParamDefaultKey(
   ufoProcess process_instance,
   int param_index,
   ufoChannelIndex channel_index,
   double value,
   double time);

Refer to the following table for command descriptions:


Command

Description

param_index

index (0..number_parameters-1) of parameter

channel_index

index of channel to which default key value will be applied (usually 0)

value

default key value

time

key time

ufoChannelIndex

see ufoTypes.h for complete set of definitions for channel indices


ufoProcessSetParamDefaultKey(s) and ufoProcessSetStringParamDefaultKey set multiple default key values for parameters which have more than one channel.

ufoProcessSetParamDefaultKey(s) and ufoProcessSetStringParamDefaultKey should be called within ufoProcessDefine after ufoProcessParamDefine.

ufoProcessSetParamDefaultKeys

Related Functions: ufoProcessSetParamDefaultKey, ufoProcessSetStringParamDefaultKey

void ufoProcessSetParamDefaultKeys(
   ufoProcess process_instance,
   int param_index,
   double values[],
   double time);

Refer to the following table for command descriptions:


Command

Description

param_index

index (0..number_parameters-1) of parameter

values

key values for all parameter channels

time

key time


ufoProcessSetParamDefaultKey(s) and ufoProcessSetStringParamDefaultKey set multiple default key values for parameters which have more than one channel.

ufoProcessSetParamDefaultKey(s) and ufoProcessSetStringParamDefaultKey should be called within ufoProcessDefine after ufoProcessParamDefine.

ufoProcessSetStringParamDefaultKey

Related Functions: ufoProcessSetParamDefaultKey, ufoProcessSetParamDefaultKeys

void ufoProcessSetStringParamDefaultKey(
   ufoProcess process_instance,
   int param_index,
   const char * string,
   double time);

Refer to the following table for command descriptions:


Command

Description

param_index

index (0..number_parameters-1) of parameter

string

default string key value

time

key time


ufoProcessSetParamDefaultKey(s) and ufoProcessSetStringParamDefaultKey set multiple default key values for parameters which have more than one channel.

ufoProcessSetParamDefaultKey(s) and ufoProcessSetStringParamDefaultKey should be called within ufoProcessDefine after ufoProcessParamDefine.

ufoProcessGetParamValue

Related Functions: ufoProcessGetParamValues, ufoProcessGetStringParamValue

double ufoProcessGetParamValue(
   ufoProcess process_instance,
   int param_index,
   ufoChannelIndex channel_index);

Refer to the following table for command descriptions:


Command

Description

param_index

index (0..number_parameters-1) of parameter

channel_index

index of channel from which current value will be returned (usually 0)

ufoChannelIndex

see ufoTypes.h for complete set of definitions for channel indices


Get parameter values(s) at the current time. Use ufoProcessGetParamValues for getting multiple values for parameters which have more than one channel. Use ufoProcessGetStringParamValue to get the current value of a ufoStringParam parameter, and returns a character string allocated with malloc which the UFO has the responsibility to free.

ufoProcessGetParamValue(s) and ufoProcessGetStringParamValue may be called within ufoProcessRenderPixel, ufoProcessRenderLine, ufoProcessRenderRectangle, ufoProcessCanAvoidRendering, ufoProcessPreRender, ufoProcessPostRender, ufoProcessPreRenderPass, ufoProcessPostRenderPass, ufoProcessCalcDefinedRectangle, ufoProcessCalcNeedRectangles, ufoProcessCalcDefinedPixelTypes, ufoProcessSpecifyConvertPixelTypes, and from within any editor user function or event function in the editor GUI.

ufoProcessGetParamValues

Related Functions: ufoProcessGetParamValue, ufoProcessGetStringParamValue

void ufoProcessGetParamValues(
   ufoProcess process_instance,
   int param_index,
   double values[]);

Refer to the following table for command descriptions:


Command

Description

param_index

index (0..number_parameters-1) of parameter

values

returned current values for all parameter channels


char * ufoProcessGetStringParamValue(
   ufoProcess process_instance,
   int param_index);

Refer to the following table for command descriptions:


Command

Description

param_index

index (0..number_parameters-1) of parameter


Get parameter values(s) at the current time. Use ufoProcessGetParamValues for getting multiple values for parameters which have more than one channel. Use ufoProcessGetStringParamValue to get the current value of a ufoStringParam parameter, and returns a character string allocated with malloc which the UFO has the responsibility to free.

ufoProcessGetParamValue(s) and ufoProcessGetStringParamValue may be called within ufoProcessRenderPixel, ufoProcessRenderLine, ufoProcessRenderRectangle, ufoProcessCanAvoidRendering, ufoProcessPreRender, ufoProcessPostRender, ufoProcessPreRenderPass, ufoProcessPostRenderPass, ufoProcessCalcDefinedRectangle, ufoProcessCalcNeedRectangles, ufoProcessCalcDefinedPixelTypes, ufoProcessSpecifyConvertPixelTypes, and from within any editor user function or event function in the editor GUI.

ufoProcessGetStringParamValue

Related Functions: ufoProcessGetParamValue, ufoProcessGetParamValues

char * ufoProcessGetStringParamValue(
   ufoProcess process_instance,
   int param_index);

Refer to the following table for command descriptions:


Command

Description

param_index

index (0..number_parameters-1) of parameter


Get parameter values(s) at the current time. Use ufoProcessGetParamValues for getting multiple values for parameters which have more than one channel. Use ufoProcessGetStringParamValue to get the current value of a ufoStringParam parameter, and returns a character string allocated with malloc which the UFO has the responsibility to free.

ufoProcessGetParamValue(s) and ufoProcessGetStringParamValue may be called within ufoProcessRenderPixel, ufoProcessRenderLine, ufoProcessRenderRectangle, ufoProcessCanAvoidRendering, ufoProcessPreRender, ufoProcessPostRender, ufoProcessPreRenderPass, ufoProcessPostRenderPass, ufoProcessCalcDefinedRectangle, ufoProcessCalcNeedRectangles, ufoProcessCalcDefinedPixelTypes, ufoProcessSpecifyConvertPixelTypes, and from within any editor user function or event function in the editor GUI.

ufoProcessGetParamValueAtTime

Related Functions: ufoProcessGetParamValuesAtTime, ufoProcessGetStringParamValueAtTime

double ufoProcessGetParamValueAtTime(
   ufoProcess process_instance,
   int param_index,
   ufoChannelIndex channel_index,
   double time);

Refer to the following table for command descriptions:


Command

Description

param_index

index (0..number_parameters-1) of parameter

channel_index

index of channel from which current value will be returned (usually 0)

time

time at which to evaluate value

ufoChannelIndex

see ufoTypes.h for complete set of definitions for channel indices


ufoProcessGetParamValue(s)AtTime gets parameter values(s) at a specified time. Use ufoProcessGetParamValuesAtTime for getting multiple values for parameters which have more than one channel. Use ufoProcessGetStringParamValueAtTime to get the value of a ufoStringParam parameter at a specified time, and returns a character string allocated with malloc which the UFO has the responsibility to free.

ufoProcessGetParamValue(s)AtTime may be called within ufoProcessRenderPixel, ufoProcessRenderLine, ufoProcessRenderRectangle, ufoProcessCanAvoidRendering, ufoProcessPreRender, ufoProcessPostRender, ufoProcessPreRenderPass, ufoProcessPostRenderPass, ufoProcessCalcDefinedRectangle, ufoProcessCalcNeedRectangles, ufoProcessCalcDefinedPixelTypes, ufoProcessSpecifyConvertPixelTypes, and from within any editor user function or event function in the editor GUI.

ufoProcessGetParamValuesAtTime

Related Functions: ufoProcessGetParamValueAtTime, ufoProcessGetStringParamValueAtTime

void ufoProcessGetParamValuesAtTime(
   ufoProcess process_instance,
   int param_index,
   double values[],
   double time);

Refer to the following table for command descriptions:


Command

Description

param_index

index (0..number_parameters-1) of parameter

values

returned current values for all parameter channels

time

time at which to interpolate values


ufoProcessGetParamValue(s)AtTime gets parameter values(s) at a specified time. Use ufoProcessGetParamValuesAtTime for getting multiple values for parameters which have more than one channel. Use ufoProcessGetStringParamValueAtTime to get the value of a ufoStringParam parameter at a specified time, and returns a character string allocated with malloc which the UFO has the responsibility to free.

ufoProcessGetParamValue(s)AtTime may be called within ufoProcessRenderPixel, ufoProcessRenderLine, ufoProcessRenderRectangle, ufoProcessCanAvoidRendering, ufoProcessPreRender, ufoProcessPostRender, ufoProcessPreRenderPass, ufoProcessPostRenderPass, ufoProcessCalcDefinedRectangle, ufoProcessCalcNeedRectangles, ufoProcessCalcDefinedPixelTypes, ufoProcessSpecifyConvertPixelTypes, and from within any editor user function or event function in the editor GUI.

ufoProcessGetStringParamValueAtTime

Related Functions: ufoProcessGetParamValueAtTime, ufoProcessGetParamValuesAtTime

char * ufoProcessGetStringParamValueAtTime(
   ufoProcess process_instance,
   int param_index,
   double time);

Refer to the following table for command descriptions:


Command

Description

param_index

index (0..number_parameters-1) of parameter

time

time at which to evaluate value


ufoProcessGetParamValue(s)AtTime gets parameter values(s) at a specified time. Use ufoProcessGetParamValuesAtTime for getting multiple values for parameters which have more than one channel. Use ufoProcessGetStringParamValueAtTime to get the value of a ufoStringParam parameter at a specified time, and returns a character string allocated with malloc which the UFO has the responsibility to free.

ufoProcessGetParamValue(s)AtTime may be called within ufoProcessRenderPixel, ufoProcessRenderLine, ufoProcessRenderRectangle, ufoProcessCanAvoidRendering, ufoProcessPreRender, ufoProcessPostRender, ufoProcessPreRenderPass, ufoProcessPostRenderPass, ufoProcessCalcDefinedRectangle, ufoProcessCalcNeedRectangles, ufoProcessCalcDefinedPixelTypes, ufoProcessSpecifyConvertPixelTypes, and from within any editor user function or event function in the editor GUI.

ufoProcessSetParamValue

Related Functions: ufoProcessSetParamValues, ufoProcessSetStringParamValue

void ufoProcessSetParamValue(
   ufoProcess process_instance,
   int param_index,
   ufoChannelIndex channel_index,
   double value);

Refer to the following table for command descriptions:


Command

Description

param_index

index (0...number_parameters-1) of parameter


ufoProcessSetParamValue(s) and ufoProcessSetStringParamValue set animation key values for a parameter at the current time.

ufoProcessSetParamValue(s) and ufoProcessSetStringParamValue may be called within ufoEditorMouseDown(), ufoEditorMouseUp(), ufoEditorMouseDrag(), ufoEditorMousePosition(), ufoEditorKeyEvent(), or from within any event function in the UFO editor GUI.

ufoProcessSetParamValues

Related Functions: ufoProcessSetParamValue, ufoProcessSetStringParamValue

void ufoProcessSetParamValues(
   ufoProcess process_instance,
   int param_index,
   double value[]);

Refer to the following table for command descriptions:


Command

Description

param_index

index (0...number_parameters-1) of parameter


ufoProcessSetParamValue(s) and ufoProcessSetStringParamValue set animation key values for a parameter at the current time.

ufoProcessSetParamValue(s) and ufoProcessSetStringParamValue may be called within ufoEditorMouseDown(), ufoEditorMouseUp(), ufoEditorMouseDrag(), ufoEditorMousePosition(), ufoEditorKeyEvent(), or from within any event function in the UFO editor GUI.

ufoProcessSetStringParamValue

Related Functions: ufoProcessSetParamValue, ufoProcessSetParamValues

void ufoProcessSetStringParamValue(
   ufoProcess process_instance,
   int param_index,
   const char * string);

Refer to the following table for command descriptions:


Command

Description

param_index

index (0...number_parameters-1) of parameter


ufoProcessSetParamValue(s) and ufoProcessSetStringParamValue set animation key values for a parameter at the current time.

ufoProcessSetParamValue(s) and ufoProcessSetStringParamValue may be called within ufoEditorMouseDown(), ufoEditorMouseUp(), ufoEditorMouseDrag(), ufoEditorMousePosition(), ufoEditorKeyEvent(), or from within any event function in the UFO editor GUI.

ufoProcessSetParamKey

Related Functions: ufoProcessSetParamKeys, ufoProcessSetStringParamKey

void ufoProcessSetParamKey(
   ufoProcess process_instance,
   int param_index,
   ufoChannelIndex channel_index,
   double value,
   double time);

Refer to the following table for command descriptions:


Command

Description

param_index

index (0...number_parameters-1) of parameter

channel_index

index of channel to which key value will be applied (usually 0)

value

key value

time

key time


ufoProcessSetParamKey(s) and ufoProcessSetStringParamKey set animation key values for a parameter.

ufoProcessSetParamKeys

Related Functions: ufoProcessSetParamKey, ufoProcessSetStringParamKey

void ufoProcessSetParamKeys(
   ufoProcess process_instance,
   int param_index,
   double values(),
   double time);

Refer to the following table for command descriptions:


Command

Description

param_index

index (0...number_parameters-1) of parameter

values

key values for all parameter channels

time

key time


ufoProcessSetParamKey(s) and ufoProcessSetStringParamKey set animation key values for a parameter.

ufoProcessSetParamKeys may be called within ufoEditorMouseDown(), ufoEditorMouseUp(), ufoEditorMouseDrag(), ufoEditorMousePosition(), ufoEditorKeyEvent(), or from within any event function in the UFO editor GUI.

ufoProcessSetStringParamKey

Related Functions: ufoProcessSetParamKey, ufoProcessSetParamKeys

void ufoProcessSetStringParamKey(
   ufoProcess process_instance,
   int param_index,
   const char * value,
   double time);

Refer to the following table for command descriptions:


Command

Description

param_index

index (0...number_parameters-1) of parameter

string

string key value

time

key time


ufoProcessSetParamKey(s) and ufoProcessSetStringParamKey set animation key values for a parameter.

ufoProcessIsParamSet

int ufoProcessIsParamSet(
   ufoProcess process_instance,
   int param_index);

Refer to the following table for command descriptions:


Command

Description

param_index

index (0..number_parameters-1) of parameter


ufoProcesslsParamSet returns whether a parameter has been set since default initialization.

ufoProcesslsParamSetmay be called within ufoProcessRenderPixel, ufoProcessRenderLine, ufoProcessRenderRectangle, ufoProcessCanAvoidRendering, ufoProcessPreRender, ufoProcessPostRender, ufoProcessPreRenderPass, ufoProcessPostRenderPass, ufoProcessCalcDefinedRectangle, ufoProcessCalcNeedRectangles, ufoProcessCalcDefinedPixelTypes, ufoProcessSpecifyConvertPixelTypes, and from within any editor user function or event function in the editor GUI.

ufoProcessGetParamMinMaxKeyTime

void ufoProcessGetParamMinMaxKeyTime(
   ufoProcess process_instance,
   int param_index,
   double * min_time,
   double * max_time);

void ufoProcessGetChanMinMaxKeyTime(
   ufoProcess process_instance,
   int param_index,
   ufoChannelIndex channel_index,
   double * min_time,
   double * max_time);

Refer to the following table for command descriptions:


Command

Description

param_index

index (0..number_parameters-1) of parameter

channel_index

index of channel


ufoProcessGetParamMinMaxKeyTime and ufoProcessGetChanMinMaxKeyTime return the frame times of the minimum and maximum keys for the parameter or channel in time, respectively.

May be called within ufoProcessRenderPixel, ufoProcessRenderLine, ufoProcessRenderRectangle, ufoProcessCanAvoidRendering, ufoProcessPreRender, ufoProcessPostRender, ufoProcessPreRenderPass, ufoProcessPostRenderPass, ufoProcessCalcDefinedRectangle, ufoProcessCalcNeedRectangles, ufoProcessCalcDefinedPixelTypes, ufoProcessSpecifyConvertPixelTypes, and from within any editor user function or event function in the editor GUI.

ufoProcessGetChanMinMaxKeyTime

void ufoProcessGetParamMinMaxKeyTime(
   ufoProcess process_instance,
   int param_index,
   double * min_time,
   double * max_time);

void ufoProcessGetChanMinMaxKeyTime(
   ufoProcess process_instance,
   int param_index,
   ufoChannelIndex channel_index,
   double * min_time,
   double * max_time);

Refer to the following table for command descriptions:


Command

Description

param_index

index (0..number_parameters-1) of parameter

channel_index

index of channel


ufoProcessGetParamMinMaxKeyTime and ufoProcessGetChanMinMaxKeyTime return the frame times of the minimum and maximum keys for the parameter or channel in time, respectively.

May be called within ufoProcessRenderPixel, ufoProcessRenderLine, ufoProcessRenderRectangle, ufoProcessCanAvoidRendering, ufoProcessPreRender, ufoProcessPostRender, ufoProcessPreRenderPass, ufoProcessPostRenderPass, ufoProcessCalcDefinedRectangle, ufoProcessCalcNeedRectangles, ufoProcessCalcDefinedPixelTypes, ufoProcessSpecifyConvertPixelTypes, and from within any editor user function or event function in the editor GUI.

ufoProcessSetUserData

void ufoProcessSetUserData(
   ufoProcess process_instance,
   void *user_data);

ufoProcessSetUserData sets user data to be associated with this instance of the process.

User data may be set to null.

If user data is set and is required to be copied when copies are made of the process, then you should supply ufoProcessCopyUserData. If user data should be tidied when the process is put away, you should supply the ufoProcessDeleteUserData user function.

ufoProcessSetUserData may be called within any user function.

ufoProcessGetUserData

void* ufoProcessGetUserData(
   ufoProcess process_instance);

ufoProcessGetUserData returns user data previously set with ufoProcessSetUserData for this process instance. Returns null if no user data is currently set.

ufoProcessGetRenderMode

ufoRenderMode ufoProcessGetRenderMode(
   ufoProcess process_instance);

Refer to the following table for command descriptions:


Command

Description

ufoRenderMode
ufoPreviewFrame

single frame interactive-editing preview

ufoPreviewSequence

sequence preview

ufoFullFrame

single frame full render, no render scaling

ufoFullSequence

sequence full render, no render scaling


ufoProcessGetRenderMode returns the current render mode. This can be either preview and full, or single and sequence.

ufoProcessGetRenderMode is useful for ignoring parameters in a full render which control accelerated methods used in editing or previewing.

ufoProcessGetRenderMode may be called within ufoProcessRenderPixel, ufoProcessRenderLine, ufoProcessRenderRectangle, ufoProcessCanAvoidRendering, ufoProcessPreRender, ufoProcessPostRender, ufoProcessPreRenderPass, ufoProcessPostRenderPass, ufoProcessCalcDefinedRectangle, ufoProcessCalcNeedRectangles, ufoProcessCalcDefinedPixelTypes, ufoProcessSpecifyConvertPixelTypes, and from within any editor user function or event function in the editor GUI.

ufoProcessGetRenderScale

void ufoProcessGetRenderScale(
   ufoProcess process_instance,
   double *x_scale,
   double *y_scale);

Refer to the following table for command descriptions:


Command

Description

x_scale

x scale of current render (x_scale <= 1)

y_scale

y scale of current render (y_scale <= 1)


ufoProcessGetRenderScale returns the X and Y scale of the current render and may be called within ufoProcessRenderPixel, ufoProcessRenderLine, ufoProcessRenderRectangle, ufoProcessCanAvoidRendering, ufoProcessPreRender, ufoProcessPostRender, ufoProcessPreRenderPass, ufoProcessPostRenderPass, ufoProcessCalcDefinedRectangle, ufoProcessCalcNeedRectangles, ufoProcessCalcDefinedPixelTypes, ufoProcessSpecifyConvertPixelTypes, and from within any editor user function or event function in the editor GUI.

ufoProcessGetAspectRatioCorrection

double ufoProcessGetAspectRatioCorrection(
   ufoProcess process_instance);

ufoProcessGetAspectRatioCorrection returns the aspect ratio correction factor to be applied during rendering.

The value to be returned is the scale to be applied to the X pixel dimension in order to display it with the correct aspect. For example, if a PAL 720x576 image is to be displayed at 16:9, then the aspect ratio correction returned will be (576/720)*(16/9) = 1.42222.

Any effects involving transformations, such as rotation will need to take this aspect ratio into account in order to appear correctly when displayed in the final aspect ratio.

ufoProcessGetAspectRatioCorrection may be called within ufoProcessRenderPixel, ufoProcessRenderLine, ufoProcessRenderRectangle, ufoProcessCanAvoidRendering, ufoProcessPreRender, ufoProcessPostRender, ufoProcessPreRenderPass, ufoProcessPostRenderPass, ufoProcessCalcDefinedRectangle, ufoProcessCalcNeedRectangles, ufoProcessCalcDefinedPixelTypes, ufoProcessSpecifyConvertPixelTypes, and from within any editor user function or event function in the editor GUI.

ufoProcessGetRenderPass

int ufoProcessGetRenderPass(
   ufoProcess process_instance);

ufoProcessGetRenderPass returns the current render pass, and may be called within ufoProcessRenderPixel, ufoProcessRenderLine, ufoProcessRenderRectangle, ufoProcessPreRenderPass, and ufoProcessPostRenderPass.

ufoProcessGetMinEffectLimit

double ufoProcessGetMinEffectLimit(
   ufoProcess process_instance);

double ufoProcessGetMaxEffectLimit(
   ufoProcess process_instance);

ufoProcessGetMinEffectLimit and ufoProcessGetMaxEffectLimit return the current render effect start and end frame limits.

These return a double - but values will very likely always be integer.

ufoProcessGetMinEffectLimit and ufoProcessGetMaxEffectLimit may be called within ufoProcessRenderPixel, ufoProcessRenderLine, ufoProcessRenderRectangle,ufoProcessCanAvoidRendering, ufoProcessPreRenderPass, ufoProcessPostRenderPass, ufoProcessCalcDefinedRectangle, ufoProcessCalcNeedRectangles, ufoProcessCalcDefinedPixelTypes, and ufoProcessSpecifyConvertPixelType.

ufoProcessGetMaxEffectLimit

double ufoProcessGetMinEffectLimit(
   ufoProcess process_instance);

double ufoProcessGetMaxEffectLimit(
   ufoProcess process_instance);

ufoProcessGetMinEffectLimit and ufoProcessGetMaxEffectLimit return the current render effect start and end frame limits.

These return a double - but values will very likely always be integer.

ufoProcessGetMinEffectLimit and ufoProcessGetMaxEffectLimit may be called within ufoProcessRenderPixel, ufoProcessRenderLine, ufoProcessRenderRectangle,ufoProcessCanAvoidRendering, ufoProcessPreRenderPass, ufoProcessPostRenderPass, ufoProcessCalcDefinedRectangle, ufoProcessCalcNeedRectangles, ufoProcessCalcDefinedPixelTypes, and ufoProcessSpecifyConvertPixelType.

ufoProcessCheckAbort

int ufoProcessCheckAbort(
   ufoProcess process_instance);
   int percentage_render_done);

Refer to the following table for command descriptions:


Command

Description

percentage_render_done

amount of frame rendered

ufoProcessCheckAbort

returns 1: continue rendering, and 0: stop rendering


ufoProcessCheckAbort checks for the user interrupting processing. An estimate of the percentage of the render done is passed for display purposes.

This function should only be used within ufoProcessRenderRectangle and the UFO should be defined with the default tiling method turned off. For more information, see [#Rag40673 ufoProcessSetTilingAllow].

If the UFO is using multi-threading, then this should only be called from the parent thread with which ufoProcessRenderRectangle was called.

ufoProcessCheckAbort may be called within ufoProcessRenderRectangle.

ufoProcessGetTime

double ufoProcessGetTime(
   ufoProcess process_instance);

ufoProcessGetTime returns the current frame time.

The value returned is a double, but is probably always an integer or integer+0.5 aligned (in the case of field rendering).

ufoProcessGetTime may be called within ufoProcessRenderPixel, ufoProcessRenderLine, ufoProcessRenderRectangle, ufoProcessCanAvoidRendering, ufoProcessPreRender, ufoProcessPostRender, ufoProcessPreRenderPass, ufoProcessPostRenderPass, ufoProcessCalcDefinedRectangle, ufoProcessCalcNeedRectangles, ufoProcessCalcDefinedPixelTypes, ufoProcessSpecifyConvertPixelTypes, and from within any editor user function or event function in the editor GUI.

ufoProcessFieldRendering

int ufoProcessFieldRendering(
   ufoProcess process_instance);

ufoProcessFieldRendering returns whether the current render is in field or frame mode.If in field mode The full output should still be rendered. This function is mainly useful if you are using temporal frame access on your inputs in which case you may need to access inputs at field intervals.

ufoProcessFieldRendering may be called within ufoProcessRenderPixel, ufoProcessRenderLine, ufoProcessRenderRectangle, ufoProcessCanAvoidRendering, ufoProcessPreRender, ufoProcessPostRender, ufoProcessPreRenderPass, ufoProcessPostRenderPass, ufoProcessCalcDefinedRectangle, ufoProcessCalcNeedRectangles, ufoProcessCalcDefinedPixelTypes, and ufoProcessSpecifyConvertPixelTypes.

ufoProcessWhichField

int ufoProcessWhichField(
   ufoProcess process_instance);

ufoProcessWhichField returns a value of 1 or 2 if field rendering is on, otherwise, it returns a value of 0.

ufoProcessFieldRendering may be called within ufoProcessRenderPixel, ufoProcessRenderLine, ufoProcessRenderRectangle, ufoProcessCanAvoidRendering, ufoProcessPreRender, ufoProcessPostRender, ufoProcessPreRenderPass, ufoProcessPostRenderPass, ufoProcessCalcDefinedRectangle, ufoProcessCalcNeedRectangles, ufoProcessCalcDefinedPixelTypes, and ufoProcessSpecifyConvertPixelType.

ufoProcessGetDefinedRectangle

ufoRectangle ufoProcessGetDefinedRectangle(
   ufoProcess process_instance,
   int input_index);

ufoProcessGetDefinedRectangle gets the defined maximum rectangle for the raster that can be supplied to a specific process input, regardless of the actual size of rectangle supplied.

This will be the same rectangle which is supplied to the input_rectangles and needed_input_rectangle arguments of ufoProcessCalcDefinedRectangle and ufoProcessCalcNeedRectangles.

ufoProcessGetDefinedRectangle may be called within ufoProcessRenderPixel, ufoProcessRenderLine, ufoProcessRenderRectangle, ufoProcessCanAvoidRendering, ufoProcessPreRender, ufoProcessPostRender, ufoProcessPreRenderPass, ufoProcessPostRenderPass, ufoProcessCalcDefinedRectangle, and ufoProcessCalcNeedRectangles.

ufoProcessGetDefinedRectangle may be called within ufoProcessRenderPixel, ufoProcessRenderLine, ufoProcessRenderRectangle, ufoProcessPreRender, ufoProcessPostRender, ufoProcessPreRenderPass, and ufoProcessPostRenderPass.

ufoProcessGetFullRenderRectangle

void ufoProcessGetFullRenderRectangle(
   ufoProcess process_instance,
   int *x1,
   int *y1,
   int *x2,
   int *y2);

void ufoProcessGetFullRenderRectangleStruct(
   ufoProcess process_instance,
   ufoRectangle *rectangle);

Refer to the following table for command descriptions:


Command

Description

rectangle

rectangle structure into which values copied

ufoRectangle

structure defined in ufoTypes.h.


Returns the full rectangle resolution of the final target clip in the process hierarchy being rendered, regardless of any cropping or scaling. This should be called when calculating some position or region relative to the full render region, such as a centre point.

ufoProcessGetFullRenderRectangle and ufoProcessGetFullRenderRectangleStruct may be called within ufoProcessRenderPixel, ufoProcessRenderLine, ufoProcessRenderRectangle, ufoProcessCanAvoidRendering, ufoProcessPreRender, ufoProcessPostRender, ufoProcessPreRenderPass, ufoProcessPostRenderPass, ufoProcessCalcDefinedRectangle, ufoProcessCalcNeedRectangles, ufoProcessCalcDefinedPixelTypes, ufoProcessSpecifyConvertPixelTypes, and from within any editor user function or event function in the editor GUI.

ufoProcessGetFullRenderRectangleStruct

void ufoProcessGetFullRenderRectangle(
   ufoProcess process_instance,
   int *x1,
   int *y1,
   int *x2,
   int *y2);

void ufoProcessGetFullRenderRectangleStruct(
   ufoProcess process_instance,
   ufoRectangle *rectangle);

Refer to the following table for command descriptions:


Command

Description

rectangle

rectangle structure into which values copied

ufoRectangle

structure defined in ufoTypes.h.


Returns the full rectangle resolution of the final target clip in the process hierarchy being rendered, regardless of any cropping or scaling. This should be called when calculating some position or region relative to the full render region, such as a centre point.

ufoProcessGetFullRenderRectangle and ufoProcessGetFullRenderRectangleStruct may be called within ufoProcessRenderPixel, ufoProcessRenderLine, ufoProcessRenderRectangle, ufoProcessCanAvoidRendering, ufoProcessPreRender, ufoProcessPostRender, ufoProcessPreRenderPass, ufoProcessPostRenderPass, ufoProcessCalcDefinedRectangle, ufoProcessCalcNeedRectangles, ufoProcessCalcDefinedPixelTypes, ufoProcessSpecifyConvertPixelTypes, and from within any editor user function or event function in the editor GUI.

ufoRasterAlloc

ufoRaster ufoRasterAlloc(
   ufoPixelType pixel_type,
   int x1,
   int y1,
   int x2,
   int y2);

Refer to the following table for command descriptions:


Command

Description

pixel_type

type of pixel required in new raster

x1, y1, x2, y2

bounds of new raster

ufoPixelType

• 8-bits per component. Component range 0..255

ufoRGB8PixelType

RGB packed UBGR (U is redundant) 32-bits per pixel

ufoA8PixelType

Alpha 8-bits per pixel

ufoRGBA8PixelType

RGB-Alpha packed ABGR 32-bits per pixel

• 16-bits per component. Component range 0..16383 (14-bits)

ufoRGB16PixelType

RGB packed BGR 48-bits per pixel

ufoA16PixelType

Alpha 16-bits per pixel

ufoRGBA16PixelType

RGB-Alpha packed ABGR 64-bits per pixel

• Floating point 32-bits per component. Component range 0.0..1.0

ufoRGBFPixelType

RGB packed BGR 96-bits per pixel

ufoAFPixelType

Alpha 32-bits per pixel

ufoRGBAFPixelType

RGB-Alpha packed ABGR 128-bits per pixel


ufoRasterAlloc allocates raster of the given size and type, and returns a pointer to the new instance.

ufoRasterAllocCopy

ufoRaster ufoRasterAllocCopy(
   ufoRaster raster_instance,
   int do_copy_data);

ufoRasterAllocCopy allocates a raster of the same size and type as raster_instance, and returns a pointer to the new instance. The pixel values can be optionally copied to the new raster.

ufoRasterAllocCopyPart

ufoRaster ufoRasterAllocCopyPart(
   ufoRaster raster_instance,
   int x1,
   int y1,
   int x2,
   int y2,
   int do_copy_data);

ufoRasterAllocCopyPart allocates a raster of the same type as raster_instance, and of the size defined in the arguments, and return a pointer to the new instance. The pixel values can be optionally copied to the new raster.

ufoRasterClearPart

void ufoRasterClearPart(
   ufoRaster  raster_instance, 
   double     r, 
   double     g, 
   double     b, 
   double     a,
   int        x1, 
   int        y1, 
   int        x2, 
   int        y2);

Clears the raster to a given RGBA value.

ufoRasterCopy

void ufoRasterCopy(
   ufoRaster raster_instance_from,
   ufoRaster raster_instance_to);

ufoRasterCopy copies one raster to another, handling any pixel conversion and bound checking required.

ufoRasterGetScanline

void ufoRasterGetScanline(
   ufoRaster raster_instance_from, 
   int y,
   int x1, 
   int x2,
   void  * buffer, 
   ufoPixelType  buffer_pixel_type );

Gets a scanline from a raster of any type into the given buffer. Handles all required image conversions. The pixel at x1 is written at the begining of the buffer.

ufoRasterPutScanline

void ufoRasterPutScanline(
   ufoRaster raster_instance_to, 
   int y,
   int x1, 
   int x2,
   const void *buffer, 
   ufoPixelType buffer_pixel_type );

Puts a scanline buffer to a raster of any type. Handles all required image conversions.

ufoRasterCopyPart

void ufoRasterCopyPart(
   ufoRaster raster_instance_from,
   ufoRaster raster_instance_to,
   int x1,
   int y1,
   int x2,
   int y2);

ufoRasterCopyPart copies a region of one raster to another, handling any pixel conversion and bound checking required.

ufoRasterFree

void ufoRasterFree(
   ufoRaster raster_instance);

ufoRasterFree frees the raster previously allocated using either ufoRasterAlloc, ufoRasterAllocCopy, or ufoRasterAllocCopyPart.

ufoRasterGetBufferAddress

void* ufoRasterGetBufferAddress(
   ufoRaster raster_instance);

ufoRasterGetBufferAddress returns a pointer to the base of the raster buffer.

ufoRasterGetBufferSize

int ufoRasterGetBufferSize(
   ufoRaster raster_instance);

int ufoRasterGetPixelSize(
   ufoRaster raster_instance);

int ufoRasterGetComponentSize(
   ufoRaster raster_instance);

ufoRasterGetBufferSize returns the buffer size of the raster in bytes.

ufoRasterGetPixelSize

int ufoRasterGetBufferSize(
   ufoRaster raster_instance);

int ufoRasterGetPixelSize(
   ufoRaster raster_instance);

int ufoRasterGetComponentSize(
   ufoRaster raster_instance);

ufoRasterGetPixelSize returns the pixel size of the raster in bytes.

ufoRasterGetComponentSize

int ufoRasterGetBufferSize(
   ufoRaster raster_instance);

int ufoRasterGetPixelSize(
   ufoRaster raster_instance);

int ufoRasterGetComponentSize(
   ufoRaster raster_instance);

ufoRasterGetComponentSize returns the component size of the raster in bytes.

ufoRasterGetLimits

void ufoRasterGetLimits(
   ufoRaster raster_instance,
   int *x1, 
   int *y1, 
   int *x2, 
   int *y2);

int ufoRasterGetWidth(
   ufoRaster raster_instance);

int ufoRasterGetHeight(
   ufoRaster raster_instance);

ufoRasterGetLimits returns the bounds of a raster.

ufoRasterGetWidth

void ufoRasterGetLimits(
   ufoRaster raster_instance,
   int *x1, 
   int *y1, 
   int *x2, 
   int *y2);

int ufoRasterGetWidth(
   ufoRaster raster_instance);

int ufoRasterGetHeight(
   ufoRaster raster_instance);

ufoRasterGetWidth returns the width of a raster. This is always x2-x1+1.

ufoRasterGetHeight

void ufoRasterGetLimits(
   ufoRaster raster_instance,
   int *x1, 
   int *y1, 
   int *x2, 
   int *y2);

int ufoRasterGetWidth(
   ufoRaster raster_instance);

int ufoRasterGetHeight(
   ufoRaster raster_instance);

ufoRasterGetHeight returns the height of a raster. This is always y2-y1+1.

ufoRasterGetPixelAddress

void* ufoRasterGetPixelAddress(
   ufoRaster raster_instance,
   int x,
   int y);

ufoRasterGetPixelAddress returns the address of the raster buffer at pixel (X,Y).

The returned pointer can be converted into the correct pixel structure for the type raster. For pixel structure and component definitions, see ufoRaster.h.


Missing image
1p.gif
[spacer

] Missing image
Ag06d116.jpg
Image:ag06d116.jpg

Bounds checking is not performed on X or Y.


ufoRasterGetPixelCol

void ufoRasterGetPixelCol(
   ufoRaster raster_instance,
   int x,
   int y,
   double* r,
   double* g,
   double* b);

ufoRasterGetPixelCol returns the RGB values for a pixel.

Values are normalized in the range (0..1).

Depending on the raster, the values returned are as follows:

=ufoRasterGetPixelCol

• Called on an RGB raster returns r=R, g=G, b=B

• Called on an A raster returns r=A, g=A, b=A

• Called on an RGBA raster returns r=R, g=G, b=B

ufoRasterGetPixelAlpha

void ufoRasterGetPixelAlpha(
   ufoRaster raster_instance,
   int x,
   int y,
   double* a);


ufoRasterGetPixelAlpha returns the Alpha value for a pixel.

Values are normalized in the range (0..1).

Depending on the raster, the values returned are as follows:

=ufoRasterGetPixelAlpha

• Called on an RGB raster returns a = (R+G+B)/3

• Called on an A raster returns a = A

• Called on an RGBA raster returns a = A

ufoRasterGetPixelColAlpha

void ufoRasterGetPixelColAlpha(
   ufoRaster raster_instance,
   int x,
   int y,
   double* r,
   double* g,
   double* b,
   double* a);

ufoRasterGetPixelColAlpha returns the RGB-Alpha values for a pixel.

Values are normalized in the range (0..1).

Depending on the raster, the values returned are as follows:

ufoRasterGetPixelColAlpha

• Called on an RGB raster returns r=R, g=G, b=B, a=1

• Called on an A raster returns r=A, g=A, b=A, a=A

• Called on an RGBA raster returns r=R, g=G, b=B, a=A

ufoRasterGetPixelType

ufoPixelType ufoRasterGetPixelType(
   ufoRaster raster_instance);

Refer to the following table for command descriptions:


Command

Description

ufoPixelType

• 8-bits per component. Component range 0..255

ufoRGB8PixelType

RGB packed UBGR (U is redundant 32-bits per pixel

ufoA8PixelType

Alpha 8-bits per pixel

ufoRGBA8PixelType

RGB-Alpha packed ABGR 32-bits per pixel

• 16-bits per component. Component range 0.16383 (14-bits)

ufoRGB16PixelType

RGB packed BGR 48-bits per pixel

ufoA16PixelType

Alpha 16-bits per pixel

ufoRGBA16PixelType

RGB-Alpha packed ABGR 64-bits per pixel

• Floating point 32-bits per component. Component range 0.0..1.0

ufoRGBFPixelType

RGB packed BGR 96-bits per pixel

ufoAFPixelType

Alpha 32-bits per pixel

ufoRGBAFPixelType

RGB-Alpha packed ABGR 128-bits per pixel


ufoRasterGetPixelType returns the pixel type for the raster.

ufoPixelTypeGetAlphaVariation

Returns the Alpha of the pixel format that is in the same bit depth as the input pixel type.

ufoPixelTypeGetRGBAVariation

Returns the RGBA of the pixel format that is in the same bit depth as the input pixel type.

ufoPixelTypeGetRGBVariation

Returns the RGB of the pixel format that is in the same bit depth as the input pixel type.

ufoPixelTypeGetPixelSize

int ufoPixelTypeGetPixelSize(
   ufoPixelType pixel_type);

Returns the size of one pixel for the given pixel type. RGB8 and RGBA8 are both 4 bytes. For other types, it is the component size multipled by the number of channels.

ufoRasterSetPixelCol

ufoRasterSetPixelCol sets the RGB values in a pixel.

Values should be normalized in the range (0..1).

Depending on the raster type, the values set are as follows:

ufoRasterSetPixelCol

• Called on an RGB raster sets R=r, G=g, B=b

• Called on an A raster sets A = (r+g+b)/3

• Called on an RGBA raster sets R=r, G=g, B=b, A=1

ufoRasterSetPixelAlpha

ufoRasterSetPixelAlpha sets the Alpha values in a pixel.

Values should be normalized in the range (0..1).

Depending on the raster type, the values set are as follows:

ufoRasterSetPixelAlpha

• Called on an RGB raster sets R=a, G=a, B=a

• Called on an A raster sets A = a

• Called on an RGBA raster sets R=a, G=a, B=a, A=a

ufoRasterSetPixelColAlpha

ufoRasterSetPixelColApha sets the RGB-Alpha values in a pixel.

Values should be normalized in the range (0..1).

Depending on the raster type, the values set are as follows:

ufoRasterSetPixelColAlpha

• Called on an RGB raster sets R=r, G=g, B=b

• Called on an A raster sets A = a

• Called on an RGBA raster sets R=r, G=g, B=b, A=a

ufoEditorSetUserData

void ufoEditorSetUserData(
   ufoEditor editor_instance,
   void *user_data);

Sets user data to be associated with this process editor. User data may be set to null.

If editor user data should be tidied when the editor is destroyed, this should be handled in the ufoEditorDelete user function. ufoEditorSetUserData may be called within any editor user function.

ufoEditorGetUserData

void* ufoEditorGetUserData(
   ufoEditor editor_instance);

Returns user data previously set with ufoEditorSetUserData for this process editor instance. ufoEditorGetUserData returns null if no user data is currently set.

ufoEditorGetUserData may be called within any editor user function.

ufoEditorGetOverlayIndex

Related Functions: ufoEditorGetOverlayIndexRange

int ufoEditorGetOverlayIndex(
   ufoEditor editor_instance
   int colour_index);

void ufoEditorGetOverlayIndexRange(
   ufoEditor editor_instance,
   int * min_colour_index);
   int * max_colour_index);

ufoEditorGetOverlayIndex gets the correct colour index to be used for setting the overlay colours in OpenGL prior to drawing in the overlay plane. This is necessary as the Softimage Compositor splits the overlay plane and reserves half for specific tools, requiring an offset to be taken into consideration.

ufoEditorGetOverlayIndexRange gets the range of valid index to colour values which can be set and used when drawing into the overlay.

The transparent colour index is always 0, and colour indices 1, 2, and 3 relate to user-definable colours, accessed through the application preferences interface.

ufoEditorGetOverlayIndex and ufoEditorGetOverlayIndexRange may be called within any editor user function.

ufoEditorGetOverlayIndexRange

Related Functions: ufoEditorGetOverlayIndex

int ufoEditorGetOverlayIndex(
   ufoEditor editor_instance
   int colour_index);

void ufoEditorGetOverlayIndexRange(
   ufoEditor editor_instance,
   int * min_colour_index);
   int * max_colour_index);

ufoEditorGetOverlayIndex gets the correct colour index to be used for setting the overlay colours in OpenGL prior to drawing in the overlay plane. This is necessary as the Softimage Compositor splits the overlay plane and reserves half for specific tools, requiring an offset to be taken into consideration.

ufoEditorGetOverlayIndexRange gets the range of valid index to colour values which can be set and used when drawing into the overlay.

The transparent colour index is always 0, and colour indices 1, 2, and 3 relate to user-definable colours, accessed through the application preferences interface.

ufoEditorGetOverlayIndex and ufoEditorGetOverlayIndexRange may be called within any editor user function.

ufoEditorSetOverlayColour

int ufoEditorSetOverlayColour(
   ufoEditor editor_instance
   int colour_index);
   double red);
   double green);
   double blue);

ufoEditorSetOverlayColour assigns a colour to a specific overlay index.

The transparent colour index is always 0; this cannot be changed. Colour indices 1, 2, and 3 relate to user-definable colours, accessed through the application preferences interface, which should not be reassigned.

ufoEditorSetOverlayColour may be called within any editor user function.

ufoEditorGetPixelSize

void ufoEditorGetPixelSize(
   ufoEditor editor_instance,
   double* x_size,
   double* y_size);

Refer to the following table for command descriptions:


Command

Description

x_size,y_size

x and y scale factor


ufoEditorGetPixelSize gets the scaling in the viewer from the size if a pixel at full render resolution to the size in the current display.

ufoEditorGetPixelSize may be called with any editor user function.

ufoEditorDraw

void ufoEditorDraw(
   ufoEditor editor_instance);

ufoEditorDraw causes the editor to set up the context for OpenGL drawing and call ufoEditorOverlayDraw or ufoEditorRGB Draw if supplied.

If you need to call ufoEditorDraw from within event functions in the user-defined GUI, then the UFO will need to store the ufoEditor pointer passed to it in ufoEditorCreateGui when this editor instance was created.

ufoEditorDraw may be called within ufoEditorMouseDown, ufoEditorMouseUp, ufoEditorMouseDrag, ufoEditorMousePosition, ufoEditorKeyEvent, or from within any event function in the editor GUI.

ufoEditorNotifyEdited

void ufoEditorNotifyEdited(
   ufoEditor editor_instance,
   int* param_index_array,
   int number_of_parameters,
   ufoEditorEventType ufo_event_type);

ufoEditorNotifyEdited notifies Media Illusion of changes to parameters as a result of an edit.

For interactive changes, for example when dragging sliders or onscreen tools, ufoEditorDrag should be passed as the ufo_event_type.

For release changes, such as releasing sliders or onscreen tools, ufoEditorRelease should be passed as the ufo_event_type.

ufoEditorNotifyEdited may be called within ufoEditorOverlayDraw, ufoEditorRGBDraw, ufoEditorMouseDown, ufoEditorMouseUp, ufoEditorMouseDrag, ufoEditorMousePosition, and ufoEditorKeyEvent.

ufoEditorGetRasterViewed

ufoRasterufoEditorGetRasterViewed(
   ufoEditor editor_instance);

ufoEditorGetRasterViewed returns handle to raster instance for the currently displayed raster during editing. The raster handle can be passed in calls to raster functions which take a ufoRaster handle as the first argument.

All returned raster handles should be tested against null, as under certain circumstances such as prior to processing or getting from
unconnected UFO process inputs, the raster may not be available. If a returned handle is null then there is no raster available to get.

ufoEditorGetRasterViewed may be called within ufoEditorMouseDown(), ufoEditorMouseUp(), ufoEditorMouseDrag(), ufoEditorMousePosition(), ufoEditorKeyEvent(), or from within any event function in the editor GUI.

ufoEditorSetCurrentFrame

void ufoEditorSetCurrentFrame(
   ufoEditor editor_instance,
   double frame,
   ufoEditorEventType event_type);

ufoEditorSetCurrentFrame tells the application to change the current frame. If the event_type in is set to ufoEditorForce, it will ensure that the frame is rendered.

ufoEditorSetCurrentFrame may be called within ufoEditorMouseDown( ), ufoEditorMouseUp( ), ufoEditorMouseDrag( ), ufoEditorMousePosition( ), ufoEditorKeyEvent( ), or from within any event function in the editor GUI.

ufoEditorForceRender

void ufoEditorForceRender(
   ufoEditor  editor_instance);

ufoEditorForceRender forces the UFO process to render the current frame if the update type in the editor is set to interactive drag or pen-up.

ufoEditorForceRender may be called within ufoEditorMouseDown( ), ufoEditorMouseUp( ), ufoEditorMouseDrag( ), ufoEditorMousePosition( ), ufoEditorKeyEvent( ), or from within any event function in the editor GUI.

ufoEditorGetCurrentViewType

ufoEditorGetCurrentViewType(
   ufoEditor editor_instance,
   ufoViewType *io_type,
   int *io_num);

Refer to the following table for command descriptions:


Command

Description

iotype

ufoInput, ufoOutput or ufoMask

io_num

index of iotype


Inquires what view type is currently set in the editor (Input, Output or Mask) and the view index if there is more than one (for example input 0 or input 1).

Returns a value of 1 if current view type is valid or 0 if it is invalid.

ufoViewType is defined in ufoTypes.h and is one of: ufoInput, ufoOutput or ufoMask.

May be called within any editor user function.

ufoEditorSetStatusBar

void ufoEditorSetStatusBar(
   const char * message_string);

Puts a message in the application status bar. To clear the message, pass in a null string

May be called within ufoEditorMouseDown( ), ufoEditorMouseUp ( ), ufoEditorMouseDrag ( ), ufoEditorMousePosition ( ), ufoEditorKeyEvent ( ), or from within any event function in the editor GUI.

ufoMalloc

Related Functions: ufoRealloc, ufoFree

void* ufoMalloc(
   size_t size);

void* ufoRealloc(
   void *ptr,
   size_t size);

void ufoFree(
   void *ptr);

Host memory allocation routines. These have the same functionality as the standard malloc, realloc, and free system calls.

You should use the UFO memory allocation mechanism for dynamically allocating and freeing memory as it makes use of the Softimage Compositor’s memory manager.

ufoRealloc

Related Functions: ufoMalloc, ufoFree

void* ufoMalloc(
   size_t size);

void* ufoRealloc(
   void *ptr,
   size_t size);

void ufoFree(
   void *ptr);

Host memory allocation routines. These have the same functionality as the standard malloc, realloc, and free system calls.

You should use the UFO memory allocation mechanism for dynamically allocating and freeing memory as it makes use of the Softimage Compositor’s memory manager.

ufoFree

Related Functions: ufoMalloc, ufoRealloc

void* ufoMalloc(
   size_t size);

void* ufoRealloc(
   void *ptr,
   size_t size);

void ufoFree(
   void *ptr);

Host memory allocation routines. These have the same functionality as the standard malloc, realloc, and free system calls.

You should use the UFO memory allocation mechanism for dynamically allocating and freeing memory as it makes use of the Softimage Compositor’s memory manager.

ufoCheckInBackground

int ufoCheckInBackground(void);

ufoCheckInBackground checks if the main application is running in foreground mode (with interactive user interface) or in background mode (with no user interface).

May be called within any UFO user function

ufoMPFork

void ufoMPFork(
   ufoMPForkFunc func,
   int force_exactly_n,
   ...);

ufoMPFork creates threads that execute the supplied function func in parallel with the calling thread, here thread management is handled by the application multi-threader.

force_exactly_n should be set to 0: for standard behaviour of creating n-1 additional processes to the calling process where n is the application default number of threads used in multi-threading, and n (where n is greater than 0): to force creation of exactly n-1 additional processes.

num_args should be set to the number of arguments being passed to func in the following argument list. A maximum of 6 arguments can be passed.

ufoMPForkFunc typed for function to be called in parallel is supplied in ufoTypes.h.

ufoMPFork should not be called within a function which itself is being multi-threaded.

If ufoProcessSetMPSafe is set to false, then the application will not attempt to call any of the UFO functions in parallel and ufoMPFork.

May be called in any UFO user function. However, if ufoProcessSetMPSafe is set to true (the default behaviour), then ufoMPFork will have no effect in ufoProcessRenderLine or ufoProcessesPixel.

May be called within any UFO user function.

ufoMPForkMyId

int ufoMPForkMyId(void);

When forked processes are created with ufoMPFork, each is given a unique thread ID, which can be obtained via ufoMPForkMyId. The return value will bean in the range 0..n-1, where n is the number of threads running in parallel.

Returns -1 if the current process thread is not handled by the application multi-threader.

May be called within the (ufoMPForkFunc)func supplied to ufoMPFork.

ufoMPForkNumProcs

int ufoMPForkNumProcs(void);

Returns the number of threads that have been forked by ufoMPFork.

May be called within the (ufoMPForkFunc)func supplied to ufoMPFork.

ufoMPForkPotentialNumProcs

int ufoMPForkPotentialNumProcs(void);

Returns the number of potential threads available to processes.

This may be restricted by machine processors present, application multi-processor licensing or application command line arguments specifying number of threads to use.

This can be used to determine potential maximum number of threads available for licensing purposes during a UFO process definition.

May be called within the (ufoMPForkFunc)func supplied to ufoMPFork.

ufoMPThreadFunc

ufoMPThreadFunc initialise_func, 
typedef void (*ufoMPThreadFunc) (void *);      /* definition for basic thread function */

UFOMP_SCHEDULE_SIMPLE,       /* splits iterations amongst n processors into
                                /* n complete blocks of contiguous data. */
UFOMP_SCHEDULE_INTERLEAVE,  /* interleaves iterations */

ufoMPIterate

Related Functions: ufoMPSetIterateFunction, ufoMPIterateThreadFunc

Simple methods of user-defined MP processing with indices. Can be used without modification on single CPU machines. Do not use this in functions which are already called in worker threads, such as ufoProcessRenderLine. Returns false from ufoProcessSetMPSafe to ensure you do not get called from a worker thread. Call ufoMPSetIterateFunction to set the worker functions and then call ufoMPIterate to run and wait for the function to do the processing

ufoMPIterate

Runs and wait for the completion of the functions set by the ufoMPSetIterateFunction.

The functions are called with the index they are given, between i_start_index and including i_end_index

Example of function calls

Four processors over 32 iterations. There are 4 threads created. Each thread calls the interate function with 6 different indices

void    ufoMPIterate(
   int i_start_index, 
   int i_end_index, 
   void *user_data, 
   ufoMPScheduleType schedule_type);

ufoMPSetIterateFunction

Related Functions: ufoMPIterate, ufoMPIterateThreadFunc

Simple methods of user-defined MP processing with indices. Can be used without modification on single CPU machines. Do not use this in functions which are already called in worker threads, such as ufoProcessRenderLine. Returns false from ufoProcessSetMPSafe to ensure you do not get called from a worker thread. Call ufoMPSetIterateFunction to set the worker functions and then call ufoMPIterate to run and wait for the function to do the processing.

ufoMPSetIterateFunction

Sets the functions to be launched by ufoMPIterate. Initialise and terminate functions can be NULL.

ufoMPIterateThreadFunc

Related Functions: ufoMPIterate, ufoMPSetIterateFunction

Simple methods of user-defined MP processing with indices. Can be used without modification on single CPU machines. Do not use this in functions which are already called in worker threads, such as ufoProcessRenderLine. Returns false from ufoProcessSetMPSafe to ensure you do not get called from a worker thread. Call ufoMPSetIterateFunction to set the worker functions and then call ufoMPIterate to run and wait for the function to do the processing.

ufoMPIterateThreadFunc

ufoMPIterateThreadFunc iterate_func, 
typedef void (*ufoMPIterateThreadFunc) (int, void *); /* definition for iterate thread functions */

This page was last modified 19:31, 15 Dec 2010.
This page has been accessed 1976 times.

© Copyright 2009 Autodesk Inc. All Rights Reserved. Privacy Policy | Legal Notices and Trademarks | Report Piracy