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:
authorGermano Cavalcante <germano.costa@ig.com.br>2021-11-25 16:17:31 +0300
committerGermano Cavalcante <germano.costa@ig.com.br>2021-11-25 16:18:57 +0300
commitbc4c20d414e90c8e25e12cfee860e86adb06e961 (patch)
treeadd30daf5016f85991ab8999e0c393c4eb463d83 /source/blender/editors/gpencil/gpencil_utils.c
parent447378753d320ea04d7c1ce00723fc02f35966f0 (diff)
Fix T93360: 'Iteractive Light Track' do not work over empty background
Bug introduced in {rBaa0ac0035a0d}. The invalid depth fallback was changed to `FLT_MAX` in order to match the annotation and gpencil operations. This broke the `Interactive Light Track` operator which invalidates the operation if the depth value is `1.0f`. The chosen solution was to change the value tested in the annotation and gpencil operations.
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_utils.c')
-rw-r--r--source/blender/editors/gpencil/gpencil_utils.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/editors/gpencil/gpencil_utils.c b/source/blender/editors/gpencil/gpencil_utils.c
index 86df452f49a..99cf2b52df7 100644
--- a/source/blender/editors/gpencil/gpencil_utils.c
+++ b/source/blender/editors/gpencil/gpencil_utils.c
@@ -991,6 +991,10 @@ void gpencil_stroke_convertcoords_tpoint(Scene *scene,
{
ToolSettings *ts = scene->toolsettings;
+ if (depth && (*depth == DEPTH_INVALID)) {
+ depth = NULL;
+ }
+
int mval_i[2];
round_v2i_v2fl(mval_i, &point2D->x);