"Fit to..." strips node of custom data?
Hi.
I need help with an issue caused by the "Fit to..." feature that fits a piece of clothing made for one figure to another. In my example I have a garnent for V4 that I'm fitting to G2F. For what I can see Studio creates a new figure with the same internal name and label of the original piece. It then performs the adaptation and then deletes the old garnment, in this case the one for V4.
The problem ariseds from the fact that Studio seems to delete the custom data that was associated with the original garnment. When a node is added to the scene, if that is handled by my plugin, the node receives some custom data at the moment of the addition. I attache the data using something like this:
dataItem = new DzSimpleElementData("MySpecialKey", true); node->addDataItem(dataItem); auto settings = dataItem->getSettings(); settings->setStringValue("propKey", "propValue");
When the node gets deleted because of the fitting, my plugin receives the notification but the custom data is not there anymore.
So, there are two questions: 1) is this analisys orrect and 2) is there a way of stopping Studio from stripping the custom data? Alternatively, is there a way of attaching custom data that is not stripped by the "Fit to..." process?
Thanks in advance.
Comments
The analisys sounds right, except that it is not specifically "Fit to.." that is doing this. It is the Autofit mechanism(the v4 clothing is altered to be G2F clothing).
You may be able to get at your custom data by hooking up to the aboutToRemoveNode signal.
Here's a tutorial on how to keep custom bones when converting V4/M4 content to the genesis figures manually, it might give you ideas:
http://sickleyield.deviantart.com/journal/Tutorial-Saving-Gen-4-Custom-Bones-on-Conversion-417250347
I did not get any notification of the replies, thank you for the answers.
Ammon, wouldn't be correct for Studio to avoid stripping the data. That sounds like a bug to me.