From 89826e0a0d8ac55881569e021c487ac5541c6612 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Thu, 4 Apr 2019 15:07:37 +0200 Subject: Alembic: integrate cache file into the dependency graph * The cache file datablock is now evaluated as part of the dependency graph, creating/freeing the Alembic file handle matching the current frame. Modifiers and constraints depend on this evaluation. * Cache file handles and readers now only exist on COW datablocks, never the original ones. * Object data paths are flushed back to the original for the user interface. * The cache file keeps a list of all readers associated with its handle, and automatically frees them when the handle is freed. This kind of sharing of data across datablocks is weak but we have no better mechanism for it. Fix T62720: Alembic sequences not working and crashing Differential Revision: https://developer.blender.org/D4774 --- source/blender/makesrna/intern/rna_modifier.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'source/blender/makesrna/intern/rna_modifier.c') diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index 8a63bf1a619..4f304f97cac 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -1300,19 +1300,6 @@ static bool rna_SurfaceDeformModifier_is_bound_get(PointerRNA *ptr) return (((SurfaceDeformModifierData *)ptr->data)->verts != NULL); } -static void rna_MeshSequenceCache_object_path_update(Main *bmain, Scene *scene, PointerRNA *ptr) -{ -# ifdef WITH_ALEMBIC - MeshSeqCacheModifierData *mcmd = (MeshSeqCacheModifierData *)ptr->data; - Object *ob = (Object *)ptr->id.data; - - mcmd->reader = CacheReader_open_alembic_object( - mcmd->cache_file->handle, mcmd->reader, ob, mcmd->object_path); -# endif - - rna_Modifier_update(bmain, scene, ptr); -} - static bool rna_ParticleInstanceModifier_particle_system_poll(PointerRNA *ptr, const PointerRNA value) { @@ -5107,7 +5094,7 @@ static void rna_def_modifier_meshseqcache(BlenderRNA *brna) prop, "Object Path", "Path to the object in the Alembic archive used to lookup geometric data"); - RNA_def_property_update(prop, 0, "rna_MeshSequenceCache_object_path_update"); + RNA_def_property_update(prop, 0, "rna_Modifier_update"); static const EnumPropertyItem read_flag_items[] = { {MOD_MESHSEQ_READ_VERT, "VERT", 0, "Vertex", ""}, -- cgit v1.2.3