-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.yaml
More file actions
742 lines (719 loc) · 24.5 KB
/
config.yaml
File metadata and controls
742 lines (719 loc) · 24.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
# config.yaml
# This file defines the commands, their arguments, and the classes that handle them.
# NOTE: Positional argument names use underscores (e.g., scene_file) to be valid Python identifiers.
app:
prog: "vangard-cli"
description: "A command-line interface for the Vangard toolkit."
commands:
- name: "help"
class: "vangard.commands.HelpCommand.HelpCommand"
help: "Displays help information for commands."
arguments:
- names: ["command_name"]
dest: "command_name"
type: "str"
nargs: "?" # Makes 'command_name' optional
default: null
help: "The specific command to get help for."
ui:
widget: "text"
placeholder: "e.g., load-scene, batch-render"
- name: "action"
class: "vangard.commands.ExecGenericActionSU.ExecGenericActionSU"
help: "Execute the specified action with optional settings as a series of key=value pairs separated by commas"
arguments:
- names: ["action_class"]
dest: "action_class"
type: "str"
required: true
help: "Class name of the action to execute"
ui:
widget: "text"
placeholder: "e.g., DzIrayRender, DzFileIOAction"
- names: ["-s", "--settings"]
dest: "settings"
type: "str"
default: null
help: "Settings for the action as a series of key=value pairs separated by commas"
ui:
widget: "text"
placeholder: "key1=value1,key2=value2"
- name: "saveas"
class: "vangard.commands.CopyCurerentSceneFileSU.CopyCurrentSceneFileSU"
help: "Make a copy of the current scene file to the specified location, simulating a Save As... function"
arguments:
- names: ["save_file"]
dest: "save_file"
type: "str"
required: true
help: "Path to save a copy of the current scene file to"
ui:
widget: "file-picker"
file_type: "file"
extensions: [".duf"]
mode: "save"
- name: "listproducts"
class: "vangard.commands.ListProductsMetadataSU.ListProductsMetadataSU"
help: "Dump some basic product metadata for all products in the content management system to the specified output file."
arguments:
- names: ["-o", "--output_file"]
dest: "output_file"
type: "str"
required: false
help: "Path to save output to"
ui:
widget: "file-picker"
file_type: "file"
extensions: [".json", ".txt"]
mode: "save"
- name: "load-scene"
class: "vangard.commands.LoadMergeSU.LoadMergeSU"
help: "Load the specified scene file, replacing the current scene if --merge is not used."
arguments:
- names: ["scene_file"]
dest: "scene_file"
type: "str"
required: true
help: "Path to scene file to load"
ui:
widget: "file-picker"
file_type: "file"
extensions: [".duf", ".dsx", ".dsf"]
- names: ["-m", "--merge"]
dest: "merge"
action: "store_true"
default: false
help: "If specified, merge the new scene into the current scene instead of replacing."
ui:
widget: "checkbox"
- name: "lora-trainer-prep"
class: "vangard.commands.SingleSceneRendererSU.SingleSceneRendererSU"
help: "Render a matrixed series of images suitable for LORA training."
arguments:
- names: ["scene_files"]
dest: "scene_files"
type: "str"
required: true
help: "A glob pattern that identifies the scene files to load. Each scene file should include a single model which has the hair and clothing applied"
ui:
widget: "text"
placeholder: "e.g., /path/to/scenes/*.duf"
- names: ["lora_trainer_config"]
dest: "lora_trainer_config"
type: "str"
required: true
help: "Path to config file defining the render matrix of shots x poses x expressions"
ui:
widget: "file-picker"
file_type: "file"
extensions: [".json", ".yaml", ".yml"]
- name: "save-content-item"
class: "vangard.commands.SaveSelectedContentSU.SaveSelectedContentSU"
help: "Save the selected items in the content library to the specified target location"
arguments:
- names: ["target_dir"]
dest: "target_dir"
type: "str"
required: true
help: "Location to save content item to"
ui:
widget: "folder-picker"
- name: "save-subset"
class: "vangard.commands.SaveSceneSubsetSU.SaveSceneSubsetSU"
help: "Save the selected items to a scene subset file"
arguments:
- names: ["subset_file"]
dest: "subset_file"
type: "str"
required: true
help: "Location to save content item to"
ui:
widget: "file-picker"
file_type: "file"
extensions: [".duf"]
mode: "save"
- names: ["-d", "--directory"]
dest: "directory"
type: "str"
default: null
help: "Directory to store the subset file in"
ui:
widget: "folder-picker"
- names: ["-c", "--category"]
dest: "category"
type: "str"
default: ""
help: "Category to associate subset with"
ui:
widget: "text"
placeholder: "e.g., Props, Characters, Lights"
- name: "scene-render"
class: "vangard.commands.SingleSceneRendererSU.SingleSceneRendererSU"
help: "Direct render the current scene, or a new scene file if specified, to the given output file."
arguments:
- names: ["-s", "--scene-file"]
dest: "scene_file"
type: "str"
default: null
help: "Name of the scene file to load."
ui:
widget: "file-picker"
file_type: "file"
extensions: [".duf", ".dsx"]
- names: ["-o", "--output-file"]
dest: "output_file"
type: "str"
default: null
help: "Path to output file to save to"
ui:
widget: "file-picker"
file_type: "file"
extensions: [".png", ".jpg", ".tif", ".exr"]
mode: "save"
- name: "drop-object"
class: "vangard.commands.DropObjectSU.DropObjectSU"
help: "Drop one object on top of another, respecting bounding box boundaries."
arguments:
- names: ["source_node"]
dest: "source_node"
type: "str"
required: true
help: "Label of the object to be dropped"
ui:
widget: "text"
placeholder: "Object to drop"
autocomplete:
source: "scene-nodes"
types: ["prop", "figure"]
- names: ["target_node"]
dest: "target_node"
type: "str"
required: true
help: "Label of the object to be dropped onto"
ui:
widget: "text"
placeholder: "Target surface/object"
autocomplete:
source: "scene-nodes"
types: ["prop", "figure"]
- name: "rotate-random"
class: "vangard.commands.CharacterRotateAndRenderSU.CharacterRotateAndRenderSU"
help: "Rotate and render the selected character."
arguments:
- names: ["object_name"]
dest: "object_name"
type: "str"
required: true
help: "Label of the object to rotate prior to rendering"
ui:
widget: "text"
placeholder: "e.g., Genesis9, Camera, Chair"
- names: ["lower"]
dest: "lower"
type: "int"
default: 0
help: "Starting rotation (in degrees)"
ui:
widget: "slider"
min: 0
max: 360
step: 15
show_value: true
- name: "rotate-render"
class: "vangard.commands.CharacterRotateAndRenderSU.CharacterRotateAndRenderSU"
help: "Rotate and render the selected character."
arguments:
- names: ["object_name"]
dest: "object_name"
type: "str"
required: true
help: "Label of the object to rotate prior to rendering"
ui:
widget: "text"
placeholder: "e.g., Genesis9, Camera, Chair"
autocomplete:
source: "scene-nodes"
types: ["figure", "prop", "camera"]
- names: ["lower"]
dest: "lower"
type: "int"
default: 0
help: "Starting rotation (in degrees)"
ui:
widget: "slider"
min: 0
max: 360
step: 15
show_value: true
- names: ["upper"]
dest: "upper"
type: "int"
default: 180
help: "Ending rotation (in degrees). rotation-start must be smaller than rotation-end"
ui:
widget: "slider"
min: 0
max: 360
step: 15
show_value: true
- names: ["slices"]
dest: "slices"
type: "int"
default: null
help: "How many rotations between start and end to rotate. If set to zero, only render, do not rotate."
ui:
widget: "spinner"
min: 0
max: 72
step: 1
- names: ["-o", "--output-file"]
dest: "output_file"
type: "str"
default: null
help: "Absolute path to directory to render images in. Default is to generate one from the scene file name."
ui:
widget: "folder-picker"
- names: ["-s", "--skip-render"]
dest: "skip_render"
action: "store_true"
default: false
help: "Flag whether to render or the rotated character or not. Setting this flag skips the rendering step."
ui:
widget: "checkbox"
- name: "transform-copy"
class: "vangard.commands.CopyTransformObjectSU.CopyTransformObjectSU"
help: "Perform translate, rotate, and/or scale operations on target node to match the transforms on the target node."
arguments:
- names: ["source_node"]
dest: "source_node"
type: "str"
required: true
help: "Node to translate from"
ui:
widget: "text"
placeholder: "Source node name"
autocomplete:
source: "scene-nodes"
- names: ["target_node"]
dest: "target_node"
type: "str"
required: true
help: "Node to translate to"
ui:
widget: "text"
placeholder: "Target node name"
autocomplete:
source: "scene-nodes"
- names: ["-r", "--rotate"]
dest: "rotate"
action: "store_true"
help: "Apply the rotation transform"
ui:
widget: "checkbox"
- names: ["-t", "--translate"]
dest: "translate"
action: "store_true"
help: "Apply the translation transform"
ui:
widget: "checkbox"
- names: ["-s", "--scale"]
dest: "scale"
action: "store_true"
help: "Apply the scaling transform"
ui:
widget: "checkbox"
- names: ["-a", "--all"]
dest: "all"
action: "store_true"
help: "Apply rotation, translation, and scaling trasforms"
ui:
widget: "checkbox"
- name: "create-cam"
class: "vangard.commands.CreateBasicCameraSU.CreateBasicCameraSU"
help: "Create a perspective camera with given name and camera type as parameters to generate the name of the camera along with the selected node label."
arguments:
- names: ["cam_name"]
dest: "cam_name"
type: "str"
required: true
help: "Name of the camera"
ui:
widget: "text"
placeholder: "e.g., MainCamera, CloseUp"
- names: ["cam_class"]
dest: "cam_class"
type: "str"
required: true
help: "Class (type) of camera"
ui:
widget: "select"
choices:
- value: "PerspectiveCamera"
label: "Perspective Camera"
- value: "OrthographicCamera"
label: "Orthographic Camera"
- names: ["-f", "--focus"]
dest: "focus"
action: "store_true"
default: false
help: "If true, turn DOF on the new camera"
ui:
widget: "checkbox"
- name: "create-group"
class: "vangard.commands.CreateGroupNodeSU.CreateGroupNodeSU"
help: "Group the selected nodes in the scene to the name specified."
arguments:
- names: ["group_name"]
dest: "group_name"
type: "str"
required: true
help: "Name of the new group."
ui:
widget: "text"
placeholder: "e.g., Furniture, Props, Background"
- name: "copy-camera"
class: "vangard.commands.CopyNamedCameraToCurrentCameraSU.CopyNamedCameraToCurrentCameraSU"
help: "Copy the specified camera (by label) to the specified target camera, or the current viewport camera if target not specified"
arguments:
- names: ["-s", "--source-camera"]
dest: "source_camera"
type: "str"
default: null
help: "Camera to copy from"
ui:
widget: "text"
placeholder: "Source camera name"
autocomplete:
source: "scene-nodes"
types: ["camera"]
- names: ["-t", "--target-camera"]
dest: "target_camera"
type: "str"
default: null
help: "Camera to copy to (optional)"
ui:
widget: "text"
placeholder: "Target camera name (optional)"
autocomplete:
source: "scene-nodes"
types: ["camera"]
- name: "apply-pose"
class: "vangard.commands.ApplyGenericPoseSU.ApplyGenericPoseSU"
help: "Apply the given named posed as pose file to the currently selected node or specified node"
arguments:
- names: ["pose_file"]
dest: "pose_file"
type: "str"
required: true
help: "Absolute path to the pose file to be applied"
ui:
widget: "file-picker"
file_type: "file"
extensions: [".duf", ".dsf", ".pz2"]
- names: ["-t", "--target-node"]
dest: "target_node"
type: "str"
default: null
help: "Label of the node to apply the pose to. If not specified, apply to the currently selected node."
ui:
widget: "text"
placeholder: "Target node name (optional)"
autocomplete:
source: "scene-nodes"
types: ["figure"]
- name: "inc-scene"
class: "vangard.commands.SceneRollerSU.SceneRollerSU"
help: "Save the current scene file incrementing the file name with a numerical, incrementing, suffix."
arguments:
- names: ["-n", "--number"]
dest: "number"
type: "int"
default: null
help: "If specified, replace the numeric suffix at the end of the scene file name with the given number (or add it if one doesn't exist)."
ui:
widget: "spinner"
min: 0
max: 9999
step: 1
- names: ["-i", "--increment"]
dest: "increment"
type: "int"
default: 1
help: "If specified, increment the scene file suffix by the given amount (default = 1)."
ui:
widget: "spinner"
min: 1
max: 100
step: 1
- name: "product-list"
class: "vangard.commands.ListSceneProductsSU.ListSceneProductsSU"
help: "List the product information for objects in the current scene"
arguments:
- names: ["-t", "--target-file"]
dest: "target_file"
type: "str"
default: "C:/Temp/products.json"
help: "File to write output information to"
ui:
widget: "file-picker"
file_type: "file"
extensions: [".json"]
mode: "save"
- names: ["-n", "--node-context"]
dest: "node_context"
action: "store_true"
default: false
help: "If specified, present the output in the context of nodes. Otherwise the default is to present output in the context of products."
ui:
widget: "checkbox"
- names: ["-s", "--selected-only"]
dest: "selected_only"
action: "store_true"
default: false
help: "Only identify products for the currently selected node."
ui:
widget: "checkbox"
- name: "batch-render"
class: "vangard.commands.BatchRenderSU.BatchRenderSU"
help: "Given a pattern of scene files, load each one and render it to the target location (default is studio-iray) with the given output file pattern"
arguments:
- names: ["-s", "--scene-files"]
dest: "scene_files"
type: "str"
default: "_"
help: "Pattern of scene files to load, including glob support. See README for examples"
ui:
widget: "text"
placeholder: "e.g., /path/to/scenes/*.duf"
- names: ["-o", "--output-path"]
dest: "output_path"
type: "str"
default: null
help: "Path to directory where output files are to be written. If not specified, use the location of the scene file."
ui:
widget: "folder-picker"
- names: ["-t", "--target"]
dest: "target"
type: "str"
default: "direct-file"
help: "Target of the render. Allowed values are local-to-file, local-to-window, or iray-server-bridge"
ui:
widget: "select"
choices:
- value: "direct-file"
label: "Direct to File (Local)"
- value: "local-to-file"
label: "Local to File"
- value: "local-to-window"
label: "Local to Window"
- value: "iray-server-bridge"
label: "iRay Server Bridge"
- names: ["-r", "--resolution"]
dest: "resolution"
type: "str"
default: null
help: "Resolution to render, overriding the resolution of the scene file, in WxH format (e.g. 1920x1080)"
ui:
widget: "text"
placeholder: "e.g., 1920x1080, 3840x2160"
- names: ["-c", "--cameras"]
dest: "cameras"
type: "str"
default: null
help: "Cameras to render for. Can be one of 'all_visible', 'viewport', or a pattern that maps to one or more visible cameras"
ui:
widget: "text"
placeholder: "e.g., all_visible, viewport, Camera*"
- names: ["-j", "--job-name-pattern"]
dest: "job_name_pattern"
type: "str"
default: null
help: "Pattern to use for naming job names or render output files. In the pattern, %s refers to the scene name, %c the camera name, %f the frame number, and %r the render count"
ui:
widget: "text"
placeholder: "e.g., %s_%c_frame%f"
- names: ["-f", "--frames"]
dest: "frames"
type: "str"
default: null
help: "Frames to render. Comma-separated list of frames that can include ranges and range patterns. See README for full detail and example."
ui:
widget: "text"
placeholder: "e.g., 1,5,10-20"
- names: ["--iray-server"]
dest: "iray_server"
type: "str"
default: "127.0.0.1"
help: "For target iray-server the IP address or hostname of the iRay server/master to use."
ui:
widget: "text"
placeholder: "IP address or hostname"
- names: ["--iray-protocol"]
dest: "iray_protocol"
type: "str"
default: "http"
help: "Sets the http protocol to use. Allowed values are http or https."
ui:
widget: "select"
choices: ["http", "https"]
- names: ["--iray-port"]
dest: "iray_port"
type: "str"
default: "9090"
help: "For target iray-server the TCP port of the iRay server/master."
ui:
widget: "text"
placeholder: "Port number"
- names: ["--iray-user"]
dest: "iray_user"
type: "str"
default: null
help: "For target iray-server the username to connect to the iRay server/master. Must be specified here or in config file specified by --iray-config-file"
ui:
widget: "text"
placeholder: "Username"
- names: ["--iray-password"]
dest: "iray_password"
type: "str"
default: null
help: "For target iray-server the password to connect to the iRay server/master. Must be specified here or in config file specified by --iray-config-file"
ui:
widget: "text"
placeholder: "Password"
- names: ["--iray-config-file"]
dest: "iray_config_file"
type: "str"
default: null
help: "For target iray-server the configuration options file to use for iRay server/master configuration. Values in this file can be overridden by additional command line arguments"
ui:
widget: "file-picker"
file_type: "file"
extensions: [".json", ".yaml", ".yml"]
- name: "save-viewport"
class: "vangard.commands.SaveViewportSU.SaveViewportSU"
help: "Capture and save the active viewport to image files for a range of frames"
arguments:
- names: ["-f", "--save-file"]
dest: "save_file"
type: "str"
required: true
help: "Output file path root (without extension). Frame number and extension will be appended."
ui:
widget: "file-picker"
file_type: "file"
mode: "save"
- names: ["-c", "--view-camera"]
dest: "view_camera"
type: "str"
default: null
help: "Name of the camera to set in the viewport before capturing. If not specified, uses the current viewport camera."
ui:
widget: "text"
placeholder: "Camera name (optional)"
- names: ["-e", "--image-format"]
dest: "image_format"
type: "str"
default: "png"
help: "Image file format/extension (e.g. png, jpg). Default is png."
ui:
widget: "select"
choices: ["png", "jpg", "tif", "bmp"]
- names: ["-s", "--frame-start"]
dest: "frame_start"
type: "int"
default: null
help: "First frame to capture. Defaults to the current scene frame."
ui:
widget: "spinner"
min: 0
max: 10000
step: 1
- names: ["-n", "--frame-end"]
dest: "frame_end"
type: "int"
default: null
help: "End frame (exclusive) for capture range. Defaults to frame_start + 1 (single frame)."
ui:
widget: "spinner"
min: 0
max: 10000
step: 1
- name: "face-render-lora"
class: "vangard.commands.FaceRenderLoraSU.FaceRenderLoraSU"
help: "Render a series of orbital camera angles around a figure's face for LoRA training image generation"
arguments:
- names: ["-o", "--output-dir"]
dest: "output_dir"
type: "str"
default: "y:/ai/charflow/output/face_lora/"
help: "Directory to write rendered images to."
ui:
widget: "folder-picker"
- names: ["-p", "--file-prefix"]
dest: "file_prefix"
type: "str"
default: "face"
help: "Filename prefix for output images. Angle label and extension are appended."
ui:
widget: "text"
placeholder: "e.g., face, portrait, headshot"
- names: ["-W", "--wid"]
dest: "wid"
type: "int"
default: 768
help: "Render width in pixels."
ui:
widget: "spinner"
min: 64
max: 4096
step: 64
- names: ["-H", "--height"]
dest: "height"
type: "int"
default: 768
help: "Render height in pixels."
ui:
widget: "spinner"
min: 64
max: 4096
step: 64
- names: ["-d", "--camera-distance"]
dest: "camera_distance"
type: "int"
default: 80
help: "Camera distance from the face center in DAZ scene units (cm)."
ui:
widget: "slider"
min: 30
max: 200
step: 5
show_value: true
- names: ["-y", "--face-y-offset"]
dest: "face_y_offset"
type: "int"
default: 5
help: "Vertical offset from the head bone origin toward eye/nose level."
ui:
widget: "slider"
min: -20
max: 20
step: 1
show_value: true
- names: ["-n", "--node-label"]
dest: "node_label"
type: "str"
default: null
help: "Label of the figure node to target. If not specified, the first skeleton in the scene is used."
ui:
widget: "text"
placeholder: "Figure node name (optional)"
autocomplete:
source: "scene-nodes"
types: ["figure"]
- names: ["-t", "--test-mode"]
dest: "test_mode"
action: "store_true"
default: false
help: "If set, show a message box at each angle instead of rendering."
ui:
widget: "checkbox"