Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesdna/DNA_gpencil_types.h
| Show First 20 Lines • Show All 330 Lines • ▼ Show 20 Lines | typedef enum eGPDstroke_Flag { | ||||
| /* stroke is in 3d-space */ | /* stroke is in 3d-space */ | ||||
| GP_STROKE_3DSPACE = (1 << 0), | GP_STROKE_3DSPACE = (1 << 0), | ||||
| /* stroke is in 2d-space */ | /* stroke is in 2d-space */ | ||||
| GP_STROKE_2DSPACE = (1 << 1), | GP_STROKE_2DSPACE = (1 << 1), | ||||
| /* stroke is in 2d-space (but with special 'image' scaling) */ | /* stroke is in 2d-space (but with special 'image' scaling) */ | ||||
| GP_STROKE_2DIMAGE = (1 << 2), | GP_STROKE_2DIMAGE = (1 << 2), | ||||
| /* stroke is selected */ | /* stroke is selected */ | ||||
| GP_STROKE_SELECT = (1 << 3), | GP_STROKE_SELECT = (1 << 3), | ||||
| /* Stroke use flat caps (used only while drawing). */ | |||||
HooglyBoogly: Adding this flag here is confusing since it duplicates the stroke type, even with the "used… | |||||
| GP_STROKE_USE_FLAT_CAPS = (1 << 4), | |||||
| /* Flag used to indicate that stroke is closed and draw edge between last and first point */ | /* Flag used to indicate that stroke is closed and draw edge between last and first point */ | ||||
| GP_STROKE_CYCLIC = (1 << 7), | GP_STROKE_CYCLIC = (1 << 7), | ||||
| /* Flag used to indicate that stroke is used for fill close and must use | /* Flag used to indicate that stroke is used for fill close and must use | ||||
| * fill color for stroke and no fill area */ | * fill color for stroke and no fill area */ | ||||
| GP_STROKE_NOFILL = (1 << 8), | GP_STROKE_NOFILL = (1 << 8), | ||||
| /* Flag to indicated that the editcurve has been changed and the stroke needs to be updated with | /* Flag to indicated that the editcurve has been changed and the stroke needs to be updated with | ||||
| * the curve data */ | * the curve data */ | ||||
| GP_STROKE_NEEDS_CURVE_UPDATE = (1 << 9), | GP_STROKE_NEEDS_CURVE_UPDATE = (1 << 9), | ||||
| ▲ Show 20 Lines • Show All 534 Lines • Show Last 20 Lines | |||||
Adding this flag here is confusing since it duplicates the stroke type, even with the "used only while drawing" comment.
I would replace one of the padding bytes under sbuffer_sflag with int8_t sbuffer_cap_type;
Then assigning the value becomes much simpler, since you don't have to go back and forth between a flag and the direct values.