openpypeline.core package

Subpackages

Submodules

openpypeline.core.localization module

File: localization.py Description: Core Localization Manager for openPypeline Studio.

Handles loading JSON language files and retrieving UI strings.

class openpypeline.core.localization.LocalizationManager[source]

Bases: object

load_language(lang_code=None)[source]

Loads the specified language JSON file into memory.

get_string(key, default=None)[source]

openpypeline.core.models module

File: models.py Description: Core Data Classes and Enums for openPypeline Studio.

These models encapsulate pipeline data, replacing long argument lists and magic numbers throughout the framework.

class openpypeline.core.models.Tab(value)[source]

Bases: IntEnum

Represents the active browser tab in the UI.

ASSET = 2
SHOT = 3
class openpypeline.core.models.Level(value)[source]

Bases: IntEnum

Represents the depth level of an item in the hierarchy.

TYPE_OR_SEQUENCE = 1
ASSET_OR_SHOT = 2
COMPONENT = 3
class openpypeline.core.models.ItemContext(tab: int, level1: str = '', level2: str = '', level3: str = '')[source]

Bases: object

Encapsulates the location of an item within the openPypeline hierarchy. Replaces the repetitive (tab, level1, level2, level3) arguments.

tab: int
level1: str = ''
level2: str = ''
level3: str = ''
property depth: int

Returns how deep in the hierarchy this item is (0 to 3).

property item_name: str

Returns the specific name of this item.

property parent_name: str

Returns the name of this item’s immediate parent.

class openpypeline.core.models.ProjectConfig(name: str, path: str, description: str = '', date: str = '', deadline: str = '', status: str = '1', mastername: str = 'master', masterformat: str = 'ma', wipname: str = 'wip', wipformat: str = 'ma', libraryfolder: str = 'scenes/assets', scenesfolder: str = 'scenes', archivefolder: str = 'archive', deletedfolder: str = 'deleted', scriptsfolder: str = 'scripts', rendersfolder: str = 'images/renders', particlesfolder: str = 'particles', texturesfolder: str = 'sourceimages', users: str = '', userMode: str = '0')[source]

Bases: object

Encapsulates all settings and paths for a Project. Replaces functions that take 22+ arguments.

name: str
path: str
description: str = ''
date: str = ''
deadline: str = ''
status: str = '1'
mastername: str = 'master'
masterformat: str = 'ma'
wipname: str = 'wip'
wipformat: str = 'ma'
libraryfolder: str = 'scenes/assets'
scenesfolder: str = 'scenes'
archivefolder: str = 'archive'
deletedfolder: str = 'deleted'
scriptsfolder: str = 'scripts'
rendersfolder: str = 'images/renders'
particlesfolder: str = 'particles'
texturesfolder: str = 'sourceimages'
users: str = ''
userMode: str = '0'

openpypeline.core.ops_actions module

openpypeline.core.ops_info module

File: opsInfo.py Description: Info Retrieval functions for openPypeline Studio.

Handles fetching the current state of the pipeline, reading paths, versions, UI states, etc. Refactored from openPipelineInfo.mel to Python 3.

Original Framework: openPipeline by Kickstand License: Common Public License 1.0 (CPL-1.0)

openpypeline.core.ops_info.get_project_list()[source]

Returns the names of all existing projects.

openpypeline.core.ops_info.get_custom_notes(context)[source]

Get an item’s custom notes.

openpypeline.core.ops_info.get_date()[source]

Returns the current date using the user’s preferred format.

openpypeline.core.ops_info.get_time()[source]

Returns the current time using the user’s preferred format.

openpypeline.core.ops_info.has_wip(context)[source]

Returns whether an item has at least one WIP.

openpypeline.core.ops_info.has_master(context)[source]

Returns whether an item has at least one master.

openpypeline.core.ops_info.has_playblast(context)[source]

Returns whether an item has a playblast.

openpypeline.core.ops_info.get_wips(context, archive=0)[source]

Returns the WIP files for a given item, from newest to oldest.

openpypeline.core.ops_info.get_versions(context, archive=0)[source]

Returns all of the version files for a given item, from newest to oldest.

openpypeline.core.ops_info.get_num_wips(context, archive=0)[source]

Returns the number of WIPs an item has.

openpypeline.core.ops_info.get_num_versions(context, archive=0)[source]

Returns the number of versions an item has.

openpypeline.core.ops_info.get_version_from_file(filepath)[source]

Extracts the integer version number suffix from a given filename.

openpypeline.core.ops_info.get_latest_wip_version(context)[source]

Returns the version of the latest WIP for a given item.

openpypeline.core.ops_info.get_file_name(context, mode, offset=0, archive=0)[source]

Returns the full path of a folder or filename pertinent to the given item, dictating openPypeline’s file naming conventions.

openpypeline.core.ops_info.get_children(context)[source]

Returns the children of the given item.

openpypeline.core.ops_info.get_category(context)[source]

Returns the category of a given item (shot, asset, component, etc.)

openpypeline.core.ops_info.get_currently_open_path()[source]

Returns the path of the currently open item.

openpypeline.core.ops_info.get_thumbnail(context)[source]

Get the filename of an item’s thumbnail image.

openpypeline.core.ops_info.get_event_notes(context)[source]

Get an item’s event history.

openpypeline.core.ops_info.get_currently_selected_item(tab, depth)[source]

Get the currently selected item under the given tab in the UI.

openpypeline.core.ops_info.get_current_context(tab, depth)[source]

Returns an ItemContext data class representing the currently selected item in the UI.

openpypeline.core.ops_notes module

File: ops_notes.py Description:

Note Management and Formatting for openPypeline Studio. Handles reading, parsing, and formatting JSON event notes. Refactored from XML legacy formats to modern JSON.

Original Framework: openPipeline by Kickstand License: Common Public License 1.0 (CPL-1.0)

openpypeline.core.ops_notes.read_notes_formatted(input_path)[source]

Formats notes in JSON format to be displayed as text.

openpypeline.core.ops_notes.format_note(note_dict)[source]

Formats a JSON note dictionary to be displayed.

openpypeline.core.ops_notes.read_all_notes(input_path)[source]

Read all notes of a specified item, returned in reverse order.

openpypeline.core.ops_notes.count_notes(input_path)[source]

Counts the number of note entries for a specific item.

openpypeline.core.ops_notes.read_individual_note(input_path, index)[source]

Reads an individual note.

openpypeline.core.ops_notes.read_notes_by_event(input_path, event_type)[source]

Read all notes that describe a particular event.

openpypeline.core.ops_notes.read_notes_by_type(input_path, note_type)[source]

Read all notes that match a particular type.

openpypeline.core.ops_notes.read_notes_by_version(input_path, version)[source]

Read all notes that match a particular version.

openpypeline.core.ops_notes.cull_notes_by_version(all_notes, version)[source]

Filter notes that match a particular version.

openpypeline.core.ops_project module

Module contents