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:
authorClément Foucault <foucault.clem@gmail.com>2017-06-09 02:14:39 +0300
committerClément Foucault <foucault.clem@gmail.com>2017-06-09 02:15:17 +0300
commit67913c603cd31f72b1cd94e787f99179a8e966a5 (patch)
tree047baaa37d9a3a5bca0dc74767b04cef4c40365b /source/blender/draw/modes
parente45ebec335f4b13835bce2c21aeb4ecd8726a02a (diff)
Probe: Add influence display and rework UI.
Diffstat (limited to 'source/blender/draw/modes')
-rw-r--r--source/blender/draw/modes/object_mode.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/draw/modes/object_mode.c b/source/blender/draw/modes/object_mode.c
index ec1f6da7ff2..ae144272dc4 100644
--- a/source/blender/draw/modes/object_mode.c
+++ b/source/blender/draw/modes/object_mode.c
@@ -32,6 +32,7 @@
#include "DNA_curve_types.h"
#include "DNA_mesh_types.h"
#include "DNA_object_force.h"
+#include "DNA_probe_types.h"
#include "DNA_particle_types.h"
#include "DNA_view3d_types.h"
#include "DNA_world_types.h"
@@ -1410,9 +1411,21 @@ static void DRW_shgroup_speaker(OBJECT_StorageList *stl, Object *ob, SceneLayer
static void DRW_shgroup_probe(OBJECT_StorageList *stl, Object *ob, SceneLayer *sl)
{
float *color;
+ Probe *prb = (Probe *)ob->data;
DRW_object_wire_theme_get(ob, sl, &color);
+ prb->distfalloff = (1.0f - prb->falloff) * prb->distinf;
+
DRW_shgroup_call_dynamic_add(stl->g_data->probe, ob->obmat[3], color);
+
+ DRW_shgroup_call_dynamic_add(stl->g_data->sphere, color, &prb->distinf, ob->obmat);
+ DRW_shgroup_call_dynamic_add(stl->g_data->sphere, color, &prb->distfalloff, ob->obmat);
+
+ DRW_shgroup_call_dynamic_add(stl->g_data->lamp_center_group, ob->obmat[3]);
+
+ /* Line and point going to the ground */
+ DRW_shgroup_call_dynamic_add(stl->g_data->lamp_groundline, ob->obmat[3]);
+ DRW_shgroup_call_dynamic_add(stl->g_data->lamp_groundpoint, ob->obmat[3]);
}
static void DRW_shgroup_relationship_lines(OBJECT_StorageList *stl, Object *ob)