diff options
author | Jacques Lucke <jacques@blender.org> | 2020-08-28 14:18:24 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2020-08-28 14:18:24 +0300 |
commit | 0e021414fe9921164bd96340be8d9e2c49e4669a (patch) | |
tree | 0a6a888641040939cf8707f08668550e329e80af /source/blender/blenloader/intern/readfile.c | |
parent | a443287908248d0b83f490f0993d857fb1d73fec (diff) |
Cleanup: improve function names
With this change, the three .blend read operations: data reading, lib reading
and expanding are more grouped together.
Diffstat (limited to 'source/blender/blenloader/intern/readfile.c')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 86 |
1 files changed, 43 insertions, 43 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index b35ad3d34c6..c24db724222 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -2298,11 +2298,11 @@ static void lib_link_id(BlendLibReader *reader, ID *id) { /* Note: WM IDProperties are never written to file, hence they should always be NULL here. */ BLI_assert((GS(id->name) != ID_WM) || id->properties == NULL); - IDP_BlendLibRead(reader, id->properties); + IDP_BlendReadLib(reader, id->properties); AnimData *adt = BKE_animdata_from_id(id); if (adt != NULL) { - BKE_animdata_blend_lib_read(reader, id, adt); + BKE_animdata_blend_read_lib(reader, id, adt); } if (id->override_library) { @@ -2721,7 +2721,7 @@ static void lib_link_action(BlendLibReader *reader, bAction *act) } // >>> XXX deprecated - old animation system - BKE_fcurve_blend_lib_read(reader, &act->id, &act->curves); + BKE_fcurve_blend_read_lib(reader, &act->id, &act->curves); LISTBASE_FOREACH (TimeMarker *, marker, &act->markers) { if (marker->camera) { @@ -2745,7 +2745,7 @@ static void direct_link_action(BlendDataReader *reader, bAction *act) } // >>> XXX deprecated - old animation system - BKE_fcurve_blend_data_read(reader, &act->curves); + BKE_fcurve_blend_read_data(reader, &act->curves); LISTBASE_FOREACH (bActionGroup *, agrp, &act->groups) { BLO_read_data_address(reader, &agrp->channels.first); @@ -2799,7 +2799,7 @@ static void direct_link_cachefile(BlendDataReader *reader, CacheFile *cache_file /* relink animdata */ BLO_read_data_address(reader, &cache_file->adt); - BKE_animdata_blend_data_read(reader, cache_file->adt); + BKE_animdata_blend_read_data(reader, cache_file->adt); } /** \} */ @@ -2881,7 +2881,7 @@ static void lib_link_workspace_instance_hook(BlendLibReader *reader, static void lib_link_node_socket(BlendLibReader *reader, Library *lib, bNodeSocket *sock) { - IDP_BlendLibRead(reader, sock->prop); + IDP_BlendReadLib(reader, sock->prop); switch ((eNodeSocketDatatype)sock->type) { case SOCK_OBJECT: { @@ -2928,7 +2928,7 @@ static void lib_link_ntree(BlendLibReader *reader, Library *lib, bNodeTree *ntre LISTBASE_FOREACH (bNode *, node, &ntree->nodes) { /* Link ID Properties -- and copy this comment EXACTLY for easy finding * of library blocks that implement this.*/ - IDP_BlendLibRead(reader, node->prop); + IDP_BlendReadLib(reader, node->prop); BLO_read_id_address(reader, lib, &node->id); @@ -2986,7 +2986,7 @@ static void direct_link_nodetree(BlendDataReader *reader, bNodeTree *ntree) ntree->execdata = NULL; BLO_read_data_address(reader, &ntree->adt); - BKE_animdata_blend_data_read(reader, ntree->adt); + BKE_animdata_blend_read_data(reader, ntree->adt); BLO_read_list(reader, &ntree->nodes); LISTBASE_FOREACH (bNode *, node, &ntree->nodes) { @@ -3253,7 +3253,7 @@ static void lib_link_pose(BlendLibReader *reader, Object *ob, bPose *pose) pchan->bone = BKE_armature_find_bone_name(arm, pchan->name); - IDP_BlendLibRead(reader, pchan->prop); + IDP_BlendReadLib(reader, pchan->prop); BLO_read_id_address(reader, arm->id.lib, &pchan->custom); if (UNLIKELY(pchan->bone == NULL)) { @@ -3275,7 +3275,7 @@ static void lib_link_pose(BlendLibReader *reader, Object *ob, bPose *pose) static void lib_link_bones(BlendLibReader *reader, Bone *bone) { - IDP_BlendLibRead(reader, bone->prop); + IDP_BlendReadLib(reader, bone->prop); LISTBASE_FOREACH (Bone *, curbone, &bone->childbase) { lib_link_bones(reader, curbone); @@ -3316,7 +3316,7 @@ static void direct_link_armature(BlendDataReader *reader, bArmature *arm) arm->needs_flush_to_id = 0; BLO_read_data_address(reader, &arm->adt); - BKE_animdata_blend_data_read(reader, arm->adt); + BKE_animdata_blend_read_data(reader, arm->adt); LISTBASE_FOREACH (Bone *, bone, &arm->bonebase) { direct_link_bones(reader, bone); @@ -3350,7 +3350,7 @@ static void lib_link_camera(BlendLibReader *reader, Camera *ca) static void direct_link_camera(BlendDataReader *reader, Camera *ca) { BLO_read_data_address(reader, &ca->adt); - BKE_animdata_blend_data_read(reader, ca->adt); + BKE_animdata_blend_read_data(reader, ca->adt); BLO_read_list(reader, &ca->bg_images); @@ -3374,7 +3374,7 @@ static void lib_link_light(BlendLibReader *reader, Light *la) static void direct_link_light(BlendDataReader *reader, Light *la) { BLO_read_data_address(reader, &la->adt); - BKE_animdata_blend_data_read(reader, la->adt); + BKE_animdata_blend_read_data(reader, la->adt); BLO_read_data_address(reader, &la->curfalloff); if (la->curfalloff) { @@ -3438,7 +3438,7 @@ static void direct_link_key(BlendDataReader *reader, Key *key) BLO_read_list(reader, &(key->block)); BLO_read_data_address(reader, &key->adt); - BKE_animdata_blend_data_read(reader, key->adt); + BKE_animdata_blend_read_data(reader, key->adt); BLO_read_data_address(reader, &key->refkey); @@ -3469,7 +3469,7 @@ static void lib_link_mball(BlendLibReader *reader, MetaBall *mb) static void direct_link_mball(BlendDataReader *reader, MetaBall *mb) { BLO_read_data_address(reader, &mb->adt); - BKE_animdata_blend_data_read(reader, mb->adt); + BKE_animdata_blend_read_data(reader, mb->adt); BLO_read_pointer_array(reader, (void **)&mb->mat); @@ -3498,7 +3498,7 @@ static void lib_link_world(BlendLibReader *reader, World *wrld) static void direct_link_world(BlendDataReader *reader, World *wrld) { BLO_read_data_address(reader, &wrld->adt); - BKE_animdata_blend_data_read(reader, wrld->adt); + BKE_animdata_blend_read_data(reader, wrld->adt); wrld->preview = direct_link_preview_image(reader, wrld->preview); BLI_listbase_clear(&wrld->gpumaterial); @@ -3649,7 +3649,7 @@ static void switch_endian_knots(Nurb *nu) static void direct_link_curve(BlendDataReader *reader, Curve *cu) { BLO_read_data_address(reader, &cu->adt); - BKE_animdata_blend_data_read(reader, cu->adt); + BKE_animdata_blend_read_data(reader, cu->adt); /* Protect against integer overflow vulnerability. */ CLAMP(cu->len_char32, 0, INT_MAX - 4); @@ -3718,7 +3718,7 @@ static void lib_link_texture(BlendLibReader *reader, Tex *tex) static void direct_link_texture(BlendDataReader *reader, Tex *tex) { BLO_read_data_address(reader, &tex->adt); - BKE_animdata_blend_data_read(reader, tex->adt); + BKE_animdata_blend_read_data(reader, tex->adt); BLO_read_data_address(reader, &tex->coba); @@ -3753,7 +3753,7 @@ static void lib_link_material(BlendLibReader *reader, Material *ma) static void direct_link_material(BlendDataReader *reader, Material *ma) { BLO_read_data_address(reader, &ma->adt); - BKE_animdata_blend_data_read(reader, ma->adt); + BKE_animdata_blend_read_data(reader, ma->adt); ma->texpaintslot = NULL; @@ -3934,7 +3934,7 @@ static void direct_link_particlesettings(BlendDataReader *reader, ParticleSettin BLO_read_data_address(reader, &part->pd); BLO_read_data_address(reader, &part->pd2); - BKE_animdata_blend_data_read(reader, part->adt); + BKE_animdata_blend_read_data(reader, part->adt); direct_link_partdeflect(part->pd); direct_link_partdeflect(part->pd2); @@ -4249,7 +4249,7 @@ static void direct_link_mesh(BlendDataReader *reader, Mesh *mesh) /* animdata */ BLO_read_data_address(reader, &mesh->adt); - BKE_animdata_blend_data_read(reader, mesh->adt); + BKE_animdata_blend_read_data(reader, mesh->adt); /* Normally direct_link_dverts should be called in direct_link_customdata, * but for backwards compatibility in do_versions to work we do it here. */ @@ -4344,7 +4344,7 @@ static void direct_link_latt(BlendDataReader *reader, Lattice *lt) lt->batch_cache = NULL; BLO_read_data_address(reader, <->adt); - BKE_animdata_blend_data_read(reader, lt->adt); + BKE_animdata_blend_read_data(reader, lt->adt); } /** \} */ @@ -5049,7 +5049,7 @@ static void direct_link_object(BlendDataReader *reader, Object *ob) } BLO_read_data_address(reader, &ob->adt); - BKE_animdata_blend_data_read(reader, ob->adt); + BKE_animdata_blend_read_data(reader, ob->adt); BLO_read_data_address(reader, &ob->pose); direct_link_pose(reader, ob->pose); @@ -5329,7 +5329,7 @@ static void lib_link_view_layer(BlendLibReader *reader, Library *lib, ViewLayer BLO_read_id_address(reader, lib, &view_layer->mat_override); - IDP_BlendLibRead(reader, view_layer->id_properties); + IDP_BlendReadLib(reader, view_layer->id_properties); } /** \} */ @@ -5622,7 +5622,7 @@ static void lib_link_scene(BlendLibReader *reader, Scene *sce) Sequence *seq; SEQ_ALL_BEGIN (sce->ed, seq) { - IDP_BlendLibRead(reader, seq->prop); + IDP_BlendReadLib(reader, seq->prop); if (seq->ipo) { BLO_read_id_address( @@ -5827,7 +5827,7 @@ static void direct_link_scene(BlendDataReader *reader, Scene *sce) BLO_read_list(reader, &(sce->base)); BLO_read_data_address(reader, &sce->adt); - BKE_animdata_blend_data_read(reader, sce->adt); + BKE_animdata_blend_read_data(reader, sce->adt); BLO_read_list(reader, &sce->keyingsets); direct_link_keyingsets(reader, &sce->keyingsets); @@ -6147,7 +6147,7 @@ static void direct_link_gpencil(BlendDataReader *reader, bGPdata *gpd) /* relink animdata */ BLO_read_data_address(reader, &gpd->adt); - BKE_animdata_blend_data_read(reader, gpd->adt); + BKE_animdata_blend_read_data(reader, gpd->adt); /* Ensure full objectmode for linked grease pencil. */ if (gpd->id.lib != NULL) { @@ -7501,7 +7501,7 @@ static void lib_link_lightprobe(BlendLibReader *reader, LightProbe *prb) static void direct_link_lightprobe(BlendDataReader *reader, LightProbe *prb) { BLO_read_data_address(reader, &prb->adt); - BKE_animdata_blend_data_read(reader, prb->adt); + BKE_animdata_blend_read_data(reader, prb->adt); } /** \} */ @@ -7518,7 +7518,7 @@ static void lib_link_speaker(BlendLibReader *reader, Speaker *spk) static void direct_link_speaker(BlendDataReader *reader, Speaker *spk) { BLO_read_data_address(reader, &spk->adt); - BKE_animdata_blend_data_read(reader, spk->adt); + BKE_animdata_blend_read_data(reader, spk->adt); #if 0 spk->sound = newdataadr(fd, spk->sound); @@ -7964,7 +7964,7 @@ static void direct_link_linestyle_geometry_modifier(BlendDataReader *UNUSED(read static void direct_link_linestyle(BlendDataReader *reader, FreestyleLineStyle *linestyle) { BLO_read_data_address(reader, &linestyle->adt); - BKE_animdata_blend_data_read(reader, linestyle->adt); + BKE_animdata_blend_read_data(reader, linestyle->adt); BLO_read_list(reader, &linestyle->color_modifiers); LISTBASE_FOREACH (LineStyleModifier *, modifier, &linestyle->color_modifiers) { direct_link_linestyle_color_modifier(reader, modifier); @@ -8002,7 +8002,7 @@ static void lib_link_hair(BlendLibReader *reader, Hair *hair) static void direct_link_hair(BlendDataReader *reader, Hair *hair) { BLO_read_data_address(reader, &hair->adt); - BKE_animdata_blend_data_read(reader, hair->adt); + BKE_animdata_blend_read_data(reader, hair->adt); /* Geometry */ direct_link_customdata(reader, &hair->pdata, hair->totpoint); @@ -8029,7 +8029,7 @@ static void lib_link_pointcloud(BlendLibReader *reader, PointCloud *pointcloud) static void direct_link_pointcloud(BlendDataReader *reader, PointCloud *pointcloud) { BLO_read_data_address(reader, &pointcloud->adt); - BKE_animdata_blend_data_read(reader, pointcloud->adt); + BKE_animdata_blend_read_data(reader, pointcloud->adt); /* Geometry */ direct_link_customdata(reader, &pointcloud->pdata, pointcloud->totpoint); @@ -8060,7 +8060,7 @@ static void lib_link_volume(BlendLibReader *reader, Volume *volume) static void direct_link_volume(BlendDataReader *reader, Volume *volume) { BLO_read_data_address(reader, &volume->adt); - BKE_animdata_blend_data_read(reader, volume->adt); + BKE_animdata_blend_read_data(reader, volume->adt); volume->packedfile = direct_link_packedfile(reader, volume->packedfile); volume->runtime.frame = 0; @@ -8085,7 +8085,7 @@ static void lib_link_simulation(BlendLibReader *reader, Simulation *simulation) static void direct_link_simulation(BlendDataReader *reader, Simulation *simulation) { BLO_read_data_address(reader, &simulation->adt); - BKE_animdata_blend_data_read(reader, simulation->adt); + BKE_animdata_blend_read_data(reader, simulation->adt); BLO_read_list(reader, &simulation->states); LISTBASE_FOREACH (SimulationState *, state, &simulation->states) { @@ -9701,7 +9701,7 @@ static void expand_id_embedded_id(BlendExpander *expander, ID *id) static void expand_id(BlendExpander *expander, ID *id) { - IDP_BlendExpand(expander, id->properties); + IDP_BlendReadExpand(expander, id->properties); if (id->override_library) { BLO_expand(expander, id->override_library->reference); @@ -9710,7 +9710,7 @@ static void expand_id(BlendExpander *expander, ID *id) AnimData *adt = BKE_animdata_from_id(id); if (adt != NULL) { - BKE_animdata_blend_expand(expander, adt); + BKE_animdata_blend_read_expand(expander, adt); } expand_id_embedded_id(expander, id); @@ -9726,7 +9726,7 @@ static void expand_action(BlendExpander *expander, bAction *act) // --------------------------------------------------- /* F-Curves in Action */ - BKE_fcurve_blend_expand(expander, &act->curves); + BKE_fcurve_blend_read_expand(expander, &act->curves); LISTBASE_FOREACH (TimeMarker *, marker, &act->markers) { if (marker->camera) { @@ -9817,7 +9817,7 @@ static void expand_key(BlendExpander *expander, Key *key) static void expand_node_socket(BlendExpander *expander, bNodeSocket *sock) { - IDP_BlendExpand(expander, sock->prop); + IDP_BlendReadExpand(expander, sock->prop); if (sock->default_value != NULL) { @@ -9868,7 +9868,7 @@ static void expand_nodetree(BlendExpander *expander, bNodeTree *ntree) BLO_expand(expander, node->id); } - IDP_BlendExpand(expander, node->prop); + IDP_BlendReadExpand(expander, node->prop); expand_node_sockets(expander, &node->inputs); expand_node_sockets(expander, &node->outputs); @@ -9986,14 +9986,14 @@ static void expand_pose(BlendExpander *expander, bPose *pose) LISTBASE_FOREACH (bPoseChannel *, chan, &pose->chanbase) { expand_constraints(expander, &chan->constraints); - IDP_BlendExpand(expander, chan->prop); + IDP_BlendReadExpand(expander, chan->prop); BLO_expand(expander, chan->custom); } } static void expand_bones(BlendExpander *expander, Bone *bone) { - IDP_BlendExpand(expander, bone->prop); + IDP_BlendReadExpand(expander, bone->prop); LISTBASE_FOREACH (Bone *, curBone, &bone->childbase) { expand_bones(expander, curBone); @@ -10140,7 +10140,7 @@ static void expand_scene(BlendExpander *expander, Scene *sce) } LISTBASE_FOREACH (ViewLayer *, view_layer, &sce->view_layers) { - IDP_BlendExpand(expander, view_layer->id_properties); + IDP_BlendReadExpand(expander, view_layer->id_properties); LISTBASE_FOREACH (FreestyleModuleConfig *, module, &view_layer->freestyle_config.modules) { if (module->script) { @@ -10164,7 +10164,7 @@ static void expand_scene(BlendExpander *expander, Scene *sce) Sequence *seq; SEQ_ALL_BEGIN (sce->ed, seq) { - IDP_BlendExpand(expander, seq->prop); + IDP_BlendReadExpand(expander, seq->prop); if (seq->scene) { BLO_expand(expander, seq->scene); |