Ejemplo n.º 1
0
def set_solver_step_list_to_collection(col, step_list):
    node = col.get_node()
    data_list = [s.get_data() for s in step_list]
    ensure_solver_steps_attr_exists(col)
    configmaya.set_node_option_structure(node, const.SOLVER_STEP_ATTR,
                                         data_list)
    sol_list = compile_solvers_from_steps(col, step_list)
    col.set_solver_list(sol_list)
    return
Ejemplo n.º 2
0
    def _set_attr_data(self, attr_name, data):
        """
        Set arbitrary data onto a collection node.

        :param attr_name: Attribute name to store data with.
        :type attr_name: str

        :param data: The data to store.
        :type data: list or dict
        """
        set_node = self._set.get_node()
        configmaya.set_node_option_structure(set_node,
                                             attr_name,
                                             data,
                                             add_attr=True)
        return
Ejemplo n.º 3
0
def set_data_on_node_attr(node_name, attr_name, data):
    """
    Set arbitrary Plain-Old-Data onto a node.attr path.

    :param node_name: Node to store data on.
    :type node_name: str

    :param attr_name: Attribute name to store data with.
    :type attr_name: str

    :param data: The data to store.
    :type data: list or dict

    ;return: Nothing.
    :rtype: None
    """
    msg = 'Use `mmSolver.utils.configmaya` module'
    warnings.warn(msg, DeprecationWarning)
    configmaya.set_node_option_structure(node_name,
                                         attr_name,
                                         data,
                                         add_attr=True)
    return