initial commit

This commit is contained in:
iLLiCiTiT 2020-07-23 11:03:44 +02:00
parent c6e586f678
commit 2909b7453e
52 changed files with 3286 additions and 0 deletions

View file

@ -0,0 +1,8 @@
{
"Model": ["model"],
"Render Globals": ["light", "render"],
"Layout": ["layout"],
"Set Dress": ["setdress"],
"Look": ["look"],
"Rig": ["rigging"]
}

View file

@ -0,0 +1,3 @@
{
"default": "test"
}

View file

@ -0,0 +1,11 @@
{
"status_update": {
"_ignore_": ["in progress", "ommited", "on hold"],
"Ready": ["not ready"],
"In Progress" : ["_any_"]
},
"status_version_to_task": {
"in progress": "in progress",
"approved": "approved"
}
}

View file

@ -0,0 +1,8 @@
{
"Model": ["model"],
"Render Globals": ["light", "render"],
"Layout": ["layout"],
"Set Dress": ["setdress"],
"Look": ["look"],
"Rig": ["rigging"]
}

View file

@ -0,0 +1,212 @@
{
"width": 1920,
"height": 1080,
"destination_path": "{destination_path}",
"style": {
"*": {
"font-family": "arial",
"font-color": "#ffffff",
"font-bold": false,
"font-italic": false,
"bg-color": "#0077ff",
"alignment-horizontal": "left",
"alignment-vertical": "top"
},
"layer": {
"padding": 0,
"margin": 0
},
"rectangle": {
"padding": 0,
"margin": 0,
"bg-color": "#E9324B",
"fill": true
},
"main_frame": {
"padding": 0,
"margin": 0,
"bg-color": "#252525"
},
"table": {
"padding": 0,
"margin": 0,
"bg-color": "transparent"
},
"table-item": {
"padding": 5,
"padding-bottom": 10,
"margin": 0,
"bg-color": "#212121",
"bg-alter-color": "#272727",
"font-color": "#dcdcdc",
"font-bold": false,
"font-italic": false,
"alignment-horizontal": "left",
"alignment-vertical": "top",
"word-wrap": false,
"ellide": true,
"max-lines": 1
},
"table-item-col[0]": {
"font-size": 20,
"font-color": "#898989",
"font-bold": true,
"ellide": false,
"word-wrap": true,
"max-lines": null
},
"table-item-col[1]": {
"font-size": 40,
"padding-left": 10
},
"#colorbar": {
"bg-color": "#9932CC"
}
},
"items": [{
"type": "layer",
"direction": 1,
"name": "MainLayer",
"style": {
"#MainLayer": {
"width": 1094,
"height": 1000,
"margin": 25,
"padding": 0
},
"#LeftSide": {
"margin-right": 25
}
},
"items": [{
"type": "layer",
"name": "LeftSide",
"items": [{
"type": "layer",
"direction": 1,
"style": {
"table-item": {
"bg-color": "transparent",
"padding-bottom": 20
},
"table-item-col[0]": {
"font-size": 20,
"font-color": "#898989",
"alignment-horizontal": "right"
},
"table-item-col[1]": {
"alignment-horizontal": "left",
"font-bold": true,
"font-size": 40
}
},
"items": [{
"type": "table",
"values": [
["Show:", "{project[name]}"]
],
"style": {
"table-item-field[0:0]": {
"width": 150
},
"table-item-field[0:1]": {
"width": 580
}
}
}, {
"type": "table",
"values": [
["Submitting For:", "{intent}"]
],
"style": {
"table-item-field[0:0]": {
"width": 160
},
"table-item-field[0:1]": {
"width": 218,
"alignment-horizontal": "right"
}
}
}]
}, {
"type": "rectangle",
"style": {
"bg-color": "#bc1015",
"width": 1108,
"height": 5,
"fill": true
}
}, {
"type": "table",
"use_alternate_color": true,
"values": [
["Version name:", "{version_name}"],
["Date:", "{date}"],
["Shot Types:", "{shot_type}"],
["Submission Note:", "{submission_note}"]
],
"style": {
"table-item": {
"padding-bottom": 20
},
"table-item-field[0:1]": {
"font-bold": true
},
"table-item-field[3:0]": {
"word-wrap": true,
"ellide": true,
"max-lines": 4
},
"table-item-col[0]": {
"alignment-horizontal": "right",
"width": 150
},
"table-item-col[1]": {
"alignment-horizontal": "left",
"width": 958
}
}
}]
}, {
"type": "layer",
"name": "RightSide",
"items": [{
"type": "placeholder",
"name": "thumbnail",
"path": "{thumbnail_path}",
"style": {
"width": 730,
"height": 412
}
}, {
"type": "placeholder",
"name": "colorbar",
"path": "{color_bar_path}",
"return_data": true,
"style": {
"width": 730,
"height": 55
}
}, {
"type": "table",
"use_alternate_color": true,
"values": [
["Vendor:", "{vendor}"],
["Shot Name:", "{shot_name}"],
["Frames:", "{frame_start} - {frame_end} ({duration})"]
],
"style": {
"table-item-col[0]": {
"alignment-horizontal": "left",
"width": 200
},
"table-item-col[1]": {
"alignment-horizontal": "right",
"width": 530,
"font-size": 30
}
}
}]
}]
}]
}

View file

@ -0,0 +1,108 @@
{
"Codec": {
"compression": "jpg",
"format": "image",
"quality": 95
},
"Display Options": {
"background": [
0.7137254901960784,
0.7137254901960784,
0.7137254901960784
],
"backgroundBottom": [
0.7137254901960784,
0.7137254901960784,
0.7137254901960784
],
"backgroundTop": [
0.7137254901960784,
0.7137254901960784,
0.7137254901960784
],
"override_display": true
},
"Generic": {
"isolate_view": true,
"off_screen": true
},
"IO": {
"name": "",
"open_finished": false,
"raw_frame_numbers": false,
"recent_playblasts": [],
"save_file": false
},
"PanZoom": {
"pan_zoom": true
},
"Renderer": {
"rendererName": "vp2Renderer"
},
"Resolution": {
"height": 1080,
"mode": "Custom",
"percent": 1.0,
"width": 1920
},
"Time Range": {
"end_frame": 25,
"frame": "",
"start_frame": 0,
"time": "Time Slider"
},
"Viewport Options": {
"cameras": false,
"clipGhosts": false,
"controlVertices": false,
"deformers": false,
"dimensions": false,
"displayLights": 0,
"dynamicConstraints": false,
"dynamics": false,
"fluids": false,
"follicles": false,
"gpuCacheDisplayFilter": false,
"greasePencils": false,
"grid": false,
"hairSystems": false,
"handles": false,
"high_quality": true,
"hud": false,
"hulls": false,
"ikHandles": false,
"imagePlane": false,
"joints": false,
"lights": false,
"locators": false,
"manipulators": false,
"motionTrails": false,
"nCloths": false,
"nParticles": false,
"nRigids": false,
"nurbsCurves": false,
"nurbsSurfaces": false,
"override_viewport_options": true,
"particleInstancers": false,
"pivots": false,
"planes": false,
"pluginShapes": false,
"polymeshes": true,
"shadows": false,
"strokes": false,
"subdivSurfaces": false,
"textures": false,
"twoSidedLighting": true
},
"Camera Options": {
"displayGateMask": false,
"displayResolution": false,
"displayFilmGate": false,
"displayFieldChart": false,
"displaySafeAction": false,
"displaySafeTitle": false,
"displayFilmPivot": false,
"displayFilmOrigin": false,
"overscan": 1.0
}
}

View file

@ -0,0 +1,6 @@
{
"IntegrateFtrackNote": {
"note_with_intent_template": "{intent}: {comment}",
"note_labels": []
}
}

View file

@ -0,0 +1,73 @@
{
"IntegrateMasterVersion": {
"enabled": false
},
"ExtractReview": {
"__documentation__": "http://pype.club/docs/admin_presets_plugins",
"profiles": [
{
"families": [],
"hosts": [],
"outputs": {
"h264": {
"filter": {
"families": ["render", "review", "ftrack"]
},
"ext": "mp4",
"ffmpeg_args": {
"input": [
"-gamma 2.2"
],
"video_filters": [],
"audio_filters": [],
"output": [
"-pix_fmt yuv420p",
"-crf 18",
"-intra"
]
},
"tags": ["burnin", "ftrackreview"]
}
}
}
]
},
"ExtractBurnin": {
"options": {
"opacity": 1,
"x_offset": 5,
"y_offset": 5,
"bg_padding": 5,
"bg_opacity": 0.5,
"font_size": 42
},
"fields": {
},
"profiles": [
{
"burnins": {
"burnin": {
"TOP_LEFT": "{yy}-{mm}-{dd}",
"TOP_RIGHT": "{anatomy[version]}",
"TOP_CENTERED": "",
"BOTTOM_RIGHT": "{frame_start}-{current_frame}-{frame_end}",
"BOTTOM_CENTERED": "{asset}",
"BOTTOM_LEFT": "{username}"
}
}
}
]
},
"IntegrateAssetNew": {
"template_name_profiles": {
"publish": {
"families": [],
"tasks": []
},
"render": {
"families": ["review", "render", "prerender"]
}
}
}
}

View file

@ -0,0 +1,9 @@
{
"Preset n1": {
"ValidateNoAnimation": false,
"ValidateShapeDefaultNames": false
},
"Preset n2": {
"ValidateNoAnimation": false
}
}

View file

@ -0,0 +1,18 @@
{
"colors": {
"model": [0.821, 0.518, 0.117],
"rig": [0.144, 0.443, 0.463],
"pointcache": [0.368, 0.821, 0.117],
"animation": [0.368, 0.821, 0.117],
"ass": [1.0, 0.332, 0.312],
"camera": [0.447, 0.312, 1.0],
"fbx": [1.0, 0.931, 0.312],
"mayaAscii": [0.312, 1.0, 0.747],
"setdress": [0.312, 1.0, 0.747],
"layout": [0.312, 1.0, 0.747],
"vdbcache": [0.312, 1.0, 0.428],
"vrayproxy": [0.258, 0.95, 0.541],
"yeticache": [0.2, 0.8, 0.3],
"yetiRig": [0, 0.8, 0.5]
}
}

View file

@ -0,0 +1,17 @@
{
"ValidateModelName": {
"enabled": false,
"material_file": "/path/to/shader_name_definition.txt",
"regex": "(.*)_(\\d)*_(?P<shader>.*)_(GEO)"
},
"ValidateAssemblyName": {
"enabled": false
},
"ValidateShaderName": {
"enabled": false,
"regex": "(?P<asset>.*)_(.*)_SHD"
},
"ValidateMeshHasOverlappingUVs": {
"enabled": false
}
}

View file

@ -0,0 +1,54 @@
[{
"tasks": ["lighting"],
"current_context": [{
"subset_name_filters": [".+[Mm]ain"],
"families": ["model"],
"repre_names": ["abc", "ma"],
"loaders": ["ReferenceLoader"]
}, {
"families": ["animation", "pointcache"],
"repre_names": ["abc"],
"loaders": ["ReferenceLoader"]
},{
"families": ["rendersetup"],
"repre_names": ["json"],
"loaders": ["RenderSetupLoader"]
}, {
"families": ["camera"],
"repre_names": ["abc"],
"loaders": ["ReferenceLoader"]
}],
"linked_assets": [{
"families": ["setdress"],
"repre_names": ["ma"],
"loaders": ["ReferenceLoader"]
}, {
"families": ["ass"],
"repre_names": ["ass"],
"loaders":["assLoader"]
}]
}, {
"tasks": ["animation"],
"current_context": [{
"families": ["camera"],
"repre_names": ["abc", "ma"],
"loaders": ["ReferenceLoader"]
}, {
"families": ["audio"],
"repre_names": ["wav"],
"loaders": ["RenderSetupLoader"]
}],
"linked_assets": [{
"families": ["setdress"],
"repre_names": ["proxy"],
"loaders": ["ReferenceLoader"]
}, {
"families": ["rig"],
"repre_names": ["ass"],
"loaders": ["rigLoader"]
}]
}]

View file

@ -0,0 +1,8 @@
{
"CreateWriteRender": {
"fpath_template": "{work}/renders/nuke/{subset}/{subset}.{frame}.{ext}"
},
"CreateWritePrerender": {
"fpath_template": "{work}/prerenders/nuke/{subset}/{subset}.{frame}.{ext}"
}
}

View file

@ -0,0 +1,48 @@
{
"ExtractThumbnail": {
"nodes": {
"Reformat": [
["type", "to format"],
["format", "HD_1080"],
["filter", "Lanczos6"],
["black_outside", true],
["pbb", false]
]
}
},
"ValidateNukeWriteKnobs": {
"enabled": false,
"knobs": {
"render": {
"review": true
}
}
},
"ExtractReviewDataLut": {
"__documentation__": {
"viewer_lut_raw": "set to `true` if you Input_process node on viewer is used with baked screen space, so you have to look with RAW viewer lut. Else just keep it on `false`",
"enabled": "keep in on `false` if you want Nuke baking colorspace workflow applied else FFmpeg will convert imgsequence with baked LUT"
},
"enabled": false
},
"ExtractReviewDataMov": {
"__documentation__": {
"viewer_lut_raw": "set to `true` if you Input_process node on viewer is used with baked screen space, so you have to look with RAW viewer lut. Else just keep it on `false`",
"enabled": "keep in on `true` if you want Nuke baking colorspace workflow applied"
},
"enabled": true,
"viewer_lut_raw": false
},
"ExtractSlateFrame": {
"__documentation__": {
"viewer_lut_raw": "set to `true` if you Input_process node on viewer is used with baked screen space, so you have to look with RAW viewer lut. Else just keep it on `false`"
},
"viewer_lut_raw": false
},
"NukeSubmitDeadline": {
"deadline_priority": 50,
"deadline_pool": "",
"deadline_pool_secondary": "",
"deadline_chunk_size": 1
}
}

View file

@ -0,0 +1,11 @@
[{
"tasks": ["compositing"],
"current_context": [{
"families": ["render", "plate"],
"repre_names": ["exr" ,"dpx"],
"loaders": ["LoadSequence"]
}],
"linked_assets": []
}]

View file

@ -0,0 +1,10 @@
{
"strict": {
"ValidateVersion": true,
"VersionUpWorkfile": true
},
"benevolent": {
"ValidateVersion": false,
"VersionUpWorkfile": false
}
}

View file

@ -0,0 +1,8 @@
{
"CollectInstanceVersion": {
"enabled": false
},
"ExtractReviewCutUpVideo": {
"tags_addition": []
}
}

View file

@ -0,0 +1,17 @@
{
"ExtractReviewSP": {
"outputs": {
"h264": {
"input": [
"-gamma 2.2"
],
"output": [
"-pix_fmt yuv420p",
"-crf 18"
],
"tags": ["preview"],
"ext": "mov"
}
}
}
}

View file

@ -0,0 +1,8 @@
{
"MyTestCreator": {
"my_test_property": "B",
"active": false,
"new_property": "new",
"family": "new_family"
}
}

View file

@ -0,0 +1,10 @@
{
"MyTestPlugin": {
"label": "loaded from preset",
"optional": true,
"families": ["changed", "by", "preset"]
},
"MyTestRemovedPlugin": {
"enabled": false
}
}

View file

@ -0,0 +1,5 @@
{
"frameStart": 1001,
"handleStart": 0,
"handleEnd": 0
}

View file

@ -0,0 +1,21 @@
{
"defaultTasks": ["Layout", "Animation"],
"taskToSubsets": {
"Layout": ["reference", "audio"],
"Animation": ["audio"]
},
"subsetToRepresentations": {
"reference": {
"preset": "h264",
"representation": "mp4"
},
"thumbnail": {
"preset": "jpeg_thumb",
"representation": "jpg"
},
"audio": {
"preset": "48khz",
"representation": "wav"
}
}
}

View file

@ -0,0 +1,4 @@
{
"dev_mode": false,
"install_unreal_python_engine": false
}

View file

@ -0,0 +1,5 @@
{
"TestAction": {
"ignore_me": true
}
}

View file

@ -0,0 +1,39 @@
{
"blender_2.80": true,
"blender_2.81": true,
"blender_2.82": true,
"blender_2.83": true,
"harmony_17": true,
"houdini_16": true,
"houdini_17": true,
"houdini_18": true,
"maya_2016": true,
"maya_2017": true,
"maya_2018": true,
"maya_2019": true,
"maya_2020": true,
"nuke_10.0": true,
"nuke_11.0": true,
"nuke_11.2": true,
"nuke_11.3": true,
"nuke_12.0": true,
"nukex_10.0": true,
"nukex_11.0": true,
"nukex_11.2": true,
"nukex_11.3": true,
"nukex_12.0": true,
"nukestudio_10.0": true,
"nukestudio_11.0": true,
"nukestudio_11.2": true,
"nukestudio_11.3": true,
"nukestudio_12.0": true,
"photoshop_2020": true,
"premiere_2019": true,
"premiere_2020": true,
"python_2": true,
"python_3": true,
"resolve_16": true,
"shell": true,
"storyboardpro_7": true,
"unreal_4.21": true
}

View file

@ -0,0 +1,39 @@
{
"blender_2.80": true,
"blender_2.81": true,
"blender_2.82": true,
"blender_2.83": true,
"harmony_17": true,
"houdini_16": true,
"houdini_17": true,
"houdini_18": true,
"maya_2016": true,
"maya_2017": true,
"maya_2018": true,
"maya_2019": true,
"maya_2020": true,
"nuke_10.0": true,
"nuke_11.0": true,
"nuke_11.2": true,
"nuke_11.3": true,
"nuke_12.0": true,
"nukex_10.0": true,
"nukex_11.0": true,
"nukex_11.2": true,
"nukex_11.3": true,
"nukex_12.0": true,
"nukestudio_10.0": true,
"nukestudio_11.0": true,
"nukestudio_11.2": true,
"nukestudio_11.3": true,
"nukestudio_12.0": true,
"photoshop_2020": true,
"premiere_2019": true,
"premiere_2020": true,
"python_2": true,
"python_3": true,
"resolve_16": true,
"shell": true,
"storyboardpro_7": true,
"unreal_4.21": true
}

View file

@ -0,0 +1,9 @@
{
"default": "wip",
"items": {
"": "",
"wip": "WIP",
"test": "TEST",
"final": "FINAL"
}
}

View file

@ -0,0 +1,25 @@
{
"usage": {
"User settings": false,
"Ftrack": false,
"Muster": false,
"Avalon": true,
"Clockify": false,
"Standalone Publish": true,
"Logging": true,
"Idle Manager": true,
"Timers Manager": true,
"Rest Api": true,
"Premiere Communicator": true
},
"attributes": {
"Rest Api": {
"default_port": 8021,
"exclude_ports": []
},
"Timers Manager": {
"full_time": 15,
"message_time": 0.5
}
}
}

View file

@ -0,0 +1,19 @@
{
"3delight": 41,
"arnold": 46,
"arnold_sf": 57,
"gelato": 30,
"harware": 3,
"krakatoa": 51,
"file_layers": 7,
"mentalray": 2,
"mentalray_sf": 6,
"redshift": 55,
"renderman": 29,
"software": 1,
"software_sf": 5,
"turtle": 10,
"vector": 4,
"vray": 37,
"ffmpeg": 48
}

View file

@ -0,0 +1,153 @@
{
"key": "applications",
"type": "dict-expanding",
"label": "Applications",
"children": [
{
"type": "dict-form",
"children": [
{
"key": "blender_2.80",
"type": "boolean",
"label": "Blender 2.80"
}, {
"key": "blender_2.81",
"type": "boolean",
"label": "Blender 2.81"
}, {
"key": "blender_2.82",
"type": "boolean",
"label": "Blender 2.82"
}, {
"key": "blender_2.83",
"type": "boolean",
"label": "Blender 2.83"
}, {
"key": "celaction_local",
"type": "boolean",
"label": "Celaction Local"
}, {
"key": "celaction_remote",
"type": "boolean",
"label": "Celaction Remote"
}, {
"key": "harmony_17",
"type": "boolean",
"label": "Harmony 17"
}, {
"key": "houdini_16",
"type": "boolean",
"label": "Houdini 16"
}, {
"key": "houdini_17",
"type": "boolean",
"label": "Houdini 17"
}, {
"key": "houdini_18",
"type": "boolean",
"label": "Houdini 18"
}, {
"key": "maya_2017",
"type": "boolean",
"label": "Autodest Maya 2017"
}, {
"key": "maya_2018",
"type": "boolean",
"label": "Autodest Maya 2018"
}, {
"key": "maya_2019",
"type": "boolean",
"label": "Autodest Maya 2019"
}, {
"key": "maya_2020",
"type": "boolean",
"label": "Autodest Maya 2020"
}, {
"key": "nuke_10.0",
"type": "boolean",
"label": "Nuke 10.0"
}, {
"key": "nuke_11.2",
"type": "boolean",
"label": "Nuke 11.2"
}, {
"key": "nuke_11.3",
"type": "boolean",
"label": "Nuke 11.3"
}, {
"key": "nuke_12.0",
"type": "boolean",
"label": "Nuke 12.0"
}, {
"key": "nukex_10.0",
"type": "boolean",
"label": "NukeX 10.0"
}, {
"key": "nukex_11.2",
"type": "boolean",
"label": "NukeX 11.2"
}, {
"key": "nukex_11.3",
"type": "boolean",
"label": "NukeX 11.3"
}, {
"key": "nukex_12.0",
"type": "boolean",
"label": "NukeX 12.0"
}, {
"key": "nukestudio_10.0",
"type": "boolean",
"label": "NukeStudio 10.0"
}, {
"key": "nukestudio_11.2",
"type": "boolean",
"label": "NukeStudio 11.2"
}, {
"key": "nukestudio_11.3",
"type": "boolean",
"label": "NukeStudio 11.3"
}, {
"key": "nukestudio_12.0",
"type": "boolean",
"label": "NukeStudio 12.0"
}, {
"key": "houdini_16.5",
"type": "boolean",
"label": "Houdini 16.5"
}, {
"key": "houdini_17",
"type": "boolean",
"label": "Houdini 17"
}, {
"key": "houdini_18",
"type": "boolean",
"label": "Houdini 18"
}, {
"key": "premiere_2019",
"type": "boolean",
"label": "Premiere 2019"
}, {
"key": "premiere_2020",
"type": "boolean",
"label": "Premiere 2020"
}, {
"key": "premiere_2020",
"type": "boolean",
"label": "Premiere 2020"
}, {
"key": "resolve_16",
"type": "boolean",
"label": "BM DaVinci Resolve 16"
}, {
"key": "storyboardpro_7",
"type": "boolean",
"label": "Storyboard Pro 7"
}, {
"key": "unreal_4.24",
"type": "boolean",
"label": "Unreal Editor 4.24"
}
]
}
]
}

View file

@ -0,0 +1,30 @@
{
"key": "ftrack",
"type": "dict-expanding",
"label": "Ftrack",
"children": [
{
"key": "status_update",
"type": "dict-expanding",
"label": "Status updates",
"children": [
{
"key": "Ready",
"type": "text-singleline",
"label": "Ready"
}
]
}, {
"key": "status_version_to_task",
"type": "dict-expanding",
"label": "Version status to Task status",
"children": [
{
"key": "in progress",
"type": "text-singleline",
"label": "In Progress"
}
]
}
]
}

View file

@ -0,0 +1,13 @@
{
"key": "studio",
"type": "dict-invisible",
"label": "Studio",
"children": [
{
"type": "schema",
"children": [
"ftrack_projects_gui_schema"
]
}
]
}

View file

@ -0,0 +1,23 @@
{
"key": "studio",
"type": "dict-invisible",
"label": "Studio",
"children": [
{
"type": "schema",
"children": [
"applications_gui_schema",
"tools_gui_schema"
]
}, {
"key": "muster",
"type": "dict-invisible",
"children": [{
"key": "templates_mapping",
"label": "Muster",
"type": "dict-modifiable",
"object_type": "int"
}]
}
]
}

View file

@ -0,0 +1,29 @@
{
"key": "tools",
"type": "dict-expanding",
"label": "Tools",
"children": [
{
"type": "dict-form",
"children": [
{
"key": "mtoa_3.0.1",
"type": "boolean",
"label": "Arnold Maya 3.0.1"
}, {
"key": "mtoa_3.1.1",
"type": "boolean",
"label": "Arnold Maya 3.1.1"
}, {
"key": "mtoa_3.2.0",
"type": "boolean",
"label": "Arnold Maya 3.2.0"
}, {
"key": "yeti_2.1.2",
"type": "boolean",
"label": "Yeti 2.1.2"
}
]
}
]
}

View file

@ -0,0 +1,49 @@
import os
import sys
os.environ["PYPE_CONFIG"] = (
"C:/Users/jakub.trllo/Desktop/pype/pype-setup/repos/pype-config"
)
os.environ["AVALON_MONGO"] = "mongodb://localhost:2707"
sys_paths = (
"C:/Users/Public/pype_env2/Lib/site-packages",
"C:/Users/jakub.trllo/Desktop/pype/pype-setup",
"C:/Users/jakub.trllo/Desktop/pype/pype-setup/repos/pype",
"C:/Users/jakub.trllo/Desktop/pype/pype-setup/repos/avalon-core",
"C:/Users/jakub.trllo/Desktop/pype/pype-setup/repos/pyblish-base",
"C:/Users/jakub.trllo/Desktop/pype/pype-setup/repos/pyblish-lite",
"C:/Users/jakub.trllo/Desktop/pype/pype-setup/repos/pype-config"
)
for path in sys_paths:
sys.path.append(path)
from widgets import main
import style
from Qt import QtWidgets, QtGui
class MyApp(QtWidgets.QApplication):
def __init__(self, *args, **kwargs):
super(MyApp, self).__init__(*args, **kwargs)
stylesheet = style.load_stylesheet()
self.setStyleSheet(stylesheet)
self.setWindowIcon(QtGui.QIcon(style.app_icon_path()))
if __name__ == "__main__":
app = MyApp(sys.argv)
# main_widget = QtWidgets.QWidget()
# main_widget.setWindowIcon(QtGui.QIcon(style.app_icon_path()))
#
# layout = QtWidgets.QVBoxLayout(main_widget)
#
# widget = main.MainWidget(main_widget)
# layout.addWidget(widget)
# main_widget.setLayout(layout)
# main_widget.show()
widget = main.MainWidget()
widget.show()
sys.exit(app.exec_())

View file

@ -0,0 +1,12 @@
import os
def load_stylesheet():
style_path = os.path.join(os.path.dirname(__file__), "style.css")
with open(style_path, "r") as style_file:
stylesheet = style_file.read()
return stylesheet
def app_icon_path():
return os.path.join(os.path.dirname(__file__), "pype_icon.png")

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

View file

@ -0,0 +1,90 @@
QWidget {
color: #bfccd6;
background-color: #293742;
font-size: 12px;
}
QCheckBox::indicator {
}
QCheckBox::indicator:focus {
color: #ff0000;
}
QLineEdit, QSpinBox, QDoubleSpinBox, QPlainTextEdit {
border: 1px solid #aaaaaa;
border-radius: 3px;
}
QLineEdit:focus, QSpinBox:focus, QDoubleSpinBox:focus, QPlainTextEdit:focus {
border: 1px solid #ffffff;
}
QLabel[state="original"] {}
QLabel[state="modified"] {
color: #137cbd;
}
QLabel[state="overriden-modified"] {
color: #00b386;
}
QLabel[state="overriden"] {
color: #ff8c1a;
}
QWidget[input-state="original"] {}
QWidget[input-state="modified"] {
border-color: #137cbd;
}
QWidget[input-state="overriden-modified"] {
border-color: #00b386;
}
QWidget[input-state="overriden"] {
border-color: #ff8c1a;
}
QPushButton[btn-type="text-list"] {
border: 1px solid #bfccd6;
border-radius: 10px;
}
QPushButton[btn-type="text-list"]:hover {
border-color: #137cbd;
color: #137cbd;
}
QPushButton[btn-type="expand-toggle"] {
background: transparent;
}
#DictKey[state="original"] {}
#DictKey[state="modified"] {
border-color: #137cbd;
}
#DictKey[state="overriden"] {
border-color: #00f;
}
#DictKey[state="overriden-modified"] {
border-color: #0f0;
}
#ExpandLabel {
background: transparent;
}
#DictExpandWidget, #ModifiableDict, #ExpandingWidget {
border: 1px solid #455c6e;
border-radius: 3px;
background: #1d272f;
}
#TextListSubWidget {
border: 1px solid #455c6e;
border-radius: 3px;
background: #1d272f;
}

View file

@ -0,0 +1,6 @@
from .lib import CustomNone, NOT_SET
from .base import *
from .main import *
from .inputs import *

View file

@ -0,0 +1,282 @@
import os
import json
from Qt import QtWidgets, QtCore, QtGui
from . import config
from .lib import NOT_SET
from avalon import io
class TypeToKlass:
types = {}
class ClickableWidget(QtWidgets.QLabel):
clicked = QtCore.Signal()
def __init__(self, *args, **kwargs):
super(ClickableWidget, self).__init__(*args, **kwargs)
self.setObjectName("ExpandLabel")
def mouseReleaseEvent(self, event):
if event.button() == QtCore.Qt.LeftButton:
self.clicked.emit()
super(ClickableWidget, self).mouseReleaseEvent(event)
class PypeConfigurationWidget:
is_category = False
is_overriden = False
is_modified = False
def config_value(self):
raise NotImplementedError(
"Method `config_value` is not implemented for `{}`.".format(
self.__class__.__name__
)
)
def value_from_values(self, values, keys=None):
if not values:
return NOT_SET
if keys is None:
keys = self.keys
value = values
for key in keys:
if not isinstance(value, dict):
raise TypeError(
"Expected dictionary got {}.".format(str(type(value)))
)
if key not in value:
return NOT_SET
value = value[key]
return value
def add_children_gui(self, child_configuration, values):
raise NotImplementedError((
"Method `add_children_gui` is not implemented for `{}`."
).format(self.__class__.__name__))
class StudioWidget(QtWidgets.QWidget, PypeConfigurationWidget):
config_dir = os.path.join(
os.path.dirname(os.path.dirname(__file__)),
"config_gui_schema"
)
is_overidable = False
def __init__(self, parent=None):
super(StudioWidget, self).__init__(parent)
self.input_fields = []
scroll_widget = QtWidgets.QScrollArea(self)
content_widget = QtWidgets.QWidget(scroll_widget)
content_layout = QtWidgets.QVBoxLayout(content_widget)
content_layout.setContentsMargins(0, 0, 0, 0)
content_layout.setSpacing(0)
content_layout.setAlignment(QtCore.Qt.AlignTop)
content_widget.setLayout(content_layout)
# scroll_widget.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
# scroll_widget.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOn)
scroll_widget.setWidgetResizable(True)
scroll_widget.setWidget(content_widget)
self.scroll_widget = scroll_widget
self.content_layout = content_layout
self.content_widget = content_widget
values = {"studio": config.studio_presets()}
schema = config.gui_schema("studio_gui_schema")
self.keys = schema.get("keys", [])
self.add_children_gui(schema, values)
footer_widget = QtWidgets.QWidget()
footer_layout = QtWidgets.QHBoxLayout(footer_widget)
btn = QtWidgets.QPushButton("Finish")
spacer_widget = QtWidgets.QWidget()
footer_layout.addWidget(spacer_widget, 1)
footer_layout.addWidget(btn, 0)
layout = QtWidgets.QVBoxLayout(self)
layout.setContentsMargins(0, 0, 0, 0)
layout.setSpacing(0)
self.setLayout(layout)
layout.addWidget(scroll_widget, 1)
layout.addWidget(footer_widget, 0)
btn.clicked.connect(self.___finish)
def ___finish(self):
output = {}
for item in self.input_fields:
output.update(item.config_value())
for key in reversed(self.keys):
_output = {key: output}
output = _output
print(json.dumps(output, indent=4))
def add_children_gui(self, child_configuration, values):
item_type = child_configuration["type"]
klass = TypeToKlass.types.get(item_type)
item = klass(
child_configuration, values, self.keys, self
)
self.input_fields.append(item)
self.content_layout.addWidget(item)
class ProjectListWidget(QtWidgets.QWidget):
default = "< Default >"
def __init__(self, parent=None):
super(ProjectListWidget, self).__init__(parent)
label = QtWidgets.QLabel("Project")
project_list = QtWidgets.QListView(self)
project_list.setModel(QtGui.QStandardItemModel())
layout = QtWidgets.QVBoxLayout(self)
# content_margin = 5
# layout.setContentsMargins(
# content_margin,
# content_margin,
# content_margin,
# content_margin
# )
# layout.setSpacing(3)
layout.addWidget(label, 0)
layout.addWidget(project_list, 1)
self.project_list = project_list
self.refresh()
def project_name(self):
current_selection = self.project_list.currentText()
if current_selection == self.default:
return None
return current_selection
def refresh(self):
selected_project = None
for index in self.project_list.selectedIndexes():
selected_project = index.data(QtCore.Qt.DisplayRole)
break
model = self.project_list.model()
model.clear()
items = [self.default]
io.install()
for project_doc in tuple(io.projects()):
print(project_doc["name"])
items.append(project_doc["name"])
for item in items:
model.appendRow(QtGui.QStandardItem(item))
if not selected_project:
selected_project = self.default
found_items = model.findItems(selected_project)
if found_items:
index = model.indexFromItem(found_items[0])
c = QtCore.QItemSelectionModel.SelectionFlag.SelectCurrent
self.project_list.selectionModel().select(
index, c
)
# self.project_list.selectionModel().setCurrentIndex(
# index, c
# )
class ProjectWidget(QtWidgets.QWidget, PypeConfigurationWidget):
config_dir = os.path.join(
os.path.dirname(os.path.dirname(__file__)),
"config_gui_schema"
)
is_overidable = True
def __init__(self, parent=None):
super(ProjectWidget, self).__init__(parent)
self.input_fields = []
scroll_widget = QtWidgets.QScrollArea(self)
content_widget = QtWidgets.QWidget(scroll_widget)
content_layout = QtWidgets.QVBoxLayout(content_widget)
content_layout.setContentsMargins(0, 0, 0, 0)
content_layout.setSpacing(0)
content_layout.setAlignment(QtCore.Qt.AlignTop)
content_widget.setLayout(content_layout)
scroll_widget.setWidgetResizable(True)
scroll_widget.setWidget(content_widget)
project_list_widget = ProjectListWidget()
content_layout.addWidget(project_list_widget)
self.project_list_widget = project_list_widget
self.scroll_widget = scroll_widget
self.content_layout = content_layout
self.content_widget = content_widget
values = config.project_presets()
schema = config.gui_schema("project_gui_schema")
self.keys = schema.get("keys", [])
self.add_children_gui(schema, values)
footer_widget = QtWidgets.QWidget()
footer_layout = QtWidgets.QHBoxLayout(footer_widget)
btn = QtWidgets.QPushButton("Finish")
spacer_widget = QtWidgets.QWidget()
footer_layout.addWidget(spacer_widget, 1)
footer_layout.addWidget(btn, 0)
presets_widget = QtWidgets.QWidget()
presets_layout = QtWidgets.QVBoxLayout(presets_widget)
presets_layout.setContentsMargins(0, 0, 0, 0)
presets_layout.setSpacing(0)
presets_layout.addWidget(scroll_widget, 1)
presets_layout.addWidget(footer_widget, 0)
layout = QtWidgets.QHBoxLayout(self)
layout.setContentsMargins(0, 0, 0, 0)
layout.setSpacing(0)
self.setLayout(layout)
layout.addWidget(project_list_widget, 0)
layout.addWidget(presets_widget, 1)
btn.clicked.connect(self.___finish)
def ___finish(self):
output = {}
for item in self.input_fields:
output.update(item.config_value())
for key in reversed(self.keys):
_output = {key: output}
output = _output
print(json.dumps(output, indent=4))
def add_children_gui(self, child_configuration, values):
item_type = child_configuration["type"]
klass = TypeToKlass.types.get(item_type)
item = klass(
child_configuration, values, self.keys, self
)
self.input_fields.append(item)
self.content_layout.addWidget(item)

View file

@ -0,0 +1,236 @@
import os
import json
import logging
import copy
# DEBUG SETUP
os.environ["AVALON_PROJECT"] = "kuba_each_case"
os.environ["PYPE_PROJECT_CONFIGS"] = os.path.join(
os.path.dirname(os.path.dirname(__file__)),
"config",
"project_overrides"
)
#
log = logging.getLogger(__name__)
config_path = os.path.dirname(os.path.dirname(__file__))
studio_presets_path = os.path.normpath(
os.path.join(config_path, "config", "studio_presets")
)
project_presets_path = os.path.normpath(
os.path.join(config_path, "config", "project_presets")
)
first_run = False
OVERRIDE_KEY = "__overriden__"
POP_KEY = "__popkey__"
def load_json(fpath):
# Load json data
with open(fpath, "r") as opened_file:
lines = opened_file.read().splitlines()
# prepare json string
standard_json = ""
for line in lines:
# Remove all whitespace on both sides
line = line.strip()
# Skip blank lines
if len(line) == 0:
continue
standard_json += line
# Check if has extra commas
extra_comma = False
if ",]" in standard_json or ",}" in standard_json:
extra_comma = True
standard_json = standard_json.replace(",]", "]")
standard_json = standard_json.replace(",}", "}")
global first_run
if extra_comma and first_run:
log.error("Extra comma in json file: \"{}\"".format(fpath))
# return empty dict if file is empty
if standard_json == "":
if first_run:
log.error("Empty json file: \"{}\"".format(fpath))
return {}
# Try to parse string
try:
return json.loads(standard_json)
except json.decoder.JSONDecodeError:
# Return empty dict if it is first time that decode error happened
if not first_run:
return {}
# Repreduce the exact same exception but traceback contains better
# information about position of error in the loaded json
try:
with open(fpath, "r") as opened_file:
json.load(opened_file)
except json.decoder.JSONDecodeError:
log.warning(
"File has invalid json format \"{}\"".format(fpath),
exc_info=True
)
return {}
def subkey_merge(_dict, value, keys, with_metadata=False):
key = keys.pop(0)
if not keys:
if with_metadata:
_dict[key] = {"type": "file", "value": value}
else:
_dict[key] = value
return _dict
if key not in _dict:
if with_metadata:
_dict[key] = {"type": "folder", "value": {}}
else:
_dict[key] = {}
if with_metadata:
sub_dict = _dict[key]["value"]
else:
sub_dict = _dict[key]
_value = subkey_merge(sub_dict, value, keys, with_metadata)
if with_metadata:
_dict[key]["value"] = _value
else:
_dict[key] = _value
return _dict
def load_jsons_from_dir(path, *args, **kwargs):
output = {}
path = os.path.normpath(path)
if not os.path.exists(path):
# TODO warning
return output
with_metadata = kwargs.get("with_metadata")
sub_keys = list(kwargs.pop("subkeys", args))
for sub_key in tuple(sub_keys):
_path = os.path.join(path, sub_key)
if not os.path.exists(_path):
break
path = _path
sub_keys.pop(0)
base_len = len(path) + 1
ext_len = len(".json")
for base, _directories, filenames in os.walk(path):
for filename in filenames:
basename, ext = os.path.splitext(filename)
if ext == ".json":
full_path = os.path.join(base, filename)
value = load_json(full_path)
# dict_path = os.path.join(base[base_len:], basename)
# dict_keys = dict_path.split(os.path.sep)
dict_keys = base[base_len:].split(os.path.sep) + [basename]
output = subkey_merge(output, value, dict_keys, with_metadata)
for sub_key in sub_keys:
output = output[sub_key]
return output
def studio_presets(*args, **kwargs):
return load_jsons_from_dir(studio_presets_path, *args, **kwargs)
def global_project_presets(**kwargs):
return load_jsons_from_dir(project_presets_path, **kwargs)
def studio_presets_with_metadata(*args, **kwargs):
return load_jsons_from_dir(studio_presets_path, *args, **kwargs)
def global_project_presets_with_metadata(**kwargs):
return load_jsons_from_dir(project_presets_path, **kwargs)
def project_preset_overrides(project_name, **kwargs):
project_configs_path = os.environ.get("PYPE_PROJECT_CONFIGS")
if project_name and project_configs_path:
return load_jsons_from_dir(
os.path.join(project_configs_path, project_name),
**kwargs
)
return {}
def merge_overrides(global_dict, override_dict):
if OVERRIDE_KEY in override_dict:
_override = override_dict.pop(OVERRIDE_KEY)
if _override:
return override_dict
for key, value in override_dict.items():
if value == POP_KEY:
global_dict.pop(key)
elif key == OVERRIDE_KEY:
continue
elif key not in global_dict:
global_dict[key] = value
elif isinstance(value, dict) and isinstance(global_dict[key], dict):
global_dict[key] = merge_overrides(global_dict[key], value)
else:
global_dict[key] = value
return global_dict
def apply_overrides(global_presets, project_overrides):
global_presets = copy.deepcopy(global_presets)
if not project_overrides:
return global_presets
return merge_overrides(global_presets, project_overrides)
def project_presets(project_name=None, **kwargs):
global_presets = global_project_presets(**kwargs)
if not project_name:
project_name = os.environ.get("AVALON_PROJECT")
project_overrides = project_preset_overrides(project_name, **kwargs)
return apply_overrides(global_presets, project_overrides)
def gui_schema(schema_name):
filename = schema_name + ".json"
schema_folder = os.path.join(
os.path.dirname(os.path.dirname(__file__)),
"config_gui_schema",
filename
)
with open(schema_folder, "r") as json_stream:
schema = json.load(json_stream)
return schema
p1 = studio_presets(with_metadata=True)
p2 = studio_presets(with_metadata=False)
print(json.dumps(p1, indent=4))
print(json.dumps(p2, indent=4))

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,44 @@
import uuid
class CustomNone:
"""Created object can be used as custom None (not equal to None).
WARNING: Multiple created objects are not equal either.
Exmple:
>>> a = CustomNone()
>>> a == None
False
>>> b = CustomNone()
>>> a == b
False
>>> a == a
True
"""
def __init__(self):
"""Create uuid as identifier for custom None."""
self.identifier = str(uuid.uuid4())
def __bool__(self):
"""Return False (like default None)."""
return False
def __eq__(self, other):
"""Equality is compared by identifier value."""
if type(other) == type(self):
if other.identifier == self.identifier:
return True
return False
def __str__(self):
"""Return value of identifier when converted to string."""
return "<CustomNone-{}>".format(str(self.identifier))
def __repr__(self):
"""Representation of custom None."""
return "<CustomNone-{}>".format(str(self.identifier))
NOT_SET = CustomNone()
AS_WIDGET = CustomNone()

View file

@ -0,0 +1,26 @@
from Qt import QtWidgets
from .base import StudioWidget, ProjectWidget
class MainWidget(QtWidgets.QWidget):
widget_width = 1000
widget_height = 600
def __init__(self, parent=None):
super(MainWidget, self).__init__(parent)
self.resize(self.widget_width, self.widget_height)
header_tab_widget = QtWidgets.QTabWidget(parent=self)
studio_widget = StudioWidget()
project_widget = ProjectWidget()
header_tab_widget.addTab(studio_widget, "Studio")
header_tab_widget.addTab(project_widget, "Project")
layout = QtWidgets.QVBoxLayout(self)
layout.setContentsMargins(0, 0, 0, 0)
layout.setSpacing(0)
layout.addWidget(header_tab_widget)
self.setLayout(layout)

View file

@ -0,0 +1,127 @@
from Qt import QtWidgets, QtCore
class SelectableMenu(QtWidgets.QMenu):
selection_changed = QtCore.Signal()
def mouseReleaseEvent(self, event):
action = self.activeAction()
if action and action.isEnabled():
action.trigger()
self.selection_changed.emit()
else:
super(SelectableMenu, self).mouseReleaseEvent(event)
def event(self, event):
result = super(SelectableMenu, self).event(event)
if event.type() == QtCore.QEvent.Show:
parent = self.parent()
move_point = parent.mapToGlobal(QtCore.QPoint(0, parent.height()))
check_point = (
move_point
+ QtCore.QPoint(self.width(), self.height())
)
visibility_check = (
QtWidgets.QApplication.desktop().rect().contains(check_point)
)
if not visibility_check:
move_point -= QtCore.QPoint(0, parent.height() + self.height())
self.move(move_point)
self.updateGeometry()
self.repaint()
return result
class AddibleComboBox(QtWidgets.QComboBox):
"""Searchable ComboBox with empty placeholder value as first value"""
def __init__(self, placeholder="", parent=None):
super(AddibleComboBox, self).__init__(parent)
self.setEditable(True)
# self.setInsertPolicy(self.NoInsert)
self.lineEdit().setPlaceholderText(placeholder)
# self.lineEdit().returnPressed.connect(self.on_return_pressed)
# Apply completer settings
completer = self.completer()
completer.setCompletionMode(completer.PopupCompletion)
completer.setCaseSensitivity(QtCore.Qt.CaseInsensitive)
# def on_return_pressed(self):
# text = self.lineEdit().text().strip()
# if not text:
# return
#
# index = self.findText(text)
# if index < 0:
# self.addItems([text])
# index = self.findText(text)
def populate(self, items):
self.clear()
# self.addItems([""]) # ensure first item is placeholder
self.addItems(items)
def get_valid_value(self):
"""Return the current text if it's a valid value else None
Note: The empty placeholder value is valid and returns as ""
"""
text = self.currentText()
lookup = set(self.itemText(i) for i in range(self.count()))
if text not in lookup:
return None
return text or None
class MultiselectEnum(QtWidgets.QWidget):
selection_changed = QtCore.Signal()
def __init__(self, title, parent=None):
super(MultiselectEnum, self).__init__(parent)
toolbutton = QtWidgets.QToolButton(self)
toolbutton.setText(title)
toolmenu = SelectableMenu(toolbutton)
toolbutton.setMenu(toolmenu)
toolbutton.setPopupMode(QtWidgets.QToolButton.MenuButtonPopup)
layout = QtWidgets.QHBoxLayout()
layout.setContentsMargins(0, 0, 0, 0)
layout.addWidget(toolbutton)
self.setLayout(layout)
toolmenu.selection_changed.connect(self.selection_changed)
self.toolbutton = toolbutton
self.toolmenu = toolmenu
self.main_layout = layout
def populate(self, items):
self.toolmenu.clear()
self.addItems(items)
def addItems(self, items):
for item in items:
action = self.toolmenu.addAction(item)
action.setCheckable(True)
action.setChecked(True)
self.toolmenu.addAction(action)
def items(self):
for action in self.toolmenu.actions():
yield action