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

get_all_controls(namespace='')[source]

Get all rig controlers in the scene.

get_ctrl_data(name, variant=0)[source]

Query the controler data from its name.

get_rig_controls()[source]

Query all controlers of the selected rig(s).

list_controlers()[source]

List all the available controls.

select_all()[source]

Select all controlers in the current scene.

select_rig_controls()[source]

Select all controlers from selected rig(s).