Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/render/render_shading.c
| Show First 20 Lines • Show All 1,292 Lines • ▼ Show 20 Lines | static int freestyle_modifier_copy_exec(bContext *C, wmOperator *op) | ||||
| LineStyleModifier *modifier = ptr.data; | LineStyleModifier *modifier = ptr.data; | ||||
| if (!freestyle_linestyle_check_report(lineset, op->reports)) { | if (!freestyle_linestyle_check_report(lineset, op->reports)) { | ||||
| return OPERATOR_CANCELLED; | return OPERATOR_CANCELLED; | ||||
| } | } | ||||
| switch (freestyle_get_modifier_type(&ptr)) { | switch (freestyle_get_modifier_type(&ptr)) { | ||||
| case LS_MODIFIER_TYPE_COLOR: | case LS_MODIFIER_TYPE_COLOR: | ||||
| BKE_linestyle_color_modifier_copy(lineset->linestyle, modifier); | BKE_linestyle_color_modifier_copy(lineset->linestyle, modifier, 0); | ||||
| break; | break; | ||||
| case LS_MODIFIER_TYPE_ALPHA: | case LS_MODIFIER_TYPE_ALPHA: | ||||
| BKE_linestyle_alpha_modifier_copy(lineset->linestyle, modifier); | BKE_linestyle_alpha_modifier_copy(lineset->linestyle, modifier, 0); | ||||
| break; | break; | ||||
| case LS_MODIFIER_TYPE_THICKNESS: | case LS_MODIFIER_TYPE_THICKNESS: | ||||
| BKE_linestyle_thickness_modifier_copy(lineset->linestyle, modifier); | BKE_linestyle_thickness_modifier_copy(lineset->linestyle, modifier, 0); | ||||
| break; | break; | ||||
| case LS_MODIFIER_TYPE_GEOMETRY: | case LS_MODIFIER_TYPE_GEOMETRY: | ||||
| BKE_linestyle_geometry_modifier_copy(lineset->linestyle, modifier); | BKE_linestyle_geometry_modifier_copy(lineset->linestyle, modifier, 0); | ||||
| break; | break; | ||||
| default: | default: | ||||
| BKE_report(op->reports, RPT_ERROR, "The object the data pointer refers to is not a valid modifier"); | BKE_report(op->reports, RPT_ERROR, "The object the data pointer refers to is not a valid modifier"); | ||||
| return OPERATOR_CANCELLED; | return OPERATOR_CANCELLED; | ||||
| } | } | ||||
| DAG_id_tag_update(&lineset->linestyle->id, 0); | DAG_id_tag_update(&lineset->linestyle->id, 0); | ||||
| WM_event_add_notifier(C, NC_LINESTYLE, lineset->linestyle); | WM_event_add_notifier(C, NC_LINESTYLE, lineset->linestyle); | ||||
| ▲ Show 20 Lines • Show All 605 Lines • Show Last 20 Lines | |||||