Node description database versions
-
Hi, I have several questions regarding material nodes, and mostly about their description database json files.
- Is there an extensive documentation about the format and expected properties?
- What is the proper way to make a new version of a database with new or changed entries? And by this I refer to the proper way to force the node cache regeneration of the data description of the node space?
- How can data between version changes be migrated in plugin implementations? For example, there is
NodeData::Read(..)
for classic plugins, but what is the proper way of implementing data migration of updated ports for nodes? I'm mostly concerned with material nodes for now, but I suppose this would apply in general.
Any help on those questions would be greatly appreciated.
Cheers,
Deyan -
Hi,
1: There is no extensive documentation about the format. Those databases are supposed to be constructed with tools like the resource editor or with code. Sometimes it is faster to edit those files with an external editor, but it should be avoided as much as possible.
2: There is no built-in system for that. What you can do is check in the DC folder in the preferences of cinema4d. Inside you will find a directory for your nodes and you can find the node's directory you want to update and delete the folder before loading your database. That should work. But we need to add some clean function for that.
3: You can have a look at this manuel about ImportAdapterInterface. This interface can help. Keep in mind that this Interface must be used with care, otherwise, you can break the system. For this kind of question, don't hesitate to ask them on backstage so we could improve the API to feed your needs. Having user cases is important for us.
Cheers,
Manuel -
Hi @m_magalhaes , thanks very much for the provided information.
- We are not modifying the database manually from an editor, but rather generate it on our own. That's why I was searching for an explicit documentation, because the process of adding nodes from the Resource Editor in C4D just to check an attribute may be tedious.
- Thanks we will consider doing that for version changes.
- Thanks again - I will take a look into this interface and ask again if I have questions for its proper usage.
Cheers,
Deyan