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
This commit is contained in:
Aaron Carlisle 2021-02-18 22:51:24 -05:00
parent c297bef9af
commit e6acc4db72
1 changed files with 2 additions and 1 deletions

View File

@ -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: