[Bf-blender-cvs] [b91aecc] openvdb: One more de-duplication.
Kévin Dietrich
noreply at git.blender.org
Thu Jun 18 07:01:13 CEST 2015
Commit: b91aecc017e0658d162d9dc42881ee0255b27de4
Author: Kévin Dietrich
Date: Wed Jun 17 18:16:23 2015 +0200
Branches: openvdb
https://developer.blender.org/rBb91aecc017e0658d162d9dc42881ee0255b27de4
One more de-duplication.
===================================================================
M source/blender/editors/space_view3d/drawobject.c
===================================================================
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index aca45f0..b1497c1 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -8080,11 +8080,13 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, const short
if (prim) {
OpenVDB_draw_primitive(prim, draw_root, draw_level_1, draw_level_2, draw_leaves);
- if (draw_voxels && draw_data->voxel_drawing == DRAW_VOXELS_POINT)
- OpenVDB_draw_primitive_values(prim, draw_data->tolerance, draw_data->point_size, false, draw_data->lod);
+ if (draw_voxels && ELEM(draw_data->voxel_drawing, DRAW_VOXELS_POINT, DRAW_VOXELS_BOX)) {
+ const bool draw_as_box = (draw_data->voxel_drawing == DRAW_VOXELS_BOX);
- if (draw_voxels && draw_data->voxel_drawing == DRAW_VOXELS_BOX)
- OpenVDB_draw_primitive_values(prim, draw_data->tolerance, draw_data->point_size, true, draw_data->lod);
+ OpenVDB_draw_primitive_values(prim, draw_data->tolerance,
+ draw_data->point_size,
+ draw_as_box, draw_data->lod);
+ }
if (draw_voxels && draw_data->voxel_drawing == DRAW_VOXELS_VOLUME)
render_volume = true;
More information about the Bf-blender-cvs
mailing list