Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesdna/DNA_mesh_types.h
| Show All 26 Lines | |||||
| struct MLoopCol; | struct MLoopCol; | ||||
| struct MLoopTri; | struct MLoopTri; | ||||
| struct MLoopUV; | struct MLoopUV; | ||||
| struct MPoly; | struct MPoly; | ||||
| struct MVert; | struct MVert; | ||||
| struct Material; | struct Material; | ||||
| struct Mesh; | struct Mesh; | ||||
| struct SubdivCCG; | struct SubdivCCG; | ||||
| struct SubsurfRuntimeData; | |||||
| # | # | ||||
| # | # | ||||
| typedef struct EditMeshData { | typedef struct EditMeshData { | ||||
| /** when set, \a vertexNos, polyNos are lazy initialized */ | /** when set, \a vertexNos, polyNos are lazy initialized */ | ||||
| const float (*vertexCos)[3]; | const float (*vertexCos)[3]; | ||||
| /** lazy initialize (when \a vertexCos is set) */ | /** lazy initialize (when \a vertexCos is set) */ | ||||
| ▲ Show 20 Lines • Show All 74 Lines • ▼ Show 20 Lines | typedef struct Mesh_Runtime { | ||||
| char wrapper_type; | char wrapper_type; | ||||
| /** | /** | ||||
| * A type mask from wrapper_type, | * A type mask from wrapper_type, | ||||
| * in case there are differences in finalizing logic between types. | * in case there are differences in finalizing logic between types. | ||||
| */ | */ | ||||
| char wrapper_type_finalize; | char wrapper_type_finalize; | ||||
| /** | /** | ||||
| * Settings for lazily evaluating the subdivision on the CPU if needed. These are | * Settings for lazily evaluating the subdivision on the CPU if needed. These are | ||||
| * set in the modifier when GPU subdivision can be performed. | * set in the modifier when GPU subdivision can be performed, and owned by the by | ||||
| * the modifier in the object. | |||||
HooglyBoogly: This comment should probably be explicit about ownership: the struct is owned by the… | |||||
| */ | */ | ||||
| SessionUUID subsurf_session_uuid; | struct SubsurfRuntimeData *subsurf_runtime_data; | ||||
| char subsurf_resolution; | void *_pad1; | ||||
| char subsurf_do_loop_normals; | |||||
| char subsurf_apply_render; | |||||
| char subsurf_use_optimal_display; | |||||
| /* Cached from the draw code for stats display. */ | |||||
| int subsurf_totvert; | |||||
| int subsurf_totedge; | |||||
| int subsurf_totpoly; | |||||
| int subsurf_totloop; | |||||
| char _pad2[2]; | |||||
| /** | /** | ||||
| * Caches for lazily computed vertex and polygon normals. These are stored here rather than in | * Caches for lazily computed vertex and polygon normals. These are stored here rather than in | ||||
| * #CustomData because they can be calculated on a const mesh, and adding custom data layers on a | * #CustomData because they can be calculated on a const mesh, and adding custom data layers on a | ||||
| * const mesh is not thread-safe. | * const mesh is not thread-safe. | ||||
| */ | */ | ||||
| char _pad2[6]; | |||||
| char vert_normals_dirty; | char vert_normals_dirty; | ||||
| char poly_normals_dirty; | char poly_normals_dirty; | ||||
| float (*vert_normals)[3]; | float (*vert_normals)[3]; | ||||
| float (*poly_normals)[3]; | float (*poly_normals)[3]; | ||||
| /** | /** | ||||
| * A #BLI_bitmap containing tags for the center vertices of subdivided polygons, set by the | * A #BLI_bitmap containing tags for the center vertices of subdivided polygons, set by the | ||||
| * subdivision surface modifier and used by drawing code instead of polygon center face dots. | * subdivision surface modifier and used by drawing code instead of polygon center face dots. | ||||
| ▲ Show 20 Lines • Show All 308 Lines • Show Last 20 Lines | |||||
This comment should probably be explicit about ownership: the struct is owned by the subdivision surface modifier.
It seems like it could be owned by the mesh potentially, which would allow using the same system for the subdivision surface geometry node. Maybe that would make the change too big for 3.2 though, not sure.