|
Blender V4.3
|
#include "MEM_guardedalloc.h"#include "BLI_array_utils.hh"#include "BLI_enumerable_thread_specific.hh"#include "BLI_ghash.h"#include "BLI_math_matrix.hh"#include "BLI_math_vector.hh"#include "BLI_task.h"#include "BLI_utildefines.h"#include "BLT_translation.hh"#include "DNA_brush_types.h"#include "DNA_listBase.h"#include "DNA_node_types.h"#include "DNA_object_types.h"#include "DNA_scene_types.h"#include "BKE_attribute.hh"#include "BKE_brush.hh"#include "BKE_ccg.hh"#include "BKE_context.hh"#include "BKE_layer.hh"#include "BKE_main.hh"#include "BKE_mesh.hh"#include "BKE_mesh_mirror.hh"#include "BKE_multires.hh"#include "BKE_object.hh"#include "BKE_paint.hh"#include "BKE_pbvh_api.hh"#include "BKE_report.hh"#include "BKE_scene.hh"#include "BKE_subdiv_ccg.hh"#include "DEG_depsgraph.hh"#include "IMB_colormanagement.hh"#include "WM_api.hh"#include "WM_message.hh"#include "WM_toolsystem.hh"#include "WM_types.hh"#include "ED_image.hh"#include "ED_object.hh"#include "ED_screen.hh"#include "ED_sculpt.hh"#include "mesh_brush_common.hh"#include "paint_intern.hh"#include "paint_mask.hh"#include "sculpt_automask.hh"#include "sculpt_color.hh"#include "sculpt_dyntopo.hh"#include "sculpt_face_set.hh"#include "sculpt_flood_fill.hh"#include "sculpt_intern.hh"#include "sculpt_islands.hh"#include "sculpt_undo.hh"#include "RNA_access.hh"#include "RNA_define.hh"#include "UI_interface.hh"#include "UI_resources.hh"#include "CLG_log.h"#include "bmesh.hh"#include <cmath>#include <cstdlib>#include <cstring>Go to the source code of this file.
Classes | |
| struct | blender::ed::sculpt_paint::mask::LocalData |
Namespaces | |
| namespace | blender |
| namespace | blender::ed |
| namespace | blender::ed::sculpt_paint |
| namespace | blender::ed::sculpt_paint::mask |
Mask By Color | |
| #define | MASK_BY_COLOR_SLOPE 0.25f |
| static float | blender::ed::sculpt_paint::mask::color_delta_get (const float3 &color_a, const float3 &color_b, const float threshold, const bool invert) |
| static float | blender::ed::sculpt_paint::mask::final_mask_get (const float current_mask, const float new_mask, const bool invert, const bool preserve_mask) |
| static void | blender::ed::sculpt_paint::mask::mask_by_color_contiguous_mesh (const Depsgraph &depsgraph, Object &object, const int vert, const float threshold, const bool invert, const bool preserve_mask) |
| static void | blender::ed::sculpt_paint::mask::mask_by_color_full_mesh (const Depsgraph &depsgraph, Object &object, const int vert, const float threshold, const bool invert, const bool preserve_mask) |
| static int | blender::ed::sculpt_paint::mask::mask_by_color_invoke (bContext *C, wmOperator *op, const wmEvent *event) |
| static void | blender::ed::sculpt_paint::mask::SCULPT_OT_mask_by_color (wmOperatorType *ot) |
Implements the Sculpt Mode tools.
Definition in file sculpt_ops.cc.
| #define MASK_BY_COLOR_SLOPE 0.25f |
#sculpt_mask_by_color_delta_get returns values in the (0,1) range that are used to generate the mask based on the difference between two colors (the active color and the color of any other vertex). Ideally, a threshold of 0 should mask only the colors that are equal to the active color and threshold of 1 should mask all colors. In order to avoid artifacts and produce softer falloffs in the mask, the MASK_BY_COLOR_SLOPE defines the size of the transition values between masked and unmasked vertices. The smaller this value is, the sharper the generated mask is going to be.
Definition at line 684 of file sculpt_ops.cc.
Referenced by blender::ed::sculpt_paint::mask::color_delta_get().