Export anim curve in maya publish

Hi is it possible to publish anim curves from maya during the publish so that the other department can build the scene file, like for example,
match move does some animation and i want it to build the animation scene file using the anim curve rather than opening the matchmove file, is there a way to do this by default.

hey,

not out of the box, even though you should be able to use Rig product for that is some limited way. But not just for the animation curves.

Interesting request. A long long time ago there used to be something along those lines, upon publish an animation it would also export the animation as curves using atomExport.

An example of that ancient code is e.g. here. It also had the notion of exporting an editMA as can be found here.

The loader equivalents for them existed here.

However, as far as I know they never really came to fruition and were abandoned since. This code for example - predecessor of AYON - is from over seven years ago. :slight_smile:

Converting this logic shouldn’t be too much effort into AYON however if you do, I’d love to see a functional use case.

hi @BigRoy
So i was able to rewrite the code to test this i am able to export the anim data from maya and publish it into ayon, how do i write out the rig data, as in from which asset the anim curve belongs to i tried adding that data to instance data something like this to see if its possible

instance.data["assets"] = [name_space + ':' + reference_node.path.__str__()]

but it doesnt seem to write out that data, any suggestions as how to add custom data to the instance ?

So i was able to figure this as i had to write it to the versionData, and that seems to have the data,

now how do i create a reference in maya with just the file path and namespace? can some one guide me as how to do it?
@mustafa_jafar any suggestions for this ?

Is that for implementing a loader for anim curves?
Does this load_reference.py help?

yes its for loading the anim curv if the asset is missing, how do i build the context for the asset ?

You can see other loaders for inpisration.
As far as I know, after writing the command the performs loading, you’d need to containrise the loaded object.

to create a new loader, mostly, you only need to copy/paste one and modify it based on your liking.
Then AYON will pick it up automatically.

i am trying to call this function

but we need a context right, thats the asset context, so wanted to know how do i build that context.

Load functions are called from somewhere else where it passes context, name, namespace and options. I blieve you won’t need to worry about it.

i have raised a pull request, pls have a look

1 Like

So i was able to get all this to work like load the reference and apply the animation also, i am curious as how to go about the updating when there is a newer version, as we reference the rig and not the actual publish version, is there any way to update if a newer version of the previous dept is published.