Dependency management in C++ is a bit of a hassle. I have come to like CMake for build and dependency management, despite it’s warts and general negative sentiment in the community. One major feature of CMake is to resolve dependencies. Using CMake packages this can be even comfortable. So here is how to use CMake packages.
Recently, I set up Home Assistant for all my home automation endeavors. To connect it to my Zigbee devices, I use Zigbee2MQTT. This works great so far except for one LED controller that is detected as a different model and does not support full control.
There are certain tasks that I do every couple of months or even only every couple of years. One of those is setting up a new computer for development work. Then I struggle with some basic setup again as I have forgotten how I did it last time. One of those tasks is setting up OpenSSH.
One thing you will do over and over again in scripting Cinema 4D is to go through your scene. Usually you go hunting for certain objects, tags or materials. This is pretty straight forward using the BaseList2D class methods by using GetNext() and GetDown() but can get old pretty fast as you are doing the same checking and safeguards over and over again. Python - like many modern programming languages - has a neat iterator pattern that is ingrained into the language.
Now that we have had a short glimpse on the basics in the first article lets move on to do something meaningful. So far it has been a purely academic discourse. Usually, we want a script to do something with the objects we have in a scene. So the first step is to look at how we can access the scene file and go through selected objects and perform Cinema 4D commands on them.