Blender V5.0
versioning_420.cc File Reference
#include "DNA_anim_types.h"
#include "DNA_brush_types.h"
#include "DNA_constraint_types.h"
#include "DNA_defaults.h"
#include "DNA_genfile.h"
#include "DNA_light_types.h"
#include "DNA_lightprobe_types.h"
#include "DNA_material_types.h"
#include "DNA_sequence_types.h"
#include "DNA_windowmanager_types.h"
#include "DNA_world_types.h"
#include "BLI_listbase.h"
#include "BLI_math_vector.h"
#include "BLI_string.h"
#include "BLI_string_utf8.h"
#include "BKE_anim_data.hh"
#include "BKE_colortools.hh"
#include "BKE_customdata.hh"
#include "BKE_grease_pencil.hh"
#include "BKE_main.hh"
#include "BKE_material.hh"
#include "BKE_node.hh"
#include "BKE_node_legacy_types.hh"
#include "BKE_report.hh"
#include "MOV_enums.hh"
#include "SEQ_iterator.hh"
#include "SEQ_sequencer.hh"
#include "BLT_translation.hh"
#include "BLO_read_write.hh"
#include "readfile.hh"
#include "versioning_common.hh"

Go to the source code of this file.

Classes

struct  AlphaSource

Macros

#define DNA_DEPRECATED_ALLOW
#define DNA_GENFILE_VERSIONING_MACROS

Functions

static void version_bonecollection_anim (FCurve *fcurve)
static void versioning_eevee_shadow_settings (Object *object)
static AlphaSource versioning_eevee_alpha_source_get (bNodeSocket *socket, int depth=0)
static bool versioning_eevee_material_blend_mode_settings (bNodeTree *ntree, float threshold)
static void versioning_eevee_material_shadow_none (Material *material)
void do_versions_after_linking_420 (FileData *fd, Main *bmain)
static void image_settings_avi_to_ffmpeg (Scene *scene)
static void hue_correct_set_wrapping (CurveMapping *curve_mapping)
static bool strip_hue_correct_set_wrapping (Strip *strip, void *)
static void versioning_node_hue_correct_set_wrappng (bNodeTree *ntree)
static void add_image_editor_asset_shelf (Main &bmain)
static void version_refraction_depth_to_thickness_value (bNodeTree *ntree, float thickness)
static void versioning_update_timecode (short int *tc)
static bool strip_proxies_timecode_update (Strip *strip, void *)
static bool strip_text_data_update (Strip *strip, void *)
static void convert_grease_pencil_stroke_hardness_to_softness (GreasePencil *grease_pencil)
void blo_do_versions_420 (FileData *fd, Library *, Main *bmain)

Macro Definition Documentation

◆ DNA_DEPRECATED_ALLOW

#define DNA_DEPRECATED_ALLOW

Definition at line 9 of file versioning_420.cc.

◆ DNA_GENFILE_VERSIONING_MACROS

#define DNA_GENFILE_VERSIONING_MACROS

Definition at line 12 of file versioning_420.cc.

Function Documentation

◆ add_image_editor_asset_shelf()

◆ blo_do_versions_420()

void blo_do_versions_420 ( FileData * fd,
Library * lib,
Main * bmain )

Definition at line 770 of file versioning_420.cc.

References add_image_editor_asset_shelf(), all_scenes_use(), BLI_assert, BLI_findlink(), BLI_strdup(), BLO_reportf_wrap(), BRUSH_CURVES_SCULPT_FLAG_INTERPOLATE_RADIUS, BRUSH_LOCK_SIZE, Main::brushes, SpaceSeq::cache_overlay, NodeGeometryAttributeCapture::capture_items, NodeGeometryAttributeCapture::capture_items_num, ceil, CMP_NODE_BLUR, CMP_NODE_CURVE_RGB, CMP_NODE_DENOISE, CMP_NODE_DENOISE_PREFILTER_ACCURATE, CONSTRAINT_TYPE_ROTLIMIT, convert_grease_pencil_stroke_hardness_to_softness(), copy_v3_fl(), CurveMapping::cur, CURVE_TONE_FILMLIKE, NodeGeometryAttributeCaptureItem::data_type, NodeGeometryAttributeCapture::data_type_legacy, DEG2RADF, DNA_struct_default_get, Scene::eevee, ELEM, SceneEEVEE::fast_gi_ray_count, SceneEEVEE::fast_gi_step_count, SceneEEVEE::fast_gi_thickness_far, SceneEEVEE::fast_gi_thickness_near, FileData::filesdna, flag, SequencerCacheOverlay::flag, SpaceNodeOverlay::flag, View3D::flag2, FN_NODE_COMBINE_TRANSFORM, FN_NODE_SEPARATE_TRANSFORM, FOREACH_NODETREE_BEGIN, FOREACH_NODETREE_END, blender::seq::foreach_strip(), GEO_NODE_CAPTURE_ATTRIBUTE, Main::grease_pencils, NodeGeometryAttributeCaptureItem::identifier, image_settings_avi_to_ffmpeg(), bNode::inputs, LA_LOCAL, LA_SHAD_RES_ABSOLUTE, LA_SHADOW, LA_SPOT, LA_SUN, LA_USE_SOFT_FALLOFF, blender::bke::greasepencil::LEGACY_RADIUS_CONVERSION_FACTOR, Main::lightprobes, Main::lights, LIMIT_ROT_LEGACY_BEHAVIOR, LISTBASE_FOREACH, M_SQRT2, MA_BL_SS_REFRACTION, MA_BL_THICKNESS_FROM_SHADOW, MA_BL_TRANSLUCENCY, MA_BL_TRANSPARENT_SHADOW, MA_BM_BLEND, MA_BS_SOLID, MA_SURFACE_METHOD_DEFERRED, MA_SURFACE_METHOD_FORWARD, MA_THICKNESS_SLAB, MAIN_VERSION_FILE_ATLEAST, Main::materials, max_ii(), max_iii(), MEM_calloc_arrayN(), MEM_callocN(), Light::mode, Main::movieclips, NodeGeometryAttributeCaptureItem::name, NodeGeometryAttributeCapture::next_identifier, Main::nodetrees, NTREE_COMPOSIT, NTREE_GEOMETRY, NTREE_UNUSED_2, Main::objects, SpaceNode::overlay, R_FILTER_FAST_GAUSS, R_MBLUR, RE_engine_id_BLENDER_EEVEE, RE_engine_id_BLENDER_WORKBENCH, RE_engine_id_CYCLES, FileData::reports, RPT_, RPT_WARNING, SCE_COMPOSITOR_DEVICE_GPU, SCE_EEVEE_MOTION_BLUR_ENABLED_DEPRECATED, SCE_EEVEE_VOLUME_CUSTOM_RANGE, SCE_MB_CENTER, SCE_MB_END, SCE_MB_START, Main::scenes, Main::screens, SEQ_CACHE_SHOW_FINAL_OUT, SEQ_CACHE_UNUSED_5, SEQ_CACHE_UNUSED_6, SEQ_CACHE_UNUSED_7, SEQ_CACHE_UNUSED_8, SEQ_CACHE_UNUSED_9, SEQ_EDIT_SHOW_MISSING_MEDIA, SEQ_SNAP_TO_MARKERS, SET_FLAG_FROM_TEST, SH_NODE_OUTPUT_WORLD, Light::shadow_jitter_overblur, SceneEEVEE::shadow_resolution_scale, SN_OVERLAY_SHOW_REROUTE_AUTO_LABELS, SequencerToolSettings::snap_mode, SPACE_IMAGE, SPACE_NODE, SPACE_SEQ, SPACE_VIEW3D, STR_ELEM, STREQ, SpaceImage::stretch_opacity, strip_hue_correct_set_wrapping(), strip_proxies_timecode_update(), strip_text_data_update(), World::sun_angle, World::sun_shadow_filter_radius, World::sun_shadow_maximum_resolution, World::sun_threshold, MovieClipProxy::tc, CurveMapping::tone, blender::seq::tool_settings_ensure(), V3D_SHOW_CAMERA_GUIDES, V3D_SHOW_CAMERA_PASSEPARTOUT, version_cycles_properties_from_ID(), version_cycles_property_boolean(), version_cycles_property_int(), version_eevee_output_node_get(), version_node_input_socket_name(), version_node_output_socket_name(), version_refraction_depth_to_thickness_value(), Main::versionfile, versioning_node_hue_correct_set_wrappng(), versioning_update_timecode(), WO_USE_EEVEE_FINITE_VOLUME, WO_USE_SUN_SHADOW, and Main::worlds.

Referenced by do_versions().

◆ convert_grease_pencil_stroke_hardness_to_softness()

◆ do_versions_after_linking_420()

◆ hue_correct_set_wrapping()

◆ image_settings_avi_to_ffmpeg()

void image_settings_avi_to_ffmpeg ( Scene * scene)
static

◆ strip_hue_correct_set_wrapping()

bool strip_hue_correct_set_wrapping ( Strip * strip,
void *  )
static

◆ strip_proxies_timecode_update()

bool strip_proxies_timecode_update ( Strip * strip,
void *  )
static

◆ strip_text_data_update()

bool strip_text_data_update ( Strip * strip,
void *  )
static

Definition at line 725 of file versioning_420.cc.

References data, DEG2RADF, Strip::effectdata, STRIP_TYPE_TEXT, and Strip::type.

Referenced by blo_do_versions_420().

◆ version_bonecollection_anim()

void version_bonecollection_anim ( FCurve * fcurve)
static

Change animation/drivers from "collections[..." to "collections_all[..." so they remain stable when the bone collection hierarchy structure changes.

Definition at line 60 of file versioning_420.cc.

References BLI_sprintfN(), blender::StringRef::drop_known_prefix(), MEM_freeN(), FCurve::rna_path, and blender::StringRefBase::startswith().

Referenced by do_versions_after_linking_420().

◆ version_refraction_depth_to_thickness_value()

◆ versioning_eevee_alpha_source_get()

◆ versioning_eevee_material_blend_mode_settings()

bool versioning_eevee_material_blend_mode_settings ( bNodeTree * ntree,
float threshold )
static

This function detect the alpha input of a material node-tree and then convert the input alpha to a step function, either statically or using a math node when there is some value plugged in. If the closure mixture mix some alpha more than once, we cannot convert automatically and keep the same behavior. So we bail out in this case.

Only handles the closure tree from the output node.

Definition at line 310 of file versioning_420.cc.

References BLI_findlink(), copy_v4_v4(), bNode::custom1, ListBase::first, bNode::flag, float, bNodeLink::fromnode, bNodeLink::fromsock, bNode::inputs, AlphaSource::is_complex(), AlphaSource::is_transparency, bNodeSocket::link, bNode::locx_legacy, bNode::locy_legacy, min_ff(), blender::bke::node_add_link(), blender::bke::node_add_node(), NODE_COLLAPSED, blender::bke::node_find_socket(), NODE_MATH_GREATER_THAN, blender::bke::node_remove_link(), output, bNode::outputs, bNode::parent, SH_NODE_OUTPUT_MATERIAL, SOCK_IN, SOCK_RGBA, AlphaSource::socket, sum(), bNodeLink::tonode, bNodeLink::tosock, bNodeSocket::type, version_cycles_node_socket_float_value(), version_cycles_node_socket_rgba_value(), version_eevee_output_node_get(), versioning_eevee_alpha_source_get(), and bNode::width.

Referenced by do_versions_after_linking_420().

◆ versioning_eevee_material_shadow_none()

◆ versioning_eevee_shadow_settings()

void versioning_eevee_shadow_settings ( Object * object)
static

EEVEE no longer uses the Material::blend_shadow property. Instead, it uses Object::visibility_flag for disabling shadow casting

Definition at line 73 of file versioning_420.cc.

References BKE_object_material_get(), BKE_object_material_len_p(), Material::blend_shadow, i, MA_BS_NONE, OB_HIDE_SHADOW, SET_FLAG_FROM_TEST, and Object::visibility_flag.

Referenced by do_versions_after_linking_420().

◆ versioning_node_hue_correct_set_wrappng()

void versioning_node_hue_correct_set_wrappng ( bNodeTree * ntree)
static

◆ versioning_update_timecode()

void versioning_update_timecode ( short int * tc)
static

Definition at line 707 of file versioning_420.cc.

References ELEM, and IMB_TC_RECORD_RUN.

Referenced by blo_do_versions_420(), and strip_proxies_timecode_update().