disguise developers

Designer Plugins

Plugins for Disguise Designer software.

D3Net Configuration Python Samples

This guide demonstrates how to use the Disguise Python API to configure D3Net, including managing machines, roles, and director/understudy modes. These operations are essential for setting up distributed playback, redundancy, and show control in a D3Net environment.


D3Net Manager Operations

A D3NetManager object represents the networked system of machines (servers) in a Disguise project. It allows you to query and configure the roles of each machine, manage director/understudy states, and access networked resources.

Machines and Roles

TaskPython
Get the D3NetManager objectd3net = d3NetManager
Returns the main D3NetManager instance.
List all machines in the D3Netmachines = d3net.machines
Returns a list of all Machine objects in the network.
Get the local machinelocal = d3net.localMachine
Returns the Machine object representing the current machine.
Get the current director machinedirector = d3net.director
Returns the Machine object currently acting as director.
Get all understudy machinesunderstudies = d3net.understudies
Returns a list of Machine objects assigned as understudies.
Check if a machine is the directoris_director = d3net.director == machine
Check if a machine is an understudyis_understudy = d3net.isUnderstudy(machine)
Get the role of a machinerole = machine.role
Returns an enum value for the machine role
Set the director machined3net.director = machine
Assigns the given machine as the director.
Set the list of understudiesd3net.understudies = [machine1, machine2]
Assigns the given machines as understudies.
Check if the director is validhas_valid_director = d3net.hasValidDirector
Get the status of a machinestatus = d3net.machineStatus(machine.nodeId)
Returns a status code or object for the machine.
Find a machine by hostnamemachine = d3net.findMachineByHostname("myhost")

Director and Understudy Modes

D3Net supports different director/understudy modes for redundancy and failover.

TaskPython
Enable director mode on this machined3net.directorMode = True
Enable understudy mode on this machined3net.understudy = True
Check if dedicated director mode is activeis_dedicated = d3net.dedicatedDirectorMode
Check if non-dedicated director mode is activeis_non_dedicated = d3net.nonDedicatedDirectorMode
Check if solo mode is activeis_solo = d3net.soloMode
Get the current actor machinesactors = d3net.actors
Returns a list of actor machines.

D3Net Commands and Utilities

You can send commands to machines, check network status, and manage routing.

TaskPython
Dispatch a command to all machinesd3net.dispatchCommandAll(cmd, sessionOnly=False)
Sends a RemoteCommand to all machines.
Dispatch a command to a specific machined3net.dispatchCommandDirect("hostname", cmd, sessionOnly=False)
Send matrix routing to a machined3net.sendMatrixRouting(machine, feed)
Sends a FeedScene routing to the specified machine.
Check if an understudy is available for a machineavailable = d3net.understudyAvailableFor(machine)
Get understudy config statusstatus = d3net.getUnderstudyConfigStatus(understudy_machine)