openpypeline.core.util package

Submodules

openpypeline.core.util.XML module

class openpypeline.core.util.XML.xmlserialize[source]

Bases: object

exception openpypeline.core.util.XML.xmlunpicklingException[source]

Bases: Exception

class openpypeline.core.util.XML.xmlfile(filename=None)[source]

Bases: object

Class to handle saving / loading an xmlserialize object to file

load()[source]

Load xml from self.filename, return object

save(obj)[source]

Save node to self.filename

getMod(cls)[source]

cls would be in the form like module1.module2.cls Loops through __main__ to see how module1.module2 is imported Returns the class(obj) using the existing import method Returns None if the module or class isn’t found

getType(obj)[source]

Generates string representation of class of obj discarding decoration

pickle(root, fabric, elementName='root')[source]
unpickle(node, obj=None)[source]

main unpickle function

openpypeline.core.util.prefs module

File: prefs.py Description: DCC-agnostic preference manager for openPypeline Studio.

Replaces Maya’s optionVars by storing configurations in a centralized JSON file in the user’s home directory.

openpypeline.core.util.prefs.get_pref(key, default=None)[source]

Retrieves a preference by key. Returns default if not found.

openpypeline.core.util.prefs.set_pref(key, value)[source]

Sets a preference key to a specific value and saves it.

openpypeline.core.util.prefs.has_pref(key)[source]

Checks if a preference key exists.

openpypeline.core.util.prefs.remove_pref(key)[source]

Removes a preference key if it exists.

openpypeline.core.util.singleton module

class openpypeline.core.util.singleton.singleton(*args, **kwargs)[source]

Bases: object

A Pythonic Singleton

Module contents