Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/sculpt_paint/sculpt_filter_color.c
| Show First 20 Lines • Show All 302 Lines • ▼ Show 20 Lines | void SCULPT_OT_color_filter(struct wmOperatorType *ot) | ||||
| /* identifiers */ | /* identifiers */ | ||||
| ot->name = "Filter color"; | ot->name = "Filter color"; | ||||
| ot->idname = "SCULPT_OT_color_filter"; | ot->idname = "SCULPT_OT_color_filter"; | ||||
| ot->description = "Applies a filter to modify the current sculpt vertex colors"; | ot->description = "Applies a filter to modify the current sculpt vertex colors"; | ||||
| /* api callbacks */ | /* api callbacks */ | ||||
| ot->invoke = sculpt_color_filter_invoke; | ot->invoke = sculpt_color_filter_invoke; | ||||
| ot->modal = sculpt_color_filter_modal; | ot->modal = sculpt_color_filter_modal; | ||||
| ot->poll = SCULPT_mode_poll; | ot->poll = SCULPT_vertex_colors_poll; | ||||
| ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; | ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; | ||||
| /* rna */ | /* rna */ | ||||
| RNA_def_enum(ot->srna, "type", prop_color_filter_types, COLOR_FILTER_HUE, "Filter type", ""); | RNA_def_enum(ot->srna, "type", prop_color_filter_types, COLOR_FILTER_HUE, "Filter type", ""); | ||||
| RNA_def_float( | RNA_def_float( | ||||
| ot->srna, "strength", 1.0f, -10.0f, 10.0f, "Strength", "Filter Strength", -10.0f, 10.0f); | ot->srna, "strength", 1.0f, -10.0f, 10.0f, "Strength", "Filter Strength", -10.0f, 10.0f); | ||||
| PropertyRNA *prop = RNA_def_float_color( | PropertyRNA *prop = RNA_def_float_color( | ||||
| ot->srna, "fill_color", 3, NULL, 0.0f, FLT_MAX, "Fill Color", "fill color", 0.0f, 1.0f); | ot->srna, "fill_color", 3, NULL, 0.0f, FLT_MAX, "Fill Color", "fill color", 0.0f, 1.0f); | ||||
| RNA_def_property_subtype(prop, PROP_COLOR_GAMMA); | RNA_def_property_subtype(prop, PROP_COLOR_GAMMA); | ||||
| } | } | ||||