Previously the UV unwrapping handling for subsurf modifiers used DerivedMesh
to implement the subdivision. Since we're trying to remove DerivedMesh in general,
and since this just made use of the Mesh data anyway, it's relatively simple to
remove it here. Combined with D15939, this makes it possible to remove more
DerivedMesh code.
Details
Diff Detail
- Repository
- rB Blender
Event Timeline
From code side mainly seems good. There is a note about possibly uninitiaized options.is_adaptive which needs a look.
Wondering whether it will be beneficial to have some API to make subdiv_mesh_settings_init and BKE_subsurf_modifier_runtime_init mode accessible and reusable. Kinda feels good to hide all those smd->subdivType checks and take care of such possibly uninitialized fields.
On a design level -- less derived meshes we have is better!
| source/blender/editors/uvedit/uvedit_unwrap_ops.c | ||
|---|---|---|
| 582–584 | Would it be more clear if we do if (smd->levels < 1) return me_from_em; above? Took me a bit to understand what this magical constant of 3 is.. | |
| 585–592 | The settings.is_adaptive seems to be left uninitialized. | |
Thanks for the update. Is looking good now!
| source/blender/editors/uvedit/uvedit_unwrap_ops.c | ||
|---|---|---|
| 582–584 | Not impossible. If there are ways to make it more clear in those places feel free to do so! | |