Blender  V3.3
Macros | Functions
versioning_legacy.c File Reference
#include <limits.h>
#include <unistd.h>
#include "DNA_armature_types.h"
#include "DNA_camera_types.h"
#include "DNA_collection_types.h"
#include "DNA_constraint_types.h"
#include "DNA_effect_types.h"
#include "DNA_key_types.h"
#include "DNA_lattice_types.h"
#include "DNA_light_types.h"
#include "DNA_material_types.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_nla_types.h"
#include "DNA_node_types.h"
#include "DNA_object_fluidsim_types.h"
#include "DNA_object_force_types.h"
#include "DNA_object_types.h"
#include "DNA_screen_types.h"
#include "DNA_sdna_types.h"
#include "DNA_sequence_types.h"
#include "DNA_sound_types.h"
#include "DNA_space_types.h"
#include "DNA_vfont_types.h"
#include "DNA_view3d_types.h"
#include "DNA_world_types.h"
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "BKE_action.h"
#include "BKE_armature.h"
#include "BKE_colortools.h"
#include "BKE_constraint.h"
#include "BKE_deform.h"
#include "BKE_fcurve.h"
#include "BKE_lattice.h"
#include "BKE_main.h"
#include "BKE_mesh.h"
#include "BKE_modifier.h"
#include "BKE_object.h"
#include "BKE_particle.h"
#include "BKE_pointcache.h"
#include "SEQ_iterator.h"
#include "SEQ_sequencer.h"
#include "NOD_socket.h"
#include "BLO_readfile.h"
#include "readfile.h"
#include "PIL_time.h"
#include <errno.h>

Go to the source code of this file.

Macros

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

Functions

static void vcol_to_fcol (Mesh *me)
 
static void do_version_bone_head_tail_237 (Bone *bone)
 
static void bone_version_238 (ListBase *lb)
 
static void bone_version_239 (ListBase *lb)
 
static void ntree_version_241 (bNodeTree *ntree)
 
static void ntree_version_242 (bNodeTree *ntree)
 
static void ntree_version_245 (FileData *fd, Library *lib, bNodeTree *ntree)
 
static void idproperties_fix_groups_lengths_recurse (IDProperty *prop)
 
static void idproperties_fix_group_lengths (ListBase idlist)
 
static void customdata_version_242 (Mesh *me)
 
static void customdata_version_243 (Mesh *me)
 
static void do_version_ntree_242_2 (bNodeTree *ntree)
 
static void do_version_free_effect_245 (Effect *eff)
 
static void do_version_free_effects_245 (ListBase *lb)
 
static void do_version_constraints_245 (ListBase *lb)
 
void blo_do_version_old_trackto_to_constraints (Object *ob)
 
static bool seq_set_alpha_mode_cb (Sequence *seq, void *UNUSED(user_data))
 
static bool seq_set_blend_mode_cb (Sequence *seq, void *UNUSED(user_data))
 
void blo_do_versions_pre250 (FileData *fd, Library *lib, Main *bmain)
 

Macro Definition Documentation

◆ DNA_DEPRECATED_ALLOW

#define DNA_DEPRECATED_ALLOW

Definition at line 19 of file versioning_legacy.c.

◆ U

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

Definition at line 80 of file versioning_legacy.c.

Function Documentation

◆ blo_do_version_old_trackto_to_constraints()

void blo_do_version_old_trackto_to_constraints ( struct Object ob)
Note
this version patch is intended for versions < 2.52.2, but was initially introduced in 2.27 already.

Definition at line 448 of file versioning_legacy.c.

References BKE_constraint_add_for_object(), CONSTRAINT_TYPE_TRACKTO, data, bConstraint::data, NULL, Object::track, Object::trackflag, and Object::upflag.

Referenced by blo_do_versions_250(), and blo_do_versions_pre250().

◆ blo_do_versions_pre250()

void blo_do_versions_pre250 ( FileData fd,
Library lib,
Main bmain 
)

Definition at line 482 of file versioning_legacy.c.

References Freestyle::a, MCol::a, ParticleSettings::acc, bActionStrip::actend, Main::actions, bActionStrip::actstart, ACTSTRIP_USESTRIDE, Image::alpha_mode, World::aodist, World::aoenergy, blender::compositor::area(), bScreen::areabase, ARM_DEF_VGROUP, Main::armatures, ARRAY_SIZE, Image::aspx, Image::aspy, bSound::attenuation, Scene::audio, AUDIO_SCRUB, SpaceAction::autosnap, SpaceGraph::autosnap, SpaceNla::autosnap, usdtokens::b(), RenderData::bake_flag, RenderData::bake_margin, RenderData::bake_margin_type, RenderData::bake_mode, Nurb::bezt, Tex::bfac, RenderData::bg_stamp, BKE_armature_where_is(), BKE_curvemapping_add(), BKE_curvemapping_init(), BKE_mesh_calc_edges_legacy(), BKE_mesh_strip_loose_faces(), BKE_modifier_get_info(), BKE_modifier_new(), BKE_modifier_unique_name(), BKE_modifiers_findby_type(), BKE_object_defgroup_find_name(), BKE_object_defgroup_unique_name(), BKE_object_do_version_give_parteff_245(), BKE_particlesettings_add(), BKE_pose_tag_recalc(), BKE_ptcache_add(), BLI_addhead(), BLI_addtail(), BLI_findindex(), BLI_insertlinkbefore(), BLI_listbase_count(), BLI_snprintf(), blo_do_version_old_trackto_to_constraints(), blo_do_versions_newlibadr(), blo_do_versions_oldnewmap_insert(), Key::block, RenderData::blurfac, bone_version_238(), bone_version_239(), bArmature::bonebase, Nurb::bp, ParticleEditSettings::brush, Main::brushes, Light::buffers, calc_lat_fudu(), CAM_ORTHO, CAM_SHOW_SAFE_MARGINS, CAM_SHOWPASSEPARTOUT, Main::cameras, ceil(), bPose::chanbase, ParticleSettings::child_percent, ParticleSettings::child_render_percent, col, Main::collections, bPoseChannel::constinv, Object::constinv, CONSTRAINT_IK_POS, CONSTRAINT_IK_ROT, CONSTRAINT_IK_STRETCH, CONSTRAINT_SPACE_LOCAL, CONSTRAINT_TYPE_ACTION, CONSTRAINT_TYPE_FOLLOWPATH, CONSTRAINT_TYPE_KINEMATIC, CONSTRAINT_TYPE_LOCLIMIT, CONSTRAINT_TYPE_ROTLIKE, CONSTRAINT_TYPE_TRACKTO, bPoseChannel::constraints, Object::constraints, copy_v3_v3(), CU_PATH, Light::curfalloff, Main::curves, customdata_version_242(), customdata_version_243(), ImageUser::cycl, PartEff::damp, ParticleSettings::dampfac, data, bConstraint::data, Object::data, CurveModifierData::defaxis, SoftBody::defgoal, bArmature::deformflag, ArmatureModifierData::deformflag, PartEff::disp, ParticleSettings::disp, Tex::dist_amount, bSound::distance, do_version_bone_head_tail_237(), do_version_constraints_245(), do_version_free_effects_245(), do_version_ntree_242_2(), ToolSettings::doublimit, ParticleSettings::draw, ParticleSettings::draw_as, ParticleSettings::draw_line, ParticleSettings::draw_step, Object::dt, Object::dtx, Lattice::du, Lattice::dv, Lattice::dw, Scene::ed, ParticleEditSettings::emitterdist, eModifierType_Armature, eModifierType_Cloth, eModifierType_Curve, eModifierType_Fluidsim, eModifierType_Mirror, eModifierType_ParticleSystem, eModifierType_Softbody, eModifierType_Subsurf, eModifierTypeType_OnlyDeform, Object::empty_drawsize, Object::empty_drawtype, PartEff::end, bActionStrip::end, ParticleSettings::end, eSubsurfModifierFlag_ControlEdges, eSubsurfModifierFlag_DebugIncr, eSubsurfModifierFlag_Incremental, Tex::extend, PartDeflect::f_noise, Light::falloff_type, RenderData::fg_stamp, Image::filepath, VFont::filepath, Tex::filtersize, ListBase::first, bArmature::flag, Camera::flag, bConstraint::flag, Curve::flag, PartEff::flag, ImageUser::flag, Image::flag, Lattice::flag, Mesh::flag, MirrorModifierData::flag, bActionStrip::flag, FluidsimSettings::flag, ParticleSettings::flag, ParticleSystem::flag, PointCache::flag, AudioData::flag, ParticleEditSettings::flag, Tex::flag, View3D::flag, SubsurfModifierData::flags, bSound::flags, FO_BUILTIN_NAME, Main::fonts, PartEff::force, PartDeflect::forcefield, RenderData::framapto, RenderData::framelen, ImageUser::frames, Tex::frames, ParticleSettings::from, RenderData::frs_sec, RenderData::frs_sec_base, FluidsimModifierData::fss, Lattice::fu, Lattice::fv, Lattice::fw, Image::gen_type, Image::gen_x, Image::gen_y, Tex::gfac, View3D::gridflag, View3D::gridlines, View3D::gridsubdiv, PartEff::group, ParticleSettings::hair_step, bArmature::id, Camera::id, Collection::id, Curve::id, Image::id, Key::id, Lattice::id, Light::id, Material::id, Mesh::id, bNodeTree::id, Object::id, ParticleSettings::id, Scene::id, bScreen::id, bSound::id, Tex::id, VFont::id, World::id, ID_RECALC_ALL, ID_RECALC_PSYS_REDO, idproperties_fix_group_lengths(), if(), Tex::ima, IMA_ALPHA_STRAIGHT, IMA_OLD_PREMUL, IMA_SRC_FILE, IMA_SRC_MOVIE, IMA_SRC_VIEWER, IMA_TYPE_COMPOSITE, IMA_TYPE_IMAGE, IMA_TYPE_R_RESULT, Tex::imaflag, Main::images, RenderData::images, ToolSettings::imapaint, SoftBody::inpush, SoftBody::inspring, Object::instance_faces_scale, ParticleSettings::instance_object, Main::ipo, FluidsimSettings::ipo, Tex::iuser, SoftBody::keys, LA_FALLOFF_INVLINEAR, FluidsimSettings::lastgoodframe, Main::lattices, bArmature::layer, blender::math::length(), Camera::lens, SubsurfModifierData::levels, lib, ID::lib, LIB_TAG_NEED_LINK, FileData::libmap, Main::libraries, PartEff::lifetime, ParticleSettings::lifetime, Main::lights, bPoseChannel::limitmax, bPoseChannel::limitmin, LISTBASE_FOREACH, MAIN_VERSION_ATLEAST, SpaceProperties::mainb, PartEff::mat, Object::mat, Main::materials, MAX2, bSound::max_gain, Mesh::mcol, Mesh::medge, MEM_callocN, MEM_dupallocN, MEM_freeN, Main::meshes, FluidsimSettings::meshVelocities, Main::metaballs, Tex::mg_gain, Tex::mg_H, Tex::mg_lacunarity, Tex::mg_octaves, Tex::mg_offset, MIN2, bSound::min_gain, AudioData::mixrate, MOD_MIR_AXIS_X, MOD_MIR_AXIS_Y, MOD_MIR_AXIS_Z, SpaceAction::mode, ModifierData::mode, RenderData::mode, SubsurfModifierData::modifier, Object::modifiers, Tex::nabla, KeyBlock::name, ModifierData::name, bDeformGroup::name, ID::name, bSound::newpackedfile, bPoseChannel::next, Bone::next, bConstraint::next, Nurb::next, ID::next, KeyBlock::next, ModifierData::next, bActionStrip::next, bDeformGroup::next, ParticleSystem::next, SpaceLink::next, Material::nodetree, Scene::nodetree, Main::nodetrees, ImagePaintSettings::normal_angle, PartEff::normfac, ParticleSettings::normfac, Tex::ns_outscale, ntree, ntree_version_241(), ntree_version_242(), ntree_version_245(), NULL, Curve::nurb, OB_ARMATURE, OB_ARROWS, OB_CURVES_LEGACY, OB_DRAW_IN_FRONT, OB_DUPLIPARTS, OB_DUPLIVERTS, OB_FLUIDSIM_PARTICLE, OB_LATTICE, OB_MESH, OB_SB_ENABLE, OB_SB_POSTDEF, OB_SOLID, PartEff::obfac, ParticleSettings::obfac, ArmatureModifierData::object, Main::objects, ImageUser::offset, Tex::offset, PartEff::omat, ParticleSettings::omat, Camera::ortho_scale, bConstraint::ownspace, bSound::packedfile, PAF_BSPLINE, PAF_DIED, PAF_EDISTR, PAF_FACE, PAF_SHOWE, PAF_STATIC, PAF_TRAND, PAF_UNBORN, PAF_VECT, Object::parent, PARSKEL, ParticleSystem::part, PART_DIED, PART_DRAW_LINE, PART_DRAW_OB, PART_DRAW_PATH, PART_DRAW_VEL_LENGTH, PART_EDISTR, PART_FLUID, PART_FROM_FACE, PART_HAIR, PART_HAIR_BSPLINE, PART_ROT_VEL, PART_TRAND, PART_UNBORN, ToolSettings::particle, Main::particles, Object::particlesystem, Object::partype, Camera::passepartalpha, Object::pd, PE_BRUSH_CUT, PE_DEFLECT_EMITTER, PE_KEEP_LENGTHS, PE_LOCK_FIRST, PFIELD_WIND, SoftBody::physics_speed, PIL_check_seconds_timer(), Nurb::pntsu, Lattice::pntsu, Nurb::pntsv, Lattice::pntsv, Lattice::pntsw, ClothModifierData::point_cache, ParticleSystem::pointcache, Object::pose, Image::preview, Strip::proxy, ParticleSystemModifierData::psys, PSYS_CURRENT, PSYS_VG_DENSITY, PSYS_VG_LENGTH, PSYS_VG_VEL, PTCACHE_BAKED, PTCACHE_DISK_CACHE, ClothModifierData::ptcaches, ParticleSystem::ptcaches, StripProxy::quality, Scene::r, R_BAKE_ADJACENT_FACES, R_BAKE_CLEAR, R_PASSEPARTOUT, BezTriple::radius, BPoint::radius, Nurb::radius_interp, PartEff::randfac, ParticleSettings::randfac, PartEff::randlife, ParticleSettings::randlife, ID::recalc, ParticleSystem::recalc, Key::refkey, ParticleSettings::ren_step, SubsurfModifierData::renderLevels, bActionStrip::repeat, Nurb::resolu, Nurb::resolv, Tex::rfac, ROTLIKE_X, ROTLIKE_Y, ROTLIKE_Z, ParticleSettings::rotmode, SACTCONT_DOPESHEET, SACTSNAP_FRAME, bActionStrip::scale, SCE_LAY_SKY, SCE_LAY_SOLID, SCE_PASS_COMBINED, SCE_PASS_NORMAL, SCE_PASS_VECTOR, SCE_PASS_Z, RenderData::scemode, Main::scenes, Main::screens, ImagePaintSettings::seam_bleed, PartEff::seed, PartDeflect::seed, ParticleSystem::seed, ToolSettings::select_thresh, SEQ_active_seqbase_get(), SEQ_for_each_callback(), seq_set_alpha_mode_cb(), seq_set_blend_mode_cb(), Editing::seqbase, ImageUser::sfra, Tex::sfra, Main::shapekeys, SoftBody::shearstiff, RenderData::simplify_particles, RenderData::simplify_subsurf, ParticleBrushData::size, Mesh::smoothresh, Object::soft, Object::softflag, Main::sounds, Image::source, SPACE_ACTION, SPACE_GRAPH, SPACE_NLA, SPACE_PROPERTIES, SPACE_TEXT, SPACE_VIEW3D, SpaceLink::spacetype, PartEff::speedtex, srl(), usdtokens::st(), PartEff::sta, ParticleSettings::sta, bActionStrip::start, PartEff::staticstep, PointCache::step, ParticleBrushData::step, ParticleBrushData::strength, STREQ, STREQLEN, Sequence::strip, PartEff::stype, SubsurfModifierData::subdivType, Main::subversionfile, ID::tag, bConstraint::tarspace, tex, TEX_CHECKER_EVEN, TEX_CHECKER_ODD, TEX_EXTEND, TEX_IMAGE, TEX_REPEAT, Main::texts, Main::textures, RenderData::threads, Scene::toolsettings, ParticleEditSettings::totaddkey, Object::totcol, Mesh::totface, PartEff::totkey, SoftBody::totkey, PartEff::totpart, ParticleSettings::totpart, ParticleSystem::totpart, ParticleEditSettings::totrekey, Object::trackflag, Object::transflag, ModifierTypeInfo::type, Camera::type, bConstraint::type, Image::type, ModifierData::type, FluidsimSettings::type, Object::type, ParticleSettings::type, Tex::type, unit_m4(), ToolSettings::unwrapper, Object::upflag, ID::us, UVCALC_FILLHOLES, ToolSettings::uvcalc_flag, V3D_SELECT_OUTLINE, V3D_SHOW_FLOOR, V3D_SHOW_X, V3D_SHOW_Y, V3D_SHOW_Z, vcol_to_fcol(), Main::versionfile, PartEff::vertgroup, SoftBody::vertgroup, PartEff::vertgroup_v, ParticleSystem::vgroup, Tex::vn_mexp, Tex::vn_w1, bSound::volume, Main::worlds, Tex::xrepeat, and Tex::yrepeat.

Referenced by do_versions().

◆ bone_version_238()

static void bone_version_238 ( ListBase lb)
static

◆ bone_version_239()

static void bone_version_239 ( ListBase lb)
static

Definition at line 143 of file versioning_legacy.c.

References Bone::childbase, ListBase::first, Bone::layer, and Bone::next.

Referenced by blo_do_versions_pre250().

◆ customdata_version_242()

static void customdata_version_242 ( Mesh me)
static

◆ customdata_version_243()

static void customdata_version_243 ( Mesh me)
static

◆ do_version_bone_head_tail_237()

static void do_version_bone_head_tail_237 ( Bone bone)
static

◆ do_version_constraints_245()

static void do_version_constraints_245 ( ListBase lb)
static

◆ do_version_free_effect_245()

static void do_version_free_effect_245 ( Effect eff)
static

Definition at line 391 of file versioning_legacy.c.

References EFF_PARTICLE, PartEff::keys, MEM_freeN, and Effect::type.

Referenced by do_version_free_effects_245().

◆ do_version_free_effects_245()

static void do_version_free_effects_245 ( ListBase lb)
static

Definition at line 404 of file versioning_legacy.c.

References BLI_pophead(), and do_version_free_effect_245().

Referenced by blo_do_versions_pre250().

◆ do_version_ntree_242_2()

static void do_version_ntree_242_2 ( bNodeTree ntree)
static

◆ idproperties_fix_group_lengths()

static void idproperties_fix_group_lengths ( ListBase  idlist)
static

◆ idproperties_fix_groups_lengths_recurse()

static void idproperties_fix_groups_lengths_recurse ( IDProperty prop)
static

◆ ntree_version_241()

static void ntree_version_241 ( bNodeTree ntree)
static

◆ ntree_version_242()

static void ntree_version_242 ( bNodeTree ntree)
static

◆ ntree_version_245()

static void ntree_version_245 ( FileData fd,
Library lib,
bNodeTree ntree 
)
static

◆ seq_set_alpha_mode_cb()

static bool seq_set_alpha_mode_cb ( Sequence seq,
void UNUSEDuser_data 
)
static

◆ seq_set_blend_mode_cb()

static bool seq_set_blend_mode_cb ( Sequence seq,
void UNUSEDuser_data 
)
static

Definition at line 473 of file versioning_legacy.c.

References Sequence::blend_mode, and Sequence::blend_opacity.

Referenced by blo_do_versions_pre250().

◆ vcol_to_fcol()

static void vcol_to_fcol ( Mesh me)
static