Skip to content
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

Alembic Loader as Arnold Standin #4047

Conversation

moonyuet
Copy link
Member

Brief description

Adding Alembic Loader as Arnold Standin function as the Openpype Plugin

Description

The user can load the published workfileswith abc format as Arnold Standin if the pusblished workfiles belong to model and pointcache family.
image
image

Additional info

Doesn't have any for the current stage

Testing notes:

  1. Start maya in Openpype
  2. Click "Load" from Openpype in maya
  3. Right-click the workfiles which belongs to either model or pointcache family
  4. Click Import Alembic as Standin
  5. It will load the abc file as an arnold standin

@moonyuet moonyuet self-assigned this Oct 31, 2022
@ynbot
Copy link
Contributor

ynbot commented Oct 31, 2022

Task linked: OP-4267 Alembic loader as Arnold Standin

@github-actions github-actions bot added this to the next-patch milestone Oct 31, 2022
families = ["model", "pointcache"]
representations = ["abc"]

label = "Import Alembic as Standin"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like this label should at least mention Arnold.

def load(self, context, name, namespace, options):

import maya.cmds as cmds
import pymel.core as pm
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With issue #2353 open I'd recommend avoiding Pymel where possible and rewriting this using maya cmds

Copy link
Member Author

@moonyuet moonyuet Nov 1, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. I also noticed another ArnoldStandin Loader would have an error message of Error: Problem with the API object returned by __apiobject__ method when loading ass file under some circumstance(but the ass file is still successfully loaded). I guess it's related to the pymel command too.

@mkolar mkolar marked this pull request as ready for review November 7, 2022 14:55
Copy link
Member

@LiborBatek LiborBatek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ve tested it maya2023 with arnold 5.1.3.3

Model imports as ASS file normally. Small note tho: use sequence is "ON" should be considered that model being static in general so should be "OFF" by nature

Speaking of Point cache at first everything seems fine and working however I ve got weird anim problems...double checked it and manually created ass.file from the same workfile and my version had no issues.
Seems like some ASS creation params being wrong set. Need revision and testing.
Same frame different animation:
image

One more thing to consider why not allow user to "Import Alembic as ASS file" even when speaking about Animation caches not just Pointcaches in general (pyblished animation alembics) could be pretty handy and also there shouldnt be any reason to not allow it too...
so user could import these families as ASS:

model (already present)
pointcache (already present)
animation (not present now)

@moonyuet
Copy link
Member Author

moonyuet commented Nov 8, 2022

I ve tested it maya2023 with arnold 5.1.3.3

Model imports as ASS file normally. Small note tho: use sequence is "ON" should be considered that model being static in general so should be "OFF" by nature

Speaking of Point cache at first everything seems fine and working however I ve got weird anim problems...double checked it and manually created ass.file from the same workfile and my version had no issues. Seems like some ASS creation params being wrong set. Need revision and testing. Same frame different animation: image

One more thing to consider why not allow user to "Import Alembic as ASS file" even when speaking about Animation caches not just Pointcaches in general (pyblished animation alembics) could be pretty handy and also there shouldnt be any reason to not allow it too... so user could import these families as ASS:

model (already present) pointcache (already present) animation (not present now)

I noticed the incompatible animation problem. It seems several frames have been postponed for some reason.
I think the problem is caused by the fps setting in the main scene. The updated PR implements the fps according to the way the project sets up
image
The updated PR also tells the systems not to load frame if the abc file doesn't contain any animation. And also I added the animation into families.

EDIT: just find out some mistakes from the code. I will add set the abcfps which links to the way how the project sets up in the morning at my time

@LiborBatek
Copy link
Member

Cool, thx. Pls tell me when you made the last change (the one left for your morning time) so I will tested on this "final" version...not before.

Cheers!

@LiborBatek
Copy link
Member

Now it works normally, did tests in maya2022 and maya2023.

I think the problem with animation mismatch was caused by difference in framerates (25fps vs 29.97) even present in pyblished abc using OP tools. So it was not on your side!

Question is if special care should be taken. I mean taking note of fps from origin of the abc file (source animation maya scene). As I understand you read this from database and set it according to it right?

Also static models still have is sequence turned on in ASS properties. Should be addressed already right?

Thanks!

@moonyuet
Copy link
Member Author

moonyuet commented Nov 9, 2022

Now it works normally, did tests in maya2022 and maya2023.

I think the problem with animation mismatch was caused by difference in framerates (25fps vs 29.97) even present in pyblished abc using OP tools. So it was not on your side!

Question is if special care should be taken. I mean taking note of fps from origin of the abc file (source animation maya scene). As I understand you read this from database and set it according to it right?

Also static models still have is sequence turned on in ASS properties. Should be addressed already right?

Thanks!

image
I think most of the issues I have discussed with you in discord. The abc file published from the model main wont have the sequence on as it doesn't contain any animation. So yes. the static models should be addressed already.

@LiborBatek
Copy link
Member

Made another go with testing...the static model like my table prop still gets the sequence option on. Also would be great if the loaded/imported ass files keep color coding in outliner (see img with outliner colors applied when assets loaded normally via asset load command using OP loader)
it means family animation being green colored in outliner and model dark orange color. Each family has its own.
image

@moonyuet
Copy link
Member Author

Made another go with testing...the static model like my table prop still gets the sequence option on. Also would be great if the loaded/imported ass files keep color coding in outliner (see img with outliner colors applied when assets loaded normally via asset load command using OP loader) it means family animation being green colored in outliner and model dark orange color. Each family has its own. image
Hi I have made the outlinecolor for the group_name and I have set up the condition for not loading the sequence in model main.
image

@jakubjezek001 jakubjezek001 removed this from the next-patch milestone Nov 10, 2022
@LiborBatek
Copy link
Member

LiborBatek commented Nov 14, 2022

Have made another testing and all the features are already working fine!

There is one thing which prevents the approval...
I have tried to fiddle with switching versions of loaded asset...first I must say that its great that user have this option!!! Its super useful and I didnt expect this would be possible (switching ass files versions!)

There is really minor issue that is Use File Sequence being unchecked afterwards even it was turned on before switching version of the asset.

ass_loading_issue

Otherwise all works perfectly!

@moonyuet
Copy link
Member Author

Have made another testing and all the features are already working fine!

There is one thing which prevents the approval... I have tried to fiddle with switching versions of loaded asset...first I must say that its great that user have this option!!! Its super useful and I didnt expect this would be possible (switching ass files versions!)

There is really minor issue that is Use File Sequence being unchecked afterwards even it was turned on before switching version of the asset.

ass_loading_issue

Otherwise all works perfectly!

Hi Libor. I think you can try with the latest code. it will update use file sequence according to which family subset it belongs to.
image

Copy link
Member

@LiborBatek LiborBatek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All seems working fine! Thx

@antirotor antirotor merged commit 71edd44 into ynput:develop Nov 15, 2022
@github-actions github-actions bot added this to the next-patch milestone Nov 15, 2022
@moonyuet moonyuet deleted the enhancement/OP-4267_Alembic_Loader_As_Arnold_Standin branch December 13, 2022 02:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants