connection managers

all managers, which are found in this module are designed to addon functionality to the connection-plugins

HierarchyManager

class pipeLion.connections.managers.hierarchyManager.HierarchyManager(parent, children=None)[source]
addChild(asset)[source]

adds a given child to this connection-object

Parameters:asset (AbstractAsset) – asset, which should be added as child to this connection
Returns:_children
Return type:list of AbstractAsset
getAllChildConnections()[source]

method will return a lis with all connections in all children

Returns:list of connections
Return type:list of AbstractConnection
getAllChildren()[source]

returns the list of current children

Returns:_children
Return type:list of AbstractAsset
getParent()[source]

will return the current parent-object of this connection

Returns:_parent
Return type:AbstractAsset
removeChild(asset)[source]

remove a certain asset from the list of children

Parameters:asset (AbstractAsset) – the asset which is to be removed
removeParent()[source]

delete the current parent of this object

setChildren(children)[source]

adds all given children to this connection-object

Parameters:children (list of AbstractAsset) – assets, which should be added as children to this connection
Returns:_children
Return type:list of AbstractAsset
setParent(parent)[source]

this method will set the parent of a connectionObject

Parameters:parent (AbstractAsset) – parent-asset of a connection
Returns:_parent
Return type:AbstractAsset

PathManager

class pipeLion.connections.managers.pathManager.PathManager(parent, children=None)[source]

class is designed to construct file-paths depending on dependencies of the connections.

constructPath(inRecursion=False, isIndirect=False)[source]

this recursive method will generate a list of outputPaths according to the hierarchy of the project.

getLastWorkingScene()[source]

method will return where file which was saved at last

Returns:last working file path
Return type:string
getReleaseLocation()[source]

method will return where this connection should save its release-files to

Returns:release file path
Return type:string
getWorkingLocation()[source]

method will return where this connection should save its working-files to

Returns:work file path
Return type:string

CommandManager

class pipeLion.connections.managers.commandManager.CommandManager(parent, children=None)[source]
addCloseCmd(command)[source]

this method will add a close command to the self._closeCommands list

Parameters:command (string) – the command which should be added
addOpenCmd(command)[source]

this method will add a open command to the self._openCommands list

Parameters:command (string) – the command which should be added
addReleaseCmd(command)[source]

this method will add a release command to the self._releaseCommands list

Parameters:command (string) – the command which should be added
addSaveCmd(command)[source]

this method will add a save command to the self._saveCommands list

Parameters:command (string) – the command which should be added
addSetupCmd(command)[source]

this method will add a setup command to the self._setupCommands list

Parameters:command (string) – the command which should be added
addUpdateCmd(command)[source]

this method will add a update command to the self._updateCommands list

Parameters:command (string) – the command which should be added
evalCommand = ''

command, which has to be put in front of every or certain commands to be evaluated/executed correctly

fillClose()[source]

method has to be reimplemented to generate a list of commands which should be executed in case a scene should be closed

please use the addCloseCmd to append to the list.

fillOpen()[source]

method has to be reimplemented to generate a list of commands which should be executed in case a scene should be opened

please use the addOpenCmd to append to the list.

fillRelease()[source]

method has to be reimplemented to generate a list of commands which should be executed in case a scene should be released

please use the addReleaseCmd to append to the list.

fillSave()[source]

method has to be reimplemented to generate a list of commands which should be executed in case a scene should be saved

please use the addSaveCmd to append to the list.

fillSetup()[source]

method has to be reimplemented to generate a list of commands which should be executed in case a scene should be setup

please use the addSetupCmd to append to the list.

fillUpdate()[source]

method has to be reimplemented to generate a list of commands which should be executed in case a scene should be updated

please use the addUpdateCmd to append to the list.

getWildcards()[source]

method will return all wildcards set in this derivate of AbstractConnection

Returns:all keys of self.wildcardWords
Return type:list of string
launchCommand = ''

command which has to run in the shell to launch the application this connection is using.

listCommandLists()[source]

method will list all command lists

use the pprint module to list them up nicely

Returns:all commandLists
Return type:dictionary
replaceWildcards(cmd)[source]

method replaces all known wildcards from the given command with the result of the lambda-function associated with the same wildcard

Parameters:cmd (string) – command
Returns:the replaced command
Return type:string

ConnectionManager

class pipeLion.connections.managers.connectionManager.ConnectionManager(parent, children=None)[source]
checkRunning()[source]

method should hold this thread until the software is fully loaded

Returns:boolean if the application is running or not
Return type:boolean
connectToSoftware()[source]

this method needs to be reimplemented for every derivate if AbstractConnection. It should return an object, which is able to connect to the software, this derivate is representing and sending over commands and receiving responses.

Returns:method should return an object, which is already connected to the software. and which can be used for communication with the third party application
Return type:variant
disconnectFromSoftware(connection)[source]

this method should disconnect a given connection-object from a third-party application. Method has to be reimplemented for new derivates of AbstractConnection

Parameters:connection (variant) – connection object, which is currently connected to a third party application. type depends on the type returned by the connectToSoftware instancemethod
Returns:integer indicating wether the disconnection was successful or not (0 or 1)
Return type:integer
doClose()[source]

method will call all commands to close an asset

doOpen()[source]

method will open an existing working scene

doRelease()[source]

method will call all commands to release an asset in case it should be done in the background

doReleaseFromScene()[source]

method will call all commands to release an asset in case the scene is already open

doSave()[source]

method will call all commands to save an asset

doSetup()[source]

method will call all commands to setup an asset from scratch

doUpdate()[source]

method will call all commands to update an asset

getGatherElements()[source]

method will return a list of all dependent assets needed to setup an asset

Returns:list of dependent assets
Return type:list of AbstractAsset
getUpdateElements(listOfElements)[source]

method will takes a list of dependentAssets and will try to find out which assets are out of date it will generate a list of tuples which hold 1st the old id and 2nd the latest id of the same asset

Parameters:listOfElements (list of ids) – list of all dependent assets of the parent
Returns:list of tuples which hold 1st the old id and 2nd the latest id of the same asset
Return type:list of tuples
launchSoftware()[source]

method will launch the software, this connection is connected to in a separate thread and then wait until it’s fully loaded

publish()[source]

method will call the release process of this connection

sendCommand(connection, command)[source]

method has to be reimplemented for each derived class of AbstractConnection it should define a way the pipelion sends data to a third-party application and receives a response.

The method is called by the protected method _sendCmd. That protected method will connect to the application via the connectToSoftware method which will return a connection-object. This method will then use the returned connection-object to transmit a command and receives the response. the returned response is then returned. the connection will be closed again by the protected method.

This method can be used to encode and decode the command-strings and to call the right sending and receiving methods on the variant object connection

Parameters:
  • connection (variant) – the object, which is returned by connectToSoftware
  • command (string) – the command which should be send to the server
Returns:

integer indicating wether the disconnection was successful or not (0 or 1)

Return type:

integer

softwareCheckInThread(*args)[source]

method launches the connected software, and checks if it was closed.

method is running in a different thread

Table Of Contents

Previous topic

connections

Next topic

implemented-connections

This Page