|
Blender V4.5
|
#include <algorithm>#include "BLI_listbase.h"#include "BLI_math_matrix.h"#include "BLI_math_rotation.h"#include "BLI_string.h"#include "BLI_utildefines.h"#include "DNA_anim_types.h"#include "DNA_armature_types.h"#include "DNA_brush_types.h"#include "DNA_cachefile_types.h"#include "DNA_collection_types.h"#include "DNA_constraint_types.h"#include "DNA_fluid_types.h"#include "DNA_genfile.h"#include "DNA_gpencil_legacy_types.h"#include "DNA_gpencil_modifier_types.h"#include "DNA_light_types.h"#include "DNA_mesh_types.h"#include "DNA_meshdata_types.h"#include "DNA_modifier_types.h"#include "DNA_object_types.h"#include "DNA_particle_types.h"#include "DNA_pointcloud_types.h"#include "DNA_rigidbody_types.h"#include "DNA_screen_types.h"#include "DNA_sequence_types.h"#include "DNA_shader_fx_types.h"#include "DNA_space_types.h"#include "DNA_text_types.h"#include "DNA_tracking_types.h"#include "DNA_userdef_types.h"#include "DNA_windowmanager_types.h"#include "DNA_workspace_types.h"#include "BKE_armature.hh"#include "BKE_collection.hh"#include "BKE_colortools.hh"#include "BKE_cryptomatte.h"#include "BKE_curve.hh"#include "BKE_customdata.hh"#include "BKE_fcurve.hh"#include "BKE_gpencil_legacy.h"#include "BKE_lib_id.hh"#include "BKE_main.hh"#include "BKE_mesh.hh"#include "BKE_mesh_legacy_convert.hh"#include "BKE_multires.hh"#include "BKE_node.hh"#include "BKE_node_legacy_types.hh"#include "IMB_imbuf_enums.h"#include "MEM_guardedalloc.h"#include "SEQ_proxy.hh"#include "SEQ_sequencer.hh"#include "SEQ_time.hh"#include "BLO_readfile.hh"#include "readfile.hh"#include "versioning_common.hh"Go to the source code of this file.
Macros | |
| #define | DNA_DEPRECATED_ALLOW |
| #define | DNA_GENFILE_VERSIONING_MACROS |
| #define | U (*((const UserDef *)&U)) |
| #define | CU_2D (1 << 3) |
| #define CU_2D (1 << 3) |
Referenced by blo_do_versions_290().
| #define DNA_DEPRECATED_ALLOW |
Definition at line 9 of file versioning_290.cc.
| #define DNA_GENFILE_VERSIONING_MACROS |
Definition at line 20 of file versioning_290.cc.
| #define U (*((const UserDef *)&U)) |
Definition at line 80 of file versioning_290.cc.
Repair files from duplicate brushes added to blend files, see: #76738.
Always bump subversion in BKE_blender_version.h when adding versioning code here, and wrap it inside a MAIN_VERSION_FILE_ATLEAST check.
Definition at line 808 of file versioning_290.cc.
References Main::actions, BevelModifierData::affect_type, NodeTexSky::air_density, ARegion::alignment, NodeTexSky::altitude, Main::armatures, ARRAY_SIZE, MirrorModifierData::bisect_threshold, BKE_cryptomatte_matte_id_to_entries(), BKE_curve_nurbs_get(), BKE_curvemapping_add(), BKE_curvemapping_init(), BKE_main_id_repair_duplicate_names_listbase(), BKE_mesh_legacy_convert_loops_to_corners(), BKE_mesh_legacy_convert_polys_to_offsets(), BKE_mesh_validate_arrays(), BLI_assert, BLI_assert_msg, BLI_findptr(), BLI_freelinkN(), blo_read_get_new_globaldata_address(), Main::brushes, Editing::cache_flag, CACHEFILE_VELOCITY_UNIT_SECOND, Main::cachefiles, CD_MFACE, WeightVGProximityModifierData::cmap_curve, CMP_NODE_CRYPTOMATTE_LEGACY, CMP_NODE_OUTPUT_FILE, CMP_NODE_R_LAYERS, CMP_NODE_SETALPHA, CMP_NODE_SETALPHA_MODE_REPLACE_ALPHA, FluidDomainSettings::coba_field, COLLECTION_COLOR_NONE, Main::collections, copy_v3_fl(), copy_v4_v4(), CU_2D, CU_3D, CU_BEV_MODE_OBJECT, CU_BEV_MODE_ROUND, CU_IS_2D, CU_PATH_CLAMP, Main::curves, CustomData_get_layer(), CustomData_get_layer_for_write(), data, IDProperty::data, DEG2RADF, DENOISER_OPTIX, do_versions_291_fcurve_handles_limit(), do_versions_add_region_if_not_found(), do_versions_point_attribute_names(), do_versions_point_attributes(), FluidModifierData::domain, NodeTexSky::dust_density, eBooleanModifierFlag_Object, eBooleanModifierSolver_Float, blender::seq::editing_get(), EEVEE_RENDER_PASS_UNUSED_8, ELEM, eModifierType_Bevel, eModifierType_Boolean, eModifierType_Fluid, eModifierType_MeshSequenceCache, eModifierType_Mirror, eModifierType_Nodes, eModifierType_Ocean, eModifierType_WeightVGEdit, eModifierType_WeightVGProximity, View3DOverlay::fade_alpha, FileData::filesdna, SpaceOutliner::filter, SpaceOutliner::filter_state, BooleanModifierData::flag, SpaceImage::flag, SpaceImageOverlay::flag, SpaceOutliner::flag, SpaceSeq::flag, View3DOverlay::flag, BevelModifierData::flags, FLUID_DOMAIN_FIELD_PHI, FLUID_DOMAIN_TYPE_LIQUID, FOREACH_NODETREE_BEGIN, FOREACH_NODETREE_END, FPS, FluidDomainSettings::fractions_distance, GEO_NODE_MESH_BOOLEAN, GEO_NODE_MESH_PRIMITIVE_GRID, GEO_NODE_OBJECT_INFO, GEO_NODE_TRANSFORM_SPACE_RELATIVE, GP_DATA_CURVE_ADAPTIVE_RESOLUTION, GP_DEFAULT_CURVE_EDIT_CORNER_ANGLE, GP_DEFAULT_CURVE_ERROR, GP_DEFAULT_CURVE_RESOLUTION, Main::gpencils, FluidDomainSettings::grid_scale, FluidDomainSettings::gridlines_range_color, FluidDomainSettings::gridlines_upper_bound, IDPropertyData::group, i, ID_BR, ID_PAL, IDP_FLAG_OVERRIDABLE_LIBRARY, IDP_GROUP, invert_m4_m4(), Main::lights, LISTBASE_FOREACH, LISTBASE_FOREACH_MUTABLE, loc_eul_size_to_mat4(), M_PI_2, MAIN_VERSION_FILE_ATLEAST, MAIN_VERSION_FILE_OLDER, NodeCryptomatte::matte_id, MAX_NAME, ME_SYMMETRY_X, ME_SYMMETRY_Y, ME_SYMMETRY_Z, MEM_allocN_len, MEM_callocN(), Main::meshes, MOD_BEVEL_AFFECT_EDGES, MOD_BEVEL_AFFECT_VERTICES, MOD_BEVEL_PROFILE_CUSTOM, MOD_BEVEL_PROFILE_SUPERELLIPSE, MOD_MESHSEQ_INTERPOLATE_VERTICES, MOD_WVG_EDIT_WEIGHTS_NORMALIZE, NodeSetAlpha::mode, Main::movieclips, Main::nodetrees, NTREE_COMPOSIT, NTREE_GEOMETRY, NTREE_SHADER, Main::objects, offsetof, SpaceProperties::outliner_sync, SpaceImage::overlay, View3D::overlay, NodeTexSky::ozone_density, panels_remove_x_closed_flag_recursive(), PART_FLUID_BUBBLE, PART_FLUID_FLIP, PART_FLUID_FOAM, PART_FLUID_SPRAY, PART_PHYS_NO, Main::particles, Main::pointclouds, BevelModifierData::profile_type, NodesModifierSettings::properties, PROPERTIES_SYNC_AUTO, RE_PASSNAME_VOLUME_LIGHT, MovieTrackingSettings::refine_camera_intrinsics, REFINE_FOCAL_LENGTH, REFINE_PRINCIPAL_POINT, REFINE_RADIAL_DISTORTION, SpaceSeq::render_size, OceanModifierData::resolution, RGN_ALIGN_BOTTOM, RGN_ALIGN_TOP, RGN_TYPE_FOOTER, RGN_TYPE_HEADER, NodeImageMultiFileSocket::save_as_render, Main::scenes, Main::screens, SEQ_CACHE_STORE_FINAL_OUT, SEQ_CACHE_STORE_RAW, SEQ_RENDER_SIZE_FULL, SEQ_RENDER_SIZE_PROXY_100, SEQ_RENDER_SIZE_PROXY_25, SEQ_RENDER_SIZE_PROXY_50, SEQ_RENDER_SIZE_PROXY_75, SEQ_SHOW_OVERLAY, SEQ_TIMELINE_SHOW_STRIP_DURATION, SEQ_TIMELINE_SHOW_STRIP_NAME, SEQ_TIMELINE_SHOW_STRIP_SOURCE, SEQ_USE_PROXIES, SET_FLAG_FROM_TEST, MovieTracking::settings, NodesModifierData::settings, SH_NODE_TEX_SKY, OceanModifierData::sharpen_peak_jonswap, SpaceOutliner::show_restrict_flags, SI_FLAG_UNUSED_20, SI_OVERLAY_SHOW_OVERLAYS, SO_FILTER_OB_HIDDEN, SO_FILTER_OB_STATE_INVERSE, SO_FILTER_OB_VISIBLE, SO_MODE_COLUMN, SO_RESTRICT_RENDER, BooleanModifierData::solver, SPACE_IMAGE, SPACE_NODE, SPACE_OUTLINER, SPACE_PROPERTIES, SPACE_SEQ, SPACE_SPREADSHEET, SPACE_VIEW3D, STREQ, STREQLEN, STRNCPY(), RigidBodyWorld::substeps_per_frame, NodeTexSky::sun_disc, NodeTexSky::sun_elevation, NodeTexSky::sun_intensity, NodeTexSky::sun_rotation, NodeTexSky::sun_size, blender::seq::tool_settings_init(), SpaceNode::treepath, FluidDomainSettings::type, IDProperty::type, U, UI_PANEL_DATA_EXPAND_ROOT, UNUSED_VARS, USER_HEADER_BOTTOM, SpaceImage::uv_opacity, V3D_OVERLAY_FADE_INACTIVE, FluidDomainSettings::vector_scale_with_magnitude, MeshSeqCacheModifierData::velocity_scale, version_cycles_properties_from_ID(), version_cycles_properties_from_render_layer(), version_cycles_properties_from_view_layer(), version_cycles_property_boolean(), version_cycles_property_boolean_set(), version_cycles_property_int(), version_cycles_property_int_set(), version_node_join_geometry_for_multi_input_socket(), version_node_socket_name(), Main::versionfile, VIEW_LAYER_CRYPTOMATTE_ACCURATE, OceanModifierData::viewport_resolution, FluidDomainSettings::viscosity_value, OceanModifierData::wave_alignment, which_libbase(), wmWindow::winid, View3DOverlay::wireframe_opacity, Main::wm, Main::workspaces, and zero_v3().
Referenced by do_versions().
|
static |
Definition at line 105 of file versioning_290.cc.
References StripProxy::build_size_flags, Strip::data, Strip::flag, IMB_PROXY_NONE, StripData::proxy, and SEQ_USE_PROXY.
Referenced by strip_convert_transform_crop(), and strip_convert_transform_crop_2().
|
static |
Definition at line 744 of file versioning_290.cc.
References FCurve::bezt, BEZT_IPO_BEZ, fabsf, i, madd_v2_v2v2fl(), sub_v2_v2v2(), v2, and BezTriple::vec.
Referenced by blo_do_versions_290().
Make sure Emission Alpha fcurve and drivers is properly mapped after the Emission Strength got introduced.
Effectively we are replacing the (animation of) node socket input 18 with 19. Emission Strength is the new socket input 18, pushing Emission Alpha to input 19.
To play safe we move all the inputs beyond 18 to their rightful new place. In case users are doing unexpected things with not-really supported keyframeable channels.
Always bump subversion in BKE_blender_version.h when adding versioning code here, and wrap it inside a MAIN_VERSION_FILE_ATLEAST check.
Definition at line 424 of file versioning_290.cc.
References BKE_collection_cycles_fix(), BKE_gpencil_frame_duplicate(), BKE_pose_rebuild(), BLI_addhead(), BLI_findstring(), Main::brushes, Main::collections, eGpencilModifierType_Array, eGpencilModifierType_Color, eGpencilModifierType_Hook, eGpencilModifierType_Lattice, eGpencilModifierType_Mirror, eGpencilModifierType_Multiply, eGpencilModifierType_Noise, eGpencilModifierType_Offset, eGpencilModifierType_Opacity, eGpencilModifierType_Simplify, eGpencilModifierType_Smooth, eGpencilModifierType_Subdiv, eGpencilModifierType_Texture, eGpencilModifierType_Thick, eModifierType_Multires, ListBase::first, FOREACH_NODETREE_BEGIN, FOREACH_NODETREE_END, bGPDframe::framenum, GEO_NODE_MESH_PRIMITIVE_GRID, get_sequencer_render_size(), id_fake_user_set(), bGPdata::layers, LISTBASE_FOREACH, MAIN_VERSION_FILE_ATLEAST, ArrayGpencilModifierData::material, ColorGpencilModifierData::material, HookGpencilModifierData::material, LatticeGpencilModifierData::material, MirrorGpencilModifierData::material, MultiplyGpencilModifierData::material, NoiseGpencilModifierData::material, OffsetGpencilModifierData::material, OpacityGpencilModifierData::material, SimplifyGpencilModifierData::material, SmoothGpencilModifierData::material, SubdivGpencilModifierData::material, TextureGpencilModifierData::material, ThickGpencilModifierData::material, Main::materials, multires_do_versions_simple_to_catmull_clark(), NTREE_GEOMETRY, NTREE_SHADER, OB_ARMATURE, OB_GPENCIL_LEGACY, OB_MODE_SCULPT, Main::objects, offsetof, printf, Scene::r, Main::scenes, seq_update_meta_disp_range(), RenderData::sfra, SH_NODE_BSDF_PRINCIPLED, strip_convert_transform_crop_lb(), strip_convert_transform_crop_lb_2(), Main::texts, version_node_socket_duplicate(), and version_node_socket_index_animdata().
Referenced by do_versions_after_linking().
|
static |
Definition at line 726 of file versioning_290.cc.
References CD_PROP_FLOAT, CD_PROP_FLOAT3, i, CustomData::layers, CustomDataLayer::name, STREQ, STRNCPY(), CustomData::totlayer, and CustomDataLayer::type.
Referenced by blo_do_versions_290().
|
static |
Definition at line 705 of file versioning_290.cc.
References CD_PROP_FLOAT, CD_PROP_FLOAT3, i, CustomData::layers, CustomDataLayer::name, STRNCPY(), CustomData::totlayer, and CustomDataLayer::type.
Referenced by blo_do_versions_290().
|
static |
Definition at line 82 of file versioning_290.cc.
References LISTBASE_FOREACH, SpaceSeq::mainb, SpaceSeq::render_size, Main::screens, SEQ_DRAW_IMG_IMBUF, and SPACE_SEQ.
Referenced by do_versions_after_linking_290().
|
static |
Definition at line 690 of file versioning_290.cc.
References Panel::children, Panel::flag, LISTBASE_FOREACH, panels_remove_x_closed_flag_recursive(), PNL_CLOSED, PNL_UNUSED_1, and SET_FLAG_FROM_TEST.
Referenced by blo_do_versions_290(), and panels_remove_x_closed_flag_recursive().
|
static |
Definition at line 359 of file versioning_290.cc.
References blender::seq::active_seqbase_set(), blender::seq::editing_get(), LISTBASE_FOREACH, LISTBASE_FOREACH_BACKWARD, max_ii(), blender::seq::meta_stack_active_get(), Editing::metastack, min_ii(), MetaStack::parent_strip, Strip::seqbase, blender::seq::time_left_handle_frame_get(), blender::seq::time_left_handle_frame_set(), blender::seq::time_right_handle_frame_get(), and blender::seq::time_right_handle_frame_set().
Referenced by do_versions_after_linking_290().
|
static |
Definition at line 116 of file versioning_290.cc.
References AnimData::action, Scene::adt, FCurve::bezt, BKE_fcurve_find(), BKE_fcurve_free(), BKE_fcurve_is_empty(), BLI_remlink(), bAction::curves, Strip::flag, i, FCurve::totvert, and BezTriple::vec.
Referenced by strip_convert_transform_crop().
|
static |
Definition at line 273 of file versioning_290.cc.
References AnimData::action, Scene::adt, FCurve::bezt, BKE_fcurve_find(), BKE_fcurve_is_empty(), bAction::curves, i, FCurve::totvert, and BezTriple::vec.
Referenced by strip_convert_transform_crop_2().
|
static |
Definition at line 150 of file versioning_290.cc.
References BLI_sprintfN(), BLI_str_escape(), StripCrop::bottom, can_use_proxy(), StripData::crop, Strip::data, Strip::flag, StripCrop::left, MEM_callocN(), MEM_freeN(), Strip::name, StripElem::orig_height, StripElem::orig_width, Scene::r, blender::seq::rendersize_to_proxysize(), blender::seq::rendersize_to_scale_factor(), StripCrop::right, StripTransform::scale_x, StripTransform::scale_y, strip_convert_transform_animation(), StripData::stripdata, StripCrop::top, StripData::transform, StripTransform::xofs, RenderData::xsch, StripTransform::yofs, and RenderData::ysch.
Referenced by strip_convert_transform_crop_lb().
|
static |
Definition at line 293 of file versioning_290.cc.
References BLI_sprintfN(), BLI_str_escape(), StripCrop::bottom, can_use_proxy(), StripData::crop, Strip::data, StripCrop::left, MEM_freeN(), Strip::name, StripElem::orig_height, StripElem::orig_width, Scene::r, blender::seq::rendersize_to_proxysize(), blender::seq::rendersize_to_scale_factor(), StripCrop::right, StripTransform::scale_x, StripTransform::scale_y, strip_convert_transform_animation_2(), StripData::stripdata, StripCrop::top, StripData::transform, RenderData::xsch, and RenderData::ysch.
Referenced by strip_convert_transform_crop_lb_2().
|
static |
Definition at line 258 of file versioning_290.cc.
References ELEM, LISTBASE_FOREACH, strip_convert_transform_crop(), strip_convert_transform_crop_lb(), STRIP_TYPE_META, STRIP_TYPE_SOUND_HD, and STRIP_TYPE_SOUND_RAM.
Referenced by do_versions_after_linking_290(), and strip_convert_transform_crop_lb().
|
static |
Definition at line 344 of file versioning_290.cc.
References ELEM, LISTBASE_FOREACH, strip_convert_transform_crop_2(), strip_convert_transform_crop_lb_2(), STRIP_TYPE_META, STRIP_TYPE_SOUND_HD, and STRIP_TYPE_SOUND_RAM.
Referenced by do_versions_after_linking_290(), and strip_convert_transform_crop_lb_2().
|
static |
Definition at line 788 of file versioning_290.cc.
References bNodeSocket::flag, GEO_NODE_JOIN_GEOMETRY, bNodeSocket::limit, bNodeTree::links, LISTBASE_FOREACH, LISTBASE_FOREACH_MUTABLE, bNodeSocket::next, blender::bke::node_remove_socket(), bNodeTree::nodes, and SOCK_MULTI_INPUT.
Referenced by blo_do_versions_290().
|
static |
Definition at line 393 of file versioning_290.cc.
References BLI_assert, bNodeSocket::default_value, bNodeTree::links, LISTBASE_FOREACH, LISTBASE_FOREACH_MUTABLE, MEM_dupallocN(), MEM_freeN(), blender::bke::node_add_link(), blender::bke::node_find_socket(), bNodeTree::nodes, SOCK_IN, and STREQ.
Referenced by do_versions_after_linking_290().