Houdini 18.0 Nodes TOP nodes

Perforce TOP node

Execute Perforce commands through PDG

On this page

This node acts as a wrapper around Perforce functionality. It provides an interface for executing p4 commands.

Installation

In order to use this node, you must ensure that Perforce is installed on any systems where jobs for this node are going to run.

In addition, the Perforce node must be able to find the p4 executable. When the job runs, it will first look for an environment variable called PDG_PERFORCE. If this variable is defined, the job will use its value as the path to Perforce’s executable. If the PDG_PERFORCE environment variable is not defined, the node will assume that p4 is available via the system’s path.

TOP Attributes

opduring

int

Indicates when the operation will be performed:

  • Generate = 0

  • Cook (In-Process) = 1

  • Cook (Out-of-Process) = 2

perforceop

string

Indicates the Perforce operation to perform (update, sync, edit, submit, add, change, or version)

overridebin

integer

Specifies whether the user has overriden the default behaviour for determining the location of the P4 executable. When this is set to 1, the work script will use the custom binary path specified by the user.

perforcebin

string

This is set to the custom P4 executable path specified by the user. This is used as the path to the P4 executable when overridebin is set to 1

sourcefiles

integer

Indicates the user’s selected menu item from the Source Files parameter.

filepattern

string

The file pattern to use in the Perforce operation.

filetag

string

The file tag of the input results included in the Perforce operation.

changelistnum

integer

For the edit, submit, and add operations: specifies the changelist number for the operation

changelistchoice

string

Specifies whether the default changelist or a numbered changelist is being used.

changelistdescription

string

For the submit and change operations: specifies the changelist description

p4configfile

string

Specifies the location of the P4 config file

forcesync

integer

For the sync operation: indicates whether a force sync should be performed

emptychangelist

integer

Change operation only: specifies whether the new change list should be empty or include all pending files

updateall

integer

Update and Sync operation only: indicates whether the entire workspace should be updated

changelist

integer

Change operation only: when a change list is successfully created by the change operation, its number will be specified via this attribute.

input_files

string

The list of file paths or the file pattern to be used in the p4 command.

Parameters

Node

Work Item Generation

Whether this node generates static or dynamic work items. You should generally leave this set to "Automatic" unless you know the node’s work items can be computed statically, or that they need to be generated dynamically.

Dynamic

This node always creates dynamic work items: it waits until the upstream work items are known, and generates new work items from the upstream work items.

Static

This node always creates static work items: it creates the number of work items it thinks it needs based on the parameters (and any upstream static items) before the network runs.

Automatic

If the input is static (a static processor, or a partitioner with only static inputs, or a mapper), this node generates static work items, otherwise it generates dynamic work items.

Perform Op During

This parameter dictates when to perform the Perforce operation. The Perforce command can be executed in the work item generation phase, or during the cook phase (either in-process or out-of-process).

Perforce Operation

This menu is used to select the Perforce command that will be executed.

File Source

This folder provides options for choosing which files will be included in the Perforce command.

All Files in Workspace

Update and Sync commands only: the entire workspace will be updated or synced when this option is enabled.

Empty Changelist

Change command only: when this option is enabled, any currently pending files will not be included in the newly created changelist.

Source Files

Selects the source of the files that will be included in the Perforce operation. The included files can either be provided by the upstream work item’s results or by a Perforce file pattern.

File Tag

A file tag to filter input files by. Only input results with this tag will be included in the work item’s operation.

File Pattern

Perforce file pattern to use in the operation.

Operation

Force Sync

If performing the sync command, this will enable or disable a force sync.

Changelist

If the Perforce command involves a changelist, this provides the choice of using the default changelist or a numbered changelist.

Changelist Number

If the Perforce command involves a changelist and the changelist option is set to 'Numbered', this allows for the changelist number to be specified.

Description

This parameter is used to create the description for any Perforce commands that require a changelist description.

Common

P4 Config File

Specifies the location of a P4 Config file. This will cause the P4CONFIG environment variable to be set in the job’s environment.

Override Perforce Path

This allows the path to the p4 executable to be completely overwritten with a custom path.

Examples

example_top_perforce Example for Perforce TOP node

This example demonstrates how to perform multiple perforce operations.

TOP nodes