Cleanup: rename color band to color ramp

This commit is contained in:
2019-03-18 18:20:44 +11:00
parent b749e43cd3
commit 1d1e06b376
7 changed files with 21 additions and 21 deletions

View File

@@ -203,5 +203,5 @@ _km_hierarchy = [
('Standard Modal Map', 'EMPTY', 'WINDOW', []),
('Transform Modal Map', 'EMPTY', 'WINDOW', []),
('Eyedropper Modal Map', 'EMPTY', 'WINDOW', []),
('Eyedropper ColorBand PointSampling Map', 'EMPTY', 'WINDOW', []),
('Eyedropper ColorRamp PointSampling Map', 'EMPTY', 'WINDOW', []),
]

View File

@@ -599,8 +599,8 @@ def km_user_interface(_params):
# Eyedroppers all have the same event, and pass it through until
# a suitable eyedropper handles it.
("ui.eyedropper_color", {"type": 'E', "value": 'PRESS'}, None),
("ui.eyedropper_colorband", {"type": 'E', "value": 'PRESS'}, None),
("ui.eyedropper_colorband_point", {"type": 'E', "value": 'PRESS', "alt": True}, None),
("ui.eyedropper_colorramp", {"type": 'E', "value": 'PRESS'}, None),
("ui.eyedropper_colorramp_point", {"type": 'E', "value": 'PRESS', "alt": True}, None),
("ui.eyedropper_id", {"type": 'E', "value": 'PRESS'}, None),
("ui.eyedropper_depth", {"type": 'E', "value": 'PRESS'}, None),
# Copy data path
@@ -4249,10 +4249,10 @@ def km_eyedropper_modal_map(_params):
return keymap
def km_eyedropper_colorband_pointsampling_map(_params):
def km_eyedropper_colorramp_pointsampling_map(_params):
items = []
keymap = (
"Eyedropper ColorBand PointSampling Map",
"Eyedropper ColorRamp PointSampling Map",
{"space_type": 'EMPTY', "region_type": 'WINDOW', "modal": True},
{"items": items},
)
@@ -6059,7 +6059,7 @@ def generate_keymaps(params=None):
# Modal maps.
km_eyedropper_modal_map(params),
km_eyedropper_colorband_pointsampling_map(params),
km_eyedropper_colorramp_pointsampling_map(params),
km_transform_modal_map(params),
km_view3d_navigate(params),
km_view3d_navigate_tweak_modal_map(params),

View File

@@ -64,7 +64,7 @@ wmKeyMap *eyedropper_modal_keymap(wmKeyConfig *keyconf)
keymap = WM_modalkeymap_add(keyconf, "Eyedropper Modal Map", modal_items);
/* assign to operators */
WM_modalkeymap_assign(keymap, "UI_OT_eyedropper_colorband");
WM_modalkeymap_assign(keymap, "UI_OT_eyedropper_colorramp");
WM_modalkeymap_assign(keymap, "UI_OT_eyedropper_color");
WM_modalkeymap_assign(keymap, "UI_OT_eyedropper_id");
WM_modalkeymap_assign(keymap, "UI_OT_eyedropper_depth");
@@ -83,14 +83,14 @@ wmKeyMap *eyedropper_colorband_modal_keymap(wmKeyConfig *keyconf)
{0, NULL, 0, NULL, NULL},
};
wmKeyMap *keymap = WM_modalkeymap_get(keyconf, "Eyedropper ColorBand PointSampling Map");
wmKeyMap *keymap = WM_modalkeymap_get(keyconf, "Eyedropper ColorRamp PointSampling Map");
if (keymap && keymap->modal_items)
return keymap;
keymap = WM_modalkeymap_add(keyconf, "Eyedropper ColorBand PointSampling Map", modal_items_point);
keymap = WM_modalkeymap_add(keyconf, "Eyedropper ColorRamp PointSampling Map", modal_items_point);
/* assign to operators */
WM_modalkeymap_assign(keymap, "UI_OT_eyedropper_colorband_point");
WM_modalkeymap_assign(keymap, "UI_OT_eyedropper_colorramp_point");
return keymap;
}

View File

@@ -27,8 +27,8 @@
* - Clicking on points, adding each color to the end of the color-band.
*
* Defines:
* - #UI_OT_eyedropper_colorband
* - #UI_OT_eyedropper_colorband_point
* - #UI_OT_eyedropper_colorramp
* - #UI_OT_eyedropper_colorramp_point
*/
#include "MEM_guardedalloc.h"
@@ -318,11 +318,11 @@ static bool eyedropper_colorband_poll(bContext *C)
}
void UI_OT_eyedropper_colorband(wmOperatorType *ot)
void UI_OT_eyedropper_colorramp(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Eyedropper colorband";
ot->idname = "UI_OT_eyedropper_colorband";
ot->idname = "UI_OT_eyedropper_colorramp";
ot->description = "Sample a color band";
/* api callbacks */
@@ -338,11 +338,11 @@ void UI_OT_eyedropper_colorband(wmOperatorType *ot)
/* properties */
}
void UI_OT_eyedropper_colorband_point(wmOperatorType *ot)
void UI_OT_eyedropper_colorramp_point(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Eyedropper colorband (points)";
ot->idname = "UI_OT_eyedropper_colorband_point";
ot->idname = "UI_OT_eyedropper_colorramp_point";
ot->description = "Point-sample a color band";
/* api callbacks */

View File

@@ -874,8 +874,8 @@ struct wmKeyMap *eyedropper_colorband_modal_keymap(struct wmKeyConfig *keyconf);
void UI_OT_eyedropper_color(struct wmOperatorType *ot);
/* interface_eyedropper_colorband.c */
void UI_OT_eyedropper_colorband(struct wmOperatorType *ot);
void UI_OT_eyedropper_colorband_point(struct wmOperatorType *ot);
void UI_OT_eyedropper_colorramp(struct wmOperatorType *ot);
void UI_OT_eyedropper_colorramp_point(struct wmOperatorType *ot);
/* interface_eyedropper_datablock.c */
void UI_OT_eyedropper_id(struct wmOperatorType *ot);

View File

@@ -1598,8 +1598,8 @@ void ED_operatortypes_ui(void)
/* external */
WM_operatortype_append(UI_OT_eyedropper_color);
WM_operatortype_append(UI_OT_eyedropper_colorband);
WM_operatortype_append(UI_OT_eyedropper_colorband_point);
WM_operatortype_append(UI_OT_eyedropper_colorramp);
WM_operatortype_append(UI_OT_eyedropper_colorramp_point);
WM_operatortype_append(UI_OT_eyedropper_id);
WM_operatortype_append(UI_OT_eyedropper_depth);
WM_operatortype_append(UI_OT_eyedropper_driver);

View File

@@ -2411,7 +2411,7 @@ static uiBlock *colorband_tools_func(
IFACE_("Distribute Stops Evenly"), 0, yco -= UI_UNIT_Y, menuwidth, UI_UNIT_Y,
NULL, 0.0, 0.0, 0, CB_FUNC_DISTRIBUTE_EVENLY, "");
uiItemO(layout, IFACE_("Eyedropper"), ICON_EYEDROPPER, "UI_OT_eyedropper_colorband");
uiItemO(layout, IFACE_("Eyedropper"), ICON_EYEDROPPER, "UI_OT_eyedropper_colorramp");
uiDefIconTextBut(
block, UI_BTYPE_BUT_MENU, 1, ICON_BLANK1, IFACE_("Reset Color Ramp"),