[Bf-blender-cvs] [e39d996] alembic: Renamed passes for cache writing to reflect their origin with mesh modifier evaluation.

Lukas Tönne noreply at git.blender.org
Thu Apr 16 12:11:18 CEST 2015


Commit: e39d9960fb89354019bcdee3b044e4fd898bbce2
Author: Lukas Tönne
Date:   Thu Apr 16 11:51:15 2015 +0200
Branches: alembic
https://developer.blender.org/rBe39d9960fb89354019bcdee3b044e4fd898bbce2

Renamed passes for cache writing to reflect their origin with mesh
modifier evaluation.

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

M	source/blender/blenkernel/intern/cache_library.c
M	source/blender/editors/io/io_cache_library.c
M	source/blender/pointcache/alembic/abc_group.cpp
M	source/blender/pointcache/alembic/abc_object.cpp
M	source/blender/pointcache/alembic/abc_particles.cpp
M	source/blender/pointcache/util/util_types.h

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

diff --git a/source/blender/blenkernel/intern/cache_library.c b/source/blender/blenkernel/intern/cache_library.c
index ca9b0e9..0c9c24f 100644
--- a/source/blender/blenkernel/intern/cache_library.c
+++ b/source/blender/blenkernel/intern/cache_library.c
@@ -378,10 +378,10 @@ static void cache_get_read_flags(CacheLibrary *cachelib, eCacheLibrary_EvalMode
 static PTCPass cache_pass_from_eval_mode(eCacheLibrary_EvalMode eval_mode)
 {
 	switch (eval_mode) {
-		case CACHE_LIBRARY_EVAL_RENDER: return PTC_PASS_FINAL;
-		case CACHE_LIBRARY_EVAL_REALTIME: return PTC_PASS_PREVIEW;
+		case CACHE_LIBRARY_EVAL_RENDER: return PTC_PASS_RENDER;
+		case CACHE_LIBRARY_EVAL_REALTIME: return PTC_PASS_REALTIME;
 	}
-	return PTC_PASS_FINAL;
+	return PTC_PASS_RENDER;
 }
 
 bool BKE_cache_read_dupli_cache(CacheLibrary *cachelib, DupliCache *dupcache,
diff --git a/source/blender/editors/io/io_cache_library.c b/source/blender/editors/io/io_cache_library.c
index 1540d7b..ab10293 100644
--- a/source/blender/editors/io/io_cache_library.c
+++ b/source/blender/editors/io/io_cache_library.c
@@ -332,7 +332,7 @@ static void cache_library_bake_startjob(void *customdata, short *stop, short *do
 		if (data->cachelib->eval_mode & CACHE_LIBRARY_EVAL_REALTIME) {
 			data->cache_eval_mode = CACHE_LIBRARY_EVAL_REALTIME;
 			data->eval_ctx.mode = DAG_EVAL_VIEWPORT;
-			PTC_writer_archive_set_pass(data->archive, PTC_PASS_PREVIEW);
+			PTC_writer_archive_set_pass(data->archive, PTC_PASS_REALTIME);
 			cache_library_bake_do(data, &process_data);
 		}
 		
@@ -341,7 +341,7 @@ static void cache_library_bake_startjob(void *customdata, short *stop, short *do
 		if (data->cachelib->eval_mode & CACHE_LIBRARY_EVAL_RENDER) {
 			data->cache_eval_mode = CACHE_LIBRARY_EVAL_RENDER;
 			data->eval_ctx.mode = DAG_EVAL_RENDER;
-			PTC_writer_archive_set_pass(data->archive, PTC_PASS_FINAL);
+			PTC_writer_archive_set_pass(data->archive, PTC_PASS_RENDER);
 			cache_library_bake_do(data, &process_data);
 		}
 		
diff --git a/source/blender/pointcache/alembic/abc_group.cpp b/source/blender/pointcache/alembic/abc_group.cpp
index 2be3dbe..0d367e5 100644
--- a/source/blender/pointcache/alembic/abc_group.cpp
+++ b/source/blender/pointcache/alembic/abc_group.cpp
@@ -147,8 +147,8 @@ void AbcDupligroupWriter::write_sample_object(Object *ob)
 static bool object_visible(Object *ob, PTCPass pass)
 {
 	switch (pass) {
-		case PTC_PASS_FINAL: return !(ob->restrictflag & OB_RESTRICT_RENDER);
-		case PTC_PASS_PREVIEW: return !(ob->restrictflag & OB_RESTRICT_VIEW);
+		case PTC_PASS_RENDER: return !(ob->restrictflag & OB_RESTRICT_RENDER);
+		case PTC_PASS_REALTIME: return !(ob->restrictflag & OB_RESTRICT_VIEW);
 	}
 	return true;
 }
diff --git a/source/blender/pointcache/alembic/abc_object.cpp b/source/blender/pointcache/alembic/abc_object.cpp
index 0bf61c4..6363f40 100644
--- a/source/blender/pointcache/alembic/abc_object.cpp
+++ b/source/blender/pointcache/alembic/abc_object.cpp
@@ -103,7 +103,7 @@ void AbcObjectWriter::write_sample()
 	
 	if (m_dm_writer) {
 		switch (abc_archive()->get_pass()) {
-			case PTC_PASS_FINAL:
+			case PTC_PASS_RENDER:
 				m_final_dm = mesh_create_derived_render(m_scene, m_ob, CD_MASK_BAREMESH);
 				
 				if (m_final_dm) {
@@ -113,7 +113,7 @@ void AbcObjectWriter::write_sample()
 				}
 				break;
 			
-			case PTC_PASS_PREVIEW:
+			case PTC_PASS_REALTIME:
 				m_final_dm = m_ob->derivedFinal;
 				if (!m_final_dm)
 					m_final_dm = mesh_get_derived_final(m_scene, m_ob, CD_MASK_BAREMESH);
diff --git a/source/blender/pointcache/alembic/abc_particles.cpp b/source/blender/pointcache/alembic/abc_particles.cpp
index d0f8915..1f718ae 100644
--- a/source/blender/pointcache/alembic/abc_particles.cpp
+++ b/source/blender/pointcache/alembic/abc_particles.cpp
@@ -273,8 +273,8 @@ void AbcHairChildrenWriter::write_sample()
 	
 	int keysteps = 0;
 	switch (abc_archive()->get_pass()) {
-		case PTC_PASS_FINAL: keysteps = m_psys->part->ren_step; break;
-		case PTC_PASS_PREVIEW: keysteps = m_psys->part->draw_step; break;
+		case PTC_PASS_RENDER: keysteps = m_psys->part->ren_step; break;
+		case PTC_PASS_REALTIME: keysteps = m_psys->part->draw_step; break;
 	}
 	int maxkeys = (1 << keysteps) + 1 + (m_psys->part->kink);
 	if (ELEM(m_psys->part->kink, PART_KINK_SPIRAL))
diff --git a/source/blender/pointcache/util/util_types.h b/source/blender/pointcache/util/util_types.h
index 0fad7f0..a78e7bd 100644
--- a/source/blender/pointcache/util/util_types.h
+++ b/source/blender/pointcache/util/util_types.h
@@ -33,8 +33,8 @@ typedef enum PTCErrorLevel {
 typedef void (*PTCErrorCallback)(void *userdata, PTCErrorLevel level, const char *message);
 
 typedef enum PTCPass {
-	PTC_PASS_FINAL = 0,
-	PTC_PASS_PREVIEW,
+	PTC_PASS_RENDER = 0,
+	PTC_PASS_REALTIME,
 } PTCPass;
 
 typedef enum PTCReadSampleResult {




More information about the Bf-blender-cvs mailing list