# Dynamic declarations for some compositor nodes. ## Goals: Stop using operators to change sockets directly. Delegate this to the node declaration system. This provides most of the other benefits: 1. Management of topology updates, drawing. 2. Handling old data and socket references from declaration code. 3. Using a newer API. ## Way to do that: 1. For `CMP_NODE_OUTPUT_FILE` node: 1.1. Added in node.storage stucture linked list to contain metadata of each output socket. 1.2. Added `declare_dynamic` function for generate sockets based on metadata. See `blender::nodes::node_group_declare_dynamic` as example implementation. 1.3. Change node property operators to change only metadata. 2. All `bNodeSocketTemplate` replace by static declarations. See [ed9b21098dd27bf9364397357f89b4c2648f40c2](https://projects.blender.org/blender/blender/commit/ed9b21098dd27bf9364397357f89b4c2648f40c2) as example. It is best to do this separately for each node in an individual PR. Nodes to change: 1. `CMP_NODE_OUTPUT_FILE`. 2. `CMP_NODE_R_LAYERS. 3. `CMP_NODE_CRYPTOMATTE_LEGACY` ? 4. `CMP_NODE_SWITCH_VIEW`.