View Full Version : Saving mesh with blind data not working
05-07-2009, 06:50 AM
seems the issues with blind data are increasing lately ;) So here's mine:
I use setIntBlindData to store some the cell ids of my Voronoi plug-in in the created mesh. Works fine so far. BlindData editor in Maya shows the ids on face selection and everything is great. Until I save the scene and reload it. Although the blind data attribute is being stored, I checked the .ma file, the data itself is not. But shouldn't it be?
Any ideas what am I doing wrong here?
Thanks in advance.
05-07-2009, 07:34 AM
do you have your blind data in some extra node which is connected to the shape node or does that also happen when you delte history? From your description I would say that either some attribute is not configured properly and/or the compute method does not use the blindData data when updating the node. Also, is there an array attribute involved? Just guessing...
05-07-2009, 07:49 AM
Funny, I deleted the history on the mesh, saved and re-opened it. Guess what, the blind data was there. But when saving it with the history the blind data is not there until I make the DG dirty and a re-evaluation of the node takes places. After that everything is fine. I can only guess that this is one of Maya's optimization things and have to work around it.
05-07-2009, 08:00 AM
do you store the blindData in an array? if so Maya "optimizes" ( deletes all indices with default values ) your array when there are no connections in or out. If you use an array remember to utilize the ArrayDatabuilder to restore your array to full length upn scene reloading.
05-07-2009, 08:52 AM
What do you mean by: do you store the blindData in an array? The data is actually stored in the mesh itself. I don't have any additional nodes that carry the blind data. I'm not using any defaults but actual values so there should not be any optimizing problem.
05-07-2009, 09:01 AM
If I understand you correctly, there is a node that is applying blindData and outputting the mesh to a shape node, right? So somewhere the blindData has to be stored when you are not deleting history. This is why I thought that it is some kind of array. Or is your node generating the mesh ( no input mesh)? Maybe a screenshot of your DG connections and which node is doing what would help to undesrstand things a little bit better.
05-08-2009, 11:33 AM
It's actually pretty easy. There's the Voronoi node creating the output mesh data which is being piped into a mesh node. My understanding of blind data was that it's being stored in the mesh data structure. Isn't that right? As I pointed out earlier, after deleting the history I can save and reload the scene and the blind data stays in the mesh with no extra nodes attached to it.
05-08-2009, 12:01 PM
Okay, so your node is creating and not manipulating existing meshes, that should make spotting the error a little bit easier. Do you use MFnMesh::updateSurface() at the end of your compute function? This should make sure the data is uptodate. If you do that then there must be something with your blindData not going optimal. But that is just an educated guess. Good luck! ; )
05-08-2009, 03:35 PM
How does your node go about creating the blind data type? Is it an already existing blind data type created outside of your node, whose type ID you use?
Or are you creating it on the fly using a static ID built into the node?
There is a bug in Maya where the type ID table does not get rebuilt on file load. Which makes it difficult for you to retrieve an existing type ID from. This specifically impacts the following calls:
They will return -1 for type IDs. There is a workaround for this, that is to invoke the following:
// BUG: Query a dummy typed blind data to trigger an update of Maya’s internal
// blind data table.
MFnMesh meshFn( meshObj );
int dummy = 0;
meshFn.getIntBlindData( 0, MFn::kMeshVertComponent, 0, "", dummy );
05-08-2009, 03:35 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.