rename template_color_wheel() to template_color_picker()
This commit is contained in:
@@ -684,7 +684,7 @@ class IMAGE_PT_paint(Panel, ImagePaintPanel):
|
||||
|
||||
if brush:
|
||||
col = layout.column()
|
||||
col.template_color_wheel(brush, "color", value_slider=True)
|
||||
col.template_color_picker(brush, "color", value_slider=True)
|
||||
col.prop(brush, "color", text="")
|
||||
|
||||
row = col.row(align=True)
|
||||
|
||||
@@ -31,21 +31,21 @@ def act_strip(context):
|
||||
def draw_color_balance(layout, color_balance):
|
||||
col = layout.column()
|
||||
col.label(text="Lift:")
|
||||
col.template_color_wheel(color_balance, "lift", value_slider=True, cubic=True)
|
||||
col.template_color_picker(color_balance, "lift", value_slider=True, cubic=True)
|
||||
row = col.row()
|
||||
row.prop(color_balance, "lift", text="")
|
||||
row.prop(color_balance, "invert_lift", text="Inverse")
|
||||
|
||||
col = layout.column()
|
||||
col.label(text="Gamma:")
|
||||
col.template_color_wheel(color_balance, "gamma", value_slider=True, lock_luminosity=True, cubic=True)
|
||||
col.template_color_picker(color_balance, "gamma", value_slider=True, lock_luminosity=True, cubic=True)
|
||||
row = col.row()
|
||||
row.prop(color_balance, "gamma", text="")
|
||||
row.prop(color_balance, "invert_gamma", text="Inverse")
|
||||
|
||||
col = layout.column()
|
||||
col.label(text="Gain:")
|
||||
col.template_color_wheel(color_balance, "gain", value_slider=True, lock_luminosity=True, cubic=True)
|
||||
col.template_color_picker(color_balance, "gain", value_slider=True, lock_luminosity=True, cubic=True)
|
||||
row = col.row()
|
||||
row.prop(color_balance, "gain", text="")
|
||||
row.prop(color_balance, "invert_gain", text="Inverse")
|
||||
|
||||
@@ -633,7 +633,7 @@ class VIEW3D_PT_tools_brush(Panel, View3DPaintPanel):
|
||||
|
||||
elif context.image_paint_object and brush:
|
||||
col = layout.column()
|
||||
col.template_color_wheel(brush, "color", value_slider=True)
|
||||
col.template_color_picker(brush, "color", value_slider=True)
|
||||
col.prop(brush, "color", text="")
|
||||
|
||||
row = col.row(align=True)
|
||||
@@ -681,7 +681,7 @@ class VIEW3D_PT_tools_brush(Panel, View3DPaintPanel):
|
||||
# Vertex Paint Mode #
|
||||
elif context.vertex_paint_object and brush:
|
||||
col = layout.column()
|
||||
col.template_color_wheel(brush, "color", value_slider=True)
|
||||
col.template_color_picker(brush, "color", value_slider=True)
|
||||
col.prop(brush, "color", text="")
|
||||
|
||||
row = col.row(align=True)
|
||||
|
||||
@@ -807,7 +807,7 @@ void uiTemplateHistogram(uiLayout *layout, struct PointerRNA *ptr, const char *p
|
||||
void uiTemplateWaveform(uiLayout *layout, struct PointerRNA *ptr, const char *propname);
|
||||
void uiTemplateVectorscope(uiLayout *layout, struct PointerRNA *ptr, const char *propname);
|
||||
void uiTemplateCurveMapping(uiLayout *layout, struct PointerRNA *ptr, const char *propname, int type, int levels, int brush);
|
||||
void uiTemplateColorWheel(uiLayout *layout, struct PointerRNA *ptr, const char *propname, int value_slider, int lock, int lock_luminosity, int cubic);
|
||||
void uiTemplateColorPicker(uiLayout *layout, struct PointerRNA *ptr, const char *propname, int value_slider, int lock, int lock_luminosity, int cubic);
|
||||
void uiTemplateLayers(uiLayout *layout, struct PointerRNA *ptr, const char *propname,
|
||||
PointerRNA *used_ptr, const char *used_propname, int active_layer);
|
||||
void uiTemplateGameStates(uiLayout *layout, struct PointerRNA *ptr, const char *propname,
|
||||
|
||||
@@ -1956,7 +1956,7 @@ void uiTemplateCurveMapping(uiLayout *layout, PointerRNA *ptr, const char *propn
|
||||
#define WHEEL_SIZE 100
|
||||
|
||||
/* This template now follows User Preference for type - name is not correct anymore... */
|
||||
void uiTemplateColorWheel(uiLayout *layout, PointerRNA *ptr, const char *propname, int value_slider, int lock, int lock_luminosity, int cubic)
|
||||
void uiTemplateColorPicker(uiLayout *layout, PointerRNA *ptr, const char *propname, int value_slider, int lock, int lock_luminosity, int cubic)
|
||||
{
|
||||
PropertyRNA *prop = RNA_struct_find_property(ptr, propname);
|
||||
uiBlock *block = uiLayoutGetBlock(layout);
|
||||
|
||||
@@ -2114,7 +2114,7 @@ void ui_draw_gradient(rcti *rect, const float hsv[3], const int type, const floa
|
||||
sx1 = rect->xmin + dx * BLI_rcti_size_x(rect);
|
||||
sx2 = rect->xmin + (dx + color_step) * BLI_rcti_size_x(rect);
|
||||
sy = rect->ymin;
|
||||
dy = (float)BLI_rcti_size_y(rect) / 3.0;
|
||||
dy = (float)BLI_rcti_size_y(rect) / 3.0f;
|
||||
|
||||
glBegin(GL_QUADS);
|
||||
for (a = 0; a < 3; a++, sy += dy) {
|
||||
|
||||
@@ -319,7 +319,7 @@ static void node_buts_rgb(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr
|
||||
RNA_property_collection_lookup_int(ptr, prop, 0, &sockptr);
|
||||
|
||||
col = uiLayoutColumn(layout, FALSE);
|
||||
uiTemplateColorWheel(col, &sockptr, "default_value", 1, 0, 0, 0);
|
||||
uiTemplateColorPicker(col, &sockptr, "default_value", 1, 0, 0, 0);
|
||||
uiItemR(col, &sockptr, "default_value", 0, "", ICON_NONE);
|
||||
}
|
||||
|
||||
@@ -2258,17 +2258,17 @@ static void node_composit_buts_colorbalance(uiLayout *layout, bContext *UNUSED(C
|
||||
|
||||
split = uiLayoutSplit(layout, 0.0f, FALSE);
|
||||
col = uiLayoutColumn(split, FALSE);
|
||||
uiTemplateColorWheel(col, ptr, "lift", 1, 1, 0, 1);
|
||||
uiTemplateColorPicker(col, ptr, "lift", 1, 1, 0, 1);
|
||||
row = uiLayoutRow(col, FALSE);
|
||||
uiItemR(row, ptr, "lift", 0, NULL, ICON_NONE);
|
||||
|
||||
col = uiLayoutColumn(split, FALSE);
|
||||
uiTemplateColorWheel(col, ptr, "gamma", 1, 1, 1, 1);
|
||||
uiTemplateColorPicker(col, ptr, "gamma", 1, 1, 1, 1);
|
||||
row = uiLayoutRow(col, FALSE);
|
||||
uiItemR(row, ptr, "gamma", 0, NULL, ICON_NONE);
|
||||
|
||||
col = uiLayoutColumn(split, FALSE);
|
||||
uiTemplateColorWheel(col, ptr, "gain", 1, 1, 1, 1);
|
||||
uiTemplateColorPicker(col, ptr, "gain", 1, 1, 1, 1);
|
||||
row = uiLayoutRow(col, FALSE);
|
||||
uiItemR(row, ptr, "gain", 0, NULL, ICON_NONE);
|
||||
|
||||
@@ -2277,17 +2277,17 @@ static void node_composit_buts_colorbalance(uiLayout *layout, bContext *UNUSED(C
|
||||
|
||||
split = uiLayoutSplit(layout, 0.0f, FALSE);
|
||||
col = uiLayoutColumn(split, FALSE);
|
||||
uiTemplateColorWheel(col, ptr, "offset", 1, 1, 0, 1);
|
||||
uiTemplateColorPicker(col, ptr, "offset", 1, 1, 0, 1);
|
||||
row = uiLayoutRow(col, FALSE);
|
||||
uiItemR(row, ptr, "offset", 0, NULL, ICON_NONE);
|
||||
|
||||
col = uiLayoutColumn(split, FALSE);
|
||||
uiTemplateColorWheel(col, ptr, "power", 1, 1, 0, 1);
|
||||
uiTemplateColorPicker(col, ptr, "power", 1, 1, 0, 1);
|
||||
row = uiLayoutRow(col, FALSE);
|
||||
uiItemR(row, ptr, "power", 0, NULL, ICON_NONE);
|
||||
|
||||
col = uiLayoutColumn(split, FALSE);
|
||||
uiTemplateColorWheel(col, ptr, "slope", 1, 1, 0, 1);
|
||||
uiTemplateColorPicker(col, ptr, "slope", 1, 1, 0, 1);
|
||||
row = uiLayoutRow(col, FALSE);
|
||||
uiItemR(row, ptr, "slope", 0, NULL, ICON_NONE);
|
||||
}
|
||||
@@ -2299,23 +2299,23 @@ static void node_composit_buts_colorbalance_but(uiLayout *layout, bContext *UNUS
|
||||
|
||||
if (RNA_enum_get(ptr, "correction_method") == 0) {
|
||||
|
||||
uiTemplateColorWheel(layout, ptr, "lift", 1, 1, 0, 1);
|
||||
uiTemplateColorPicker(layout, ptr, "lift", 1, 1, 0, 1);
|
||||
uiItemR(layout, ptr, "lift", 0, NULL, ICON_NONE);
|
||||
|
||||
uiTemplateColorWheel(layout, ptr, "gamma", 1, 1, 1, 1);
|
||||
uiTemplateColorPicker(layout, ptr, "gamma", 1, 1, 1, 1);
|
||||
uiItemR(layout, ptr, "gamma", 0, NULL, ICON_NONE);
|
||||
|
||||
uiTemplateColorWheel(layout, ptr, "gain", 1, 1, 1, 1);
|
||||
uiTemplateColorPicker(layout, ptr, "gain", 1, 1, 1, 1);
|
||||
uiItemR(layout, ptr, "gain", 0, NULL, ICON_NONE);
|
||||
}
|
||||
else {
|
||||
uiTemplateColorWheel(layout, ptr, "offset", 1, 1, 0, 1);
|
||||
uiTemplateColorPicker(layout, ptr, "offset", 1, 1, 0, 1);
|
||||
uiItemR(layout, ptr, "offset", 0, NULL, ICON_NONE);
|
||||
|
||||
uiTemplateColorWheel(layout, ptr, "power", 1, 1, 0, 1);
|
||||
uiTemplateColorPicker(layout, ptr, "power", 1, 1, 0, 1);
|
||||
uiItemR(layout, ptr, "power", 0, NULL, ICON_NONE);
|
||||
|
||||
uiTemplateColorWheel(layout, ptr, "slope", 1, 1, 0, 1);
|
||||
uiTemplateColorPicker(layout, ptr, "slope", 1, 1, 0, 1);
|
||||
uiItemR(layout, ptr, "slope", 0, NULL, ICON_NONE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -390,7 +390,7 @@ void RNA_api_ui_layout(StructRNA *srna)
|
||||
parm = RNA_def_int(func, "active_layer", 0, 0, INT_MAX, "Active Layer", "", 0, INT_MAX);
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
|
||||
func = RNA_def_function(srna, "template_color_wheel", "uiTemplateColorWheel");
|
||||
func = RNA_def_function(srna, "template_color_picker", "uiTemplateColorPicker");
|
||||
RNA_def_function_ui_description(func, "Item. A color wheel widget to pick colors");
|
||||
api_ui_item_rna_common(func);
|
||||
RNA_def_boolean(func, "value_slider", 0, "", "Display the value slider to the right of the color wheel");
|
||||
|
||||
@@ -422,7 +422,7 @@ void uiTemplateEditModeSelection(struct uiLayout *layout, struct bContext *C) {}
|
||||
void uiTemplateTextureImage(struct uiLayout *layout, struct bContext *C, struct Tex *tex) {}
|
||||
void uiTemplateImage(struct uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, char *propname, struct PointerRNA *userptr, int compact) {}
|
||||
void uiTemplateDopeSheetFilter(struct uiLayout *layout, struct bContext *C, struct PointerRNA *ptr) {}
|
||||
void uiTemplateColorWheel(struct uiLayout *layout, struct PointerRNA *ptr, char *propname, int value_slider) {}
|
||||
void uiTemplateColorPicker(struct uiLayout *layout, struct PointerRNA *ptr, char *propname, int value_slider) {}
|
||||
void uiTemplateHistogram(struct uiLayout *layout, struct PointerRNA *ptr, char *propname, int expand) {}
|
||||
void uiTemplateReportsBanner(struct uiLayout *layout, struct bContext *C, struct wmOperator *op) {}
|
||||
void uiTemplateWaveform(struct uiLayout *layout, struct PointerRNA *ptr, char *propname, int expand) {}
|
||||
|
||||
Reference in New Issue
Block a user