Blender V5.0
versioning_430.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#define DNA_DEPRECATED_ALLOW
10
11#include "DNA_brush_types.h"
12#include "DNA_camera_types.h"
14#include "DNA_curves_types.h"
15#include "DNA_defaults.h"
16#include "DNA_modifier_types.h"
18#include "DNA_workspace_types.h"
19
20#include "BLI_listbase.h"
21#include "BLI_math_vector.h"
22#include "BLI_string_utf8.h"
23
24#include "BKE_collection.hh"
25#include "BKE_context.hh"
26#include "BKE_customdata.hh"
27#include "BKE_file_handler.hh"
28#include "BKE_grease_pencil.hh"
29#include "BKE_image_format.hh"
30#include "BKE_main.hh"
31#include "BKE_node.hh"
33#include "BKE_node_runtime.hh"
34#include "BKE_paint.hh"
35#include "BKE_screen.hh"
36
37#include "SEQ_sequencer.hh"
38
39#include "BLT_translation.hh"
40
41#include "readfile.hh"
42
43#include "versioning_common.hh"
44
46{
47 if (!MAIN_VERSION_FILE_ATLEAST(bmain, 403, 6)) {
48 /* Shift animation data to accommodate the new Diffuse Roughness input. */
50 }
51}
52
54{
55 /* Replace paint brushes with a reference to the default brush asset for that mode. */
56 LISTBASE_FOREACH (Scene *, scene, &bmain.scenes) {
58 }
59
60 /* Replace persistent tool references with the new single builtin brush tool. */
61 LISTBASE_FOREACH (WorkSpace *, workspace, &bmain.workspaces) {
62 LISTBASE_FOREACH (bToolRef *, tref, &workspace->tools) {
63 if (tref->space_type == SPACE_IMAGE && tref->mode == SI_MODE_PAINT) {
64 STRNCPY_UTF8(tref->idname, "builtin.brush");
65 continue;
66 }
67 if (tref->space_type != SPACE_VIEW3D) {
68 continue;
69 }
70 if (!ELEM(tref->mode,
84 {
85 continue;
86 }
87 STRNCPY_UTF8(tref->idname, "builtin.brush");
88 }
89 }
90}
91
97{
98 LISTBASE_FOREACH (Curves *, curves, &bmain->hair_curves) {
99 const int curves_num = curves->geometry.curve_num;
100 if (int *resolutions = static_cast<int *>(CustomData_get_layer_named_for_write(
101 &curves->geometry.curve_data_legacy, CD_PROP_INT32, "resolution", curves_num)))
102 {
103 for (int &resolution : blender::MutableSpan{resolutions, curves_num}) {
104 resolution = std::max(resolution, 1);
105 }
106 }
107 if (int8_t *nurb_orders = static_cast<int8_t *>(CustomData_get_layer_named_for_write(
108 &curves->geometry.curve_data_legacy, CD_PROP_INT8, "nurbs_order", curves_num)))
109 {
110 for (int8_t &nurbs_order : blender::MutableSpan{nurb_orders, curves_num}) {
111 nurbs_order = std::max<int8_t>(nurbs_order, 1);
112 }
113 }
114 }
115}
116
118{
119 for (bNode *node : tree.all_nodes()) {
120 if (node->is_reroute()) {
121 if (node->storage != nullptr) {
122 continue;
123 }
124
125 bNodeSocket &input = *static_cast<bNodeSocket *>(node->inputs.first);
126 bNodeSocket &output = *static_cast<bNodeSocket *>(node->outputs.first);
127
128 /* Use uniform identifier for sockets. In old Blender versions (<=2021, up to af0b7925), the
129 * identifiers were sometimes all lower case. Fixing those wrong socket identifiers is
130 * important because otherwise they loose links now that the reroute node also uses node
131 * declarations. */
132 STRNCPY_UTF8(input.identifier, "Input");
133 STRNCPY_UTF8(output.identifier, "Output");
134
136 STRNCPY_UTF8(data->type_idname, input.idname);
137 node->storage = data;
138 }
139 }
140}
141
143{
144 LISTBASE_FOREACH (Object *, ob, &bmain.objects) {
145 if (ob->type != OB_MESH) {
146 continue;
147 }
148 LISTBASE_FOREACH (ModifierData *, md, &ob->modifiers) {
149 if (md->type == eModifierType_Bevel) {
150 BevelModifierData *bmd = reinterpret_cast<BevelModifierData *>(md);
151 if (bmd->vertex_weight_name[0] == '\0') {
152 STRNCPY(bmd->vertex_weight_name, "bevel_weight_vert");
153 }
154 if (bmd->edge_weight_name[0] == '\0') {
155 STRNCPY(bmd->edge_weight_name, "bevel_weight_edge");
156 }
157 }
158 }
159 }
160}
161
163{
165 LISTBASE_FOREACH (bNode *, node, &tree->nodes) {
166 if (node->type_legacy != GEO_NODE_SIMULATION_OUTPUT) {
167 continue;
168 }
169 bNodeSocket *skip_input = static_cast<bNodeSocket *>(node->inputs.first);
170 if (!skip_input || !STREQ(skip_input->identifier, "Skip")) {
171 continue;
172 }
173 auto *default_value = static_cast<bNodeSocketValueBoolean *>(skip_input->default_value);
174 if (!default_value->value) {
175 continue;
176 }
177 bool is_linked = false;
178 LISTBASE_FOREACH (bNodeLink *, link, &tree->links) {
179 if (link->tosock == skip_input) {
180 is_linked = true;
181 }
182 }
183 if (is_linked) {
184 continue;
185 }
186
187 bNode &input_node = version_node_add_empty(*tree, "FunctionNodeInputBool");
188 input_node.parent = node->parent;
189 input_node.locx_legacy = node->locx_legacy - 25;
190 input_node.locy_legacy = node->locy_legacy;
191
192 NodeInputBool *input_node_storage = MEM_callocN<NodeInputBool>(__func__);
193 input_node.storage = input_node_storage;
194 input_node_storage->boolean = true;
195
196 bNodeSocket &input_node_socket = version_node_add_socket(
197 *tree, input_node, SOCK_OUT, "NodeSocketBool", "Boolean");
198
199 version_node_add_link(*tree, input_node, input_node_socket, *node, *skip_input);
200
201 /* Change the old socket value so that the versioning code is not run again. */
202 default_value->value = false;
203 }
204 }
205}
206
207void blo_do_versions_430(FileData * /*fd*/, Library * /*lib*/, Main *bmain)
208{
209 if (!MAIN_VERSION_FILE_ATLEAST(bmain, 403, 2)) {
210 LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) {
211 LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) {
212 LISTBASE_FOREACH (SpaceLink *, space_link, &area->spacedata) {
213 if (space_link->spacetype == SPACE_NODE) {
214 SpaceNode *space_node = reinterpret_cast<SpaceNode *>(space_link);
215 space_node->flag &= ~SNODE_FLAG_UNUSED_5;
216 }
217 }
218 }
219 }
220 }
221
222 if (!MAIN_VERSION_FILE_ATLEAST(bmain, 403, 3)) {
223 LISTBASE_FOREACH (Brush *, brush, &bmain->brushes) {
224 if (BrushGpencilSettings *settings = brush->gpencil_settings) {
225 /* Copy the `draw_strength` value to the `alpha` value. */
226 brush->alpha = settings->draw_strength;
227
228 /* We approximate the simplify pixel threshold by taking the previous threshold (world
229 * space) and dividing by the legacy radius conversion factor. This should generally give
230 * reasonable "pixel" threshold values, at least for previous GPv2 defaults. */
231 settings->simplify_px = settings->simplify_f /
233 }
234 }
235 }
236
237 if (!MAIN_VERSION_FILE_ATLEAST(bmain, 403, 4)) {
238 LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) {
239 scene->view_settings.temperature = 6500.0f;
240 scene->view_settings.tint = 10.0f;
241 }
242 }
243
244 if (!MAIN_VERSION_FILE_ATLEAST(bmain, 403, 7)) {
245 LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) {
246 SequencerToolSettings *sequencer_tool_settings = blender::seq::tool_settings_ensure(scene);
247 sequencer_tool_settings->snap_mode |= SEQ_SNAP_TO_PREVIEW_BORDERS |
250 }
251 }
252
253 if (!MAIN_VERSION_FILE_ATLEAST(bmain, 403, 8)) {
255 }
256
257 if (!MAIN_VERSION_FILE_ATLEAST(bmain, 403, 9)) {
259 }
260
261 if (!MAIN_VERSION_FILE_ATLEAST(bmain, 403, 10)) {
262 /* Initialize Color Balance node white point settings. */
263 FOREACH_NODETREE_BEGIN (bmain, ntree, id) {
264 if (ntree->type != NTREE_CUSTOM) {
265 LISTBASE_FOREACH (bNode *, node, &ntree->nodes) {
266 if (node->type_legacy == CMP_NODE_COLORBALANCE) {
267 NodeColorBalance *n = static_cast<NodeColorBalance *>(node->storage);
268 n->input_temperature = n->output_temperature = 6500.0f;
269 n->input_tint = n->output_tint = 10.0f;
270 }
271 }
272 }
273 }
275 }
276
277 if (!MAIN_VERSION_FILE_ATLEAST(bmain, 403, 11)) {
278 LISTBASE_FOREACH (Curves *, curves, &bmain->hair_curves) {
279 curves->geometry.attributes_active_index = curves->attributes_active_index_legacy;
280 }
281 }
282
283 if (!MAIN_VERSION_FILE_ATLEAST(bmain, 403, 13)) {
284 Camera default_cam = *DNA_struct_default_get(Camera);
285 LISTBASE_FOREACH (Camera *, camera, &bmain->cameras) {
286 camera->central_cylindrical_range_u_min = default_cam.central_cylindrical_range_u_min;
287 camera->central_cylindrical_range_u_max = default_cam.central_cylindrical_range_u_max;
288 camera->central_cylindrical_range_v_min = default_cam.central_cylindrical_range_v_min;
289 camera->central_cylindrical_range_v_max = default_cam.central_cylindrical_range_v_max;
290 camera->central_cylindrical_radius = default_cam.central_cylindrical_radius;
291 }
292 }
293
294 /* The File Output node now uses the linear color space setting of its stored image formats. So
295 * we need to ensure the color space value is initialized to some sane default based on the image
296 * type. Furthermore, the node now gained a new Save As Render option that is global to the node,
297 * which will be used if Use Node Format is enabled for each input, so we potentially need to
298 * disable Use Node Format in case inputs had different Save As render options. */
299 if (!MAIN_VERSION_FILE_ATLEAST(bmain, 403, 14)) {
300 FOREACH_NODETREE_BEGIN (bmain, ntree, id) {
301 if (ntree->type != NTREE_COMPOSIT) {
302 continue;
303 }
304
305 LISTBASE_FOREACH (bNode *, node, &ntree->nodes) {
306 if (node->type_legacy != CMP_NODE_OUTPUT_FILE) {
307 continue;
308 }
309
310 /* Initialize node format color space if it is not set. */
311 NodeCompositorFileOutput *storage = static_cast<NodeCompositorFileOutput *>(node->storage);
312 if (storage->format.linear_colorspace_settings.name[0] == '\0') {
314 }
315
316 if (BLI_listbase_is_empty(&node->inputs)) {
317 continue;
318 }
319
320 /* Initialize input formats color space if it is not set. */
321 LISTBASE_FOREACH (const bNodeSocket *, input, &node->inputs) {
322 NodeImageMultiFileSocket *input_storage = static_cast<NodeImageMultiFileSocket *>(
323 input->storage);
324 if (input_storage->format.linear_colorspace_settings.name[0] == '\0') {
325 BKE_image_format_update_color_space_for_type(&input_storage->format);
326 }
327 }
328
329 /* EXR images don't use Save As Render. */
331 continue;
332 }
333
334 /* Find out if all inputs have the same Save As Render option. */
335 const bNodeSocket *first_input = static_cast<bNodeSocket *>(node->inputs.first);
336 const NodeImageMultiFileSocket *first_input_storage =
337 static_cast<NodeImageMultiFileSocket *>(first_input->storage);
338 const bool first_save_as_render = first_input_storage->save_as_render;
339 bool all_inputs_have_same_save_as_render = true;
340 LISTBASE_FOREACH (const bNodeSocket *, input, &node->inputs) {
341 const NodeImageMultiFileSocket *input_storage = static_cast<NodeImageMultiFileSocket *>(
342 input->storage);
343 if (bool(input_storage->save_as_render) != first_save_as_render) {
344 all_inputs_have_same_save_as_render = false;
345 break;
346 }
347 }
348
349 /* All inputs have the same save as render option, so we set the node Save As Render option
350 * to that value, and we leave inputs as is. */
351 if (all_inputs_have_same_save_as_render) {
352 storage->save_as_render = first_save_as_render;
353 continue;
354 }
355
356 /* For inputs that have Use Node Format enabled, we need to disabled it because otherwise
357 * they will use the node's Save As Render option. It follows that we need to copy the
358 * node's format to the input format. */
359 LISTBASE_FOREACH (const bNodeSocket *, input, &node->inputs) {
360 NodeImageMultiFileSocket *input_storage = static_cast<NodeImageMultiFileSocket *>(
361 input->storage);
362
363 if (!input_storage->use_node_format) {
364 continue;
365 }
366
367 input_storage->use_node_format = false;
368 input_storage->format = storage->format;
369 }
370 }
371 }
373 }
374
375 if (!MAIN_VERSION_FILE_ATLEAST(bmain, 403, 15)) {
376 using namespace blender;
377
378 LISTBASE_FOREACH (Collection *, collection, &bmain->collections) {
379 const ListBase *exporters = &collection->exporters;
380 LISTBASE_FOREACH (CollectionExport *, data, exporters) {
381 /* The name field should be empty at this point. */
382 BLI_assert(data->name[0] == '\0');
383
385 BKE_collection_exporter_name_set(exporters, data, fh ? fh->label : DATA_("Undefined"));
386 }
387 }
388 }
389
390 if (!MAIN_VERSION_FILE_ATLEAST(bmain, 403, 16)) {
391 LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) {
392 scene->eevee.flag |= SCE_EEVEE_FAST_GI_ENABLED;
393 }
394 }
395
396 if (!MAIN_VERSION_FILE_ATLEAST(bmain, 403, 17)) {
397 FOREACH_NODETREE_BEGIN (bmain, tree, id) {
398 if (tree->default_group_node_width == 0) {
399 tree->default_group_node_width = GROUP_NODE_DEFAULT_WIDTH;
400 }
401 }
403 }
404
405 if (!MAIN_VERSION_FILE_ATLEAST(bmain, 403, 20)) {
406 LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) {
407 LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) {
408 LISTBASE_FOREACH (SpaceLink *, sl, &area->spacedata) {
409 if (sl->spacetype == SPACE_SEQ) {
411 if (region != nullptr) {
412 region->flag &= ~RGN_FLAG_HIDDEN;
413 }
414 }
415 }
416 }
417 }
418 }
419
420 if (!MAIN_VERSION_FILE_ATLEAST(bmain, 403, 21)) {
421 LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) {
422 LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) {
423 LISTBASE_FOREACH (SpaceLink *, sl, &area->spacedata) {
424 if (sl->spacetype == SPACE_CLIP) {
426 if (region != nullptr) {
427 View2D *v2d = &region->v2d;
429 }
430 }
431 }
432 }
433 }
434 }
435
436 if (!MAIN_VERSION_FILE_ATLEAST(bmain, 403, 22)) {
438 }
439
440 if (!MAIN_VERSION_FILE_ATLEAST(bmain, 403, 23)) {
441 LISTBASE_FOREACH (Object *, object, &bmain->objects) {
442 LISTBASE_FOREACH (ModifierData *, md, &object->modifiers) {
443 if (md->type != eModifierType_Nodes) {
444 continue;
445 }
446 NodesModifierData &nmd = *reinterpret_cast<NodesModifierData *>(md);
448 /* Use disk target for existing modifiers to avoid changing behavior. */
450 }
451 }
452 }
453 }
454
455 if (!MAIN_VERSION_FILE_ATLEAST(bmain, 403, 24)) {
456 FOREACH_NODETREE_BEGIN (bmain, ntree, id) {
458 }
460 }
461
462 if (!MAIN_VERSION_FILE_ATLEAST(bmain, 403, 26)) {
464 }
465
466 if (!MAIN_VERSION_FILE_ATLEAST(bmain, 403, 28)) {
467 LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) {
468 LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) {
469 LISTBASE_FOREACH (SpaceLink *, sl, &area->spacedata) {
470 if (sl->spacetype == SPACE_VIEW3D) {
471 View3D *v3d = reinterpret_cast<View3D *>(sl);
476 }
477 }
478 }
479 }
480
481 FOREACH_NODETREE_BEGIN (bmain, ntree, id) {
482 if (ntree->type != NTREE_COMPOSIT) {
483 continue;
484 }
485 LISTBASE_FOREACH_MUTABLE (bNode *, node, &ntree->nodes) {
486 if (ELEM(node->type_legacy, CMP_NODE_VIEWER, CMP_NODE_COMPOSITE_DEPRECATED)) {
487 node->flag &= ~NODE_PREVIEW;
488 }
489 }
490 }
492 }
493
494 if (!MAIN_VERSION_FILE_ATLEAST(bmain, 403, 29)) {
495 /* Open warnings panel by default. */
496 LISTBASE_FOREACH (Object *, object, &bmain->objects) {
497 LISTBASE_FOREACH (ModifierData *, md, &object->modifiers) {
498 if (md->type == eModifierType_Nodes) {
499 md->layout_panel_open_flag |= 1 << NODES_MODIFIER_PANEL_WARNINGS;
500 }
501 }
502 }
503 }
504
505 if (!MAIN_VERSION_FILE_ATLEAST(bmain, 403, 31)) {
506 LISTBASE_FOREACH (WorkSpace *, workspace, &bmain->workspaces) {
507 LISTBASE_FOREACH (bToolRef *, tref, &workspace->tools) {
508 if (tref->space_type != SPACE_SEQ) {
509 continue;
510 }
511 STRNCPY_UTF8(tref->idname, "builtin.select_box");
512 }
513 }
514 }
515}
void BKE_collection_exporter_name_set(const ListBase *exporters, CollectionExport *data, const char *newname)
@ CTX_MODE_VERTEX_GPENCIL_LEGACY
@ CTX_MODE_WEIGHT_GPENCIL_LEGACY
@ CTX_MODE_SCULPT_GPENCIL_LEGACY
@ CTX_MODE_PAINT_GREASE_PENCIL
@ CTX_MODE_PAINT_GPENCIL_LEGACY
@ CTX_MODE_PAINT_TEXTURE
@ CTX_MODE_SCULPT_GREASE_PENCIL
@ CTX_MODE_SCULPT
@ CTX_MODE_SCULPT_CURVES
@ CTX_MODE_WEIGHT_GREASE_PENCIL
@ CTX_MODE_VERTEX_GREASE_PENCIL
@ CTX_MODE_PAINT_VERTEX
@ CTX_MODE_PAINT_WEIGHT
CustomData interface, see also DNA_customdata_types.h.
void * CustomData_get_layer_named_for_write(CustomData *data, eCustomDataType type, blender::StringRef name, int totelem)
Low-level operations for grease pencil.
void BKE_image_format_update_color_space_for_type(ImageFormatData *format)
#define MAIN_VERSION_FILE_ATLEAST(main, ver, subver)
Definition BKE_main.hh:658
constexpr int GROUP_NODE_DEFAULT_WIDTH
Definition BKE_node.hh:1251
#define FOREACH_NODETREE_END
Definition BKE_node.hh:881
#define FOREACH_NODETREE_BEGIN(bmain, _nodetree, _id)
Definition BKE_node.hh:871
#define CMP_NODE_VIEWER
#define SH_NODE_BSDF_PRINCIPLED
#define CMP_NODE_COLORBALANCE
#define GEO_NODE_SIMULATION_OUTPUT
#define CMP_NODE_OUTPUT_FILE
#define CMP_NODE_COMPOSITE_DEPRECATED
void BKE_paint_brushes_set_default_references(ToolSettings *ts)
Definition paint.cc:1070
ARegion * BKE_area_find_region_type(const ScrArea *area, int region_type)
Definition screen.cc:846
#define BLI_assert(a)
Definition BLI_assert.h:46
#define LISTBASE_FOREACH(type, var, list)
BLI_INLINE bool BLI_listbase_is_empty(const ListBase *lb)
#define LISTBASE_FOREACH_MUTABLE(type, var, list)
MINLINE void copy_v3_fl(float r[3], float f)
MINLINE void copy_v2_fl(float r[2], float f)
char * STRNCPY(char(&dst)[N], const char *src)
Definition BLI_string.h:693
#define STRNCPY_UTF8(dst, src)
#define ELEM(...)
#define STREQ(a, b)
#define DATA_(msgid)
Object groups, one object can be in many groups at once.
@ CD_PROP_INT32
#define DNA_struct_default_get(struct_name)
@ NODES_MODIFIER_BAKE_TARGET_INHERIT
@ NODES_MODIFIER_BAKE_TARGET_DISK
@ NODES_MODIFIER_PANEL_WARNINGS
@ eModifierType_Nodes
@ eModifierType_Bevel
@ NODE_PREVIEW
@ NTREE_CUSTOM
@ NTREE_SHADER
@ NTREE_COMPOSIT
@ SOCK_OUT
@ OB_MESH
@ SCE_EEVEE_FAST_GI_ENABLED
@ SEQ_SNAP_TO_PREVIEW_CENTER
@ SEQ_SNAP_TO_STRIPS_PREVIEW
@ SEQ_SNAP_TO_PREVIEW_BORDERS
@ R_IMF_IMTYPE_OPENEXR
@ R_IMF_IMTYPE_MULTILAYER
@ RGN_TYPE_WINDOW
@ RGN_TYPE_TOOLS
@ RGN_FLAG_HIDDEN
@ SNODE_FLAG_UNUSED_5
@ SPACE_CLIP
@ SPACE_NODE
@ SPACE_SEQ
@ SPACE_IMAGE
@ SPACE_VIEW3D
@ SI_MODE_PAINT
@ V2D_VIEWSYNC_SCREEN_TIME
BMesh const char void * data
KDTree_3d * tree
#define input
#define output
void * MEM_callocN(size_t len, const char *str)
Definition mallocn.cc:118
constexpr float LEGACY_RADIUS_CONVERSION_FACTOR
FileHandlerType * file_handler_find(StringRef idname)
SequencerToolSettings * tool_settings_ensure(Scene *scene)
Definition sequencer.cc:375
float central_cylindrical_range_v_min
float central_cylindrical_range_u_min
float central_cylindrical_range_u_max
float central_cylindrical_radius
float central_cylindrical_range_v_max
ColorManagedColorspaceSettings linear_colorspace_settings
ListBase brushes
Definition BKE_main.hh:302
ListBase scenes
Definition BKE_main.hh:278
ListBase hair_curves
Definition BKE_main.hh:320
ListBase nodetrees
Definition BKE_main.hh:301
ListBase cameras
Definition BKE_main.hh:289
ListBase screens
Definition BKE_main.hh:292
ListBase workspaces
Definition BKE_main.hh:315
ListBase collections
Definition BKE_main.hh:298
ListBase objects
Definition BKE_main.hh:280
float gpencil_grid_color[3]
float gpencil_grid_scale[2]
float gpencil_grid_offset[2]
View3DOverlay overlay
void * default_value
char identifier[64]
float locx_legacy
struct bNode * parent
float locy_legacy
void * storage
void blo_do_versions_430(FileData *, Library *, Main *bmain)
static void update_paint_modes_for_brush_assets(Main &bmain)
static void hide_simulation_node_skip_socket_value(Main &bmain)
static void add_bevel_modifier_attribute_name_defaults(Main &bmain)
static void node_reroute_add_storage(bNodeTree &tree)
static void fix_built_in_curve_attribute_defaults(Main *bmain)
void do_versions_after_linking_430(FileData *, Main *bmain)
bNodeSocket & version_node_add_socket(bNodeTree &ntree, bNode &node, const eNodeSocketInOut in_out, const char *idname, const char *identifier)
void version_node_socket_index_animdata(Main *bmain, const int node_tree_type, const int node_type, const int socket_index_orig, const int socket_index_offset, const int total_number_of_sockets)
bNode & version_node_add_empty(bNodeTree &ntree, const char *idname)
bNodeLink & version_node_add_link(bNodeTree &ntree, bNode &node_a, bNodeSocket &socket_a, bNode &node_b, bNodeSocket &socket_b)