Blender
V3.3
|
#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 "NOD_shader.h"
#include "MEM_guardedalloc.h"
#include "IMB_colormanagement.h"
#include "BLO_readfile.h"
#include "readfile.h"
#include "versioning_common.h"
Go to the source code of this file.
Classes | |
struct | MappingNodeFCurveCallbackData |
Macros | |
#define | DNA_DEPRECATED_ALLOW |
#define DNA_DEPRECATED_ALLOW |
Definition at line 8 of file versioning_cycles.c.
Definition at line 272 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, bNodeLink::prev, SH_NODE_AMBIENT_OCCLUSION, SHD_AO_LOCAL, SOCK_IN, SOCK_OUT, bNode::type, and version_socket_update_is_used().
Referenced by do_versions_after_linking_cycles().
Definition at line 1301 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 46 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 52 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 58 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 64 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 76 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 107 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 112 of file versioning_cycles.c.
References cycles_property_int_set().
Referenced by do_versions_after_linking_cycles().
|
static |
Definition at line 82 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 88 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 94 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 70 of file versioning_cycles.c.
References IDP_GetProperties(), IDP_GetPropertyTypeFromGroup(), IDP_GROUP, and NULL.
Referenced by do_versions_after_linking_cycles().
Definition at line 117 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, NULL, bNodeLink::prev, SH_NODE_DISPLACEMENT, SH_NODE_OUTPUT_MATERIAL, SOCK_IN, SOCK_OUT, STREQ, bNode::type, and version_socket_update_is_used().
Referenced by do_versions_after_linking_cycles().
Definition at line 166 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().
Definition at line 1363 of file versioning_cycles.c.
References ambient_occlusion_node_relink(), CAM_DOF_ENABLED, CAM_ORTHO, camera, 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(), cycles_visibility_properties_from_ID(), DENOISER_OPENIMAGEDENOISE, 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, OB_HIDE_CAMERA, OB_HIDE_DIFFUSE, OB_HIDE_GLOSSY, OB_HIDE_RENDER, OB_HIDE_SELECT, OB_HIDE_SHADOW, OB_HIDE_TRANSMISSION, OB_HIDE_VIEWPORT, OB_HIDE_VOLUME_SCATTER, OB_HOLDOUT, OB_LAMP, OB_SHADOW_CATCHER, Main::objects, 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().
Definition at line 314 of file versioning_cycles.c.
References COLOR_ROLE_DATA, if(), image(), IMB_colormanagement_role_colorspace_name_get(), node, NULL, SH_NODE_TEX_ENVIRONMENT, SH_NODE_TEX_IMAGE, STRNCPY, and tex.
Referenced by do_versions_after_linking_cycles().
Definition at line 341 of file versioning_cycles.c.
References bNodeTree::adt, color, 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().
Definition at line 389 of file versioning_cycles.c.
References color, 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().
Definition at line 239 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().
Definition at line 180 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 41 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().
Definition at line 189 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, NULL, bNodeLink::prev, SH_NODE_MATH, SOCK_IN, sqrtf, STREQ, and version_socket_update_is_used().
Referenced by do_versions_after_linking_cycles().
|
static |
Definition at line 817 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().
Definition at line 872 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, NULL, TexMapping::rot, SH_NODE_MAPPING, SH_NODE_VECTOR_MATH, TexMapping::size, SOCK_IN, SOCK_OUT, TEXMAP_CLIP_MAX, TEXMAP_CLIP_MIN, TexMapping::type, update_mapping_node_fcurve_rna_path_callback(), and version_socket_update_is_used().
Referenced by do_versions_after_linking_cycles().
Definition at line 427 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, SH_NODE_MATH, and version_socket_update_is_used().
Referenced by do_versions_after_linking_cycles().
Definition at line 987 of file versioning_cycles.c.
References bNodeTree::links, LISTBASE_FOREACH, ntree, SH_NODE_TEX_MUSGRAVE, and SOCK_RGBA.
Referenced by blo_do_versions_cycles().
Definition at line 973 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().
Definition at line 1234 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, NULL, SH_NODE_MATH, SH_NODE_TEX_NOISE, SH_NODE_TEX_WAVE, SOCK_IN, SOCK_OUT, socket_is_used(), and version_socket_update_is_used().
Referenced by do_versions_after_linking_cycles().
Definition at line 784 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().
Definition at line 476 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, NULL, SH_NODE_VECTOR_MATH, SOCK_OUT, socket_is_used(), version_socket_update_is_used(), and bNode::width.
Referenced by do_versions_after_linking_cycles().
Definition at line 719 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, NULL, SH_NODE_VECTOR_MATH, SOCK_OUT, socket_is_used(), and version_socket_update_is_used().
Referenced by do_versions_after_linking_cycles().
Definition at line 567 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, NULL, SH_NODE_VECTOR_MATH, SOCK_OUT, socket_is_used(), and version_socket_update_is_used().
Referenced by do_versions_after_linking_cycles().
Definition at line 528 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, SH_NODE_VECTOR_MATH, SOCK_FLOAT, SOCK_OUT, SOCK_RGBA, SOCK_VECTOR, socket_is_used(), and version_socket_update_is_used().
Referenced by do_versions_after_linking_cycles().
Definition at line 633 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, NULL, SH_NODE_VECTOR_MATH, SOCK_OUT, socket_is_used(), and version_socket_update_is_used().
Referenced by do_versions_after_linking_cycles().
Definition at line 694 of file versioning_cycles.c.
References LISTBASE_FOREACH, node, bNodeTree::nodes, ntree, and SH_NODE_VECTOR_MATH.
Referenced by blo_do_versions_cycles().
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 1153 of file versioning_cycles.c.
References if(), bNodeTree::links, LISTBASE_FOREACH_BACKWARD_MUTABLE, node, nodeAddLink(), nodeFindSocket(), nodeRemLink(), ntree, SH_NODE_TEX_VORONOI, SOCK_OUT, tex, and version_socket_update_is_used().
Referenced by do_versions_after_linking_cycles().
Definition at line 1062 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, NULL, SH_NODE_MATH, SH_NODE_TEX_VORONOI, SHD_VORONOI_F1, SHD_VORONOI_F2, SOCK_IN, SOCK_OUT, socket_is_used(), bNode::storage, tex, version_socket_update_is_used(), and bNode::width.
Referenced by do_versions_after_linking_cycles().
Definition at line 1001 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().
Definition at line 1016 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().
Definition at line 1034 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().
Definition at line 1191 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, NULL, SH_NODE_MATH, SH_NODE_TEX_VORONOI, SHD_VORONOI_EUCLIDEAN, SHD_VORONOI_F1, SHD_VORONOI_F2, SOCK_OUT, socket_is_used(), tex, and version_socket_update_is_used().
Referenced by do_versions_after_linking_cycles().
Wave Texture node: Restore previous texture directions and offset.
Definition at line 1285 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().
Definition at line 251 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().