global_functions¶
Simple but hopefully helpful module to that bundles all functions in a central place.
Usage¶
from helga.general.setup.global_functions import global_functions
reload(global_functions)
#some example here
global_functions.example_function()
- helga.general.setup.global_functions.global_functions.check_interpreter(keyword)[source]¶
Check if the current interpreter matches keyword
- helga.general.setup.global_functions.global_functions.copy_file(source_file, source_dir, destination_dir)[source]¶
- helga.general.setup.global_functions.global_functions.create_widget_from_ui_file(ui_file_path, parent=None)[source]¶
Create widget that remains stylesheets from .ui file. This method is crashy at least in Maya. Probably because of stylesheet issues with Maya QApp custom style. Use with caution.
- helga.general.setup.global_functions.global_functions.divider()[source]¶
Print divider line to __stdout__
- helga.general.setup.global_functions.global_functions.get_helga_header_widget(title, icon_path)[source]¶
Return QWidget that represents a helga header. The returned widget needs to be added to a layout.
- helga.general.setup.global_functions.global_functions.get_main_window()[source]¶
Determine current application and return main window for parenting of own windows.
- helga.general.setup.global_functions.global_functions.get_maya_main_window()[source]¶
Return the Maya main window.
- helga.general.setup.global_functions.global_functions.get_maya_toplevel_shelf_widget(shelf_object)[source]¶
Convert ptr to shelf object to Qt instance.
- helga.general.setup.global_functions.global_functions.get_nuke_main_window()[source]¶
Return the Maya main window.
- helga.general.setup.global_functions.global_functions.get_user_setup_destination_dir_houdini()[source]¶
- helga.general.setup.global_functions.global_functions.get_user_setup_destination_dir_maya()[source]¶
- helga.general.setup.global_functions.global_functions.get_user_setup_destination_dir_nuke()[source]¶
- helga.general.setup.global_functions.global_functions.load_ui_type(ui_file)[source]¶
Pyside lacks the “loadUiType” command, so we have to convert the ui file to py code in-memory first and then execute it in a special frame to retrieve the form_class. This function return the form and base classes for the given qtdesigner ui file.