30#include "RNA_prototypes.hh"
78 ot->name =
"Delete Higher Levels";
79 ot->description =
"Deletes the higher resolution mesh, potential loss of detail";
80 ot->idname =
"OBJECT_OT_multires_higher_levels_delete";
102 "Create a new level using Catmull-Clark subdivisions"},
107 "Create a new level using simple subdivisions"},
112 "Create a new level using linear interpolation of the sculpted displacement"},
113 {0,
nullptr, 0,
nullptr,
nullptr},
156 ot->name =
"Multires Subdivide";
157 ot->description =
"Add a new level of subdivision";
158 ot->idname =
"OBJECT_OT_multires_subdivide";
172 "How the mesh is going to be subdivided to create a new level");
198 if (selob->type ==
OB_MESH && selob != ob) {
233 ot->name =
"Multires Reshape";
234 ot->description =
"Copy vertex coordinates from other object";
235 ot->idname =
"OBJECT_OT_multires_reshape";
321 ot->name =
"Multires Save External";
322 ot->description =
"Save displacements to an external file";
323 ot->idname =
"OBJECT_OT_multires_external_save";
366 ot->name =
"Multires Pack External";
367 ot->description =
"Pack displacements from an external file";
368 ot->idname =
"OBJECT_OT_multires_external_pack";
422 ot->name =
"Multires Apply Base";
423 ot->description =
"Modify the base mesh to conform to the displaced mesh";
424 ot->idname =
"OBJECT_OT_multires_base_apply";
437 "Apply Subdivision Heuristic",
438 "Whether or not the final base mesh positions will be slightly altered to account for a new "
439 "subdivision modifier being added");
461 if (new_levels == 0) {
484 ot->name =
"Unsubdivide";
485 ot->description =
"Rebuild a lower subdivision level of the current base mesh";
486 ot->idname =
"OBJECT_OT_multires_unsubdivide";
515 if (new_levels == 0) {
540 ot->name =
"Rebuild Lower Subdivisions";
542 "Rebuilds all possible subdivisions levels to generate a lower resolution base mesh";
543 ot->idname =
"OBJECT_OT_multires_rebuild_subdiv";
#define CTX_DATA_BEGIN(C, Type, instance, member)
Depsgraph * CTX_data_ensure_evaluated_depsgraph(const bContext *C)
Depsgraph * CTX_data_depsgraph_pointer(const bContext *C)
Scene * CTX_data_scene(const bContext *C)
Main * CTX_data_main(const bContext *C)
CustomData interface, see also DNA_customdata_types.h.
void CustomData_external_remove(CustomData *data, ID *id, eCustomDataType type, int totelem)
void CustomData_external_add(CustomData *data, ID *id, eCustomDataType type, int totelem, const char *filepath)
void CustomData_external_write(CustomData *data, ID *id, eCustomDataMask mask, int totelem, int free)
bool CustomData_external_test(CustomData *data, eCustomDataType type)
const CustomData_MeshMasks CD_MASK_MESH
const char * BKE_main_blendfile_path(const Main *bmain) ATTR_NONNULL()
void multiresModifier_subdivide(Object *object, MultiresModifierData *mmd, MultiresSubdivideModeType mode)
bool multiresModifier_reshapeFromObject(Depsgraph *depsgraph, MultiresModifierData *mmd, Object *dst, Object *src)
void multiresModifier_del_levels(MultiresModifierData *mmd, Scene *scene, Object *object, int direction)
MultiresSubdivideModeType
void multiresModifier_base_apply(Depsgraph *depsgraph, Object *object, MultiresModifierData *mmd, ApplyBaseMode mode)
int multiresModifier_rebuild_subdiv(Depsgraph *depsgraph, Object *object, MultiresModifierData *mmd, int rebuild_limit, bool switch_view_to_lower_level)
void BKE_sculpt_mask_layers_ensure(Depsgraph *depsgraph, Main *bmain, Object *ob, MultiresModifierData *mmd)
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
void BKE_report(ReportList *reports, eReportType type, const char *message)
bool void BLI_path_rel(char path[FILE_MAX], const char *basepath) ATTR_NONNULL(1)
#define SNPRINTF_UTF8(dst, format,...)
void DEG_id_tag_update(ID *id, unsigned int flags)
Object is a sort of wrapper for general info.
BPy_StructRNA * depsgraph
void OBJECT_OT_multires_base_apply(wmOperatorType *ot)
bool edit_modifier_invoke_properties(bContext *C, wmOperator *op)
void OBJECT_OT_multires_rebuild_subdiv(wmOperatorType *ot)
void OBJECT_OT_multires_reshape(wmOperatorType *ot)
bool iter_other(Main *bmain, Object *orig_ob, bool include_orig, bool(*callback)(Object *ob, void *callback_data), void *callback_data)
static wmOperatorStatus multires_external_save_exec(bContext *C, wmOperator *op)
static wmOperatorStatus multires_higher_levels_delete_exec(bContext *C, wmOperator *op)
void OBJECT_OT_multires_unsubdivide(wmOperatorType *ot)
bool multires_update_totlevels(Object *ob, void *totlevel_v)
static wmOperatorStatus multires_unsubdivide_invoke(bContext *C, wmOperator *op, const wmEvent *)
void OBJECT_OT_multires_subdivide(wmOperatorType *ot)
static wmOperatorStatus multires_base_apply_exec(bContext *C, wmOperator *op)
bool edit_modifier_poll_generic(bContext *C, StructRNA *rna_type, int obtype_flag, bool is_editmode_allowed, bool is_liboverride_allowed)
ModifierData * edit_modifier_property_get(wmOperator *op, Object *ob, int type)
static wmOperatorStatus multires_reshape_invoke(bContext *C, wmOperator *op, const wmEvent *)
static wmOperatorStatus multires_base_apply_invoke(bContext *C, wmOperator *op, const wmEvent *)
Object * context_active_object(const bContext *C)
void OBJECT_OT_multires_external_save(wmOperatorType *ot)
void OBJECT_OT_multires_higher_levels_delete(wmOperatorType *ot)
static wmOperatorStatus multires_reshape_exec(bContext *C, wmOperator *op)
static wmOperatorStatus multires_rebuild_subdiv_invoke(bContext *C, wmOperator *op, const wmEvent *)
static EnumPropertyItem prop_multires_subdivide_mode_type[]
static wmOperatorStatus multires_unsubdivide_exec(bContext *C, wmOperator *op)
static wmOperatorStatus multires_subdivide_invoke(bContext *C, wmOperator *op, const wmEvent *)
static wmOperatorStatus multires_subdivide_exec(bContext *C, wmOperator *op)
static wmOperatorStatus multires_external_save_invoke(bContext *C, wmOperator *op, const wmEvent *)
void OBJECT_OT_multires_external_pack(wmOperatorType *ot)
static wmOperatorStatus multires_external_pack_exec(bContext *C, wmOperator *)
static wmOperatorStatus multires_rebuild_subdiv_exec(bContext *C, wmOperator *op)
static bool multires_poll(bContext *C)
static wmOperatorStatus multires_higher_levels_delete_invoke(bContext *C, wmOperator *op, const wmEvent *)
void edit_modifier_properties(wmOperatorType *ot)
void push_multires_mesh_begin(bContext *C, const char *str)
void push_multires_mesh_end(bContext *C, const char *str)
void RNA_string_set(PointerRNA *ptr, const char *name, const char *value)
std::string RNA_string_get(PointerRNA *ptr, const char *name)
bool RNA_struct_property_is_set(PointerRNA *ptr, const char *identifier)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
int RNA_enum_get(PointerRNA *ptr, const char *name)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, const int default_value, const char *ui_name, const char *ui_description)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, const bool default_value, const char *ui_name, const char *ui_description)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
struct ReportList * reports
struct wmOperatorType * type
void WM_event_add_fileselect(bContext *C, wmOperator *op)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
void WM_operator_properties_filesel(wmOperatorType *ot, const int filter, const short type, const eFileSel_Action action, const eFileSel_Flag flag, const short display, const short sort)