-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Publish UDIM tiles with publisher #963
base: develop
Are you sure you want to change the base?
Conversation
publish UDIM tiles in Publisher
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gives me error on Integrate asset
phase (probably due to my file names used)
Traceback (most recent call last):
File "C:\Users\lbate\AppData\Local\Ynput\AYON\dependency_packages\ayon_2406251801_windows.zip\dependencies\pyblish\plugin.py", line 528, in __explicit_process
runner(*args)
File "C:\Users\lbate\AppData\Local\Ynput\AYON\addons\core_1.0.3+dev\ayon_core\plugins\publish\integrate.py", line 163, in process
raise KnownPublishError(exc).with_traceback(sys.exc_info()[2])
File "C:\Users\lbate\AppData\Local\Ynput\AYON\addons\core_1.0.3+dev\ayon_core\plugins\publish\integrate.py", line 158, in process
self.register(instance, file_transactions, filtered_repres)
File "C:\Users\lbate\AppData\Local\Ynput\AYON\addons\core_1.0.3+dev\ayon_core\plugins\publish\integrate.py", line 256, in register
file_transactions.add(src, dst)
File "C:\Users\lbate\AppData\Local\Ynput\AYON\addons\core_1.0.3+dev\ayon_core\lib\file_transaction.py", line 97, in add
raise DuplicateDestinationError(
ayon_core.pipeline.publish.publish_plugins.KnownPublishError: Transfer to destination is already in queue: C:\Projects\Quantum_Demo\assets\props\power_generator\publish\image\textureMain.BaseColor\v001\QD_power_generator_textureMain.BaseColor_v001_1001.png -> C:\projects\Ayon_Tests\maya\props\powerGen\publish\image\imageTexture\v001\ATS_powerGen_imageTexture_v001.png. It's not allowed to be replaced by a new transfer from C:\Projects\Quantum_Demo\assets\props\power_generator\publish\image\textureMain.BaseColor\v001\QD_power_generator_textureMain.BaseColor_v001_1002.png
After done some more tests, the failure is obviously caused by separator when using dot instead of underscores it works fine...
resulting into successfully published images |
from ayon_core.lib import BoolDef | ||
from ayon_core.pipeline import publish | ||
|
||
UDIM_REGEX = re.compile(r"(.*)\.(?P<udim>\d{4})\.(.*)") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Allow either .
or _
separator to the udim numbers.
UDIM_REGEX = re.compile(r"(.*)\.(?P<udim>\d{4})\.(.*)") | |
UDIM_REGEX = re.compile(r"(.*)[._](?P<udim>\d{4})\.(.*)") |
if isinstance(representation["files"], (list, tuple)): | ||
continue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is wrong, no?
Wouldn't this technically actually skip sequences of UDIMs?
Also, should we pop frame
from the representation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think Libor's screenshot show the problem - it's generating a representation PER image in the sequence? Even though it should be one representation - right?
BoolDef("isUDIM", | ||
label="Is UDIM", | ||
default=False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a tooltip/description to explain what this does and when to use it.
Changelog Description
Quick fix to publish UDIM textures as
Image
in Publisher.Additional info
With this, you can publish only single type tiles at the same time- like
BaseColor
orNormal
(but not both together)Testing notes:
Try to publish
BaseColor.1001.png
andBaseColor.1002.png
asImage
in Publisher.