[Bf-blender-cvs] [dbec51109bb] master: Fix T80613: Assert in UI_but_number_precision_set
Julian Eisel
noreply at git.blender.org
Wed Sep 9 12:18:43 CEST 2020
Commit: dbec51109bbd3a6143bc45c6faa3908142f9da46
Author: Julian Eisel
Date: Wed Sep 9 12:06:11 2020 +0200
Branches: master
https://developer.blender.org/rBdbec51109bbd3a6143bc45c6faa3908142f9da46
Fix T80613: Assert in UI_but_number_precision_set
-1 is a valid value to pass as RNA float precision. We let the UI code
figure out an appropriate precision then. So don't fail the assert if
-1 is passed.
===================================================================
M source/blender/editors/interface/interface.c
===================================================================
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index bbe097b5c79..ea64fb9cfcd 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -6762,7 +6762,8 @@ void UI_but_number_precision_set(uiBut *but, float precision)
BLI_assert(but->type == UI_BTYPE_NUM);
but_number->precision = precision;
- BLI_assert(precision > -1);
+ /* -1 is a valid value, UI code figures out an appropriate precision then. */
+ BLI_assert(precision > -2);
}
/**
More information about the Bf-blender-cvs
mailing list