with three command-line parameters as described here. Is this still correct?
No, the manual is too strongly worded and also outdated. Mandatory is only one of these flags and one of them does not even exist anymore:
g_applicationRepositoryWritable=true: Mandatory when you want to add or edit node descriptions.
g_descriptionEditorDeveloperMode: Not really required as you can also set the value in the resource editor itself, just as shown in the first step in the manual you linked. I am not quite sure why the author included the flag, probably because he liked the convenience of not having to enable the mode every time Cinema 4D does start.
g_developerNodeEditorFunctions: Does not exist anymore and features are naturally part of Cinema 4D now.
Please correct me if I'm wrong, but as I understand it, the UI for a node is held in a .json file (which Maxon also calls a 'database' from what I can see). Once you have a database you can edit it to define the interface in a new node and the .json file is written out by the resource editor. Am I right so far?
Yes, that is more or less correct. The terminology is a bit all over the place there, but the more common terms are resource and description, just as it was the case in the classic API. With the resource editor your edit your resources, but they are now json and not res files anymore, and in the API these parameter and UI definitions are then expressed as descriptions. Other than in the classic API, the concept of descriptions is however expressed and handled with more than a singular type, the most basic and most compareable type to the classic API type
Description is however maxon::DataDescription. But just as in the classic API, you usually do not have to deal with descriptions in detail until you venture into more complex territories.
The reason why the term database pops up here is because node templates, i.e., the metadata bundles which tell Cinema 4D that a node type exists and what its properties are, are stored as assets with the Asset API which operates with the concepts of databases. This is also where the term "application repository" in
g_applicationRepositoryWritable comes from, as this is one of the fundamental three asset repositories associated with Cinema 4D:
- Built-in Repository: Contains atomic definitions like data types and very low-level nodes stuff. It is read-only and cannot be changed.
- Application Repository: Contains node templates that have be defined in code, also contains the built-in repository. Is read-only but can be made writable with
- User Preferences Repository: Contains (pretty much) all assets that are accessible for a Cinema 4D instance. Also contains the application and with-it built-in repository. Is writable by default for entities that are not part of the non-writeable repos.
As a side note, as this often leads to confusion: We have mixed up a bit the terminology of databases and repositories. When the Asset API talks about repositories as for example with
AssetInterface::GetUserPrefsRepository() which returns an
UpdatableAssetRepositoryRef, it means the logical interface to data, i.e., what is commonly referred to as a database; with this stuff you can abstractly search for data. When it talks about databases, as for example in
AssetDataBasesInterface, it means the physical storage of data, i.e., what is usually referred to as a repository. So, when the resource editor talks about "databases" it just means files on disk just as in the classic API. But there are then later interfaces which view this physical data as a database.
Further, the handbook seems to say that you cannot create the node interface in this way until you have a node compiled first, at least a node which registers the (at that point, non-existent) database file. Is this all correct? If so then I've at least begun to understand the process and can start to try to implement something.
Yes, that is correct. In an upcoming release we will provide an internal interface which enables developers to start coding (the logic of nodes) without having to touch the resource editor. This is then done by deriving the node description from the already necessary
MAXON_PORT_OUTPUT, etc. definitions. For a finalized UI, you will have still to touch the resource editor, but it will allow you to get started with your logic when you do not care about UI details or how your ports are labeled.