Python: Limit BGL deprecation messages.

This PR change the number of displayed BGL deprecation messages
from 100 to 10.

Fix: 105997

Pull Request: blender/blender#106018
This commit is contained in:
2023-03-23 07:53:16 +01:00
parent 846ed20ad6
commit e203e858ec

View File

@@ -40,10 +40,10 @@ static CLG_LogRef LOG = {"bgl"};
static void report_deprecated_call(const char *function_name) static void report_deprecated_call(const char *function_name)
{ {
/* Only report first 100 deprecated calls. BGL is typically used inside an handler that is /* Only report first 10 deprecated calls. BGL is typically used inside an handler that is
* triggered at refresh. */ * triggered at refresh. */
static int times = 0; static int times = 0;
while (times >= 100) { while (times >= 10) {
return; return;
} }
char message[256]; char message[256];