def create_collection(): col = mmapi.Collection().create_node('collection1') sol = solver_utils.create_solver() solver_utils.add_solver_to_collection(sol, col) ensure_solver_steps_attr_exists(col) step = create_solver_step() add_solver_step_to_collection(col, step) return col
def create_collection(): """ Create a new Collection in the scene. :returns: A new Collection object. :rtype: Collection """ col = mmapi.Collection().create_node('collection1') sol = solver_utils.create_solver() solver_utils.add_solver_to_collection(sol, col) ensure_solver_steps_attr_exists(col) step = create_solver_step() add_solver_step_to_collection(col, step) return col
def create_collection(name=None): """ Create a new Collection in the scene. :param name: The node name for the created collection. :type name: str or None :returns: A new Collection object. :rtype: Collection """ if name is None: name = const.COLLECTION_DEFAULT_NODE_NAME col = mmapi.Collection().create_node(name) sol = solver_utils.create_solver() solver_utils.add_solver_to_collection(sol, col) step = create_solver_step() add_solver_step_to_collection(col, step) return col