-
Notifications
You must be signed in to change notification settings - Fork 66
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
Support import/export of custom attributes Maya. #2
Comments
Go Ben! :) -T On Thu, Dec 11, 2014 at 3:26 PM, Ben Houston notifications@github.com
|
This is indeed a needed feature. At work we are starting to switch from our robust but aging format to Exocortex Alembic and this feature will be needed down the road. |
I'm looking at implementing this but there's going to be a lot of shared functionality between Crate and AbcExport because it's almost the same process for both. We can almost just use the If we don't use So my question is how best can we go about sharing this code? |
I would totally bring in AttributesWriter in this project and modify it as need be if that is possible -- it doesn't change much, if at all, so I think that modifying it to fit into the context of this project is a good idea. |
I'm still working on this and it's coming along well. One point that's come up though is that |
I am find leaving functionality out of Maya 2013.5 and later -- remember that was released in 2012, four years ago. |
So attribute importing is turning out to be slightly more fiddly than exporting. The problem is that when the alembic file path or the identifier on an ExocortexCrate node is updated, the list of attributes may change, and therefore the attributes on the node must change and the connections also. Because we can't edit a node's attributes and connections from within the node, we can't just use the Our current plan is to add a static "ExocortexAlembic Attribute List" attribute for each variable type to Exocortex nodes (We could also just have a single list that specifies the type and name of each attribute). The attributes depend on the "file name" and "identity" attributes so that it gets reevaulated in compute when they change. In the Python code The next reevaluation of the custom attributes will then cause the node to update the values. |
Actually I've just looked at the list of possible attribute types that we could import and I'll with a single "ExocortexAlembic Attribute List" attribute, rather than one for each type. |
This is an excellent news ! I don't the knowledge to help with the C++ plugin update (nor the time to learn it :/) but I'm very familiar with python scripting and maya node graph recreation/update. So if you need a hand I could help on this side. One down side of the "delete all attrs and recreate them" way is that you lose all connections made on it. For example (a lame one I admit) if you had a light controlled by some attribute the animator animated, you would have to reconnect it after each update. Unless you add another layer in the reload script that backs up the connections and recreates them, but it seems simpler to only recreate the missing attributes and delete the outdated ones. |
The script will reconnect the attributes. That's what it is doing at the moment anyway for the static attributes so doing it for the dynamic attributes will be trivial. |
Being only TD/dev in my company, I rarely have the occasion to reflect with someone on technical decisions, thanks for the details. |
Guarded unchecked pointers during particle export
Requested by a number of users on the Exocortex-Alembic mailing list.
The text was updated successfully, but these errors were encountered: