mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-26 05:42:15 +01:00
added settings for layer name regex
This commit is contained in:
parent
42e46ded6c
commit
c19d311c75
3 changed files with 24 additions and 4 deletions
|
|
@ -3,7 +3,7 @@ Requires:
|
|||
CollectTVPaintWorkfileData
|
||||
|
||||
Provides:
|
||||
Instance
|
||||
Instances
|
||||
"""
|
||||
import os
|
||||
import re
|
||||
|
|
@ -13,8 +13,8 @@ import pyblish.api
|
|||
from openpype.lib import get_subset_name_with_asset_doc
|
||||
|
||||
|
||||
class CollectTVPaintWorkfileData(pyblish.api.InstancePlugin):
|
||||
label = "Collect TVPaint Workfile data"
|
||||
class CollectTVPaintInstances(pyblish.api.InstancePlugin):
|
||||
label = "Collect TVPaint Instances"
|
||||
order = pyblish.api.CollectorOrder + 0.1
|
||||
hosts = ["webpublisher"]
|
||||
targets = ["tvpaint"]
|
||||
|
|
|
|||
|
|
@ -115,6 +115,9 @@
|
|||
"default_task_type": "Default task type"
|
||||
}
|
||||
}
|
||||
},
|
||||
"CollectTVPaintInstances": {
|
||||
"layer_name_regex": "(?P<layer>L[0-9]{3}_\\w+)_(?P<variant>.+)"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -62,8 +62,25 @@
|
|||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "dict",
|
||||
"collapsible": true,
|
||||
"key": "CollectTVPaintInstances",
|
||||
"label": "Collect TVPaint Instances",
|
||||
"children": [
|
||||
{
|
||||
"type": "label",
|
||||
"label": "Regex helps to extract render layer and pass names from TVPaint layer name.<br>The regex must contain named groups <b>'layer'</b> and <b>'variant'</b> which are used for creation of RenderPass instances.<hr><br>Example layer name: <b>\"L001_Person_Hand\"</b><br>Example regex: <b>\"(?P<layer>L[0-9]{3}_\\w+)_(?P<variant>.+)\"</b><br>Extracted layer: <b>\"L001_Person\"</b><br>Extracted variant: <b>\"Hand\"</b>"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"key": "layer_name_regex",
|
||||
"label": "Layer name regex"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue