Cleanup: declare values for enums that may be written into blend files
This commit is contained in:
@@ -53,19 +53,19 @@ enum class MeshNormalDomain : int8_t {
|
||||
* Only #Mesh::face_normals() is necessary. This case is generally the best
|
||||
* for performance, since no mixing is necessary and multithreading is simple.
|
||||
*/
|
||||
Face,
|
||||
Face = 0,
|
||||
/**
|
||||
* The mesh is completely smooth shaded; there are no sharp face or edges. Only
|
||||
* #Mesh::vert_normals() is necessary. Calculating face normals is still necessary though,
|
||||
* since they have to be mixed to become vertex normals.
|
||||
*/
|
||||
Point,
|
||||
Point = 1,
|
||||
/**
|
||||
* The mesh has mixed smooth and sharp shading. In order to split the normals on each side of
|
||||
* sharp edges, they need to be processed per-face-corner. Normals can be retrieved with
|
||||
* #Mesh::corner_normals().
|
||||
*/
|
||||
Corner,
|
||||
Corner = 2,
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -572,8 +572,8 @@ static void CURVES_OT_convert_from_particle_system(wmOperatorType *ot)
|
||||
namespace snap_curves_to_surface {
|
||||
|
||||
enum class AttachMode {
|
||||
Nearest,
|
||||
Deform,
|
||||
Nearest = 0,
|
||||
Deform = 1,
|
||||
};
|
||||
|
||||
static void snap_curves_to_surface_exec_object(Object &curves_ob,
|
||||
|
||||
@@ -376,8 +376,8 @@ static int geometry_color_attribute_add_invoke(bContext *C, wmOperator *op, cons
|
||||
}
|
||||
|
||||
enum class ConvertAttributeMode {
|
||||
Generic,
|
||||
VertexGroup,
|
||||
Generic = 0,
|
||||
VertexGroup = 1,
|
||||
};
|
||||
|
||||
static bool geometry_attribute_convert_poll(bContext *C)
|
||||
|
||||
@@ -728,12 +728,12 @@ static void GREASE_PENCIL_OT_delete(wmOperatorType *ot)
|
||||
* \{ */
|
||||
|
||||
enum class DissolveMode : int8_t {
|
||||
/* Dissolve all selected points. */
|
||||
POINTS,
|
||||
/* Dissolve between selected points. */
|
||||
BETWEEN,
|
||||
/* Dissolve unselected points. */
|
||||
UNSELECT,
|
||||
/** Dissolve all selected points. */
|
||||
POINTS = 0,
|
||||
/** Dissolve between selected points. */
|
||||
BETWEEN = 1,
|
||||
/** Dissolve unselected points. */
|
||||
UNSELECT = 2,
|
||||
};
|
||||
|
||||
static const EnumPropertyItem prop_dissolve_types[] = {
|
||||
@@ -884,10 +884,10 @@ static void GREASE_PENCIL_OT_dissolve(wmOperatorType *ot)
|
||||
* \{ */
|
||||
|
||||
enum class DeleteFrameMode : int8_t {
|
||||
/* Delete the active frame for the current layer. */
|
||||
ACTIVE_FRAME,
|
||||
/* Delete the active frames for all layers. */
|
||||
ALL_FRAMES,
|
||||
/** Delete the active frame for the current layer. */
|
||||
ACTIVE_FRAME = 0,
|
||||
/** Delete the active frames for all layers. */
|
||||
ALL_FRAMES = 1,
|
||||
};
|
||||
|
||||
static const EnumPropertyItem prop_greasepencil_deleteframe_types[] = {
|
||||
@@ -1019,12 +1019,12 @@ static void GREASE_PENCIL_OT_stroke_material_set(wmOperatorType *ot)
|
||||
* \{ */
|
||||
|
||||
enum class CyclicalMode : int8_t {
|
||||
/* Sets all strokes to cycle. */
|
||||
CLOSE,
|
||||
/* Sets all strokes to not cycle. */
|
||||
OPEN,
|
||||
/* Switches the cyclic state of the strokes. */
|
||||
TOGGLE,
|
||||
/** Sets all strokes to cycle. */
|
||||
CLOSE = 0,
|
||||
/** Sets all strokes to not cycle. */
|
||||
OPEN = 1,
|
||||
/** Switches the cyclic state of the strokes. */
|
||||
TOGGLE = 2,
|
||||
};
|
||||
|
||||
static const EnumPropertyItem prop_cyclical_types[] = {
|
||||
@@ -1329,14 +1329,14 @@ static void GREASE_PENCIL_OT_stroke_switch_direction(wmOperatorType *ot)
|
||||
* \{ */
|
||||
|
||||
enum class CapsMode : int8_t {
|
||||
/* Switches both to Flat. */
|
||||
FLAT,
|
||||
/* Change only start. */
|
||||
START,
|
||||
/* Change only end. */
|
||||
END,
|
||||
/* Switches both to default rounded. */
|
||||
ROUND,
|
||||
/** Switches both to Flat. */
|
||||
FLAT = 0,
|
||||
/** Change only start. */
|
||||
START = 1,
|
||||
/** Change only end. */
|
||||
END = 2,
|
||||
/** Switches both to default rounded. */
|
||||
ROUND = 3,
|
||||
};
|
||||
|
||||
static void toggle_caps(MutableSpan<int8_t> caps, const IndexMask &strokes)
|
||||
|
||||
@@ -1189,10 +1189,10 @@ static void node_link_find_socket(bContext &C, wmOperator &op, const float2 &cur
|
||||
}
|
||||
|
||||
enum class NodeLinkAction : int {
|
||||
Begin,
|
||||
Cancel,
|
||||
Swap,
|
||||
Confirm,
|
||||
Begin = 0,
|
||||
Cancel = 1,
|
||||
Swap = 2,
|
||||
Confirm = 3,
|
||||
};
|
||||
|
||||
wmKeyMap *node_link_modal_keymap(wmKeyConfig *keyconf)
|
||||
|
||||
Reference in New Issue
Block a user