Cleanup: rename ED_object_modifier_convert to make it's use clearer
This function is specific to particle-systems which wasn't obvious, leading to an error in [0] which added UV handling which doesn't make sense.
This commit is contained in:
parent
c8058e51ee
commit
c338388354
|
@ -536,12 +536,12 @@ bool ED_object_modifier_move_to_index(struct ReportList *reports,
|
|||
struct ModifierData *md,
|
||||
int index);
|
||||
|
||||
bool ED_object_modifier_convert(struct ReportList *reports,
|
||||
struct Main *bmain,
|
||||
struct Depsgraph *depsgraph,
|
||||
struct ViewLayer *view_layer,
|
||||
struct Object *ob,
|
||||
struct ModifierData *md);
|
||||
bool ED_object_modifier_convert_psys_to_mesh(struct ReportList *reports,
|
||||
struct Main *bmain,
|
||||
struct Depsgraph *depsgraph,
|
||||
struct ViewLayer *view_layer,
|
||||
struct Object *ob,
|
||||
struct ModifierData *md);
|
||||
bool ED_object_modifier_apply(struct Main *bmain,
|
||||
struct ReportList *reports,
|
||||
struct Depsgraph *depsgraph,
|
||||
|
|
|
@ -515,12 +515,12 @@ void ED_object_modifier_copy_to_object(bContext *C,
|
|||
DEG_relations_tag_update(bmain);
|
||||
}
|
||||
|
||||
bool ED_object_modifier_convert(ReportList *UNUSED(reports),
|
||||
Main *bmain,
|
||||
Depsgraph *depsgraph,
|
||||
ViewLayer *view_layer,
|
||||
Object *ob,
|
||||
ModifierData *md)
|
||||
bool ED_object_modifier_convert_psys_to_mesh(ReportList *UNUSED(reports),
|
||||
Main *bmain,
|
||||
Depsgraph *depsgraph,
|
||||
ViewLayer *view_layer,
|
||||
Object *ob,
|
||||
ModifierData *md)
|
||||
{
|
||||
int cvert = 0;
|
||||
|
||||
|
@ -1608,7 +1608,7 @@ void OBJECT_OT_modifier_apply_as_shapekey(wmOperatorType *ot)
|
|||
/** \} */
|
||||
|
||||
/* ------------------------------------------------------------------- */
|
||||
/** \name Convert Modifier Operator
|
||||
/** \name Convert Particle System Modifier to Mesh Operator
|
||||
* \{ */
|
||||
|
||||
static int modifier_convert_exec(bContext *C, wmOperator *op)
|
||||
|
@ -1621,7 +1621,8 @@ static int modifier_convert_exec(bContext *C, wmOperator *op)
|
|||
const ModifierTypeInfo *mti = BKE_modifier_get_info((ModifierType)md->type);
|
||||
const bool do_merge_customdata = RNA_boolean_get(op->ptr, "merge_customdata");
|
||||
|
||||
if (!md || !ED_object_modifier_convert(op->reports, bmain, depsgraph, view_layer, ob, md)) {
|
||||
if (!md || !ED_object_modifier_convert_psys_to_mesh(
|
||||
op->reports, bmain, depsgraph, view_layer, ob, md)) {
|
||||
return OPERATOR_CANCELLED;
|
||||
}
|
||||
|
||||
|
@ -1646,7 +1647,7 @@ static int modifier_convert_invoke(bContext *C, wmOperator *op, const wmEvent *U
|
|||
|
||||
void OBJECT_OT_modifier_convert(wmOperatorType *ot)
|
||||
{
|
||||
ot->name = "Convert Modifier";
|
||||
ot->name = "Convert Particles to Mesh";
|
||||
ot->description = "Convert particles to a mesh object";
|
||||
ot->idname = "OBJECT_OT_modifier_convert";
|
||||
|
||||
|
|
Loading…
Reference in New Issue