Blender  V2.93
Macros | Functions
versioning_290.c File Reference
#include "BLI_alloca.h"
#include "BLI_listbase.h"
#include "BLI_math.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_modifier_types.h"
#include "DNA_gpencil_types.h"
#include "DNA_hair_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_shader_fx_types.h"
#include "DNA_space_types.h"
#include "DNA_text_types.h"
#include "DNA_tracking_types.h"
#include "DNA_workspace_types.h"
#include "BKE_animsys.h"
#include "BKE_armature.h"
#include "BKE_attribute.h"
#include "BKE_collection.h"
#include "BKE_colortools.h"
#include "BKE_cryptomatte.h"
#include "BKE_curve.h"
#include "BKE_fcurve.h"
#include "BKE_gpencil.h"
#include "BKE_lib_id.h"
#include "BKE_main.h"
#include "BKE_mesh.h"
#include "BKE_multires.h"
#include "BKE_node.h"
#include "IMB_imbuf.h"
#include "MEM_guardedalloc.h"
#include "RNA_access.h"
#include "SEQ_proxy.h"
#include "SEQ_render.h"
#include "SEQ_sequencer.h"
#include "SEQ_time.h"
#include "SEQ_transform.h"
#include "BLO_readfile.h"
#include "readfile.h"

Go to the source code of this file.

Macros

#define DNA_DEPRECATED_ALLOW
 
#define U   (*((const UserDef *)&U))
 
#define CU_2D   (1 << 3)
 

Functions

static eSpaceSeq_Proxy_RenderSize get_sequencer_render_size (Main *bmain)
 
static bool can_use_proxy (const Sequence *seq, int psize)
 
static void seq_convert_transform_animation (const Scene *scene, const char *path, const int image_size)
 
static void seq_convert_transform_crop (const Scene *scene, Sequence *seq, const eSpaceSeq_Proxy_RenderSize render_size)
 
static void seq_convert_transform_crop_lb (const Scene *scene, const ListBase *lb, const eSpaceSeq_Proxy_RenderSize render_size)
 
static void seq_convert_transform_animation_2 (const Scene *scene, const char *path, const float scale_to_fit_factor)
 
static void seq_convert_transform_crop_2 (const Scene *scene, Sequence *seq, const eSpaceSeq_Proxy_RenderSize render_size)
 
static void seq_convert_transform_crop_lb_2 (const Scene *scene, const ListBase *lb, const eSpaceSeq_Proxy_RenderSize render_size)
 
static void seq_update_meta_disp_range (Editing *ed)
 
static void version_node_socket_duplicate (bNodeTree *ntree, const int node_type, const char *old_name, const char *new_name)
 
void do_versions_after_linking_290 (Main *bmain, ReportList *UNUSED(reports))
 
static void panels_remove_x_closed_flag_recursive (Panel *panel)
 
static void do_versions_point_attributes (CustomData *pdata)
 
static void do_versions_point_attribute_names (CustomData *pdata)
 
static void do_versions_291_fcurve_handles_limit (FCurve *fcu)
 
static void do_versions_strip_cache_settings_recursive (const ListBase *seqbase)
 
static void version_node_socket_name (bNodeTree *ntree, const int node_type, const char *old_name, const char *new_name)
 
static void version_node_join_geometry_for_multi_input_socket (bNodeTree *ntree)
 
static ARegiondo_versions_add_region_if_not_found (ListBase *regionbase, int region_type, const char *name, int link_after_region_type)
 
static void do_version_constraints_spline_ik_joint_bindings (ListBase *lb)
 
void blo_do_versions_290 (FileData *fd, Library *UNUSED(lib), Main *bmain)
 

Macro Definition Documentation

◆ CU_2D

#define CU_2D   (1 << 3)

◆ DNA_DEPRECATED_ALLOW

#define DNA_DEPRECATED_ALLOW

Definition at line 21 of file versioning_290.c.

◆ U

#define U   (*((const UserDef *)&U))

Definition at line 85 of file versioning_290.c.

Function Documentation

◆ blo_do_versions_290()

void blo_do_versions_290 ( FileData fd,
Library UNUSEDlib,
Main bmain 
)

Repair files from duplicate brushes added to blend files, see: T76738.

Versioning code until next subversion bump goes here.

Note
Be sure to check when bumping the version:
Keep this message at the bottom of the function.

Definition at line 898 of file versioning_290.c.

References Main::actions, BevelModifierData::affect_type, ARegion::alignment, blender::compositor::area(), Main::armatures, ARRAY_SIZE, ATTR_DOMAIN_AUTO, Curve::bevel_mode, Curve::bevobj, 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_validate_arrays(), BLI_assert, BLI_findptr(), BLI_freelinkN(), BLI_strncpy(), blo_read_get_new_globaldata_address(), SceneEEVEE::bokeh_denoise_fac, SceneEEVEE::bokeh_neighbor_max, SceneEEVEE::bokeh_overblur, Main::brushes, Editing::cache_flag, CACHEFILE_VELOCITY_UNIT_SECOND, Main::cachefiles, 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, Collection::color_tag, copy_v3_fl(), copy_v4_v4(), CU_2D, CU_3D, CU_BEV_MODE_OBJECT, CU_BEV_MODE_ROUND, CU_IS_2D, CU_PATH_CLAMP, curve, Main::curves, data, IDProperty::data, DEG2RADF, DNA_struct_elem_find(), DNA_struct_find(), do_version_constraints_spline_ik_joint_bindings(), do_versions_291_fcurve_handles_limit(), do_versions_add_region_if_not_found(), do_versions_point_attribute_names(), do_versions_point_attributes(), do_versions_strip_cache_settings_recursive(), FluidModifierData::domain, eBooleanModifierFlag_Object, eBooleanModifierSolver_Fast, Mesh::editflag, Scene::eevee, 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, ListBase::first, ImageUser::flag, BooleanModifierData::flag, SpaceOutliner::flag, SpaceSeq::flag, SpaceImageOverlay::flag, SpaceImage::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_ATTRIBUTE_FILL, GEO_NODE_ATTRIBUTE_INPUT_ATTRIBUTE, GEO_NODE_ATTRIBUTE_INPUT_FLOAT, GEO_NODE_ATTRIBUTE_MATH, GEO_NODE_ATTRIBUTE_PROXIMITY, GEO_NODE_ATTRIBUTE_RANDOMIZE, GEO_NODE_ATTRIBUTE_RANDOMIZE_REPLACE_CREATE, GEO_NODE_BOOLEAN, GEO_NODE_MESH_PRIMITIVE_GRID, GEO_NODE_OBJECT_INFO, GEO_NODE_POINT_INSTANCE, GEO_NODE_POINT_INSTANCE_WHOLE_COLLECTION, GEO_NODE_TRANSFORM_SPACE_RELATIVE, GEO_NODE_VOLUME_TO_MESH, 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, Main::hairs, Scene::id, ID_BR, ID_PAL, ID_VF, IDP_FLAG_OVERRIDABLE_LIBRARY, IDP_GROUP, if(), IMA_SHOW_MAX_RESOLUTION, invert_m4_m4(), SpaceImage::iuser, CustomData::layers, Mesh::ldata, Main::lights, LISTBASE_FOREACH, LISTBASE_FOREACH_MUTABLE, loc_eul_size_to_mat4(), M_PI_2, MAIN_VERSION_ATLEAST, MAIN_VERSION_OLDER, Scene::master_collection, NodeCryptomatte::matte_id, MAX_NAME, CustomData::maxlayer, ME_SYMMETRY_X, ME_SYMMETRY_Y, ME_SYMMETRY_Z, MEM_allocN_len, MEM_callocN, mesh, 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, SceneEEVEE::motion_blur_depth_scale, SceneEEVEE::motion_blur_max, SceneEEVEE::motion_blur_steps, Main::movieclips, FCurve::next, ID::next, node, NODE_MATH_ADD, bNodeTree::nodes, Scene::nodetree, Main::nodetrees, ntree, NTREE_COMPOSIT, NTREE_GEOMETRY, NTREE_SHADER, NULL, MeshSeqCacheModifierData::num_vertices, SpaceSpreadsheet::object_eval_state, Main::objects, SpaceProperties::outliner_sync, SpaceImage::overlay, View3D::overlay, 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, Scene::r, 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, Scene::rigidbody_world, NodeImageMultiFileSocket::save_as_render, scene, Main::scenes, Main::screens, SEQ_CACHE_STORE_FINAL_OUT, SEQ_CACHE_STORE_RAW, SEQ_editing_get(), 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_STRIP_DURATION, SEQ_SHOW_STRIP_NAME, SEQ_SHOW_STRIP_OVERLAY, SEQ_SHOW_STRIP_SOURCE, SEQ_tool_settings_init(), SEQ_USE_PROXIES, Editing::seqbase, ToolSettings::sequencer_tool_settings, SET_FLAG_FROM_TEST, NodesModifierData::settings, MovieTracking::settings, SH_NODE_TEX_SKY, OceanModifierData::sharpen_peak_jonswap, SpaceOutliner::show_restrict_flags, SI_FLAG_UNUSED_20, SI_OVERLAY_SHOW_OVERLAYS, RenderData::simplify_volumes, 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, SPREADSHEET_OBJECT_EVAL_STATE_EVALUATED, STREQ, STREQLEN, STRNCPY, RigidBodyWorld::substeps_per_frame, Mesh::symmetry, tex, Scene::toolsettings, CustomData::totlayer, SpaceNode::treepath, FluidDomainSettings::type, IDProperty::type, bNodeTree::type, 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_node_join_geometry_for_multi_input_socket(), version_node_socket_name(), Main::versionfile, MeshSeqCacheModifierData::vertex_velocities, VIEW_LAYER_CRYPTOMATTE_ACCURATE, Scene::view_layers, OceanModifierData::viewport_resolution, FluidDomainSettings::viscosity_value, SceneEEVEE::volumetric_shadow_samples, OceanModifierData::wave_alignment, which_libbase(), wmWindow::winid, View3DOverlay::wireframe_opacity, Main::wm, Main::workspaces, and zero_v3().

◆ can_use_proxy()

static bool can_use_proxy ( const Sequence seq,
int  psize 
)
static

◆ do_version_constraints_spline_ik_joint_bindings()

static void do_version_constraints_spline_ik_joint_bindings ( ListBase lb)
static

Definition at line 884 of file versioning_290.c.

References CONSTRAINT_TYPE_SPLINEIK, data, if(), LISTBASE_FOREACH, and NULL.

Referenced by blo_do_versions_290().

◆ do_versions_291_fcurve_handles_limit()

static void do_versions_291_fcurve_handles_limit ( FCurve fcu)
static

Definition at line 766 of file versioning_290.c.

References FCurve::bezt, BEZT_IPO_BEZ, fabsf, madd_v2_v2v2fl(), sub_v2_v2v2(), v1, v2, and BezTriple::vec.

Referenced by blo_do_versions_290().

◆ do_versions_add_region_if_not_found()

static ARegion* do_versions_add_region_if_not_found ( ListBase regionbase,
int  region_type,
const char *  name,
int  link_after_region_type 
)
static

◆ do_versions_after_linking_290()

void do_versions_after_linking_290 ( Main bmain,
ReportList UNUSEDreports 
)

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.

The for loop for the input ids is at the top level otherwise we lose the animation keyframe data.

Versioning code until next subversion bump goes here.

Note
Be sure to check when bumping the version:
Keep this message at the bottom of the function.

Definition at line 414 of file versioning_290.c.

References BKE_animdata_fix_paths_rename_all_ex(), BKE_collection_cycles_fix(), BKE_gpencil_frame_duplicate(), BKE_pose_rebuild(), BLI_addhead(), BLI_findstring(), BLI_sprintfN(), BLI_str_escape(), Main::brushes, Main::collections, Scene::ed, 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_ATLEAST, NoiseGpencilModifierData::material, SubdivGpencilModifierData::material, ThickGpencilModifierData::material, ColorGpencilModifierData::material, OpacityGpencilModifierData::material, ArrayGpencilModifierData::material, LatticeGpencilModifierData::material, MirrorGpencilModifierData::material, HookGpencilModifierData::material, SimplifyGpencilModifierData::material, OffsetGpencilModifierData::material, SmoothGpencilModifierData::material, MultiplyGpencilModifierData::material, TextureGpencilModifierData::material, Main::materials, MEM_freeN, MEM_mallocN, multires_do_versions_simple_to_catmull_clark(), ModifierData::next, node, bNodeTree::nodes, ntree, NTREE_GEOMETRY, NTREE_SHADER, NULL, OB_ARMATURE, OB_GPENCIL, OB_MODE_SCULPT, Main::objects, Scene::r, scene, Main::scenes, seq_convert_transform_crop_lb(), seq_convert_transform_crop_lb_2(), SEQ_editing_get(), seq_update_meta_disp_range(), Editing::seqbase, RenderData::sfra, SH_NODE_BSDF_PRINCIPLED, Main::texts, ModifierData::type, bNodeTree::type, and version_node_socket_duplicate().

◆ do_versions_point_attribute_names()

static void do_versions_point_attribute_names ( CustomData pdata)
static

◆ do_versions_point_attributes()

static void do_versions_point_attributes ( CustomData pdata)
static

◆ do_versions_strip_cache_settings_recursive()

static void do_versions_strip_cache_settings_recursive ( const ListBase seqbase)
static

Definition at line 810 of file versioning_290.c.

References LISTBASE_FOREACH, and SEQ_TYPE_META.

Referenced by blo_do_versions_290().

◆ get_sequencer_render_size()

static eSpaceSeq_Proxy_RenderSize get_sequencer_render_size ( Main bmain)
static

◆ panels_remove_x_closed_flag_recursive()

static void panels_remove_x_closed_flag_recursive ( Panel panel)
static

◆ seq_convert_transform_animation()

static void seq_convert_transform_animation ( const Scene scene,
const char *  path,
const int  image_size 
)
static

◆ seq_convert_transform_animation_2()

static void seq_convert_transform_animation_2 ( const Scene scene,
const char *  path,
const float  scale_to_fit_factor 
)
static

◆ seq_convert_transform_crop()

static void seq_convert_transform_crop ( const Scene scene,
Sequence seq,
const eSpaceSeq_Proxy_RenderSize  render_size 
)
static

◆ seq_convert_transform_crop_2()

static void seq_convert_transform_crop_2 ( const Scene scene,
Sequence seq,
const eSpaceSeq_Proxy_RenderSize  render_size 
)
static

◆ seq_convert_transform_crop_lb()

static void seq_convert_transform_crop_lb ( const Scene scene,
const ListBase lb,
const eSpaceSeq_Proxy_RenderSize  render_size 
)
static

◆ seq_convert_transform_crop_lb_2()

static void seq_convert_transform_crop_lb_2 ( const Scene scene,
const ListBase lb,
const eSpaceSeq_Proxy_RenderSize  render_size 
)
static

◆ seq_update_meta_disp_range()

static void seq_update_meta_disp_range ( Editing ed)
static

◆ version_node_join_geometry_for_multi_input_socket()

static void version_node_join_geometry_for_multi_input_socket ( bNodeTree ntree)
static

◆ version_node_socket_duplicate()

static void version_node_socket_duplicate ( bNodeTree ntree,
const int  node_type,
const char *  old_name,
const char *  new_name 
)
static

◆ version_node_socket_name()

static void version_node_socket_name ( bNodeTree ntree,
const int  node_type,
const char *  old_name,
const char *  new_name 
)
static

Definition at line 820 of file versioning_290.c.

References LISTBASE_FOREACH, node, bNodeTree::nodes, ntree, and STREQ.

Referenced by blo_do_versions_290().