47 if (
bm->totloop !=
bm->totface * 3) {
162 if (ss.
bm !=
nullptr) {
179 if (ss.
bm ==
nullptr) {
222 const char *msg_error =
RPT_(
"Attribute Data Detected");
223 const char *msg =
RPT_(
"Dyntopo will not preserve colors, UVs, or other attributes");
224 layout->
label(msg_error, ICON_INFO);
225 layout->
label(msg, ICON_NONE);
230 const char *msg_error =
RPT_(
"Generative Modifiers Detected!");
231 const char *msg =
RPT_(
232 "Keeping the modifiers will increase polycount when returning to object mode");
234 layout->
label(msg_error, ICON_INFO);
235 layout->
label(msg, ICON_NONE);
260 return dyntopo_supports_layer(layer);
293 for (; md; md = md->
next) {
332 ot->name =
"Dynamic Topology Toggle";
333 ot->idname =
"SCULPT_OT_dynamic_topology_toggle";
334 ot->description =
"Dynamic topology alters the mesh topology while sculpting";
Depsgraph * CTX_data_ensure_evaluated_depsgraph(const bContext *C)
Object * CTX_data_active_object(const bContext *C)
Scene * CTX_data_scene(const bContext *C)
Main * CTX_data_main(const bContext *C)
#define CD_TYPE_AS_MASK(_type)
void BKE_mesh_mselect_clear(Mesh *mesh)
bool BKE_modifier_is_enabled(const Scene *scene, ModifierData *md, int required_mode)
const ModifierTypeInfo * BKE_modifier_get_info(ModifierType type)
ModifierData * BKE_modifiers_get_virtual_modifierlist(const Object *ob, VirtualModifierData *data)
General operations, lookup, etc. for blender objects.
void BKE_sculptsession_bm_to_me(Object *ob, bool reorder)
void BKE_sculptsession_free_pbvh(Object &object)
A BVH for high poly meshes.
void BKE_particlesystem_reset_all(struct Object *object)
#define PTCACHE_RESET_OUTDATED
int BKE_ptcache_object_reset(struct Scene *scene, struct Object *ob, int mode)
void BKE_scene_graph_update_tagged(Depsgraph *depsgraph, Main *bmain)
#define UNUSED_VARS_NDEBUG(...)
void DEG_id_tag_update(ID *id, unsigned int flags)
@ ME_SCULPT_DYNAMIC_TOPOLOGY
@ MOD_TRIANGULATE_NGON_EARCLIP
@ MOD_TRIANGULATE_QUAD_BEAUTY
UndoStack * ED_undo_stack_get()
void UI_popup_menu_end(bContext *C, uiPopupMenu *pup)
uiPopupMenu * UI_popup_menu_begin(bContext *C, const char *title, int icon) ATTR_NONNULL()
uiLayout * UI_popup_menu_layout(uiPopupMenu *pup)
bool BM_data_layer_free_named(BMesh *bm, CustomData *data, StringRef name)
void BM_data_layer_ensure_named(BMesh *bm, CustomData *data, int type, const StringRef name)
void BM_log_free(BMLog *log)
BMLog * BM_log_create(BMesh *bm)
void BM_mesh_free(BMesh *bm)
BMesh Free Mesh.
BMesh * BM_mesh_create(const BMAllocTemplate *allocsize, const BMeshCreateParams *params)
BMesh Make Mesh.
#define BMALLOC_TEMPLATE_FROM_ME(...)
void BM_mesh_bm_from_me(BMesh *bm, const Mesh *mesh, const BMeshFromMeshParams *params)
bool BM_attribute_stored_in_bmesh_builtin(const StringRef name)
void BM_mesh_normals_update(BMesh *bm)
void BM_mesh_triangulate(BMesh *bm, const int quad_method, const int ngon_method, const int min_vertices, const bool tag_only, BMOperator *op, BMOpSlot *slot_facemap_out, BMOpSlot *slot_facemap_double_out)
BPy_StructRNA * depsgraph
constexpr const T * end() const
constexpr const T * begin() const
void enable_ex(Main &bmain, Depsgraph &depsgraph, Object &ob)
void disable_with_undo(Main &bmain, Depsgraph &depsgraph, Scene &scene, Object &ob)
static wmOperatorStatus dyntopo_warning_popup(bContext *C, wmOperatorType *ot, enum WarnFlag flag)
static void disable(Main &bmain, Depsgraph &depsgraph, Scene &scene, Object &ob, undo::StepData *undo_step)
static bool dyntopo_supports_layer(const CustomDataLayer &layer)
void triangulate(BMesh *bm)
WarnFlag check_attribute_warning(Scene &scene, Object &ob)
static wmOperatorStatus sculpt_dynamic_topology_toggle_exec(bContext *C, wmOperator *)
void SCULPT_OT_dynamic_topology_toggle(wmOperatorType *ot)
static bool dyntopo_supports_customdata_layers(const Span< CustomDataLayer > layers)
static wmOperatorStatus sculpt_dynamic_topology_toggle_invoke(bContext *C, wmOperator *op, const wmEvent *)
static void enable_with_undo(Main &bmain, Depsgraph &depsgraph, const Scene &scene, Object &ob)
void push_end(Object &ob)
void push_begin_ex(const Scene &, Object &ob, const char *name)
void push_node(const Depsgraph &depsgraph, const Object &object, const bke::pbvh::Node *node, const Type type)
void restore_from_bmesh_enter_geometry(const StepData &step_data, Mesh &mesh)
bool SCULPT_mode_poll(bContext *C)
struct ModifierData * next
struct SculptSession * sculpt
PointerRNA op(wmOperatorType *ot, std::optional< blender::StringRef > name, int icon, wmOperatorCallContext context, eUI_Item_Flag flag)
void label(blender::StringRef name, int icon)
void separator(float factor=1.0f, LayoutSeparatorType type=LayoutSeparatorType::Auto)
struct wmOperatorType * type
void WM_cursor_wait(bool val)
void WM_main_add_notifier(uint type, void *reference)