bgdev.ui.utils¶
Utility fonctions for UI.
- created
8/02/2018
- author
Benoit GIELLY <benoit.gielly@gmail.com>
-
check_image
(icon, normalized=True, as_icon=False)[source]¶ Convert the given image path to full path name.
- Parameters
icon (str) – Name of the icon to check
normalized (bool) – Normalize the path to slash forward (works on all OS)
as_icon (bool) – Return a QIcon of the found image file.
- Returns
Updated icon path so it’s ready to be used.
- Return type
str
-
generate_qrc
(path, name='resources', prefix='icons')[source]¶ Generate .qrc file based on given folder.
- Parameters
path (str) – Path to icons folder.
name (str) – Name of the qrc file to generate. Default is “resources”.
prefix (str) – Name of the icon prefix. Default is “icons”.
- Returns
Path to the generated [qrc].py file.
- Return type
str
-
in_maya
()[source]¶ Check if we are in Maya or not.
- Returns
True if in maya else False
- Return type
bool