This repository has been archived on 2023-10-09. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
blender-archive/source/blender/makesdna/DNA_object_enums.h
Jacques Lucke 07032dd218 Curves: add initial sculpt mode
This adds a new sculpt mode to the experimental new curves object.
Currently, this mode can only be entered and exited, nothing else.
The main initial purpose of this node will be to use it for hair grooming.

The patch also adds the `editors/curves/` directory for the new curves
object, which will be necessary for many other things as well.

I added a completely new mode (`OB_MODE_SCULPT_CURVES`), because
`OB_MODE_SCULPT` seems to be rather specific to meshes, and reusing
it doesn't seem worth the trouble. The tools/brushes used in mesh vs.
curves sculpt mode are quite distinct as well.

I had to add DNA_userdef_enums.h to make the patch compile with C++
(forward declaration of enums isn't allowed). This follows the same
pattern that we use for other enums in dna.

Differential Revision: https://developer.blender.org/D14107
2022-02-15 12:32:15 +01:00

69 lines
1.8 KiB
C++

/* SPDX-License-Identifier: GPL-2.0-or-later */
/** \file
* \ingroup DNA
*
* Enums typedef's for use in public headers.
*/
#pragma once
#ifdef __cplusplus
extern "C" {
#endif
/** #Object.mode */
typedef enum eObjectMode {
OB_MODE_OBJECT = 0,
OB_MODE_EDIT = 1 << 0,
OB_MODE_SCULPT = 1 << 1,
OB_MODE_VERTEX_PAINT = 1 << 2,
OB_MODE_WEIGHT_PAINT = 1 << 3,
OB_MODE_TEXTURE_PAINT = 1 << 4,
OB_MODE_PARTICLE_EDIT = 1 << 5,
OB_MODE_POSE = 1 << 6,
OB_MODE_EDIT_GPENCIL = 1 << 7,
OB_MODE_PAINT_GPENCIL = 1 << 8,
OB_MODE_SCULPT_GPENCIL = 1 << 9,
OB_MODE_WEIGHT_GPENCIL = 1 << 10,
OB_MODE_VERTEX_GPENCIL = 1 << 11,
OB_MODE_SCULPT_CURVES = 1 << 12,
} eObjectMode;
/** #Object.dt, #View3DShading.type */
typedef enum eDrawType {
OB_BOUNDBOX = 1,
OB_WIRE = 2,
OB_SOLID = 3,
OB_MATERIAL = 4,
OB_TEXTURE = 5,
OB_RENDER = 6,
} eDrawType;
/** Any mode where the brush system is used. */
#define OB_MODE_ALL_PAINT \
(OB_MODE_SCULPT | OB_MODE_VERTEX_PAINT | OB_MODE_WEIGHT_PAINT | OB_MODE_TEXTURE_PAINT)
#define OB_MODE_ALL_PAINT_GPENCIL \
(OB_MODE_PAINT_GPENCIL | OB_MODE_SCULPT_GPENCIL | OB_MODE_WEIGHT_GPENCIL | \
OB_MODE_VERTEX_GPENCIL)
/** Any mode that uses Object.sculpt. */
#define OB_MODE_ALL_SCULPT (OB_MODE_SCULPT | OB_MODE_VERTEX_PAINT | OB_MODE_WEIGHT_PAINT)
/** Any mode that uses weightpaint. */
#define OB_MODE_ALL_WEIGHT_PAINT (OB_MODE_WEIGHT_PAINT | OB_MODE_WEIGHT_GPENCIL)
/**
* Any mode that has data or for Grease Pencil modes, we need to free when switching modes,
* see: #ED_object_mode_generic_exit
*/
#define OB_MODE_ALL_MODE_DATA \
(OB_MODE_EDIT | OB_MODE_VERTEX_PAINT | OB_MODE_WEIGHT_PAINT | OB_MODE_SCULPT | OB_MODE_POSE | \
OB_MODE_PAINT_GPENCIL | OB_MODE_EDIT_GPENCIL | OB_MODE_SCULPT_GPENCIL | \
OB_MODE_WEIGHT_GPENCIL | OB_MODE_VERTEX_GPENCIL | OB_MODE_SCULPT_CURVES)
#ifdef __cplusplus
}
#endif