Reference/Commands

From Affogato

Jump to: navigation, search

Contents

AffogatoRender

Synopsis

AffogatoRender( [Affogato Globals Property | XML file name], [Object Collection] )

Return Value

  • Ok if successfull
  • Fail otherwise

Description

Renders/exports the current scene or an optionally specified collection of objects in it. Export is done according to the settings in the optionally specified Affogato Render Globals and/or Affogato Globals XML file.

If no globals are specified the command either:

  • finds the first AffogatoGlobals property under the scene root and uses that
  • or, if there are no AffogatoGlobals properties under the scene root, creates a new AffogatoGlobals property under the scene root from which the export settings are read with default values

If an XML file is specified, the command either:

  • finds the first AffogatoGlobals property under the scene root and overrides any values of that with settings found in the XML file
  • or, if there are no AffogatoGlobals properties under the scene root, creates a new AffogatoGlobals property under the scene root and overrides any values of that with settings found in the XML file

Arguments

Affogato Globals Property

An optional Affogato Render Globals property used to read render/export parameters from.

Object Collection

An optional collection of objects to render/export.

AffogatoRenderSelected

Synopsis

AffogatoRenderSelected( [Affogato Globals Property | XML file name] )

Return Value

  • Ok if successfull
  • Fail otherwise

Description

Renders/exports the current selection. Export is done according to the settings in the optionally specified Affogato Render Globals and/or Affogato Globals XML file.

If no globals are specified the command either:

  • finds the first AffogatoGlobals property under the scene root and uses that
  • or, if there are no AffogatoGlobals properties under the scene root, creates a new AffogatoGlobals property under the scene root from which the export settings are read with default values

If an XML file is specified, the command either:

  • finds the first AffogatoGlobals property under the scene root and overrides any values of that with settings found in the XML file
  • or, if there are no AffogatoGlobals properties under the scene root, creates a new AffogatoGlobals property under the scene root and overrides any values of that with settings found in the XML file

Arguments

Affogato Globals Property

An optional Affogato Render Globals property to use to read render/export parameters from.

AffogatoExportArchive

Synopsis

AffogatoExportArchive( Destination, Object Collection, [Affogato Globals Property | XML file name] )

Return Value

  • Ok if successfull
  • Fail otherwise

Description

Exports a specified collection of objects to an archive file. Models contained in the collection will be expanded to the objects they contain.

Export is done according to the settings in the optionally specified Affogato Render Globals and/or Affogato Globals XML file.

If no globals are specified the command either:

  • finds the first AffogatoGlobals property under the scene root and uses that
  • or, if there are no AffogatoGlobals properties under the scene root, creates a new AffogatoGlobals property under the scene root from which the export settings are read with default values

If an XML file is specified, the command either:

  • finds the first AffogatoGlobals property under the scene root and overrides any values of that with settings found in the XML file
  • or, if there are no AffogatoGlobals properties under the scene root, creates a new AffogatoGlobals property under the scene root and overrides any values of that with settings found in the XML file

Settings in the globals are adhered. E.g. switching Attributes off in the resp. AffogatoGlobals property, one can get archives containing purely geometry.

Arguments

Destination

Name of the destination file. The extension for the selected renderer is automatically added. E.g. .rib for a RenderMan compliant one.

Object Collection

A collection of objects to export.

Affogato Globals Property

An optional Affogato Render Globals property to use to read render/export parameters from.

Example

Application.CreatePrim( "Cube", "MeshSurface", "mycube" )
collection = XSIFactory.CreateObject( "XSI.Collection" )
collection.Add( "mycube" )
Application.AffogatoExportArchive( "/tmp/cube", collection )

AffogatoCreateShader

Synopsis

AffogatoCreateShader( Shader File Name, [Target Object], [Strip Path], [Select Shader] )

Return Value

  • Ok if successfull
  • Fail otherwise
  • MemberNotFound if the specified shader file doesn't exist or could not be found.

Description

Creates a shader custom property under the optionally specified target object or otherwise the current selection.

Arguments

Shader File Name

The name of a shader file on disk. If no absolute path is specified, Affogato uses the paths found in the following locations to try to find the shader (in this order):

  1. The Shader Search Path of the first set of Affogato Render Globals found in the scene
  2. The SHADERS environment variable
  3. The DL_SHADERS_PATH environment variable

Target Object

The object to create the custom property under

Strip Path

Whether to strip the shader off its path. Doing so means the shader must be found through the shader searchpath later or be in the current folder from which the render is invoked.

Select Shader

Whether to select the shader custom property after it has been created.

AffogatoUpdateAllGlobals

Synopsis

AffogatoUpdateAllGlobals( [Force Update] )

Return Value

  • Ok if successfull
  • Fail if no AffogatoGlobals properties were found under the scene root

Description

Updates all AffogatoGlobals properties under the scene root if they have a different version than the currently installed Affogato plug-in.

Arguments

Force Update

If the boolean force update is true, found globals are updated even if they have the same Affogato version as the plug-in version currently installed.

Personal tools