[Bf-blender-cvs] [cb82ec1] alembic_pointcache: Remaining RNA type mappings to pointcache readers/writers.
Lukas Tönne
noreply at git.blender.org
Thu Oct 16 16:54:13 CEST 2014
Commit: cb82ec10bd5cd9c03251c23a8182c4a1c803e6e0
Author: Lukas Tönne
Date: Fri Jan 10 11:55:48 2014 +0100
Branches: alembic_pointcache
https://developer.blender.org/rBcb82ec10bd5cd9c03251c23a8182c4a1c803e6e0
Remaining RNA type mappings to pointcache readers/writers.
===================================================================
M source/blender/pointcache/PTC_api.cpp
===================================================================
diff --git a/source/blender/pointcache/PTC_api.cpp b/source/blender/pointcache/PTC_api.cpp
index a823976..75622c1 100644
--- a/source/blender/pointcache/PTC_api.cpp
+++ b/source/blender/pointcache/PTC_api.cpp
@@ -107,6 +107,31 @@ PTCWriter *PTC_writer_from_rna(Scene *scene, PointerRNA *ptr)
ParticleSystem *psys = (ParticleSystem *)ptr->data;
return PTC_writer_particles(scene, ob, psys);
}
+ if (RNA_struct_is_a(ptr->type, &RNA_ClothModifier)) {
+ Object *ob = (Object *)ptr->id.data;
+ ClothModifierData *clmd = (ClothModifierData *)ptr->data;
+ return PTC_writer_cloth(scene, ob, clmd);
+ }
+ if (RNA_struct_is_a(ptr->type, &RNA_SoftBodySettings)) {
+ Object *ob = (Object *)ptr->id.data;
+ SoftBody *softbody = (SoftBody *)ptr->data;
+ return PTC_writer_softbody(scene, ob, softbody);
+ }
+ if (RNA_struct_is_a(ptr->type, &RNA_RigidBodyWorld)) {
+ BLI_assert((Scene *)ptr->id.data == scene);
+ RigidBodyWorld *rbw = (RigidBodyWorld *)ptr->data;
+ return PTC_writer_rigidbody(scene, rbw);
+ }
+ if (RNA_struct_is_a(ptr->type, &RNA_SmokeDomainSettings)) {
+ Object *ob = (Object *)ptr->id.data;
+ SmokeDomainSettings *domain = (SmokeDomainSettings *)ptr->data;
+ return PTC_writer_smoke(scene, ob, domain);
+ }
+ if (RNA_struct_is_a(ptr->type, &RNA_DynamicPaintSurface)) {
+ Object *ob = (Object *)ptr->id.data;
+ DynamicPaintSurface *surface = (DynamicPaintSurface *)ptr->data;
+ return PTC_writer_dynamicpaint(scene, ob, surface);
+ }
return NULL;
}
@@ -117,6 +142,31 @@ PTCReader *PTC_reader_from_rna(Scene *scene, PointerRNA *ptr)
ParticleSystem *psys = (ParticleSystem *)ptr->data;
return PTC_reader_particles(scene, ob, psys);
}
+ if (RNA_struct_is_a(ptr->type, &RNA_ClothModifier)) {
+ Object *ob = (Object *)ptr->id.data;
+ ClothModifierData *clmd = (ClothModifierData *)ptr->data;
+ return PTC_reader_cloth(scene, ob, clmd);
+ }
+ if (RNA_struct_is_a(ptr->type, &RNA_SoftBodySettings)) {
+ Object *ob = (Object *)ptr->id.data;
+ SoftBody *softbody = (SoftBody *)ptr->data;
+ return PTC_reader_softbody(scene, ob, softbody);
+ }
+ if (RNA_struct_is_a(ptr->type, &RNA_RigidBodyWorld)) {
+ BLI_assert((Scene *)ptr->id.data == scene);
+ RigidBodyWorld *rbw = (RigidBodyWorld *)ptr->data;
+ return PTC_reader_rigidbody(scene, rbw);
+ }
+ if (RNA_struct_is_a(ptr->type, &RNA_SmokeDomainSettings)) {
+ Object *ob = (Object *)ptr->id.data;
+ SmokeDomainSettings *domain = (SmokeDomainSettings *)ptr->data;
+ return PTC_reader_smoke(scene, ob, domain);
+ }
+ if (RNA_struct_is_a(ptr->type, &RNA_DynamicPaintSurface)) {
+ Object *ob = (Object *)ptr->id.data;
+ DynamicPaintSurface *surface = (DynamicPaintSurface *)ptr->data;
+ return PTC_reader_dynamicpaint(scene, ob, surface);
+ }
return NULL;
}
More information about the Bf-blender-cvs
mailing list