[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [58642] branches/soc-2013-cycles_mblur/ intern/cycles/blender/blender_object.cpp: I got rid of dead code.
Gavin Howard
gavin.d.howard at gmail.com
Sat Jul 27 03:01:49 CEST 2013
Revision: 58642
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=58642
Author: gdh
Date: 2013-07-27 01:01:48 +0000 (Sat, 27 Jul 2013)
Log Message:
-----------
I got rid of dead code. I also fixed a bug with my loops to find the
export times for each object.
Modified Paths:
--------------
branches/soc-2013-cycles_mblur/intern/cycles/blender/blender_object.cpp
Modified: branches/soc-2013-cycles_mblur/intern/cycles/blender/blender_object.cpp
===================================================================
--- branches/soc-2013-cycles_mblur/intern/cycles/blender/blender_object.cpp 2013-07-27 00:58:57 UTC (rev 58641)
+++ branches/soc-2013-cycles_mblur/intern/cycles/blender/blender_object.cpp 2013-07-27 01:01:48 UTC (rev 58642)
@@ -510,9 +510,6 @@
int particle_id = 1;
bool cancel = false;
-
- /* Create a set to hold each object's export times. */
- std::set<float> object_export;
for(; b_sce && !cancel; b_sce = b_sce.background_set()) {
for(b_sce.objects.begin(b_ob); b_ob != b_sce.objects.end() && !cancel; ++b_ob) {
@@ -545,10 +542,14 @@
Object *object = sync_object(*b_ob, persistent_id.data, *b_dup, tfm,
ob_layer, export_time, hide_tris);
- /* Add this object's export times to the set. */
- std::set<float>::iterator time;
- for (time = object_export.begin(); time != object_export.end(); time++) {
- export_times->insert(*time);
+ /* Make sure the object exists (I was getting null objects). */
+ if (object) {
+
+ /* Add this object's export times to the set. */
+ std::set<float>::iterator time;
+ for (time = object->export_times->begin(); time != object->export_times->end(); time++) {
+ export_times->insert(*time);
+ }
}
/* sync possible particle data, note particle_id
@@ -574,20 +575,21 @@
if(!object_render_hide(*b_ob, true, true, hide_tris)) {
/* object itself */
Transform tfm = get_transform(b_ob->matrix_world());
- sync_object(*b_ob, NULL, PointerRNA_NULL, tfm, ob_layer, export_time, hide_tris);
+ Object *object = sync_object(*b_ob, NULL, PointerRNA_NULL, tfm, ob_layer, export_time, hide_tris);
- /* Add this object's export times to the set. */
- std::set<float>::iterator time;
- for (time = object_export.begin(); time != object_export.end(); time++) {
- export_times->insert(*time);
+ /* Make sure the object exists (I was getting null objects). */
+ if (object) {
+
+ /* Add this object's export times to the set. */
+ std::set<float>::iterator time;
+ for (time = object->export_times->begin(); time != object->export_times->end(); time++) {
+ export_times->insert(*time);
+ }
}
}
}
cancel = progress.get_cancel();
-
- /* clear the object set */
- object_export.clear();
}
}
More information about the Bf-blender-cvs
mailing list