[Blender_Kitsu] Publish VSE Edit as Revision on Kitsu #7
32
blender_kitsu/gazu/edit.py
Normal file
32
blender_kitsu/gazu/edit.py
Normal file
@ -0,0 +1,32 @@
|
||||
from . import client as raw
|
||||
|
||||
from .helpers import normalize_model_parameter
|
||||
|
||||
default = raw.default_client
|
||||
|
||||
|
||||
def new_edit(
|
||||
project,
|
||||
name=None,
|
||||
description = "",
|
||||
data={},
|
||||
client=default,
|
||||
):
|
||||
"""
|
||||
Create a new edit within project.
|
||||
|
||||
Args:
|
||||
project (str / dict): The project dict or the project ID.
|
||||
sequence (str / dict): The sequence dict or the sequence ID.
|
||||
name (str): The name of the edit to create.
|
||||
description (str): The name of the edit to create.
|
||||
data (dict): Free field to set metadata of any kind.
|
||||
|
||||
Returns:
|
||||
Created edit.
|
||||
"""
|
||||
|
||||
project = normalize_model_parameter(project)
|
||||
path = f"data/projects/{project['id']}/edits"
|
||||
data = {"name": name, "description": description,}
|
||||
return raw.post(path, data, client=client)
|
Loading…
Reference in New Issue
Block a user