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},
154 ot->
name =
"Multires Subdivide";
156 ot->
idname =
"OBJECT_OT_multires_subdivide";
170 "How the mesh is going to be subdivided to create a new level");
196 if (selob->type ==
OB_MESH && selob != ob) {
229 ot->
name =
"Multires Reshape";
230 ot->
description =
"Copy vertex coordinates from other object";
231 ot->
idname =
"OBJECT_OT_multires_reshape";
304 SNPRINTF(filepath,
"//%s.btx", mesh->id.name + 2);
314 ot->
name =
"Multires Save External";
316 ot->
idname =
"OBJECT_OT_multires_external_save";
359 ot->
name =
"Multires Pack External";
360 ot->
description =
"Pack displacements from an external file";
361 ot->
idname =
"OBJECT_OT_multires_external_pack";
409 ot->
name =
"Multires Apply Base";
410 ot->
description =
"Modify the base mesh to conform to the displaced mesh";
411 ot->
idname =
"OBJECT_OT_multires_base_apply";
440 if (new_levels == 0) {
462 ot->
description =
"Rebuild a lower subdivision level of the current base mesh";
463 ot->
idname =
"OBJECT_OT_multires_unsubdivide";
492 if (new_levels == 0) {
515 ot->
name =
"Rebuild Lower Subdivisions";
517 "Rebuilds all possible subdivisions levels to generate a lower resolution base mesh";
518 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()
bool multiresModifier_reshapeFromObject(Depsgraph *depsgraph, MultiresModifierData *mmd, Object *dst, Object *src)
void multiresModifier_del_levels(MultiresModifierData *mmd, Scene *scene, Object *object, int direction)
void multiresModifier_subdivide(Object *object, MultiresModifierData *mmd, eMultiresSubdivideModeType mode)
eMultiresSubdivideModeType
@ MULTIRES_SUBDIVIDE_LINEAR
@ MULTIRES_SUBDIVIDE_CATMULL_CLARK
@ MULTIRES_SUBDIVIDE_SIMPLE
void multiresModifier_base_apply(Depsgraph *depsgraph, Object *object, MultiresModifierData *mmd)
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(dst, format,...)
void DEG_id_tag_update(ID *id, unsigned int flags)
Object is a sort of wrapper for general info.
const Depsgraph * depsgraph
static int multires_higher_levels_delete_invoke(bContext *C, wmOperator *op, const wmEvent *)
static int multires_base_apply_exec(bContext *C, wmOperator *op)
static int multires_subdivide_exec(bContext *C, wmOperator *op)
void OBJECT_OT_multires_base_apply(wmOperatorType *ot)
static int multires_external_pack_exec(bContext *C, wmOperator *)
static int multires_external_save_exec(bContext *C, wmOperator *op)
static int multires_rebuild_subdiv_exec(bContext *C, wmOperator *op)
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 int multires_reshape_exec(bContext *C, wmOperator *op)
void OBJECT_OT_multires_unsubdivide(wmOperatorType *ot)
bool multires_update_totlevels(Object *ob, void *totlevel_v)
void OBJECT_OT_multires_subdivide(wmOperatorType *ot)
static int multires_subdivide_invoke(bContext *C, wmOperator *op, const wmEvent *)
bool edit_modifier_poll_generic(bContext *C, StructRNA *rna_type, int obtype_flag, bool is_editmode_allowed, bool is_liboverride_allowed)
static int multires_external_save_invoke(bContext *C, wmOperator *op, const wmEvent *)
ModifierData * edit_modifier_property_get(wmOperator *op, Object *ob, int type)
static int multires_unsubdivide_invoke(bContext *C, wmOperator *op, const wmEvent *)
Object * context_active_object(const bContext *C)
void OBJECT_OT_multires_external_save(wmOperatorType *ot)
static int multires_unsubdivide_exec(bContext *C, wmOperator *op)
static int multires_higher_levels_delete_exec(bContext *C, wmOperator *op)
void OBJECT_OT_multires_higher_levels_delete(wmOperatorType *ot)
static int multires_reshape_invoke(bContext *C, wmOperator *op, const wmEvent *)
static int multires_base_apply_invoke(bContext *C, wmOperator *op, const wmEvent *)
static EnumPropertyItem prop_multires_subdivide_mode_type[]
void OBJECT_OT_multires_external_pack(wmOperatorType *ot)
static int multires_rebuild_subdiv_invoke(bContext *C, wmOperator *op, const wmEvent *)
static bool multires_poll(bContext *C)
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)
void RNA_string_get(PointerRNA *ptr, const char *name, char *value)
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)
bool(* poll)(bContext *C) ATTR_WARN_UNUSED_RESULT
int(* invoke)(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
int(* exec)(bContext *C, wmOperator *op) ATTR_WARN_UNUSED_RESULT
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)