ynput / ayon-core

Apache License 2.0
27 stars 32 forks source link

Maya: UDIM texture from Yeti Rig Collector can be searched correctly with absolute path #727

Closed moonyuet closed 3 months ago

moonyuet commented 3 months ago

Changelog Description

Fixed https://github.com/ynput/ayon-core/issues/713

Additional info

n/a

Testing notes:

  1. Launch Maya
  2. Create Yeti Rig with the absolute texture path
  3. Turn Texture mode into UDIM
  4. Publish
  5. Should be publishing the map as expected.
ynbot commented 3 months ago

Task linked: AY-5937 Maya: Issue with UDIM Textures in Yeti Rig Publish

LiborBatek commented 3 months ago

hmm. wait I guess I didnt use maya addon package.... will try one more time with new package

LiborBatek commented 3 months ago

After cleanup of my Ayon and updating of my maya addon Im getting this error during Validate:

image

moonyuet commented 3 months ago

Im still trapped with YetiRig as now Im getting Invalid Input Shape error....even tho I have followed the user docs procedure (duplicating and connecting transforms + outmesh/inmesh)

image

I did try several times to resolve it but I couldnt make it work for some reason so Im enclosing this error msg:

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\maya_0.2.8\ayon_maya\plugins\publish\validate_yeti_rig_input_in_instance.py", line 26, in process
    raise PublishValidationError("Yeti Rig has invalid input meshes")
ayon_core.pipeline.publish.publish_plugins.PublishValidationError: Yeti Rig has invalid input meshes

The only thing I can think of could be that Im using 2 UVsets (one with and one without UDIMs) are more than one forbidden or what?? P.S. my Yeti setup does look correct in the viewport tho

image

It is definitely some bug but I dont think it is related to this PR(as this PR is more about UDIM texture path).

BigRoy commented 3 months ago

Im still trapped with YetiRig as now Im getting Invalid Input Shape error....even tho I have followed the user docs procedure (duplicating and connecting transforms + outmesh/inmesh)

@LiborBatek any chance you could share the publish .json report and potentially the scene file?

Ah, looking at your screenshot - I believe the Yeti Instance itself should contain the Yeti_Test_Setup group in the instabnce, not only the yeti node?

LiborBatek commented 3 months ago

@BigRoy thx that helped (putting the top group inside publish set only)!

However getting this one (also enclosing full JSON log below) :

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:\Work\REPO\ayon-core\client\ayon_core\plugins\publish\integrate.py", line 171, in process
    six.reraise(*sys.exc_info())
  File "C:\Program Files\Ynput\AYON 1.0.3\dependencies\six.py", line 719, in reraise
    raise value
  File "C:\Work\REPO\ayon-core\client\ayon_core\plugins\publish\integrate.py", line 158, in process
    self.register(instance, file_transactions, filtered_repres)
  File "C:\Work\REPO\ayon-core\client\ayon_core\plugins\publish\integrate.py", line 291, in register
    file_transactions.process()
  File "C:\Work\REPO\ayon-core\client\ayon_core\lib\file_transaction.py", line 141, in process
    copyfile(src, dst)
  File "C:\Users\lbate\AppData\Local\Ynput\AYON\dependency_packages\ayon_2406251801_windows.zip\dependencies\speedcopy\__init__.py", line 332, in copyfile
    ret = COPYFILE('\\\\?\\' + source_file,
  File "_ctypes/callproc.c", line 997, in GetResult
FileNotFoundError: [WinError -2147024894] The system cannot find the file specified

publish-report-240702-15-42.json.txt

BigRoy commented 3 months ago

However getting this one (also enclosing full JSON log below) :

It seems to fail on this transfer:

DEBUG: Copying file ... C:\Program Files\Ynput\AYON 1.0.3\sloth_density.1001.png -> C:\projects\AY_CG_demo\assets\characters\sloth\publish\yetiRig\yetiRigMain\v002\resources\sloth_density.1001.png

I'm quite sure you don't have that file actually there ;)

I think you may have set a relative path and some logic we're using isn't resolving relative to the correct absolute path (because likely it's converting using os.path.abspath which makes it relative to the current working directory of Python (which is set to the AYON folder because it happens to launch Maya from that context)...

In short, we have a bug! @LiborBatek could you confirm how you've set that file's path inside Maya?

Actually, nevermind - this bug may have already been present. Will propose a fix. EDIT: Proposed a fix here

BigRoy commented 3 months ago

@LiborBatek could you try again? :)

BigRoy commented 3 months ago

This update will also need to be pushed to ayon-maya @iLLiCiTiT