Blender
V3.3
|
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
#include "BLI_hash.h"
#include "BLI_math.h"
#include "BLI_math_color_blend.h"
#include "BLI_task.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "BKE_brush.h"
#include "BKE_colortools.h"
#include "BKE_context.h"
#include "BKE_mesh.h"
#include "BKE_mesh_mapping.h"
#include "BKE_object.h"
#include "BKE_paint.h"
#include "BKE_pbvh.h"
#include "BKE_report.h"
#include "BKE_scene.h"
#include "IMB_colormanagement.h"
#include "DEG_depsgraph.h"
#include "WM_api.h"
#include "WM_message.h"
#include "WM_toolsystem.h"
#include "WM_types.h"
#include "ED_object.h"
#include "ED_paint.h"
#include "ED_screen.h"
#include "ED_sculpt.h"
#include "paint_intern.h"
#include "sculpt_intern.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "UI_interface.h"
#include "bmesh.h"
#include <math.h>
#include <stdlib.h>
Go to the source code of this file.
Typedefs | |
typedef enum eSculptColorFilterTypes | eSculptColorFilterTypes |
Functions | |
static void | color_filter_task_cb (void *__restrict userdata, const int n, const TaskParallelTLS *__restrict UNUSED(tls)) |
static void | sculpt_color_presmooth_init (SculptSession *ss) |
static int | sculpt_color_filter_modal (bContext *C, wmOperator *op, const wmEvent *event) |
static int | sculpt_color_filter_invoke (bContext *C, wmOperator *op, const wmEvent *event) |
void | SCULPT_OT_color_filter (struct wmOperatorType *ot) |
Variables | |
static EnumPropertyItem | prop_color_filter_types [] |
typedef enum eSculptColorFilterTypes eSculptColorFilterTypes |
Definition at line 56 of file sculpt_filter_color.c.
|
static |
Definition at line 86 of file sculpt_filter_color.c.
References FilterCache::automasking, BKE_pbvh_node_mark_update_color(), BKE_pbvh_vertex_iter_begin, BKE_pbvh_vertex_iter_end, blend_color_interpolate_float(), blend_color_mix_float(), CLAMP4, clamp_f(), SculptOrigVertData::col, col, COLOR_FILTER_BLUE, COLOR_FILTER_BRIGHTNESS, COLOR_FILTER_CONTRAST, COLOR_FILTER_FILL, COLOR_FILTER_GREEN, COLOR_FILTER_HUE, COLOR_FILTER_RED, COLOR_FILTER_SATURATION, COLOR_FILTER_SMOOTH, COLOR_FILTER_VALUE, copy_v3_v3(), copy_v4_v4(), data, fabs(), fade(), SculptSession::filter_cache, hsv_to_rgb_v(), hue, PBVHVertexIter::index, interp_v4_v4v4(), madd_v4_v4fl(), PBVHVertexIter::mask, mul_v4_fl(), offset, SculptSession::pbvh, PBVH_ITER_UNIQUE, FilterCache::pre_smoothed_color, rgb_to_hsv_v(), SCULPT_automasking_factor_get(), SCULPT_neighbor_color_average(), SCULPT_orig_vert_data_init(), SCULPT_orig_vert_data_update(), SCULPT_UNDO_COLOR, SCULPT_vertex_color_get(), SCULPT_vertex_color_set(), and sub_v4_v4().
Referenced by sculpt_color_filter_modal().
|
static |
Definition at line 323 of file sculpt_filter_color.c.
References FilterCache::active_face_set, FilterCache::automasking, BKE_pbvh_type(), BKE_sculpt_color_layer_create_if_needed(), BKE_sculpt_update_object_for_edit(), C, View3DShading::color_type, CTX_data_active_object(), CTX_data_ensure_evaluated_depsgraph(), CTX_data_tool_settings(), CTX_wm_view3d(), depsgraph, ED_paint_tool_update_sticky_shading_color(), SculptSession::filter_cache, wmEvent::mval, NULL, OB_SOLID, OPERATOR_CANCELLED, OPERATOR_RUNNING_MODAL, SculptSession::pbvh, PBVH_FACES, SculptSession::pmap, wmOperator::reports, Object::sculpt, ToolSettings::sculpt, SCULPT_automasking_cache_init(), SCULPT_cursor_geometry_info_update(), SCULPT_FACE_SET_NONE, SCULPT_filter_cache_init(), SCULPT_handles_colors_report(), SCULPT_is_automasking_enabled(), SCULPT_UNDO_COLOR, SCULPT_undo_push_begin(), View3D::shading, View3DShading::type, UNPACK2, V3D_SHADING_VERTEX_COLOR, and WM_event_add_modal_handler().
Referenced by SCULPT_OT_color_filter().
|
static |
Definition at line 273 of file sculpt_filter_color.c.
References BKE_pbvh_parallel_range_settings(), BLI_parallel_range_settings_defaults(), BLI_task_parallel_range(), C, color_filter_task_cb(), CTX_data_active_object(), CTX_data_tool_settings(), data, SculptSession::filter_cache, IMB_colormanagement_srgb_to_scene_linear_v3(), KM_RELEASE, LEFTMOUSE, len, MOUSEMOVE, FilterCache::nodes, OPERATOR_FINISHED, OPERATOR_RUNNING_MODAL, wmOperator::ptr, RNA_enum_get(), RNA_float_get(), RNA_float_get_array(), Object::sculpt, ToolSettings::sculpt, sculpt_color_presmooth_init(), SCULPT_filter_cache_free(), SCULPT_flush_update_done(), SCULPT_flush_update_step(), SCULPT_undo_push_end(), SCULPT_UPDATE_COLOR, FilterCache::totnode, wmEvent::type, and wmEvent::val.
Referenced by SCULPT_OT_color_filter().
|
static |
Definition at line 233 of file sculpt_filter_color.c.
References add_v4_v4(), col, copy_v4_v4(), SculptSession::filter_cache, SculptVertexNeighborIter::index, interp_v4_v4v4(), MEM_malloc_arrayN, mul_v4_fl(), FilterCache::pre_smoothed_color, SCULPT_vertex_color_get(), SCULPT_vertex_count_get(), SCULPT_VERTEX_NEIGHBORS_ITER_BEGIN, and SCULPT_VERTEX_NEIGHBORS_ITER_END.
Referenced by sculpt_color_filter_modal().
void SCULPT_OT_color_filter | ( | struct wmOperatorType * | ot | ) |
Definition at line 370 of file sculpt_filter_color.c.
References COLOR_FILTER_HUE, wmOperatorType::description, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, NULL, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, prop_color_filter_types, PROP_COLOR_GAMMA, RNA_def_enum(), RNA_def_float(), RNA_def_float_color(), RNA_def_property_subtype(), sculpt_color_filter_invoke(), sculpt_color_filter_modal(), SCULPT_mode_poll(), and wmOperatorType::srna.
Referenced by ED_operatortypes_sculpt().
|
static |
Definition at line 69 of file sculpt_filter_color.c.
Referenced by SCULPT_OT_color_filter().