Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/object/object_modifier.cc
| Show First 20 Lines • Show All 992 Lines • ▼ Show 20 Lines | |||||
| strcpy(name, md->name); /* Store name temporarily since the modifier is removed. */ | strcpy(name, md->name); /* Store name temporarily since the modifier is removed. */ | ||||
| } | } | ||||
| if (!ED_object_modifier_apply( | if (!ED_object_modifier_apply( | ||||
| bmain, op->reports, depsgraph, scene, ob, md, apply_as, keep_modifier)) { | bmain, op->reports, depsgraph, scene, ob, md, apply_as, keep_modifier)) { | ||||
| return OPERATOR_CANCELLED; | return OPERATOR_CANCELLED; | ||||
| } | } | ||||
| if (do_merge_customdata && | if (ob->type == OB_MESH && do_merge_customdata && | ||||
campbellbarton: This check should be added to `modifier_convert_exec` too. | |||||
campbellbartonUnsubmitted Not Done Inline Actions*Edit* checking on modifier_convert_exec it seems this should not have had BKE_mesh_merge_customdata_for_apply_modifier added in the first place. So I think this patch is fine as-is. campbellbarton: *Edit* checking on `modifier_convert_exec` it seems this should not have had… | |||||
campbellbartonUnsubmitted Not Done Inline Actionscampbellbarton: Handled rB993fd985f074bd5f0271a5adeafec5aefcdb64c7 | |||||
| (mti->type & (eModifierTypeType_Constructive | eModifierTypeType_Nonconstructive))) { | (mti->type & (eModifierTypeType_Constructive | eModifierTypeType_Nonconstructive))) { | ||||
| BKE_mesh_merge_customdata_for_apply_modifier((Mesh *)ob->data); | BKE_mesh_merge_customdata_for_apply_modifier((Mesh *)ob->data); | ||||
| } | } | ||||
| DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); | DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); | ||||
| DEG_relations_tag_update(bmain); | DEG_relations_tag_update(bmain); | ||||
| WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob); | WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob); | ||||
| ▲ Show 20 Lines • Show All 46 Lines • ▼ Show 20 Lines | |||||
| ot->poll = modifier_apply_poll; | ot->poll = modifier_apply_poll; | ||||
| /* flags */ | /* flags */ | ||||
| ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL; | ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL; | ||||
| edit_modifier_properties(ot); | edit_modifier_properties(ot); | ||||
| edit_modifier_report_property(ot); | edit_modifier_report_property(ot); | ||||
| RNA_def_boolean( | RNA_def_boolean(ot->srna, | ||||
| ot->srna, | "merge_customdata", | ||||
| "merge_customdata", | true, | ||||
| true, | "Merge UV's", | ||||
| "Merge UV's", | "For mesh objects, merge UV coordinates that share a vertex to account for " | ||||
| "Merge UV coordinates that share a vertex to account for imprecision in some modifiers"); | "imprecision in some modifiers"); | ||||
| PropertyRNA *prop = RNA_def_boolean(ot->srna, | PropertyRNA *prop = RNA_def_boolean(ot->srna, | ||||
| "single_user", | "single_user", | ||||
| false, | false, | ||||
| "Make Data Single User", | "Make Data Single User", | ||||
| "Make the object's data single user if needed"); | "Make the object's data single user if needed"); | ||||
| RNA_def_property_flag(prop, (PropertyFlag)(PROP_HIDDEN | PROP_SKIP_SAVE)); | RNA_def_property_flag(prop, (PropertyFlag)(PROP_HIDDEN | PROP_SKIP_SAVE)); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 992 Lines • Show Last 20 Lines | |||||
This check should be added to modifier_convert_exec too.