UI: reorder and group blend modes in menus, similar to other apps.
authorCharlie Jolly <mistajolly@gmail.com>
Fri, 19 Oct 2018 14:56:38 +0000 (16:56 +0200)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Fri, 19 Oct 2018 15:21:01 +0000 (17:21 +0200)
Differential Revision: https://developer.blender.org/D3815

source/blender/makesrna/intern/rna_brush.c
source/blender/makesrna/intern/rna_material.c
source/blender/makesrna/intern/rna_sequencer.c
source/blender/makesrna/intern/rna_texture.c

index 665a694653c20fd967caed1d5d42774501d043e2..fd9dc687d90b90b994ab2ae70775aa50976cf38a 100644 (file)
@@ -1307,29 +1307,35 @@ static void rna_def_brush(BlenderRNA *brna)
 
        static const EnumPropertyItem prop_blend_items[] = {
                {IMB_BLEND_MIX, "MIX", 0, "Mix", "Use mix blending mode while painting"},
-               {IMB_BLEND_ADD, "ADD", 0, "Add", "Use add blending mode while painting"},
-               {IMB_BLEND_SUB, "SUB", 0, "Subtract", "Use subtract blending mode while painting"},
-               {IMB_BLEND_MUL, "MUL", 0, "Multiply", "Use multiply blending mode while painting"},
-               {IMB_BLEND_LIGHTEN, "LIGHTEN", 0, "Lighten", "Use lighten blending mode while painting"},
+               {0, "", ICON_NONE, NULL, NULL},
                {IMB_BLEND_DARKEN, "DARKEN", 0, "Darken", "Use darken blending mode while painting"},
-               {IMB_BLEND_ERASE_ALPHA, "ERASE_ALPHA", 0, "Erase Alpha", "Erase alpha while painting"},
-               {IMB_BLEND_ADD_ALPHA, "ADD_ALPHA", 0, "Add Alpha", "Add alpha while painting"},
-               {IMB_BLEND_OVERLAY, "OVERLAY", 0, "Overlay", "Use overlay blending mode while painting"},
-               {IMB_BLEND_HARDLIGHT, "HARDLIGHT", 0, "Hard light", "Use hard light blending mode while painting"},
+               {IMB_BLEND_MUL, "MUL", 0, "Multiply", "Use multiply blending mode while painting"},
                {IMB_BLEND_COLORBURN, "COLORBURN", 0, "Color burn", "Use color burn blending mode while painting"},
                {IMB_BLEND_LINEARBURN, "LINEARBURN", 0, "Linear burn", "Use linear burn blending mode while painting"},
-               {IMB_BLEND_COLORDODGE, "COLORDODGE", 0, "Color dodge", "Use color dodge blending mode while painting"},
+               {0, "", ICON_NONE, NULL, NULL},
+               {IMB_BLEND_LIGHTEN, "LIGHTEN", 0, "Lighten", "Use lighten blending mode while painting"},
                {IMB_BLEND_SCREEN, "SCREEN", 0, "Screen", "Use screen blending mode while painting"},
+               {IMB_BLEND_COLORDODGE, "COLORDODGE", 0, "Color dodge", "Use color dodge blending mode while painting"},
+               {IMB_BLEND_ADD, "ADD", 0, "Add", "Use add blending mode while painting"},
+               {0, "", ICON_NONE, NULL, NULL},
+               {IMB_BLEND_OVERLAY, "OVERLAY", 0, "Overlay", "Use overlay blending mode while painting"},
                {IMB_BLEND_SOFTLIGHT, "SOFTLIGHT", 0, "Soft light", "Use softlight blending mode while painting"},
-               {IMB_BLEND_PINLIGHT, "PINLIGHT", 0, "Pin light", "Use pinlight blending mode while painting"},
+               {IMB_BLEND_HARDLIGHT, "HARDLIGHT", 0, "Hard light", "Use hard light blending mode while painting"},
                {IMB_BLEND_VIVIDLIGHT, "VIVIDLIGHT", 0, "Vivid light", "Use vividlight blending mode while painting"},
                {IMB_BLEND_LINEARLIGHT, "LINEARLIGHT", 0, "Linear light", "Use linearlight blending mode while painting"},
+               {IMB_BLEND_PINLIGHT, "PINLIGHT", 0, "Pin light", "Use pinlight blending mode while painting"},
+               {0, "", ICON_NONE, NULL, NULL},
                {IMB_BLEND_DIFFERENCE, "DIFFERENCE", 0, "Difference", "Use difference blending mode while painting"},
                {IMB_BLEND_EXCLUSION, "EXCLUSION", 0, "Exclusion", "Use exclusion blending mode while painting"},
+               {IMB_BLEND_SUB, "SUB", 0, "Subtract", "Use subtract blending mode while painting"},
+               {0, "", ICON_NONE, NULL, NULL},
                {IMB_BLEND_HUE, "HUE", 0, "Hue", "Use hue blending mode while painting"},
                {IMB_BLEND_SATURATION, "SATURATION", 0, "Saturation", "Use saturation blending mode while painting"},
-               {IMB_BLEND_LUMINOSITY, "LUMINOSITY", 0, "Luminosity", "Use luminosity blending mode while painting"},
                {IMB_BLEND_COLOR, "COLOR", 0, "Color", "Use color blending mode while painting"},
+               {IMB_BLEND_LUMINOSITY, "LUMINOSITY", 0, "Luminosity", "Use luminosity blending mode while painting"},
+               {0, "", ICON_NONE, NULL, NULL},
+               {IMB_BLEND_ERASE_ALPHA, "ERASE_ALPHA", 0, "Erase Alpha", "Erase alpha while painting"},
+               {IMB_BLEND_ADD_ALPHA, "ADD_ALPHA", 0, "Add Alpha", "Add alpha while painting"},
                {0, NULL, 0, NULL, NULL}
        };
 
index ac65c25f1dad517a89ace7f645f121ec7755f7da..23af4ba112608d4592fb873447ce830485d3a433 100644 (file)
 
 const EnumPropertyItem rna_enum_ramp_blend_items[] = {
        {MA_RAMP_BLEND, "MIX", 0, "Mix", ""},
-       {MA_RAMP_ADD, "ADD", 0, "Add", ""},
-       {MA_RAMP_MULT, "MULTIPLY", 0, "Multiply", ""},
-       {MA_RAMP_SUB, "SUBTRACT", 0, "Subtract", ""},
-       {MA_RAMP_SCREEN, "SCREEN", 0, "Screen", ""},
-       {MA_RAMP_DIV, "DIVIDE", 0, "Divide", ""},
-       {MA_RAMP_DIFF, "DIFFERENCE", 0, "Difference", ""},
+       {0, "", ICON_NONE, NULL, NULL},
        {MA_RAMP_DARK, "DARKEN", 0, "Darken", ""},
+       {MA_RAMP_MULT, "MULTIPLY", 0, "Multiply", ""},
+       {MA_RAMP_BURN, "BURN", 0, "Burn", ""},
+       {0, "", ICON_NONE, NULL, NULL},
        {MA_RAMP_LIGHT, "LIGHTEN", 0, "Lighten", ""},
-       {MA_RAMP_OVERLAY, "OVERLAY", 0, "Overlay", ""},
+       {MA_RAMP_SCREEN, "SCREEN", 0, "Screen", ""},
        {MA_RAMP_DODGE, "DODGE", 0, "Dodge", ""},
-       {MA_RAMP_BURN, "BURN", 0, "Burn", ""},
+       {MA_RAMP_ADD, "ADD", 0, "Add", ""},
+       {0, "", ICON_NONE, NULL, NULL},
+       {MA_RAMP_OVERLAY, "OVERLAY", 0, "Overlay", ""},
+       {MA_RAMP_SOFT, "SOFT_LIGHT", 0, "Soft Light", ""},
+       {MA_RAMP_LINEAR, "LINEAR_LIGHT", 0, "Linear Light", ""},
+       {0, "", ICON_NONE, NULL, NULL},
+       {MA_RAMP_DIFF, "DIFFERENCE", 0, "Difference", ""},
+       {MA_RAMP_SUB, "SUBTRACT", 0, "Subtract", ""},
+       {MA_RAMP_DIV, "DIVIDE", 0, "Divide", ""},
+       {0, "", ICON_NONE, NULL, NULL},
        {MA_RAMP_HUE, "HUE", 0, "Hue", ""},
        {MA_RAMP_SAT, "SATURATION", 0, "Saturation", ""},
-       {MA_RAMP_VAL, "VALUE", 0, "Value", ""},
        {MA_RAMP_COLOR, "COLOR", 0, "Color", ""},
-       {MA_RAMP_SOFT, "SOFT_LIGHT", 0, "Soft Light", ""},
-       {MA_RAMP_LINEAR, "LINEAR_LIGHT", 0, "Linear Light", ""},
+       {MA_RAMP_VAL, "VALUE", 0, "Value", ""},
        {0, NULL, 0, NULL, NULL}
 };
 
index 096970095cdbfefe6690f879e12c385bcc3ead1f..2fc5bab084a71521ceb6aac447e1956aa40ac59a 100644 (file)
@@ -1363,31 +1363,37 @@ static void rna_def_strip_color_balance(BlenderRNA *brna)
 static const EnumPropertyItem blend_mode_items[] = {
        {SEQ_BLEND_REPLACE, "REPLACE", 0, "Replace", ""},
        {SEQ_TYPE_CROSS, "CROSS", 0, "Cross", ""},
-       {SEQ_TYPE_ADD, "ADD", 0, "Add", ""},
-       {SEQ_TYPE_SUB, "SUBTRACT", 0, "Subtract", ""},
-       {SEQ_TYPE_ALPHAOVER, "ALPHA_OVER", 0, "Alpha Over", ""},
-       {SEQ_TYPE_ALPHAUNDER, "ALPHA_UNDER", 0, "Alpha Under", ""},
-       {SEQ_TYPE_GAMCROSS, "GAMMA_CROSS", 0, "Gamma Cross", ""},
+       {0, "", ICON_NONE, NULL, NULL},
+       {SEQ_TYPE_DARKEN, "DARKEN", 0, "Darken", ""},
        {SEQ_TYPE_MUL, "MULTIPLY", 0, "Multiply", ""},
-       {SEQ_TYPE_OVERDROP, "OVER_DROP", 0, "Over Drop", ""},
+       {SEQ_TYPE_BURN, "BURN", 0, "Burn", ""},
+       {SEQ_TYPE_LINEAR_BURN, "LINEAR_BURN", 0, "Linear Burn", ""},
+       {0, "", ICON_NONE, NULL, NULL},
        {SEQ_TYPE_LIGHTEN, "LIGHTEN", 0, "Lighten", ""},
-       {SEQ_TYPE_DARKEN, "DARKEN", 0, "Darken", ""},
        {SEQ_TYPE_SCREEN, "SCREEN", 0, "Screen", ""},
-       {SEQ_TYPE_OVERLAY, "OVERLAY", 0, "Overlay", ""},
        {SEQ_TYPE_DODGE, "DODGE", 0, "Dodge", ""},
-       {SEQ_TYPE_BURN, "BURN", 0, "Burn", ""},
-       {SEQ_TYPE_LINEAR_BURN, "LINEAR_BURN", 0, "Linear Burn", ""},
+       {SEQ_TYPE_ADD, "ADD", 0, "Add", ""},
+       {0, "", ICON_NONE, NULL, NULL},
+       {SEQ_TYPE_OVERLAY, "OVERLAY", 0, "Overlay", ""},
        {SEQ_TYPE_SOFT_LIGHT, "SOFT_LIGHT", 0, "Soft Light", ""},
        {SEQ_TYPE_HARD_LIGHT, "HARD_LIGHT", 0, "Hard Light", ""},
-       {SEQ_TYPE_PIN_LIGHT, "PIN_LIGHT", 0, "Pin Light", ""},
-       {SEQ_TYPE_LIN_LIGHT, "LINEAR_LIGHT", 0, "Linear Light", ""},
        {SEQ_TYPE_VIVID_LIGHT, "VIVID_LIGHT", 0, "Vivid Light", ""},
-       {SEQ_TYPE_BLEND_COLOR, "COLOR", 0, "Color", ""},
+       {SEQ_TYPE_LIN_LIGHT, "LINEAR_LIGHT", 0, "Linear Light", ""},
+       {SEQ_TYPE_PIN_LIGHT, "PIN_LIGHT", 0, "Pin Light", ""},
+       {0, "", ICON_NONE, NULL, NULL},
+       {SEQ_TYPE_DIFFERENCE, "DIFFERENCE", 0, "Difference", ""},
+       {SEQ_TYPE_EXCLUSION, "EXCLUSION", 0, "Exclusion", ""},
+       {SEQ_TYPE_SUB, "SUBTRACT", 0, "Subtract", ""},
+       {0, "", ICON_NONE, NULL, NULL},
        {SEQ_TYPE_HUE, "HUE", 0, "Hue", ""},
        {SEQ_TYPE_SATURATION, "SATURATION", 0, "Saturation", ""},
+       {SEQ_TYPE_BLEND_COLOR, "COLOR", 0, "Color", ""},
        {SEQ_TYPE_VALUE, "VALUE", 0, "Value", ""},
-       {SEQ_TYPE_DIFFERENCE, "DIFFERENCE", 0, "Difference", ""},
-       {SEQ_TYPE_EXCLUSION, "EXCLUSION", 0, "Exclusion", ""},
+       {0, "", ICON_NONE, NULL, NULL},
+       {SEQ_TYPE_ALPHAOVER, "ALPHA_OVER", 0, "Alpha Over", ""},
+       {SEQ_TYPE_ALPHAUNDER, "ALPHA_UNDER", 0, "Alpha Under", ""},
+       {SEQ_TYPE_GAMCROSS, "GAMMA_CROSS", 0, "Gamma Cross", ""},
+       {SEQ_TYPE_OVERDROP, "OVER_DROP", 0, "Over Drop", ""},
        {0, NULL, 0, NULL, NULL}
 };
 
index 07fd20c6fc5f1bcc794f9199fc098d44d7dd9765..e9ef4bf7a8cd8fa58df450e1772d8b7908c03321 100644 (file)
@@ -82,21 +82,26 @@ const EnumPropertyItem rna_enum_texture_type_items[] = {
 #ifndef RNA_RUNTIME
 static const EnumPropertyItem blend_type_items[] = {
        {MTEX_BLEND, "MIX", 0, "Mix", ""},
-       {MTEX_ADD, "ADD", 0, "Add", ""},
-       {MTEX_SUB, "SUBTRACT", 0, "Subtract", ""},
+       {0, "", ICON_NONE, NULL, NULL},
+       {MTEX_DARK, "DARKEN", 0, "Darken", ""},
        {MTEX_MUL, "MULTIPLY", 0, "Multiply", ""},
+       {0, "", ICON_NONE, NULL, NULL},
+       {MTEX_LIGHT, "LIGHTEN", 0, "Lighten", ""},
        {MTEX_SCREEN, "SCREEN", 0, "Screen", ""},
+       {MTEX_ADD, "ADD", 0, "Add", ""},
+       {0, "", ICON_NONE, NULL, NULL},
        {MTEX_OVERLAY, "OVERLAY", 0, "Overlay", ""},
+       {MTEX_SOFT_LIGHT, "SOFT_LIGHT", 0, "Soft Light", ""},
+       {MTEX_LIN_LIGHT, "LINEAR_LIGHT", 0, "Linear Light", ""},
+       {0, "", ICON_NONE, NULL, NULL},
        {MTEX_DIFF, "DIFFERENCE", 0, "Difference", ""},
+       {MTEX_SUB, "SUBTRACT", 0, "Subtract", ""},
        {MTEX_DIV, "DIVIDE", 0, "Divide", ""},
-       {MTEX_DARK, "DARKEN", 0, "Darken", ""},
-       {MTEX_LIGHT, "LIGHTEN", 0, "Lighten", ""},
+       {0, "", ICON_NONE, NULL, NULL},
        {MTEX_BLEND_HUE, "HUE", 0, "Hue", ""},
        {MTEX_BLEND_SAT, "SATURATION", 0, "Saturation", ""},
-       {MTEX_BLEND_VAL, "VALUE", 0, "Value", ""},
        {MTEX_BLEND_COLOR, "COLOR", 0, "Color", ""},
-       {MTEX_SOFT_LIGHT, "SOFT_LIGHT", 0, "Soft Light", ""},
-       {MTEX_LIN_LIGHT, "LINEAR_LIGHT", 0, "Linear Light", ""},
+       {MTEX_BLEND_VAL, "VALUE", 0, "Value", ""},
        {0, NULL, 0, NULL, NULL}
 };
 #endif