DNAViewer.ui package
Submodules
dna_viewer.ui.app module
- class dna_viewer.ui.app.DnaViewerWindow(parent: Optional[PySide2.QtWidgets.QWidget] = None)[source]
Bases:
PySide2.QtWidgets.QMainWindow
UI Window
- @type select_dna_path
- Type
- @param select_dna_path
- Type
The FileChooser widget for getting the DNA path
- @type load_dna_btn
- Type
QPushButton
- @param load_dna_btn
- Type
The button that starts loading in the DNA
- @type mesh_tree_list
- Type
QWidget
- @param mesh_tree_list
- Type
The widget that contains the meshes to be selected in a tree list
- @type joints_cb
- Type
QCheckBox
- @param joints_cb
- Type
The checkbox that represents if joints should be added
- @type blend_shapes_cb
- Type
QCheckBox
- @param blend_shapes_cb
- Type
The checkbox that represents if blend shapes should be added
- @type skin_cb
- Type
QCheckBox
- @param skin_cb
- Type
The checkbox that represents if skin should be added
- @type rig_logic_cb
- Type
QCheckBox
- @param rig_logic_cb
- Type
The checkbox that represents if rig logic should be added
- @type ctrl_attributes_on_root_joint_cb
- Type
QCheckBox
- @param ctrl_attributes_on_root_joint_cb
- Type
The checkbox that represents if control attributes on joint should be added
- @type animated_map_attributes_on_root_joint_cb
- Type
QCheckBox
- @param animated_map_attributes_on_root_joint_cb
- Type
The checkbox that represents if animated maps attributes on root joint should be added
- @type mesh_name_to_blend_shape_channel_name_cb
- Type
QCheckBox
- @param mesh_name_to_blend_shape_channel_name_cb
- Type
The checkbox that represents if mesh names to blend shapes channel name should be added
- @type key_frames_cb
- Type
QCheckBox
- @param key_frames_cb
- Type
The checkbox that represents if key frames should be added
- @type select_gui_path
- Type
- @param select_gui_path
- Type
The FileChooser widget for getting the gui path
- @type select_analog_gui_path
- Type
- @param select_analog_gui_path
- Type
The FileChooser widget for getting the analog gui path
- @type select_aas_path
- Type
- @param select_aas_path
- Type
The FileChooser widget for getting the additional assemble script path
- @type process_btn
- Type
QPushButton
- @param process_btn
- Type
The button that starts creating the scene and character
- @type progress_bar
- Type
QProgressBar
- @param progress_bar
- Type
The progress bar that shows the building progress
- animated_map_attributes_on_root_joint_cb = None
- blend_shapes_cb = None
- create_aas_selector() → dna_viewer.ui.widgets.FileChooser[source]
Creates and adds the additional assemble script selector widget
@rtype: FileChooser @returns: Additional assemble script selector widget
- create_analog_gui_selector() → dna_viewer.ui.widgets.FileChooser[source]
Creates and adds the analog gui selector widget
@rtype: FileChooser @returns: Analog gui selector widget
- create_body() → PySide2.QtWidgets.QVBoxLayout[source]
Creates the main body layout and adds needed widgets
@rtype: QVBoxLayout @returns: The created vertical box layout with the widgets added
- create_build_options() → PySide2.QtWidgets.QWidget[source]
Creates and adds the widget containing the build options checkboxes
- create_checkbox(label: str, hint: str, layout: PySide2.QtWidgets.QHBoxLayout, on_changed: Optional[Callable[[int], None]] = None, checked: bool = False, enabled: bool = False) → PySide2.QtWidgets.QCheckBox[source]
Adds a checkbox with given parameters and connects them to the on_changed method
@type label: str @param label: The label of the checkbox
@type hint: str @param hint: The hint of the checkbox
@type on_changed: Callable[[int], None] @param on_changed: The method that will get called when the checkbox changes states
@type checked: bool @param checked: The value representing if the checkbox is checked after creation
@type enabled: bool @param enabled: The value representing if the checkbox is enabled after creation
@rtype: QCheckBox @returns: the created checkbox object
- create_dna_chooser() → dna_viewer.ui.widgets.FileChooser[source]
Creates and adds the DNA chooser widget
@rtype: FileChooser @returns: Dna chooser widget
- create_dna_selector() → PySide2.QtWidgets.QWidget[source]
Creates and adds the DNA selector widget
@rtype: QWidget @returns: The created DNA selector widget
- create_extra_build_options() → PySide2.QtWidgets.QWidget[source]
Creates and adds the widget containing the extra build options checkboxes
- create_file_chooser(label: str, hint: str, caption: str, filter: str, on_changed: Optional[Callable[[int], None]] = None) → dna_viewer.ui.widgets.FileChooser[source]
Creates a file chooser widget that is used for selecting file paths
@type label: str @param label: The label in the FileDialog that pops up
@type hint: str @param hint: The label in the FileDialog that pops up
@type caption: str @param caption: The caption in the FileDialog that pops up
@type filter: str @param filter: The file filter that is used in the FileDialog
@rtype: FileChooser @returns: The created file chooser object
- create_gui_selector() → dna_viewer.ui.widgets.FileChooser[source]
Creates the gui selector widget
@rtype: FileChooser @returns: Gui selector widget
- create_header() → PySide2.QtWidgets.QHBoxLayout[source]
Creates and adds to the header widget
@rtype: QHBoxLayout @returns: The created horizontal box layout with the widgets added
- create_help_btn() → PySide2.QtWidgets.QWidget[source]
Creates the help button widget
@rtype: QHBoxLayout @returns: The created horizontal box layout with the widgets added
- create_load_dna_button(dna_input: dna_viewer.ui.widgets.FileChooser) → PySide2.QtWidgets.QWidget[source]
Creates and adds the load DNA button widget
@type input: FileChooser @param input: The file chooser object corresponding to the DNA selector widget
@rtype: QWidget @returns: The created load DNA button widget
- create_main_widget() → PySide2.QtWidgets.QWidget[source]
Creates the widget containing the UI elements
@rtype: QtWidgets.QWidget @returns: the main widget
- create_mesh_selector() → dna_viewer.ui.app.MeshTreeList[source]
Creates and adds a mesh tree list where the entries are grouped by lods, this is used for selecting the meses that need to be processed
@rtype: MeshTreeList @returns: The created mesh tree list widget
- create_process_btn() → PySide2.QtWidgets.QPushButton[source]
Creates and adds a process button
@type window: QMainWindow @param window: The instance of the window object
@rtype: QPushButton @returns: The created process button
- create_progress_bar() → PySide2.QtWidgets.QProgressBar[source]
Creates and adds progress bar
@type window: QMainWindow @param window: The instance of the window object
@rtype: QProgressBar @returns: The created progress bar
- ctrl_attributes_on_root_joint_cb = None
- dna = None
- is_checked(checkbox: PySide2.QtWidgets.QCheckBox) → bool[source]
Returns if the provided checkbox is checked and enabled
@type checkbox: QCheckBox @param checkbox: The checkbox thats value needs to be checked and enabled
@rtype: bool @returns: The flag representing if the checkbox is checked and enabled
- is_enabled_and_checked(check_box: PySide2.QtWidgets.QCheckBox) → bool[source]
Method that checks if check box is enabled in same time
@type check_box: QCheckBox @param check_box: The checkbox instance to check
- joints_cb = None
- key_frames_cb = None
- load_dna_btn = None
- main_widget = None
- static maya_main_window() → PySide2.QtWidgets.QWidget[source]
Gets the MayaWindow instance
@throws RuntimeError
@rtype: QtWidgets.QWidget @returns: main window instance
- mesh_name_to_blend_shape_channel_name_cb = None
- mesh_tree_list = None
- on_dna_changed(state: int) → None[source]
Method that gets called when the checkbox is changed
@type state: int @param state: The changed state of the checkbox
- on_dna_selected(input: dna_viewer.ui.widgets.FileChooser) → None[source]
The method that gets called when a DNA file gets selected
@type input: FileChooser @param input: The file chooser object corresponding to the DNA selector widget
- on_generic_changed(state: int) → None[source]
Method that gets called when the checkbox is changed
@type state: int @param state: The changed state of the checkbox
- on_joints_changed(state: int) → None[source]
Method that gets called when the joints checkbox is changed
@type state: int @param state: The changed state of the checkbox
- on_load_dna_clicked(input: dna_viewer.ui.widgets.FileChooser) → None[source]
The method that gets called when a DNA file gets selected
@type input: FileChooser @param input: The file chooser object corresponding to the DNA selector widget
- process() → None[source]
Start the build process of creation of scene from provided configuration from the UI
- process_btn = None
- progress_bar = None
- rig_logic_cb = None
- select_aas_path = None
- select_analog_gui_path = None
- select_dna_path = None
- select_gui_path = None
- set_progress(text: Optional[str] = None, value: Optional[int] = None) → None[source]
Setting text and/or value to progress bar
- skin_cb = None
- staticMetaObject = <PySide2.QtCore.QMetaObject object>
- class dna_viewer.ui.app.MeshTreeList(main_window: dna_viewer.ui.app.DnaViewerWindow)[source]
Bases:
PySide2.QtWidgets.QWidget
A custom widget that lists out meshes with checkboxes next to them, so these meshes can be selected to be processed. The meshes are grouped by LOD
@type mesh_tree: QWidget @param mesh_tree: The widget that contains the meshes to be selected in a tree list
- create_mesh_tree() → PySide2.QtWidgets.QWidget[source]
Creates the mesh tree list widget
@rtype: QWidget @returns: The created widget
- fill_mesh_list(lod_count: int, names: List[str], indices_names: List[List[int]]) → None[source]
Fills the mesh list with the meshes, and groups them by lods
@type lod_count: int @param lod_count: The LOD count
@type names: List[str] @param names: The names and indices of all the meshes
@type indices_names: List[List[int] @param indices_names: The names and indices of all the meshes
- get_selected_meshes() → List[int][source]
Gets the selected meshes from the tree widget
@rtype: List[int] @returns: The list of mesh indices that are selected
- iterate_over_items(state: <class 'PySide2.QtCore.Qt.CheckState'>) → None[source]
Deselects all meshes in the tree widget
- staticMetaObject = <PySide2.QtCore.QMetaObject object>
dna_viewer.ui.widgets module
- class dna_viewer.ui.widgets.FileChooser(label_text: str, hint: str, parent: Optional[PySide2.QtWidgets.QWidget] = None, placeholder: str = '', dialog_caption: str = 'Select a file', dialog_filter: str = 'All files (*.*)', button_text: str = '...', dir_selector: bool = False, on_changed: Optional[Callable[[int], None]] = None)[source]
Bases:
PySide2.QtWidgets.QWidget
A custom widget used for selecting a file path using a FileDialog and an input field
- get_file_path() → str[source]
Gets the file path from the text field
@rtype: str @returns: The file path contained in the text field
- open_dialog() → None[source]
Opens a file dialog, when a path is chosen, the text field gets filled with its value
- staticMetaObject = <PySide2.QtCore.QMetaObject object>
- class dna_viewer.ui.widgets.QHLine[source]
Bases:
dna_viewer.ui.widgets.QLine
A widget for creating a horizontal line
- staticMetaObject = <PySide2.QtCore.QMetaObject object>