zou 0.20.83__py3-none-any.whl → 0.20.85__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- zou/__init__.py +1 -1
- zou/app/blueprints/comments/resources.py +32 -35
- zou/app/blueprints/concepts/resources.py +23 -8
- zou/app/blueprints/crud/asset_instance.py +272 -0
- zou/app/blueprints/crud/attachment_file.py +263 -0
- zou/app/blueprints/crud/base.py +176 -69
- zou/app/blueprints/crud/budget.py +278 -0
- zou/app/blueprints/crud/budget_entry.py +269 -0
- zou/app/blueprints/crud/chat.py +282 -0
- zou/app/blueprints/crud/chat_message.py +286 -0
- zou/app/blueprints/crud/comments.py +312 -1
- zou/app/blueprints/crud/custom_action.py +268 -0
- zou/app/blueprints/crud/day_off.py +298 -0
- zou/app/blueprints/crud/department.py +268 -0
- zou/app/blueprints/crud/entity.py +297 -3
- zou/app/blueprints/crud/entity_link.py +303 -0
- zou/app/blueprints/crud/entity_type.py +269 -0
- zou/app/blueprints/crud/event.py +197 -0
- zou/app/blueprints/crud/file_status.py +268 -0
- zou/app/blueprints/crud/hardware_item.py +268 -0
- zou/app/blueprints/crud/metadata_descriptor.py +312 -0
- zou/app/blueprints/crud/milestone.py +302 -1
- zou/app/blueprints/crud/news.py +285 -0
- zou/app/blueprints/crud/notification.py +287 -0
- zou/app/blueprints/crud/organisation.py +269 -0
- zou/app/blueprints/crud/output_file.py +34 -10
- zou/app/blueprints/crud/output_type.py +30 -10
- zou/app/blueprints/crud/person.py +407 -2
- zou/app/blueprints/crud/playlist.py +322 -4
- zou/app/blueprints/crud/plugin.py +269 -0
- zou/app/blueprints/crud/preview_background_file.py +272 -0
- zou/app/blueprints/crud/preview_file.py +280 -9
- zou/app/blueprints/crud/production_schedule_version.py +569 -0
- zou/app/blueprints/crud/project.py +440 -0
- zou/app/blueprints/crud/project_status.py +268 -0
- zou/app/blueprints/crud/salary_scale.py +185 -5
- zou/app/blueprints/crud/schedule_item.py +305 -0
- zou/app/blueprints/crud/search_filter.py +302 -0
- zou/app/blueprints/crud/search_filter_group.py +270 -0
- zou/app/blueprints/crud/software.py +30 -10
- zou/app/blueprints/crud/status_automation.py +296 -2
- zou/app/blueprints/crud/studio.py +268 -0
- zou/app/blueprints/crud/subscription.py +279 -0
- zou/app/blueprints/crud/task.py +325 -5
- zou/app/blueprints/crud/task_status.py +301 -0
- zou/app/blueprints/crud/task_type.py +283 -0
- zou/app/blueprints/crud/time_spent.py +327 -0
- zou/app/blueprints/crud/working_file.py +273 -10
- zou/app/blueprints/export/csv/assets.py +15 -5
- zou/app/blueprints/export/csv/base.py +12 -3
- zou/app/blueprints/export/csv/casting.py +32 -5
- zou/app/blueprints/export/csv/edits.py +15 -5
- zou/app/blueprints/export/csv/persons.py +24 -0
- zou/app/blueprints/export/csv/playlists.py +16 -5
- zou/app/blueprints/export/csv/projects.py +23 -0
- zou/app/blueprints/export/csv/shots.py +15 -5
- zou/app/blueprints/export/csv/task_types.py +23 -0
- zou/app/blueprints/export/csv/tasks.py +24 -0
- zou/app/blueprints/export/csv/time_spents.py +24 -0
- zou/app/blueprints/files/resources.py +928 -377
- zou/app/blueprints/news/resources.py +7 -5
- zou/app/blueprints/persons/resources.py +644 -271
- zou/app/blueprints/playlists/resources.py +154 -72
- zou/app/blueprints/previews/resources.py +473 -228
- zou/app/blueprints/projects/__init__.py +5 -0
- zou/app/blueprints/projects/resources.py +987 -420
- zou/app/blueprints/search/resources.py +44 -32
- zou/app/blueprints/shots/resources.py +1338 -88
- zou/app/blueprints/source/csv/assets.py +44 -6
- zou/app/blueprints/source/csv/casting.py +43 -6
- zou/app/blueprints/source/csv/edits.py +47 -9
- zou/app/blueprints/source/csv/persons.py +43 -4
- zou/app/blueprints/source/csv/shots.py +47 -6
- zou/app/blueprints/source/csv/task_type_estimations.py +95 -35
- zou/app/blueprints/source/kitsu.py +433 -11
- zou/app/blueprints/source/otio.py +215 -20
- zou/app/blueprints/source/shotgun/assets.py +146 -0
- zou/app/blueprints/source/shotgun/base.py +85 -14
- zou/app/blueprints/source/shotgun/episode.py +124 -0
- zou/app/blueprints/source/shotgun/import_errors.py +105 -14
- zou/app/blueprints/source/shotgun/notes.py +132 -0
- zou/app/blueprints/source/shotgun/person.py +163 -0
- zou/app/blueprints/source/shotgun/project.py +120 -0
- zou/app/blueprints/source/shotgun/scene.py +120 -0
- zou/app/blueprints/source/shotgun/sequence.py +134 -0
- zou/app/blueprints/source/shotgun/shot.py +166 -0
- zou/app/blueprints/source/shotgun/status.py +129 -0
- zou/app/blueprints/source/shotgun/steps.py +138 -0
- zou/app/blueprints/source/shotgun/tasks.py +199 -0
- zou/app/blueprints/source/shotgun/team.py +132 -0
- zou/app/blueprints/source/shotgun/versions.py +155 -0
- zou/app/blueprints/tasks/resources.py +1197 -308
- zou/app/models/metadata_descriptor.py +1 -0
- zou/app/services/persons_service.py +1 -1
- zou/app/services/projects_service.py +45 -1
- zou/app/services/time_spents_service.py +1 -1
- zou/migrations/versions/a1b2c3d4e5f6_add_position_to_metadata_descriptor.py +32 -0
- {zou-0.20.83.dist-info → zou-0.20.85.dist-info}/METADATA +18 -18
- {zou-0.20.83.dist-info → zou-0.20.85.dist-info}/RECORD +103 -102
- {zou-0.20.83.dist-info → zou-0.20.85.dist-info}/WHEEL +0 -0
- {zou-0.20.83.dist-info → zou-0.20.85.dist-info}/entry_points.txt +0 -0
- {zou-0.20.83.dist-info → zou-0.20.85.dist-info}/licenses/LICENSE +0 -0
- {zou-0.20.83.dist-info → zou-0.20.85.dist-info}/top_level.txt +0 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
from flask import current_app
|
|
2
|
+
from flask_jwt_extended import jwt_required
|
|
2
3
|
|
|
3
4
|
from zou.app.models.project import Project
|
|
4
5
|
from zou.app.models.project_status import ProjectStatus
|
|
@@ -17,6 +18,79 @@ class ImportShotgunProjectsResource(BaseImportShotgunResource):
|
|
|
17
18
|
def __init__(self):
|
|
18
19
|
BaseImportShotgunResource.__init__(self)
|
|
19
20
|
|
|
21
|
+
@jwt_required()
|
|
22
|
+
def post(self):
|
|
23
|
+
"""
|
|
24
|
+
Import shotgun projects
|
|
25
|
+
---
|
|
26
|
+
description: Import Shotgun projects. Send a list of Shotgun project
|
|
27
|
+
entries in the JSON body. Returns created or updated projects with
|
|
28
|
+
custom fields preserved.
|
|
29
|
+
tags:
|
|
30
|
+
- Import
|
|
31
|
+
requestBody:
|
|
32
|
+
required: true
|
|
33
|
+
content:
|
|
34
|
+
application/json:
|
|
35
|
+
schema:
|
|
36
|
+
type: array
|
|
37
|
+
items:
|
|
38
|
+
type: object
|
|
39
|
+
properties:
|
|
40
|
+
id:
|
|
41
|
+
type: integer
|
|
42
|
+
description: Shotgun ID of the project
|
|
43
|
+
example: 12345
|
|
44
|
+
name:
|
|
45
|
+
type: string
|
|
46
|
+
description: Project name
|
|
47
|
+
example: "My Project"
|
|
48
|
+
sg_status:
|
|
49
|
+
type: string
|
|
50
|
+
description: Project status
|
|
51
|
+
example: "Active"
|
|
52
|
+
example:
|
|
53
|
+
- id: 12345
|
|
54
|
+
name: "My Project"
|
|
55
|
+
sg_status: "Active"
|
|
56
|
+
responses:
|
|
57
|
+
200:
|
|
58
|
+
description: Projects imported successfully
|
|
59
|
+
content:
|
|
60
|
+
application/json:
|
|
61
|
+
schema:
|
|
62
|
+
type: array
|
|
63
|
+
items:
|
|
64
|
+
type: object
|
|
65
|
+
properties:
|
|
66
|
+
id:
|
|
67
|
+
type: string
|
|
68
|
+
format: uuid
|
|
69
|
+
description: Project unique identifier
|
|
70
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
71
|
+
name:
|
|
72
|
+
type: string
|
|
73
|
+
description: Project name
|
|
74
|
+
example: "My Project"
|
|
75
|
+
data:
|
|
76
|
+
type: object
|
|
77
|
+
description: Custom project data
|
|
78
|
+
example: {}
|
|
79
|
+
created_at:
|
|
80
|
+
type: string
|
|
81
|
+
format: date-time
|
|
82
|
+
description: Creation timestamp
|
|
83
|
+
example: "2024-01-15T10:30:00Z"
|
|
84
|
+
updated_at:
|
|
85
|
+
type: string
|
|
86
|
+
format: date-time
|
|
87
|
+
description: Update timestamp
|
|
88
|
+
example: "2024-01-15T11:00:00Z"
|
|
89
|
+
400:
|
|
90
|
+
description: Invalid request body or data format error
|
|
91
|
+
"""
|
|
92
|
+
return super().post()
|
|
93
|
+
|
|
20
94
|
def prepare_import(self):
|
|
21
95
|
self.project_status_names = self.extract_status_names(self.sg_entries)
|
|
22
96
|
projects_service.save_project_status(self.project_status_names)
|
|
@@ -77,3 +151,49 @@ class ImportShotgunProjectsResource(BaseImportShotgunResource):
|
|
|
77
151
|
class ImportRemoveShotgunProjectResource(ImportRemoveShotgunBaseResource):
|
|
78
152
|
def __init__(self):
|
|
79
153
|
ImportRemoveShotgunBaseResource.__init__(self, Project)
|
|
154
|
+
|
|
155
|
+
@jwt_required()
|
|
156
|
+
def post(self):
|
|
157
|
+
"""
|
|
158
|
+
Remove shotgun project
|
|
159
|
+
---
|
|
160
|
+
description: Remove a Shotgun project from the database. Provide the
|
|
161
|
+
Shotgun entry ID in the JSON body.
|
|
162
|
+
tags:
|
|
163
|
+
- Import
|
|
164
|
+
requestBody:
|
|
165
|
+
required: true
|
|
166
|
+
content:
|
|
167
|
+
application/json:
|
|
168
|
+
schema:
|
|
169
|
+
type: object
|
|
170
|
+
required:
|
|
171
|
+
- id
|
|
172
|
+
properties:
|
|
173
|
+
id:
|
|
174
|
+
type: integer
|
|
175
|
+
description: Shotgun ID of the project to remove
|
|
176
|
+
example: 12345
|
|
177
|
+
example:
|
|
178
|
+
id: 12345
|
|
179
|
+
responses:
|
|
180
|
+
200:
|
|
181
|
+
description: Removal result returned
|
|
182
|
+
content:
|
|
183
|
+
application/json:
|
|
184
|
+
schema:
|
|
185
|
+
type: object
|
|
186
|
+
properties:
|
|
187
|
+
success:
|
|
188
|
+
type: boolean
|
|
189
|
+
description: Whether the removal was successful
|
|
190
|
+
example: true
|
|
191
|
+
removed_instance_id:
|
|
192
|
+
type: string
|
|
193
|
+
format: uuid
|
|
194
|
+
description: ID of the removed project, if found
|
|
195
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
196
|
+
400:
|
|
197
|
+
description: Invalid request body or instance not found
|
|
198
|
+
"""
|
|
199
|
+
return super().post()
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
from flask import current_app
|
|
2
|
+
from flask_jwt_extended import jwt_required
|
|
2
3
|
|
|
3
4
|
from zou.app.models.project import Project
|
|
4
5
|
from zou.app.models.entity import Entity
|
|
@@ -15,6 +16,79 @@ class ImportShotgunScenesResource(BaseImportShotgunResource):
|
|
|
15
16
|
def __init__(self):
|
|
16
17
|
BaseImportShotgunResource.__init__(self)
|
|
17
18
|
|
|
19
|
+
@jwt_required()
|
|
20
|
+
def post(self):
|
|
21
|
+
"""
|
|
22
|
+
Import shotgun scenes
|
|
23
|
+
---
|
|
24
|
+
description: Import Shotgun scenes. Send a list of Shotgun scene
|
|
25
|
+
entries in the JSON body. Returns created or updated scenes linked
|
|
26
|
+
to sequences.
|
|
27
|
+
tags:
|
|
28
|
+
- Import
|
|
29
|
+
requestBody:
|
|
30
|
+
required: true
|
|
31
|
+
content:
|
|
32
|
+
application/json:
|
|
33
|
+
schema:
|
|
34
|
+
type: array
|
|
35
|
+
items:
|
|
36
|
+
type: object
|
|
37
|
+
properties:
|
|
38
|
+
id:
|
|
39
|
+
type: integer
|
|
40
|
+
description: Shotgun ID of the scene
|
|
41
|
+
example: 12345
|
|
42
|
+
code:
|
|
43
|
+
type: string
|
|
44
|
+
description: Scene code
|
|
45
|
+
example: "SC01"
|
|
46
|
+
project:
|
|
47
|
+
type: object
|
|
48
|
+
description: Project information
|
|
49
|
+
properties:
|
|
50
|
+
name:
|
|
51
|
+
type: string
|
|
52
|
+
example: "My Project"
|
|
53
|
+
example:
|
|
54
|
+
- id: 12345
|
|
55
|
+
code: "SC01"
|
|
56
|
+
project:
|
|
57
|
+
name: "My Project"
|
|
58
|
+
responses:
|
|
59
|
+
200:
|
|
60
|
+
description: Scenes imported successfully
|
|
61
|
+
content:
|
|
62
|
+
application/json:
|
|
63
|
+
schema:
|
|
64
|
+
type: array
|
|
65
|
+
items:
|
|
66
|
+
type: object
|
|
67
|
+
properties:
|
|
68
|
+
id:
|
|
69
|
+
type: string
|
|
70
|
+
format: uuid
|
|
71
|
+
description: Scene unique identifier
|
|
72
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
73
|
+
name:
|
|
74
|
+
type: string
|
|
75
|
+
description: Scene name
|
|
76
|
+
example: "SC01"
|
|
77
|
+
created_at:
|
|
78
|
+
type: string
|
|
79
|
+
format: date-time
|
|
80
|
+
description: Creation timestamp
|
|
81
|
+
example: "2024-01-15T10:30:00Z"
|
|
82
|
+
updated_at:
|
|
83
|
+
type: string
|
|
84
|
+
format: date-time
|
|
85
|
+
description: Update timestamp
|
|
86
|
+
example: "2024-01-15T11:00:00Z"
|
|
87
|
+
400:
|
|
88
|
+
description: Invalid request body or data format error
|
|
89
|
+
"""
|
|
90
|
+
return super().post()
|
|
91
|
+
|
|
18
92
|
def prepare_import(self):
|
|
19
93
|
self.scene_type = shots_service.get_shot_type()
|
|
20
94
|
self.project_map = Project.get_id_map(field="name")
|
|
@@ -77,3 +151,49 @@ class ImportRemoveShotgunSceneResource(ImportRemoveShotgunBaseResource):
|
|
|
77
151
|
ImportRemoveShotgunBaseResource.__init__(
|
|
78
152
|
self, Entity, entity_type_id=shots_service.get_scene_type()["id"]
|
|
79
153
|
)
|
|
154
|
+
|
|
155
|
+
@jwt_required()
|
|
156
|
+
def post(self):
|
|
157
|
+
"""
|
|
158
|
+
Remove shotgun scene
|
|
159
|
+
---
|
|
160
|
+
description: Remove a Shotgun scene from the database. Provide the
|
|
161
|
+
Shotgun entry ID in the JSON body.
|
|
162
|
+
tags:
|
|
163
|
+
- Import
|
|
164
|
+
requestBody:
|
|
165
|
+
required: true
|
|
166
|
+
content:
|
|
167
|
+
application/json:
|
|
168
|
+
schema:
|
|
169
|
+
type: object
|
|
170
|
+
required:
|
|
171
|
+
- id
|
|
172
|
+
properties:
|
|
173
|
+
id:
|
|
174
|
+
type: integer
|
|
175
|
+
description: Shotgun ID of the scene to remove
|
|
176
|
+
example: 12345
|
|
177
|
+
example:
|
|
178
|
+
id: 12345
|
|
179
|
+
responses:
|
|
180
|
+
200:
|
|
181
|
+
description: Removal result returned
|
|
182
|
+
content:
|
|
183
|
+
application/json:
|
|
184
|
+
schema:
|
|
185
|
+
type: object
|
|
186
|
+
properties:
|
|
187
|
+
success:
|
|
188
|
+
type: boolean
|
|
189
|
+
description: Whether the removal was successful
|
|
190
|
+
example: true
|
|
191
|
+
removed_instance_id:
|
|
192
|
+
type: string
|
|
193
|
+
format: uuid
|
|
194
|
+
description: ID of the removed scene, if found
|
|
195
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
196
|
+
400:
|
|
197
|
+
description: Invalid request body or instance not found
|
|
198
|
+
"""
|
|
199
|
+
return super().post()
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
from flask import current_app
|
|
2
|
+
from flask_jwt_extended import jwt_required
|
|
2
3
|
|
|
3
4
|
from zou.app.models.project import Project
|
|
4
5
|
from zou.app.models.entity import Entity
|
|
@@ -13,6 +14,93 @@ from zou.app.blueprints.source.shotgun.exception import (
|
|
|
13
14
|
|
|
14
15
|
|
|
15
16
|
class ImportShotgunSequencesResource(BaseImportShotgunResource):
|
|
17
|
+
@jwt_required()
|
|
18
|
+
def post(self):
|
|
19
|
+
"""
|
|
20
|
+
Import shotgun sequences
|
|
21
|
+
---
|
|
22
|
+
description: Import Shotgun sequences. Send a list of Shotgun
|
|
23
|
+
sequence entries in the JSON body. Returns created or updated
|
|
24
|
+
sequences linked to episodes.
|
|
25
|
+
tags:
|
|
26
|
+
- Import
|
|
27
|
+
requestBody:
|
|
28
|
+
required: true
|
|
29
|
+
content:
|
|
30
|
+
application/json:
|
|
31
|
+
schema:
|
|
32
|
+
type: array
|
|
33
|
+
items:
|
|
34
|
+
type: object
|
|
35
|
+
properties:
|
|
36
|
+
id:
|
|
37
|
+
type: integer
|
|
38
|
+
description: Shotgun ID of the sequence
|
|
39
|
+
example: 12345
|
|
40
|
+
code:
|
|
41
|
+
type: string
|
|
42
|
+
description: Sequence code
|
|
43
|
+
example: "SQ01"
|
|
44
|
+
description:
|
|
45
|
+
type: string
|
|
46
|
+
description: Sequence description
|
|
47
|
+
example: "Main sequence"
|
|
48
|
+
project:
|
|
49
|
+
type: object
|
|
50
|
+
description: Project information
|
|
51
|
+
properties:
|
|
52
|
+
name:
|
|
53
|
+
type: string
|
|
54
|
+
example: "My Project"
|
|
55
|
+
episode:
|
|
56
|
+
type: object
|
|
57
|
+
description: Episode information
|
|
58
|
+
properties:
|
|
59
|
+
id:
|
|
60
|
+
type: integer
|
|
61
|
+
example: 11111
|
|
62
|
+
example:
|
|
63
|
+
- id: 12345
|
|
64
|
+
code: "SQ01"
|
|
65
|
+
description: "Main sequence"
|
|
66
|
+
project:
|
|
67
|
+
name: "My Project"
|
|
68
|
+
episode:
|
|
69
|
+
id: 11111
|
|
70
|
+
responses:
|
|
71
|
+
200:
|
|
72
|
+
description: Sequences imported successfully
|
|
73
|
+
content:
|
|
74
|
+
application/json:
|
|
75
|
+
schema:
|
|
76
|
+
type: array
|
|
77
|
+
items:
|
|
78
|
+
type: object
|
|
79
|
+
properties:
|
|
80
|
+
id:
|
|
81
|
+
type: string
|
|
82
|
+
format: uuid
|
|
83
|
+
description: Sequence unique identifier
|
|
84
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
85
|
+
name:
|
|
86
|
+
type: string
|
|
87
|
+
description: Sequence name
|
|
88
|
+
example: "SQ01"
|
|
89
|
+
created_at:
|
|
90
|
+
type: string
|
|
91
|
+
format: date-time
|
|
92
|
+
description: Creation timestamp
|
|
93
|
+
example: "2024-01-15T10:30:00Z"
|
|
94
|
+
updated_at:
|
|
95
|
+
type: string
|
|
96
|
+
format: date-time
|
|
97
|
+
description: Update timestamp
|
|
98
|
+
example: "2024-01-15T11:00:00Z"
|
|
99
|
+
400:
|
|
100
|
+
description: Invalid request body or data format error
|
|
101
|
+
"""
|
|
102
|
+
return super().post()
|
|
103
|
+
|
|
16
104
|
def prepare_import(self):
|
|
17
105
|
self.sequence_type = shots_service.get_sequence_type()
|
|
18
106
|
self.project_map = Project.get_id_map(field="name")
|
|
@@ -88,3 +176,49 @@ class ImportRemoveShotgunSequenceResource(ImportRemoveShotgunBaseResource):
|
|
|
88
176
|
Entity,
|
|
89
177
|
entity_type_id=shots_service.get_sequence_type()["id"],
|
|
90
178
|
)
|
|
179
|
+
|
|
180
|
+
@jwt_required()
|
|
181
|
+
def post(self):
|
|
182
|
+
"""
|
|
183
|
+
Remove shotgun sequence
|
|
184
|
+
---
|
|
185
|
+
description: Remove a Shotgun sequence from the database. Provide the
|
|
186
|
+
Shotgun entry ID in the JSON body.
|
|
187
|
+
tags:
|
|
188
|
+
- Import
|
|
189
|
+
requestBody:
|
|
190
|
+
required: true
|
|
191
|
+
content:
|
|
192
|
+
application/json:
|
|
193
|
+
schema:
|
|
194
|
+
type: object
|
|
195
|
+
required:
|
|
196
|
+
- id
|
|
197
|
+
properties:
|
|
198
|
+
id:
|
|
199
|
+
type: integer
|
|
200
|
+
description: Shotgun ID of the sequence to remove
|
|
201
|
+
example: 12345
|
|
202
|
+
example:
|
|
203
|
+
id: 12345
|
|
204
|
+
responses:
|
|
205
|
+
200:
|
|
206
|
+
description: Removal result returned
|
|
207
|
+
content:
|
|
208
|
+
application/json:
|
|
209
|
+
schema:
|
|
210
|
+
type: object
|
|
211
|
+
properties:
|
|
212
|
+
success:
|
|
213
|
+
type: boolean
|
|
214
|
+
description: Whether the removal was successful
|
|
215
|
+
example: true
|
|
216
|
+
removed_instance_id:
|
|
217
|
+
type: string
|
|
218
|
+
format: uuid
|
|
219
|
+
description: ID of the removed sequence, if found
|
|
220
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
221
|
+
400:
|
|
222
|
+
description: Invalid request body or instance not found
|
|
223
|
+
"""
|
|
224
|
+
return super().post()
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
from flask import current_app
|
|
2
|
+
from flask_jwt_extended import jwt_required
|
|
2
3
|
|
|
3
4
|
from zou.app.models.project import Project
|
|
4
5
|
from zou.app.models.entity import Entity
|
|
@@ -15,6 +16,125 @@ class ImportShotgunShotsResource(BaseImportShotgunResource):
|
|
|
15
16
|
def __init__(self):
|
|
16
17
|
BaseImportShotgunResource.__init__(self)
|
|
17
18
|
|
|
19
|
+
@jwt_required()
|
|
20
|
+
def post(self):
|
|
21
|
+
"""
|
|
22
|
+
Import shotgun shots
|
|
23
|
+
---
|
|
24
|
+
description: Import Shotgun shots. Send a list of Shotgun shot
|
|
25
|
+
entries in the JSON body. Returns created or updated shots with
|
|
26
|
+
frame ranges, custom fields, and asset links.
|
|
27
|
+
tags:
|
|
28
|
+
- Import
|
|
29
|
+
requestBody:
|
|
30
|
+
required: true
|
|
31
|
+
content:
|
|
32
|
+
application/json:
|
|
33
|
+
schema:
|
|
34
|
+
type: array
|
|
35
|
+
items:
|
|
36
|
+
type: object
|
|
37
|
+
properties:
|
|
38
|
+
id:
|
|
39
|
+
type: integer
|
|
40
|
+
description: Shotgun ID of the shot
|
|
41
|
+
example: 12345
|
|
42
|
+
code:
|
|
43
|
+
type: string
|
|
44
|
+
description: Shot code
|
|
45
|
+
example: "SH010"
|
|
46
|
+
sg_cut_in:
|
|
47
|
+
type: integer
|
|
48
|
+
description: Cut in frame
|
|
49
|
+
example: 1001
|
|
50
|
+
sg_cut_duration:
|
|
51
|
+
type: integer
|
|
52
|
+
description: Cut duration in frames
|
|
53
|
+
example: 50
|
|
54
|
+
project:
|
|
55
|
+
type: object
|
|
56
|
+
description: Project information
|
|
57
|
+
properties:
|
|
58
|
+
name:
|
|
59
|
+
type: string
|
|
60
|
+
example: "My Project"
|
|
61
|
+
sg_sequence:
|
|
62
|
+
type: object
|
|
63
|
+
description: Sequence information
|
|
64
|
+
properties:
|
|
65
|
+
id:
|
|
66
|
+
type: integer
|
|
67
|
+
example: 11111
|
|
68
|
+
sg_scene:
|
|
69
|
+
type: object
|
|
70
|
+
description: Scene information
|
|
71
|
+
properties:
|
|
72
|
+
id:
|
|
73
|
+
type: integer
|
|
74
|
+
example: 22222
|
|
75
|
+
assets:
|
|
76
|
+
type: array
|
|
77
|
+
description: Linked assets
|
|
78
|
+
items:
|
|
79
|
+
type: object
|
|
80
|
+
properties:
|
|
81
|
+
id:
|
|
82
|
+
type: integer
|
|
83
|
+
example: 33333
|
|
84
|
+
example:
|
|
85
|
+
- id: 12345
|
|
86
|
+
code: "SH010"
|
|
87
|
+
sg_cut_in: 1001
|
|
88
|
+
sg_cut_duration: 50
|
|
89
|
+
project:
|
|
90
|
+
name: "My Project"
|
|
91
|
+
sg_sequence:
|
|
92
|
+
id: 11111
|
|
93
|
+
sg_scene:
|
|
94
|
+
id: 22222
|
|
95
|
+
assets:
|
|
96
|
+
- id: 33333
|
|
97
|
+
responses:
|
|
98
|
+
200:
|
|
99
|
+
description: Shots imported successfully
|
|
100
|
+
content:
|
|
101
|
+
application/json:
|
|
102
|
+
schema:
|
|
103
|
+
type: array
|
|
104
|
+
items:
|
|
105
|
+
type: object
|
|
106
|
+
properties:
|
|
107
|
+
id:
|
|
108
|
+
type: string
|
|
109
|
+
format: uuid
|
|
110
|
+
description: Shot unique identifier
|
|
111
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
112
|
+
name:
|
|
113
|
+
type: string
|
|
114
|
+
description: Shot name
|
|
115
|
+
example: "SH010"
|
|
116
|
+
data:
|
|
117
|
+
type: object
|
|
118
|
+
description: Shot data with frame ranges and custom
|
|
119
|
+
fields
|
|
120
|
+
example:
|
|
121
|
+
frame_in: 1001
|
|
122
|
+
frame_out: 1051
|
|
123
|
+
created_at:
|
|
124
|
+
type: string
|
|
125
|
+
format: date-time
|
|
126
|
+
description: Creation timestamp
|
|
127
|
+
example: "2024-01-15T10:30:00Z"
|
|
128
|
+
updated_at:
|
|
129
|
+
type: string
|
|
130
|
+
format: date-time
|
|
131
|
+
description: Update timestamp
|
|
132
|
+
example: "2024-01-15T11:00:00Z"
|
|
133
|
+
400:
|
|
134
|
+
description: Invalid request body or data format error
|
|
135
|
+
"""
|
|
136
|
+
return super().post()
|
|
137
|
+
|
|
18
138
|
def prepare_import(self):
|
|
19
139
|
self.shot_type = shots_service.get_shot_type()
|
|
20
140
|
self.project_map = Project.get_id_map(field="name")
|
|
@@ -113,3 +233,49 @@ class ImportRemoveShotgunShotResource(ImportRemoveShotgunBaseResource):
|
|
|
113
233
|
ImportRemoveShotgunBaseResource.__init__(
|
|
114
234
|
self, Entity, entity_type_id=shots_service.get_shot_type()["id"]
|
|
115
235
|
)
|
|
236
|
+
|
|
237
|
+
@jwt_required()
|
|
238
|
+
def post(self):
|
|
239
|
+
"""
|
|
240
|
+
Remove shotgun shot
|
|
241
|
+
---
|
|
242
|
+
description: Remove a Shotgun shot from the database. Provide the
|
|
243
|
+
Shotgun entry ID in the JSON body.
|
|
244
|
+
tags:
|
|
245
|
+
- Import
|
|
246
|
+
requestBody:
|
|
247
|
+
required: true
|
|
248
|
+
content:
|
|
249
|
+
application/json:
|
|
250
|
+
schema:
|
|
251
|
+
type: object
|
|
252
|
+
required:
|
|
253
|
+
- id
|
|
254
|
+
properties:
|
|
255
|
+
id:
|
|
256
|
+
type: integer
|
|
257
|
+
description: Shotgun ID of the shot to remove
|
|
258
|
+
example: 12345
|
|
259
|
+
example:
|
|
260
|
+
id: 12345
|
|
261
|
+
responses:
|
|
262
|
+
200:
|
|
263
|
+
description: Removal result returned
|
|
264
|
+
content:
|
|
265
|
+
application/json:
|
|
266
|
+
schema:
|
|
267
|
+
type: object
|
|
268
|
+
properties:
|
|
269
|
+
success:
|
|
270
|
+
type: boolean
|
|
271
|
+
description: Whether the removal was successful
|
|
272
|
+
example: true
|
|
273
|
+
removed_instance_id:
|
|
274
|
+
type: string
|
|
275
|
+
format: uuid
|
|
276
|
+
description: ID of the removed shot, if found
|
|
277
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
278
|
+
400:
|
|
279
|
+
description: Invalid request body or instance not found
|
|
280
|
+
"""
|
|
281
|
+
return super().post()
|