vtool.process_manager.process¶
Class Summary
Process ([name]) |
This class has functions to work on individual processes in the Process Manager. |
Function Summary
find_processes ([directory, …]) |
This will try to find the processes in the supplied directory. |
is_process (directory) |
|
get_unused_process_name ([directory, name]) |
This will try to find a a process named process in the directory. |
get_default_directory () |
Get a default directory to begin in. |
copy_process (source_process[, target_process]) |
source process is an instance of a process that you want to copy |
copy_process_into (source_process, target_process) |
|
copy_process_data (source_process, …[, replace]) |
source_process and target_process need to be instances of the Process class. |
copy_process_code (source_process, …[, replace]) |
source_process and target_process need to be instances of the Process class. |
copy_process_setting (source_process, …) |
Functions
-
find_processes
(directory=None, return_also_non_process_list=False)¶ This will try to find the processes in the supplied directory. If no directory supplied, it will search the current working directory.
Parameters: directory (str) – The directory to search for processes. Returns: The procceses in the directory. Return type: list
-
is_process
(directory)¶
-
get_unused_process_name
(directory=None, name=None)¶ This will try to find a a process named process in the directory.
It will increment the name to process1 and beyond until it finds a unique name. If no directory supplied, it will search the current working directory.
Parameters: - directory (str) – Direcotry to search for processes.
- name (str) – name to give the process.
Returns: The unique process name.
Return type: str
-
get_default_directory
()¶ Get a default directory to begin in. The directory is different if running from inside Maya.
Returns: Path to the default directory. Return type: str
-
copy_process
(source_process, target_process=None)¶ source process is an instance of a process that you want to copy target_process is the instance of a process you want to copy to. If no target_process is specified, the target process will be set to the directory where the source process is located automatically. If there is already a process named the same in the target process, the name will be incremented. If you need to give the copy a specific name, you should rename it after copy.
Parameters: - source_process (str) – The instance of a process.
- target_process (str) – The instance of a process. If None give, duplicate the source_process.
-
copy_process_into
(source_process, target_process)¶
-
copy_process_data
(source_process, target_process, data_name, replace=False)¶ source_process and target_process need to be instances of the Process class. The instances should be set to the directory and process name desired to work with. data_name specifies the name of the data folder to copy. If replace the existing data with the same name will be deleted and replaced by the copy.
Parameters: - source_process (str) – The instance of a process.
- target_process (str) – The instance of a process.
- data_name (str) – The name of the data to copy.
- replace (bool) – Wether to replace the code in the target process or just version up.
-
copy_process_code
(source_process, target_process, code_name, replace=False)¶ source_process and target_process need to be instances of the Process class. The instances should be set to the directory and process name desired to work with. code_name specifies the name of the code folder to copy. If replace the existing code with the same name will be deleted and replaced by the copy.
Parameters: - source_process (str) – The instance of a process.
- target_process (str) – The instance of a process.
- code_name (str) – The name of the code to copy.
- replace (bool) – Wether to replace the code in the target process or just version up.
-
copy_process_setting
(source_process, target_process, setting_name)¶