genesis

class jukeboxcore.addons.genesis.genesis.GenesisWin(parent=None, flags=0)[source]

Bases: jukeboxcore.gui.main.JB_MainWindow, jukeboxcore.addons.genesis.genesis_ui.Ui_genesis_mwin

The abstract genesis tool window

The window uses the genesis.ui for it’s layout. It has a tab widget with two browsers to select shots and assets. There is a field to write a comment and buttons for opening and saving.

This is should be subclassed and GenesisWin.open_shot(), GenesisWin.open_asset(), GenesisWin.save_shot(), GenesisWin.save_asset(), GenesisWin.get_current_file() should be reimplemented.

Before creating an instance, call GenesisWin.set_filetype() at least once.

Constructs a new GenesisWin with the given parent

Parameters:
  • parent (QWidget) – Optional - the parent of the window - default is None
  • flags (QtCore.Qt.WindowFlags) – the window flags
Raises:

None

classmethod set_filetype(filetype)[source]

Set the allowed filetypes for the taskfiles that should be handled by Genesis

Parameters:filetype – the filetype from djadapter.FILETYPES
Returns:None
Return type:None
Raises:None
classmethod get_filetype()[source]

Return the allowed filetype

Returns:filetype from djadapter.FILETYPES
Return type:str
Raises:None
setup_ui()[source]

Create the browsers and all necessary ui elements for the tool

Returns:None
Return type:None
Raises:None
setup_icons()[source]

Set all icons on buttons

Returns:None
Return type:None
Raises:None
setup_signals()[source]

Connect the signals with the slots to make the ui functional

Returns:None
Return type:None
Raises:None
create_comment_edit()[source]

Create a text edit for comments

Returns:the created text edit
Return type:jukeboxcore.gui.widgets.textedit.JB_PlainTextEdit
Raises:None
asset_taskfile_sel_changed(tf)[source]

Callback for when the version selection has changed

Parameters:tf (TaskFileInfo | None) – the selected taskfileinfo
Returns:None
Return type:None
Raises:None
shot_taskfile_sel_changed(tf)[source]

Callback for when the version selection has changed

Parameters:tf (TaskFileInfo | None) – the selected taskfileinfo
Returns:None
Return type:None
Raises:None
update_descriptor_le(lineedit, tf)[source]

Update the given line edit to show the descriptor that is stored in the index

Parameters:
  • lineedit (QLineEdit) – the line edit to update with the descriptor
  • tf (TaskFileInfo | None) – the selected taskfileinfo
Returns:

None

Return type:

None

Raises:

None

get_current_file()[source]

Return the taskfile that is currently open or None if no taskfile is open

Returns:the open taskfile or None if no taskfile is open
Return type:djadapter.models.TaskFile | None
Raises:NotImplementedError
shot_open_callback(*args, **kwargs)[source]

Callback for the shot open button

Returns:None
Return type:None
Raises:None
asset_open_callback(*args, **kwargs)[source]

Callback for the shot open button

Returns:None
Return type:None
Raises:None
shot_save_callback(*args, **kwargs)[source]

Callback for the shot open button

Returns:None
Return type:None
Raises:None
asset_save_callback(*args, **kwargs)[source]

Callback for the shot open button

Returns:None
Return type:None
Raises:None
create_dir(jbfile)[source]

Create a dir for the given dirfile and display an error message, if it fails.

Parameters:jbfile (class:JB_File) – the jb file to make the directory for
Returns:None
Return type:None
Raises:None
open_shot(taskfile)[source]

Open the given taskfile

Parameters:taskfile (djadapter.models.TaskFile) – the taskfile for the shot
Returns:True if opening was successful
Return type:bool
Raises:NotImplementedError
save_shot(jbfile)[source]

Save the shot to the location of jbfile

Parameters:jbfile (jukeboxcore.filesys.JB_File) – the jbfile that can be used to query the location
Returns:None
Return type:None
Raises:NotImplementedError
open_asset(taskfile)[source]

Open the given taskfile

Parameters:taskfile (djadapter.models.TaskFile) – the taskfile for the asset
Returns:True if opening was successful
Return type:bool
Raises:NotImplementedError
save_asset(taskfile)[source]

Save the shot to the location of jbfile

Parameters:jbfile (jukeboxcore.filesys.JB_File) – the jbfile that can be used to query the location
Returns:None
Return type:None
Raises:NotImplementedError
check_selection_for_save(task, releasetype, descriptor)[source]

Emit warnings if the descriptor is None or the current file is of a different task.

Parameters:
  • task (djadapter.models.Task) – the selected task
  • releasetype (str) – the releasetype to save (probably work)
  • descriptor (str) – the descriptor
Returns:

True if check was successfull.

Return type:

bool

Raises:

None

create_db_entry(tfi)[source]

Create a db entry for the given task file info

Parameters:tfi (jukeboxcore.filesys.TaskFileInfo) – the info for a TaskFile entry in the db
Returns:the created taskfile and note
Return type:tuple
Raises:ValidationError
staticMetaObject = <PySide.QtCore.QMetaObject object at 0x0000000005008BC8>
class jukeboxcore.addons.genesis.genesis.Genesis[source]

Bases: jukeboxcore.plugins.JB_CorePlugin

Core plugin for all tools that implement opening and saving shots and assets in a software.

Constructs a new Plugin

Returns:None
Return type:None
Raises:None
author = 'David Zuber'
copyright = '2014'
version = '0.1'
description = 'A abstract tool for saving and opening shots and assets.'
init()[source]

Do nothing

Returns:None
Return type:None
Raises:None
uninit()[source]

Do nothing

Returns:None
Return type:None
Raises:None
GenesisWin[source]

Return the GenesisWin class

Returns:the genesis win class
Return type:GenesisWin
Raises:None