trigger.utils.controller_filler

Attributes

log

Classes

Filler

Origin

Database object for storing and restoring controller attributes

Module Contents

class Filler(controller=None, scaling=True, normalize_scale=True, coloring=True, color_method='object', color_match=False, primary_channel='Auto', visibility_controller=None, id_tag='fillers')

Bases: trigger.objects.base_node.BaseNode

create()

Creates the shape filler

drive_scale()

Creates the scale connections for the filler object using the driver hook attribute on controller

static loft_curve(curve, surface_parent=None)

Creates a surface from lofting curves. Great for ctrl visualising. Also works with multiple shapes. Args:

curve (str): Name of curve to loft. surface_parent (str): Parent lofted surface to this.

Returns: list: [surface, surface_back, shaders]

static object_colorize(loft_surfaces, color_a=(0, 0, 1), color_b=(0, 1, 0), driver_attr=None)

Colorizes the surfaces with drawing overrides (No Shader)

Pros: -Minimum extra nodes. Fast and efficient

-Visible in shaded mode only. No texture mode necessary -No normal issues because of two sided lighting

Cons: -Cannot have transparency or reflectivity Args:

loft_surfaces: (String) The surfaces which shaders will be applied color_a: (Tuple or List) normalized RGB color values for first color color_b: (Tuple or List) normalized RGB color values for second color driver_attr: (String) the attribute plug to drive the color from A to B

Returns:

set_controller(dag_path)

defines the controller and grabs its vaules in Origin class

static shader_colorize(loft_surfaces, color_a=(0, 0, 1), color_b=(0, 1, 0), driver_attr=None, transparency=0.7)

Colorizes the surfaces using separate shaders. Pros: -Can have shader attributes like transparency and reflection

-If both colors are same and no switching, colors are visible in simple shading mode

Cons: -Requires either 2 sided geometries or Two sided mode activated or one side will be black

-One shader per filler. This can clutter the hypershade a lot and there may be performance issues -Textures needs to be activated to see the colors unless colarA == colorB. blendColors limitation

Args:

loft_surfaces: (String) The surfaces which shaders will be applied color_a: (Tuple or List) normalized RGB color values for first color color_b: (Tuple or List) normalized RGB color values for second color driver_attr: (String) the attribute plug to drive the color from A to B

Returns:

static triswitch_colorize(loft_surfaces, color_a=(0, 0, 1), color_b=(0, 1, 0), driver_attr=None)

Colorizes surfaces using a common shader (uses id_tag to identify) and triswitches

Pros: -Can have shader attributes like transparency and reflection

-Slightly more optimized than shader_colorize and does not clutter hypershade.

Cons: -Requires either 2 sided geometries or Two sided mode activated or one side will be black

-Textures needs to be activated to see any color

Args:

loft_surfaces: (String) The surfaces which shaders will be applied color_a: (Tuple or List) normalized RGB color values for first color color_b: (Tuple or List) normalized RGB color values for second color driver_attr: (String) the attribute plug to drive the color from A to B

Returns:

class Origin(dag_path, primary_channel='Auto')

Bases: trigger.objects.base_node.BaseNode

Database object for storing and restoring controller attributes

get_ranges(attr)

Returns the minimum an maximum range for specified attribute in a list

open_scales()

Makes sure the scale channels are not locked

revert()

Revert channel states back to original

property primary_ranges
Returns the primary channel ranges if exists
log