|
Blender
V2.93
|
#include <float.h>#include <string.h>#include "BLI_listbase.h"#include "BLI_math.h"#include "BLI_string.h"#include "BLI_utildefines.h"#include "DNA_anim_types.h"#include "DNA_camera_types.h"#include "DNA_color_types.h"#include "DNA_light_types.h"#include "DNA_node_types.h"#include "DNA_particle_types.h"#include "BKE_animsys.h"#include "BKE_colortools.h"#include "BKE_idprop.h"#include "BKE_main.h"#include "BKE_node.h"#include "MEM_guardedalloc.h"#include "IMB_colormanagement.h"#include "BLO_readfile.h"#include "readfile.h"Go to the source code of this file.
Classes | |
| struct | MappingNodeFCurveCallbackData |
Macros | |
| #define | DNA_DEPRECATED_ALLOW |
| #define DNA_DEPRECATED_ALLOW |
Definition at line 22 of file versioning_cycles.c.
|
static |
Definition at line 277 of file versioning_cycles.c.
References color_socket, cycles_node_socket_float_value(), ListBase::last, bNodeTree::links, LISTBASE_FOREACH, node, nodeAddLink(), nodeFindSocket(), nodeRemLink(), bNodeTree::nodes, ntree, ntreeUpdateTree(), NULL, bNodeLink::prev, SH_NODE_AMBIENT_OCCLUSION, SHD_AO_LOCAL, SOCK_IN, SOCK_OUT, and bNode::type.
Referenced by do_versions_after_linking_cycles().
Definition at line 1306 of file versioning_cycles.c.
References RenderData::alphamode, cycles_properties_from_ID(), cycles_property_boolean(), cycles_property_float(), RenderData::engine, ListBase::first, FOREACH_NODETREE_BEGIN, FOREACH_NODETREE_END, Scene::id, MAIN_VERSION_ATLEAST, ID::next, ntree, NTREE_SHADER, PART_SHAPE_CLOSE_TIP, Main::particles, Scene::r, R_ADDSKY, R_ALPHAPREMUL, RE_engine_id_CYCLES, scene, Main::scenes, STREQ, bNodeTree::type, update_musgrave_node_color_output(), update_vector_math_node_operators_enum_mapping(), update_voronoi_node_f3_and_f4(), and update_voronoi_node_fac_output().
|
static |
Definition at line 57 of file versioning_cycles.c.
References bNodeSocket::default_value, and bNodeSocketValueFloat::value.
Referenced by ambient_occlusion_node_relink(), displacement_node_insert(), light_emission_node_to_energy(), square_roughness_node_insert(), update_noise_and_wave_distortion(), update_vector_math_node_dot_product_operator(), update_voronoi_node_crackle(), and update_wave_node_directions_and_offset().
|
static |
Definition at line 63 of file versioning_cycles.c.
References bNodeSocket::default_value, and bNodeSocketValueRGBA::value.
Referenced by light_emission_node_to_energy(), and update_vector_math_node_dot_product_operator().
|
static |
Definition at line 69 of file versioning_cycles.c.
References bNodeSocket::default_value, and bNodeSocketValueVector::value.
Referenced by update_mapping_node_inputs_and_properties(), update_vector_math_node_add_and_subtract_operators(), update_vector_math_node_dot_product_operator(), and update_vector_math_node_normalize_operator().
|
static |
Definition at line 75 of file versioning_cycles.c.
References IDP_GetProperties(), IDP_GetPropertyTypeFromGroup(), IDP_GROUP, and NULL.
Referenced by blo_do_versions_cycles(), and do_versions_after_linking_cycles().
|
static |
Definition at line 81 of file versioning_cycles.c.
References ViewLayer::id_properties, IDP_GetPropertyTypeFromGroup(), IDP_GROUP, and NULL.
Referenced by do_versions_after_linking_cycles().
|
static |
Definition at line 112 of file versioning_cycles.c.
References cycles_property_int().
Referenced by blo_do_versions_cycles(), and do_versions_after_linking_cycles().
|
static |
Definition at line 117 of file versioning_cycles.c.
References cycles_property_int_set().
Referenced by do_versions_after_linking_cycles().
|
static |
Definition at line 87 of file versioning_cycles.c.
References IDP_Float, IDP_FLOAT, and IDP_GetPropertyTypeFromGroup().
Referenced by blo_do_versions_cycles(), and do_versions_after_linking_cycles().
|
static |
Definition at line 93 of file versioning_cycles.c.
References IDP_GetPropertyTypeFromGroup(), IDP_Int, and IDP_INT.
Referenced by cycles_property_boolean(), and do_versions_after_linking_cycles().
|
static |
Definition at line 99 of file versioning_cycles.c.
References IDPropertyTemplate::i, IDP_AddToGroup(), IDP_GetPropertyTypeFromGroup(), IDP_Int, IDP_INT, and IDP_New().
Referenced by cycles_property_boolean_set(), and do_versions_after_linking_cycles().
|
static |
Definition at line 122 of file versioning_cycles.c.
References cycles_node_socket_float_value(), bNodeSocket::identifier, ListBase::last, bNodeTree::links, bNode::locx, bNode::locy, node, nodeAddLink(), nodeAddStaticNode(), nodeFindSocket(), nodeRemLink(), ntree, ntreeUpdateTree(), NULL, bNodeLink::prev, SH_NODE_DISPLACEMENT, SH_NODE_OUTPUT_MATERIAL, SOCK_IN, SOCK_OUT, STREQ, and bNode::type.
Referenced by do_versions_after_linking_cycles().
|
static |
Definition at line 171 of file versioning_cycles.c.
References node, SH_NODE_BSDF_PRINCIPLED, SH_NODE_DISPLACEMENT, SHD_SPACE_OBJECT, SHD_SPACE_WORLD, SHD_SUBSURFACE_BURLEY, and SHD_SUBSURFACE_RANDOM_WALK.
Referenced by do_versions_after_linking_cycles().
| void do_versions_after_linking_cycles | ( | Main * | bmain | ) |
Definition at line 1368 of file versioning_cycles.c.
References ambient_occlusion_node_relink(), CAM_DOF_ENABLED, CAM_ORTHO, Main::cameras, cycles_properties_from_ID(), cycles_properties_from_view_layer(), cycles_property_boolean(), cycles_property_boolean_set(), cycles_property_float(), cycles_property_int(), cycles_property_int_set(), DENOISER_NLM, DENOISER_OPTIX, displacement_node_insert(), displacement_principled_nodes(), RenderData::engine, ListBase::first, FOREACH_NODETREE_BEGIN, FOREACH_NODETREE_END, Scene::id, if(), image_node_colorspace(), light_emission_unify(), Main::lights, LISTBASE_FOREACH, MAIN_VERSION_ATLEAST, mapping_node_order_flip(), ID::next, node, bNodeTree::nodes, ntree, NTREE_SHADER, Scene::r, RE_engine_id_CYCLES, scene, Main::scenes, square_roughness_node_insert(), STREQ, bNodeTree::type, update_mapping_node_inputs_and_properties(), update_math_node_single_operand_operators(), update_musgrave_node_dimensions(), update_noise_and_wave_distortion(), update_noise_node_dimensions(), update_vector_math_node_add_and_subtract_operators(), update_vector_math_node_average_operator(), update_vector_math_node_cross_product_operator(), update_vector_math_node_dot_product_operator(), update_vector_math_node_normalize_operator(), update_voronoi_node_coloring(), update_voronoi_node_crackle(), update_voronoi_node_dimensions(), update_voronoi_node_square_distance(), update_wave_node_directions_and_offset(), vector_curve_node_remap(), and Scene::view_layers.
Referenced by do_versions_after_linking().
|
static |
Definition at line 319 of file versioning_cycles.c.
References COLOR_ROLE_DATA, Image::colorspace_settings, if(), IMB_colormanagement_role_colorspace_name_get(), ColorManagedColorspaceSettings::name, node, NULL, SH_NODE_TEX_ENVIRONMENT, SH_NODE_TEX_IMAGE, STRNCPY, and tex.
Referenced by do_versions_after_linking_cycles().
Definition at line 346 of file versioning_cycles.c.
References bNodeTree::adt, color_socket, copy_v3_fl(), copy_v3_v3(), copy_v4_fl(), cycles_node_socket_float_value(), cycles_node_socket_rgba_value(), bNodeSocket::flag, bNodeTree::links, LISTBASE_FOREACH, nodeFindSocket(), Light::nodetree, ntree, ntreeShaderOutputNode(), NULL, SH_NODE_EMISSION, SHD_OUTPUT_CYCLES, SOCK_IN, SOCK_IN_USE, bNode::type, and Light::use_nodes.
Referenced by light_emission_unify().
|
static |
Definition at line 394 of file versioning_cycles.c.
References copy_v3_v3(), Light::energy, LA_SUN, light_emission_node_to_energy(), Light::r, STREQ, Light::type, and Light::use_nodes.
Referenced by do_versions_after_linking_cycles().
|
static |
Definition at line 244 of file versioning_cycles.c.
References EULER_ORDER_XYZ, EULER_ORDER_ZYX, eulO_to_quat(), node, quat_to_eulO(), TexMapping::rot, and SH_NODE_MAPPING.
Referenced by do_versions_after_linking_cycles().
|
static |
Definition at line 185 of file versioning_cycles.c.
References ELEM, node, SH_NODE_BSDF_ANISOTROPIC, SH_NODE_BSDF_GLASS, SH_NODE_BSDF_GLOSSY, and SH_NODE_BSDF_REFRACTION.
Referenced by square_roughness_node_insert().
|
static |
Definition at line 52 of file versioning_cycles.c.
References bNodeSocket::flag, and SOCK_IN_USE.
Referenced by update_noise_and_wave_distortion(), update_vector_math_node_add_and_subtract_operators(), update_vector_math_node_average_operator(), update_vector_math_node_cross_product_operator(), update_vector_math_node_dot_product_operator(), update_vector_math_node_normalize_operator(), update_voronoi_node_crackle(), and update_voronoi_node_square_distance().
|
static |
Definition at line 194 of file versioning_cycles.c.
References cycles_node_socket_float_value(), bNodeSocket::identifier, ListBase::last, bNodeTree::links, LISTBASE_FOREACH, bNode::locx, bNode::locy, max_ff(), node, node_has_roughness(), NODE_MATH_POWER, nodeAddLink(), nodeAddStaticNode(), nodeFindSocket(), nodeRemLink(), bNodeTree::nodes, ntree, ntreeUpdateTree(), NULL, bNodeLink::prev, SH_NODE_MATH, SOCK_IN, sqrtf, and STREQ.
Referenced by do_versions_after_linking_cycles().
|
static |
Definition at line 822 of file versioning_cycles.c.
References BLI_sprintfN(), BLI_str_endswith(), BLI_str_escape(), data, MEM_freeN, FCurve::rna_path, and STRPREFIX.
Referenced by update_mapping_node_inputs_and_properties().
|
static |
Definition at line 877 of file versioning_cycles.c.
References BKE_fcurves_id_cb(), BLI_findlink(), BLI_sprintfN(), BLI_str_escape(), copy_v3_v3(), bNode::custom1, cycles_node_socket_vector_value(), data, TexMapping::flag, bNodeTree::id, bNode::inputs, bNodeTree::links, LISTBASE_FOREACH, LISTBASE_FOREACH_BACKWARD_MUTABLE, TexMapping::loc, bNode::locx, bNode::locy, TexMapping::max, MEM_freeN, TexMapping::min, node, NODE_VECTOR_MATH_MAXIMUM, NODE_VECTOR_MATH_MINIMUM, nodeAddLink(), nodeAddStaticNode(), nodeFindSocket(), nodeRemLink(), bNodeTree::nodes, ntree, ntreeUpdateTree(), NULL, TexMapping::rot, SH_NODE_MAPPING, SH_NODE_VECTOR_MATH, TexMapping::size, SOCK_IN, SOCK_OUT, TEXMAP_CLIP_MAX, TEXMAP_CLIP_MIN, TexMapping::type, and update_mapping_node_fcurve_rna_path_callback().
Referenced by do_versions_after_linking_cycles().
|
static |
Definition at line 432 of file versioning_cycles.c.
References BLI_findlink(), ELEM, bNodeLink::fromnode, bNodeLink::fromsock, bNodeSocket::link, LISTBASE_FOREACH, node, NODE_MATH_ABSOLUTE, NODE_MATH_ARCCOSINE, NODE_MATH_ARCSINE, NODE_MATH_ARCTANGENT, NODE_MATH_CEIL, NODE_MATH_COSINE, NODE_MATH_FLOOR, NODE_MATH_FRACTION, NODE_MATH_ROUND, NODE_MATH_SINE, NODE_MATH_SQRT, NODE_MATH_TANGENT, nodeAddLink(), nodeRemLink(), bNodeTree::nodes, ntree, ntreeUpdateTree(), NULL, and SH_NODE_MATH.
Referenced by do_versions_after_linking_cycles().
|
static |
Definition at line 992 of file versioning_cycles.c.
References bNodeTree::links, LISTBASE_FOREACH, ntree, SH_NODE_TEX_MUSGRAVE, and SOCK_RGBA.
Referenced by blo_do_versions_cycles().
|
static |
Definition at line 978 of file versioning_cycles.c.
References LISTBASE_FOREACH, node, bNodeTree::nodes, ntree, SH_NODE_TEX_MUSGRAVE, and tex.
Referenced by do_versions_after_linking_cycles().
|
static |
Definition at line 1239 of file versioning_cycles.c.
References BLI_findlink(), bNode::custom1, cycles_node_socket_float_value(), ELEM, bNode::flag, bNodeLink::fromnode, bNodeLink::fromsock, bNode::inputs, bNodeSocket::link, LISTBASE_FOREACH, bNode::locx, bNode::locy, node, NODE_HIDDEN, NODE_MATH_MULTIPLY, nodeAddLink(), nodeAddStaticNode(), nodeFindSocket(), nodeRemLink(), bNodeTree::nodes, ntree, ntreeUpdateTree(), NULL, SH_NODE_MATH, SH_NODE_TEX_NOISE, SH_NODE_TEX_WAVE, SOCK_IN, SOCK_OUT, and socket_is_used().
Referenced by do_versions_after_linking_cycles().
|
static |
Definition at line 789 of file versioning_cycles.c.
References LISTBASE_FOREACH, node, bNodeTree::nodes, ntree, SH_NODE_TEX_NOISE, and tex.
Referenced by do_versions_after_linking_cycles().
|
static |
Definition at line 481 of file versioning_cycles.c.
References BLI_findlink(), copy_v3_fl(), bNode::custom1, cycles_node_socket_vector_value(), ELEM, bNode::inputs, bNodeTree::links, LISTBASE_FOREACH, LISTBASE_FOREACH_BACKWARD_MUTABLE, bNode::locx, bNode::locy, node, NODE_VECTOR_MATH_ABSOLUTE, NODE_VECTOR_MATH_ADD, NODE_VECTOR_MATH_DOT_PRODUCT, NODE_VECTOR_MATH_SUBTRACT, nodeAddLink(), nodeAddStaticNode(), nodeFindSocket(), nodeRemLink(), bNodeTree::nodes, ntree, ntreeUpdateTree(), NULL, SH_NODE_VECTOR_MATH, SOCK_OUT, socket_is_used(), and bNode::width.
Referenced by do_versions_after_linking_cycles().
|
static |
Definition at line 724 of file versioning_cycles.c.
References BLI_findlink(), bNode::custom1, bNode::height, bNode::inputs, bNodeTree::links, LISTBASE_FOREACH, LISTBASE_FOREACH_BACKWARD_MUTABLE, bNode::locx, bNode::locy, node, NODE_VECTOR_MATH_ADD, NODE_VECTOR_MATH_LENGTH, NODE_VECTOR_MATH_NORMALIZE, nodeAddLink(), nodeAddStaticNode(), nodeFindSocket(), nodeRemLink(), bNodeTree::nodes, ntree, ntreeUpdateTree(), NULL, SH_NODE_VECTOR_MATH, SOCK_OUT, and socket_is_used().
Referenced by do_versions_after_linking_cycles().
|
static |
Definition at line 572 of file versioning_cycles.c.
References BLI_findlink(), bNode::custom1, bNode::height, bNode::inputs, bNodeTree::links, LISTBASE_FOREACH, LISTBASE_FOREACH_BACKWARD_MUTABLE, bNode::locx, bNode::locy, node, NODE_VECTOR_MATH_CROSS_PRODUCT, NODE_VECTOR_MATH_LENGTH, NODE_VECTOR_MATH_NORMALIZE, nodeAddLink(), nodeAddStaticNode(), nodeFindSocket(), nodeRemLink(), bNodeTree::nodes, ntree, ntreeUpdateTree(), NULL, SH_NODE_VECTOR_MATH, SOCK_OUT, and socket_is_used().
Referenced by do_versions_after_linking_cycles().
|
static |
Definition at line 533 of file versioning_cycles.c.
References copy_v3_fl(), copy_v4_fl(), cycles_node_socket_float_value(), cycles_node_socket_rgba_value(), cycles_node_socket_vector_value(), bNodeTree::links, LISTBASE_FOREACH, LISTBASE_FOREACH_MUTABLE, node, NODE_VECTOR_MATH_DOT_PRODUCT, nodeFindSocket(), nodeRemLink(), bNodeTree::nodes, ntree, ntreeUpdateTree(), NULL, SH_NODE_VECTOR_MATH, SOCK_FLOAT, SOCK_OUT, SOCK_RGBA, SOCK_VECTOR, and socket_is_used().
Referenced by do_versions_after_linking_cycles().
|
static |
Definition at line 638 of file versioning_cycles.c.
References BLI_findlink(), copy_v3_v3(), bNode::custom1, cycles_node_socket_vector_value(), bNodeLink::fromnode, bNodeLink::fromsock, bNode::inputs, bNodeSocket::link, bNodeTree::links, LISTBASE_FOREACH, LISTBASE_FOREACH_BACKWARD_MUTABLE, bNode::locx, bNode::locy, node, NODE_VECTOR_MATH_LENGTH, NODE_VECTOR_MATH_NORMALIZE, nodeAddLink(), nodeAddStaticNode(), nodeFindSocket(), nodeRemLink(), bNodeTree::nodes, ntree, ntreeUpdateTree(), NULL, SH_NODE_VECTOR_MATH, SOCK_OUT, and socket_is_used().
Referenced by do_versions_after_linking_cycles().
|
static |
Definition at line 699 of file versioning_cycles.c.
References LISTBASE_FOREACH, node, bNodeTree::nodes, ntree, and SH_NODE_VECTOR_MATH.
Referenced by blo_do_versions_cycles().
|
static |
The coloring property of the Voronoi node was removed. Previously, if the coloring enum was set to Intensity (0), the voronoi distance was returned in all outputs, otherwise, the Cell ID was returned. Since we remapped the Fac output in update_voronoi_node_fac_output, then to fix this, we relink the Color output to the Distance output if coloring was set to 0, and the other way around otherwise.
Definition at line 1158 of file versioning_cycles.c.
References if(), bNodeTree::links, LISTBASE_FOREACH_BACKWARD_MUTABLE, node, nodeAddLink(), nodeFindSocket(), nodeRemLink(), ntree, ntreeUpdateTree(), NULL, SH_NODE_TEX_VORONOI, SOCK_OUT, and tex.
Referenced by do_versions_after_linking_cycles().
|
static |
Definition at line 1067 of file versioning_cycles.c.
References BLI_findlink(), bNode::custom1, cycles_node_socket_float_value(), NodeTexVoronoi::dimensions, NodeTexVoronoi::distance, NodeTexVoronoi::feature, bNodeLink::fromnode, bNodeLink::fromsock, bNode::inputs, bNodeSocket::link, bNodeTree::links, LISTBASE_FOREACH, LISTBASE_FOREACH_BACKWARD_MUTABLE, bNode::locx, bNode::locy, node, NODE_MATH_SUBTRACT, nodeAddLink(), nodeAddStaticNode(), nodeFindSocket(), nodeRemLink(), bNodeTree::nodes, ntree, ntreeUpdateTree(), NULL, SH_NODE_MATH, SH_NODE_TEX_VORONOI, SHD_VORONOI_F1, SHD_VORONOI_F2, SOCK_IN, SOCK_OUT, socket_is_used(), bNode::storage, tex, and bNode::width.
Referenced by do_versions_after_linking_cycles().
|
static |
Definition at line 1006 of file versioning_cycles.c.
References LISTBASE_FOREACH, node, bNodeTree::nodes, ntree, SH_NODE_TEX_VORONOI, and tex.
Referenced by do_versions_after_linking_cycles().
|
static |
Definition at line 1021 of file versioning_cycles.c.
References ELEM, if(), LISTBASE_FOREACH, node, bNodeTree::nodes, ntree, SH_NODE_TEX_VORONOI, SHD_VORONOI_F2, and tex.
Referenced by blo_do_versions_cycles().
|
static |
Definition at line 1039 of file versioning_cycles.c.
References BLI_findlink(), bNodeSocket::identifier, LISTBASE_FOREACH, bNodeSocket::name, node, bNodeTree::nodes, ntree, and SH_NODE_TEX_VORONOI.
Referenced by blo_do_versions_cycles().
|
static |
Definition at line 1196 of file versioning_cycles.c.
References BLI_findlink(), bNode::custom1, ELEM, bNode::inputs, bNodeTree::links, LISTBASE_FOREACH, LISTBASE_FOREACH_BACKWARD_MUTABLE, bNode::locx, bNode::locy, node, NODE_MATH_MULTIPLY, nodeAddLink(), nodeAddStaticNode(), nodeFindSocket(), nodeRemLink(), bNodeTree::nodes, ntree, ntreeUpdateTree(), NULL, SH_NODE_MATH, SH_NODE_TEX_VORONOI, SHD_VORONOI_EUCLIDEAN, SHD_VORONOI_F1, SHD_VORONOI_F2, SOCK_OUT, socket_is_used(), and tex.
Referenced by do_versions_after_linking_cycles().
|
static |
Wave Texture node: Restore previous texture directions and offset.
Definition at line 1290 of file versioning_cycles.c.
References cycles_node_socket_float_value(), if(), LISTBASE_FOREACH, M_PI_2, node, nodeFindSocket(), bNodeTree::nodes, ntree, SH_NODE_TEX_WAVE, SHD_WAVE_BANDS_DIRECTION_DIAGONAL, SHD_WAVE_PROFILE_SIN, SHD_WAVE_RINGS_DIRECTION_SPHERICAL, SOCK_IN, and tex.
Referenced by do_versions_after_linking_cycles().
|
static |
Definition at line 256 of file versioning_cycles.c.
References BKE_curvemapping_changed_all(), CurveMapping::cm, CM_TOT, CUMA_DO_CLIP, CurveMap::curve, CurveMapping::flag, node, SH_NODE_CURVE_VEC, CurveMap::totpoint, CurveMapPoint::x, and CurveMapPoint::y.
Referenced by do_versions_after_linking_cycles().