[Bf-blender-cvs] [5852d77] alembic_pointcache: Removed the PTC_test_archive function, was just some initial testing code for alembic API.

Lukas Tönne noreply at git.blender.org
Thu Oct 16 16:53:26 CEST 2014


Commit: 5852d77fe7f576ec5c5a9f464b036f04f0e59454
Author: Lukas Tönne
Date:   Wed Nov 27 13:00:51 2013 +0100
Branches: alembic_pointcache
https://developer.blender.org/rB5852d77fe7f576ec5c5a9f464b036f04f0e59454

Removed the PTC_test_archive function, was just some initial testing
code for alembic API.

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

M	source/blender/makesrna/intern/rna_pointcache.c
M	source/blender/pointcache/CMakeLists.txt
M	source/blender/pointcache/PTC_api.h
D	source/blender/pointcache/test.cpp

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

diff --git a/source/blender/makesrna/intern/rna_pointcache.c b/source/blender/makesrna/intern/rna_pointcache.c
index 51e7354..379acf5 100644
--- a/source/blender/makesrna/intern/rna_pointcache.c
+++ b/source/blender/makesrna/intern/rna_pointcache.c
@@ -196,7 +196,6 @@ static void rna_PointCache_frame_step_range(PointerRNA *ptr, int *min, int *max,
 static void rna_def_pointcache(BlenderRNA *brna)
 {
 	StructRNA *srna;
-	FunctionRNA *func;
 	PropertyRNA *prop;
 
 #ifdef POINTCACHE_OLD
@@ -300,9 +299,6 @@ static void rna_def_pointcache(BlenderRNA *brna)
 	                         "(for local bakes per scene file, disable this option)");
 	RNA_def_property_update(prop, NC_OBJECT, "rna_Cache_idname_change");
 #endif /*POINTCACHE_OLD*/
-
-	func = RNA_def_function(srna, "test", "PTC_test_archive");
-	RNA_def_function_flag(func, FUNC_NO_SELF);
 }
 
 void RNA_def_pointcache(BlenderRNA *brna)
diff --git a/source/blender/pointcache/CMakeLists.txt b/source/blender/pointcache/CMakeLists.txt
index cc36ad0..78753e6 100644
--- a/source/blender/pointcache/CMakeLists.txt
+++ b/source/blender/pointcache/CMakeLists.txt
@@ -37,8 +37,6 @@ set(INC_SYS
 )
 
 set(SRC
-	test.cpp
-
 	util/util_path.h
 	util/util_path.cpp
 
diff --git a/source/blender/pointcache/PTC_api.h b/source/blender/pointcache/PTC_api.h
index aefe865..4336529 100644
--- a/source/blender/pointcache/PTC_api.h
+++ b/source/blender/pointcache/PTC_api.h
@@ -29,9 +29,6 @@ struct Object;
 struct ParticleSystem;
 struct PointerRNA;
 
-void PTC_test_archive(void);
-
-
 struct PTCWriter;
 struct PTCReader;
 
diff --git a/source/blender/pointcache/test.cpp b/source/blender/pointcache/test.cpp
deleted file mode 100644
index 848bc11..0000000
--- a/source/blender/pointcache/test.cpp
+++ /dev/null
@@ -1,90 +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 "PTC_api.h"
-#include "particles.h"
-#include "schema.h"
-
-#include <Alembic/AbcCoreHDF5/ReadWrite.h>
-
-//namespace PTC {
-
-void PTC_test_archive(void)
-{
-#if 0
-	std::string archiveName("myFirstArchive.abc");
-	OArchive archive(Alembic::AbcCoreHDF5::WriteArchive(),
-	                 archiveName,
-	                 ErrorHandler::kThrowPolicy);
-	
-	OObject root = archive.getTop();
-//	obj = schema.getObject();
-//	ts = schema.getTimeSampling();
-//	OCompoundProperty props = root.getProperties();
-	OParticles particles(root, "particles");
-//	OFloatProperty size(props, "size");
-	OParticlesSchema schema = particles.getSchema();
-
-//	for (int i = 0; i < 10; ++i) {
-	OParticlesSchema::Sample sample;
-		
-//		size.set(i*i - 0.43*i);
-		schema.set(sample);
-//	}
-#endif
-
-#if 0
-	std::string archiveName("myFirstArchive.abc");
-
-	// Create an archive with the default writer
-	OArchive archive(Alembic::AbcCoreHDF5::WriteArchive(),
-	                 archiveName, 
-	                 ErrorHandler::kThrowPolicy);
-
-	OObject archiveTop = archive.getTop();
-
-	std::string name = "myFirstChild";
-	OObject child( archiveTop, name );
-
-	OCompoundProperty childProps = child.getProperties();
-
-	// Create a TimeSampling object: one sample every 24th of a second
-	const chrono_t dt = 1.0 / 24.0;
-
-	TimeSampling tst(dt, 0.0f);               // uniform with cycle=dt
-	
-	// Create a scalar property on this child object named 'mass'
-	ODoubleProperty mass( childProps,  // owner
-	                      "mass", // name
-	                      TimeSamplingPtr(&tst) );
-
-	// Write out the samples
-	const unsigned int numSamples = 5;
-	const chrono_t startTime = 10.0;
-	for (int tt=0; tt<numSamples; tt++)
-	{
-		double mm = (1.0 + 0.1*tt); // vary the mass
-		mass.set(mm);
-	}
-
-	// The archive is closed (and written to disk) when 'archive'
-	//  goes out of scope.
-#endif
-}
-
-//} /* namespace PTC */




More information about the Bf-blender-cvs mailing list