bgdev.utils.controler¶
Utilities for controlers.
Mostly, controler shapes creation (needs to be turned into data)
- author
Benoit GIELLY <benoit.gielly@gmail.com>
-
create_control
(ctrl, variant=0, name=None, size=1.0, normal=(0, 1, 0), color='yellow')[source]¶ Create a controler based on its name and variant.
- Parameters
ctrl (str) – The type of controler you want to create. Use
list_controlers()
method to know which ones are available.variant (int) – Which variant of the controler type you want.
name (str) – Rename the controler with the given name.
size (float) – Scale the controler using given size value.
normal (tuple) – Which axis should the controler aim to when created. Default axis is +Y
color (str) – The name of the CSS color to apply as an RGB override. Uses the PySide2 StyleSheet API to convert names to RGB color.
- Returns
The controler and its shape.
- Return type
tuple