diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-01-21 18:43:30 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-01-22 13:57:20 +0300 |
commit | d6d101feca09ae17af00f080a76acbc4d6785c3e (patch) | |
tree | 3c49f73009307eb3aa3c4b5ec75216b64dbb38bc /source/blender/blenkernel/BKE_subdiv.h | |
parent | fef20d987c1f01a732526616766953dec4e8ac60 (diff) |
Fix T59395: Subdivision modifier with quality 1 crashes blender
This is actually a workaround for the crash in OpenSubdiv.
Topology refiner will have a crash when special conditions
are met:
- Refiner is configured to use infinitely sharp patches.
- Refinement happens for the level 1 (which we call Quality 1 on
Blender side).
- Mesh has non-quad faces.
The workaround is to force refinement to happen to level 2 (or
quality 2 on Blender side) when those conditions are met.
Later on with the next OpenSubdiv update we can remove this
workaround, since there was work done on OpenSubdiv side to
deal better with such configurations.
The modifier will now be somewhat slower, but this will be
compensated with upcoming topology cache enabled by default.
The workaround is done when initializing settings, so the
comparison of topology refiner settings is happening without
any extra workarounds there.
Diffstat (limited to 'source/blender/blenkernel/BKE_subdiv.h')
-rw-r--r-- | source/blender/blenkernel/BKE_subdiv.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_subdiv.h b/source/blender/blenkernel/BKE_subdiv.h index 73470b15c61..6ff861e82d4 100644 --- a/source/blender/blenkernel/BKE_subdiv.h +++ b/source/blender/blenkernel/BKE_subdiv.h @@ -194,6 +194,9 @@ void BKE_subdiv_stats_print(const SubdivStats *stats); /* ================================ SETTINGS ================================ */ +void BKE_subdiv_settings_validate_for_mesh(SubdivSettings *settings, + const struct Mesh *mesh); + bool BKE_subdiv_settings_equal(const SubdivSettings *settings_a, const SubdivSettings *settings_b); |