Hi there,
This is a question to the community of C4D developers as much as to the Maxon guys. I would love to get some feedback and/or discussion on some questions and topics that relate to C4D project management more than the actual SDK itself.
I'm coming from a background of C# development - so I spend my day job in Visual Studio 2022 as it is, and have not regularly used C++ daily for many years, but I am relearning for a C4D plugin project I am doing. This context affects some of my perspectives.
-
How are you typically doing source control for your project? In my case, git is used for more or less everything I do, and I will use that to keep track of this project as well. Do you usually put the whole sdk folder in there, or just the folder for your project in sdk/plugins? If you work on multiple different projects at one time, does this change how you approach source control? For instance, do you have multiple sdk folders with one project each, or do you put multiple projects in the same plugin folder and keep them in separate git repositories? Or do you simply have one large ΓΌber-git-repo?
-
Slightly related to the above - if you support multiple different Cinema 4D versions, how do you do that? Multiple sdk folders (per version), same plugin code base with compiler directives to handle C4D version differences as necessary? I would think supporting different versions would be an argument for keeping only the plugin code in git, but I would love to get perspectives from people with more experience than me in this matter.
-
I would like to do some unit testing using Google Test in my project. I know about the C4D unit testing support and will probably use that too for stuff that needs to touch C4D. However, for my own code that is just plain C++ code, I would like to get immediate feedback in VS / ReSharper each time I compile. I can probably run all my unit tests a hundered times in the time it takes to start C4D once. However, keeping this in a separate project like I am used to from dotnet was a bad idea - when I needed to re-run the Project Tool, it killed and removed my test project. Another option is to include the test code in my actual plugin project and make sure the test code is stripped out when I do a release build. Anyone else done something similar and want to share their experience?
-
Another thing the Project Tool does when it runs is to basically overwrite the entire structure of my project. From dotnet I am used to creating folders in my solution (mapped to actual folders on disk) to keep related code together, and not to end up with one big mess of a thousand source files. When I did C++ last, Visual Studio wasn't invented yet, so I don't know how to do the same thing there - the concept of (disk) folders seems not to exist. To keep a minimum of organization I used the feature known as "Filters" to create virtual folders in my project. That works fine, but the Project Tool just kills this structure and I am back to one big folder of source files. I don't NEED to split my code into file-per-class or anything like that, but it helps me wrap my brain around things. How do people go about keeping their projects somewhat organized?
Any input on any of these points is welcome - I am learning here, and if anyone is willing to share their experiences, I am sure that can be useful to other users too.
Thanks in advance for any opinions, facts or other comments on these topics!