[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [58557] branches/soc-2013-cycles_mblur/ intern/cycles: More work toward getting export to work.
Gavin Howard
gavin.d.howard at gmail.com
Wed Jul 24 01:48:54 CEST 2013
Revision: 58557
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=58557
Author: gdh
Date: 2013-07-23 23:48:54 +0000 (Tue, 23 Jul 2013)
Log Message:
-----------
More work toward getting export to work.
This commit does several connected things: first, it consolidates the
DMOTION AttributeStandards into one (only one is needed as it will all
be exported into the same Attribute).
Second, it puts that AttributeStandard into sync_mesh_motion().
Third, it changes when sync_mesh_motion() is called: it is called if
motion blur and deformation motion blur are enabled for the object.
Modified Paths:
--------------
branches/soc-2013-cycles_mblur/intern/cycles/blender/blender_mesh.cpp
branches/soc-2013-cycles_mblur/intern/cycles/blender/blender_object.cpp
branches/soc-2013-cycles_mblur/intern/cycles/blender/blender_sync.h
branches/soc-2013-cycles_mblur/intern/cycles/kernel/kernel_types.h
Modified: branches/soc-2013-cycles_mblur/intern/cycles/blender/blender_mesh.cpp
===================================================================
--- branches/soc-2013-cycles_mblur/intern/cycles/blender/blender_mesh.cpp 2013-07-23 23:30:51 UTC (rev 58556)
+++ branches/soc-2013-cycles_mblur/intern/cycles/blender/blender_mesh.cpp 2013-07-23 23:48:54 UTC (rev 58557)
@@ -535,8 +535,12 @@
return mesh;
}
-void BlenderSync::sync_mesh_motion(BL::Object b_ob, Mesh *mesh, int motion)
+void BlenderSync::sync_mesh_motion(BL::Object b_ob, Mesh *mesh)
{
+ /* TODO: If I am correct, this will actually be called once per
+ * export step. I need to make sure the attribute is only created
+ * the first time. gdh */
+
/* todo: displacement, subdivision */
size_t size = mesh->verts.size();
@@ -550,7 +554,7 @@
if(b_mesh) {
BL::Mesh::vertices_iterator v;
- AttributeStandard std = (motion == -1)? ATTR_STD_MOTION_PRE: ATTR_STD_MOTION_POST;
+ AttributeStandard std = ATTR_STD_DMOTION;
Attribute *attr_M = mesh->attributes.add(std);
float3 *M = attr_M->data_float3(), *cur_M;
size_t i = 0;
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-23 23:30:51 UTC (rev 58556)
+++ branches/soc-2013-cycles_mblur/intern/cycles/blender/blender_object.cpp 2013-07-23 23:48:54 UTC (rev 58557)
@@ -296,9 +296,10 @@
object->motion.post = tfm;
}
- /* mesh deformation blur not supported yet */
- if(!scene->integrator->motion_blur)
- sync_mesh_motion(b_ob, object->mesh, export_time);
+ /* mesh deformation blur not supported yet
+ * but we're working on it :) */
+ if(object->use_motion && object->use_deform_mblur)
+ sync_mesh_motion(b_ob, object->mesh);
}
return object;
Modified: branches/soc-2013-cycles_mblur/intern/cycles/blender/blender_sync.h
===================================================================
--- branches/soc-2013-cycles_mblur/intern/cycles/blender/blender_sync.h 2013-07-23 23:30:51 UTC (rev 58556)
+++ branches/soc-2013-cycles_mblur/intern/cycles/blender/blender_sync.h 2013-07-23 23:48:54 UTC (rev 58557)
@@ -88,7 +88,7 @@
Transform& tfm, uint layer_flag, float export_time, bool hide_tris);
void sync_light(BL::Object b_parent, int persistent_id[OBJECT_PERSISTENT_ID_SIZE], BL::Object b_ob, Transform& tfm);
void sync_background_light();
- void sync_mesh_motion(BL::Object b_ob, Mesh *mesh, int motion);
+ void sync_mesh_motion(BL::Object b_ob, Mesh *mesh);
void sync_camera_motion(BL::Object b_ob, int motion);
/* particles */
Modified: branches/soc-2013-cycles_mblur/intern/cycles/kernel/kernel_types.h
===================================================================
--- branches/soc-2013-cycles_mblur/intern/cycles/kernel/kernel_types.h 2013-07-23 23:30:51 UTC (rev 58556)
+++ branches/soc-2013-cycles_mblur/intern/cycles/kernel/kernel_types.h 2013-07-23 23:48:54 UTC (rev 58557)
@@ -425,11 +425,9 @@
ATTR_STD_GENERATED,
ATTR_STD_POSITION_UNDEFORMED,
ATTR_STD_POSITION_UNDISPLACED,
- ATTR_STD_MOTION,
ATTR_STD_MOTION_PRE,
ATTR_STD_MOTION_POST,
- ATTR_STD_DMOTION_PRE,
- ATTR_STD_DMOTION_POST,
+ ATTR_STD_DMOTION,
ATTR_STD_PARTICLE,
ATTR_STD_CURVE_TANGENT,
ATTR_STD_CURVE_INTERCEPT,
More information about the Bf-blender-cvs
mailing list