facebook360_dep
Facebook360 Depth Estimation Pipeline
Public Member Functions | Public Attributes | List of all members
export.Export Class Reference

Public Member Functions

def __init__ (self, parent)
 
def setup_aws_config (self)
 
def add_data_type_validators (self)
 
def initialize_viewer_buttons (self)
 
def setup_farm (self)
 
def initialize_paths (self)
 
def switch_ui_elements_for_processing (self, state)
 
def sync_with_s3 (self)
 
def on_process_finished (self, exitCode, exitStatus, p_id)
 
def setup_logs (self)
 
def set_default_top_level_paths (self, mkdirs=False)
 
def get_ec2_instance_types (self)
 
def get_valid_types (self)
 
def get_frame_names (self)
 
def get_files (self, tag)
 
def update_buttons (self, gb)
 
def get_format (self, flags_from_data=True)
 
def get_color_scale (self, dst_width, color_type)
 
def update_flags_from_data (self, flags)
 
def get_format_from_value (self, value)
 
def update_data_from_flags (self, flags)
 
def update_data_or_flags (self, flagfile_fn, flagfile_from_data, switch_to_flag_tab=False)
 
def update_flagfile_edit (self, flagfile_fn, switch_to_flag_tab=True)
 
def refresh_data (self)
 
def setup_project (self, mkdirs=False)
 
def refresh (self)
 
def update_flagfile (self, flagfile_fn)
 
def save_flag_file (self)
 
def retrieve_missing_flagfiles (self)
 
def add_default_flags (self)
 
def activate_ipc (self, ipc_name)
 
def is_local_render (self)
 
def run_process (self)
 
def cancel_process (self)
 
def reset_run_button_text (self)
 
def update_run_button_text (self)
 
def on_changed_flagfile_edit (self)
 
def on_ec2_dashboard (self)
 
def on_download_meshes (self)
 
def get_logs (self)
 
def setup_flags (self)
 
def update_viewer_buttons (self)
 
def update_ec2_dropdown (self)
 
def update_file_type (self)
 
def update_label_resolution (self)
 
def on_state_changed_recompute (self)
 
def update_frame_range_dropdowns (self)
 
def on_changed_dropdown (self, gb, dd)
 
def on_changed_line_edit (self, gb, le)
 
def on_state_changed_alpha_blend (self)
 
def on_state_changed_farm (self, state)
 
def on_terminate_cluster (self)
 
def on_changed_preview (self)
 
def populate_dropdowns (self, gb)
 
def setup_data (self)
 
def disable_tab_if_no_data (self)
 

Public Attributes

 parent
 
 tag
 
 dlg
 
 is_viewer_rift_hidden
 
 is_viewer_smr_hidden
 
 formats
 
 is_host_linux_gpu
 
 is_local_non_win
 
 log_reader
 

Detailed Description

Tab in UI responsible for producing meshed binaries and other final output formats
(e.g. color and disparity equirects) and viewing them in corresponding PC and
headset displays.

Attributes:
    dlg (App(QDialog)): Main dialog box for the app initialized by QT.
    formats (dict[str, str]): Formats that can be rendered given the render configuration.
    is_farm (bool): Whether or not this is a farm render.
    is_host_linux_gpu (bool): Whether or not this is a Linux GPU machine or not.
    is_local_non_win (bool): Whether this is a Windows machine or not.
    is_viewer_rift_hidden (bool): Whether or not to display the "RiftViewer" button.
    is_viewer_smr_hidden (bool): Whether or not to display the "SimpleMeshRenderer" button.
    log_reader (LogReader(QtCore.QObject)): Object to interact with UI logging system.
    parent (App(QDialog)): Object corresponding to the parent UI element.
    path_rig_json (str): Path to the rig JSON.
    tag (str): Semantic name for the tab.

Constructor & Destructor Documentation

◆ __init__()

def export.Export.__init__ (   self,
  parent 
)
Initializes the Export tab.

Args:
    parent (App(QDialog)): Object corresponding to the parent UI element.

Member Function Documentation

◆ activate_ipc()

def export.Export.activate_ipc (   self,
  ipc_name 
)
Runs an application. This only works if the app is set up with a corresponding
IPC file that is monitored by the Watchdog (defined in config.py).

Args:
    ipc_name (str): Name of the binary (must be a case in config.get_app_name).
Otherwise this is a no-op.

◆ add_data_type_validators()

def export.Export.add_data_type_validators (   self)
Adds validators for UI elements.

◆ add_default_flags()

def export.Export.add_default_flags (   self)
Retrieves the default flags to the local flagfile.

◆ cancel_process()

def export.Export.cancel_process (   self)
Stops a running process.

◆ disable_tab_if_no_data()

def export.Export.disable_tab_if_no_data (   self)
Prevents navigation to the tab if the required data is not present.

◆ get_color_scale()

def export.Export.get_color_scale (   self,
  dst_width,
  color_type 
)

◆ get_ec2_instance_types()

def export.Export.get_ec2_instance_types (   self)
Gets valid instances that can be spawned for a job.

Returns:
    list[str]: Names of valid instance types.

◆ get_files()

def export.Export.get_files (   self,
  tag 
)
Retrieves file names corresponding to the desired attribute.

Args:
    tag (str): Semantic name for the attribute.

Returns:
    list[str]: List of file names.

Raises:
    Exception: If a tag is requested with no associated files.

◆ get_format()

def export.Export.get_format (   self,
  flags_from_data = True 
)
Gets format to populate the flagfile.

Args:
    flags_from_data (dict[str, _]): Flags and their values, typically
pulled from the UI.

Returns:
    str: Format in the UI that should populate the flagfile.

◆ get_format_from_value()

def export.Export.get_format_from_value (   self,
  value 
)
Gets format to populate the UI from the flagfile. This is needed since the
format displayed on the UI and in the internal pipeline differ (for readability).

Args:
    value (str): Value from the flagfile (i.e. eqrcolor).

Returns:
    str: Format to be displayed in the UI (i.e. Equirect Color).

◆ get_frame_names()

def export.Export.get_frame_names (   self)
Finds all the frames in a local directory.

Returns:
    list[str]: Sorted list of frame names in the directory.

◆ get_logs()

def export.Export.get_logs (   self)
Callback event handler for clicking the "Logs" button.

◆ get_valid_types()

def export.Export.get_valid_types (   self)
Checks which render types are valid.

Returns:
    list[str]: Subset of ("background", "video") depending on if the corresponding
inputs are present.

◆ initialize_paths()

def export.Export.initialize_paths (   self)
Initializes paths for scripts and flags.

◆ initialize_viewer_buttons()

def export.Export.initialize_viewer_buttons (   self)
Sets up buttons to IPC callbacks on the host.

◆ is_local_render()

def export.Export.is_local_render (   self)
Whether or not the current render is configured to be performed locally.

Returns:
    bool: If the render will be performed locally.

◆ on_changed_dropdown()

def export.Export.on_changed_dropdown (   self,
  gb,
  dd 
)
Callback event handler for changed dropdown.

Args:
    gb (QtWidgets.QGroupBox): Group box for the tab.
    dd (QtWidgets.QComboBox): Dropdown UI element.

◆ on_changed_flagfile_edit()

def export.Export.on_changed_flagfile_edit (   self)
Callback event handler for flagfile edits.

◆ on_changed_line_edit()

def export.Export.on_changed_line_edit (   self,
  gb,
  le 
)
Callback event handler for changed line edit.

Args:
    gb (QtWidgets.QGroupBox): Group box for the tab.
    le (QtWidgets.QLineEdit): Line edit UI element.

◆ on_changed_preview()

def export.Export.on_changed_preview (   self)
Callback event handler for changed image previews.

◆ on_download_meshes()

def export.Export.on_download_meshes (   self)
Callback event handler for clicking the "Download Meshes" button.

◆ on_ec2_dashboard()

def export.Export.on_ec2_dashboard (   self)
Callback event handler for clicking the "EC2 Dashboard" button.

◆ on_process_finished()

def export.Export.on_process_finished (   self,
  exitCode,
  exitStatus,
  p_id 
)
Callback event handler for a process completing.

Args:
    exitCode (int): Return code from running the process.
    exitStatus (str): Description message of process exit.
    p_id (str): PID of completed process.

◆ on_state_changed_alpha_blend()

def export.Export.on_state_changed_alpha_blend (   self)
Callback event handler for changed alpha value.

◆ on_state_changed_farm()

def export.Export.on_state_changed_farm (   self,
  state 
)
Callback event handler for changed "AWS" checkbox.

Args:
    state (str): Identifier of the callback state.

◆ on_state_changed_recompute()

def export.Export.on_state_changed_recompute (   self)
Callback event handler for clicking the "Re-compute" checkbox.

◆ on_terminate_cluster()

def export.Export.on_terminate_cluster (   self)
Terminates a running cluster.

◆ populate_dropdowns()

def export.Export.populate_dropdowns (   self,
  gb 
)
Populates the dropdowns in the tab.

Args:
    gb (QtWidgets.QGroupBox): Group box for the tab.

◆ refresh()

def export.Export.refresh (   self)
Resets the UI tab to its start state.

◆ refresh_data()

def export.Export.refresh_data (   self)
Updates UI elements to be in sync with data on disk.

◆ reset_run_button_text()

def export.Export.reset_run_button_text (   self)

◆ retrieve_missing_flagfiles()

def export.Export.retrieve_missing_flagfiles (   self)
Copies the missing flagfiles to project for local modification.

◆ run_process()

def export.Export.run_process (   self)
Runs the default binary associated with the tab.

◆ save_flag_file()

def export.Export.save_flag_file (   self)
Saves flagfile from the UI to disk.

◆ set_default_top_level_paths()

def export.Export.set_default_top_level_paths (   self,
  mkdirs = False 
)
Defines class referenceable attributes for paths. See common for full set
of definitions.

Args:
    mkdirs (bool, optional): Whether or not to make the defined directories.

◆ setup_aws_config()

def export.Export.setup_aws_config (   self)
Configures the AWS credentials.

◆ setup_data()

def export.Export.setup_data (   self)
Sets up callbacks and initial UI element statuses.

◆ setup_farm()

def export.Export.setup_farm (   self)
Sets up a Kubernetes farm for AWS renders.

◆ setup_flags()

def export.Export.setup_flags (   self)
Sets up the flags according to the corresponding flagfile.

◆ setup_logs()

def export.Export.setup_logs (   self)
Sets up logging system for dialog on the current tab.

◆ setup_project()

def export.Export.setup_project (   self,
  mkdirs = False 
)
Retrieves any missing flagfiles and sets the default flags for the tab.

Args:
    mkdirs (bool, optional): Whether or not to make the directories where the
outputs are saved by default.

◆ switch_ui_elements_for_processing()

def export.Export.switch_ui_elements_for_processing (   self,
  state 
)
Switches element interaction when processing.

Args:
    state (bool): State to which elements should be changed to (i.e.
True for enabled, False for disabled)

◆ sync_with_s3()

def export.Export.sync_with_s3 (   self)
Syncs data available locally with the S3 bucket.

◆ update_buttons()

def export.Export.update_buttons (   self,
  gb 
)
Enables buttons and dropdowns according to whether or not data is present.

Args:
    gb (QtWidgets.QGroupBox): Group box for the tab.

◆ update_data_from_flags()

def export.Export.update_data_from_flags (   self,
  flags 
)
Updates UI elements from the flags.

Args:
    flags (dict[str, _]): Flags corresponding to the tab default binary.

◆ update_data_or_flags()

def export.Export.update_data_or_flags (   self,
  flagfile_fn,
  flagfile_from_data,
  switch_to_flag_tab = False 
)
Updates the flagfile from the UI elements or vice versa.

Args:
    flagfile_fn (str): Name of the flagfile.
    flagfile_from_data (bool): Whether to load the flagfile from the data (True) or
vice versa (False).
    switch_to_flag_tab (bool, optional): Whether or not to switch tabs after updating.

◆ update_ec2_dropdown()

def export.Export.update_ec2_dropdown (   self)
Displays only valid values in the dropdown for EC2 instance types.

◆ update_file_type()

def export.Export.update_file_type (   self)
Enables/disables file type depending on the format

◆ update_flagfile()

def export.Export.update_flagfile (   self,
  flagfile_fn 
)
Updates the flagfile from UI elements.

Args:
    flagfile_fn (str): Name of the flagfile.

◆ update_flagfile_edit()

def export.Export.update_flagfile_edit (   self,
  flagfile_fn,
  switch_to_flag_tab = True 
)
Updates the edit box for the flagfile.

Args:
    flagfile_fn (str): Name of the flagfile.
    switch_to_flag_tab (bool, optional): Whether or not to switch tabs after updating.

◆ update_flags_from_data()

def export.Export.update_flags_from_data (   self,
  flags 
)
Updates flags from the UI elements.

Args:
    flags (dict[str, _]): Flags corresponding to the tab default binary.

◆ update_frame_range_dropdowns()

def export.Export.update_frame_range_dropdowns (   self)
Updates ranges displayed in dropdowns per available files on disk.

◆ update_label_resolution()

def export.Export.update_label_resolution (   self)

◆ update_run_button_text()

def export.Export.update_run_button_text (   self)
Updates the text of the Run button depending on the existance of a process
running on the cloud

◆ update_viewer_buttons()

def export.Export.update_viewer_buttons (   self)
Only enable viewer buttons based on what is possible from the host, i.e.
RiftViewer will be disabled on any non-Windows computer.

Member Data Documentation

◆ dlg

export.Export.dlg

◆ formats

export.Export.formats

◆ is_host_linux_gpu

export.Export.is_host_linux_gpu

◆ is_local_non_win

export.Export.is_local_non_win

◆ is_viewer_rift_hidden

export.Export.is_viewer_rift_hidden

◆ is_viewer_smr_hidden

export.Export.is_viewer_smr_hidden

◆ log_reader

export.Export.log_reader

◆ parent

export.Export.parent

◆ tag

export.Export.tag

The documentation for this class was generated from the following file: