Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/render/render_shading.c
| Show First 20 Lines • Show All 1,776 Lines • ▼ Show 20 Lines | |||||
| { | { | ||||
| Material *ma = CTX_data_pointer_get_type(C, "material", &RNA_Material).data; | Material *ma = CTX_data_pointer_get_type(C, "material", &RNA_Material).data; | ||||
| if (ma == NULL) | if (ma == NULL) | ||||
| return OPERATOR_CANCELLED; | return OPERATOR_CANCELLED; | ||||
| paste_matcopybuf(CTX_data_main(C), ma); | paste_matcopybuf(CTX_data_main(C), ma); | ||||
| DEG_id_tag_update(&ma->id, ID_RECALC_COPY_ON_WRITE); | |||||
| WM_event_add_notifier(C, NC_MATERIAL | ND_SHADING_LINKS, ma); | WM_event_add_notifier(C, NC_MATERIAL | ND_SHADING_LINKS, ma); | ||||
| return OPERATOR_FINISHED; | return OPERATOR_FINISHED; | ||||
| } | } | ||||
| void MATERIAL_OT_paste(wmOperatorType *ot) | void MATERIAL_OT_paste(wmOperatorType *ot) | ||||
| { | { | ||||
| /* identifiers */ | /* identifiers */ | ||||
| ▲ Show 20 Lines • Show All 162 Lines • Show Last 20 Lines | |||||