[Bf-blender-cvs] [e6acc4db72d] blender-v2.92-release: Instead of raising an expection a warnign is generated instead. This fixes the issue where `['hair', 'pointcloud']` are disabled for release builds. In the future a better solution would be to generate the context map dynamically but this would require refactoring of the API: D9988

Aaron Carlisle noreply at git.blender.org
Fri Feb 19 04:51:31 CET 2021


Commit: e6acc4db72d99a3eb5039f6534dc8654873a6535
Author: Aaron Carlisle
Date:   Thu Feb 18 22:51:24 2021 -0500
Branches: blender-v2.92-release
https://developer.blender.org/rBe6acc4db72d99a3eb5039f6534dc8654873a6535

Instead of raising an expection a warnign is generated instead.
This fixes the issue where `['hair', 'pointcloud']` are disabled for 
release builds.
In the future a better solution would be to generate the context map 
dynamically but this would require refactoring of the API: D9988

Fixes T80364

Differential revision: https://developer.blender.org/D10468

===================================================================

M	doc/python_api/sphinx_doc_gen.py

===================================================================

diff --git a/doc/python_api/sphinx_doc_gen.py b/doc/python_api/sphinx_doc_gen.py
index 930e5b88911..12ffe5b6edf 100644
--- a/doc/python_api/sphinx_doc_gen.py
+++ b/doc/python_api/sphinx_doc_gen.py
@@ -81,6 +81,7 @@ import sys
 import inspect
 import shutil
 import logging
+import warning
 
 from textwrap import indent
 
@@ -1204,7 +1205,7 @@ def pycontext2sphinx(basepath):
     # for member in sorted(unique):
     #     print('        "%s": ("", False),' % member)
     if len(context_type_map) > len(unique):
-        raise Exception(
+        warnings.warn(
             "Some types are not used: %s" %
             str([member for member in context_type_map if member not in unique]))
     else:



More information about the Bf-blender-cvs mailing list