added settings for layer name regex

This commit is contained in:
iLLiCiTiT 2021-11-10 16:41:38 +01:00
parent 42e46ded6c
commit c19d311c75
3 changed files with 24 additions and 4 deletions

View file

@ -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"]

View file

@ -115,6 +115,9 @@
"default_task_type": "Default task type"
}
}
},
"CollectTVPaintInstances": {
"layer_name_regex": "(?P<layer>L[0-9]{3}_\\w+)_(?P<variant>.+)"
}
}
}

View file

@ -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&lt;layer&gt;L[0-9]{3}_\\w+)_(?P&lt;variant&gt;.+)\"</b><br>Extracted layer: <b>\"L001_Person\"</b><br>Extracted variant: <b>\"Hand\"</b>"
},
{
"type": "text",
"key": "layer_name_regex",
"label": "Layer name regex"
}
]
}
]
}
]
}
}