-Make capture dependent on a cell size, not subdivision.

-Fixed a bug recently introduced when releasing mouse events and calling popups
This commit is contained in:
Juan Linietsky
2017-12-21 11:03:17 -03:00
parent 8297ea903a
commit 1fa9aac3e4
4 changed files with 62 additions and 57 deletions

View File

@ -2829,11 +2829,7 @@ void BakedIndirectLightGizmo::redraw() {
Vector<Vector3> lines;
Vector3 extents = baker->get_extents();
static const int subdivs[BakedLightmap::SUBDIV_MAX] = { 64, 128, 256, 512 };
AABB aabb = AABB(-extents, extents * 2);
int subdiv = subdivs[baker->get_bake_subdiv()];
float cell_size = aabb.get_longest_axis_size() / subdiv;
for (int i = 0; i < 12; i++) {
Vector3 a, b;