trigger.utils.controller_filler =============================== .. py:module:: trigger.utils.controller_filler Attributes ---------- .. autoapisummary:: trigger.utils.controller_filler.log Classes ------- .. autoapisummary:: trigger.utils.controller_filler.Filler trigger.utils.controller_filler.Origin Module Contents --------------- .. py: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: :py:obj:`trigger.objects.base_node.BaseNode` .. py:method:: create() Creates the shape filler .. py:method:: drive_scale() Creates the scale connections for the filler object using the driver hook attribute on controller .. py:method:: loft_curve(curve, surface_parent=None) :staticmethod: 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] .. py:method:: object_colorize(loft_surfaces, color_a=(0, 0, 1), color_b=(0, 1, 0), driver_attr=None) :staticmethod: 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: .. py:method:: set_controller(dag_path) defines the controller and grabs its vaules in Origin class .. py:method:: shader_colorize(loft_surfaces, color_a=(0, 0, 1), color_b=(0, 1, 0), driver_attr=None, transparency=0.7) :staticmethod: 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: .. py:method:: triswitch_colorize(loft_surfaces, color_a=(0, 0, 1), color_b=(0, 1, 0), driver_attr=None) :staticmethod: 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: .. py:class:: Origin(dag_path, primary_channel='Auto') Bases: :py:obj:`trigger.objects.base_node.BaseNode` Database object for storing and restoring controller attributes .. py:method:: get_ranges(attr) Returns the minimum an maximum range for specified attribute in a list .. py:method:: open_scales() Makes sure the scale channels are not locked .. py:method:: revert() Revert channel states back to original .. py:property:: primary_ranges Returns the primary channel ranges if exists .. py:data:: log