[Bf-blender-cvs] [3ddf2c2] gooseberry: Deleted unimplemented parts of the previous pointcache system, to make refactoring simpler.

Lukas Tönne noreply at git.blender.org
Mon Mar 23 13:01:08 CET 2015


Commit: 3ddf2c232f34a445f31a2b80493c52ae027e2817
Author: Lukas Tönne
Date:   Tue Feb 24 18:39:03 2015 +0100
Branches: gooseberry
https://developer.blender.org/rB3ddf2c232f34a445f31a2b80493c52ae027e2817

Deleted unimplemented parts of the previous pointcache system, to make
refactoring simpler.

Since the new approach is not tied to the old set of point cache data
types there is really no need to carry their empty husks around. Once
the new caching system is defined in detail we can add back whatever
makes sense.

===================================================================

M	source/blender/pointcache/PTC_api.cpp
M	source/blender/pointcache/PTC_api.h
M	source/blender/pointcache/alembic/CMakeLists.txt
D	source/blender/pointcache/alembic/abc_dynamicpaint.cpp
D	source/blender/pointcache/alembic/abc_dynamicpaint.h
D	source/blender/pointcache/alembic/abc_rigidbody.cpp
D	source/blender/pointcache/alembic/abc_rigidbody.h
D	source/blender/pointcache/alembic/abc_smoke.cpp
D	source/blender/pointcache/alembic/abc_smoke.h
D	source/blender/pointcache/alembic/abc_softbody.cpp
D	source/blender/pointcache/alembic/abc_softbody.h
M	source/blender/pointcache/intern/alembic.h
M	source/blender/pointcache/intern/ptc_types.h

===================================================================

diff --git a/source/blender/pointcache/PTC_api.cpp b/source/blender/pointcache/PTC_api.cpp
index 645a865..3ffed41 100644
--- a/source/blender/pointcache/PTC_api.cpp
+++ b/source/blender/pointcache/PTC_api.cpp
@@ -178,26 +178,6 @@ PTCWriter *PTC_writer_from_rna(Scene *scene, PointerRNA *ptr)
 		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);
-	}
 #if 0 /* modifier uses internal writer during scene update */
 	if (RNA_struct_is_a(ptr->type, &RNA_PointCacheModifier)) {
 		Object *ob = (Object *)ptr->id.data;
@@ -230,26 +210,6 @@ PTCReader *PTC_reader_from_rna(Scene *scene, PointerRNA *ptr)
 		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);
-	}
 	if (RNA_struct_is_a(ptr->type, &RNA_PointCacheModifier)) {
 		Object *ob = (Object *)ptr->id.data;
 		PointCacheModifierData *pcmd = (PointCacheModifierData *)ptr->data;
@@ -275,21 +235,6 @@ PTCReader *PTC_reader_cloth(PTCReaderArchive *_archive, Object *ob, ClothModifie
 }
 
 
-/* ==== DYNAMIC PAINT ==== */
-
-PTCWriter *PTC_writer_dynamicpaint(PTCWriterArchive *_archive, Object *ob, DynamicPaintSurface *surface)
-{
-	PTC::WriterArchive *archive = (PTC::WriterArchive *)_archive;
-	return (PTCWriter *)abc_writer_dynamicpaint(archive, ob, surface);
-}
-
-PTCReader *PTC_reader_dynamicpaint(PTCReaderArchive *_archive, Object *ob, DynamicPaintSurface *surface)
-{
-	PTC::ReaderArchive *archive = (PTC::ReaderArchive *)_archive;
-	return (PTCReader *)abc_reader_dynamicpaint(archive, ob, surface);
-}
-
-
 /* ==== MESH ==== */
 
 PTCWriter *PTC_writer_point_cache(PTCWriterArchive *_archive, Object *ob, PointCacheModifierData *pcmd)
@@ -398,48 +343,3 @@ PTCReader *PTC_reader_particle_paths(PTCReaderArchive *_archive, Object *ob, Par
 	PTC::ReaderArchive *archive = (PTC::ReaderArchive *)_archive;
 	return (PTCReader *)abc_reader_particle_paths(archive, ob, psys, mode);
 }
-
-
-/* ==== RIGID BODY ==== */
-
-PTCWriter *PTC_writer_rigidbody(PTCWriterArchive *_archive, Scene *scene, RigidBodyWorld *rbw)
-{
-	PTC::WriterArchive *archive = (PTC::WriterArchive *)_archive;
-	return (PTCWriter *)abc_writer_rigidbody(archive, scene, rbw);
-}
-
-PTCReader *PTC_reader_rigidbody(PTCReaderArchive *_archive, Scene *scene, RigidBodyWorld *rbw)
-{
-	PTC::ReaderArchive *archive = (PTC::ReaderArchive *)_archive;
-	return (PTCReader *)abc_reader_rigidbody(archive, scene, rbw);
-}
-
-
-/* ==== SMOKE ==== */
-
-PTCWriter *PTC_writer_smoke(PTCWriterArchive *_archive, Object *ob, SmokeDomainSettings *domain)
-{
-	PTC::WriterArchive *archive = (PTC::WriterArchive *)_archive;
-	return (PTCWriter *)abc_writer_smoke(archive, ob, domain);
-}
-
-PTCReader *PTC_reader_smoke(PTCReaderArchive *_archive, Object *ob, SmokeDomainSettings *domain)
-{
-	PTC::ReaderArchive *archive = (PTC::ReaderArchive *)_archive;
-	return (PTCReader *)abc_reader_smoke(archive, ob, domain);
-}
-
-
-/* ==== SOFT BODY ==== */
-
-PTCWriter *PTC_writer_softbody(PTCWriterArchive *_archive, Object *ob, SoftBody *softbody)
-{
-	PTC::WriterArchive *archive = (PTC::WriterArchive *)_archive;
-	return (PTCWriter *)abc_writer_softbody(archive, ob, softbody);
-}
-
-PTCReader *PTC_reader_softbody(PTCReaderArchive *_archive, Object *ob, SoftBody *softbody)
-{
-	PTC::ReaderArchive *archive = (PTC::ReaderArchive *)_archive;
-	return (PTCReader *)abc_reader_softbody(archive, ob, softbody);
-}
diff --git a/source/blender/pointcache/PTC_api.h b/source/blender/pointcache/PTC_api.h
index 78a0c2b..9905913 100644
--- a/source/blender/pointcache/PTC_api.h
+++ b/source/blender/pointcache/PTC_api.h
@@ -95,22 +95,6 @@ struct PTCReader *PTC_reader_particle_paths(struct PTCReaderArchive *archive, st
 struct PTCWriter *PTC_writer_cloth(struct PTCWriterArchive *archive, struct Object *ob, struct ClothModifierData *clmd);
 struct PTCReader *PTC_reader_cloth(struct PTCReaderArchive *archive, struct Object *ob, struct ClothModifierData *clmd);
 
-/* SoftBody */
-struct PTCWriter *PTC_writer_softbody(struct PTCWriterArchive *archive, struct Object *ob, struct SoftBody *softbody);
-struct PTCReader *PTC_reader_softbody(struct PTCReaderArchive *archive, struct Object *ob, struct SoftBody *softbody);
-
-/* Rigid Bodies */
-struct PTCWriter *PTC_writer_rigidbody(struct PTCWriterArchive *archive, struct Scene *scene, struct RigidBodyWorld *rbw);
-struct PTCReader *PTC_reader_rigidbody(struct PTCReaderArchive *archive, struct Scene *scene, struct RigidBodyWorld *rbw);
-
-/* Smoke */
-struct PTCWriter *PTC_writer_smoke(struct PTCWriterArchive *archive, struct Object *ob, struct SmokeDomainSettings *domain);
-struct PTCReader *PTC_reader_smoke(struct PTCReaderArchive *archive, struct Object *ob, struct SmokeDomainSettings *domain);
-
-/* Dynamic Paint */
-struct PTCWriter *PTC_writer_dynamicpaint(struct PTCWriterArchive *archive, struct Object *ob, struct DynamicPaintSurface *surface);
-struct PTCReader *PTC_reader_dynamicpaint(struct PTCReaderArchive *archive, struct Object *ob, struct DynamicPaintSurface *surface);
-
 /* Modifier Stack */
 typedef enum ePointCacheModifierMode {
 	MOD_POINTCACHE_MODE_NONE,
diff --git a/source/blender/pointcache/alembic/CMakeLists.txt b/source/blender/pointcache/alembic/CMakeLists.txt
index ac5dba0..acb9767 100644
--- a/source/blender/pointcache/alembic/CMakeLists.txt
+++ b/source/blender/pointcache/alembic/CMakeLists.txt
@@ -50,18 +50,10 @@ set(SRC
 
 	abc_cloth.cpp
 	abc_cloth.h
-	abc_dynamicpaint.cpp
-	abc_dynamicpaint.h
 	abc_mesh.cpp
 	abc_mesh.h
 	abc_particles.cpp
 	abc_particles.h
-	abc_rigidbody.cpp
-	abc_rigidbody.h
-	abc_smoke.cpp
-	abc_smoke.h
-	abc_softbody.cpp
-	abc_softbody.h
 )
 
 add_definitions(-DWITH_ALEMBIC)
diff --git a/source/blender/pointcache/alembic/abc_dynamicpaint.cpp b/source/blender/pointcache/alembic/abc_dynamicpaint.cpp
deleted file mode 100644
index 76e3204..0000000
--- a/source/blender/pointcache/alembic/abc_dynamicpaint.cpp
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Copyright 2013, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-#include "alembic.h"
-#include "abc_dynamicpaint.h"
-#include "util_path.h"
-
-extern "C" {
-#include "DNA_object_types.h"
-#include "DNA_dynamicpaint_types.h"
-}
-
-#include "PTC_api.h"
-
-namespace PTC {
-
-using namespace Abc;
-using namespace AbcGeom;
-
-AbcDynamicPaintWriter::AbcDynamicPaintWriter(AbcWriterArchive *archive, Object *ob, DynamicPaintSurface *surface) :
-    DynamicPaintWriter(ob, surface, archive),
-    AbcWriter(archive)
-{
-	if (archive->archive) {
-	}
-}
-
-AbcDynamicPaintWriter::~AbcDynamicPaintWriter()
-{
-}
-
-void AbcDynamicPaintWriter::write_sample()
-{
-	if (!archive()->archive)
-		return;
-}
-
-
-AbcDynamicPaintReader::AbcDynamicPaintReader(AbcReaderArchive *archive, Object *ob, DynamicPaintSurface *surface) :
-    DynamicPaintReader(ob, surface, archive),
-    AbcReader(archive)
-{
-	if (archive->archive.valid()) {
-		IObject root = archive->archive.getTop();
-//		m_points = IPoints(root, m_psys->name);
-	}
-}
-
-AbcDynamicPaintReader::~AbcDynamicPaintReader()
-{
-}
-
-PTCReadSampleResult AbcDynamicPaintReader::read_sample(float frame)
-{
-	return PTC_READ_SAMPLE_INVALID;
-}
-
-/* ==== API ==== */
-
-Writer *abc_writer_dynamicpaint(WriterArchive *archive, Object *ob, DynamicPaintSurface *surface)
-{
-	BLI_assert(dynamic_cast<AbcWriterArchive *>(archive));
-	return new AbcDynamicPaintWriter((AbcWriterArchive *)archive, ob, surface);
-}
-
-Reader *abc_reader_dynamicpaint(ReaderArchive *archive, Object *ob, DynamicPaintSurface *surface)
-{
-	BLI_assert(dynamic_cast<AbcReaderArchive *>(archive));
-	return new AbcDynamicPaintReader((AbcReaderArchive *)archive, ob, surface);
-}
-
-} /* namespace PTC */
diff --git a/source/blender/pointcache/alembic/abc_dynamicpaint.h b/source/blender/pointcache/alembic/abc_dynami

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list