def setup_ui(self): """add tools """ # create the main tab layout main_tab_widget = QtWidgets.QTabWidget(self.widget()) self.addWidget(main_tab_widget) # add the General Tab general_tab_widget = QtWidgets.QWidget(self.widget()) general_tab_vertical_layout = QtWidgets.QVBoxLayout() general_tab_vertical_layout.setSizeConstraint( QtWidgets.QLayout.SetMaximumSize) general_tab_widget.setLayout(general_tab_vertical_layout) main_tab_widget.addTab(general_tab_widget, 'Generic') # Create tools for general tab # ------------------------------------------------------------------- # Version Creator add_button('Version Creator', general_tab_vertical_layout, GenericTools.version_creator, callback_kwargs={"parent": self.parent()}) # Loader Report add_button('Loader Report', general_tab_vertical_layout, GenericTools.loader_report) # ------------------------------------------------------------------- # Add the stretcher general_tab_vertical_layout.addStretch()
def setup_ui(self): """add tools """ # create the main tab layout main_tab_widget = QtWidgets.QTabWidget(self.widget()) self.addWidget(main_tab_widget) # add the General Tab general_tab_widget = QtWidgets.QWidget(self.widget()) general_tab_vertical_layout = QtWidgets.QVBoxLayout() general_tab_widget.setLayout(general_tab_vertical_layout) main_tab_widget.addTab(general_tab_widget, 'Generic') # Create tools for general tab from anima.ui.utils import add_button # ------------------------------------------------------------------- # Per Clip Output Generator add_button('Per Clip Output Generator', general_tab_vertical_layout, GenericTools.per_clip_output_generator) # Clip Output Generator # create a new layout layout = QtWidgets.QHBoxLayout() general_tab_vertical_layout.addLayout(layout) clip_index_spinbox = QtWidgets.QSpinBox() clip_index_spinbox.setMinimum(1) version_spinbox = QtWidgets.QSpinBox() version_spinbox.setMinimum(1) def clip_output_generator_wrapper(): clip_index = clip_index_spinbox.value() version_number = version_spinbox.value() GenericTools.clip_output_generator(clip_index, version_number) add_button('Clip Output Generator', layout, clip_output_generator_wrapper) layout.addWidget(clip_index_spinbox) layout.addWidget(version_spinbox) # ------------------------------------------------------------------- # Add the stretcher general_tab_vertical_layout.addStretch()
def setup_ui(self): """add tools """ # create the main tab layout main_tab_widget = QtWidgets.QTabWidget(self.widget()) self.addWidget(main_tab_widget) # add the General Tab general_tab_widget = QtWidgets.QWidget(self.widget()) general_tab_vertical_layout = QtWidgets.QVBoxLayout() general_tab_widget.setLayout(general_tab_vertical_layout) main_tab_widget.addTab(general_tab_widget, 'Generic') # Create tools for general tab from anima.ui.utils import add_button # ------------------------------------------------------------------- # Template template_line_edit = QtWidgets.QLineEdit() # template_line_edit.setPlaceHolder("Template") template_line_edit.setText(GenericTools.default_output_template) general_tab_vertical_layout.addWidget(template_line_edit) # ------------------------------------------------------------------- # Per Clip Output Generator # create a new layout layout = QtWidgets.QHBoxLayout() general_tab_vertical_layout.addLayout(layout) per_clip_version_label = QtWidgets.QLabel() per_clip_version_label.setText("Version") per_clip_version_spinbox = QtWidgets.QSpinBox() per_clip_version_spinbox.setMinimum(1) def per_clip_output_generator_wrapper(): version_number = per_clip_version_spinbox.value() template = template_line_edit.text() GenericTools.per_clip_output_generator( version_number=version_number, template=template) add_button('Per Clip Output Generator', layout, per_clip_output_generator_wrapper) layout.addWidget(per_clip_version_label) layout.addWidget(per_clip_version_spinbox) # Clip Output Generator # create a new layout layout = QtWidgets.QHBoxLayout() general_tab_vertical_layout.addLayout(layout) clip_index_label = QtWidgets.QLabel() clip_index_label.setText("Clip Index") clip_index_spinbox = QtWidgets.QSpinBox() clip_index_spinbox.setMinimum(1) version_label = QtWidgets.QLabel() version_label.setText("Version") version_spinbox = QtWidgets.QSpinBox() version_spinbox.setMinimum(1) def clip_output_generator_wrapper(): clip_index = clip_index_spinbox.value() version_number = version_spinbox.value() GenericTools.clip_output_generator(clip_index, version_number) add_button('Clip Output Generator', layout, clip_output_generator_wrapper) layout.addWidget(clip_index_label) layout.addWidget(clip_index_spinbox) layout.addWidget(version_label) layout.addWidget(version_spinbox) # add_button( # "Get Shot Code", # general_tab_vertical_layout, # GenericTools.get_shot_code, # GenericTools.get_shot_code.__doc__ # ) # # ------------------------------------------------------------------- # # Set Shot Code # # layout = QtWidgets.QHBoxLayout() # general_tab_vertical_layout.addLayout(layout) # # set_clip_code_label = QtWidgets.QLabel() # set_clip_code_label.setText("Code") # set_clip_code_line_edit = QtWidgets.QLineEdit() # # def set_shot_code_wrapper(): # shot_code = set_clip_code_line_edit.text() # GenericTools.set_shot_code(shot_code) # # layout.addWidget(set_clip_code_label) # layout.addWidget(set_clip_code_line_edit) # add_button( # "Set Shot Code", # layout, # set_shot_code_wrapper, # GenericTools.set_shot_code.__doc__, # ) def parent_ui_callback(): GenericTools.shot_manager(parent_ui=self.parent()) add_button("Shot Manager", general_tab_vertical_layout, parent_ui_callback, GenericTools.shot_manager.__doc__) # add_button( # "Get Current Thumbnail", # general_tab_vertical_layout, # GenericTools.get_thumbnail, # GenericTools.get_thumbnail.__doc__ # ) # ------------------------------------------------------------------- # Add the stretcher general_tab_vertical_layout.addStretch()
def setup_ui(self): """add tools """ # create the main tab layout main_tab_widget = QtWidgets.QTabWidget(self.widget()) self.addWidget(main_tab_widget) # add the General Tab general_tab_widget = QtWidgets.QWidget(self.widget()) general_tab_vertical_layout = QtWidgets.QVBoxLayout() general_tab_widget.setLayout(general_tab_vertical_layout) main_tab_widget.addTab(general_tab_widget, 'Generic') # Create tools for general tab # ------------------------------------------------------------------- # Version Creator from anima.ui.utils import add_button add_button('Version Creator', general_tab_vertical_layout, GenericTools.version_creator) add_button('Browse $HIP', general_tab_vertical_layout, GenericTools.browse_hip) # Copy Path add_button('Copy Node Path', general_tab_vertical_layout, GenericTools.copy_node_path) # Range from shot add_button('Range From Shot', general_tab_vertical_layout, GenericTools.range_from_shot) # Update render settings add_button('Update Render Settings', general_tab_vertical_layout, GenericTools.update_render_settings) # Export RSProxy Data As JSON add_button('Export RSProxy Data As JSON', general_tab_vertical_layout, GenericTools.export_rsproxy_data_as_json) # ------------------------------------------------------------------- # Add the stretcher general_tab_vertical_layout.addStretch()
def setup_ui(self): """add tools """ # create the main tab layout main_tab_widget = QtWidgets.QTabWidget(self.widget()) self.addWidget(main_tab_widget) # add the General Tab general_tab_widget = QtWidgets.QWidget(self.widget()) general_tab_vertical_layout = QtWidgets.QVBoxLayout() general_tab_vertical_layout.setSizeConstraint( QtWidgets.QLayout.SetMaximumSize ) general_tab_widget.setLayout(general_tab_vertical_layout) main_tab_widget.addTab(general_tab_widget, 'Generic') # Create tools for general tab # ------------------------------------------------------------------- # Open Version add_button( 'Open Version', general_tab_vertical_layout, GenericTools.version_dialog, callback_kwargs={"parent": self.parent(), "mode": 1} ) # Save As Version add_button( 'Save As Version', general_tab_vertical_layout, GenericTools.version_dialog, callback_kwargs={"parent": self.parent(), "mode": 0} ) # Update Outputs add_button( 'Update Savers', general_tab_vertical_layout, GenericTools.update_savers ) # Loader Report add_button( 'Loader Report', general_tab_vertical_layout, GenericTools.loader_report ) # PassThrough All Saver nodes add_button( 'PassThrough All Savers', general_tab_vertical_layout, GenericTools.pass_through_all_savers ) # Insert Pipe Router add_button( 'Insert Pipe Router', general_tab_vertical_layout, GenericTools.insert_pipe_router_to_selected_node ) # Loader From Saver add_button( 'Loader from Saver', general_tab_vertical_layout, GenericTools.loader_from_saver ) # Delete Recent Comps add_button( 'Delete Recent Comps', general_tab_vertical_layout, GenericTools.delete_recent_comps ) # Set Frames At Once To 1, 5 and 10 hbox_layout = QtWidgets.QHBoxLayout() general_tab_vertical_layout.addLayout(hbox_layout) set_frames_at_once_label = QtWidgets.QLabel() set_frames_at_once_label.setText("Set Frames At Once To") hbox_layout.addWidget(set_frames_at_once_label) for i in [1, 5, 10]: button = add_button( '%s' % i, hbox_layout, GenericTools.set_frames_at_once, callback_kwargs={'count': i} ) button.setMinimumSize(QtCore.QSize(25, 0)) add_line(general_tab_vertical_layout) # Range From Shot add_button( 'Get Comp Range From Database', general_tab_vertical_layout, GenericTools.range_from_shot ) # Shot From Range add_button( 'Set Comp Range To Database', general_tab_vertical_layout, GenericTools.shot_from_range ) add_line(general_tab_vertical_layout) # Render Merger add_button( 'Render Merger', general_tab_vertical_layout, GenericTools.render_merger, tooltip="Creates comp setup to merge renders created with Render Slicer." ) # Render Merger import functools add_button( '3DE4 Lens Distort', general_tab_vertical_layout, functools.partial(GenericTools.tde4_lens_distort_node_creator, self.parent()), tooltip=GenericTools.tde4_lens_distort_node_creator.__doc__ ) # ------------------------------------------------------------------- # Add the stretcher general_tab_vertical_layout.addStretch()
def setup_ui(self): """add tools """ # create the main tab layout main_tab_widget = QtWidgets.QTabWidget(self.widget()) self.addWidget(main_tab_widget) # ********************************************************************* # # GENERAL TAB # # ********************************************************************* # add the General Tab general_tab_widget = QtWidgets.QWidget(self.widget()) general_tab_vertical_layout = QtWidgets.QVBoxLayout() general_tab_widget.setLayout(general_tab_vertical_layout) main_tab_widget.addTab(general_tab_widget, 'Generic') # Create tools for general tab # ------------------------------------------------------------------- # Version Dialog from anima.ui.utils import add_button add_button('Open Version', general_tab_vertical_layout, GenericTools.version_dialog, callback_kwargs={"mode": 1}) add_button('Save As Version', general_tab_vertical_layout, GenericTools.version_dialog, callback_kwargs={"mode": 0}) # Browse $HIP add_button('Browse $HIP', general_tab_vertical_layout, GenericTools.browse_hip) # Copy Path add_button('Copy Node Path', general_tab_vertical_layout, GenericTools.copy_node_path) # Range from shot add_button('Range From Shot', general_tab_vertical_layout, GenericTools.range_from_shot) # Update render settings add_button('Update Render Settings', general_tab_vertical_layout, GenericTools.update_render_settings) def export_rsproxy_data_as_json_callback(): """ """ import hou try: GenericTools.export_rsproxy_data_as_json() except (BaseException, hou.OperationFailed) as e: QtWidgets.QMessageBox.critical(main_tab_widget, "Export", "Error!<br><br>%s" % e) else: QtWidgets.QMessageBox.information( main_tab_widget, "Export", "Data has been exported correctly!") # Export RSProxy Data As JSON add_button('Export RSProxy Data As JSON', general_tab_vertical_layout, export_rsproxy_data_as_json_callback) # Batch Rename batch_rename_layout = QtWidgets.QHBoxLayout() general_tab_vertical_layout.addLayout(batch_rename_layout) search_field = QtWidgets.QLineEdit() search_field.setPlaceholderText("Search") replace_field = QtWidgets.QLineEdit() replace_field.setPlaceholderText("Replace") replace_in_child_nodes_check_box = QtWidgets.QCheckBox() replace_in_child_nodes_check_box.setToolTip("Replace In Child Nodes") replace_in_child_nodes_check_box.setChecked(False) batch_rename_layout.addWidget(search_field) batch_rename_layout.addWidget(replace_field) batch_rename_layout.addWidget(replace_in_child_nodes_check_box) def search_and_replace_callback(): search_str = search_field.text() replace_str = replace_field.text() GenericTools.rename_selected_nodes( search_str, replace_str, replace_in_child_nodes_check_box.isChecked()) add_button("Search && Replace", batch_rename_layout, search_and_replace_callback) # Import Shaders From Maya add_button('Import Shaders From Maya', general_tab_vertical_layout, GenericTools.import_shaders_from_maya) # Create Focus Plane add_button('Creat Focus Plane', general_tab_vertical_layout, GenericTools.create_focus_plane) # ------------------------------------------------------------------- # Add the stretcher general_tab_vertical_layout.addStretch() # ********************************************************************* # # CROWD TAB # # ********************************************************************* # add the Crowd Tab crowd_tab_widget = QtWidgets.QWidget(self.widget()) crowd_tab_vertical_layout = QtWidgets.QVBoxLayout() crowd_tab_widget.setLayout(crowd_tab_vertical_layout) main_tab_widget.addTab(crowd_tab_widget, 'Crowd') # crowd_tools_label = QtWidgets.QLabel("Crowd Tools") # crowd_tab_vertical_layout.addWidget(crowd_tools_label) from anima.env.houdini import crowd_tools # Bake Setup add_button('Create Bake Setup', crowd_tab_vertical_layout, crowd_tools.create_bake_setup) # Bake Setup add_button('Create Render Setup', crowd_tab_vertical_layout, crowd_tools.create_render_setup) # ------------------------------------------------------------------- # Add the stretcher crowd_tab_vertical_layout.addStretch()