trigger.actions.weights
Attributes
Classes
dict() -> new empty dictionary |
Functions
|
|
|
|
|
Module Contents
- class Weights(*args, **kwargs)
Bases:
trigger.core.action.ActionCore,dictdict() -> 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)
- action()
Mandatory method for all action modules
- add_weights(data_list, influencer=None, clamp=True)
- 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:
- feed(action_data, *args, **kwargs)
Mandatory method for all action modules - feeds the builder data
- info()
- load_weights(deformer=None, file_path=None, method='index', ignore_name=True, deferred=False, suppress_messages=False)
- multiply_weights(data_list, influencer=None)
Multiplies the weights in the data list
- negate_weights(json_data, influencer=None)
Negates the weights in json_data
- save_action(file_path=None, *args, **kwargs)
Mandatory method for all action modules
- 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
- save_weights(deformer=None, file_path=None, vertexConnections=False, force=True, influencer=None)
- set_path(file_path)
- subtract_weights(data_list, influencer=None, clamp=True)
- ui(ctrl, layout, handler, *args, **kwargs)
Mandatory Method
- action_data
- property deformer
- add_list(list_of_values)
- multiply_list(list_of_values)
- subtract_list(list_of_values)
- ACTION_DATA
- log