Improve consistency of mesh face naming #101689

Closed
opened 2022-10-07 23:42:27 +02:00 by Hans Goudey · 5 comments
Member

Currently mesh polygon naming is inconsistent and confusing.
The UI, BMesh, and most other software use the term "Face" rather than "Polygon".
Combined with the legacy "MFace" storage, it's easy to get things confused.

This task proposes to clearly name the legacy structures and use the "faces" term instead of "polygons"

Original New Comments
fdata fdata_legacy
MFace MFaceLegacy
totface totface_legacy
mface mface_legacy
pdata face_data
totpoly faces_num
MPoly MFace
poly face Including all variable names
polys faces Including all span and pointer variable names
Currently mesh polygon naming is inconsistent and confusing. The UI, BMesh, and most other software use the term "Face" rather than "Polygon". Combined with the legacy "MFace" storage, it's easy to get things confused. This task proposes to clearly name the legacy structures and use the "faces" term instead of "polygons" | Original | New | Comments | | ---- | ---- | ---- | | `fdata` | `fdata_legacy` | | | `MFace` | `MFaceLegacy` | | | `totface` | `totface_legacy` | | | `mface` | `mface_legacy` | | | `pdata` | `face_data` | | | `totpoly` | `faces_num` | | | `MPoly` | `MFace` | | | `poly` | `face` | Including all variable names | | `polys` | `faces` | Including all span and pointer variable names |
Member

I would be very happy if this were done. Feels like a rather enormous task - the "including all variable names' part.

Can someone answer: are MFace's used for anything besides backward compatibility these days? If they are used then putting legacy in their rename would be wrong.

I would be very happy if this were done. Feels like a rather enormous task - the "including all variable names' part. Can someone answer: are MFace's used for anything besides backward compatibility these days? If they are used then putting legacy in their rename would be wrong.
Author
Member

Feels like a rather enormous task - the "including all variable names' part.

Yeah, I guess that could happen in steps. But the final goal should be consistency I think.

are MFace's used for anything besides backward compatibility these days?

They are used for the particle system. The plan is to replace it soon (first step was the new hair system, then generic simulations). They're definitely not being used in new code. I guess it depends what "legacy" really means, but to me it's true enough in this case.

> Feels like a rather enormous task - the "including all variable names' part. Yeah, I guess that could happen in steps. But the final goal should be consistency I think. >are MFace's used for anything besides backward compatibility these days? They are used for the particle system. The plan is to replace it soon (first step was the new hair system, then generic simulations). They're definitely not being used in new code. I guess it depends what "legacy" really means, but to me it's true enough in this case.
Philipp Oeser removed the
Interest
Modeling
label 2023-02-09 15:27:11 +01:00
Author
Member

I'd also suggest the following:

Original New
vdata vert_data
edata edge_data
ldata corner_data
totvert verts_num
totedge edges_num
totloop corners_num
I'd also suggest the following: | Original | New | | ---- | ---- | | `vdata` | `vert_data` | | `edata` | `edge_data` | | `ldata` | `corner_data` | | `totvert` | `verts_num` | | `totedge` | `edges_num` | | `totloop` | `corners_num` |
  • Is it the intention to rename polygons to faces in RNA too?
  • I'd rather keep loop naming for internal data, or, handle it as a separate task - since globally renaming loop to corner impacts many more areas.
- Is it the intention to rename `polygons` to `faces` in RNA too? - I'd rather keep loop naming for internal data, or, handle it as a separate task - since globally renaming loop to corner impacts many more areas.
Hans Goudey self-assigned this 2023-07-24 23:26:20 +02:00
Author
Member

I added a task for renaming "loop" to "corner" here: #110434

I added a task for renaming "loop" to "corner" here: #110434
Blender Bot added
Status
Archived
and removed
Status
Confirmed
labels 2023-07-31 18:27:56 +02:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#101689
No description provided.