9#define DNA_DEPRECATED_ALLOW
15#define DNA_GENFILE_VERSIONING_MACROS
40#undef DNA_GENFILE_VERSIONING_MACROS
100 for (
bNode *node : ntree->all_nodes()) {
105 node->id = &scene->
id;
128 blender::animrig::Strip::Type::Keyframe);
132 bag.
fcurve_array = MEM_cnew_array<FCurve *>(fcu_count,
"Action versioning - fcurves");
134 bag.
group_array = MEM_cnew_array<bActionGroup *>(group_count,
"Action versioning - groups");
138 int fcurve_index = 0;
143 group->fcurve_range_start = fcurve_index;
146 if (fcu->grp != group) {
152 group->fcurve_range_length = fcurve_index - group->fcurve_range_start;
165 action.
curves = {
nullptr,
nullptr};
166 action.
groups = {
nullptr,
nullptr};
174 Action &action = dna_action->wrap();
178 action_users.
add(dna_action, {});
188 if (!action_user_vector) {
196 action_user_vector->
append(user_info);
204 for (
const auto &item : action_users.
items()) {
205 Action &action = item.key->wrap();
208 Slot &slot_to_assign = *action.
slot(0);
210 if (user_infos.
size() == 1) {
219 *action_user.action_ptr_ptr,
220 *action_user.slot_handle,
221 action_user.slot_name);
245 "Warning: while upgrading legacy Action \"%s\", its slot \"%s\" could not be "
246 "assigned to data-block \"%s\" because it was meant for ID type \"%s\". The Action "
247 "assignment will be kept, but \"%s\" will not be animated.\n",
250 action_user.id->name,
252 action_user.id->name);
255 BLI_assert(!
"SlotNotFromAction should not be returned here");
258 BLI_assert(!
"MissingAction should not be returned here");
279 "Expected ARMATURE object to have an Armature as data");
287 pose_set.add(ob->pose);
292 for (
const PoseSet &pose_set : armature_poses.
values()) {
296 const bool store_on_armature = pose_set.size() == 1;
298 for (
bPose *pose : pose_set) {
301 (pchan->agrp_index - 1));
306 BoneColor &bone_color = store_on_armature ? pchan->bone->color : pchan->color;
322 BLI_assert_msg(arm->edbo ==
nullptr,
"did not expect an Armature to be saved in edit mode");
323 const uint layer_used = arm->layer_used;
327 for (
uint layer = 0; layer < 32; ++layer) {
328 const uint layer_mask = 1u << layer;
329 if ((layer_used & layer_mask) == 0) {
335 bcoll_name[0] =
'\0';
339 SNPRINTF(custom_prop_name,
"layer_name_%u", layer);
345 if (bcoll_name[0] ==
'\0') {
348 SNPRINTF(bcoll_name,
"Layer %u", layer + 1);
353 layermask_collection.
append(std::make_pair(layer_mask, bcoll));
355 if ((arm->layer & layer_mask) == 0) {
362 for (auto layer_bcoll : layermask_collection) {
363 const uint layer_mask = layer_bcoll.first;
364 if ((bone->layer & layer_mask) == 0) {
368 BoneCollection *bcoll = layer_bcoll.second;
369 ANIM_armature_bonecoll_assign(bcoll, bone);
384 bPose *pose = ob->pose;
390 collections_by_group.
add_new(bgrp, bcoll);
403 (pchan->agrp_index - 1));
427 constexpr char const *rna_path_prefix =
"collections[";
447 char node_name_escaped[
MAX_NAME * 2];
448 BLI_str_escape(node_name_escaped, node->name,
sizeof(node_name_escaped));
449 std::string prefix =
"nodes[\"" + std::string(node_name_escaped) +
"\"].inputs";
464 std::pair<int, int> remap_table[] = {
484 for (
const auto &entry : remap_table) {
486 id, adt, owner_id, prefix.c_str(),
nullptr,
nullptr, entry.first, entry.second,
false);
503 bool hide_shadows = *material_len > 0;
507 hide_shadows =
false;
524 if (output_node ==
nullptr) {
530 if (existing_out_sock->
link ==
nullptr && volume_sock->
link) {
543 new_output->
locx = output_node->
locx;
546 auto copy_link = [&](
const char *socket_name) {
548 if (sock && sock->
link) {
557 copy_link(
"Displacement");
558 copy_link(
"Thickness");
560 output_node = new_output;
577 if (old_out_sock->
link !=
nullptr) {
580 if (out_sock->
link !=
nullptr) {
591 lp_node->
locy = mix_node->
locy + 35;
596 if (sock != is_shadow) {
605 bsdf_node->
locx = output_node->
locx;
606 bsdf_node->
locy = mix_node->
locy - 35;
721 if (socket->
link ==
nullptr) {
728 switch (node->
type) {
740 if (socket->
link ==
nullptr) {
742 if ((socket_color_value[0] == 0.0f) && (socket_color_value[1] == 0.0f) &&
743 (socket_color_value[2] == 0.0f))
747 if ((socket_color_value[0] == 1.0f) && (socket_color_value[1] == 1.0f) &&
748 (socket_color_value[2] == 1.0f))
763 if (socket->
link ==
nullptr) {
765 if (socket_float_value == 0.0f) {
768 if (socket_float_value == 1.0f) {
785 if (socket->
link ==
nullptr) {
787 if (socket_value == 0.0f) {
790 if (socket_value == 1.0f) {
799 if (socket->
link ==
nullptr) {
801 if (socket_value == 0.0f) {
804 if (socket_value == 1.0f) {
827 if (output_node ==
nullptr) {
837 if (alpha.
socket ==
nullptr) {
841 bool is_opaque = (threshold == 2.0f);
848 float values[4] = {value, value, value, 1.0f};
891 float sum = default_value[0] + default_value[1] + default_value[2];
893 float avg = (
sum >= 3.0f) ? 1.0f : (
sum / 3.0f);
896 float values[4] = {value, value, value, 1.0f};
902 (*default_value > threshold));
919 STRNCPY(node->idname,
"CompositorNodeSplit");
922 node->storage =
nullptr;
926 viewer_node->
locx = node->locx + node->width + viewer_node->
width / 4.0f;
927 viewer_node->
locy = node->locy;
951 bool any_valid_tweakmode_left =
false;
962 any_valid_tweakmode_left =
true;
972 if (any_valid_tweakmode_left) {
985 const Scene *scene =
static_cast<Scene *
>(user_data);
986 const float speed_factor =
seq->speed_factor;
998 const int prev_length =
seq->len -
seq->startofs -
seq->endofs;
1014 for (
const char *engine :
engines) {
1015 if (
STREQ(scene->r.engine, engine)) {
1032 light->energy = light->energy_deprecated;
1041 if (scene->nodetree) {
1049 if (!part->effector_weights) {
1060 ob->proxy->proxy_from =
nullptr;
1061 ob->proxy =
nullptr;
1066 RPT_(
"Proxy lost from object %s lib %s\n"),
1068 ob->id.lib->filepath);
1073 RPT_(
"Proxy lost from object %s lib <NONE>\n"),
1080 ob->proxy->proxy_from = ob;
1087 if (!DNA_struct_member_exists(fd->
filesdna,
"bPoseChannel",
"BoneColor",
"color")) {
1091 if (!DNA_struct_member_exists(fd->
filesdna,
"bArmature",
"ListBase",
"collections")) {
1110 if (
ed !=
nullptr) {
1163 if (!material->use_nodes || material->nodetree ==
nullptr) {
1169 else if (material->blend_shadow ==
MA_BS_NONE) {
1181 RPT_(
"Material %s could not be converted because of different Blend Mode "
1182 "and Shadow Mode (need manual adjustment)\n"),
1183 material->id.name + 2);
1188 float threshold = (material->blend_method ==
MA_BM_CLIP) ? material->alpha_threshold :
1194 RPT_(
"Material %s could not be converted because of non-trivial "
1195 "alpha blending (need manual adjustment)\n"),
1196 material->id.name + 2);
1264 BLI_assert(tracking_camera_object !=
nullptr);
1325 "GeometryNodeStoreNamedAttribute",
1326 "GeometryNodeInputNamedAttribute"))
1359 STRNCPY(node->idname,
"ShaderNodeBsdfAnisotropic");
1380 if (!
STREQ(socket->identifier,
"Roughness")) {
1384 if (socket->link !=
nullptr) {
1388 socket_value->
value = 0.0f;
1399 bNode *geometry_node =
nullptr;
1400 bNode *transform_node =
nullptr;
1407 if (geometry_node ==
nullptr) {
1420 ntree, geometry_node, incoming_socket, transform_node, vec_in_socket);
1423 ntree, transform_node, vec_out_socket, link->tonode, link->tosock);
1436 if (sock !=
nullptr) {
1447 STRNCPY(node->idname,
"ShaderNodeBsdfSheen");
1450 if (sigmaInput !=
nullptr) {
1462 auto check_node = [](
const bNode *node) {
1474 if (
sheen !=
nullptr &&
sheen->link ==
nullptr) {
1477 static float default_value[] = {1.0f, 1.0f, 1.0f, 1.0f};
1481 static float default_value[] = {0.2f, 0.2f, 0.2f, 1.0f};
1502 if (thickness_socket ==
nullptr) {
1506 bool has_link =
false;
1508 if (link->tosock == thickness_socket) {
1519 value_node->
locx = node->locx;
1520 value_node->
locy = node->locy - 160.0f;
1541 if (roughness_socket ==
nullptr) {
1549 bNode *roughness_from_node =
nullptr;
1554 if (link->tosock == roughness_socket) {
1555 roughness_link = link;
1556 roughness_from_node = link->fromnode;
1557 roughness_from_socket = link->fromsock;
1561 if (roughness_link !=
nullptr) {
1567 clamp_node->
locx = node->locx;
1568 clamp_node->
locy = node->locy - 300.0f;
1571 clamp_node,
SOCK_IN,
"Value");
1582 ntree, roughness_from_node, roughness_from_socket, clamp_node, clamp_socket_value);
1586 *roughness = std::clamp(*roughness, 0.0f, 1.0f);
1601 STRNCPY(node->idname,
"ShaderNodeTexNoise");
1606 data->normalize =
false;
1609 node->storage =
data;
1612 bNode *detail_from_node =
nullptr;
1616 bNode *roughness_from_node =
nullptr;
1620 bNode *lacunarity_from_node =
nullptr;
1625 if (link->tonode == node) {
1626 if (
STREQ(link->tosock->identifier,
"Detail")) {
1628 detail_from_node = link->fromnode;
1629 detail_from_socket = link->fromsock;
1631 if (
STREQ(link->tosock->identifier,
"Roughness")) {
1632 roughness_link = link;
1633 roughness_from_node = link->fromnode;
1634 roughness_from_socket = link->fromsock;
1636 if (
STREQ(link->tosock->identifier,
"Lacunarity")) {
1637 lacunarity_link = link;
1638 lacunarity_from_node = link->fromnode;
1639 lacunarity_from_socket = link->fromsock;
1645 float locy_offset = 0.0f;
1649 fac_socket->
label[0] =
'\0';
1654 if (detail_link !=
nullptr) {
1655 locy_offset -= 80.0f;
1662 min_node->
locx = node->locx;
1663 min_node->
locy = node->locy - 320.0f;
1672 sub1_node->
locx = node->locx;
1673 sub1_node->
locy = node->locy - 360.0f;
1684 ntree, detail_from_node, detail_from_socket, sub1_node, sub1_socket_A);
1689 locy_offset -= 40.0f;
1696 greater_node->
locx = node->locx;
1697 greater_node->
locy = node->locy - 400.0f;
1709 ntree, detail_from_node, detail_from_socket, greater_node, greater_socket_A);
1711 ntree, greater_node, greater_socket_out, sub1_node, sub1_socket_B);
1719 clamp_node->
locx = node->locx;
1720 clamp_node->
locy = node->locy + 40.0f;
1723 clamp_node,
SOCK_IN,
"Value");
1732 mul_node->
locx = node->locx;
1733 mul_node->
locy = node->locy + 80.0f;
1749 sub2_node->
locx = node->locx;
1750 sub2_node->
locy = node->locy + 120.0f;
1763 add_node->locy = node->locy + 160.0f;
1775 if (link->fromsock == fac_socket) {
1777 ntree,
add_node, add_socket_out, link->tonode, link->tosock);
1784 ntree, detail_from_node, detail_from_socket, sub2_node, sub2_socket_B);
1789 if (link->fromsock == fac_socket) {
1791 ntree, mul_node, mul_socket_out, link->tonode, link->tosock);
1799 ntree, detail_from_node, detail_from_socket, clamp_node, clamp_socket_value);
1811 mul_node->
locx = node->locx;
1812 mul_node->
locy = node->locy + 40.0f;
1830 add_node->locy = node->locy + 80.0f;
1842 if (link->fromsock == fac_socket) {
1844 ntree,
add_node, add_socket_out, link->tonode, link->tosock);
1853 if (link->fromsock == fac_socket) {
1855 ntree, mul_node, mul_socket_out, link->tonode, link->tosock);
1876 *roughness = std::fmaxf(*roughness, 1e-5f);
1877 *lacunarity = std::fmaxf(*lacunarity, 1e-5f);
1879 if (roughness_link !=
nullptr) {
1886 max1_node->
locx = node->locx;
1887 max1_node->
locy = node->locy - 400.0f + locy_offset;
1896 mul_node->
locx = node->locx;
1897 mul_node->
locy = node->locy - 360.0f + locy_offset;
1906 pow_node->
locx = node->locx;
1907 pow_node->
locy = node->locy - 320.0f + locy_offset;
1919 ntree, roughness_from_node, roughness_from_socket, max1_node, max1_socket_A);
1924 if (lacunarity_link !=
nullptr) {
1930 max2_node->
locx = node->locx;
1931 max2_node->
locy = node->locy - 440.0f + locy_offset;
1944 ntree, lacunarity_from_node, lacunarity_from_socket, max2_node, max2_socket_A);
1949 else if ((lacunarity_link !=
nullptr) && (roughness_link ==
nullptr)) {
1956 max2_node->
locx = node->locx;
1957 max2_node->
locy = node->locy - 360.0f + locy_offset;
1966 pow_node->
locx = node->locx;
1967 pow_node->
locy = node->locy - 320.0f + locy_offset;
1979 ntree, lacunarity_from_node, lacunarity_from_socket, max2_node, max2_socket_A);
1985 *roughness = std::pow(*lacunarity, -(*roughness));
2019 if (!subsurf->
link && *subsurf_val == 0.0f) {
2026 if (subsurf->
link ==
nullptr && *subsurf_val == 0.0f) {
2037 if (subsurf->
link || subsurf_col->
link || base_col->
link) {
2040 mix->locx = node->locx - 170;
2041 mix->locy = node->locy - 120;
2052 if (base_col->
link) {
2057 if (subsurf_col->
link) {
2062 if (subsurf->
link) {
2072 interp_v4_v4v4(base_col_val, base_col_val, subsurf_col_val, *subsurf_val);
2075 *subsurf_val = 1.0f;
2131 data->parametrization = node->custom1;
2133 node->storage =
data;
2147 auto *new_value = MEM_cnew<bNodeSocketValueRotation>(__func__);
2148 copy_v3_v3(new_value->value_euler, old_value->value);
2152 if (link->tosock != &socket) {
2161 if (
STREQ(link->fromnode->idname,
"FunctionNodeEulerToRotation")) {
2166 convert->parent = node.
parent;
2167 convert->locx = node.
locx - 40;
2168 convert->locy = node.
locy;
2169 link->tonode = convert;
2186 if (link->fromsock != &socket) {
2194 if (
STREQ(link->tonode->idname,
"FunctionNodeRotationToEuler"))
2199 convert->parent = node.
parent;
2200 convert->locx = node.
locx + 40;
2201 convert->locy = node.
locy;
2202 link->fromnode = convert;
2217 "GeometryNodeInstanceOnPoints",
2218 "GeometryNodeRotateInstances",
2219 "GeometryNodeTransform"))
2225 "GeometryNodeDistributePointsOnFaces",
2226 "GeometryNodeObjectInfo",
2227 "GeometryNodeInputInstanceRotation"))
2238 using string_pair = std::pair<const char *, const char *>;
2239 static const string_pair subtypes_map[] = {{
"NodeSocketFloatUnsigned",
"NodeSocketFloat"},
2240 {
"NodeSocketFloatPercentage",
"NodeSocketFloat"},
2241 {
"NodeSocketFloatFactor",
"NodeSocketFloat"},
2242 {
"NodeSocketFloatAngle",
"NodeSocketFloat"},
2243 {
"NodeSocketFloatTime",
"NodeSocketFloat"},
2244 {
"NodeSocketFloatTimeAbsolute",
"NodeSocketFloat"},
2245 {
"NodeSocketFloatDistance",
"NodeSocketFloat"},
2246 {
"NodeSocketIntUnsigned",
"NodeSocketInt"},
2247 {
"NodeSocketIntPercentage",
"NodeSocketInt"},
2248 {
"NodeSocketIntFactor",
"NodeSocketInt"},
2249 {
"NodeSocketVectorTranslation",
"NodeSocketVector"},
2250 {
"NodeSocketVectorDirection",
"NodeSocketVector"},
2251 {
"NodeSocketVectorVelocity",
"NodeSocketVector"},
2252 {
"NodeSocketVectorAcceleration",
"NodeSocketVector"},
2253 {
"NodeSocketVectorEuler",
"NodeSocketVector"},
2254 {
"NodeSocketVectorXYZ",
"NodeSocketVector"}};
2255 for (
const string_pair &pair : subtypes_map) {
2256 if (pair.first == idname) {
2294 legacy_socket.
prop =
nullptr;
2297 MEM_delete(legacy_socket.
runtime);
2298 legacy_socket.
runtime =
nullptr;
2300 return &new_socket->
item;
2338 if (socket.
socket_type != corrected_socket_type) {
2384 node,
SOCK_IN,
"Specular Tint");
2405 static float one[] = {1.0f, 1.0f, 1.0f, 1.0f};
2408 float metallic_mix[4];
2410 interp_v4_v4v4(specular_tint, one, metallic_mix, specular_tint_old);
2412 if (specular_tint_sock->
link ==
nullptr && specular_tint_old <= 0.0f) {
2422 bNode *metallic_mix_node =
nullptr;
2427 mix->locx = node->locx - 270;
2428 mix->locy = node->locy - 120;
2434 metallic_mix_node =
mix;
2437 if (base_color_sock->
link) {
2443 if (metallic_sock->
link) {
2448 else if (base_color_sock->
link) {
2456 if (specular_tint_sock->
link || (metallic_mix_out && specular_tint_old > 0.0f)) {
2459 mix->locx = node->locx - 170;
2460 mix->locy = node->locy - 120;
2469 if (metallic_mix_out) {
2473 if (specular_tint_sock->
link) {
2507 const int initial_pos)
2509 const bool sockets_above_panels = !(panel.
flag &
2513 int pos = initial_pos;
2515 if (sockets_above_panels) {
2518 for (
int test_pos = items.
size() - 1; test_pos >= initial_pos; test_pos--) {
2532 for (
int test_pos = 0; test_pos <= initial_pos; test_pos++) {
2533 if (test_pos >= items.
size()) {
2555 position = std::min(std::max(position, 0), parent.
items_num);
2561 parent.items().take_front(position).copy_from(old_items.
take_front(position));
2562 parent.items().drop_front(position + 1).copy_from(old_items.
drop_front(position));
2563 parent.items()[position] = &socket.
item;
2565 if (old_items.
data()) {
2576 if (parent ==
nullptr) {
2611 if (is_output_a != is_output_b) {
2620 std::stable_sort(panel.items().begin(), panel.items().end(), item_compare);
2647 if (!
STREQ(socket.socket_type,
"NodeSocketGeometry")) {
2650 if (!group->geometry_node_asset_traits) {
2651 group->geometry_node_asset_traits = MEM_cnew<GeometryNodeAssetTraits>(__func__);
2660 ListBase sockets,
const char *separator,
const std::optional<int> total = std::nullopt)
2664 if (socket->is_available()) {
2665 if (
char *
pos = strstr(socket->identifier, separator)) {
2669 if (total.has_value()) {
2671 if (index == *total) {
2680 BLI_strncat(socket->identifier,
"_deprecated",
sizeof(socket->identifier));
2688 switch (node->type) {
2735 if (layer_index == -1) {
2758 for (const int i : range) {
2759 radii[i] *= bke::greasepencil::LEGACY_RADIUS_CONVERSION_FACTOR;
2771 out_links_per_socket.
add(link->fromsock, link);
2787 absolute_value->
locx = node->locx + 100;
2788 absolute_value->
locy = node->locy - 50;
2795 link->fromnode = absolute_value;
2820 if (
STREQ(tref->idname,
"builtin_brush.Draw")) {
2823 STRNCPY(tref->idname,
"builtin.brush");
2829 if (!
ELEM(tref->mode,
2846 STRNCPY(tref->idname,
"builtin.brush");
2892 if (
ELEM(*tc, 2, 4)) {
2899 if (
seq->strip ==
nullptr ||
seq->strip->proxy ==
nullptr) {
2914 if (
data->shadow_angle == 0.0f) {
2916 data->shadow_offset = 0.04f;
2917 data->shadow_blur = 0.0f;
2919 if (
data->outline_width == 0.0f) {
2920 data->outline_color[3] = 0.7f;
2921 data->outline_width = 0.05f;
2948 ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase : &sl->regionbase;
2953 new_shelf_region->regiondata = MEM_cnew<RegionAssetShelf>(__func__);
2970 if (node->is_reroute()) {
2971 if (node->storage !=
nullptr) {
2987 node->storage =
data;
2999 const int curves_num = curves->geometry.curve_num;
3001 &curves->geometry.curve_data,
CD_PROP_INT32,
"resolution", curves_num)))
3004 resolution = std::max(resolution, 1);
3008 &curves->geometry.curve_data,
CD_PROP_INT8,
"nurbs_order", curves_num)))
3011 nurbs_order = std::max<int8_t>(nurbs_order, 1);
3049 if (!default_value->value) {
3052 bool is_linked =
false;
3054 if (link->tosock == skip_input) {
3064 input_node.
locx = node->locx - 25;
3065 input_node.
locy = node->locy;
3067 NodeInputBool *input_node_storage = MEM_cnew<NodeInputBool>(__func__);
3068 input_node.
storage = input_node_storage;
3069 input_node_storage->
boolean =
true;
3072 *
tree, input_node,
SOCK_OUT,
"NodeSocketBool",
"Boolean");
3077 default_value->value =
false;
3106#define SCE_SNAP_PROJECT (1 << 3)
3111#undef SCE_SNAP_PROJECT
3136 if (light->type ==
LA_SPOT && light->nodetree) {
3144 if (brush->tip_scale_x == 0.0f) {
3145 brush->tip_scale_x = 1.0f;
3167 if (!DNA_struct_member_exists(fd->
filesdna,
"LightProbe",
"int",
"grid_bake_samples")) {
3169 lightprobe->grid_bake_samples = 2048;
3170 lightprobe->grid_normal_bias = 0.3f;
3171 lightprobe->grid_view_bias = 0.0f;
3172 lightprobe->grid_facing_bias = 0.5f;
3173 lightprobe->grid_dilation_threshold = 0.5f;
3174 lightprobe->grid_dilation_radius = 1.0f;
3179 if (!DNA_struct_member_exists(fd->
filesdna,
"World",
"int",
"probe_resolution")) {
3185 if (!DNA_struct_member_exists(fd->
filesdna,
"LightProbe",
"float",
"grid_surface_bias")) {
3187 lightprobe->grid_surface_bias = 0.05f;
3188 lightprobe->grid_escape_bias = 0.1f;
3194 const int R_IMF_FLAG_ZBUF_LEGACY = 1 << 0;
3196 scene->r.im_format.flag &= ~R_IMF_FLAG_ZBUF_LEGACY;
3203 layer->opacity = 1.0f;
3222 ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase :
3253 if (!DNA_struct_member_exists(fd->
filesdna,
"SceneEEVEE",
"int",
"ray_tracing_method")) {
3259 if (!DNA_struct_exists(fd->
filesdna,
"RegionAssetShelf")) {
3267 ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase :
3273 "asset shelf for view3d (versioning)",
3281 "asset shelf header for view3d (versioning)",
3307 if (!DNA_struct_exists(fd->
filesdna,
"NodeShaderHairPrincipled")) {
3317 if (!DNA_struct_member_exists(fd->
filesdna,
"Camera",
"float",
"fisheye_fov")) {
3366 if (!DNA_struct_member_exists(fd->
filesdna,
"LightProbe",
"float",
"grid_flag")) {
3374 if (!DNA_struct_member_exists(fd->
filesdna,
"SceneEEVEE",
"int",
"gi_irradiance_pool_size")) {
3376 scene->eevee.gi_irradiance_pool_size = 16;
3381 scene->toolsettings->snap_flag_anim |=
SCE_SNAP;
3382 scene->toolsettings->snap_anim_mode |= (1 << 10);
3404 if (legacy_socket->prop) {
3407 MEM_delete(legacy_socket->runtime);
3413 if (legacy_socket->prop) {
3416 MEM_delete(legacy_socket->runtime);
3462 const ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase :
3490 sockets_to_split.
append(&socket);
3497 const int position = ntree->tree_interface.find_item_position(socket->item);
3521 scene->simulation_frame_start = scene->r.sfra;
3522 scene->simulation_frame_end = scene->r.efra;
3538 if (!DNA_struct_member_exists(fd->
filesdna,
"SceneEEVEE",
"int",
"shadow_step_count")) {
3551 const ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase :
3576 if (node->is_reroute()) {
3588 enum { IS_DEFAULT = 0, IS_UV, IS_NODE, IS_ANIM };
3589 auto versioning_snap_to = [](
short snap_to_old,
int type) {
3591 if (snap_to_old & (1 << 0)) {
3596 if (snap_to_old & (1 << 1)) {
3601 if (
ELEM(type, IS_DEFAULT, IS_ANIM) && snap_to_old & (1 << 2)) {
3604 if (type == IS_DEFAULT && snap_to_old & (1 << 3)) {
3607 if (type == IS_DEFAULT && snap_to_old & (1 << 4)) {
3610 if (type == IS_DEFAULT && snap_to_old & (1 << 5)) {
3613 if (
ELEM(type, IS_DEFAULT, IS_UV, IS_NODE) && snap_to_old & (1 << 6)) {
3616 if (
ELEM(type, IS_DEFAULT, IS_UV, IS_NODE) && snap_to_old & (1 << 7)) {
3619 if (type == IS_DEFAULT && snap_to_old & (1 << 8)) {
3622 if (type == IS_DEFAULT && snap_to_old & (1 << 9)) {
3625 if (snap_to_old & (1 << 10)) {
3628 if (snap_to_old & (1 << 11)) {
3631 if (snap_to_old & (1 << 12)) {
3654 if (info !=
nullptr) {
3655 for (
int i = curve->len_char32 - 1; i >= 0; i--, info++) {
3699 bool transparent_shadows =
true;
3701 transparent_shadows = material->blend_shadow !=
MA_BS_SOLID;
3705 cmat,
"use_transparent_shadow",
true);
3724 if (!DNA_struct_member_exists(fd->
filesdna,
"SceneEEVEE",
"int",
"volumetric_ray_depth")) {
3731 if (!DNA_struct_member_exists(fd->
filesdna,
"Material",
"char",
"surface_render_method")) {
3733 mat->surface_render_method = (mat->blend_method ==
MA_BM_BLEND) ?
3742 const ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase :
3755 if (!DNA_struct_member_exists(fd->
filesdna,
"SceneEEVEE",
"float",
"gtao_thickness")) {
3759 scene->eevee.gtao_focus = default_eevee.
gtao_focus;
3763 if (!DNA_struct_member_exists(fd->
filesdna,
"LightProbe",
"float",
"data_display_size")) {
3785 if (!DNA_struct_member_exists(fd->
filesdna,
"Material",
"char",
"displacement_method")) {
3793 material->displacement_method = displacement_method;
3801 bone->color.custom.solid[3] = 255;
3802 bone->color.custom.select[3] = 255;
3803 bone->color.custom.active[3] = 255;
3807 ebone->color.custom.solid[3] = 255;
3808 ebone->color.custom.select[3] = 255;
3809 ebone->color.custom.active[3] = 255;
3814 if (obj->pose ==
nullptr) {
3818 pchan->color.custom.solid[3] = 255;
3819 pchan->color.custom.select[3] = 255;
3820 pchan->color.custom.active[3] = 255;
3826 if (!DNA_struct_member_exists(
3827 fd->
filesdna,
"SceneEEVEE",
"RaytraceEEVEE",
"ray_tracing_options"))
3834 scene->eevee.ray_tracing_options.screen_trace_quality = 0.25f;
3835 scene->eevee.ray_tracing_options.screen_trace_thickness = 0.2f;
3836 scene->eevee.ray_tracing_options.trace_max_roughness = 0.5f;
3837 scene->eevee.ray_tracing_options.resolution_scale = 2;
3911 Sculpt *sculpt = scene->toolsettings->sculpt;
3912 if (sculpt !=
nullptr) {
3923 int input_sample_values[9];
3926 input_sample_values[1] = ts->
sculpt !=
nullptr ?
3933 input_sample_values[3] = ts->
gp_paint !=
nullptr ?
3946 input_sample_values[7] = ts->
vpaint !=
nullptr ?
3949 input_sample_values[8] = ts->
wpaint !=
nullptr ?
3953 int unified_value = 1;
3954 for (
int i = 0; i < 9; i++) {
3955 if (input_sample_values[i] != 1) {
3956 if (unified_value == 1) {
3957 unified_value = input_sample_values[i];
3972 brush->input_samples = 1;
3978 if (scene->ed !=
nullptr) {
3999 md->persistent_uid = uid++;
4008 if (brush->gpencil_settings && (brush->gpencil_settings->sculpt_flag &
BRUSH_DIR_IN) != 0) {
4027 for (
Layer *layer : grease_pencil->layers_for_write()) {
4041 scene->r.motion_blur_position = order_conversion[std::clamp(cposition, 0, 2)];
4047 scene->r.motion_blur_position = scene->eevee.motion_blur_position_deprecated;
4048 scene->r.motion_blur_shutter = scene->eevee.motion_blur_shutter_deprecated;
4054 constexpr int NTREE_EXECUTION_MODE_CPU = 0;
4055 constexpr int NTREE_EXECUTION_MODE_FULL_FRAME = 1;
4057 constexpr int NTREE_COM_GROUPNODE_BUFFER = 1 << 3;
4058 constexpr int NTREE_COM_OPENCL = 1 << 1;
4065 ntree->flag &= ~(NTREE_COM_GROUPNODE_BUFFER | NTREE_COM_OPENCL);
4067 if (ntree->execution_mode == NTREE_EXECUTION_MODE_FULL_FRAME) {
4068 ntree->execution_mode = NTREE_EXECUTION_MODE_CPU;
4075 if (!DNA_struct_member_exists(fd->
filesdna,
"SpaceImage",
"float",
"stretch_opacity")) {
4099 settings->curve_radius = 0.01f;
4106 light->shadow_filter_radius = 1.0f;
4111 const float default_snap_angle_increment =
DEG2RADF(5.0f);
4112 const float default_snap_angle_increment_precision =
DEG2RADF(1.0f);
4114 scene->toolsettings->snap_angle_increment_2d = default_snap_angle_increment;
4115 scene->toolsettings->snap_angle_increment_3d = default_snap_angle_increment;
4116 scene->toolsettings->snap_angle_increment_2d_precision =
4117 default_snap_angle_increment_precision;
4118 scene->toolsettings->snap_angle_increment_3d_precision =
4119 default_snap_angle_increment_precision;
4124 if (!DNA_struct_member_exists(fd->
filesdna,
"SceneEEVEE",
"int",
"gtao_resolution")) {
4126 scene->eevee.gtao_resolution = 2;
4138 if (scene->ed !=
nullptr) {
4147 mpath->color_post[0] = 0.1f;
4148 mpath->color_post[1] = 1.0f;
4149 mpath->color_post[2] = 0.1f;
4156 mpath->color_post[0] = 0.1f;
4157 mpath->color_post[1] = 1.0f;
4158 mpath->color_post[2] = 0.1f;
4165 if (!DNA_struct_member_exists(fd->
filesdna,
"Light",
"float",
"transmission_fac")) {
4169 light->transmission_fac = 0.0f;
4181 scene->eevee.clamp_surface_indirect = 10.0f;
4184 scene->eevee.clamp_volume_indirect = 1e-8f;
4202 if (scene->ed !=
nullptr) {
4221 if (!DNA_struct_member_exists(fd->
filesdna,
"Material",
"char",
"thickness_mode")) {
4256 const float size_factor = 3.0f / 2.0f;
4257 blur_data.
sizex *= size_factor;
4258 blur_data.
sizey *= size_factor;
4267 if (!DNA_struct_member_exists(fd->
filesdna,
"SceneEEVEE",
"float",
"shadow_resolution_scale"))
4278 if (scene->ed !=
nullptr) {
4297 if (scene->ed !=
nullptr) {
4318 if (scene->nodetree) {
4328 lightprobe->grid_surfel_density =
max_ii(20,
4329 2 *
max_iii(lightprobe->grid_resolution_x,
4330 lightprobe->grid_resolution_y,
4331 lightprobe->grid_resolution_z));
4336 bool only_uses_eevee_legacy_or_workbench =
true;
4339 only_uses_eevee_legacy_or_workbench =
false;
4344 if (
world->nodetree) {
4349 if (volume_input_socket) {
4351 if (node_link->tonode == output_node && node_link->tosock == volume_input_socket) {
4354 if (only_uses_eevee_legacy_or_workbench) {
4357 RPT_(
"%s contains a volume shader that might need to be "
4358 "converted to object (see world volume panel)\n"),
4359 world->id.name + 2);
4370 constexpr int NTREE_EXECUTION_MODE_GPU = 2;
4373 if (scene->nodetree) {
4374 if (scene->nodetree->execution_mode == NTREE_EXECUTION_MODE_GPU) {
4377 scene->r.compositor_precision = scene->nodetree->precision;
4383 float shadow_max_res_sun = 0.001f;
4384 float shadow_max_res_local = 0.001f;
4385 bool shadow_resolution_absolute =
false;
4388 shadow_max_res_local = (2.0f *
M_SQRT2) / scene->eevee.shadow_cube_size_deprecated;
4390 shadow_max_res_local =
ceil(shadow_max_res_local * 1000.0f) / 1000.0f;
4391 shadow_resolution_absolute =
true;
4396 if (light->type ==
LA_SUN) {
4398 light->shadow_maximum_resolution = shadow_max_res_sun;
4402 light->shadow_maximum_resolution = shadow_max_res_local;
4411 if (brush->gpencil_settings) {
4415 brush->unprojected_radius = brush->size *
4512 pchan->custom_shape_wire_width = 1.0;
4545 storage->
capture_items = MEM_cnew_array<NodeGeometryAttributeCaptureItem>(
4584 curve_mapping.
cur = 3;
4635 if (scene->eevee.gi_cubemap_resolution < 128) {
4636 scene->eevee.gi_cubemap_resolution = 128;
4645 bool transparent_shadows = material->blend_shadow !=
MA_BS_SOLID;
4649 mat->surface_render_method = (mat->blend_method ==
MA_BM_BLEND) ?
4660 brush->alpha = settings->draw_strength;
4665 settings->simplify_px = settings->simplify_f /
4673 scene->view_settings.temperature = 6500.0f;
4674 scene->view_settings.tint = 10.0f;
4713 curves->geometry.attributes_active_index =
curves->attributes_active_index_legacy;
4772 const bool first_save_as_render = first_input_storage->
save_as_render;
4773 bool all_inputs_have_same_save_as_render =
true;
4777 if (
bool(input_storage->
save_as_render) != first_save_as_render) {
4778 all_inputs_have_same_save_as_render =
false;
4785 if (all_inputs_have_same_save_as_render) {
4813 const ListBase *exporters = &collection->exporters;
4832 if (
tree->default_group_node_width == 0) {
4845 if (region !=
nullptr) {
4860 if (region !=
nullptr) {
4933 STRNCPY(tref->idname,
"builtin.select_box");
4944 STRNCPY(tref->idname,
"builtin.brush");
Functions and classes to work with Actions.
Functionality to iterate an Action in various ways.
C++ functions to deal with Armature collections (i.e. the successor of bone layers).
void ANIM_bonecoll_hide(bArmature *armature, BoneCollection *bcoll)
bool ANIM_armature_bonecoll_assign(BoneCollection *bcoll, Bone *bone)
BoneCollection * ANIM_armature_bonecoll_new(bArmature *armature, const char *name, int parent_index=-1)
AnimData * BKE_animdata_from_id(const ID *id)
void BKE_animdata_fix_paths_rename(struct ID *owner_id, struct AnimData *adt, struct ID *ref_id, const char *prefix, const char *oldName, const char *newName, int oldSubscript, int newSubscript, bool verify_paths)
bool BKE_animdata_fix_paths_remove(struct ID *id, const char *prefix)
void BKE_pose_ensure(Main *bmain, Object *ob, bArmature *arm, bool do_id_user)
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_SCULPT_GREASE_PENCIL
@ CTX_MODE_WEIGHT_GREASE_PENCIL
@ CTX_MODE_VERTEX_GREASE_PENCIL
short BKE_curve_type_get(const Curve *cu)
CustomData interface, see also DNA_customdata_types.h.
void * CustomData_get_layer_named_for_write(CustomData *data, eCustomDataType type, blender::StringRef name, int totelem)
int CustomData_get_named_layer_index(const CustomData *data, eCustomDataType type, blender::StringRef name)
struct EffectorWeights * BKE_effector_add_weights(struct Collection *collection)
Low-level operations for grease pencil.
void IDP_AssignString(IDProperty *prop, const char *st) ATTR_NONNULL()
IDProperty * IDP_GetPropertyFromGroup(const IDProperty *prop, const char *name) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
void IDP_FreeProperty(IDProperty *prop)
IDProperty * IDP_CopyProperty_ex(const IDProperty *prop, int flag) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
IDProperty * IDP_GetProperties(ID *id) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
#define FOREACH_MAIN_ID_END
#define MAIN_VERSION_FILE_ATLEAST(main, ver, subver)
#define FOREACH_MAIN_ID_BEGIN(_bmain, _id)
General operations, lookup, etc. for materials.
struct Material * BKE_object_material_get(struct Object *ob, short act)
short * BKE_object_material_len_p(struct Object *ob)
void BKE_mesh_legacy_convert_uvs_to_generic(Mesh *mesh)
void BKE_mesh_legacy_edge_crease_to_layers(Mesh *mesh)
void BKE_mesh_legacy_face_set_to_generic(Mesh *mesh)
void BKE_mesh_legacy_sharp_faces_from_flags(Mesh *mesh)
void BKE_mesh_legacy_convert_edges_to_generic(Mesh *mesh)
void BKE_mesh_legacy_bevel_weight_to_generic(Mesh *mesh)
void BKE_mesh_legacy_face_map_to_generic(Main *bmain)
void BKE_mesh_legacy_convert_loops_to_corners(Mesh *mesh)
void BKE_mesh_legacy_convert_verts_to_positions(Mesh *mesh)
void BKE_mesh_legacy_convert_flags_to_hide_layers(Mesh *mesh)
void BKE_mesh_legacy_bevel_weight_to_layers(Mesh *mesh)
void BKE_mesh_legacy_crease_to_generic(Mesh *mesh)
void BKE_mesh_legacy_convert_flags_to_selection_layers(Mesh *mesh)
void BKE_mesh_legacy_convert_polys_to_offsets(Mesh *mesh)
void BKE_mesh_legacy_uv_seam_from_flags(Mesh *mesh)
void BKE_mesh_legacy_convert_mpoly_to_material_indices(Mesh *mesh)
void BKE_mesh_legacy_sharp_edges_from_flags(Mesh *mesh)
void BKE_mesh_legacy_attribute_flags_to_strings(Mesh *mesh)
void BKE_nla_tweakmode_exit(OwnedAnimData owned_adt)
#define SH_NODE_TEX_NOISE
#define SH_NODE_MIX_SHADER
#define GEO_NODE_OBJECT_INFO
#define FN_NODE_SEPARATE_TRANSFORM
#define GEO_NODE_STORE_NAMED_ATTRIBUTE
#define SH_NODE_OUTPUT_WORLD
#define FN_NODE_ROTATE_ROTATION
#define GEO_NODE_SAMPLE_NEAREST_SURFACE
#define GEO_NODE_EVALUATE_AT_INDEX
constexpr int GROUP_NODE_DEFAULT_WIDTH
#define SH_NODE_BSDF_PRINCIPLED
#define GEO_NODE_SET_SHADE_SMOOTH
#define CMP_NODE_CRYPTOMATTE
#define GEO_NODE_ATTRIBUTE_STATISTIC
#define SH_NODE_BSDF_SHEEN
#define SH_NODE_ADD_SHADER
#define SH_NODE_SUBSURFACE_SCATTERING
#define CMP_NODE_COLORBALANCE
#define SH_NODE_TEX_COORD
#define CMP_NODE_HUECORRECT
#define GEO_NODE_INPUT_NAMED_ATTRIBUTE
#define SH_NODE_BSDF_TRANSPARENT
#define SH_NODE_VECT_TRANSFORM
#define GEO_NODE_SIMULATION_OUTPUT
#define GEO_NODE_EVALUATE_ON_DOMAIN
#define SH_NODE_OUTPUT_MATERIAL
#define CMP_NODE_OUTPUT_FILE
#define FOREACH_NODETREE_END
#define SH_NODE_BSDF_HAIR_PRINCIPLED
#define CMP_NODE_CURVE_RGB
#define SH_NODE_BSDF_GLOSSY
#define GEO_NODE_ACCUMULATE_FIELD
#define GEO_NODE_SAMPLE_CURVE
#define SH_NODE_TEX_MUSGRAVE_DEPRECATED
#define CMP_NODE_PIXELATE
#define FN_NODE_COMBINE_TRANSFORM
#define GEO_NODE_SAMPLE_UV_SURFACE
#define SH_NODE_EEVEE_SPECULAR
#define GEO_NODE_CAPTURE_ATTRIBUTE
#define CMP_NODE_SPLITVIEWER__DEPRECATED
#define FOREACH_NODETREE_BEGIN(bmain, _nodetree, _id)
#define SH_NODE_BSDF_GLASS
#define GEO_NODE_BLUR_ATTRIBUTE
#define CMP_NODE_R_LAYERS
#define SH_NODE_NEW_GEOMETRY
#define GEO_NODE_SAMPLE_INDEX
#define SH_NODE_BSDF_GLOSSY_LEGACY
#define SH_NODE_BSDF_REFRACTION
void BKE_paint_brushes_set_default_references(ToolSettings *ts)
void BKE_scene_disable_color_management(Scene *scene)
ARegion * BKE_area_find_region_type(const ScrArea *area, int region_type)
struct MovieTrackingObject * BKE_tracking_object_get_camera(const struct MovieTracking *tracking)
struct MovieTrackingObject * BKE_tracking_object_get_active(const struct MovieTracking *tracking)
#define BLI_assert_msg(a, msg)
BLI_INLINE bool BLI_listbase_is_empty(const struct ListBase *lb)
#define LISTBASE_FOREACH(type, var, list)
#define LISTBASE_FOREACH_MUTABLE(type, var, list)
BLI_INLINE void BLI_listbase_clear(struct ListBase *lb)
void * BLI_findlink(const struct ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
#define LISTBASE_FOREACH_INDEX(type, var, list, index_var)
void void BLI_freelistN(struct ListBase *listbase) ATTR_NONNULL(1)
#define LISTBASE_FOREACH_BACKWARD_MUTABLE(type, var, list)
int BLI_listbase_count(const struct ListBase *listbase) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
MINLINE float max_ff(float a, float b)
MINLINE float min_ff(float a, float b)
MINLINE int max_ii(int a, int b)
MINLINE int max_iii(int a, int b, int c)
MINLINE void copy_v4_v4(float r[4], const float a[4])
MINLINE void copy_v3_v3(float r[3], const float a[3])
void interp_v4_v4v4(float r[4], const float a[4], const float b[4], float t)
MINLINE void copy_v3_fl(float r[3], float f)
MINLINE void copy_v2_fl(float r[2], float f)
char * BLI_sprintfN(const char *__restrict format,...) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1) ATTR_MALLOC ATTR_PRINTF_FORMAT(1
char * BLI_strdup(const char *str) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1) ATTR_MALLOC
#define STRNCPY(dst, src)
#define SNPRINTF(dst, format,...)
char * BLI_strdup_null(const char *str) ATTR_WARN_UNUSED_RESULT ATTR_MALLOC
char char size_t char * BLI_strncat(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy) ATTR_NONNULL(1
size_t BLI_str_escape(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy) ATTR_NONNULL(1
#define SET_FLAG_FROM_TEST(value, test, flag)
void BLO_reportf_wrap(BlendFileReadReport *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
external readfile function prototypes.
#define ID_IS_LINKED(_id)
@ BRUSH_CURVES_SCULPT_FLAG_INTERPOLATE_RADIUS
Object groups, one object can be in many groups at once.
@ CONSTRAINT_TYPE_ROTLIMIT
@ LIMIT_ROT_LEGACY_BEHAVIOR
#define DNA_struct_default_get(struct_name)
blenloader genfile private function prototypes
@ LIGHTPROBE_GRID_CAPTURE_EMISSION
@ LIGHTPROBE_GRID_CAPTURE_WORLD
@ LIGHTPROBE_GRID_CAPTURE_INDIRECT
@ MA_BL_TRANSPARENT_SHADOW
@ MA_BL_THICKNESS_FROM_SHADOW
@ MA_SURFACE_METHOD_DEFERRED
@ MA_SURFACE_METHOD_FORWARD
@ ME_NO_OVERLAPPING_TOPOLOGY
@ NODES_MODIFIER_BAKE_TARGET_INHERIT
@ NODES_MODIFIER_BAKE_TARGET_DISK
@ NODES_MODIFIER_PANEL_WARNINGS
@ eModifierType_WeightVGEdit
@ NODE_INTERFACE_PANEL_ALLOW_CHILD_PANELS
@ NODE_INTERFACE_PANEL_ALLOW_SOCKETS_AFTER_PANELS
@ NODE_INTERFACE_SOCKET_OUTPUT
@ NODE_INTERFACE_SOCKET_HIDE_IN_MODIFIER
@ NODE_INTERFACE_SOCKET_INPUT
@ NODE_INTERFACE_SOCKET_HIDE_VALUE
@ NODE_VECTOR_MATH_ABSOLUTE
#define SHD_SHEEN_ASHIKHMIN
@ SHD_NOISE_RIDGED_MULTIFRACTAL
@ SHD_NOISE_HETERO_TERRAIN
@ GEO_NODE_ASSET_MODIFIER
@ CMP_NODE_CRYPTOMATTE_SOURCE_RENDER
@ SHD_PRINCIPLED_HAIR_CHIANG
@ CMP_NODE_MAP_UV_FILTERING_ANISOTROPIC
@ SHD_GLOSSY_SHARP_DEPRECATED
@ SHD_VECT_TRANSFORM_TYPE_NORMAL
@ SCE_EEVEE_FAST_GI_ENABLED
@ SCE_EEVEE_VOLUME_CUSTOM_RANGE
@ SCE_EEVEE_MOTION_BLUR_ENABLED_DEPRECATED
@ RAYTRACE_EEVEE_METHOD_SCREEN
@ R_IMF_IMTYPE_MULTILAYER
@ SEQ_SNAP_TO_PREVIEW_CENTER
@ SEQ_SNAP_TO_STRIPS_PREVIEW
@ SEQ_SNAP_TO_PREVIEW_BORDERS
@ RAYTRACE_EEVEE_USE_DENOISE
#define SCE_SNAP_TO_VERTEX
@ SCE_COMPOSITOR_DEVICE_GPU
@ RAYTRACE_EEVEE_DENOISE_BILATERAL
@ RAYTRACE_EEVEE_DENOISE_SPATIAL
@ RAYTRACE_EEVEE_DENOISE_TEMPORAL
@ SCE_SNAP_INDIVIDUAL_NEAREST
@ SCE_SNAP_INDIVIDUAL_PROJECT
@ SCE_SNAP_TO_EDGE_MIDPOINT
@ SCE_SNAP_TO_EDGE_PERPENDICULAR
@ RGN_ALIGN_HIDE_WITH_PREV
@ RGN_FLAG_NO_USER_RESIZE
@ RGN_TYPE_ASSET_SHELF_HEADER
@ seqModifierType_HueCorrect
@ SEQ_EDIT_SHOW_MISSING_MEDIA
@ SEQ_TRANSFORM_FILTER_AUTO
@ SEQ_TRANSFORM_FILTER_BILINEAR
@ SN_OVERLAY_SHOW_PREVIEWS
@ SN_OVERLAY_SHOW_REROUTE_AUTO_LABELS
@ SEQ_TIMELINE_SHOW_STRIP_RETIMING
@ SEQ_CACHE_SHOW_FINAL_OUT
#define USER_EXPERIMENTAL_TEST(userdef, member)
@ V2D_VIEWSYNC_SCREEN_TIME
@ V3D_SHOW_CAMERA_PASSEPARTOUT
@ WO_USE_EEVEE_FINITE_VOLUME
@ LIGHT_PROBE_RESOLUTION_1024
in reality light always falls off quadratically Particle Retrieve the data of the particle that spawned the object for example to give variation to multiple instances of an object Point Retrieve information about points in a point cloud Retrieve the edges of an object as it appears to Cycles topology will always appear triangulated Convert a blackbody temperature to an RGB value Normal Generate a perturbed normal from an RGB normal map image Typically used for faking highly detailed surfaces Generate an OSL shader from a file or text data block Image Sample an image file as a texture Gabor Generate Gabor noise Gradient Generate interpolated color and intensity values based on the input vector Magic Generate a psychedelic color texture Voronoi Generate Worley noise based on the distance to random points Typically used to generate textures such as or biological cells Brick Generate a procedural texture producing bricks Texture Retrieve multiple types of texture coordinates nTypically used as inputs for texture nodes Vector Convert a or normal between world
in reality light always falls off quadratically Particle Retrieve the data of the particle that spawned the object for example to give variation to multiple instances of an object Point Retrieve information about points in a point cloud Retrieve the edges of an object as it appears to Cycles topology will always appear triangulated Convert a blackbody temperature to an RGB value Normal Generate a perturbed normal from an RGB normal map image Typically used for faking highly detailed surfaces Generate an OSL shader from a file or text data block Image Sample an image file as a texture Gabor Generate Gabor noise Gradient Generate interpolated color and intensity values based on the input vector Magic Generate a psychedelic color texture Voronoi Generate Worley noise based on the distance to random points Typically used to generate textures such as or biological cells Brick Generate a procedural texture producing bricks Texture Retrieve multiple types of texture coordinates nTypically used as inputs for texture nodes Vector Convert a or normal between camera
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Brightness Control the brightness and contrast of the input color Vector Map input vector components with curves Camera Retrieve information about the camera and how it relates to the current shading point s position Clamp a value between a minimum and a maximum Vector Perform vector math operation Invert Invert a producing a negative Combine Generate a color from its and blue Hue Saturation Apply a color transformation in the HSV color model Specular Similar to the Principled BSDF node but uses the specular workflow instead of metallic
SIMD_FORCE_INLINE btVector3 transform(const btVector3 &point) const
static T sum(const btAlignedObjectArray< T > &items)
Span< Value > lookup(const Key &key) const
void add(const Key &key, const Value &value)
constexpr IndexRange index_range() const
constexpr bool is_empty() const
const Value * lookup_ptr(const Key &key) const
Value & lookup_or_add_default(const Key &key)
bool add(const Key &key, const Value &value)
const Value & lookup(const Key &key) const
ValueIterator values() const
void add_new(const Key &key, const Value &value)
ItemIterator items() const
constexpr T * data() const
constexpr MutableSpan drop_front(const int64_t n) const
constexpr MutableSpan take_front(const int64_t n) const
constexpr int64_t size() const
constexpr bool startswith(StringRef prefix) const
constexpr bool endswith(StringRef suffix) const
constexpr const char * data() const
constexpr const char * c_str() const
constexpr StringRef drop_known_prefix(StringRef prefix) const
void append(const T &value)
const Slot * slot(int64_t index) const
bool is_action_layered() const
void slot_name_set(Main &bmain, Slot &slot, StringRefNull new_name)
Layer & layer_add(std::optional< StringRefNull > name)
std::string name_prefix_for_idtype() const
StringRefNull name_without_prefix() const
const T & data(const Action &owning_action) const
MutableSpan< float > radii_for_write()
local_group_size(16, 16) .push_constant(Type b
draw_view in_light_buf[] float
void SEQ_for_each_callback(ListBase *seqbase, SeqForEachFunc callback, void *user_data)
void *(* MEM_malloc_arrayN)(size_t len, size_t size, const char *str)
void MEM_freeN(void *vmemh)
void *(* MEM_dupallocN)(const void *vmemh)
ccl_device_inline float3 ceil(const float3 a)
bool foreach_action_slot_use_with_references(ID &animated_id, FunctionRef< bool(bAction *&action_ptr_ref, slot_handle_t &slot_handle_ref, char *slot_name)> callback)
static void ANIM_armature_foreach_bone(ListBase *bones, CB callback)
ActionSlotAssignmentResult generic_assign_action_slot(Slot *slot_to_assign, ID &animated_id, bAction *&action_ptr_ref, slot_handle_t &slot_handle_ref, char *slot_name) ATTR_WARN_UNUSED_RESULT
decltype(::ActionSlot::handle) slot_handle_t
ActionSlotAssignmentResult
constexpr float LEGACY_RADIUS_CONVERSION_FACTOR
void node_modify_socket_type_static(bNodeTree *ntree, bNode *node, bNodeSocket *sock, int type, int subtype)
void mesh_sculpt_mask_to_generic(Mesh &mesh)
bNode * node_add_static_node(const bContext *C, bNodeTree *ntree, int type)
FileHandlerType * file_handler_find(StringRef idname)
bNodeLink * node_add_link(bNodeTree *ntree, bNode *fromnode, bNodeSocket *fromsock, bNode *tonode, bNodeSocket *tosock)
bNodeSocket * node_add_static_socket(bNodeTree *ntree, bNode *node, eNodeSocketInOut in_out, int type, int subtype, const char *identifier, const char *name)
bNode * node_add_node(const bContext *C, bNodeTree *ntree, const char *idname)
void node_remove_socket(bNodeTree *ntree, bNode *node, bNodeSocket *sock)
void node_remove_link(bNodeTree *ntree, bNodeLink *link)
bNodeSocket * node_find_socket(bNode *node, eNodeSocketInOut in_out, StringRef identifier)
void parallel_for(const IndexRange range, const int64_t grain_size, const Function &function, const TaskSizeHints &size_hints=detail::TaskSizeHints_Static(1))
float wrap(float value, float max, float min)
const char * RE_engine_id_CYCLES
const char * RE_engine_id_BLENDER_EEVEE_NEXT
const char * RE_engine_id_BLENDER_WORKBENCH
const char * RE_engine_id_BLENDER_EEVEE
SequencerToolSettings * SEQ_tool_settings_ensure(Scene *scene)
Editing * SEQ_editing_get(const Scene *scene)
closure color sheen(normal N, float roughness) BUILTIN
MutableSpan< SeqRetimingKey > SEQ_retiming_keys_get(const Sequence *seq)
int SEQ_retiming_keys_count(const Sequence *seq)
bool SEQ_retiming_is_allowed(const Sequence *seq)
void SEQ_retiming_data_ensure(Sequence *seq)
void SEQ_time_right_handle_frame_set(const Scene *scene, Sequence *seq, int timeline_frame)
int SEQ_time_left_handle_frame_get(const Scene *, const Sequence *seq)
struct FCurve ** fcurve_array
struct bActionGroup ** group_array
blender::animrig::slot_handle_t * slot_handle
bAction ** action_ptr_ptr
static AlphaSource alpha_source(bNodeSocket *fac, bool inverted=false)
bool is_fully_transparent() const
bool is_transparent() const
static AlphaSource opaque()
bool is_semi_transparent() const
@ ALPHA_FULLY_TRANSPARENT
static AlphaSource mix(const AlphaSource &a, const AlphaSource &b, bNodeSocket *fac)
static AlphaSource fully_transparent(bNodeSocket *socket=nullptr, bool inverted=false)
static AlphaSource complex_alpha()
static AlphaSource add(const AlphaSource &a, const AlphaSource &b)
AssetLibraryReference asset_library_reference
AssetShelfSettings settings
short preferred_row_count
char edge_weight_name[64]
char vertex_weight_name[64]
struct BlendFileReadReport::@021165340246256112273314140153222370140145060352 count
float automasking_view_normal_limit
float automasking_start_normal_limit
float automasking_start_normal_falloff
float automasking_view_normal_falloff
float central_cylindrical_range_v_min
float fisheye_polynomial_k3
float central_cylindrical_range_u_min
float fisheye_polynomial_k1
float central_cylindrical_range_u_max
float fisheye_polynomial_k2
float central_cylindrical_radius
float fisheye_polynomial_k0
float fisheye_polynomial_k4
float central_cylindrical_range_v_max
BlendFileReadReport * reports
struct CurveMapping curve_mapping
float shadow_jitter_overblur
struct bNodeTree * nodetree
struct MovieTracking tracking
MovieTrackingPlaneTrack * active_plane_track
MovieTrackingReconstruction reconstruction
MovieTrackingTrack * active_track
struct MovieReconstructedCamera * cameras
MovieTrackingPlaneTrack * act_plane_track_legacy
MovieTrackingReconstruction reconstruction_legacy
ListBase plane_tracks_legacy
MovieTrackingTrack * act_track_legacy
NodeGeometryAttributeCaptureItem * capture_items
int num_input_samples_deprecated
AssetShelf * active_shelf
struct ImageFormatData im_format
float fast_gi_thickness_near
float shadow_resolution_scale
float fast_gi_thickness_far
int automasking_boundary_edges_propagation_steps
struct SequencerCacheOverlay cache_overlay
struct SequencerTimelineOverlay timeline_overlay
struct CurveMapping * strength_curve
float gpencil_grid_color[3]
float gpencil_grid_scale[2]
float gpencil_grid_offset[2]
int gpencil_grid_subdivisions
float sun_shadow_maximum_resolution
float sun_shadow_filter_radius
struct ActionChannelBag * channel_bag
bNodeSocketRuntimeHandle * runtime
char * default_attribute_name
bNodeTreeInterfaceItem ** items_array
bNodeTreeInterfaceItem item
char * default_attribute_name
bNodeTreeInterfacePanel root_panel
bNodeTreeInterface tree_interface
char label[OP_MAX_TYPENAME]
static bNode * add_node(const bContext *C, bNodeTree *ntree, const int type, const float locx, const float locy)
static void version_principled_bsdf_subsurface(bNodeTree *ntree)
static void versioning_node_hue_correct_set_wrappng(bNodeTree *ntree)
static void versioning_eevee_material_shadow_none(Material *material)
static void versioning_remove_microfacet_sharp_distribution(bNodeTree *ntree)
static void version_replace_velvet_sheen_node(bNodeTree *ntree)
static bool versioning_eevee_material_blend_mode_settings(bNodeTree *ntree, float threshold)
static void versioning_nodes_dynamic_sockets_2(bNodeTree &ntree)
static bool seq_text_data_update(Sequence *seq, void *)
static void versioning_replace_musgrave_texture_node(bNodeTree *ntree)
static void version_principled_bsdf_emission(bNodeTree *ntree)
void do_versions_after_linking_400(FileData *fd, Main *bmain)
static void version_nla_tweakmode_incomplete(Main *bmain)
static void version_socket_identifier_suffixes_for_dynamic_types(ListBase sockets, const char *separator, const std::optional< int > total=std::nullopt)
static void version_bonecollection_anim(FCurve *fcurve)
static void image_settings_avi_to_ffmpeg(Scene *scene)
static void version_node_group_split_socket(bNodeTreeInterface &tree_interface, bNodeTreeInterfaceSocket &socket, bNodeTreeInterfacePanel *parent, int position)
static void update_paint_modes_for_brush_assets(Main &bmain)
static void versioning_fix_socket_subtype_idnames(bNodeTree *ntree)
static void version_principled_bsdf_specular_tint(bNodeTree *ntree)
static void convert_grease_pencil_stroke_hardness_to_softness(GreasePencil *grease_pencil)
static bool versioning_convert_strip_speed_factor(Sequence *seq, void *user_data)
static bool seq_proxies_timecode_update(Sequence *seq, void *)
static void version_principled_bsdf_update_animdata(ID *owner_id, bNodeTree *ntree)
static void version_composite_nodetree_null_id(bNodeTree *ntree, Scene *scene)
static void fix_geometry_nodes_object_info_scale(bNodeTree &ntree)
static void version_bonelayers_to_bonecollections(Main *bmain)
static bool all_scenes_use(Main *bmain, const blender::Span< const char * > engines)
static void versioning_replace_legacy_glossy_node(bNodeTree *ntree)
static void add_image_editor_asset_shelf(Main &bmain)
static void change_input_socket_to_rotation_type(bNodeTree &ntree, bNode &node, bNodeSocket &socket)
static void version_vertex_weight_edit_preserve_threshold_exclusivity(Main *bmain)
static void version_principled_transmission_roughness(bNodeTree *ntree)
static bool seq_filter_bilinear_to_auto(Sequence *seq, void *)
static void version_principled_bsdf_rename_sockets(bNodeTree *ntree)
static bNodeTreeInterfaceItem * legacy_socket_move_to_interface(bNodeSocket &legacy_socket, const eNodeSocketInOut in_out)
static void version_legacy_actions_to_layered(Main *bmain)
static void version_replace_texcoord_normal_socket(bNodeTree *ntree)
static blender::StringRef legacy_socket_idname_to_socket_type(blender::StringRef idname)
static void versioning_node_group_sort_sockets_recursive(bNodeTreeInterfacePanel &panel)
static void versioning_update_noise_texture_node(bNodeTree *ntree)
static void hide_simulation_node_skip_socket_value(Main &bmain)
static void version_movieclips_legacy_camera_object(Main *bmain)
static void hue_correct_set_wrapping(CurveMapping *curve_mapping)
static void version_copy_socket(bNodeTreeInterfaceSocket &dst, const bNodeTreeInterfaceSocket &src, char *identifier)
static void version_principled_bsdf_coat(bNodeTree *ntree)
static void add_bevel_modifier_attribute_name_defaults(Main &bmain)
static AlphaSource versioning_eevee_alpha_source_get(bNodeSocket *socket, int depth=0)
static void enable_geometry_nodes_is_modifier(Main &bmain)
static void version_nodes_insert_item(bNodeTreeInterfacePanel &parent, bNodeTreeInterfaceSocket &socket, int position)
static void version_refraction_depth_to_thickness_value(bNodeTree *ntree, float thickness)
static void version_motion_tracking_legacy_camera_object(MovieClip &movieclip)
static void versioning_convert_node_tree_socket_lists_to_interface(bNodeTree *ntree)
void blo_do_versions_400(FileData *fd, Library *, Main *bmain)
static void node_reroute_add_storage(bNodeTree &tree)
static void fix_built_in_curve_attribute_defaults(Main *bmain)
static bool seq_hue_correct_set_wrapping(Sequence *seq, void *)
static void versioning_replace_splitviewer(bNodeTree *ntree)
static void change_output_socket_to_rotation_type(bNodeTree &ntree, bNode &node, bNodeSocket &socket)
static void version_replace_principled_hair_model(bNodeTree *ntree)
static void versioning_eevee_shadow_settings(Object *object)
static void version_principled_bsdf_sheen(bNodeTree *ntree)
static void versioning_update_timecode(short int *tc)
static void version_mesh_legacy_to_struct_of_array_format(Mesh &mesh)
static void version_geometry_nodes_use_rotation_socket(bNodeTree &ntree)
static void convert_action_in_place(blender::animrig::Action &action)
static void versioning_nodes_dynamic_sockets(bNodeTree &ntree)
static int version_nodes_find_valid_insert_position_for_item(const bNodeTreeInterfacePanel &panel, const bNodeTreeInterfaceItem &item, const int initial_pos)
static void version_bonegroups_to_bonecollections(Main *bmain)
static void version_mesh_crease_generic(Main &bmain)
static void version_bonegroup_migrate_color(Main *bmain)
static void versioning_grease_pencil_stroke_radii_scaling(GreasePencil *grease_pencil)
bNode * version_eevee_output_node_get(bNodeTree *ntree, int16_t node_type)
float * version_cycles_node_socket_float_value(bNodeSocket *socket)
IDProperty * version_cycles_properties_from_ID(ID *id)
int version_cycles_property_int(IDProperty *idprop, const char *name, int default_value)
ARegion * do_versions_add_region_if_not_found(ListBase *regionbase, int region_type, const char *allocname, int link_after_region_type)
bNodeSocket & version_node_add_socket(bNodeTree &ntree, bNode &node, const eNodeSocketInOut in_out, const char *idname, const char *identifier)
void version_update_node_input(bNodeTree *ntree, FunctionRef< bool(bNode *)> check_node, const char *socket_identifier, FunctionRef< void(bNode *, bNodeSocket *)> update_input, FunctionRef< void(bNode *, bNodeSocket *, bNode *, bNodeSocket *)> update_input_link)
float * version_cycles_node_socket_rgba_value(bNodeSocket *socket)
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)
void version_node_input_socket_name(bNodeTree *ntree, const int node_type, const char *old_name, const char *new_name)
bNode & version_node_add_empty(bNodeTree &ntree, const char *idname)
void version_node_socket_name(bNodeTree *ntree, const int node_type, const char *old_name, const char *new_name)
bool version_cycles_property_boolean(IDProperty *idprop, const char *name, bool default_value)
void version_socket_update_is_used(bNodeTree *ntree)
bNodeLink & version_node_add_link(bNodeTree &ntree, bNode &node_a, bNodeSocket &socket_a, bNode &node_b, bNodeSocket &socket_b)
float version_cycles_property_float(IDProperty *idprop, const char *name, float default_value)
void version_node_output_socket_name(bNodeTree *ntree, const int node_type, const char *old_name, const char *new_name)