Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2014-05-19 06:10:11 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2014-07-23 08:03:55 +0400
commit54109add6578da9f306973e2e224664e2d63e534 (patch)
treec07414977e7195a4155eaa66ad3b069fbe8fff04
parentc32a671b3a7f2908c03bcb60f46ca40250dd08fa (diff)
Freestyle: minor speedup by omitting unnecessary transform matrix operations in the file loader.
Previously the imported mesh data were transformed by a local-to-world projection matrix through NodeTransform. Now that the file loader assumes the imported mesh data already in the camera coordinate system, an indentity matrix was supplied to NodeTransform. The present commit avoids this redundant matrix operation by using NodeGroup instead of NodeTransform, recalling the latter is a subclass of the former with extra matrix computations.
-rw-r--r--source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp b/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp
index dbbc4f77c26..57882cbce0c 100644
--- a/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp
+++ b/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp
@@ -449,7 +449,7 @@ void BlenderFileLoader::insertShapeNode(ObjectInstanceRen *obi, int id)
return;
// We allocate memory for the meshes to be imported
- NodeTransform *currentMesh = new NodeTransform;
+ NodeGroup *currentMesh = new NodeGroup;
NodeShape *shape = new NodeShape;
unsigned vSize = 3 * 3 * numFaces;
@@ -799,10 +799,6 @@ void BlenderFileLoader::insertShapeNode(ObjectInstanceRen *obi, int id)
rep->setBBox(bbox);
shape->AddRep(rep);
- Matrix44r meshMat = Matrix44r::identity();
- currentMesh->setMatrix(meshMat);
- currentMesh->Translate(0, 0, 0);
-
currentMesh->AddChild(shape);
_Scene->AddChild(currentMesh);
}