trigger.actions.weights ======================= .. py:module:: trigger.actions.weights Attributes ---------- .. autoapisummary:: trigger.actions.weights.ACTION_DATA trigger.actions.weights.log Classes ------- .. autoapisummary:: trigger.actions.weights.Weights Functions --------- .. autoapisummary:: trigger.actions.weights.add_list trigger.actions.weights.multiply_list trigger.actions.weights.subtract_list Module Contents --------------- .. py:class:: Weights(*args, **kwargs) Bases: :py:obj:`trigger.core.action.ActionCore`, :py:obj:`dict` dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object's (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2) .. py:method:: action() Mandatory method for all action modules .. py:method:: add_weights(data_list, influencer=None, clamp=True) .. py:method:: create_deformer(weights_file, deformer_type=None, force_unique_deformer=False, deformer_name=None, affected=None, influencers=None) Creates the deformer defined in the weights file and applies the pre-saved weights. If a deformer with the same name exists, it uses that instead of creating Main function to re-create rig weights. Args: weights_file: (String) Path to the weights file save with deformer_type: (String) If the weights file does not contain the deformer type information this flag will be used to identify the deformer type force_unique_deformer: (Bool) If True, in case of scene contains a node with the same name, it uses a unique name instead. Otherwise it will throw an error Returns: .. py:method:: feed(action_data, *args, **kwargs) Mandatory method for all action modules - feeds the builder data .. py:method:: info() .. py:method:: load_weights(deformer=None, file_path=None, method='index', ignore_name=True, deferred=False, suppress_messages=False) .. py:method:: multiply_weights(data_list, influencer=None) Multiplies the weights in the data list .. py:method:: negate_weights(json_data, influencer=None) Negates the weights in json_data .. py:method:: save_action(file_path=None, *args, **kwargs) Mandatory method for all action modules .. py:method:: save_matching_weights(deformer=None, file_path=None, vertexConnections=False, force=True, influencer=None) Saves the weights AND the negated weights to the disk Args: deformer: Deformer node. If not specified, it will try to use the class variable. file_path: (String) Absolute File path. If not defined the class variable will be used vertexConnections: (Bool) defines whether or not to define Vertex Connections in the file. Required for Barycentric and Bilinear methods while loading Returns: (list) file locations for normal and negated weights .. py:method:: save_weights(deformer=None, file_path=None, vertexConnections=False, force=True, influencer=None) .. py:method:: set_path(file_path) .. py:method:: subtract_weights(data_list, influencer=None, clamp=True) .. py:method:: ui(ctrl, layout, handler, *args, **kwargs) Mandatory Method .. py:attribute:: action_data .. py:property:: deformer .. py:function:: add_list(list_of_values) .. py:function:: multiply_list(list_of_values) .. py:function:: subtract_list(list_of_values) .. py:data:: ACTION_DATA .. py:data:: log