Blender
V3.3
|
#include "MEM_guardedalloc.h"
#include "BLI_listbase.h"
#include "BLI_string.h"
#include "BLT_translation.h"
#include "DNA_gpencil_types.h"
#include "DNA_material_types.h"
#include "DNA_space_types.h"
#include "BKE_context.h"
#include "BKE_gpencil.h"
#include "BKE_lib_id.h"
#include "BKE_main.h"
#include "BKE_material.h"
#include "BKE_paint.h"
#include "BKE_report.h"
#include "UI_interface.h"
#include "IMB_colormanagement.h"
#include "WM_api.h"
#include "WM_types.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "ED_gpencil.h"
#include "ED_screen.h"
#include "ED_undo.h"
#include "DEG_depsgraph.h"
#include "DEG_depsgraph_build.h"
#include "eyedropper_intern.h"
#include "interface_intern.h"
Go to the source code of this file.
Classes | |
struct | EyedropperGPencil |
Typedefs | |
typedef enum eGP_EyeMode | eGP_EyeMode |
typedef struct EyedropperGPencil | EyedropperGPencil |
Enumerations | |
enum | eGP_EyeMode { GP_EYE_MATERIAL = 0 , GP_EYE_PALETTE = 1 } |
typedef enum eGP_EyeMode eGP_EyeMode |
typedef struct EyedropperGPencil EyedropperGPencil |
enum eGP_EyeMode |
Enumerator | |
---|---|
GP_EYE_MATERIAL | |
GP_EYE_PALETTE |
Definition at line 52 of file eyedropper_gpencil_color.c.
|
static |
Definition at line 100 of file eyedropper_gpencil_color.c.
References Object::actcol, BKE_gpencil_object_material_new(), BKE_object_material_get(), BKE_object_material_len_p(), BLI_assert, C, compare_v3v3(), copy_v3_v3(), CTX_data_active_object(), CTX_data_main(), DEG_relations_tag_update(), ED_undo_push(), MaterialGPencilStyle::fill_rgba, MaterialGPencilStyle::flag, GP_MATERIAL_FILL_SHOW, GP_MATERIAL_STROKE_SHOW, Material::gp_style, Object::id, NC_MATERIAL, NC_OBJECT, NC_SPACE, ND_OB_SHADING, ND_SHADING_LINKS, ND_SPACE_VIEW3D, NULL, MaterialGPencilStyle::stroke_rgba, WM_main_add_notifier(), and zero_v4().
Referenced by eyedropper_gpencil_color_set().
Definition at line 190 of file eyedropper_gpencil_color.c.
References BKE_paint_palette_set(), BKE_palette_add(), BKE_palette_color_add(), C, Palette::colors, compare_v3v3(), copy_v3_v3(), CTX_data_main(), CTX_data_scene(), ToolSettings::gp_paint, ToolSettings::gp_vertexpaint, Palette::id, id_us_min(), LISTBASE_FOREACH, NULL, GpPaint::paint, GpVertexPaint::paint, Paint::palette, PaletteColor::rgb, scene, and Scene::toolsettings.
Referenced by eyedropper_gpencil_color_set().
|
static |
Definition at line 263 of file eyedropper_gpencil_color.c.
References C, and eyedropper_gpencil_exit().
Referenced by eyedropper_gpencil_modal(), and UI_OT_eyedropper_gpencil_color().
|
static |
Definition at line 257 of file eyedropper_gpencil_color.c.
References C, EyedropperGPencil::color, and eyedropper_color_sample_fl().
Referenced by eyedropper_gpencil_modal().
|
static |
Definition at line 227 of file eyedropper_gpencil_color.c.
References C, EyedropperGPencil::color, copy_v3_v3(), EyedropperGPencil::display, eyedropper_add_material(), eyedropper_add_palette_color(), GP_EYE_PALETTE, IMB_colormanagement_scene_linear_to_display_v3(), KM_CTRL, KM_SHIFT, EyedropperGPencil::mode, and wmEvent::modifier.
Referenced by eyedropper_gpencil_modal().
|
static |
Definition at line 328 of file eyedropper_gpencil_color.c.
References C, eyedropper_gpencil_exit(), eyedropper_gpencil_init(), OPERATOR_FINISHED, and OPERATOR_PASS_THROUGH.
Referenced by UI_OT_eyedropper_gpencil_color().
|
static |
Definition at line 92 of file eyedropper_gpencil_color.c.
References C, wmOperator::customdata, ED_workspace_status_text(), MEM_SAFE_FREE, and NULL.
Referenced by eyedropper_gpencil_cancel(), eyedropper_gpencil_exec(), and eyedropper_gpencil_modal().
|
static |
Definition at line 76 of file eyedropper_gpencil_color.c.
References C, CTX_data_scene(), wmOperator::customdata, EyedropperGPencil::display, ColorManagedDisplaySettings::display_device, Scene::display_settings, IMB_colormanagement_display_get_named(), MEM_callocN, EyedropperGPencil::mode, wmOperator::ptr, RNA_enum_get(), and scene.
Referenced by eyedropper_gpencil_exec(), and eyedropper_gpencil_invoke().
|
static |
Definition at line 313 of file eyedropper_gpencil_color.c.
References C, eyedropper_gpencil_init(), eyedropper_gpencil_status_indicators(), OPERATOR_PASS_THROUGH, OPERATOR_RUNNING_MODAL, and WM_event_add_modal_handler().
Referenced by UI_OT_eyedropper_gpencil_color().
|
static |
Definition at line 269 of file eyedropper_gpencil_color.c.
References C, wmOperator::customdata, EVT_MODAL_MAP, EYE_MODAL_CANCEL, EYE_MODAL_SAMPLE_BEGIN, EYE_MODAL_SAMPLE_CONFIRM, eyedropper_gpencil_cancel(), eyedropper_gpencil_color_sample(), eyedropper_gpencil_color_set(), eyedropper_gpencil_exit(), INBETWEEN_MOUSEMOVE, MOUSEMOVE, NA_EDITED, NC_GPENCIL, ND_DATA, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, OPERATOR_RUNNING_MODAL, wmEvent::type, wmEvent::val, WM_main_add_notifier(), and wmEvent::xy.
Referenced by UI_OT_eyedropper_gpencil_color().
Definition at line 341 of file eyedropper_gpencil_color.c.
References C, CTX_data_active_object(), CTX_wm_window(), NULL, OB_GPENCIL, and Object::type.
Referenced by UI_OT_eyedropper_gpencil_color().
Definition at line 66 of file eyedropper_gpencil_color.c.
References BLI_strncpy(), C, ED_workspace_status_text(), TIP_, and UI_MAX_DRAW_STR.
Referenced by eyedropper_gpencil_invoke().
void UI_OT_eyedropper_gpencil_color | ( | wmOperatorType * | ot | ) |
Definition at line 353 of file eyedropper_gpencil_color.c.
References wmOperatorType::cancel, wmOperatorType::description, wmOperatorType::exec, eyedropper_gpencil_cancel(), eyedropper_gpencil_exec(), eyedropper_gpencil_invoke(), eyedropper_gpencil_modal(), eyedropper_gpencil_poll(), wmOperatorType::flag, GP_EYE_MATERIAL, GP_EYE_PALETTE, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, NULL, OPTYPE_BLOCKING, OPTYPE_UNDO, ot, wmOperatorType::poll, wmOperatorType::prop, RNA_def_enum(), and wmOperatorType::srna.
Referenced by ED_operatortypes_ui().