11
YellowDog EXPORTING FROM MODO Bringing businesses the Best Source of Compute for every workload

Exporting From Modo

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Exporting From Modo

YellowDog

EXPORTING FROMMODO

Bringing businesses the Best Sourceof Compute for every workload

Page 2: Exporting From Modo

YellowDog

i© YellowDog Ltd. 2015-2020. Commercial in Confidence

EXPORTING FROM MODO CONTENTS

INTRODUCTION 1

WORKING WITH PLUGINS 1

The Modo Plugin .............................................................................................................................. 1

The Command File ............................................................................................................................ 1

Scene Mode ................................................................................................................................................................ 2

Directory Mode ............................................................................................................................................................ 2

Command Reference ........................................................................................................................ 3

scene.open .................................................................................................................................................................. 3

yellowdog.export ......................................................................................................................................................... 3

yellowdog.validate ....................................................................................................................................................... 5

yellowdog.validate_and_export_in_directory .............................................................................................................. 6

The Plugin Configuration File .............................................................................................................. 7

Batch Exporting with the YellowDog Script .......................................................................................... 7

Page 3: Exporting From Modo

YellowDog Introduction

1

Exporting From Modo

© YellowDog Ltd. 2015-2020. Commercial in Confidence

INTRODUCTION

YellowDog for CGI enables studios to use YellowDog to render at scale across potentially multiple clouds. Studios can either take advantage of YellowDog's Full Service to manage all the licenses and softwarerequired, or use the Select Service to retain full control over the entire process and make use of their existingsoftware licenses and render managers.

This guide describes how to run the Modo plugin from the command line.

WORKING WITH PLUGINS

The YellowDog plugins integrate YellowDog with standard rendering software and enable studio artists toexport scenes to YellowDog without leaving their familiar working environment.

Installing a plugin adds a tab or button within the relevant application that can be clicked to export files forrender. This is the way scenes are normally exported when using YellowDog Full Service.

However it is also possible to run YellowDog plugins from the command line, in order to provide flexibility andbetter integration with a studio's existing rendering processes.

THE MODO PLUGIN

When run using the command line, the Modo plugin uses a command file to specify what commands should berun and which parameters should be set.

Running the Executable

The command line syntax is of the form:

"C:\Program Files\Foundry\Modo\version\modo_cl.exe" < "C:\Users\Username\Documents\command-file.txt"

For information about how to create a command file, see The Command File, below.

Command Output Files

Running the executable from the command line produces the following output files:

· yellowdog_cmd_output.txt The result file. The content of this file depends on the commands that wererun.

· yellowdog_cmd_output.txt.details The details file. The content and nature of this file depends on thecommands that were run.

By default, you can find these files in your system temporary folder. In Windows, this is the folder set by theTEMP variable and defaults to user\AppData\Local\Temp.

THE COMMAND FILE

The command file sytax is of the form:

log.toConsole {true|false}log.toConsoleRolling {true|false}{commands}app.quit

The command file can be used in two different modes, each of which supports different commands:

· Scene mode Validate and/or export a single scene file. You can export a scene without validation ifrequired. For more information, see Scene Mode.

· Directory mode Validate and export the contents of an entire directory. All files will be validated beforethey are exported. For more information, see Directory Mode.

Commands

Page 4: Exporting From Modo

YellowDog Working with Plugins

2

Exporting From Modo

© YellowDog Ltd. 2015-2020. Commercial in Confidence

For information on a specific command, see the Command Reference.

You can also check the latest API information for your version of the plugin. To do this:

1. From within Modo, press F5. A list of commands is displayed.

2. Filter the commands by the term yellowdog. Note that only some of these commands are designed tobe used with the command line. The others are intended for use within the Modo user interface.

3. Select a command. An information icon will appear beside the name.

4. Click the information icon. A popup will appear, showing information about the syntax of the selectedcommand.

SCENE MODE

A command file can use the scene mode commands to validate or export a single scene.

The commands available are:

· scene.open Specifies the scene to be validated and/or exported. For more information, see scene.open.

· yellowdog.validate Validates a scene using the specified parameters. The scene is not automaticallyexported after validation. All unused parameters are set to their default values. For more information,see yellowdog.validate.

· yellowdog.export Exports a scene using the specified parameters. The scene is not automaticallyvalidated before export. All unused parameters are set to their default values. For more information, seeyellowdog.export.

Note The parameter default values are not static, but change for each YellowDog implementation due todifferences in scene file content and Sync configuration. When creating a command file, you should onlyset the parameters that you require. The others will default to appropriate values.

Examplelog.toConsole truelog.toConsoleRolling truescene.open "C:\Users\Jessica Jones\ProjectAlpha\my_scene.lxo"yellowdog.validateapp.quit

This example validates the specified scene file using the current parameter defaults.

DIRECTORY MODE

A command file can use the directory mode commands to bulk export up to 100 scenes within a singledirectory (including sub-directories).

Note If you need to export more than 100 scenes, YellowDog can provide a script to automate theprocess of running the executable. For more information, see Batch Exporting with the YellowDog Script.

The commands available are:

· yellowdog.validate_and_export_in_directory Validates and exports a scene using the specifiedparameters. For more information, see yellowdog.validate_and_export_in_directory.

Note When creating a command file, you should only set the parameters that you require. The others willdefault to appropriate values.

Examplelog.toConsole truelog.toConsoleRolling trueyellowdog.validate_and_export_in_directory directory_path:"C:/Jessica Jones"auto_start_export:true render_engine:VRAY_NEXT_MODOapp.quit

This example exports all of the scene files found in the user's folder and its subfolders, automatically starting anew rendering job using the V-Ray Next render engine.

Page 5: Exporting From Modo

YellowDog Working with Plugins

3

Exporting From Modo

© YellowDog Ltd. 2015-2020. Commercial in Confidence

COMMAND REFERENCE

This section describes the commands that can be used in The Command File, and explains the parametervalues that can be set.

The parameter default values are not described, because many of these are set dynamically to ensure thebest configuration for each export. The same logic is used for default values whether the plugin is launchedfrom the command line or from within the rendering software.

The available commands are:

· scene.open

· yellowdog.export

· yellowdog.validate

· yellowdog.validate_and_export_in_directory

SCENE.OPEN

This specifies the scene file to be used by other commands in The Command File.

This command is used in Scene Mode.

Syntaxscene.open file-path

Examplescene.open "C:\Users\Ned Stark\Documents\my_scene.lxo"

Parameters

Parameter Type Description

file-path String The absolute path to the scene file.

YELLOWDOG.EXPORT

Exports the scene file specified by scene.open.

Produces a result file showing whether the scene exported successfully (True) or not (False). For moreinformation on output files, see The Modo Plugin.

This command is used in Scene Mode.

Syntaxscene.open file-pathyellowdog.export [parameters]

Examplescene.open "C:\Users\Ned Stark\Documents\my_scene.lxo"yellowdog.export start_frame:5 end_frame:65 upload_project_name:"AwesomeProject"

This example exports a specific frame range, with a specific project name.

Parameters

Parameter Type Description

cmd_result_file_path String The filename and location to write the result fileto. For example, cmd_result_file_path:"C:/Results/ProjectAlpha/export_sta

tus.txt".

temporary_archive_directory String

output_file_path String If not exporting to Sync, the filename and locationto use for the archive (zip) file.

Page 6: Exporting From Modo

YellowDog Working with Plugins

4

Exporting From Modo

© YellowDog Ltd. 2015-2020. Commercial in Confidence

using_central_asset_repository Bool Whether to use the YellowDog Central AssetRepository (CAR). If this is True, you maychoose to set the following parameter:exclude_scene_file_in_car_mode

using_sync_compression Bool Whether to export to YellowDog Sync. If this isTrue:

· The output_file_path parameter has

no effect.

· You may choose to set the followingparameters:

o auto_start_export

o upload_project_name

o scene_id

o move_sync_communication_files_to_upload_directory

auto_start_export Bool If exporting to Sync, whether the job should becreated and started automatically.

upload_project_name String If exporting to Sync, the name to use for theproject.

start_frame Int

end_frame Int

frame_step Int This can be used to export a subset of frames,spaced at regular intervals. For example,frame_step:2 would export every other frame.

render_engine Enum Sets the rendering engine to use when rendering

the job. This rendering engine is notautomatically started after export.

Valid values for the rendering engine are:

· MODO

· VRAY_MODO

· VRAY_NEXT_MODO

scene_id Int If exporting to Sync, appends the exported filesto the specified scene ID. This must be anempty scene that already exists on the platform.

copy_scene_file_to_temporary_archive_directory

Bool Whether to copy the scene file to the temporarydirectory before archiving.

move_sync_communication_files_to_upload_directory

Bool If exporting to Sync, whether to move the archive.json map for Sync to the upload directory. If

set to False, the .json file will be saved in the

temporary directory.

This enables manual inspection of the file beforethe scene is archived and uploaded by Sync.

exclude_scene_file_in_car_mode Bool When using the Central Asset Repository,whether to include the scene file in the export.

exported_with_deadline Bool This parameter is not normally set for the Modoplugin. It is present in the syntax for othersituations in which command files may be used.

Whether the scene was exported with Deadline. On the YellowDog Platform, this project will belabelled as exported with Deadline and manual

Page 7: Exporting From Modo

YellowDog Working with Plugins

5

Exporting From Modo

© YellowDog Ltd. 2015-2020. Commercial in Confidence

control will be disabled. If this is True, you may

choose to set the following parameter:deadline_client_path

deadline_client_path String This parameter is not normally set for the Modoplugin. It is present in the syntax for othersituations in which command files may be used.

When exporting with Deadline, if the Deadlinebalancer should start automatically after exportthen the client path must be set.

keep_result_in_temp Bool Whether to keep the result file in the temporarydirectory after export. If False, the result file is

moved to the appropriate location for the exporttool used.

custom_config_file_name String Specifies a custom configuration file for theplugin. The configuration file specifies thedefaults for some parameters.

YELLOWDOG.VALIDATE

Validates the scene file specified by scene.open.

Produces a result file showing whether the scene is valid (True) or not (False). Further information can befound in the details file. For more information on output files, see The Modo Plugin.

This command is used in Scene Mode.

Syntaxscene.open file-pathyellowdog.validate [parameters]

Examplescene.open "C:\Users\Ned Stark\Documents\my_scene.lxo"yellowdog.validate start_frame:5 end_frame:65using_central_asset_repository:true"

This example validates a specific frame range against the requirements for exporting in CAR mode. Thissetting can be used even if the user is not authorized to use the Central Asset Repository.

Parameters

Parameter Type Description

cmd_result_file_path String The filename and location to write the resultfile to. For example,"C:/Results/ProjectAlpha/validation_status.txt".

temporary_archive_directory String

output_file_path String If not validating for export to Sync, the filenameand location to use for the archive (zip) file.

using_central_asset_repository Bool Whether to use the YellowDog Central AssetRepository (CAR).

using_sync_compression Bool Whether to validate for export to YellowDogSync. If this is True, the output_file_pathparameter has no effect.

auto_start_export Bool If validating for export to Sync, this validatesagainst the requirements for starting the jobautomatically after export.

upload_project_name String If validating for export to Sync, the name touse for the project.

Page 8: Exporting From Modo

YellowDog Working with Plugins

6

Exporting From Modo

© YellowDog Ltd. 2015-2020. Commercial in Confidence

start_frame Int

end_frame Int

frame_step Int This can be used to validate a subset offrames, spaced at regular intervals. Forexample, frame_step:2 would export everyother frame.

render_engine String Sets the rendering engine to validate for.

custom_config_file_name String Specifies a custom configuration file for theplugin. The configuration file specifies thedefaults for some parameters.

YELLOWDOG.VALIDATE_AND_EXPORT_IN_DIRECTORY

Validates all scene files within the specified directory tree, and exports all valid files to YellowDog Sync.

The command's progress and details are printed to standard output.

This command is used in Directory Mode.

Syntaxyellowdog.validate_and_export_in_directory directory_path:directory-path[auto_start_export:{True|False}] [render_engine: engine][alpha_output_file_path_no_ex:file-path] [alpha_output_format:format][final_color_output_file_path_no_ex:file-path][final_color_output_format:format]

Exampleyellowdog.validate_and_export_in_directory directory_path:"C:\Users\NedStark\Documents\Scenes" auto_start_export:truefinal_color_output_file_path_no_ex:"C:\Users\NedStark\Documents\Scenes\Output\Final_{SCENE_NAME}"

This example exports all the scenes in the specified Scenes folder and any subfolders. The rendering job iscreated and started automatically, using the native Modo render engine. The final RGB output files are savedin the Output directory with filenames that have the pattern Final_scene.extension.

Parameters

Parameter Type Description

directory_path String This parameter is required.

auto_start_export Bool Whether the job should be created and startedautomatically.

render_engine String Sets the rendering engine to use whenrendering the job.

alpha_output_file_path_no_ex String Sets a specific location and filename to use forthe alpha output. If alpha output has beendisabled, using this parameter will re-enable it. Use the {SCENE_NAME} wildcard to avoid

filename conflicts.

Do not include a file format extension. Fileformat may be set using thealpha_color_output_format parameter.

alpha_output_format String Sets the output format for the alpha channel. Supported output formats are listed below thistable.

final_color_output_file_path_no_ex String Sets a specific location and filename to use forthe final color RGB output. If final color outputhas been disabled, using this parameter will

Page 9: Exporting From Modo

YellowDog Working with Plugins

7

Exporting From Modo

© YellowDog Ltd. 2015-2020. Commercial in Confidence

re-enable it. Use the {SCENE_NAME}

wildcard to avoid filename conflicts.

Do not include a file format extension. Fileformat may be set using the

final_color_output_format parameter.

final_color_output_format String Sets the output format for the main RGBoutput. Supported output formats are listedbelow this table.

Supported output formats are: $FLEX, $Targa, BMP, HDR, JP2, JP216, JP216Lossless, JPG, LayeredPSD,openexr, openexr_32, openexr_tiled16, openexr_tiled32, openexrlayers, openexrlayers32, PNG, PNG16,PNGs, PNGs16, PSD, SGI, TIF, TIF16, TIF16BIG

THE PLUGIN CONFIGURATION FILE

The plugin configuration file specifies the defaults for some command parameters, and a number of settingsthat relate to validation. By default, it is stored at C:\ProgramFiles\Foundry\Modo\13.0v1\extra\scripts\YellowDog\scripts\lxserv\YellowDog\res\config.xml. When using Scene mode, you can optionally specify a different plugin configuration file to usewhen validating and/or exporting.

The plugin configuration file sets the defaults for the following command parameters:

· exclude_scene_file_in_car_mode

· upload_project_name

· output_file_name

It is also possible to change the following configuration settings:

· save_scene_on_export

YellowDog advises that studios check with Support before changing any of the validation parameters, as thismay result in invalid files being sent for render.

Example<?xml version="1.0" encoding="UTF-8"?><configs> <config name="exclude_scene_file_in_car_mode">False</config> <config name="default_upload_project_name">{SCENE_NAME}</config> <config name="default_output_file_name">{SCENE_NAME}.zip</config> <config name="save_scene_on_export">True</config>

<!-- VALIDATIONS --> [...]</configs>

BATCH EXPORTING WITH THE YELLOWDOG SCRIPT

Running the executable in Directory Mode has a limit of 100 scenes. For large jobs, YellowDog can provide ascript to automate the process of exporting directories containing over 100 scenes.

When run, this script will:

1. Copy the files in the specified directory tree to a specified location.

2. Distribute the files in the directory tree into a set of subfolders, each of which contains fewer than 100scenes.

3. Run the Modo Plugin on each subfolder separately.

Batch Export Options

To change any of the default settings, open the script in your editor of choice and update the variables at thestart of the file.

The variables available are:

Page 10: Exporting From Modo

YellowDog Working with Plugins

8

Exporting From Modo

© YellowDog Ltd. 2015-2020. Commercial in Confidence

· inputpath Specifies the directory to be exported. The batch script will run on this directory and all itssubfolders.

· outputpath The location in which to create the new directory tree. This cannot be within the directoryspecified in the inputpath.

· logpath The location in which to save logging information. This will be saved in a file named log.txt.

· modocommand The location in which to save the temporary files created by the script.

· modoclpath Specifies the command file to use with the Modo plugin. The default is C:\ProgramFiles\Foundry\Modo\13.1v1\modo_cl.exe. For information on how to create a command file, seeThe Command File.

· maxfilecount The number of scene files to place in each new subfolder. The default is 20. Do not setthis variable to more than 100, as this will result in missing scenes during the export phase.

· batchpause Optional. The number of seconds to wait between uploading each subfolder's files. This canbe used to ensure that the file upload does not exceed the available bandwidth. The default is 60.

For more information, see the readme file included with the script or consult YellowDog Support.

Page 11: Exporting From Modo

Helping people, businesses and technologyachieve their full potentialthrough intelligently orchestratingthe world's computing power