Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c
| Show First 20 Lines • Show All 124 Lines • ▼ Show 20 Lines | static int weight_from_bones_exec(bContext *C, wmOperator *op) | ||||
| Object *armob = modifiers_isDeformedByArmature(ob); | Object *armob = modifiers_isDeformedByArmature(ob); | ||||
| Mesh *me = ob->data; | Mesh *me = ob->data; | ||||
| int type = RNA_enum_get(op->ptr, "type"); | int type = RNA_enum_get(op->ptr, "type"); | ||||
| ED_object_vgroup_calc_from_armature( | ED_object_vgroup_calc_from_armature( | ||||
| op->reports, depsgraph, scene, ob, armob, type, (me->editflag & ME_EDIT_MIRROR_X)); | op->reports, depsgraph, scene, ob, armob, type, (me->editflag & ME_EDIT_MIRROR_X)); | ||||
| DEG_id_tag_update(&me->id, 0); | DEG_id_tag_update(&me->id, 0); | ||||
| DEG_relations_tag_update(CTX_data_main(C)); | |||||
| WM_event_add_notifier(C, NC_GEOM | ND_DATA, me); | WM_event_add_notifier(C, NC_GEOM | ND_DATA, me); | ||||
| return OPERATOR_FINISHED; | return OPERATOR_FINISHED; | ||||
| } | } | ||||
| void PAINT_OT_weight_from_bones(wmOperatorType *ot) | void PAINT_OT_weight_from_bones(wmOperatorType *ot) | ||||
| { | { | ||||
| static const EnumPropertyItem type_items[] = { | static const EnumPropertyItem type_items[] = { | ||||
| ▲ Show 20 Lines • Show All 750 Lines • Show Last 20 Lines | |||||