2011-02-23 10:52:22 +00:00
|
|
|
/*
|
2012-04-30 14:24:11 +00:00
|
|
|
* ***** BEGIN GPL LICENSE BLOCK *****
|
2008-01-07 18:03:41 +00:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
2011-11-29 10:54:47 +00:00
|
|
|
* of the License, or (at your option) any later version.
|
2008-01-07 18:03:41 +00:00
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software Foundation,
|
2010-02-12 13:34:04 +00:00
|
|
|
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2008-01-07 18:03:41 +00:00
|
|
|
*
|
|
|
|
* The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
* The Original Code is: all of this file.
|
|
|
|
*
|
|
|
|
* Contributor(s): none yet.
|
|
|
|
*
|
|
|
|
* ***** END GPL/BL DUAL LICENSE BLOCK *****
|
|
|
|
*/
|
|
|
|
|
2011-07-30 09:24:10 +00:00
|
|
|
/** \file blender/editors/interface/resources.c
|
|
|
|
* \ingroup edinterface
|
|
|
|
*/
|
|
|
|
|
2008-01-07 18:03:41 +00:00
|
|
|
#include <math.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
|
|
|
|
#include "MEM_guardedalloc.h"
|
|
|
|
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
#include "DNA_curve_types.h"
|
2008-01-07 18:03:41 +00:00
|
|
|
#include "DNA_screen_types.h"
|
|
|
|
#include "DNA_space_types.h"
|
2014-07-21 12:02:05 +02:00
|
|
|
#include "DNA_userdef_types.h"
|
2009-12-24 09:26:06 +00:00
|
|
|
#include "DNA_windowmanager_types.h"
|
2008-01-07 18:03:41 +00:00
|
|
|
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
#include "BLI_blenlib.h"
|
2011-01-07 18:36:47 +00:00
|
|
|
#include "BLI_utildefines.h"
|
2012-03-20 09:45:17 +00:00
|
|
|
#include "BLI_math.h"
|
2008-01-07 18:03:41 +00:00
|
|
|
|
2014-11-23 14:37:13 +01:00
|
|
|
#include "BKE_appdir.h"
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
#include "BKE_DerivedMesh.h"
|
|
|
|
#include "BKE_global.h"
|
|
|
|
#include "BKE_main.h"
|
|
|
|
#include "BKE_texture.h"
|
2008-01-07 18:03:41 +00:00
|
|
|
|
|
|
|
#include "BIF_gl.h"
|
Port of part of the Interface code to 2.50.
This is based on the current trunk version, so these files should not need
merges. There's two things (clipboard and intptr_t) that are missing in 2.50
and commented out with XXX 2.48, these can be enabled again once trunk is
merged into this branch.
Further this is not all interface code, there are many parts commented out:
* interface.c: nearly all button types, missing: links, chartab, keyevent.
* interface_draw.c: almost all code, with some small exceptions.
* interface_ops.c: this replaces ui_do_but and uiDoBlocks with two operators,
making it non-blocking.
* interface_regions: this is a part of interface.c, split off, contains code to
create regions for tooltips, menus, pupmenu (that one is crashing currently),
color chooser, basically regions with buttons which is fairly independent of
core interface code.
* interface_panel.c and interface_icons.c: not ported over, so no panels and
icons yet. Panels should probably become (free floating) regions?
* text.c: (formerly language.c) for drawing text and translation. this works
but is using bad globals still and could be cleaned up.
Header Files:
* ED_datafiles.h now has declarations for datatoc_ files, so those extern
declarations can be #included instead of repeated.
* The user interface code is in UI_interface.h and other UI_* files.
Core:
* The API for creating blocks, buttons, etc is nearly the same still. Blocks
are now created per region instead of per area.
* The code was made non-blocking, which means that any changes and redraws
should be possible while editing a button. That means though that we need
some sort of persistence even though the blender model is to recreate buttons
for each redraw. So when a new block is created, some matching happens to
find out which buttons correspond to buttons in the previously created block,
and for activated buttons some data is then copied over to the new button.
* Added UI_init/UI_init_userdef/UI_exit functions that should initialize code
in this module, instead of multiple function calls in the windowmanager.
* Removed most static/globals from interface.c.
* Removed UIafterfunc_ I don't think it's needed anymore, and not sure how it
would integrate here?
* Currently only full window redraws are used, this should become per region
and maybe per button later.
Operators:
* Events are currently handled through two operators: button activate and menu
handle. Operators may not be the best way to implement this, since there are
currently some issues with events being missed, but they can become a special
handler type instead, this should not be a big change.
* The button activate operator runs as long as a button is active, and will
handle all interaction with that button until the button is not activated
anymore. This means clicking, text editing, number dragging, opening menu
blocks, etc.
* Since this operator has to be non-blocking, the ui_do_but code needed to made
non-blocking. That means variables that were previously on the stack, now
need to be stored away in a struct such that they can be accessed again when
the operator receives more events.
* Additionally the place in the ui_do_but code indicated the state, now that
needs to be set explicit in order to handle the right events in the right
state. So an activated button can be in one of these states: init, highlight,
wait_flash, wait_release, wait_key_event, num_editing, text_editing,
text_selecting, block_open, exit.
* For each button type an ui_apply_but_* function has also been separated out
from ui_do_but. This makes it possible to continuously apply the button as
text is being typed for example, and there is an option in the code to enable
this. Since the code non-blocking and can deal with the button being deleted
even, it should be safe to do this.
* When editing text, dragging numbers, etc, the actual data (but->poin) is not
being edited, since that would mean data is being edited without correct
updates happening, while some other part of blender may be accessing that
data in the meantime. So data values, strings, vectors are written to a
temporary location and only flush in the apply function.
Regions:
* Menus, color chooser, tooltips etc all create screen level regions. Such menu
blocks give a handle to the button that creates it, which will contain the
results of the menu block once a MESSAGE event is received from that menu
block.
* For this type of menu block the coordinates used to be in window space. They
are still created that way and ui_positionblock still works with window
coordinates, but after that the block and buttons are brought back to region
coordinates since these are now contained in a region.
* The flush/overdraw frontbuffer drawing code was removed, the windowmanager
should have enough information with these screen level regions to have full
control over what gets drawn when and to then do correct compositing.
Testing:
* The header in the time space currently has some buttons to test the UI code.
2008-11-11 18:31:32 +00:00
|
|
|
|
2017-02-01 19:00:30 -05:00
|
|
|
#include "BLF_api.h"
|
|
|
|
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
#include "UI_interface.h"
|
2008-12-03 17:36:30 +00:00
|
|
|
#include "UI_interface_icons.h"
|
2008-01-07 18:03:41 +00:00
|
|
|
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
#include "interface_intern.h"
|
2008-01-07 18:03:41 +00:00
|
|
|
|
|
|
|
/* global for themes */
|
|
|
|
typedef void (*VectorDrawFunc)(int x, int y, int w, int h, float alpha);
|
|
|
|
|
2015-01-04 23:20:56 +11:00
|
|
|
/* be sure to keep 'bThemeState' in sync */
|
|
|
|
static struct bThemeState g_theme_state = {
|
|
|
|
NULL,
|
|
|
|
SPACE_VIEW3D,
|
|
|
|
RGN_TYPE_WINDOW,
|
|
|
|
};
|
|
|
|
|
|
|
|
#define theme_active g_theme_state.theme
|
|
|
|
#define theme_spacetype g_theme_state.spacetype
|
|
|
|
#define theme_regionid g_theme_state.regionid
|
2008-01-07 18:03:41 +00:00
|
|
|
|
Port of part of the Interface code to 2.50.
This is based on the current trunk version, so these files should not need
merges. There's two things (clipboard and intptr_t) that are missing in 2.50
and commented out with XXX 2.48, these can be enabled again once trunk is
merged into this branch.
Further this is not all interface code, there are many parts commented out:
* interface.c: nearly all button types, missing: links, chartab, keyevent.
* interface_draw.c: almost all code, with some small exceptions.
* interface_ops.c: this replaces ui_do_but and uiDoBlocks with two operators,
making it non-blocking.
* interface_regions: this is a part of interface.c, split off, contains code to
create regions for tooltips, menus, pupmenu (that one is crashing currently),
color chooser, basically regions with buttons which is fairly independent of
core interface code.
* interface_panel.c and interface_icons.c: not ported over, so no panels and
icons yet. Panels should probably become (free floating) regions?
* text.c: (formerly language.c) for drawing text and translation. this works
but is using bad globals still and could be cleaned up.
Header Files:
* ED_datafiles.h now has declarations for datatoc_ files, so those extern
declarations can be #included instead of repeated.
* The user interface code is in UI_interface.h and other UI_* files.
Core:
* The API for creating blocks, buttons, etc is nearly the same still. Blocks
are now created per region instead of per area.
* The code was made non-blocking, which means that any changes and redraws
should be possible while editing a button. That means though that we need
some sort of persistence even though the blender model is to recreate buttons
for each redraw. So when a new block is created, some matching happens to
find out which buttons correspond to buttons in the previously created block,
and for activated buttons some data is then copied over to the new button.
* Added UI_init/UI_init_userdef/UI_exit functions that should initialize code
in this module, instead of multiple function calls in the windowmanager.
* Removed most static/globals from interface.c.
* Removed UIafterfunc_ I don't think it's needed anymore, and not sure how it
would integrate here?
* Currently only full window redraws are used, this should become per region
and maybe per button later.
Operators:
* Events are currently handled through two operators: button activate and menu
handle. Operators may not be the best way to implement this, since there are
currently some issues with events being missed, but they can become a special
handler type instead, this should not be a big change.
* The button activate operator runs as long as a button is active, and will
handle all interaction with that button until the button is not activated
anymore. This means clicking, text editing, number dragging, opening menu
blocks, etc.
* Since this operator has to be non-blocking, the ui_do_but code needed to made
non-blocking. That means variables that were previously on the stack, now
need to be stored away in a struct such that they can be accessed again when
the operator receives more events.
* Additionally the place in the ui_do_but code indicated the state, now that
needs to be set explicit in order to handle the right events in the right
state. So an activated button can be in one of these states: init, highlight,
wait_flash, wait_release, wait_key_event, num_editing, text_editing,
text_selecting, block_open, exit.
* For each button type an ui_apply_but_* function has also been separated out
from ui_do_but. This makes it possible to continuously apply the button as
text is being typed for example, and there is an option in the code to enable
this. Since the code non-blocking and can deal with the button being deleted
even, it should be safe to do this.
* When editing text, dragging numbers, etc, the actual data (but->poin) is not
being edited, since that would mean data is being edited without correct
updates happening, while some other part of blender may be accessing that
data in the meantime. So data values, strings, vectors are written to a
temporary location and only flush in the apply function.
Regions:
* Menus, color chooser, tooltips etc all create screen level regions. Such menu
blocks give a handle to the button that creates it, which will contain the
results of the menu block once a MESSAGE event is received from that menu
block.
* For this type of menu block the coordinates used to be in window space. They
are still created that way and ui_positionblock still works with window
coordinates, but after that the block and buttons are brought back to region
coordinates since these are now contained in a region.
* The flush/overdraw frontbuffer drawing code was removed, the windowmanager
should have enough information with these screen level regions to have full
control over what gets drawn when and to then do correct compositing.
Testing:
* The header in the time space currently has some buttons to test the UI code.
2008-11-11 18:31:32 +00:00
|
|
|
void ui_resources_init(void)
|
2008-01-07 18:03:41 +00:00
|
|
|
{
|
2009-06-15 20:28:49 +00:00
|
|
|
UI_icons_init(BIFICONID_LAST);
|
2008-01-07 18:03:41 +00:00
|
|
|
}
|
|
|
|
|
Port of part of the Interface code to 2.50.
This is based on the current trunk version, so these files should not need
merges. There's two things (clipboard and intptr_t) that are missing in 2.50
and commented out with XXX 2.48, these can be enabled again once trunk is
merged into this branch.
Further this is not all interface code, there are many parts commented out:
* interface.c: nearly all button types, missing: links, chartab, keyevent.
* interface_draw.c: almost all code, with some small exceptions.
* interface_ops.c: this replaces ui_do_but and uiDoBlocks with two operators,
making it non-blocking.
* interface_regions: this is a part of interface.c, split off, contains code to
create regions for tooltips, menus, pupmenu (that one is crashing currently),
color chooser, basically regions with buttons which is fairly independent of
core interface code.
* interface_panel.c and interface_icons.c: not ported over, so no panels and
icons yet. Panels should probably become (free floating) regions?
* text.c: (formerly language.c) for drawing text and translation. this works
but is using bad globals still and could be cleaned up.
Header Files:
* ED_datafiles.h now has declarations for datatoc_ files, so those extern
declarations can be #included instead of repeated.
* The user interface code is in UI_interface.h and other UI_* files.
Core:
* The API for creating blocks, buttons, etc is nearly the same still. Blocks
are now created per region instead of per area.
* The code was made non-blocking, which means that any changes and redraws
should be possible while editing a button. That means though that we need
some sort of persistence even though the blender model is to recreate buttons
for each redraw. So when a new block is created, some matching happens to
find out which buttons correspond to buttons in the previously created block,
and for activated buttons some data is then copied over to the new button.
* Added UI_init/UI_init_userdef/UI_exit functions that should initialize code
in this module, instead of multiple function calls in the windowmanager.
* Removed most static/globals from interface.c.
* Removed UIafterfunc_ I don't think it's needed anymore, and not sure how it
would integrate here?
* Currently only full window redraws are used, this should become per region
and maybe per button later.
Operators:
* Events are currently handled through two operators: button activate and menu
handle. Operators may not be the best way to implement this, since there are
currently some issues with events being missed, but they can become a special
handler type instead, this should not be a big change.
* The button activate operator runs as long as a button is active, and will
handle all interaction with that button until the button is not activated
anymore. This means clicking, text editing, number dragging, opening menu
blocks, etc.
* Since this operator has to be non-blocking, the ui_do_but code needed to made
non-blocking. That means variables that were previously on the stack, now
need to be stored away in a struct such that they can be accessed again when
the operator receives more events.
* Additionally the place in the ui_do_but code indicated the state, now that
needs to be set explicit in order to handle the right events in the right
state. So an activated button can be in one of these states: init, highlight,
wait_flash, wait_release, wait_key_event, num_editing, text_editing,
text_selecting, block_open, exit.
* For each button type an ui_apply_but_* function has also been separated out
from ui_do_but. This makes it possible to continuously apply the button as
text is being typed for example, and there is an option in the code to enable
this. Since the code non-blocking and can deal with the button being deleted
even, it should be safe to do this.
* When editing text, dragging numbers, etc, the actual data (but->poin) is not
being edited, since that would mean data is being edited without correct
updates happening, while some other part of blender may be accessing that
data in the meantime. So data values, strings, vectors are written to a
temporary location and only flush in the apply function.
Regions:
* Menus, color chooser, tooltips etc all create screen level regions. Such menu
blocks give a handle to the button that creates it, which will contain the
results of the menu block once a MESSAGE event is received from that menu
block.
* For this type of menu block the coordinates used to be in window space. They
are still created that way and ui_positionblock still works with window
coordinates, but after that the block and buttons are brought back to region
coordinates since these are now contained in a region.
* The flush/overdraw frontbuffer drawing code was removed, the windowmanager
should have enough information with these screen level regions to have full
control over what gets drawn when and to then do correct compositing.
Testing:
* The header in the time space currently has some buttons to test the UI code.
2008-11-11 18:31:32 +00:00
|
|
|
void ui_resources_free(void)
|
2008-01-07 18:03:41 +00:00
|
|
|
{
|
2008-11-25 19:23:54 +00:00
|
|
|
UI_icons_free();
|
2008-01-07 18:03:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* ******************************************************** */
|
|
|
|
/* THEMES */
|
|
|
|
/* ******************************************************** */
|
|
|
|
|
2010-12-20 03:59:22 +00:00
|
|
|
const unsigned char *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colorid)
|
2008-01-07 18:03:41 +00:00
|
|
|
{
|
2012-03-30 01:51:25 +00:00
|
|
|
ThemeSpace *ts = NULL;
|
|
|
|
static char error[4] = {240, 0, 240, 255};
|
|
|
|
static char alert[4] = {240, 60, 60, 255};
|
|
|
|
static char headerdesel[4] = {0, 0, 0, 255};
|
2012-12-15 16:22:18 +00:00
|
|
|
static char setting = 0;
|
2012-03-30 01:51:25 +00:00
|
|
|
const char *cp = error;
|
2008-01-07 18:03:41 +00:00
|
|
|
|
2016-04-24 22:42:41 +10:00
|
|
|
/* ensure we're not getting a color after running BKE_blender_userdef_free */
|
2014-02-18 12:33:19 +11:00
|
|
|
BLI_assert(BLI_findindex(&U.themes, theme_active) != -1);
|
2014-06-04 14:22:29 +10:00
|
|
|
BLI_assert(colorid != TH_UNDEFINED);
|
2014-02-18 12:33:19 +11:00
|
|
|
|
2012-03-24 06:38:07 +00:00
|
|
|
if (btheme) {
|
2008-01-07 18:03:41 +00:00
|
|
|
|
2012-07-07 22:51:57 +00:00
|
|
|
/* first check for ui buttons theme */
|
2012-03-24 06:38:07 +00:00
|
|
|
if (colorid < TH_THEMEUI) {
|
2008-01-07 18:03:41 +00:00
|
|
|
|
2012-03-30 01:51:25 +00:00
|
|
|
switch (colorid) {
|
2008-01-07 18:03:41 +00:00
|
|
|
|
2012-03-30 01:51:25 +00:00
|
|
|
case TH_REDALERT:
|
|
|
|
cp = alert; break;
|
2008-01-07 18:03:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
|
2012-03-30 01:51:25 +00:00
|
|
|
switch (spacetype) {
|
|
|
|
case SPACE_BUTS:
|
|
|
|
ts = &btheme->tbuts;
|
|
|
|
break;
|
|
|
|
case SPACE_VIEW3D:
|
|
|
|
ts = &btheme->tv3d;
|
|
|
|
break;
|
|
|
|
case SPACE_IPO:
|
|
|
|
ts = &btheme->tipo;
|
|
|
|
break;
|
|
|
|
case SPACE_FILE:
|
|
|
|
ts = &btheme->tfile;
|
|
|
|
break;
|
|
|
|
case SPACE_NLA:
|
|
|
|
ts = &btheme->tnla;
|
|
|
|
break;
|
|
|
|
case SPACE_ACTION:
|
|
|
|
ts = &btheme->tact;
|
|
|
|
break;
|
|
|
|
case SPACE_SEQ:
|
|
|
|
ts = &btheme->tseq;
|
|
|
|
break;
|
|
|
|
case SPACE_IMAGE:
|
|
|
|
ts = &btheme->tima;
|
|
|
|
break;
|
|
|
|
case SPACE_TEXT:
|
|
|
|
ts = &btheme->text;
|
|
|
|
break;
|
|
|
|
case SPACE_OUTLINER:
|
|
|
|
ts = &btheme->toops;
|
|
|
|
break;
|
|
|
|
case SPACE_INFO:
|
|
|
|
ts = &btheme->tinfo;
|
|
|
|
break;
|
|
|
|
case SPACE_USERPREF:
|
|
|
|
ts = &btheme->tuserpref;
|
|
|
|
break;
|
|
|
|
case SPACE_CONSOLE:
|
|
|
|
ts = &btheme->tconsole;
|
|
|
|
break;
|
|
|
|
case SPACE_TIME:
|
|
|
|
ts = &btheme->ttime;
|
|
|
|
break;
|
|
|
|
case SPACE_NODE:
|
|
|
|
ts = &btheme->tnode;
|
|
|
|
break;
|
|
|
|
case SPACE_LOGIC:
|
|
|
|
ts = &btheme->tlogic;
|
|
|
|
break;
|
|
|
|
case SPACE_CLIP:
|
|
|
|
ts = &btheme->tclip;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
ts = &btheme->tv3d;
|
|
|
|
break;
|
2008-01-07 18:03:41 +00:00
|
|
|
}
|
2012-03-30 01:51:25 +00:00
|
|
|
|
|
|
|
switch (colorid) {
|
|
|
|
case TH_BACK:
|
|
|
|
if (theme_regionid == RGN_TYPE_WINDOW)
|
|
|
|
cp = ts->back;
|
|
|
|
else if (theme_regionid == RGN_TYPE_CHANNELS)
|
|
|
|
cp = ts->list;
|
|
|
|
else if (theme_regionid == RGN_TYPE_HEADER)
|
|
|
|
cp = ts->header;
|
|
|
|
else
|
|
|
|
cp = ts->button;
|
|
|
|
break;
|
2013-01-07 15:42:42 +00:00
|
|
|
case TH_LOW_GRAD:
|
2013-01-06 16:45:10 +00:00
|
|
|
cp = ts->gradients.gradient;
|
|
|
|
break;
|
2013-01-07 15:42:42 +00:00
|
|
|
case TH_HIGH_GRAD:
|
|
|
|
cp = ts->gradients.high_gradient;
|
|
|
|
break;
|
2013-01-06 16:45:10 +00:00
|
|
|
case TH_SHOW_BACK_GRAD:
|
|
|
|
cp = &setting;
|
|
|
|
setting = ts->gradients.show_grad;
|
|
|
|
break;
|
2012-03-30 01:51:25 +00:00
|
|
|
case TH_TEXT:
|
|
|
|
if (theme_regionid == RGN_TYPE_WINDOW)
|
|
|
|
cp = ts->text;
|
|
|
|
else if (theme_regionid == RGN_TYPE_CHANNELS)
|
|
|
|
cp = ts->list_text;
|
|
|
|
else if (theme_regionid == RGN_TYPE_HEADER)
|
|
|
|
cp = ts->header_text;
|
|
|
|
else
|
|
|
|
cp = ts->button_text;
|
|
|
|
break;
|
|
|
|
case TH_TEXT_HI:
|
|
|
|
if (theme_regionid == RGN_TYPE_WINDOW)
|
|
|
|
cp = ts->text_hi;
|
|
|
|
else if (theme_regionid == RGN_TYPE_CHANNELS)
|
|
|
|
cp = ts->list_text_hi;
|
|
|
|
else if (theme_regionid == RGN_TYPE_HEADER)
|
|
|
|
cp = ts->header_text_hi;
|
|
|
|
else
|
|
|
|
cp = ts->button_text_hi;
|
|
|
|
break;
|
|
|
|
case TH_TITLE:
|
|
|
|
if (theme_regionid == RGN_TYPE_WINDOW)
|
|
|
|
cp = ts->title;
|
|
|
|
else if (theme_regionid == RGN_TYPE_CHANNELS)
|
|
|
|
cp = ts->list_title;
|
|
|
|
else if (theme_regionid == RGN_TYPE_HEADER)
|
|
|
|
cp = ts->header_title;
|
|
|
|
else
|
|
|
|
cp = ts->button_title;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case TH_HEADER:
|
|
|
|
cp = ts->header; break;
|
|
|
|
case TH_HEADERDESEL:
|
|
|
|
/* we calculate a dynamic builtin header deselect color, also for pulldowns... */
|
|
|
|
cp = ts->header;
|
|
|
|
headerdesel[0] = cp[0] > 10 ? cp[0] - 10 : 0;
|
|
|
|
headerdesel[1] = cp[1] > 10 ? cp[1] - 10 : 0;
|
|
|
|
headerdesel[2] = cp[2] > 10 ? cp[2] - 10 : 0;
|
|
|
|
cp = headerdesel;
|
|
|
|
break;
|
|
|
|
case TH_HEADER_TEXT:
|
|
|
|
cp = ts->header_text; break;
|
|
|
|
case TH_HEADER_TEXT_HI:
|
|
|
|
cp = ts->header_text_hi; break;
|
|
|
|
|
2012-12-15 16:22:18 +00:00
|
|
|
case TH_PANEL_HEADER:
|
|
|
|
cp = ts->panelcolors.header; break;
|
|
|
|
case TH_PANEL_BACK:
|
|
|
|
cp = ts->panelcolors.back; break;
|
|
|
|
case TH_PANEL_SHOW_HEADER:
|
|
|
|
cp = &setting;
|
|
|
|
setting = ts->panelcolors.show_header;
|
|
|
|
break;
|
|
|
|
case TH_PANEL_SHOW_BACK:
|
|
|
|
cp = &setting;
|
|
|
|
setting = ts->panelcolors.show_back;
|
|
|
|
break;
|
|
|
|
|
2012-03-30 01:51:25 +00:00
|
|
|
case TH_BUTBACK:
|
|
|
|
cp = ts->button; break;
|
|
|
|
case TH_BUTBACK_TEXT:
|
|
|
|
cp = ts->button_text; break;
|
|
|
|
case TH_BUTBACK_TEXT_HI:
|
|
|
|
cp = ts->button_text_hi; break;
|
|
|
|
|
2014-01-23 11:44:35 +11:00
|
|
|
case TH_TAB_ACTIVE:
|
|
|
|
cp = ts->tab_active; break;
|
|
|
|
case TH_TAB_INACTIVE:
|
|
|
|
cp = ts->tab_inactive; break;
|
|
|
|
case TH_TAB_BACK:
|
|
|
|
cp = ts->tab_back; break;
|
|
|
|
case TH_TAB_OUTLINE:
|
|
|
|
cp = ts->tab_outline; break;
|
|
|
|
|
2012-03-30 01:51:25 +00:00
|
|
|
case TH_SHADE1:
|
|
|
|
cp = ts->shade1; break;
|
|
|
|
case TH_SHADE2:
|
|
|
|
cp = ts->shade2; break;
|
|
|
|
case TH_HILITE:
|
|
|
|
cp = ts->hilite; break;
|
Axis Colours are now Themeable
This commit allows you to set the RGB <-> XYZ axis colours used for things like
the mini axis indicator, grid axis indicators, manipulators, transform
constraint indicators, F-Curves (when using XYZ to RGB colouring option), and
perhaps something else I've missed. Previously, these places all used hardcoded
defines (220 * i/j/k), but the readability of these colours was often quite
poor, especially when used with certain themes.
The settings for these colours can be found under the "User Interface" section
of the themes (i.e. same set of colours is used across editors). I could have
made these per editor, but since it's unlikely that these will need to be too
different across editors in practice (+ being easier to version patch), they are
stored under the UI section.
2012-11-09 06:36:11 +00:00
|
|
|
|
2012-03-30 01:51:25 +00:00
|
|
|
case TH_GRID:
|
|
|
|
cp = ts->grid; break;
|
2014-03-18 05:34:43 +11:00
|
|
|
case TH_VIEW_OVERLAY:
|
|
|
|
cp = ts->view_overlay; break;
|
2012-03-30 01:51:25 +00:00
|
|
|
case TH_WIRE:
|
|
|
|
cp = ts->wire; break;
|
2014-10-14 10:16:46 +02:00
|
|
|
case TH_WIRE_INNER:
|
|
|
|
cp = ts->syntaxr; break;
|
2013-06-08 21:58:00 +00:00
|
|
|
case TH_WIRE_EDIT:
|
|
|
|
cp = ts->wire_edit; break;
|
2012-03-30 01:51:25 +00:00
|
|
|
case TH_LAMP:
|
|
|
|
cp = ts->lamp; break;
|
|
|
|
case TH_SPEAKER:
|
|
|
|
cp = ts->speaker; break;
|
|
|
|
case TH_CAMERA:
|
|
|
|
cp = ts->camera; break;
|
|
|
|
case TH_EMPTY:
|
|
|
|
cp = ts->empty; break;
|
|
|
|
case TH_SELECT:
|
|
|
|
cp = ts->select; break;
|
|
|
|
case TH_ACTIVE:
|
|
|
|
cp = ts->active; break;
|
|
|
|
case TH_GROUP:
|
|
|
|
cp = ts->group; break;
|
|
|
|
case TH_GROUP_ACTIVE:
|
|
|
|
cp = ts->group_active; break;
|
|
|
|
case TH_TRANSFORM:
|
|
|
|
cp = ts->transform; break;
|
|
|
|
case TH_VERTEX:
|
|
|
|
cp = ts->vertex; break;
|
|
|
|
case TH_VERTEX_SELECT:
|
|
|
|
cp = ts->vertex_select; break;
|
2016-09-21 23:04:26 +02:00
|
|
|
case TH_VERTEX_BEVEL:
|
|
|
|
cp = ts->vertex_bevel; break;
|
2013-03-05 20:30:38 +00:00
|
|
|
case TH_VERTEX_UNREFERENCED:
|
|
|
|
cp = ts->vertex_unreferenced; break;
|
2012-03-30 01:51:25 +00:00
|
|
|
case TH_VERTEX_SIZE:
|
|
|
|
cp = &ts->vertex_size; break;
|
|
|
|
case TH_OUTLINE_WIDTH:
|
|
|
|
cp = &ts->outline_width; break;
|
|
|
|
case TH_EDGE:
|
|
|
|
cp = ts->edge; break;
|
|
|
|
case TH_EDGE_SELECT:
|
|
|
|
cp = ts->edge_select; break;
|
|
|
|
case TH_EDGE_SEAM:
|
|
|
|
cp = ts->edge_seam; break;
|
|
|
|
case TH_EDGE_SHARP:
|
|
|
|
cp = ts->edge_sharp; break;
|
|
|
|
case TH_EDGE_CREASE:
|
|
|
|
cp = ts->edge_crease; break;
|
2016-09-21 23:04:26 +02:00
|
|
|
case TH_EDGE_BEVEL:
|
|
|
|
cp = ts->edge_bevel; break;
|
2012-03-30 01:51:25 +00:00
|
|
|
case TH_EDITMESH_ACTIVE:
|
|
|
|
cp = ts->editmesh_active; break;
|
|
|
|
case TH_EDGE_FACESEL:
|
|
|
|
cp = ts->edge_facesel; break;
|
|
|
|
case TH_FACE:
|
|
|
|
cp = ts->face; break;
|
|
|
|
case TH_FACE_SELECT:
|
|
|
|
cp = ts->face_select; break;
|
|
|
|
case TH_FACE_DOT:
|
|
|
|
cp = ts->face_dot; break;
|
|
|
|
case TH_FACEDOT_SIZE:
|
|
|
|
cp = &ts->facedot_size; break;
|
|
|
|
case TH_DRAWEXTRA_EDGELEN:
|
|
|
|
cp = ts->extra_edge_len; break;
|
2013-03-29 04:01:52 +00:00
|
|
|
case TH_DRAWEXTRA_EDGEANG:
|
|
|
|
cp = ts->extra_edge_angle; break;
|
2012-03-30 01:51:25 +00:00
|
|
|
case TH_DRAWEXTRA_FACEAREA:
|
|
|
|
cp = ts->extra_face_area; break;
|
|
|
|
case TH_DRAWEXTRA_FACEANG:
|
|
|
|
cp = ts->extra_face_angle; break;
|
|
|
|
case TH_NORMAL:
|
|
|
|
cp = ts->normal; break;
|
|
|
|
case TH_VNORMAL:
|
|
|
|
cp = ts->vertex_normal; break;
|
2014-08-25 12:45:49 +02:00
|
|
|
case TH_LNORMAL:
|
|
|
|
cp = ts->loop_normal; break;
|
2012-03-30 01:51:25 +00:00
|
|
|
case TH_BONE_SOLID:
|
|
|
|
cp = ts->bone_solid; break;
|
|
|
|
case TH_BONE_POSE:
|
|
|
|
cp = ts->bone_pose; break;
|
2012-07-26 10:53:59 +00:00
|
|
|
case TH_BONE_POSE_ACTIVE:
|
|
|
|
cp = ts->bone_pose_active; break;
|
2012-03-30 01:51:25 +00:00
|
|
|
case TH_STRIP:
|
|
|
|
cp = ts->strip; break;
|
|
|
|
case TH_STRIP_SELECT:
|
|
|
|
cp = ts->strip_select; break;
|
2014-01-07 22:45:40 +13:00
|
|
|
case TH_KEYTYPE_KEYFRAME:
|
|
|
|
cp = ts->keytype_keyframe; break;
|
|
|
|
case TH_KEYTYPE_KEYFRAME_SELECT:
|
|
|
|
cp = ts->keytype_keyframe_select; break;
|
|
|
|
case TH_KEYTYPE_EXTREME:
|
|
|
|
cp = ts->keytype_extreme; break;
|
|
|
|
case TH_KEYTYPE_EXTREME_SELECT:
|
|
|
|
cp = ts->keytype_extreme_select; break;
|
|
|
|
case TH_KEYTYPE_BREAKDOWN:
|
|
|
|
cp = ts->keytype_breakdown; break;
|
|
|
|
case TH_KEYTYPE_BREAKDOWN_SELECT:
|
|
|
|
cp = ts->keytype_breakdown_select; break;
|
|
|
|
case TH_KEYTYPE_JITTER:
|
|
|
|
cp = ts->keytype_jitter; break;
|
|
|
|
case TH_KEYTYPE_JITTER_SELECT:
|
|
|
|
cp = ts->keytype_jitter_select; break;
|
|
|
|
case TH_KEYBORDER:
|
|
|
|
cp = ts->keyborder; break;
|
|
|
|
case TH_KEYBORDER_SELECT:
|
|
|
|
cp = ts->keyborder_select; break;
|
2012-03-30 01:51:25 +00:00
|
|
|
case TH_CFRAME:
|
|
|
|
cp = ts->cframe; break;
|
2015-01-04 00:48:29 +13:00
|
|
|
case TH_TIME_KEYFRAME:
|
|
|
|
cp = ts->time_keyframe; break;
|
|
|
|
case TH_TIME_GP_KEYFRAME:
|
|
|
|
cp = ts->time_gp_keyframe; break;
|
2012-03-30 01:51:25 +00:00
|
|
|
case TH_NURB_ULINE:
|
|
|
|
cp = ts->nurb_uline; break;
|
|
|
|
case TH_NURB_VLINE:
|
|
|
|
cp = ts->nurb_vline; break;
|
|
|
|
case TH_NURB_SEL_ULINE:
|
|
|
|
cp = ts->nurb_sel_uline; break;
|
|
|
|
case TH_NURB_SEL_VLINE:
|
|
|
|
cp = ts->nurb_sel_vline; break;
|
|
|
|
case TH_ACTIVE_SPLINE:
|
|
|
|
cp = ts->act_spline; break;
|
2014-01-27 15:18:40 +11:00
|
|
|
case TH_ACTIVE_VERT:
|
2012-03-30 01:51:25 +00:00
|
|
|
cp = ts->lastsel_point; break;
|
|
|
|
case TH_HANDLE_FREE:
|
|
|
|
cp = ts->handle_free; break;
|
|
|
|
case TH_HANDLE_AUTO:
|
|
|
|
cp = ts->handle_auto; break;
|
|
|
|
case TH_HANDLE_AUTOCLAMP:
|
|
|
|
cp = ts->handle_auto_clamped; break;
|
|
|
|
case TH_HANDLE_VECT:
|
|
|
|
cp = ts->handle_vect; break;
|
|
|
|
case TH_HANDLE_ALIGN:
|
|
|
|
cp = ts->handle_align; break;
|
|
|
|
case TH_HANDLE_SEL_FREE:
|
|
|
|
cp = ts->handle_sel_free; break;
|
|
|
|
case TH_HANDLE_SEL_AUTO:
|
|
|
|
cp = ts->handle_sel_auto; break;
|
|
|
|
case TH_HANDLE_SEL_AUTOCLAMP:
|
|
|
|
cp = ts->handle_sel_auto_clamped; break;
|
|
|
|
case TH_HANDLE_SEL_VECT:
|
|
|
|
cp = ts->handle_sel_vect; break;
|
|
|
|
case TH_HANDLE_SEL_ALIGN:
|
|
|
|
cp = ts->handle_sel_align; break;
|
2012-03-31 22:09:43 +00:00
|
|
|
case TH_FREESTYLE_EDGE_MARK:
|
|
|
|
cp = ts->freestyle_edge_mark; break;
|
|
|
|
case TH_FREESTYLE_FACE_MARK:
|
|
|
|
cp = ts->freestyle_face_mark; break;
|
2012-03-30 01:51:25 +00:00
|
|
|
|
|
|
|
case TH_SYNTAX_B:
|
|
|
|
cp = ts->syntaxb; break;
|
|
|
|
case TH_SYNTAX_V:
|
|
|
|
cp = ts->syntaxv; break;
|
|
|
|
case TH_SYNTAX_C:
|
|
|
|
cp = ts->syntaxc; break;
|
|
|
|
case TH_SYNTAX_L:
|
|
|
|
cp = ts->syntaxl; break;
|
2012-12-29 18:25:03 +00:00
|
|
|
case TH_SYNTAX_D:
|
|
|
|
cp = ts->syntaxd; break;
|
|
|
|
case TH_SYNTAX_R:
|
|
|
|
cp = ts->syntaxr; break;
|
2012-03-30 01:51:25 +00:00
|
|
|
case TH_SYNTAX_N:
|
|
|
|
cp = ts->syntaxn; break;
|
2012-12-30 01:26:31 +00:00
|
|
|
case TH_SYNTAX_S:
|
|
|
|
cp = ts->syntaxs; break;
|
2012-03-30 01:51:25 +00:00
|
|
|
|
|
|
|
case TH_NODE:
|
|
|
|
cp = ts->syntaxl; break;
|
2013-12-01 21:30:04 +01:00
|
|
|
case TH_NODE_INPUT:
|
2012-03-30 01:51:25 +00:00
|
|
|
cp = ts->syntaxn; break;
|
2013-12-01 21:30:04 +01:00
|
|
|
case TH_NODE_OUTPUT:
|
|
|
|
cp = ts->nodeclass_output; break;
|
|
|
|
case TH_NODE_COLOR:
|
2012-03-30 01:51:25 +00:00
|
|
|
cp = ts->syntaxb; break;
|
2013-12-01 21:30:04 +01:00
|
|
|
case TH_NODE_FILTER:
|
|
|
|
cp = ts->nodeclass_filter; break;
|
|
|
|
case TH_NODE_VECTOR:
|
|
|
|
cp = ts->nodeclass_vector; break;
|
|
|
|
case TH_NODE_TEXTURE:
|
|
|
|
cp = ts->nodeclass_texture; break;
|
|
|
|
case TH_NODE_PATTERN:
|
|
|
|
cp = ts->nodeclass_pattern; break;
|
|
|
|
case TH_NODE_SCRIPT:
|
|
|
|
cp = ts->nodeclass_script; break;
|
|
|
|
case TH_NODE_LAYOUT:
|
|
|
|
cp = ts->nodeclass_layout; break;
|
|
|
|
case TH_NODE_SHADER:
|
|
|
|
cp = ts->nodeclass_shader; break;
|
2012-03-30 01:51:25 +00:00
|
|
|
case TH_NODE_CONVERTOR:
|
|
|
|
cp = ts->syntaxv; break;
|
|
|
|
case TH_NODE_GROUP:
|
|
|
|
cp = ts->syntaxc; break;
|
2013-03-18 16:34:57 +00:00
|
|
|
case TH_NODE_INTERFACE:
|
2013-03-18 18:25:05 +00:00
|
|
|
cp = ts->console_output; break;
|
2012-06-01 14:42:21 +00:00
|
|
|
case TH_NODE_FRAME:
|
|
|
|
cp = ts->movie; break;
|
2013-01-19 04:20:53 +00:00
|
|
|
case TH_NODE_MATTE:
|
|
|
|
cp = ts->syntaxs; break;
|
|
|
|
case TH_NODE_DISTORT:
|
|
|
|
cp = ts->syntaxd; break;
|
2012-03-30 01:51:25 +00:00
|
|
|
case TH_NODE_CURVING:
|
|
|
|
cp = &ts->noodle_curving; break;
|
|
|
|
|
|
|
|
case TH_SEQ_MOVIE:
|
|
|
|
cp = ts->movie; break;
|
|
|
|
case TH_SEQ_MOVIECLIP:
|
|
|
|
cp = ts->movieclip; break;
|
2012-06-07 18:24:36 +00:00
|
|
|
case TH_SEQ_MASK:
|
|
|
|
cp = ts->mask; break;
|
2012-03-30 01:51:25 +00:00
|
|
|
case TH_SEQ_IMAGE:
|
|
|
|
cp = ts->image; break;
|
|
|
|
case TH_SEQ_SCENE:
|
|
|
|
cp = ts->scene; break;
|
|
|
|
case TH_SEQ_AUDIO:
|
|
|
|
cp = ts->audio; break;
|
|
|
|
case TH_SEQ_EFFECT:
|
|
|
|
cp = ts->effect; break;
|
|
|
|
case TH_SEQ_TRANSITION:
|
|
|
|
cp = ts->transition; break;
|
|
|
|
case TH_SEQ_META:
|
|
|
|
cp = ts->meta; break;
|
2015-12-01 23:56:48 +01:00
|
|
|
case TH_SEQ_TEXT:
|
|
|
|
cp = ts->text_strip; break;
|
2012-03-30 01:51:25 +00:00
|
|
|
case TH_SEQ_PREVIEW:
|
|
|
|
cp = ts->preview_back; break;
|
|
|
|
|
|
|
|
case TH_CONSOLE_OUTPUT:
|
|
|
|
cp = ts->console_output; break;
|
|
|
|
case TH_CONSOLE_INPUT:
|
|
|
|
cp = ts->console_input; break;
|
|
|
|
case TH_CONSOLE_INFO:
|
|
|
|
cp = ts->console_info; break;
|
|
|
|
case TH_CONSOLE_ERROR:
|
|
|
|
cp = ts->console_error; break;
|
|
|
|
case TH_CONSOLE_CURSOR:
|
|
|
|
cp = ts->console_cursor; break;
|
2013-02-18 02:36:36 +00:00
|
|
|
case TH_CONSOLE_SELECT:
|
|
|
|
cp = ts->console_select; break;
|
2012-03-30 01:51:25 +00:00
|
|
|
|
|
|
|
case TH_HANDLE_VERTEX:
|
|
|
|
cp = ts->handle_vertex;
|
|
|
|
break;
|
|
|
|
case TH_HANDLE_VERTEX_SELECT:
|
|
|
|
cp = ts->handle_vertex_select;
|
|
|
|
break;
|
|
|
|
case TH_HANDLE_VERTEX_SIZE:
|
|
|
|
cp = &ts->handle_vertex_size;
|
|
|
|
break;
|
2015-01-03 18:07:05 +13:00
|
|
|
|
|
|
|
case TH_GP_VERTEX:
|
|
|
|
cp = ts->gp_vertex;
|
|
|
|
break;
|
|
|
|
case TH_GP_VERTEX_SELECT:
|
|
|
|
cp = ts->gp_vertex_select;
|
|
|
|
break;
|
|
|
|
case TH_GP_VERTEX_SIZE:
|
|
|
|
cp = &ts->gp_vertex_size;
|
|
|
|
break;
|
|
|
|
|
2012-03-30 01:51:25 +00:00
|
|
|
case TH_DOPESHEET_CHANNELOB:
|
|
|
|
cp = ts->ds_channel;
|
|
|
|
break;
|
|
|
|
case TH_DOPESHEET_CHANNELSUBOB:
|
|
|
|
cp = ts->ds_subchannel;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case TH_PREVIEW_BACK:
|
|
|
|
cp = ts->preview_back;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case TH_STITCH_PREVIEW_FACE:
|
|
|
|
cp = ts->preview_stitch_face;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case TH_STITCH_PREVIEW_EDGE:
|
|
|
|
cp = ts->preview_stitch_edge;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case TH_STITCH_PREVIEW_VERT:
|
|
|
|
cp = ts->preview_stitch_vert;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case TH_STITCH_PREVIEW_STITCHABLE:
|
|
|
|
cp = ts->preview_stitch_stitchable;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case TH_STITCH_PREVIEW_UNSTITCHABLE:
|
|
|
|
cp = ts->preview_stitch_unstitchable;
|
|
|
|
break;
|
|
|
|
case TH_STITCH_PREVIEW_ACTIVE:
|
|
|
|
cp = ts->preview_stitch_active;
|
|
|
|
break;
|
2013-09-05 15:09:10 +00:00
|
|
|
|
2014-07-21 12:02:05 +02:00
|
|
|
case TH_PAINT_CURVE_HANDLE:
|
|
|
|
cp = ts->paint_curve_handle;
|
|
|
|
break;
|
|
|
|
case TH_PAINT_CURVE_PIVOT:
|
|
|
|
cp = ts->paint_curve_pivot;
|
|
|
|
break;
|
|
|
|
|
2015-04-21 17:15:40 +02:00
|
|
|
case TH_METADATA_BG:
|
2015-04-22 04:43:13 +10:00
|
|
|
cp = ts->metadatabg;
|
2015-04-21 17:15:40 +02:00
|
|
|
break;
|
|
|
|
case TH_METADATA_TEXT:
|
2015-04-22 04:43:13 +10:00
|
|
|
cp = ts->metadatatext;
|
2015-04-21 17:15:40 +02:00
|
|
|
break;
|
|
|
|
|
2013-09-05 15:09:10 +00:00
|
|
|
case TH_UV_OTHERS:
|
|
|
|
cp = ts->uv_others;
|
|
|
|
break;
|
|
|
|
case TH_UV_SHADOW:
|
|
|
|
cp = ts->uv_shadow;
|
|
|
|
break;
|
|
|
|
|
2012-03-30 01:51:25 +00:00
|
|
|
case TH_MARKER_OUTLINE:
|
|
|
|
cp = ts->marker_outline; break;
|
|
|
|
case TH_MARKER:
|
|
|
|
cp = ts->marker; break;
|
|
|
|
case TH_ACT_MARKER:
|
|
|
|
cp = ts->act_marker; break;
|
|
|
|
case TH_SEL_MARKER:
|
|
|
|
cp = ts->sel_marker; break;
|
|
|
|
case TH_BUNDLE_SOLID:
|
|
|
|
cp = ts->bundle_solid; break;
|
|
|
|
case TH_DIS_MARKER:
|
|
|
|
cp = ts->dis_marker; break;
|
|
|
|
case TH_PATH_BEFORE:
|
|
|
|
cp = ts->path_before; break;
|
|
|
|
case TH_PATH_AFTER:
|
|
|
|
cp = ts->path_after; break;
|
|
|
|
case TH_CAMERA_PATH:
|
|
|
|
cp = ts->camera_path; break;
|
|
|
|
case TH_LOCK_MARKER:
|
|
|
|
cp = ts->lock_marker; break;
|
|
|
|
|
|
|
|
case TH_MATCH:
|
|
|
|
cp = ts->match;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case TH_SELECT_HIGHLIGHT:
|
|
|
|
cp = ts->selected_highlight;
|
|
|
|
break;
|
2012-05-22 15:29:15 +00:00
|
|
|
|
|
|
|
case TH_SKIN_ROOT:
|
|
|
|
cp = ts->skin_root;
|
|
|
|
break;
|
2012-06-04 01:17:37 +00:00
|
|
|
|
|
|
|
case TH_ANIM_ACTIVE:
|
|
|
|
cp = ts->anim_active;
|
|
|
|
break;
|
|
|
|
case TH_ANIM_INACTIVE:
|
|
|
|
cp = ts->anim_non_active;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case TH_NLA_TWEAK:
|
|
|
|
cp = ts->nla_tweaking;
|
|
|
|
break;
|
|
|
|
case TH_NLA_TWEAK_DUPLI:
|
|
|
|
cp = ts->nla_tweakdupli;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case TH_NLA_TRANSITION:
|
|
|
|
cp = ts->nla_transition;
|
|
|
|
break;
|
|
|
|
case TH_NLA_TRANSITION_SEL:
|
|
|
|
cp = ts->nla_transition_sel;
|
|
|
|
break;
|
|
|
|
case TH_NLA_META:
|
|
|
|
cp = ts->nla_meta;
|
|
|
|
break;
|
|
|
|
case TH_NLA_META_SEL:
|
|
|
|
cp = ts->nla_meta_sel;
|
|
|
|
break;
|
|
|
|
case TH_NLA_SOUND:
|
|
|
|
cp = ts->nla_sound;
|
|
|
|
break;
|
|
|
|
case TH_NLA_SOUND_SEL:
|
|
|
|
cp = ts->nla_sound_sel;
|
|
|
|
break;
|
Axis Colours are now Themeable
This commit allows you to set the RGB <-> XYZ axis colours used for things like
the mini axis indicator, grid axis indicators, manipulators, transform
constraint indicators, F-Curves (when using XYZ to RGB colouring option), and
perhaps something else I've missed. Previously, these places all used hardcoded
defines (220 * i/j/k), but the readability of these colours was often quite
poor, especially when used with certain themes.
The settings for these colours can be found under the "User Interface" section
of the themes (i.e. same set of colours is used across editors). I could have
made these per editor, but since it's unlikely that these will need to be too
different across editors in practice (+ being easier to version patch), they are
stored under the UI section.
2012-11-09 06:36:11 +00:00
|
|
|
|
2014-12-08 00:38:36 +01:00
|
|
|
case TH_WIDGET_EMBOSS:
|
|
|
|
cp = btheme->tui.widget_emboss; break;
|
2014-10-27 18:11:55 +01:00
|
|
|
|
Axis Colours are now Themeable
This commit allows you to set the RGB <-> XYZ axis colours used for things like
the mini axis indicator, grid axis indicators, manipulators, transform
constraint indicators, F-Curves (when using XYZ to RGB colouring option), and
perhaps something else I've missed. Previously, these places all used hardcoded
defines (220 * i/j/k), but the readability of these colours was often quite
poor, especially when used with certain themes.
The settings for these colours can be found under the "User Interface" section
of the themes (i.e. same set of colours is used across editors). I could have
made these per editor, but since it's unlikely that these will need to be too
different across editors in practice (+ being easier to version patch), they are
stored under the UI section.
2012-11-09 06:36:11 +00:00
|
|
|
case TH_AXIS_X:
|
|
|
|
cp = btheme->tui.xaxis; break;
|
|
|
|
case TH_AXIS_Y:
|
|
|
|
cp = btheme->tui.yaxis; break;
|
|
|
|
case TH_AXIS_Z:
|
|
|
|
cp = btheme->tui.zaxis; break;
|
2013-12-18 05:02:42 +11:00
|
|
|
|
|
|
|
case TH_INFO_SELECTED:
|
|
|
|
cp = ts->info_selected;
|
|
|
|
break;
|
|
|
|
case TH_INFO_SELECTED_TEXT:
|
|
|
|
cp = ts->info_selected_text;
|
|
|
|
break;
|
|
|
|
case TH_INFO_ERROR:
|
|
|
|
cp = ts->info_error;
|
|
|
|
break;
|
|
|
|
case TH_INFO_ERROR_TEXT:
|
|
|
|
cp = ts->info_error_text;
|
|
|
|
break;
|
|
|
|
case TH_INFO_WARNING:
|
|
|
|
cp = ts->info_warning;
|
|
|
|
break;
|
|
|
|
case TH_INFO_WARNING_TEXT:
|
|
|
|
cp = ts->info_warning_text;
|
|
|
|
break;
|
|
|
|
case TH_INFO_INFO:
|
|
|
|
cp = ts->info_info;
|
|
|
|
break;
|
|
|
|
case TH_INFO_INFO_TEXT:
|
|
|
|
cp = ts->info_info_text;
|
|
|
|
break;
|
|
|
|
case TH_INFO_DEBUG:
|
|
|
|
cp = ts->info_debug;
|
|
|
|
break;
|
|
|
|
case TH_INFO_DEBUG_TEXT:
|
|
|
|
cp = ts->info_debug_text;
|
|
|
|
break;
|
2015-01-28 13:03:42 +01:00
|
|
|
case TH_V3D_CLIPPING_BORDER:
|
|
|
|
cp = ts->clipping_border_3d;
|
|
|
|
break;
|
2008-01-07 18:03:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-01-01 23:26:03 +11:00
|
|
|
return (const unsigned char *)cp;
|
2008-01-07 18:03:41 +00:00
|
|
|
}
|
|
|
|
|
2011-03-29 09:28:46 +00:00
|
|
|
/* use this call to init new bone color sets in Theme */
|
|
|
|
static void ui_theme_init_boneColorSets(bTheme *btheme)
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
|
|
|
|
/* define default color sets - currently we only define 15 of these, though that should be ample */
|
2012-03-30 01:51:25 +00:00
|
|
|
/* set 1 */
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set(btheme->tarm[0].solid, 0x9a, 0x00, 0x00, 255);
|
|
|
|
rgba_char_args_set(btheme->tarm[0].select, 0xbd, 0x11, 0x11, 255);
|
|
|
|
rgba_char_args_set(btheme->tarm[0].active, 0xf7, 0x0a, 0x0a, 255);
|
2012-03-30 01:51:25 +00:00
|
|
|
/* set 2 */
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set(btheme->tarm[1].solid, 0xf7, 0x40, 0x18, 255);
|
|
|
|
rgba_char_args_set(btheme->tarm[1].select, 0xf6, 0x69, 0x13, 255);
|
|
|
|
rgba_char_args_set(btheme->tarm[1].active, 0xfa, 0x99, 0x00, 255);
|
2012-03-30 01:51:25 +00:00
|
|
|
/* set 3 */
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set(btheme->tarm[2].solid, 0x1e, 0x91, 0x09, 255);
|
|
|
|
rgba_char_args_set(btheme->tarm[2].select, 0x59, 0xb7, 0x0b, 255);
|
|
|
|
rgba_char_args_set(btheme->tarm[2].active, 0x83, 0xef, 0x1d, 255);
|
2012-03-30 01:51:25 +00:00
|
|
|
/* set 4 */
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set(btheme->tarm[3].solid, 0x0a, 0x36, 0x94, 255);
|
|
|
|
rgba_char_args_set(btheme->tarm[3].select, 0x36, 0x67, 0xdf, 255);
|
|
|
|
rgba_char_args_set(btheme->tarm[3].active, 0x5e, 0xc1, 0xef, 255);
|
2012-03-30 01:51:25 +00:00
|
|
|
/* set 5 */
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set(btheme->tarm[4].solid, 0xa9, 0x29, 0x4e, 255);
|
|
|
|
rgba_char_args_set(btheme->tarm[4].select, 0xc1, 0x41, 0x6a, 255);
|
|
|
|
rgba_char_args_set(btheme->tarm[4].active, 0xf0, 0x5d, 0x91, 255);
|
2012-03-30 01:51:25 +00:00
|
|
|
/* set 6 */
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set(btheme->tarm[5].solid, 0x43, 0x0c, 0x78, 255);
|
|
|
|
rgba_char_args_set(btheme->tarm[5].select, 0x54, 0x3a, 0xa3, 255);
|
|
|
|
rgba_char_args_set(btheme->tarm[5].active, 0x87, 0x64, 0xd5, 255);
|
2012-03-30 01:51:25 +00:00
|
|
|
/* set 7 */
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set(btheme->tarm[6].solid, 0x24, 0x78, 0x5a, 255);
|
|
|
|
rgba_char_args_set(btheme->tarm[6].select, 0x3c, 0x95, 0x79, 255);
|
|
|
|
rgba_char_args_set(btheme->tarm[6].active, 0x6f, 0xb6, 0xab, 255);
|
2012-03-30 01:51:25 +00:00
|
|
|
/* set 8 */
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set(btheme->tarm[7].solid, 0x4b, 0x70, 0x7c, 255);
|
|
|
|
rgba_char_args_set(btheme->tarm[7].select, 0x6a, 0x86, 0x91, 255);
|
|
|
|
rgba_char_args_set(btheme->tarm[7].active, 0x9b, 0xc2, 0xcd, 255);
|
2012-03-30 01:51:25 +00:00
|
|
|
/* set 9 */
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set(btheme->tarm[8].solid, 0xf4, 0xc9, 0x0c, 255);
|
|
|
|
rgba_char_args_set(btheme->tarm[8].select, 0xee, 0xc2, 0x36, 255);
|
|
|
|
rgba_char_args_set(btheme->tarm[8].active, 0xf3, 0xff, 0x00, 255);
|
2012-03-30 01:51:25 +00:00
|
|
|
/* set 10 */
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set(btheme->tarm[9].solid, 0x1e, 0x20, 0x24, 255);
|
|
|
|
rgba_char_args_set(btheme->tarm[9].select, 0x48, 0x4c, 0x56, 255);
|
|
|
|
rgba_char_args_set(btheme->tarm[9].active, 0xff, 0xff, 0xff, 255);
|
2012-03-30 01:51:25 +00:00
|
|
|
/* set 11 */
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set(btheme->tarm[10].solid, 0x6f, 0x2f, 0x6a, 255);
|
|
|
|
rgba_char_args_set(btheme->tarm[10].select, 0x98, 0x45, 0xbe, 255);
|
|
|
|
rgba_char_args_set(btheme->tarm[10].active, 0xd3, 0x30, 0xd6, 255);
|
2012-03-30 01:51:25 +00:00
|
|
|
/* set 12 */
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set(btheme->tarm[11].solid, 0x6c, 0x8e, 0x22, 255);
|
|
|
|
rgba_char_args_set(btheme->tarm[11].select, 0x7f, 0xb0, 0x22, 255);
|
|
|
|
rgba_char_args_set(btheme->tarm[11].active, 0xbb, 0xef, 0x5b, 255);
|
2012-03-30 01:51:25 +00:00
|
|
|
/* set 13 */
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set(btheme->tarm[12].solid, 0x8d, 0x8d, 0x8d, 255);
|
|
|
|
rgba_char_args_set(btheme->tarm[12].select, 0xb0, 0xb0, 0xb0, 255);
|
|
|
|
rgba_char_args_set(btheme->tarm[12].active, 0xde, 0xde, 0xde, 255);
|
2012-03-30 01:51:25 +00:00
|
|
|
/* set 14 */
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set(btheme->tarm[13].solid, 0x83, 0x43, 0x26, 255);
|
|
|
|
rgba_char_args_set(btheme->tarm[13].select, 0x8b, 0x58, 0x11, 255);
|
|
|
|
rgba_char_args_set(btheme->tarm[13].active, 0xbd, 0x6a, 0x11, 255);
|
2012-03-30 01:51:25 +00:00
|
|
|
/* set 15 */
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set(btheme->tarm[14].solid, 0x08, 0x31, 0x0e, 255);
|
|
|
|
rgba_char_args_set(btheme->tarm[14].select, 0x1c, 0x43, 0x0b, 255);
|
|
|
|
rgba_char_args_set(btheme->tarm[14].active, 0x34, 0x62, 0x2b, 255);
|
2011-03-29 09:28:46 +00:00
|
|
|
|
|
|
|
/* reset flags too */
|
|
|
|
for (i = 0; i < 20; i++)
|
|
|
|
btheme->tarm[i].flag = 0;
|
|
|
|
}
|
|
|
|
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
/* use this call to init new variables in themespace, if they're same for all */
|
|
|
|
static void ui_theme_init_new_do(ThemeSpace *ts)
|
|
|
|
{
|
2014-01-23 11:44:35 +11:00
|
|
|
rgba_char_args_set(ts->header_text, 0, 0, 0, 255);
|
|
|
|
rgba_char_args_set(ts->header_title, 0, 0, 0, 255);
|
|
|
|
rgba_char_args_set(ts->header_text_hi, 255, 255, 255, 255);
|
|
|
|
|
|
|
|
#if 0
|
|
|
|
rgba_char_args_set(ts->panel_text, 0, 0, 0, 255);
|
|
|
|
rgba_char_args_set(ts->panel_title, 0, 0, 0, 255);
|
|
|
|
rgba_char_args_set(ts->panel_text_hi, 255, 255, 255, 255);
|
|
|
|
#endif
|
|
|
|
|
2016-05-03 18:26:58 +02:00
|
|
|
ts->panelcolors.show_back = false;
|
|
|
|
ts->panelcolors.show_header = false;
|
|
|
|
rgba_char_args_set(ts->panelcolors.back, 114, 114, 114, 128);
|
|
|
|
rgba_char_args_set(ts->panelcolors.header, 0, 0, 0, 25);
|
|
|
|
|
2014-01-23 11:44:35 +11:00
|
|
|
rgba_char_args_set(ts->button, 145, 145, 145, 245);
|
|
|
|
rgba_char_args_set(ts->button_title, 0, 0, 0, 255);
|
2016-05-03 18:26:58 +02:00
|
|
|
rgba_char_args_set(ts->button_text, 0, 0, 0, 255);
|
2014-01-23 11:44:35 +11:00
|
|
|
rgba_char_args_set(ts->button_text_hi, 255, 255, 255, 255);
|
|
|
|
|
|
|
|
rgba_char_args_set(ts->list, 165, 165, 165, 255);
|
|
|
|
rgba_char_args_set(ts->list_title, 0, 0, 0, 255);
|
|
|
|
rgba_char_args_set(ts->list_text, 0, 0, 0, 255);
|
|
|
|
rgba_char_args_set(ts->list_text_hi, 255, 255, 255, 255);
|
|
|
|
|
|
|
|
rgba_char_args_set(ts->tab_active, 114, 114, 114, 255);
|
2014-02-19 08:11:54 +11:00
|
|
|
rgba_char_args_set(ts->tab_inactive, 83, 83, 83, 255);
|
|
|
|
rgba_char_args_set(ts->tab_back, 64, 64, 64, 255);
|
2014-01-23 11:44:35 +11:00
|
|
|
rgba_char_args_set(ts->tab_outline, 60, 60, 60, 255);
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void ui_theme_init_new(bTheme *btheme)
|
|
|
|
{
|
2014-01-17 03:50:41 +11:00
|
|
|
ThemeSpace *ts;
|
|
|
|
|
|
|
|
for (ts = UI_THEMESPACE_START(btheme); ts != UI_THEMESPACE_END(btheme); ts++) {
|
|
|
|
ui_theme_init_new_do(ts);
|
|
|
|
}
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
}
|
|
|
|
|
2013-10-30 10:38:45 +01:00
|
|
|
static void ui_theme_space_init_handles_color(ThemeSpace *theme_space)
|
|
|
|
{
|
|
|
|
rgba_char_args_set(theme_space->handle_free, 0, 0, 0, 255);
|
|
|
|
rgba_char_args_set(theme_space->handle_auto, 0x90, 0x90, 0x00, 255);
|
|
|
|
rgba_char_args_set(theme_space->handle_vect, 0x40, 0x90, 0x30, 255);
|
|
|
|
rgba_char_args_set(theme_space->handle_align, 0x80, 0x30, 0x60, 255);
|
|
|
|
rgba_char_args_set(theme_space->handle_sel_free, 0, 0, 0, 255);
|
|
|
|
rgba_char_args_set(theme_space->handle_sel_auto, 0xf0, 0xff, 0x40, 255);
|
|
|
|
rgba_char_args_set(theme_space->handle_sel_vect, 0x40, 0xc0, 0x30, 255);
|
|
|
|
rgba_char_args_set(theme_space->handle_sel_align, 0xf0, 0x90, 0xa0, 255);
|
2014-08-07 14:35:04 +02:00
|
|
|
rgba_char_args_set(theme_space->handle_vertex, 0x00, 0x00, 0x00, 0xff);
|
|
|
|
rgba_char_args_set(theme_space->handle_vertex_select, 0xff, 0xff, 0, 0xff);
|
2013-10-30 10:38:45 +01:00
|
|
|
rgba_char_args_set(theme_space->act_spline, 0xdb, 0x25, 0x12, 255);
|
|
|
|
}
|
2008-01-07 18:03:41 +00:00
|
|
|
|
2015-05-31 14:20:03 +10:00
|
|
|
/**
|
|
|
|
* initialize default theme
|
|
|
|
* \note: when you add new colors, created & saved themes need initialized
|
2012-02-11 12:16:34 +00:00
|
|
|
* use function below, init_userdef_do_versions()
|
|
|
|
*/
|
2010-03-30 04:27:13 +00:00
|
|
|
void ui_theme_init_default(void)
|
2008-01-07 18:03:41 +00:00
|
|
|
{
|
2011-01-12 03:41:12 +00:00
|
|
|
bTheme *btheme;
|
2008-01-07 18:03:41 +00:00
|
|
|
|
|
|
|
/* we search for the theme with name Default */
|
2012-08-18 16:16:13 +00:00
|
|
|
btheme = BLI_findstring(&U.themes, "Default", offsetof(bTheme, name));
|
2008-01-07 18:03:41 +00:00
|
|
|
|
2012-03-30 01:51:25 +00:00
|
|
|
if (btheme == NULL) {
|
|
|
|
btheme = MEM_callocN(sizeof(bTheme), "theme");
|
2008-01-07 18:03:41 +00:00
|
|
|
BLI_addtail(&U.themes, btheme);
|
|
|
|
strcpy(btheme->name, "Default");
|
|
|
|
}
|
|
|
|
|
2012-10-20 20:20:02 +00:00
|
|
|
UI_SetTheme(0, 0); /* make sure the global used in this file is set */
|
2008-01-07 18:03:41 +00:00
|
|
|
|
2009-03-14 03:24:23 +00:00
|
|
|
/* UI buttons */
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
ui_widget_color_init(&btheme->tui);
|
2016-05-03 18:26:58 +02:00
|
|
|
|
2012-03-30 01:51:25 +00:00
|
|
|
btheme->tui.iconfile[0] = 0;
|
2014-10-30 01:50:48 +01:00
|
|
|
rgba_char_args_set(btheme->tui.wcol_tooltip.text, 255, 255, 255, 255);
|
2014-12-08 00:38:36 +01:00
|
|
|
rgba_char_args_set_fl(btheme->tui.widget_emboss, 1.0f, 1.0f, 1.0f, 0.02f);
|
2014-10-27 18:11:55 +01:00
|
|
|
|
Axis Colours are now Themeable
This commit allows you to set the RGB <-> XYZ axis colours used for things like
the mini axis indicator, grid axis indicators, manipulators, transform
constraint indicators, F-Curves (when using XYZ to RGB colouring option), and
perhaps something else I've missed. Previously, these places all used hardcoded
defines (220 * i/j/k), but the readability of these colours was often quite
poor, especially when used with certain themes.
The settings for these colours can be found under the "User Interface" section
of the themes (i.e. same set of colours is used across editors). I could have
made these per editor, but since it's unlikely that these will need to be too
different across editors in practice (+ being easier to version patch), they are
stored under the UI section.
2012-11-09 06:36:11 +00:00
|
|
|
rgba_char_args_set(btheme->tui.xaxis, 220, 0, 0, 255);
|
|
|
|
rgba_char_args_set(btheme->tui.yaxis, 0, 220, 0, 255);
|
|
|
|
rgba_char_args_set(btheme->tui.zaxis, 0, 0, 220, 255);
|
2012-02-11 12:16:34 +00:00
|
|
|
|
2012-12-20 16:50:39 +00:00
|
|
|
btheme->tui.menu_shadow_fac = 0.5f;
|
|
|
|
btheme->tui.menu_shadow_width = 12;
|
|
|
|
|
2011-03-29 09:28:46 +00:00
|
|
|
/* Bone Color Sets */
|
|
|
|
ui_theme_init_boneColorSets(btheme);
|
|
|
|
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
/* common (new) variables */
|
|
|
|
ui_theme_init_new(btheme);
|
|
|
|
|
2009-01-04 00:05:40 +00:00
|
|
|
/* space view3d */
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set_fl(btheme->tv3d.back, 0.225, 0.225, 0.225, 1.0);
|
|
|
|
rgba_char_args_set(btheme->tv3d.text, 0, 0, 0, 255);
|
|
|
|
rgba_char_args_set(btheme->tv3d.text_hi, 255, 255, 255, 255);
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
|
2012-03-30 01:51:25 +00:00
|
|
|
rgba_char_args_set_fl(btheme->tv3d.header, 0.45, 0.45, 0.45, 1.0);
|
2012-12-14 23:20:11 +00:00
|
|
|
rgba_char_args_set_fl(btheme->tv3d.button, 0.45, 0.45, 0.45, 0.5);
|
2012-12-15 16:22:18 +00:00
|
|
|
// rgba_char_args_set(btheme->tv3d.panel, 165, 165, 165, 127);
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set(btheme->tv3d.shade1, 160, 160, 160, 100);
|
|
|
|
rgba_char_args_set(btheme->tv3d.shade2, 0x7f, 0x70, 0x70, 100);
|
|
|
|
|
|
|
|
rgba_char_args_set_fl(btheme->tv3d.grid, 0.251, 0.251, 0.251, 1.0);
|
2014-03-18 05:34:43 +11:00
|
|
|
rgba_char_args_set(btheme->tv3d.view_overlay, 0, 0, 0, 255);
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set(btheme->tv3d.wire, 0x0, 0x0, 0x0, 255);
|
2013-06-08 21:58:00 +00:00
|
|
|
rgba_char_args_set(btheme->tv3d.wire_edit, 0x0, 0x0, 0x0, 255);
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set(btheme->tv3d.lamp, 0, 0, 0, 40);
|
|
|
|
rgba_char_args_set(btheme->tv3d.speaker, 0, 0, 0, 255);
|
2012-03-23 16:14:25 +00:00
|
|
|
rgba_char_args_set(btheme->tv3d.camera, 0, 0, 0, 255);
|
|
|
|
rgba_char_args_set(btheme->tv3d.empty, 0, 0, 0, 255);
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set(btheme->tv3d.select, 241, 88, 0, 255);
|
|
|
|
rgba_char_args_set(btheme->tv3d.active, 255, 170, 64, 255);
|
|
|
|
rgba_char_args_set(btheme->tv3d.group, 8, 48, 8, 255);
|
|
|
|
rgba_char_args_set(btheme->tv3d.group_active, 85, 187, 85, 255);
|
|
|
|
rgba_char_args_set(btheme->tv3d.transform, 0xff, 0xff, 0xff, 255);
|
|
|
|
rgba_char_args_set(btheme->tv3d.vertex, 0, 0, 0, 255);
|
|
|
|
rgba_char_args_set(btheme->tv3d.vertex_select, 255, 133, 0, 255);
|
2016-09-21 23:04:26 +02:00
|
|
|
rgba_char_args_set(btheme->tv3d.vertex_bevel, 0, 165, 255, 255);
|
2013-03-05 20:30:38 +00:00
|
|
|
rgba_char_args_set(btheme->tv3d.vertex_unreferenced, 0, 0, 0, 255);
|
2012-03-30 01:51:25 +00:00
|
|
|
btheme->tv3d.vertex_size = 3;
|
|
|
|
btheme->tv3d.outline_width = 1;
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set(btheme->tv3d.edge, 0x0, 0x0, 0x0, 255);
|
|
|
|
rgba_char_args_set(btheme->tv3d.edge_select, 255, 160, 0, 255);
|
|
|
|
rgba_char_args_set(btheme->tv3d.edge_seam, 219, 37, 18, 255);
|
2016-09-21 23:04:26 +02:00
|
|
|
rgba_char_args_set(btheme->tv3d.edge_bevel, 0, 165, 255, 255);
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set(btheme->tv3d.edge_facesel, 75, 75, 75, 255);
|
|
|
|
rgba_char_args_set(btheme->tv3d.face, 0, 0, 0, 18);
|
|
|
|
rgba_char_args_set(btheme->tv3d.face_select, 255, 133, 0, 60);
|
|
|
|
rgba_char_args_set(btheme->tv3d.normal, 0x22, 0xDD, 0xDD, 255);
|
|
|
|
rgba_char_args_set(btheme->tv3d.vertex_normal, 0x23, 0x61, 0xDD, 255);
|
2014-08-25 12:45:49 +02:00
|
|
|
rgba_char_args_set(btheme->tv3d.loop_normal, 0xDD, 0x23, 0xDD, 255);
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set(btheme->tv3d.face_dot, 255, 133, 0, 255);
|
|
|
|
rgba_char_args_set(btheme->tv3d.editmesh_active, 255, 255, 255, 128);
|
|
|
|
rgba_char_args_set_fl(btheme->tv3d.edge_crease, 0.8, 0, 0.6, 1.0);
|
|
|
|
rgba_char_args_set(btheme->tv3d.edge_sharp, 0, 255, 255, 255);
|
|
|
|
rgba_char_args_set(btheme->tv3d.header_text, 0, 0, 0, 255);
|
|
|
|
rgba_char_args_set(btheme->tv3d.header_text_hi, 255, 255, 255, 255);
|
|
|
|
rgba_char_args_set(btheme->tv3d.button_text, 0, 0, 0, 255);
|
|
|
|
rgba_char_args_set(btheme->tv3d.button_text_hi, 255, 255, 255, 255);
|
|
|
|
rgba_char_args_set(btheme->tv3d.button_title, 0, 0, 0, 255);
|
|
|
|
rgba_char_args_set(btheme->tv3d.title, 0, 0, 0, 255);
|
2012-03-25 08:20:19 +00:00
|
|
|
rgba_char_args_set(btheme->tv3d.freestyle_edge_mark, 0x7f, 0xff, 0x7f, 255);
|
|
|
|
rgba_char_args_set(btheme->tv3d.freestyle_face_mark, 0x7f, 0xff, 0x7f, 51);
|
2014-07-21 12:02:05 +02:00
|
|
|
rgba_char_args_set_fl(btheme->tv3d.paint_curve_handle, 0.5f, 1.0f, 0.5f, 0.5f);
|
|
|
|
rgba_char_args_set_fl(btheme->tv3d.paint_curve_pivot, 1.0f, 0.5f, 0.5f, 0.5f);
|
2015-01-03 18:07:05 +13:00
|
|
|
rgba_char_args_set(btheme->tv3d.gp_vertex, 0, 0, 0, 255);
|
|
|
|
rgba_char_args_set(btheme->tv3d.gp_vertex_select, 255, 133, 0, 255);
|
|
|
|
btheme->tv3d.gp_vertex_size = 3;
|
2011-04-01 15:08:45 +00:00
|
|
|
|
2012-03-30 01:51:25 +00:00
|
|
|
btheme->tv3d.facedot_size = 4;
|
2010-12-20 03:59:22 +00:00
|
|
|
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set(btheme->tv3d.extra_edge_len, 32, 0, 0, 255);
|
2013-03-29 04:01:52 +00:00
|
|
|
rgba_char_args_set(btheme->tv3d.extra_edge_angle, 32, 32, 0, 255);
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set(btheme->tv3d.extra_face_area, 0, 32, 0, 255);
|
|
|
|
rgba_char_args_set(btheme->tv3d.extra_face_angle, 0, 0, 128, 255);
|
2010-12-20 03:59:22 +00:00
|
|
|
|
2012-03-30 01:51:25 +00:00
|
|
|
rgba_char_args_set(btheme->tv3d.cframe, 0x60, 0xc0, 0x40, 255);
|
2008-12-23 02:03:08 +00:00
|
|
|
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set(btheme->tv3d.nurb_uline, 0x90, 0x90, 0x00, 255);
|
|
|
|
rgba_char_args_set(btheme->tv3d.nurb_vline, 0x80, 0x30, 0x60, 255);
|
|
|
|
rgba_char_args_set(btheme->tv3d.nurb_sel_uline, 0xf0, 0xff, 0x40, 255);
|
|
|
|
rgba_char_args_set(btheme->tv3d.nurb_sel_vline, 0xf0, 0x90, 0xa0, 255);
|
2010-03-12 16:43:04 +00:00
|
|
|
|
2013-10-30 10:38:45 +01:00
|
|
|
ui_theme_space_init_handles_color(&btheme->tv3d);
|
2010-03-12 16:43:04 +00:00
|
|
|
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set(btheme->tv3d.act_spline, 0xdb, 0x25, 0x12, 255);
|
|
|
|
rgba_char_args_set(btheme->tv3d.lastsel_point, 0xff, 0xff, 0xff, 255);
|
2010-03-12 16:43:04 +00:00
|
|
|
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set(btheme->tv3d.bone_solid, 200, 200, 200, 255);
|
2012-06-17 09:58:26 +00:00
|
|
|
/* alpha 80 is not meant editable, used for wire+action draw */
|
|
|
|
rgba_char_args_set(btheme->tv3d.bone_pose, 80, 200, 255, 80);
|
2012-07-26 10:53:59 +00:00
|
|
|
rgba_char_args_set(btheme->tv3d.bone_pose_active, 140, 255, 255, 80);
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set(btheme->tv3d.bundle_solid, 200, 200, 200, 255);
|
|
|
|
rgba_char_args_set(btheme->tv3d.camera_path, 0x00, 0x00, 0x00, 255);
|
2012-05-22 15:29:15 +00:00
|
|
|
|
|
|
|
rgba_char_args_set(btheme->tv3d.skin_root, 180, 77, 77, 255);
|
2013-01-06 19:26:30 +00:00
|
|
|
rgba_char_args_set(btheme->tv3d.gradients.gradient, 0, 0, 0, 0);
|
2013-01-11 03:19:52 +00:00
|
|
|
rgba_char_args_set(btheme->tv3d.gradients.high_gradient, 58, 58, 58, 255);
|
2014-01-04 17:16:19 +11:00
|
|
|
btheme->tv3d.gradients.show_grad = false;
|
2013-01-06 19:26:30 +00:00
|
|
|
|
2015-01-28 13:03:42 +01:00
|
|
|
rgba_char_args_set(btheme->tv3d.clipping_border_3d, 50, 50, 50, 255);
|
2016-10-16 20:30:51 +02:00
|
|
|
|
|
|
|
rgba_char_args_set(btheme->tv3d.time_keyframe, 0xDD, 0xD7, 0x00, 0xFF);
|
|
|
|
rgba_char_args_set(btheme->tv3d.time_gp_keyframe, 0xB5, 0xE6, 0x1D, 0xFF);
|
|
|
|
|
2008-01-07 18:03:41 +00:00
|
|
|
/* space buttons */
|
|
|
|
/* to have something initialized */
|
2012-03-30 01:51:25 +00:00
|
|
|
btheme->tbuts = btheme->tv3d;
|
2008-01-07 18:03:41 +00:00
|
|
|
|
2012-03-30 01:51:25 +00:00
|
|
|
rgba_char_args_set_fl(btheme->tbuts.back, 0.45, 0.45, 0.45, 1.0);
|
2012-12-15 16:22:18 +00:00
|
|
|
// rgba_char_args_set(btheme->tbuts.panel, 0x82, 0x82, 0x82, 255);
|
2008-01-07 18:03:41 +00:00
|
|
|
|
2009-04-29 04:43:17 +00:00
|
|
|
/* graph editor */
|
2012-03-30 01:51:25 +00:00
|
|
|
btheme->tipo = btheme->tv3d;
|
|
|
|
rgba_char_args_set_fl(btheme->tipo.back, 0.42, 0.42, 0.42, 1.0);
|
|
|
|
rgba_char_args_set_fl(btheme->tipo.list, 0.4, 0.4, 0.4, 1.0);
|
|
|
|
rgba_char_args_set(btheme->tipo.grid, 94, 94, 94, 255);
|
2012-12-15 16:22:18 +00:00
|
|
|
// rgba_char_args_set(btheme->tipo.panel, 255, 255, 255, 150);
|
2012-03-30 01:51:25 +00:00
|
|
|
rgba_char_args_set(btheme->tipo.shade1, 150, 150, 150, 100); /* scrollbars */
|
|
|
|
rgba_char_args_set(btheme->tipo.shade2, 0x70, 0x70, 0x70, 100);
|
|
|
|
rgba_char_args_set(btheme->tipo.vertex, 0, 0, 0, 255);
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set(btheme->tipo.vertex_select, 255, 133, 0, 255);
|
|
|
|
rgba_char_args_set(btheme->tipo.hilite, 0x60, 0xc0, 0x40, 255);
|
2014-01-17 15:26:26 +13:00
|
|
|
btheme->tipo.vertex_size = 6;
|
2008-01-07 18:03:41 +00:00
|
|
|
|
2012-03-30 01:51:25 +00:00
|
|
|
rgba_char_args_set(btheme->tipo.handle_vertex, 0, 0, 0, 255);
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set(btheme->tipo.handle_vertex_select, 255, 133, 0, 255);
|
|
|
|
rgba_char_args_set(btheme->tipo.handle_auto_clamped, 0x99, 0x40, 0x30, 255);
|
|
|
|
rgba_char_args_set(btheme->tipo.handle_sel_auto_clamped, 0xf0, 0xaf, 0x90, 255);
|
2014-01-17 15:26:26 +13:00
|
|
|
btheme->tipo.handle_vertex_size = 5;
|
Animato/2.5 - Graph Editor (i.e. the new 'IPO Editor')
This commit brings back the drawing code for the 'Graph Editor'. I've decided to call it this, as currently it can show either F-Curves for Animation stored in Actions, or F-Curves for Drivers.
Currently, it shows all curves, since some of the necessary filtering code (i.e. for limiting curve visibility) hasn't been put in place yet. At least this serves as good proof that we can have F-Curves from multiple sources at least.
It should be noted that the code still has to be modified to work with some of the new Animato features, such as F-Curve Modifiers (cycles are an example of one of the features that use this). Also, a nicer way to set the colours of the curves needs to be investigated.
Notes:
* Fixed a few bugs in RNA User-Preferences wrapping
* The keyframe drawing uses the new-style drawing for handles from AnimSys2. There's a minor bug that sometimes occurs, where a distorted handle gets drawn at the origin of the grid on the first run. Hints anyone?
* Removed most of the old data from SpaceIpo struct, as the new code uses that. Maybe later, the directories/files at least should get renamed.
* Removed ancient hack for NVidia/TNT drivers. It is probably no longer needed, but could be restored if someone needs it.
2009-01-26 11:33:16 +00:00
|
|
|
|
2012-06-04 01:17:37 +00:00
|
|
|
rgba_char_args_set(btheme->tipo.ds_channel, 82, 96, 110, 255);
|
2012-03-30 01:51:25 +00:00
|
|
|
rgba_char_args_set(btheme->tipo.ds_subchannel, 124, 137, 150, 255);
|
2012-06-04 01:17:37 +00:00
|
|
|
rgba_char_args_set(btheme->tipo.group, 79, 101, 73, 255);
|
|
|
|
rgba_char_args_set(btheme->tipo.group_active, 135, 177, 125, 255);
|
2008-12-22 08:13:25 +00:00
|
|
|
|
2009-04-29 04:43:17 +00:00
|
|
|
/* dopesheet */
|
2012-03-30 01:51:25 +00:00
|
|
|
btheme->tact = btheme->tipo;
|
|
|
|
rgba_char_args_set(btheme->tact.strip, 12, 10, 10, 128);
|
|
|
|
rgba_char_args_set(btheme->tact.strip_select, 255, 140, 0, 255);
|
2009-05-29 12:26:47 +00:00
|
|
|
|
2012-06-04 01:17:37 +00:00
|
|
|
rgba_char_args_set(btheme->tact.anim_active, 204, 112, 26, 102);
|
|
|
|
|
2014-01-07 22:45:40 +13:00
|
|
|
rgba_char_args_set(btheme->tact.keytype_keyframe, 232, 232, 232, 255);
|
|
|
|
rgba_char_args_set(btheme->tact.keytype_keyframe_select, 255, 190, 50, 255);
|
2014-01-16 23:56:40 +13:00
|
|
|
rgba_char_args_set(btheme->tact.keytype_extreme, 232, 179, 204, 255);
|
|
|
|
rgba_char_args_set(btheme->tact.keytype_extreme_select, 242, 128, 128, 255);
|
|
|
|
rgba_char_args_set(btheme->tact.keytype_breakdown, 179, 219, 232, 255);
|
2014-01-07 22:45:40 +13:00
|
|
|
rgba_char_args_set(btheme->tact.keytype_breakdown_select, 84, 191, 237, 255);
|
|
|
|
rgba_char_args_set(btheme->tact.keytype_jitter, 148, 229, 117, 255);
|
2014-01-16 23:56:40 +13:00
|
|
|
rgba_char_args_set(btheme->tact.keytype_jitter_select, 97, 192, 66, 255);
|
2014-01-07 22:45:40 +13:00
|
|
|
|
2014-04-20 22:05:05 +10:00
|
|
|
rgba_char_args_set(btheme->tact.keyborder, 0, 0, 0, 255);
|
2014-01-07 22:45:40 +13:00
|
|
|
rgba_char_args_set(btheme->tact.keyborder_select, 0, 0, 0, 255);
|
|
|
|
|
2016-07-03 03:42:28 +12:00
|
|
|
btheme->tact.keyframe_scale_fac = 1.0f;
|
|
|
|
|
2009-05-29 12:26:47 +00:00
|
|
|
/* space nla */
|
2012-03-30 01:51:25 +00:00
|
|
|
btheme->tnla = btheme->tact;
|
2009-05-29 12:26:47 +00:00
|
|
|
|
2012-06-05 21:54:21 +00:00
|
|
|
rgba_char_args_set(btheme->tnla.anim_active, 204, 112, 26, 102); /* same as for dopesheet; duplicate here for easier reference */
|
|
|
|
rgba_char_args_set(btheme->tnla.anim_non_active, 153, 135, 97, 77);
|
2012-06-04 01:17:37 +00:00
|
|
|
|
|
|
|
rgba_char_args_set(btheme->tnla.nla_tweaking, 77, 243, 26, 77);
|
|
|
|
rgba_char_args_set(btheme->tnla.nla_tweakdupli, 217, 0, 0, 255);
|
|
|
|
|
|
|
|
rgba_char_args_set(btheme->tnla.nla_transition, 28, 38, 48, 255);
|
|
|
|
rgba_char_args_set(btheme->tnla.nla_transition_sel, 46, 117, 219, 255);
|
|
|
|
rgba_char_args_set(btheme->tnla.nla_meta, 51, 38, 66, 255);
|
|
|
|
rgba_char_args_set(btheme->tnla.nla_meta_sel, 105, 33, 150, 255);
|
|
|
|
rgba_char_args_set(btheme->tnla.nla_sound, 43, 61, 61, 255);
|
|
|
|
rgba_char_args_set(btheme->tnla.nla_sound_sel, 31, 122, 122, 255);
|
|
|
|
|
2014-04-20 22:05:05 +10:00
|
|
|
rgba_char_args_set(btheme->tnla.keyborder, 0, 0, 0, 255);
|
2014-01-16 23:56:40 +13:00
|
|
|
rgba_char_args_set(btheme->tnla.keyborder_select, 0, 0, 0, 255);
|
|
|
|
|
2008-01-07 18:03:41 +00:00
|
|
|
/* space file */
|
|
|
|
/* to have something initialized */
|
2012-03-30 01:51:25 +00:00
|
|
|
btheme->tfile = btheme->tv3d;
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set_fl(btheme->tfile.back, 0.3, 0.3, 0.3, 1);
|
2012-12-15 16:22:18 +00:00
|
|
|
// rgba_char_args_set_fl(btheme->tfile.panel, 0.3, 0.3, 0.3, 1);
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set_fl(btheme->tfile.list, 0.4, 0.4, 0.4, 1);
|
2012-03-30 01:51:25 +00:00
|
|
|
rgba_char_args_set(btheme->tfile.text, 250, 250, 250, 255);
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set(btheme->tfile.text_hi, 15, 15, 15, 255);
|
2012-12-15 16:22:18 +00:00
|
|
|
// rgba_char_args_set(btheme->tfile.panel, 145, 145, 145, 255); /* bookmark/ui regions */
|
2012-10-20 20:20:02 +00:00
|
|
|
rgba_char_args_set(btheme->tfile.hilite, 255, 140, 25, 255); /* selected files */
|
2016-10-03 13:26:52 +02:00
|
|
|
|
2012-03-30 01:51:25 +00:00
|
|
|
rgba_char_args_set(btheme->tfile.image, 250, 250, 250, 255);
|
|
|
|
rgba_char_args_set(btheme->tfile.movie, 250, 250, 250, 255);
|
|
|
|
rgba_char_args_set(btheme->tfile.scene, 250, 250, 250, 255);
|
2008-01-07 18:03:41 +00:00
|
|
|
|
|
|
|
|
|
|
|
/* space seq */
|
2012-03-30 01:51:25 +00:00
|
|
|
btheme->tseq = btheme->tv3d;
|
|
|
|
rgba_char_args_set(btheme->tseq.back, 116, 116, 116, 255);
|
|
|
|
rgba_char_args_set(btheme->tseq.movie, 81, 105, 135, 255);
|
2012-03-21 18:02:29 +00:00
|
|
|
rgba_char_args_set(btheme->tseq.movieclip, 32, 32, 143, 255);
|
2012-06-07 18:24:36 +00:00
|
|
|
rgba_char_args_set(btheme->tseq.mask, 152, 78, 62, 255);
|
2012-03-30 01:51:25 +00:00
|
|
|
rgba_char_args_set(btheme->tseq.image, 109, 88, 129, 255);
|
|
|
|
rgba_char_args_set(btheme->tseq.scene, 78, 152, 62, 255);
|
|
|
|
rgba_char_args_set(btheme->tseq.audio, 46, 143, 143, 255);
|
|
|
|
rgba_char_args_set(btheme->tseq.effect, 169, 84, 124, 255);
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set(btheme->tseq.transition, 162, 95, 111, 255);
|
2012-03-30 01:51:25 +00:00
|
|
|
rgba_char_args_set(btheme->tseq.meta, 109, 145, 131, 255);
|
2015-12-01 23:56:48 +01:00
|
|
|
rgba_char_args_set(btheme->tseq.text_strip, 162, 151, 0, 255);
|
2012-03-30 01:51:25 +00:00
|
|
|
rgba_char_args_set(btheme->tseq.preview_back, 0, 0, 0, 255);
|
2013-06-27 15:40:32 +00:00
|
|
|
rgba_char_args_set(btheme->tseq.grid, 64, 64, 64, 255);
|
2008-01-07 18:03:41 +00:00
|
|
|
|
|
|
|
/* space image */
|
2012-03-30 01:51:25 +00:00
|
|
|
btheme->tima = btheme->tv3d;
|
|
|
|
rgba_char_args_set(btheme->tima.back, 53, 53, 53, 255);
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set(btheme->tima.vertex, 0, 0, 0, 255);
|
|
|
|
rgba_char_args_set(btheme->tima.vertex_select, 255, 133, 0, 255);
|
2013-12-08 01:36:31 +02:00
|
|
|
rgba_char_args_set(btheme->tima.wire_edit, 192, 192, 192, 255);
|
|
|
|
rgba_char_args_set(btheme->tima.edge_select, 255, 133, 0, 255);
|
2012-03-30 01:51:25 +00:00
|
|
|
btheme->tima.vertex_size = 3;
|
|
|
|
btheme->tima.facedot_size = 3;
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set(btheme->tima.face, 255, 255, 255, 10);
|
|
|
|
rgba_char_args_set(btheme->tima.face_select, 255, 133, 0, 60);
|
|
|
|
rgba_char_args_set(btheme->tima.editmesh_active, 255, 255, 255, 128);
|
2015-09-23 15:59:47 +02:00
|
|
|
rgba_char_args_set_fl(btheme->tima.preview_back, 0.0, 0.0, 0.0, 0.3);
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set_fl(btheme->tima.preview_stitch_face, 0.5, 0.5, 0.0, 0.2);
|
|
|
|
rgba_char_args_set_fl(btheme->tima.preview_stitch_edge, 1.0, 0.0, 1.0, 0.2);
|
|
|
|
rgba_char_args_set_fl(btheme->tima.preview_stitch_vert, 0.0, 0.0, 1.0, 0.2);
|
|
|
|
rgba_char_args_set_fl(btheme->tima.preview_stitch_stitchable, 0.0, 1.0, 0.0, 1.0);
|
|
|
|
rgba_char_args_set_fl(btheme->tima.preview_stitch_unstitchable, 1.0, 0.0, 0.0, 1.0);
|
2012-12-29 01:54:58 +00:00
|
|
|
rgba_char_args_set_fl(btheme->tima.preview_stitch_active, 0.886, 0.824, 0.765, 0.140);
|
|
|
|
|
2013-09-05 15:09:10 +00:00
|
|
|
rgba_char_args_test_set(btheme->tima.uv_others, 96, 96, 96, 255);
|
|
|
|
rgba_char_args_test_set(btheme->tima.uv_shadow, 112, 112, 112, 255);
|
|
|
|
|
2013-10-30 10:38:45 +01:00
|
|
|
ui_theme_space_init_handles_color(&btheme->tima);
|
|
|
|
btheme->tima.handle_vertex_size = 5;
|
|
|
|
|
2008-01-07 18:03:41 +00:00
|
|
|
/* space text */
|
2012-03-30 01:51:25 +00:00
|
|
|
btheme->text = btheme->tv3d;
|
|
|
|
rgba_char_args_set(btheme->text.back, 153, 153, 153, 255);
|
|
|
|
rgba_char_args_set(btheme->text.shade1, 143, 143, 143, 255);
|
|
|
|
rgba_char_args_set(btheme->text.shade2, 0xc6, 0x77, 0x77, 255);
|
|
|
|
rgba_char_args_set(btheme->text.hilite, 255, 0, 0, 255);
|
2008-01-07 18:03:41 +00:00
|
|
|
|
|
|
|
/* syntax highlighting */
|
2012-03-30 01:51:25 +00:00
|
|
|
rgba_char_args_set(btheme->text.syntaxn, 0, 0, 200, 255); /* Numbers Blue*/
|
2012-12-29 18:25:03 +00:00
|
|
|
rgba_char_args_set(btheme->text.syntaxl, 100, 0, 0, 255); /* Strings Red */
|
|
|
|
rgba_char_args_set(btheme->text.syntaxc, 0, 100, 50, 255); /* Comments Greenish */
|
|
|
|
rgba_char_args_set(btheme->text.syntaxv, 95, 95, 0, 255); /* Special Yellow*/
|
|
|
|
rgba_char_args_set(btheme->text.syntaxd, 50, 0, 140, 255); /* Decorator/Preprocessor Dir. Blue-purple */
|
|
|
|
rgba_char_args_set(btheme->text.syntaxr, 140, 60, 0, 255); /* Reserved Orange*/
|
|
|
|
rgba_char_args_set(btheme->text.syntaxb, 128, 0, 80, 255); /* Builtin Red-purple */
|
2015-03-19 14:14:48 +11:00
|
|
|
rgba_char_args_set(btheme->text.syntaxs, 76, 76, 76, 255); /* Gray (mix between fg/bg) */
|
2008-01-07 18:03:41 +00:00
|
|
|
|
|
|
|
/* space oops */
|
2012-03-30 01:51:25 +00:00
|
|
|
btheme->toops = btheme->tv3d;
|
|
|
|
rgba_char_args_set_fl(btheme->toops.back, 0.45, 0.45, 0.45, 1.0);
|
2009-04-29 04:43:17 +00:00
|
|
|
|
2012-03-30 01:51:25 +00:00
|
|
|
rgba_char_args_set_fl(btheme->toops.match, 0.2, 0.5, 0.2, 0.3); /* highlighting search match - soft green*/
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set_fl(btheme->toops.selected_highlight, 0.51, 0.53, 0.55, 0.3);
|
2012-01-22 06:10:21 +00:00
|
|
|
|
2008-01-07 18:03:41 +00:00
|
|
|
/* space info */
|
2012-03-30 01:51:25 +00:00
|
|
|
btheme->tinfo = btheme->tv3d;
|
|
|
|
rgba_char_args_set_fl(btheme->tinfo.back, 0.45, 0.45, 0.45, 1.0);
|
2013-12-18 05:02:42 +11:00
|
|
|
rgba_char_args_set(btheme->tinfo.info_selected, 96, 128, 255, 255);
|
|
|
|
rgba_char_args_set(btheme->tinfo.info_selected_text, 255, 255, 255, 255);
|
|
|
|
rgba_char_args_set(btheme->tinfo.info_error, 220, 0, 0, 255);
|
|
|
|
rgba_char_args_set(btheme->tinfo.info_error_text, 0, 0, 0, 255);
|
|
|
|
rgba_char_args_set(btheme->tinfo.info_warning, 220, 128, 96, 255);
|
|
|
|
rgba_char_args_set(btheme->tinfo.info_warning_text, 0, 0, 0, 255);
|
|
|
|
rgba_char_args_set(btheme->tinfo.info_info, 0, 170, 0, 255);
|
|
|
|
rgba_char_args_set(btheme->tinfo.info_info_text, 0, 0, 0, 255);
|
|
|
|
rgba_char_args_set(btheme->tinfo.info_debug, 196, 196, 196, 255);
|
|
|
|
rgba_char_args_set(btheme->tinfo.info_debug_text, 0, 0, 0, 255);
|
2008-01-07 18:03:41 +00:00
|
|
|
|
2009-08-18 12:58:51 +00:00
|
|
|
/* space user preferences */
|
2012-03-30 01:51:25 +00:00
|
|
|
btheme->tuserpref = btheme->tv3d;
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set_fl(btheme->tuserpref.back, 0.45, 0.45, 0.45, 1.0);
|
2010-01-15 17:00:37 +00:00
|
|
|
|
|
|
|
/* space console */
|
2012-03-30 01:51:25 +00:00
|
|
|
btheme->tconsole = btheme->tv3d;
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set(btheme->tconsole.back, 0, 0, 0, 255);
|
|
|
|
rgba_char_args_set(btheme->tconsole.console_output, 96, 128, 255, 255);
|
|
|
|
rgba_char_args_set(btheme->tconsole.console_input, 255, 255, 255, 255);
|
|
|
|
rgba_char_args_set(btheme->tconsole.console_info, 0, 170, 0, 255);
|
|
|
|
rgba_char_args_set(btheme->tconsole.console_error, 220, 96, 96, 255);
|
|
|
|
rgba_char_args_set(btheme->tconsole.console_cursor, 220, 96, 96, 255);
|
2013-02-18 02:36:36 +00:00
|
|
|
rgba_char_args_set(btheme->tconsole.console_select, 255, 255, 255, 48);
|
2010-01-15 17:00:37 +00:00
|
|
|
|
2008-01-07 18:03:41 +00:00
|
|
|
/* space time */
|
2012-03-30 01:51:25 +00:00
|
|
|
btheme->ttime = btheme->tv3d;
|
|
|
|
rgba_char_args_set_fl(btheme->ttime.back, 0.45, 0.45, 0.45, 1.0);
|
|
|
|
rgba_char_args_set_fl(btheme->ttime.grid, 0.36, 0.36, 0.36, 1.0);
|
2012-10-20 20:20:02 +00:00
|
|
|
rgba_char_args_set(btheme->ttime.shade1, 173, 173, 173, 255); /* sliders */
|
2008-01-07 18:03:41 +00:00
|
|
|
|
2016-10-16 20:30:51 +02:00
|
|
|
rgba_char_args_set(btheme->ttime.time_keyframe, 0xDD, 0xD7, 0x00, 0xFF);
|
|
|
|
rgba_char_args_set(btheme->ttime.time_gp_keyframe, 0xB5, 0xE6, 0x1D, 0xFF);
|
2015-01-04 00:48:29 +13:00
|
|
|
|
2013-03-18 16:34:57 +00:00
|
|
|
/* space node, re-uses syntax and console color storage */
|
2012-03-30 01:51:25 +00:00
|
|
|
btheme->tnode = btheme->tv3d;
|
2014-10-14 10:16:46 +02:00
|
|
|
rgba_char_args_set(btheme->tnode.syntaxr, 115, 115, 115, 255); /* wire inner color */
|
2014-04-20 22:05:05 +10:00
|
|
|
rgba_char_args_set(btheme->tnode.edge_select, 255, 255, 255, 255); /* wire selected */
|
2012-03-30 01:51:25 +00:00
|
|
|
rgba_char_args_set(btheme->tnode.syntaxl, 155, 155, 155, 160); /* TH_NODE, backdrop */
|
2013-12-01 21:30:04 +01:00
|
|
|
rgba_char_args_set(btheme->tnode.syntaxn, 100, 100, 100, 255); /* in */
|
|
|
|
rgba_char_args_set(btheme->tnode.nodeclass_output, 100, 100, 100, 255); /* output */
|
2012-03-30 01:51:25 +00:00
|
|
|
rgba_char_args_set(btheme->tnode.syntaxb, 108, 105, 111, 255); /* operator */
|
|
|
|
rgba_char_args_set(btheme->tnode.syntaxv, 104, 106, 117, 255); /* generator */
|
|
|
|
rgba_char_args_set(btheme->tnode.syntaxc, 105, 117, 110, 255); /* group */
|
2013-12-01 21:30:04 +01:00
|
|
|
rgba_char_args_set(btheme->tnode.nodeclass_texture, 108, 105, 111, 255); /* operator */
|
|
|
|
rgba_char_args_set(btheme->tnode.nodeclass_shader, 108, 105, 111, 255); /* operator */
|
|
|
|
rgba_char_args_set(btheme->tnode.nodeclass_filter, 108, 105, 111, 255); /* operator */
|
|
|
|
rgba_char_args_set(btheme->tnode.nodeclass_script, 108, 105, 111, 255); /* operator */
|
|
|
|
rgba_char_args_set(btheme->tnode.nodeclass_pattern, 108, 105, 111, 255); /* operator */
|
|
|
|
rgba_char_args_set(btheme->tnode.nodeclass_vector, 108, 105, 111, 255); /* operator */
|
|
|
|
rgba_char_args_set(btheme->tnode.nodeclass_layout, 108, 105, 111, 255); /* operator */
|
2012-09-24 17:57:09 +00:00
|
|
|
rgba_char_args_set(btheme->tnode.movie, 155, 155, 155, 160); /* frame */
|
2013-05-10 08:08:29 +00:00
|
|
|
rgba_char_args_set(btheme->tnode.syntaxs, 151, 116, 116, 255); /* matte nodes */
|
|
|
|
rgba_char_args_set(btheme->tnode.syntaxd, 116, 151, 151, 255); /* distort nodes */
|
|
|
|
rgba_char_args_set(btheme->tnode.console_output, 223, 202, 53, 255); /* interface nodes */
|
2011-08-04 10:05:14 +00:00
|
|
|
btheme->tnode.noodle_curving = 5;
|
2008-01-07 18:03:41 +00:00
|
|
|
|
2009-06-16 13:09:36 +00:00
|
|
|
/* space logic */
|
2012-03-30 01:51:25 +00:00
|
|
|
btheme->tlogic = btheme->tv3d;
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set(btheme->tlogic.back, 100, 100, 100, 255);
|
2009-06-16 13:09:36 +00:00
|
|
|
|
2011-11-07 12:55:18 +00:00
|
|
|
/* space clip */
|
2012-03-30 01:51:25 +00:00
|
|
|
btheme->tclip = btheme->tv3d;
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set(btheme->tclip.marker_outline, 0x00, 0x00, 0x00, 255);
|
|
|
|
rgba_char_args_set(btheme->tclip.marker, 0x7f, 0x7f, 0x00, 255);
|
|
|
|
rgba_char_args_set(btheme->tclip.act_marker, 0xff, 0xff, 0xff, 255);
|
|
|
|
rgba_char_args_set(btheme->tclip.sel_marker, 0xff, 0xff, 0x00, 255);
|
|
|
|
rgba_char_args_set(btheme->tclip.dis_marker, 0x7f, 0x00, 0x00, 255);
|
|
|
|
rgba_char_args_set(btheme->tclip.lock_marker, 0x7f, 0x7f, 0x7f, 255);
|
|
|
|
rgba_char_args_set(btheme->tclip.path_before, 0xff, 0x00, 0x00, 255);
|
|
|
|
rgba_char_args_set(btheme->tclip.path_after, 0x00, 0x00, 0xff, 255);
|
|
|
|
rgba_char_args_set(btheme->tclip.grid, 0x5e, 0x5e, 0x5e, 255);
|
|
|
|
rgba_char_args_set(btheme->tclip.cframe, 0x60, 0xc0, 0x40, 255);
|
2012-04-30 16:19:20 +00:00
|
|
|
rgba_char_args_set(btheme->tclip.list, 0x66, 0x66, 0x66, 0xff);
|
|
|
|
rgba_char_args_set(btheme->tclip.strip, 0x0c, 0x0a, 0x0a, 0x80);
|
|
|
|
rgba_char_args_set(btheme->tclip.strip_select, 0xff, 0x8c, 0x00, 0xff);
|
2013-10-30 10:38:45 +01:00
|
|
|
btheme->tclip.handle_vertex_size = 5;
|
|
|
|
ui_theme_space_init_handles_color(&btheme->tclip);
|
2008-01-07 18:03:41 +00:00
|
|
|
}
|
|
|
|
|
2013-06-07 00:27:21 +00:00
|
|
|
void ui_style_init_default(void)
|
|
|
|
{
|
|
|
|
BLI_freelistN(&U.uistyles);
|
|
|
|
/* gets automatically re-allocated */
|
|
|
|
uiStyleInit();
|
|
|
|
}
|
|
|
|
|
2008-01-07 18:03:41 +00:00
|
|
|
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
void UI_SetTheme(int spacetype, int regionid)
|
2008-01-07 18:03:41 +00:00
|
|
|
{
|
2013-06-26 12:24:36 +00:00
|
|
|
if (spacetype) {
|
2012-07-07 22:51:57 +00:00
|
|
|
/* later on, a local theme can be found too */
|
2012-03-30 01:51:25 +00:00
|
|
|
theme_active = U.themes.first;
|
|
|
|
theme_spacetype = spacetype;
|
|
|
|
theme_regionid = regionid;
|
2008-01-07 18:03:41 +00:00
|
|
|
}
|
2013-06-26 12:24:36 +00:00
|
|
|
else if (regionid) {
|
|
|
|
/* popups */
|
|
|
|
theme_active = U.themes.first;
|
|
|
|
theme_spacetype = SPACE_BUTS;
|
|
|
|
theme_regionid = regionid;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
/* for safety, when theme was deleted */
|
|
|
|
theme_active = U.themes.first;
|
|
|
|
theme_spacetype = SPACE_VIEW3D;
|
|
|
|
theme_regionid = RGN_TYPE_WINDOW;
|
|
|
|
}
|
2008-01-07 18:03:41 +00:00
|
|
|
}
|
|
|
|
|
2012-09-14 06:17:14 +00:00
|
|
|
bTheme *UI_GetTheme(void)
|
2011-11-19 20:57:53 +00:00
|
|
|
{
|
|
|
|
return U.themes.first;
|
|
|
|
}
|
|
|
|
|
2015-01-04 23:20:56 +11:00
|
|
|
/**
|
|
|
|
* for the rare case we need to temp swap in a different theme (offscreen render)
|
|
|
|
*/
|
|
|
|
void UI_Theme_Store(struct bThemeState *theme_state)
|
|
|
|
{
|
|
|
|
*theme_state = g_theme_state;
|
|
|
|
}
|
|
|
|
void UI_Theme_Restore(struct bThemeState *theme_state)
|
|
|
|
{
|
|
|
|
g_theme_state = *theme_state;
|
|
|
|
}
|
|
|
|
|
2012-10-20 20:20:02 +00:00
|
|
|
/* for space windows only */
|
Port of part of the Interface code to 2.50.
This is based on the current trunk version, so these files should not need
merges. There's two things (clipboard and intptr_t) that are missing in 2.50
and commented out with XXX 2.48, these can be enabled again once trunk is
merged into this branch.
Further this is not all interface code, there are many parts commented out:
* interface.c: nearly all button types, missing: links, chartab, keyevent.
* interface_draw.c: almost all code, with some small exceptions.
* interface_ops.c: this replaces ui_do_but and uiDoBlocks with two operators,
making it non-blocking.
* interface_regions: this is a part of interface.c, split off, contains code to
create regions for tooltips, menus, pupmenu (that one is crashing currently),
color chooser, basically regions with buttons which is fairly independent of
core interface code.
* interface_panel.c and interface_icons.c: not ported over, so no panels and
icons yet. Panels should probably become (free floating) regions?
* text.c: (formerly language.c) for drawing text and translation. this works
but is using bad globals still and could be cleaned up.
Header Files:
* ED_datafiles.h now has declarations for datatoc_ files, so those extern
declarations can be #included instead of repeated.
* The user interface code is in UI_interface.h and other UI_* files.
Core:
* The API for creating blocks, buttons, etc is nearly the same still. Blocks
are now created per region instead of per area.
* The code was made non-blocking, which means that any changes and redraws
should be possible while editing a button. That means though that we need
some sort of persistence even though the blender model is to recreate buttons
for each redraw. So when a new block is created, some matching happens to
find out which buttons correspond to buttons in the previously created block,
and for activated buttons some data is then copied over to the new button.
* Added UI_init/UI_init_userdef/UI_exit functions that should initialize code
in this module, instead of multiple function calls in the windowmanager.
* Removed most static/globals from interface.c.
* Removed UIafterfunc_ I don't think it's needed anymore, and not sure how it
would integrate here?
* Currently only full window redraws are used, this should become per region
and maybe per button later.
Operators:
* Events are currently handled through two operators: button activate and menu
handle. Operators may not be the best way to implement this, since there are
currently some issues with events being missed, but they can become a special
handler type instead, this should not be a big change.
* The button activate operator runs as long as a button is active, and will
handle all interaction with that button until the button is not activated
anymore. This means clicking, text editing, number dragging, opening menu
blocks, etc.
* Since this operator has to be non-blocking, the ui_do_but code needed to made
non-blocking. That means variables that were previously on the stack, now
need to be stored away in a struct such that they can be accessed again when
the operator receives more events.
* Additionally the place in the ui_do_but code indicated the state, now that
needs to be set explicit in order to handle the right events in the right
state. So an activated button can be in one of these states: init, highlight,
wait_flash, wait_release, wait_key_event, num_editing, text_editing,
text_selecting, block_open, exit.
* For each button type an ui_apply_but_* function has also been separated out
from ui_do_but. This makes it possible to continuously apply the button as
text is being typed for example, and there is an option in the code to enable
this. Since the code non-blocking and can deal with the button being deleted
even, it should be safe to do this.
* When editing text, dragging numbers, etc, the actual data (but->poin) is not
being edited, since that would mean data is being edited without correct
updates happening, while some other part of blender may be accessing that
data in the meantime. So data values, strings, vectors are written to a
temporary location and only flush in the apply function.
Regions:
* Menus, color chooser, tooltips etc all create screen level regions. Such menu
blocks give a handle to the button that creates it, which will contain the
results of the menu block once a MESSAGE event is received from that menu
block.
* For this type of menu block the coordinates used to be in window space. They
are still created that way and ui_positionblock still works with window
coordinates, but after that the block and buttons are brought back to region
coordinates since these are now contained in a region.
* The flush/overdraw frontbuffer drawing code was removed, the windowmanager
should have enough information with these screen level regions to have full
control over what gets drawn when and to then do correct compositing.
Testing:
* The header in the time space currently has some buttons to test the UI code.
2008-11-11 18:31:32 +00:00
|
|
|
void UI_ThemeColor(int colorid)
|
2008-01-07 18:03:41 +00:00
|
|
|
{
|
2010-12-20 03:59:22 +00:00
|
|
|
const unsigned char *cp;
|
2008-01-07 18:03:41 +00:00
|
|
|
|
2012-03-30 01:51:25 +00:00
|
|
|
cp = UI_ThemeGetColorPtr(theme_active, theme_spacetype, colorid);
|
2010-12-20 03:59:22 +00:00
|
|
|
glColor3ubv(cp);
|
2008-01-07 18:03:41 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2012-10-20 20:20:02 +00:00
|
|
|
/* plus alpha */
|
Port of part of the Interface code to 2.50.
This is based on the current trunk version, so these files should not need
merges. There's two things (clipboard and intptr_t) that are missing in 2.50
and commented out with XXX 2.48, these can be enabled again once trunk is
merged into this branch.
Further this is not all interface code, there are many parts commented out:
* interface.c: nearly all button types, missing: links, chartab, keyevent.
* interface_draw.c: almost all code, with some small exceptions.
* interface_ops.c: this replaces ui_do_but and uiDoBlocks with two operators,
making it non-blocking.
* interface_regions: this is a part of interface.c, split off, contains code to
create regions for tooltips, menus, pupmenu (that one is crashing currently),
color chooser, basically regions with buttons which is fairly independent of
core interface code.
* interface_panel.c and interface_icons.c: not ported over, so no panels and
icons yet. Panels should probably become (free floating) regions?
* text.c: (formerly language.c) for drawing text and translation. this works
but is using bad globals still and could be cleaned up.
Header Files:
* ED_datafiles.h now has declarations for datatoc_ files, so those extern
declarations can be #included instead of repeated.
* The user interface code is in UI_interface.h and other UI_* files.
Core:
* The API for creating blocks, buttons, etc is nearly the same still. Blocks
are now created per region instead of per area.
* The code was made non-blocking, which means that any changes and redraws
should be possible while editing a button. That means though that we need
some sort of persistence even though the blender model is to recreate buttons
for each redraw. So when a new block is created, some matching happens to
find out which buttons correspond to buttons in the previously created block,
and for activated buttons some data is then copied over to the new button.
* Added UI_init/UI_init_userdef/UI_exit functions that should initialize code
in this module, instead of multiple function calls in the windowmanager.
* Removed most static/globals from interface.c.
* Removed UIafterfunc_ I don't think it's needed anymore, and not sure how it
would integrate here?
* Currently only full window redraws are used, this should become per region
and maybe per button later.
Operators:
* Events are currently handled through two operators: button activate and menu
handle. Operators may not be the best way to implement this, since there are
currently some issues with events being missed, but they can become a special
handler type instead, this should not be a big change.
* The button activate operator runs as long as a button is active, and will
handle all interaction with that button until the button is not activated
anymore. This means clicking, text editing, number dragging, opening menu
blocks, etc.
* Since this operator has to be non-blocking, the ui_do_but code needed to made
non-blocking. That means variables that were previously on the stack, now
need to be stored away in a struct such that they can be accessed again when
the operator receives more events.
* Additionally the place in the ui_do_but code indicated the state, now that
needs to be set explicit in order to handle the right events in the right
state. So an activated button can be in one of these states: init, highlight,
wait_flash, wait_release, wait_key_event, num_editing, text_editing,
text_selecting, block_open, exit.
* For each button type an ui_apply_but_* function has also been separated out
from ui_do_but. This makes it possible to continuously apply the button as
text is being typed for example, and there is an option in the code to enable
this. Since the code non-blocking and can deal with the button being deleted
even, it should be safe to do this.
* When editing text, dragging numbers, etc, the actual data (but->poin) is not
being edited, since that would mean data is being edited without correct
updates happening, while some other part of blender may be accessing that
data in the meantime. So data values, strings, vectors are written to a
temporary location and only flush in the apply function.
Regions:
* Menus, color chooser, tooltips etc all create screen level regions. Such menu
blocks give a handle to the button that creates it, which will contain the
results of the menu block once a MESSAGE event is received from that menu
block.
* For this type of menu block the coordinates used to be in window space. They
are still created that way and ui_positionblock still works with window
coordinates, but after that the block and buttons are brought back to region
coordinates since these are now contained in a region.
* The flush/overdraw frontbuffer drawing code was removed, the windowmanager
should have enough information with these screen level regions to have full
control over what gets drawn when and to then do correct compositing.
Testing:
* The header in the time space currently has some buttons to test the UI code.
2008-11-11 18:31:32 +00:00
|
|
|
void UI_ThemeColor4(int colorid)
|
2008-01-07 18:03:41 +00:00
|
|
|
{
|
2010-12-20 03:59:22 +00:00
|
|
|
const unsigned char *cp;
|
2008-01-07 18:03:41 +00:00
|
|
|
|
2012-03-30 01:51:25 +00:00
|
|
|
cp = UI_ThemeGetColorPtr(theme_active, theme_spacetype, colorid);
|
2010-12-20 03:59:22 +00:00
|
|
|
glColor4ubv(cp);
|
2008-01-07 18:03:41 +00:00
|
|
|
}
|
|
|
|
|
2012-10-20 20:20:02 +00:00
|
|
|
/* set the color with offset for shades */
|
Port of part of the Interface code to 2.50.
This is based on the current trunk version, so these files should not need
merges. There's two things (clipboard and intptr_t) that are missing in 2.50
and commented out with XXX 2.48, these can be enabled again once trunk is
merged into this branch.
Further this is not all interface code, there are many parts commented out:
* interface.c: nearly all button types, missing: links, chartab, keyevent.
* interface_draw.c: almost all code, with some small exceptions.
* interface_ops.c: this replaces ui_do_but and uiDoBlocks with two operators,
making it non-blocking.
* interface_regions: this is a part of interface.c, split off, contains code to
create regions for tooltips, menus, pupmenu (that one is crashing currently),
color chooser, basically regions with buttons which is fairly independent of
core interface code.
* interface_panel.c and interface_icons.c: not ported over, so no panels and
icons yet. Panels should probably become (free floating) regions?
* text.c: (formerly language.c) for drawing text and translation. this works
but is using bad globals still and could be cleaned up.
Header Files:
* ED_datafiles.h now has declarations for datatoc_ files, so those extern
declarations can be #included instead of repeated.
* The user interface code is in UI_interface.h and other UI_* files.
Core:
* The API for creating blocks, buttons, etc is nearly the same still. Blocks
are now created per region instead of per area.
* The code was made non-blocking, which means that any changes and redraws
should be possible while editing a button. That means though that we need
some sort of persistence even though the blender model is to recreate buttons
for each redraw. So when a new block is created, some matching happens to
find out which buttons correspond to buttons in the previously created block,
and for activated buttons some data is then copied over to the new button.
* Added UI_init/UI_init_userdef/UI_exit functions that should initialize code
in this module, instead of multiple function calls in the windowmanager.
* Removed most static/globals from interface.c.
* Removed UIafterfunc_ I don't think it's needed anymore, and not sure how it
would integrate here?
* Currently only full window redraws are used, this should become per region
and maybe per button later.
Operators:
* Events are currently handled through two operators: button activate and menu
handle. Operators may not be the best way to implement this, since there are
currently some issues with events being missed, but they can become a special
handler type instead, this should not be a big change.
* The button activate operator runs as long as a button is active, and will
handle all interaction with that button until the button is not activated
anymore. This means clicking, text editing, number dragging, opening menu
blocks, etc.
* Since this operator has to be non-blocking, the ui_do_but code needed to made
non-blocking. That means variables that were previously on the stack, now
need to be stored away in a struct such that they can be accessed again when
the operator receives more events.
* Additionally the place in the ui_do_but code indicated the state, now that
needs to be set explicit in order to handle the right events in the right
state. So an activated button can be in one of these states: init, highlight,
wait_flash, wait_release, wait_key_event, num_editing, text_editing,
text_selecting, block_open, exit.
* For each button type an ui_apply_but_* function has also been separated out
from ui_do_but. This makes it possible to continuously apply the button as
text is being typed for example, and there is an option in the code to enable
this. Since the code non-blocking and can deal with the button being deleted
even, it should be safe to do this.
* When editing text, dragging numbers, etc, the actual data (but->poin) is not
being edited, since that would mean data is being edited without correct
updates happening, while some other part of blender may be accessing that
data in the meantime. So data values, strings, vectors are written to a
temporary location and only flush in the apply function.
Regions:
* Menus, color chooser, tooltips etc all create screen level regions. Such menu
blocks give a handle to the button that creates it, which will contain the
results of the menu block once a MESSAGE event is received from that menu
block.
* For this type of menu block the coordinates used to be in window space. They
are still created that way and ui_positionblock still works with window
coordinates, but after that the block and buttons are brought back to region
coordinates since these are now contained in a region.
* The flush/overdraw frontbuffer drawing code was removed, the windowmanager
should have enough information with these screen level regions to have full
control over what gets drawn when and to then do correct compositing.
Testing:
* The header in the time space currently has some buttons to test the UI code.
2008-11-11 18:31:32 +00:00
|
|
|
void UI_ThemeColorShade(int colorid, int offset)
|
2008-01-07 18:03:41 +00:00
|
|
|
{
|
2017-02-08 18:33:40 -05:00
|
|
|
unsigned char col[4];
|
|
|
|
UI_GetThemeColorShade4ubv(colorid, offset, col);
|
|
|
|
glColor4ubv(col);
|
2008-01-07 18:03:41 +00:00
|
|
|
}
|
2017-02-08 18:33:40 -05:00
|
|
|
|
Port of part of the Interface code to 2.50.
This is based on the current trunk version, so these files should not need
merges. There's two things (clipboard and intptr_t) that are missing in 2.50
and commented out with XXX 2.48, these can be enabled again once trunk is
merged into this branch.
Further this is not all interface code, there are many parts commented out:
* interface.c: nearly all button types, missing: links, chartab, keyevent.
* interface_draw.c: almost all code, with some small exceptions.
* interface_ops.c: this replaces ui_do_but and uiDoBlocks with two operators,
making it non-blocking.
* interface_regions: this is a part of interface.c, split off, contains code to
create regions for tooltips, menus, pupmenu (that one is crashing currently),
color chooser, basically regions with buttons which is fairly independent of
core interface code.
* interface_panel.c and interface_icons.c: not ported over, so no panels and
icons yet. Panels should probably become (free floating) regions?
* text.c: (formerly language.c) for drawing text and translation. this works
but is using bad globals still and could be cleaned up.
Header Files:
* ED_datafiles.h now has declarations for datatoc_ files, so those extern
declarations can be #included instead of repeated.
* The user interface code is in UI_interface.h and other UI_* files.
Core:
* The API for creating blocks, buttons, etc is nearly the same still. Blocks
are now created per region instead of per area.
* The code was made non-blocking, which means that any changes and redraws
should be possible while editing a button. That means though that we need
some sort of persistence even though the blender model is to recreate buttons
for each redraw. So when a new block is created, some matching happens to
find out which buttons correspond to buttons in the previously created block,
and for activated buttons some data is then copied over to the new button.
* Added UI_init/UI_init_userdef/UI_exit functions that should initialize code
in this module, instead of multiple function calls in the windowmanager.
* Removed most static/globals from interface.c.
* Removed UIafterfunc_ I don't think it's needed anymore, and not sure how it
would integrate here?
* Currently only full window redraws are used, this should become per region
and maybe per button later.
Operators:
* Events are currently handled through two operators: button activate and menu
handle. Operators may not be the best way to implement this, since there are
currently some issues with events being missed, but they can become a special
handler type instead, this should not be a big change.
* The button activate operator runs as long as a button is active, and will
handle all interaction with that button until the button is not activated
anymore. This means clicking, text editing, number dragging, opening menu
blocks, etc.
* Since this operator has to be non-blocking, the ui_do_but code needed to made
non-blocking. That means variables that were previously on the stack, now
need to be stored away in a struct such that they can be accessed again when
the operator receives more events.
* Additionally the place in the ui_do_but code indicated the state, now that
needs to be set explicit in order to handle the right events in the right
state. So an activated button can be in one of these states: init, highlight,
wait_flash, wait_release, wait_key_event, num_editing, text_editing,
text_selecting, block_open, exit.
* For each button type an ui_apply_but_* function has also been separated out
from ui_do_but. This makes it possible to continuously apply the button as
text is being typed for example, and there is an option in the code to enable
this. Since the code non-blocking and can deal with the button being deleted
even, it should be safe to do this.
* When editing text, dragging numbers, etc, the actual data (but->poin) is not
being edited, since that would mean data is being edited without correct
updates happening, while some other part of blender may be accessing that
data in the meantime. So data values, strings, vectors are written to a
temporary location and only flush in the apply function.
Regions:
* Menus, color chooser, tooltips etc all create screen level regions. Such menu
blocks give a handle to the button that creates it, which will contain the
results of the menu block once a MESSAGE event is received from that menu
block.
* For this type of menu block the coordinates used to be in window space. They
are still created that way and ui_positionblock still works with window
coordinates, but after that the block and buttons are brought back to region
coordinates since these are now contained in a region.
* The flush/overdraw frontbuffer drawing code was removed, the windowmanager
should have enough information with these screen level regions to have full
control over what gets drawn when and to then do correct compositing.
Testing:
* The header in the time space currently has some buttons to test the UI code.
2008-11-11 18:31:32 +00:00
|
|
|
void UI_ThemeColorShadeAlpha(int colorid, int coloffset, int alphaoffset)
|
2008-01-07 18:03:41 +00:00
|
|
|
{
|
|
|
|
int r, g, b, a;
|
2010-12-20 03:59:22 +00:00
|
|
|
const unsigned char *cp;
|
2008-01-07 18:03:41 +00:00
|
|
|
|
2012-03-30 01:51:25 +00:00
|
|
|
cp = UI_ThemeGetColorPtr(theme_active, theme_spacetype, colorid);
|
|
|
|
r = coloffset + (int) cp[0];
|
2008-01-07 18:03:41 +00:00
|
|
|
CLAMP(r, 0, 255);
|
2012-03-30 01:51:25 +00:00
|
|
|
g = coloffset + (int) cp[1];
|
2008-01-07 18:03:41 +00:00
|
|
|
CLAMP(g, 0, 255);
|
2012-03-30 01:51:25 +00:00
|
|
|
b = coloffset + (int) cp[2];
|
2008-01-07 18:03:41 +00:00
|
|
|
CLAMP(b, 0, 255);
|
2012-03-30 01:51:25 +00:00
|
|
|
a = alphaoffset + (int) cp[3];
|
2008-01-07 18:03:41 +00:00
|
|
|
CLAMP(a, 0, 255);
|
2016-10-07 14:56:08 -04:00
|
|
|
|
2008-01-07 18:03:41 +00:00
|
|
|
glColor4ub(r, g, b, a);
|
|
|
|
}
|
|
|
|
|
2017-01-15 19:26:35 -05:00
|
|
|
void UI_GetThemeColorShadeAlpha4ubv(int colorid, int coloffset, int alphaoffset, unsigned char col[4])
|
|
|
|
{
|
|
|
|
int r, g, b, a;
|
|
|
|
const unsigned char *cp;
|
|
|
|
|
|
|
|
cp = UI_ThemeGetColorPtr(theme_active, theme_spacetype, colorid);
|
|
|
|
r = coloffset + (int) cp[0];
|
|
|
|
CLAMP(r, 0, 255);
|
|
|
|
g = coloffset + (int) cp[1];
|
|
|
|
CLAMP(g, 0, 255);
|
|
|
|
b = coloffset + (int) cp[2];
|
|
|
|
CLAMP(b, 0, 255);
|
|
|
|
a = alphaoffset + (int) cp[3];
|
|
|
|
CLAMP(a, 0, 255);
|
|
|
|
|
|
|
|
col[0] = r;
|
|
|
|
col[1] = g;
|
|
|
|
col[2] = b;
|
|
|
|
col[3] = a;
|
|
|
|
}
|
|
|
|
|
2014-06-04 14:22:29 +10:00
|
|
|
void UI_GetThemeColorBlend3ubv(int colorid1, int colorid2, float fac, unsigned char col[3])
|
2008-01-07 18:03:41 +00:00
|
|
|
{
|
2010-12-20 03:59:22 +00:00
|
|
|
const unsigned char *cp1, *cp2;
|
2014-06-04 14:22:29 +10:00
|
|
|
|
2012-03-30 01:51:25 +00:00
|
|
|
cp1 = UI_ThemeGetColorPtr(theme_active, theme_spacetype, colorid1);
|
|
|
|
cp2 = UI_ThemeGetColorPtr(theme_active, theme_spacetype, colorid2);
|
2008-01-07 18:03:41 +00:00
|
|
|
|
2011-03-27 14:52:16 +00:00
|
|
|
CLAMP(fac, 0.0f, 1.0f);
|
2014-06-04 14:22:29 +10:00
|
|
|
col[0] = floorf((1.0f - fac) * cp1[0] + fac * cp2[0]);
|
|
|
|
col[1] = floorf((1.0f - fac) * cp1[1] + fac * cp2[1]);
|
|
|
|
col[2] = floorf((1.0f - fac) * cp1[2] + fac * cp2[2]);
|
|
|
|
}
|
|
|
|
|
2017-04-26 11:59:13 +02:00
|
|
|
void UI_GetThemeColorBlend3f(int colorid1, int colorid2, float fac, float r_col[3])
|
|
|
|
{
|
|
|
|
const unsigned char *cp1, *cp2;
|
|
|
|
|
|
|
|
cp1 = UI_ThemeGetColorPtr(theme_active, theme_spacetype, colorid1);
|
|
|
|
cp2 = UI_ThemeGetColorPtr(theme_active, theme_spacetype, colorid2);
|
|
|
|
|
|
|
|
CLAMP(fac, 0.0f, 1.0f);
|
|
|
|
r_col[0] = ((1.0f - fac) * cp1[0] + fac * cp2[0]) / 255.0f;
|
|
|
|
r_col[1] = ((1.0f - fac) * cp1[1] + fac * cp2[1]) / 255.0f;
|
|
|
|
r_col[2] = ((1.0f - fac) * cp1[2] + fac * cp2[2]) / 255.0f;
|
|
|
|
}
|
|
|
|
|
2014-06-04 14:22:29 +10:00
|
|
|
/* blend between to theme colors, and set it */
|
|
|
|
void UI_ThemeColorBlend(int colorid1, int colorid2, float fac)
|
|
|
|
{
|
|
|
|
unsigned char col[3];
|
|
|
|
UI_GetThemeColorBlend3ubv(colorid1, colorid2, fac, col);
|
|
|
|
glColor3ubv(col);
|
2008-01-07 18:03:41 +00:00
|
|
|
}
|
|
|
|
|
2012-10-20 20:20:02 +00:00
|
|
|
/* blend between to theme colors, shade it, and set it */
|
Port of part of the Interface code to 2.50.
This is based on the current trunk version, so these files should not need
merges. There's two things (clipboard and intptr_t) that are missing in 2.50
and commented out with XXX 2.48, these can be enabled again once trunk is
merged into this branch.
Further this is not all interface code, there are many parts commented out:
* interface.c: nearly all button types, missing: links, chartab, keyevent.
* interface_draw.c: almost all code, with some small exceptions.
* interface_ops.c: this replaces ui_do_but and uiDoBlocks with two operators,
making it non-blocking.
* interface_regions: this is a part of interface.c, split off, contains code to
create regions for tooltips, menus, pupmenu (that one is crashing currently),
color chooser, basically regions with buttons which is fairly independent of
core interface code.
* interface_panel.c and interface_icons.c: not ported over, so no panels and
icons yet. Panels should probably become (free floating) regions?
* text.c: (formerly language.c) for drawing text and translation. this works
but is using bad globals still and could be cleaned up.
Header Files:
* ED_datafiles.h now has declarations for datatoc_ files, so those extern
declarations can be #included instead of repeated.
* The user interface code is in UI_interface.h and other UI_* files.
Core:
* The API for creating blocks, buttons, etc is nearly the same still. Blocks
are now created per region instead of per area.
* The code was made non-blocking, which means that any changes and redraws
should be possible while editing a button. That means though that we need
some sort of persistence even though the blender model is to recreate buttons
for each redraw. So when a new block is created, some matching happens to
find out which buttons correspond to buttons in the previously created block,
and for activated buttons some data is then copied over to the new button.
* Added UI_init/UI_init_userdef/UI_exit functions that should initialize code
in this module, instead of multiple function calls in the windowmanager.
* Removed most static/globals from interface.c.
* Removed UIafterfunc_ I don't think it's needed anymore, and not sure how it
would integrate here?
* Currently only full window redraws are used, this should become per region
and maybe per button later.
Operators:
* Events are currently handled through two operators: button activate and menu
handle. Operators may not be the best way to implement this, since there are
currently some issues with events being missed, but they can become a special
handler type instead, this should not be a big change.
* The button activate operator runs as long as a button is active, and will
handle all interaction with that button until the button is not activated
anymore. This means clicking, text editing, number dragging, opening menu
blocks, etc.
* Since this operator has to be non-blocking, the ui_do_but code needed to made
non-blocking. That means variables that were previously on the stack, now
need to be stored away in a struct such that they can be accessed again when
the operator receives more events.
* Additionally the place in the ui_do_but code indicated the state, now that
needs to be set explicit in order to handle the right events in the right
state. So an activated button can be in one of these states: init, highlight,
wait_flash, wait_release, wait_key_event, num_editing, text_editing,
text_selecting, block_open, exit.
* For each button type an ui_apply_but_* function has also been separated out
from ui_do_but. This makes it possible to continuously apply the button as
text is being typed for example, and there is an option in the code to enable
this. Since the code non-blocking and can deal with the button being deleted
even, it should be safe to do this.
* When editing text, dragging numbers, etc, the actual data (but->poin) is not
being edited, since that would mean data is being edited without correct
updates happening, while some other part of blender may be accessing that
data in the meantime. So data values, strings, vectors are written to a
temporary location and only flush in the apply function.
Regions:
* Menus, color chooser, tooltips etc all create screen level regions. Such menu
blocks give a handle to the button that creates it, which will contain the
results of the menu block once a MESSAGE event is received from that menu
block.
* For this type of menu block the coordinates used to be in window space. They
are still created that way and ui_positionblock still works with window
coordinates, but after that the block and buttons are brought back to region
coordinates since these are now contained in a region.
* The flush/overdraw frontbuffer drawing code was removed, the windowmanager
should have enough information with these screen level regions to have full
control over what gets drawn when and to then do correct compositing.
Testing:
* The header in the time space currently has some buttons to test the UI code.
2008-11-11 18:31:32 +00:00
|
|
|
void UI_ThemeColorBlendShade(int colorid1, int colorid2, float fac, int offset)
|
2008-01-07 18:03:41 +00:00
|
|
|
{
|
|
|
|
int r, g, b;
|
2010-12-20 03:59:22 +00:00
|
|
|
const unsigned char *cp1, *cp2;
|
2008-01-07 18:03:41 +00:00
|
|
|
|
2012-03-30 01:51:25 +00:00
|
|
|
cp1 = UI_ThemeGetColorPtr(theme_active, theme_spacetype, colorid1);
|
|
|
|
cp2 = UI_ThemeGetColorPtr(theme_active, theme_spacetype, colorid2);
|
2008-01-07 18:03:41 +00:00
|
|
|
|
2011-03-27 14:52:16 +00:00
|
|
|
CLAMP(fac, 0.0f, 1.0f);
|
2012-03-30 01:51:25 +00:00
|
|
|
r = offset + floorf((1.0f - fac) * cp1[0] + fac * cp2[0]);
|
|
|
|
g = offset + floorf((1.0f - fac) * cp1[1] + fac * cp2[1]);
|
|
|
|
b = offset + floorf((1.0f - fac) * cp1[2] + fac * cp2[2]);
|
2008-01-07 18:03:41 +00:00
|
|
|
|
2009-01-04 07:50:41 +00:00
|
|
|
CLAMP(r, 0, 255);
|
|
|
|
CLAMP(g, 0, 255);
|
|
|
|
CLAMP(b, 0, 255);
|
2008-01-07 18:03:41 +00:00
|
|
|
|
|
|
|
glColor3ub(r, g, b);
|
|
|
|
}
|
|
|
|
|
2012-10-20 20:20:02 +00:00
|
|
|
/* blend between to theme colors, shade it, and set it */
|
2009-01-04 07:50:41 +00:00
|
|
|
void UI_ThemeColorBlendShadeAlpha(int colorid1, int colorid2, float fac, int offset, int alphaoffset)
|
|
|
|
{
|
|
|
|
int r, g, b, a;
|
2010-12-20 03:59:22 +00:00
|
|
|
const unsigned char *cp1, *cp2;
|
2009-01-04 07:50:41 +00:00
|
|
|
|
2012-03-30 01:51:25 +00:00
|
|
|
cp1 = UI_ThemeGetColorPtr(theme_active, theme_spacetype, colorid1);
|
|
|
|
cp2 = UI_ThemeGetColorPtr(theme_active, theme_spacetype, colorid2);
|
2009-01-04 07:50:41 +00:00
|
|
|
|
2011-03-27 14:52:16 +00:00
|
|
|
CLAMP(fac, 0.0f, 1.0f);
|
2012-03-30 01:51:25 +00:00
|
|
|
r = offset + floorf((1.0f - fac) * cp1[0] + fac * cp2[0]);
|
|
|
|
g = offset + floorf((1.0f - fac) * cp1[1] + fac * cp2[1]);
|
|
|
|
b = offset + floorf((1.0f - fac) * cp1[2] + fac * cp2[2]);
|
|
|
|
a = alphaoffset + floorf((1.0f - fac) * cp1[3] + fac * cp2[3]);
|
2009-01-04 07:50:41 +00:00
|
|
|
|
|
|
|
CLAMP(r, 0, 255);
|
|
|
|
CLAMP(g, 0, 255);
|
|
|
|
CLAMP(b, 0, 255);
|
|
|
|
CLAMP(a, 0, 255);
|
|
|
|
|
|
|
|
glColor4ub(r, g, b, a);
|
|
|
|
}
|
|
|
|
|
2017-02-01 19:00:30 -05:00
|
|
|
void UI_FontThemeColor(int fontid, int colorid)
|
|
|
|
{
|
|
|
|
unsigned char color[4];
|
|
|
|
UI_GetThemeColor4ubv(colorid, color);
|
|
|
|
BLF_color4ubv(fontid, color);
|
|
|
|
}
|
2009-01-04 07:50:41 +00:00
|
|
|
|
2012-10-20 20:20:02 +00:00
|
|
|
/* get individual values, not scaled */
|
Port of part of the Interface code to 2.50.
This is based on the current trunk version, so these files should not need
merges. There's two things (clipboard and intptr_t) that are missing in 2.50
and commented out with XXX 2.48, these can be enabled again once trunk is
merged into this branch.
Further this is not all interface code, there are many parts commented out:
* interface.c: nearly all button types, missing: links, chartab, keyevent.
* interface_draw.c: almost all code, with some small exceptions.
* interface_ops.c: this replaces ui_do_but and uiDoBlocks with two operators,
making it non-blocking.
* interface_regions: this is a part of interface.c, split off, contains code to
create regions for tooltips, menus, pupmenu (that one is crashing currently),
color chooser, basically regions with buttons which is fairly independent of
core interface code.
* interface_panel.c and interface_icons.c: not ported over, so no panels and
icons yet. Panels should probably become (free floating) regions?
* text.c: (formerly language.c) for drawing text and translation. this works
but is using bad globals still and could be cleaned up.
Header Files:
* ED_datafiles.h now has declarations for datatoc_ files, so those extern
declarations can be #included instead of repeated.
* The user interface code is in UI_interface.h and other UI_* files.
Core:
* The API for creating blocks, buttons, etc is nearly the same still. Blocks
are now created per region instead of per area.
* The code was made non-blocking, which means that any changes and redraws
should be possible while editing a button. That means though that we need
some sort of persistence even though the blender model is to recreate buttons
for each redraw. So when a new block is created, some matching happens to
find out which buttons correspond to buttons in the previously created block,
and for activated buttons some data is then copied over to the new button.
* Added UI_init/UI_init_userdef/UI_exit functions that should initialize code
in this module, instead of multiple function calls in the windowmanager.
* Removed most static/globals from interface.c.
* Removed UIafterfunc_ I don't think it's needed anymore, and not sure how it
would integrate here?
* Currently only full window redraws are used, this should become per region
and maybe per button later.
Operators:
* Events are currently handled through two operators: button activate and menu
handle. Operators may not be the best way to implement this, since there are
currently some issues with events being missed, but they can become a special
handler type instead, this should not be a big change.
* The button activate operator runs as long as a button is active, and will
handle all interaction with that button until the button is not activated
anymore. This means clicking, text editing, number dragging, opening menu
blocks, etc.
* Since this operator has to be non-blocking, the ui_do_but code needed to made
non-blocking. That means variables that were previously on the stack, now
need to be stored away in a struct such that they can be accessed again when
the operator receives more events.
* Additionally the place in the ui_do_but code indicated the state, now that
needs to be set explicit in order to handle the right events in the right
state. So an activated button can be in one of these states: init, highlight,
wait_flash, wait_release, wait_key_event, num_editing, text_editing,
text_selecting, block_open, exit.
* For each button type an ui_apply_but_* function has also been separated out
from ui_do_but. This makes it possible to continuously apply the button as
text is being typed for example, and there is an option in the code to enable
this. Since the code non-blocking and can deal with the button being deleted
even, it should be safe to do this.
* When editing text, dragging numbers, etc, the actual data (but->poin) is not
being edited, since that would mean data is being edited without correct
updates happening, while some other part of blender may be accessing that
data in the meantime. So data values, strings, vectors are written to a
temporary location and only flush in the apply function.
Regions:
* Menus, color chooser, tooltips etc all create screen level regions. Such menu
blocks give a handle to the button that creates it, which will contain the
results of the menu block once a MESSAGE event is received from that menu
block.
* For this type of menu block the coordinates used to be in window space. They
are still created that way and ui_positionblock still works with window
coordinates, but after that the block and buttons are brought back to region
coordinates since these are now contained in a region.
* The flush/overdraw frontbuffer drawing code was removed, the windowmanager
should have enough information with these screen level regions to have full
control over what gets drawn when and to then do correct compositing.
Testing:
* The header in the time space currently has some buttons to test the UI code.
2008-11-11 18:31:32 +00:00
|
|
|
float UI_GetThemeValuef(int colorid)
|
2008-01-07 18:03:41 +00:00
|
|
|
{
|
2010-12-20 03:59:22 +00:00
|
|
|
const unsigned char *cp;
|
2008-01-07 18:03:41 +00:00
|
|
|
|
2012-03-30 01:51:25 +00:00
|
|
|
cp = UI_ThemeGetColorPtr(theme_active, theme_spacetype, colorid);
|
2008-01-07 18:03:41 +00:00
|
|
|
return ((float)cp[0]);
|
|
|
|
}
|
|
|
|
|
2012-10-20 20:20:02 +00:00
|
|
|
/* get individual values, not scaled */
|
Port of part of the Interface code to 2.50.
This is based on the current trunk version, so these files should not need
merges. There's two things (clipboard and intptr_t) that are missing in 2.50
and commented out with XXX 2.48, these can be enabled again once trunk is
merged into this branch.
Further this is not all interface code, there are many parts commented out:
* interface.c: nearly all button types, missing: links, chartab, keyevent.
* interface_draw.c: almost all code, with some small exceptions.
* interface_ops.c: this replaces ui_do_but and uiDoBlocks with two operators,
making it non-blocking.
* interface_regions: this is a part of interface.c, split off, contains code to
create regions for tooltips, menus, pupmenu (that one is crashing currently),
color chooser, basically regions with buttons which is fairly independent of
core interface code.
* interface_panel.c and interface_icons.c: not ported over, so no panels and
icons yet. Panels should probably become (free floating) regions?
* text.c: (formerly language.c) for drawing text and translation. this works
but is using bad globals still and could be cleaned up.
Header Files:
* ED_datafiles.h now has declarations for datatoc_ files, so those extern
declarations can be #included instead of repeated.
* The user interface code is in UI_interface.h and other UI_* files.
Core:
* The API for creating blocks, buttons, etc is nearly the same still. Blocks
are now created per region instead of per area.
* The code was made non-blocking, which means that any changes and redraws
should be possible while editing a button. That means though that we need
some sort of persistence even though the blender model is to recreate buttons
for each redraw. So when a new block is created, some matching happens to
find out which buttons correspond to buttons in the previously created block,
and for activated buttons some data is then copied over to the new button.
* Added UI_init/UI_init_userdef/UI_exit functions that should initialize code
in this module, instead of multiple function calls in the windowmanager.
* Removed most static/globals from interface.c.
* Removed UIafterfunc_ I don't think it's needed anymore, and not sure how it
would integrate here?
* Currently only full window redraws are used, this should become per region
and maybe per button later.
Operators:
* Events are currently handled through two operators: button activate and menu
handle. Operators may not be the best way to implement this, since there are
currently some issues with events being missed, but they can become a special
handler type instead, this should not be a big change.
* The button activate operator runs as long as a button is active, and will
handle all interaction with that button until the button is not activated
anymore. This means clicking, text editing, number dragging, opening menu
blocks, etc.
* Since this operator has to be non-blocking, the ui_do_but code needed to made
non-blocking. That means variables that were previously on the stack, now
need to be stored away in a struct such that they can be accessed again when
the operator receives more events.
* Additionally the place in the ui_do_but code indicated the state, now that
needs to be set explicit in order to handle the right events in the right
state. So an activated button can be in one of these states: init, highlight,
wait_flash, wait_release, wait_key_event, num_editing, text_editing,
text_selecting, block_open, exit.
* For each button type an ui_apply_but_* function has also been separated out
from ui_do_but. This makes it possible to continuously apply the button as
text is being typed for example, and there is an option in the code to enable
this. Since the code non-blocking and can deal with the button being deleted
even, it should be safe to do this.
* When editing text, dragging numbers, etc, the actual data (but->poin) is not
being edited, since that would mean data is being edited without correct
updates happening, while some other part of blender may be accessing that
data in the meantime. So data values, strings, vectors are written to a
temporary location and only flush in the apply function.
Regions:
* Menus, color chooser, tooltips etc all create screen level regions. Such menu
blocks give a handle to the button that creates it, which will contain the
results of the menu block once a MESSAGE event is received from that menu
block.
* For this type of menu block the coordinates used to be in window space. They
are still created that way and ui_positionblock still works with window
coordinates, but after that the block and buttons are brought back to region
coordinates since these are now contained in a region.
* The flush/overdraw frontbuffer drawing code was removed, the windowmanager
should have enough information with these screen level regions to have full
control over what gets drawn when and to then do correct compositing.
Testing:
* The header in the time space currently has some buttons to test the UI code.
2008-11-11 18:31:32 +00:00
|
|
|
int UI_GetThemeValue(int colorid)
|
2008-01-07 18:03:41 +00:00
|
|
|
{
|
2010-12-20 03:59:22 +00:00
|
|
|
const unsigned char *cp;
|
2008-01-07 18:03:41 +00:00
|
|
|
|
2012-03-30 01:51:25 +00:00
|
|
|
cp = UI_ThemeGetColorPtr(theme_active, theme_spacetype, colorid);
|
2008-01-07 18:03:41 +00:00
|
|
|
return ((int) cp[0]);
|
|
|
|
}
|
|
|
|
|
2015-11-13 00:03:12 +11:00
|
|
|
/* versions of the function above, which take a space-type */
|
|
|
|
float UI_GetThemeValueTypef(int colorid, int spacetype)
|
|
|
|
{
|
|
|
|
const unsigned char *cp;
|
|
|
|
|
|
|
|
cp = UI_ThemeGetColorPtr(theme_active, spacetype, colorid);
|
|
|
|
return ((float)cp[0]);
|
|
|
|
}
|
|
|
|
|
|
|
|
int UI_GetThemeValueType(int colorid, int spacetype)
|
|
|
|
{
|
|
|
|
const unsigned char *cp;
|
|
|
|
|
|
|
|
cp = UI_ThemeGetColorPtr(theme_active, spacetype, colorid);
|
|
|
|
return ((int)cp[0]);
|
|
|
|
}
|
|
|
|
|
2008-01-07 18:03:41 +00:00
|
|
|
|
2012-10-20 20:20:02 +00:00
|
|
|
/* get the color, range 0.0-1.0 */
|
2012-05-22 08:24:52 +00:00
|
|
|
void UI_GetThemeColor3fv(int colorid, float col[3])
|
2008-01-07 18:03:41 +00:00
|
|
|
{
|
2010-12-20 03:59:22 +00:00
|
|
|
const unsigned char *cp;
|
2008-01-07 18:03:41 +00:00
|
|
|
|
2012-03-30 01:51:25 +00:00
|
|
|
cp = UI_ThemeGetColorPtr(theme_active, theme_spacetype, colorid);
|
|
|
|
col[0] = ((float)cp[0]) / 255.0f;
|
|
|
|
col[1] = ((float)cp[1]) / 255.0f;
|
|
|
|
col[2] = ((float)cp[2]) / 255.0f;
|
2008-01-07 18:03:41 +00:00
|
|
|
}
|
|
|
|
|
2012-06-04 01:17:37 +00:00
|
|
|
void UI_GetThemeColor4fv(int colorid, float col[4])
|
|
|
|
{
|
|
|
|
const unsigned char *cp;
|
|
|
|
|
|
|
|
cp = UI_ThemeGetColorPtr(theme_active, theme_spacetype, colorid);
|
|
|
|
col[0] = ((float)cp[0]) / 255.0f;
|
|
|
|
col[1] = ((float)cp[1]) / 255.0f;
|
|
|
|
col[2] = ((float)cp[2]) / 255.0f;
|
|
|
|
col[3] = ((float)cp[3]) / 255.0f;
|
|
|
|
}
|
|
|
|
|
2012-10-20 20:20:02 +00:00
|
|
|
/* get the color, range 0.0-1.0, complete with shading offset */
|
2012-05-22 08:24:52 +00:00
|
|
|
void UI_GetThemeColorShade3fv(int colorid, int offset, float col[3])
|
2010-01-08 11:14:30 +00:00
|
|
|
{
|
|
|
|
int r, g, b;
|
2010-12-20 03:59:22 +00:00
|
|
|
const unsigned char *cp;
|
2010-01-08 11:14:30 +00:00
|
|
|
|
2012-03-30 01:51:25 +00:00
|
|
|
cp = UI_ThemeGetColorPtr(theme_active, theme_spacetype, colorid);
|
2010-01-08 11:14:30 +00:00
|
|
|
|
2012-03-30 01:51:25 +00:00
|
|
|
r = offset + (int) cp[0];
|
2010-01-08 11:14:30 +00:00
|
|
|
CLAMP(r, 0, 255);
|
2012-03-30 01:51:25 +00:00
|
|
|
g = offset + (int) cp[1];
|
2010-01-08 11:14:30 +00:00
|
|
|
CLAMP(g, 0, 255);
|
2012-03-30 01:51:25 +00:00
|
|
|
b = offset + (int) cp[2];
|
2010-01-08 11:14:30 +00:00
|
|
|
CLAMP(b, 0, 255);
|
|
|
|
|
2012-03-30 01:51:25 +00:00
|
|
|
col[0] = ((float)r) / 255.0f;
|
|
|
|
col[1] = ((float)g) / 255.0f;
|
|
|
|
col[2] = ((float)b) / 255.0f;
|
2010-01-08 11:14:30 +00:00
|
|
|
}
|
|
|
|
|
2012-05-22 08:24:52 +00:00
|
|
|
void UI_GetThemeColorShade3ubv(int colorid, int offset, unsigned char col[3])
|
|
|
|
{
|
|
|
|
int r, g, b;
|
|
|
|
const unsigned char *cp;
|
|
|
|
|
|
|
|
cp = UI_ThemeGetColorPtr(theme_active, theme_spacetype, colorid);
|
|
|
|
|
|
|
|
r = offset + (int) cp[0];
|
|
|
|
CLAMP(r, 0, 255);
|
|
|
|
g = offset + (int) cp[1];
|
|
|
|
CLAMP(g, 0, 255);
|
|
|
|
b = offset + (int) cp[2];
|
|
|
|
CLAMP(b, 0, 255);
|
|
|
|
|
|
|
|
col[0] = r;
|
|
|
|
col[1] = g;
|
|
|
|
col[2] = b;
|
|
|
|
}
|
|
|
|
|
2017-02-01 20:40:49 -02:00
|
|
|
void UI_GetThemeColorBlendShade3ubv(int colorid1, int colorid2, float fac, int offset, unsigned char col[3])
|
|
|
|
{
|
|
|
|
const unsigned char *cp1, *cp2;
|
|
|
|
|
|
|
|
cp1 = UI_ThemeGetColorPtr(theme_active, theme_spacetype, colorid1);
|
|
|
|
cp2 = UI_ThemeGetColorPtr(theme_active, theme_spacetype, colorid2);
|
|
|
|
|
|
|
|
CLAMP(fac, 0.0f, 1.0f);
|
|
|
|
|
2017-03-15 13:48:47 +01:00
|
|
|
float blend[3];
|
|
|
|
blend[0] = offset + floorf((1.0f - fac) * cp1[0] + fac * cp2[0]);
|
|
|
|
blend[1] = offset + floorf((1.0f - fac) * cp1[1] + fac * cp2[1]);
|
|
|
|
blend[2] = offset + floorf((1.0f - fac) * cp1[2] + fac * cp2[2]);
|
|
|
|
|
|
|
|
F3TOCHAR3(blend, col);
|
2017-02-01 20:40:49 -02:00
|
|
|
}
|
|
|
|
|
2017-02-08 18:33:40 -05:00
|
|
|
void UI_GetThemeColorShade4ubv(int colorid, int offset, unsigned char col[4])
|
|
|
|
{
|
|
|
|
int r, g, b;
|
|
|
|
const unsigned char *cp;
|
|
|
|
|
|
|
|
cp = UI_ThemeGetColorPtr(theme_active, theme_spacetype, colorid);
|
|
|
|
r = offset + (int) cp[0];
|
|
|
|
CLAMP(r, 0, 255);
|
|
|
|
g = offset + (int) cp[1];
|
|
|
|
CLAMP(g, 0, 255);
|
|
|
|
b = offset + (int) cp[2];
|
|
|
|
CLAMP(b, 0, 255);
|
|
|
|
|
|
|
|
col[0] = r;
|
|
|
|
col[1] = g;
|
|
|
|
col[2] = b;
|
|
|
|
col[3] = cp[3];
|
|
|
|
}
|
|
|
|
|
2016-10-07 14:56:08 -04:00
|
|
|
void UI_GetThemeColorShadeAlpha4fv(int colorid, int coloffset, int alphaoffset, float col[4])
|
|
|
|
{
|
|
|
|
int r, g, b, a;
|
|
|
|
const unsigned char *cp;
|
|
|
|
|
|
|
|
cp = UI_ThemeGetColorPtr(theme_active, theme_spacetype, colorid);
|
|
|
|
|
|
|
|
r = coloffset + (int) cp[0];
|
|
|
|
CLAMP(r, 0, 255);
|
|
|
|
g = coloffset + (int) cp[1];
|
|
|
|
CLAMP(g, 0, 255);
|
|
|
|
b = coloffset + (int) cp[2];
|
|
|
|
CLAMP(b, 0, 255);
|
|
|
|
a = alphaoffset + (int) cp[3];
|
|
|
|
CLAMP(b, 0, 255);
|
|
|
|
|
|
|
|
col[0] = ((float)r) / 255.0f;
|
|
|
|
col[1] = ((float)g) / 255.0f;
|
|
|
|
col[2] = ((float)b) / 255.0f;
|
|
|
|
col[3] = ((float)a) / 255.0f;
|
|
|
|
}
|
|
|
|
|
2017-04-27 19:31:19 +10:00
|
|
|
void UI_GetThemeColorBlendShade3fv(int colorid1, int colorid2, float fac, int offset, float col[3])
|
|
|
|
{
|
|
|
|
int r, g, b;
|
|
|
|
const unsigned char *cp1, *cp2;
|
|
|
|
|
|
|
|
cp1 = UI_ThemeGetColorPtr(theme_active, theme_spacetype, colorid1);
|
|
|
|
cp2 = UI_ThemeGetColorPtr(theme_active, theme_spacetype, colorid2);
|
|
|
|
|
|
|
|
CLAMP(fac, 0.0f, 1.0f);
|
|
|
|
|
|
|
|
r = offset + floorf((1.0f - fac) * cp1[0] + fac * cp2[0]);
|
|
|
|
CLAMP(r, 0, 255);
|
|
|
|
g = offset + floorf((1.0f - fac) * cp1[1] + fac * cp2[1]);
|
|
|
|
CLAMP(g, 0, 255);
|
|
|
|
b = offset + floorf((1.0f - fac) * cp1[2] + fac * cp2[2]);
|
|
|
|
CLAMP(b, 0, 255);
|
|
|
|
|
|
|
|
col[0] = ((float)r) / 255.0f;
|
|
|
|
col[1] = ((float)g) / 255.0f;
|
|
|
|
col[2] = ((float)b) / 255.0f;
|
|
|
|
}
|
|
|
|
|
2016-10-13 20:06:44 +00:00
|
|
|
void UI_GetThemeColorBlendShade4fv(int colorid1, int colorid2, float fac, int offset, float col[4])
|
|
|
|
{
|
|
|
|
int r, g, b, a;
|
|
|
|
const unsigned char *cp1, *cp2;
|
|
|
|
|
|
|
|
cp1 = UI_ThemeGetColorPtr(theme_active, theme_spacetype, colorid1);
|
|
|
|
cp2 = UI_ThemeGetColorPtr(theme_active, theme_spacetype, colorid2);
|
|
|
|
|
|
|
|
CLAMP(fac, 0.0f, 1.0f);
|
|
|
|
|
|
|
|
r = offset + floorf((1.0f - fac) * cp1[0] + fac * cp2[0]);
|
|
|
|
CLAMP(r, 0, 255);
|
|
|
|
g = offset + floorf((1.0f - fac) * cp1[1] + fac * cp2[1]);
|
|
|
|
CLAMP(g, 0, 255);
|
|
|
|
b = offset + floorf((1.0f - fac) * cp1[2] + fac * cp2[2]);
|
|
|
|
CLAMP(b, 0, 255);
|
|
|
|
a = offset + floorf((1.0f - fac) * cp1[3] + fac * cp2[3]);
|
|
|
|
CLAMP(a, 0, 255);
|
|
|
|
|
|
|
|
col[0] = ((float)r) / 255.0f;
|
|
|
|
col[1] = ((float)g) / 255.0f;
|
|
|
|
col[2] = ((float)b) / 255.0f;
|
|
|
|
col[3] = ((float)a) / 255.0f;
|
|
|
|
}
|
|
|
|
|
2012-10-20 20:20:02 +00:00
|
|
|
/* get the color, in char pointer */
|
2010-12-20 03:59:22 +00:00
|
|
|
void UI_GetThemeColor3ubv(int colorid, unsigned char col[3])
|
2008-01-07 18:03:41 +00:00
|
|
|
{
|
2010-12-20 03:59:22 +00:00
|
|
|
const unsigned char *cp;
|
2008-01-07 18:03:41 +00:00
|
|
|
|
2012-03-30 01:51:25 +00:00
|
|
|
cp = UI_ThemeGetColorPtr(theme_active, theme_spacetype, colorid);
|
|
|
|
col[0] = cp[0];
|
|
|
|
col[1] = cp[1];
|
|
|
|
col[2] = cp[2];
|
2008-01-07 18:03:41 +00:00
|
|
|
}
|
|
|
|
|
2016-07-07 23:37:15 +12:00
|
|
|
/* get the color, range 0.0-1.0, complete with shading offset */
|
|
|
|
void UI_GetThemeColorShade4fv(int colorid, int offset, float col[4])
|
|
|
|
{
|
|
|
|
int r, g, b, a;
|
|
|
|
const unsigned char *cp;
|
|
|
|
|
|
|
|
cp = UI_ThemeGetColorPtr(theme_active, theme_spacetype, colorid);
|
|
|
|
|
|
|
|
r = offset + (int) cp[0];
|
|
|
|
CLAMP(r, 0, 255);
|
|
|
|
g = offset + (int) cp[1];
|
|
|
|
CLAMP(g, 0, 255);
|
|
|
|
b = offset + (int) cp[2];
|
|
|
|
CLAMP(b, 0, 255);
|
|
|
|
|
|
|
|
a = (int) cp[3]; /* no shading offset... */
|
|
|
|
CLAMP(a, 0, 255);
|
|
|
|
|
|
|
|
col[0] = ((float)r) / 255.0f;
|
|
|
|
col[1] = ((float)g) / 255.0f;
|
|
|
|
col[2] = ((float)b) / 255.0f;
|
|
|
|
col[3] = ((float)a) / 255.0f;
|
|
|
|
}
|
|
|
|
|
2012-10-20 20:20:02 +00:00
|
|
|
/* get the color, in char pointer */
|
2010-12-20 03:59:22 +00:00
|
|
|
void UI_GetThemeColor4ubv(int colorid, unsigned char col[4])
|
2008-01-07 18:03:41 +00:00
|
|
|
{
|
2010-12-20 03:59:22 +00:00
|
|
|
const unsigned char *cp;
|
2008-01-07 18:03:41 +00:00
|
|
|
|
2012-03-30 01:51:25 +00:00
|
|
|
cp = UI_ThemeGetColorPtr(theme_active, theme_spacetype, colorid);
|
|
|
|
col[0] = cp[0];
|
|
|
|
col[1] = cp[1];
|
|
|
|
col[2] = cp[2];
|
|
|
|
col[3] = cp[3];
|
2008-01-07 18:03:41 +00:00
|
|
|
}
|
|
|
|
|
2010-12-20 03:59:22 +00:00
|
|
|
void UI_GetThemeColorType4ubv(int colorid, int spacetype, char col[4])
|
2008-01-07 18:03:41 +00:00
|
|
|
{
|
2010-12-20 03:59:22 +00:00
|
|
|
const unsigned char *cp;
|
2008-01-07 18:03:41 +00:00
|
|
|
|
2012-03-30 01:51:25 +00:00
|
|
|
cp = UI_ThemeGetColorPtr(theme_active, spacetype, colorid);
|
|
|
|
col[0] = cp[0];
|
|
|
|
col[1] = cp[1];
|
|
|
|
col[2] = cp[2];
|
|
|
|
col[3] = cp[3];
|
2008-01-07 18:03:41 +00:00
|
|
|
}
|
|
|
|
|
2012-10-20 20:20:02 +00:00
|
|
|
/* blends and shades between two char color pointers */
|
2010-12-20 03:59:22 +00:00
|
|
|
void UI_ColorPtrBlendShade3ubv(const unsigned char cp1[3], const unsigned char cp2[3], float fac, int offset)
|
2008-01-07 18:03:41 +00:00
|
|
|
{
|
|
|
|
int r, g, b;
|
2011-03-27 14:52:16 +00:00
|
|
|
CLAMP(fac, 0.0f, 1.0f);
|
2012-03-30 01:51:25 +00:00
|
|
|
r = offset + floorf((1.0f - fac) * cp1[0] + fac * cp2[0]);
|
|
|
|
g = offset + floorf((1.0f - fac) * cp1[1] + fac * cp2[1]);
|
|
|
|
b = offset + floorf((1.0f - fac) * cp1[2] + fac * cp2[2]);
|
|
|
|
|
|
|
|
r = r < 0 ? 0 : (r > 255 ? 255 : r);
|
|
|
|
g = g < 0 ? 0 : (g > 255 ? 255 : g);
|
|
|
|
b = b < 0 ? 0 : (b > 255 ? 255 : b);
|
2008-01-07 18:03:41 +00:00
|
|
|
|
|
|
|
glColor3ub(r, g, b);
|
|
|
|
}
|
|
|
|
|
2011-09-11 04:31:09 +00:00
|
|
|
void UI_GetColorPtrShade3ubv(const unsigned char cp[3], unsigned char col[3], int offset)
|
|
|
|
{
|
|
|
|
int r, g, b;
|
|
|
|
|
2012-03-30 01:51:25 +00:00
|
|
|
r = offset + (int)cp[0];
|
|
|
|
g = offset + (int)cp[1];
|
|
|
|
b = offset + (int)cp[2];
|
2011-09-11 04:31:09 +00:00
|
|
|
|
|
|
|
CLAMP(r, 0, 255);
|
|
|
|
CLAMP(g, 0, 255);
|
|
|
|
CLAMP(b, 0, 255);
|
|
|
|
|
|
|
|
col[0] = r;
|
|
|
|
col[1] = g;
|
|
|
|
col[2] = b;
|
|
|
|
}
|
|
|
|
|
2012-10-20 20:20:02 +00:00
|
|
|
/* get a 3 byte color, blended and shaded between two other char color pointers */
|
2015-05-05 03:13:47 +10:00
|
|
|
void UI_GetColorPtrBlendShade3ubv(
|
|
|
|
const unsigned char cp1[3], const unsigned char cp2[3], unsigned char col[3],
|
|
|
|
float fac, int offset)
|
2008-01-07 18:03:41 +00:00
|
|
|
{
|
|
|
|
int r, g, b;
|
2011-03-27 14:52:16 +00:00
|
|
|
|
|
|
|
CLAMP(fac, 0.0f, 1.0f);
|
2012-03-30 01:51:25 +00:00
|
|
|
r = offset + floor((1.0f - fac) * cp1[0] + fac * cp2[0]);
|
|
|
|
g = offset + floor((1.0f - fac) * cp1[1] + fac * cp2[1]);
|
|
|
|
b = offset + floor((1.0f - fac) * cp1[2] + fac * cp2[2]);
|
2011-03-27 14:52:16 +00:00
|
|
|
|
|
|
|
CLAMP(r, 0, 255);
|
|
|
|
CLAMP(g, 0, 255);
|
|
|
|
CLAMP(b, 0, 255);
|
|
|
|
|
2008-01-07 18:03:41 +00:00
|
|
|
col[0] = r;
|
|
|
|
col[1] = g;
|
|
|
|
col[2] = b;
|
|
|
|
}
|
Port of part of the Interface code to 2.50.
This is based on the current trunk version, so these files should not need
merges. There's two things (clipboard and intptr_t) that are missing in 2.50
and commented out with XXX 2.48, these can be enabled again once trunk is
merged into this branch.
Further this is not all interface code, there are many parts commented out:
* interface.c: nearly all button types, missing: links, chartab, keyevent.
* interface_draw.c: almost all code, with some small exceptions.
* interface_ops.c: this replaces ui_do_but and uiDoBlocks with two operators,
making it non-blocking.
* interface_regions: this is a part of interface.c, split off, contains code to
create regions for tooltips, menus, pupmenu (that one is crashing currently),
color chooser, basically regions with buttons which is fairly independent of
core interface code.
* interface_panel.c and interface_icons.c: not ported over, so no panels and
icons yet. Panels should probably become (free floating) regions?
* text.c: (formerly language.c) for drawing text and translation. this works
but is using bad globals still and could be cleaned up.
Header Files:
* ED_datafiles.h now has declarations for datatoc_ files, so those extern
declarations can be #included instead of repeated.
* The user interface code is in UI_interface.h and other UI_* files.
Core:
* The API for creating blocks, buttons, etc is nearly the same still. Blocks
are now created per region instead of per area.
* The code was made non-blocking, which means that any changes and redraws
should be possible while editing a button. That means though that we need
some sort of persistence even though the blender model is to recreate buttons
for each redraw. So when a new block is created, some matching happens to
find out which buttons correspond to buttons in the previously created block,
and for activated buttons some data is then copied over to the new button.
* Added UI_init/UI_init_userdef/UI_exit functions that should initialize code
in this module, instead of multiple function calls in the windowmanager.
* Removed most static/globals from interface.c.
* Removed UIafterfunc_ I don't think it's needed anymore, and not sure how it
would integrate here?
* Currently only full window redraws are used, this should become per region
and maybe per button later.
Operators:
* Events are currently handled through two operators: button activate and menu
handle. Operators may not be the best way to implement this, since there are
currently some issues with events being missed, but they can become a special
handler type instead, this should not be a big change.
* The button activate operator runs as long as a button is active, and will
handle all interaction with that button until the button is not activated
anymore. This means clicking, text editing, number dragging, opening menu
blocks, etc.
* Since this operator has to be non-blocking, the ui_do_but code needed to made
non-blocking. That means variables that were previously on the stack, now
need to be stored away in a struct such that they can be accessed again when
the operator receives more events.
* Additionally the place in the ui_do_but code indicated the state, now that
needs to be set explicit in order to handle the right events in the right
state. So an activated button can be in one of these states: init, highlight,
wait_flash, wait_release, wait_key_event, num_editing, text_editing,
text_selecting, block_open, exit.
* For each button type an ui_apply_but_* function has also been separated out
from ui_do_but. This makes it possible to continuously apply the button as
text is being typed for example, and there is an option in the code to enable
this. Since the code non-blocking and can deal with the button being deleted
even, it should be safe to do this.
* When editing text, dragging numbers, etc, the actual data (but->poin) is not
being edited, since that would mean data is being edited without correct
updates happening, while some other part of blender may be accessing that
data in the meantime. So data values, strings, vectors are written to a
temporary location and only flush in the apply function.
Regions:
* Menus, color chooser, tooltips etc all create screen level regions. Such menu
blocks give a handle to the button that creates it, which will contain the
results of the menu block once a MESSAGE event is received from that menu
block.
* For this type of menu block the coordinates used to be in window space. They
are still created that way and ui_positionblock still works with window
coordinates, but after that the block and buttons are brought back to region
coordinates since these are now contained in a region.
* The flush/overdraw frontbuffer drawing code was removed, the windowmanager
should have enough information with these screen level regions to have full
control over what gets drawn when and to then do correct compositing.
Testing:
* The header in the time space currently has some buttons to test the UI code.
2008-11-11 18:31:32 +00:00
|
|
|
|
2010-04-06 07:02:16 +00:00
|
|
|
void UI_ThemeClearColor(int colorid)
|
|
|
|
{
|
|
|
|
float col[3];
|
|
|
|
|
|
|
|
UI_GetThemeColor3fv(colorid, col);
|
2015-02-23 18:49:29 +01:00
|
|
|
glClearColor(col[0], col[1], col[2], 0.0f);
|
2010-04-06 07:02:16 +00:00
|
|
|
}
|
|
|
|
|
2015-03-10 16:34:40 +01:00
|
|
|
void UI_ThemeClearColorAlpha(int colorid, float alpha)
|
|
|
|
{
|
|
|
|
float col[3];
|
|
|
|
UI_GetThemeColor3fv(colorid, col);
|
|
|
|
glClearColor(col[0], col[1], col[2], alpha);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2012-12-20 16:50:39 +00:00
|
|
|
int UI_ThemeMenuShadowWidth(void)
|
|
|
|
{
|
|
|
|
bTheme *btheme = UI_GetTheme();
|
|
|
|
return (int)(btheme->tui.menu_shadow_width * UI_DPI_FAC);
|
|
|
|
}
|
|
|
|
|
2010-12-20 03:59:22 +00:00
|
|
|
void UI_make_axis_color(const unsigned char src_col[3], unsigned char dst_col[3], const char axis)
|
2009-04-30 11:47:35 +00:00
|
|
|
{
|
Axis Colours are now Themeable
This commit allows you to set the RGB <-> XYZ axis colours used for things like
the mini axis indicator, grid axis indicators, manipulators, transform
constraint indicators, F-Curves (when using XYZ to RGB colouring option), and
perhaps something else I've missed. Previously, these places all used hardcoded
defines (220 * i/j/k), but the readability of these colours was often quite
poor, especially when used with certain themes.
The settings for these colours can be found under the "User Interface" section
of the themes (i.e. same set of colours is used across editors). I could have
made these per editor, but since it's unlikely that these will need to be too
different across editors in practice (+ being easier to version patch), they are
stored under the UI section.
2012-11-09 06:36:11 +00:00
|
|
|
unsigned char col[3];
|
|
|
|
|
2012-04-28 06:31:57 +00:00
|
|
|
switch (axis) {
|
2010-12-20 03:59:22 +00:00
|
|
|
case 'X':
|
Axis Colours are now Themeable
This commit allows you to set the RGB <-> XYZ axis colours used for things like
the mini axis indicator, grid axis indicators, manipulators, transform
constraint indicators, F-Curves (when using XYZ to RGB colouring option), and
perhaps something else I've missed. Previously, these places all used hardcoded
defines (220 * i/j/k), but the readability of these colours was often quite
poor, especially when used with certain themes.
The settings for these colours can be found under the "User Interface" section
of the themes (i.e. same set of colours is used across editors). I could have
made these per editor, but since it's unlikely that these will need to be too
different across editors in practice (+ being easier to version patch), they are
stored under the UI section.
2012-11-09 06:36:11 +00:00
|
|
|
UI_GetThemeColor3ubv(TH_AXIS_X, col);
|
|
|
|
UI_GetColorPtrBlendShade3ubv(src_col, col, dst_col, 0.5f, -10);
|
2009-04-30 11:47:35 +00:00
|
|
|
break;
|
2010-12-20 03:59:22 +00:00
|
|
|
case 'Y':
|
Axis Colours are now Themeable
This commit allows you to set the RGB <-> XYZ axis colours used for things like
the mini axis indicator, grid axis indicators, manipulators, transform
constraint indicators, F-Curves (when using XYZ to RGB colouring option), and
perhaps something else I've missed. Previously, these places all used hardcoded
defines (220 * i/j/k), but the readability of these colours was often quite
poor, especially when used with certain themes.
The settings for these colours can be found under the "User Interface" section
of the themes (i.e. same set of colours is used across editors). I could have
made these per editor, but since it's unlikely that these will need to be too
different across editors in practice (+ being easier to version patch), they are
stored under the UI section.
2012-11-09 06:36:11 +00:00
|
|
|
UI_GetThemeColor3ubv(TH_AXIS_Y, col);
|
|
|
|
UI_GetColorPtrBlendShade3ubv(src_col, col, dst_col, 0.5f, -10);
|
2009-04-30 11:47:35 +00:00
|
|
|
break;
|
2010-12-20 03:59:22 +00:00
|
|
|
case 'Z':
|
Axis Colours are now Themeable
This commit allows you to set the RGB <-> XYZ axis colours used for things like
the mini axis indicator, grid axis indicators, manipulators, transform
constraint indicators, F-Curves (when using XYZ to RGB colouring option), and
perhaps something else I've missed. Previously, these places all used hardcoded
defines (220 * i/j/k), but the readability of these colours was often quite
poor, especially when used with certain themes.
The settings for these colours can be found under the "User Interface" section
of the themes (i.e. same set of colours is used across editors). I could have
made these per editor, but since it's unlikely that these will need to be too
different across editors in practice (+ being easier to version patch), they are
stored under the UI section.
2012-11-09 06:36:11 +00:00
|
|
|
UI_GetThemeColor3ubv(TH_AXIS_Z, col);
|
|
|
|
UI_GetColorPtrBlendShade3ubv(src_col, col, dst_col, 0.5f, -10);
|
2010-12-20 03:59:22 +00:00
|
|
|
break;
|
|
|
|
default:
|
2013-07-21 08:16:37 +00:00
|
|
|
BLI_assert(0);
|
|
|
|
break;
|
2009-04-30 11:47:35 +00:00
|
|
|
}
|
|
|
|
}
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
|
|
|
|
/* ************************************************************* */
|
|
|
|
|
|
|
|
/* patching UserDef struct and Themes */
|
|
|
|
void init_userdef_do_versions(void)
|
|
|
|
{
|
2012-03-30 01:51:25 +00:00
|
|
|
Main *bmain = G.main;
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
|
2015-07-01 12:47:44 +10:00
|
|
|
#define USER_VERSION_ATLEAST(ver, subver) MAIN_VERSION_ATLEAST(bmain, ver, subver)
|
|
|
|
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
/* the UserDef struct is not corrected with do_versions() .... ugh! */
|
2012-03-24 06:38:07 +00:00
|
|
|
if (U.wheellinescroll == 0) U.wheellinescroll = 3;
|
2012-03-30 01:51:25 +00:00
|
|
|
if (U.menuthreshold1 == 0) {
|
|
|
|
U.menuthreshold1 = 5;
|
|
|
|
U.menuthreshold2 = 2;
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
}
|
2012-03-30 01:51:25 +00:00
|
|
|
if (U.tb_leftmouse == 0) {
|
|
|
|
U.tb_leftmouse = 5;
|
|
|
|
U.tb_rightmouse = 5;
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
}
|
2012-03-30 01:51:25 +00:00
|
|
|
if (U.mixbufsize == 0) U.mixbufsize = 2048;
|
2015-01-26 16:03:11 +01:00
|
|
|
if (STREQ(U.tempdir, "/")) {
|
2014-11-23 15:54:29 +01:00
|
|
|
BKE_tempdir_system_init(U.tempdir);
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
}
|
2010-08-25 04:48:42 +00:00
|
|
|
if (U.autokey_mode == 0) {
|
|
|
|
/* 'add/replace' but not on */
|
|
|
|
U.autokey_mode = 2;
|
|
|
|
}
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
if (U.savetime <= 0) {
|
|
|
|
U.savetime = 1;
|
2011-01-19 09:13:24 +00:00
|
|
|
// XXX error(STRINGIFY(BLENDER_STARTUP_FILE)" is buggy, please consider removing it.\n");
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
}
|
|
|
|
/* transform widget settings */
|
2012-03-30 01:51:25 +00:00
|
|
|
if (U.tw_hotspot == 0) {
|
|
|
|
U.tw_hotspot = 14;
|
2014-01-16 16:47:12 +11:00
|
|
|
U.tw_size = 25; /* percentage of window size */
|
2012-07-06 23:56:59 +00:00
|
|
|
U.tw_handlesize = 16; /* percentage of widget radius */
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
}
|
2016-10-07 16:34:55 +02:00
|
|
|
if (U.manipulator_scale == 0)
|
|
|
|
U.manipulator_scale = 75;
|
2015-06-11 18:12:26 +02:00
|
|
|
if (U.pad_rot_angle == 0.0f)
|
|
|
|
U.pad_rot_angle = 15.0f;
|
2013-11-06 10:59:05 +00:00
|
|
|
|
2012-03-22 12:19:31 +00:00
|
|
|
/* graph editor - unselected F-Curve visibility */
|
|
|
|
if (U.fcu_inactive_alpha == 0) {
|
|
|
|
U.fcu_inactive_alpha = 0.25f;
|
|
|
|
}
|
|
|
|
|
2011-07-28 12:17:24 +00:00
|
|
|
/* signal for derivedmesh to use colorband */
|
2012-03-09 00:41:09 +00:00
|
|
|
/* run in case this was on and is now off in the user prefs [#28096] */
|
2013-03-05 20:30:38 +00:00
|
|
|
vDM_ColorBand_store((U.flag & USER_CUSTOM_RANGE) ? (&U.coba_weight) : NULL, UI_GetTheme()->tv3d.vertex_unreferenced);
|
2011-07-28 12:17:24 +00:00
|
|
|
|
2015-07-01 12:47:44 +10:00
|
|
|
if (!USER_VERSION_ATLEAST(192, 0)) {
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
strcpy(U.sounddir, "/");
|
|
|
|
}
|
|
|
|
|
|
|
|
/* patch to set Dupli Armature */
|
2015-07-01 12:47:44 +10:00
|
|
|
if (!USER_VERSION_ATLEAST(220, 0)) {
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
U.dupflag |= USER_DUP_ARM;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* added seam, normal color, undo */
|
2015-07-01 12:47:44 +10:00
|
|
|
if (!USER_VERSION_ATLEAST(235, 0)) {
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
bTheme *btheme;
|
|
|
|
|
|
|
|
U.uiflag |= USER_GLOBALUNDO;
|
2012-03-30 01:51:25 +00:00
|
|
|
if (U.undosteps == 0) U.undosteps = 32;
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
|
2012-03-30 01:51:25 +00:00
|
|
|
for (btheme = U.themes.first; btheme; btheme = btheme->next) {
|
2012-05-27 19:40:36 +00:00
|
|
|
/* check for (alpha == 0) is safe, then color was never set */
|
2012-03-30 01:51:25 +00:00
|
|
|
if (btheme->tv3d.edge_seam[3] == 0) {
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set(btheme->tv3d.edge_seam, 230, 150, 50, 255);
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
}
|
2012-03-30 01:51:25 +00:00
|
|
|
if (btheme->tv3d.normal[3] == 0) {
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set(btheme->tv3d.normal, 0x22, 0xDD, 0xDD, 255);
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
}
|
2012-03-30 01:51:25 +00:00
|
|
|
if (btheme->tv3d.vertex_normal[3] == 0) {
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set(btheme->tv3d.vertex_normal, 0x23, 0x61, 0xDD, 255);
|
2010-02-11 03:37:51 +00:00
|
|
|
}
|
2012-03-30 01:51:25 +00:00
|
|
|
if (btheme->tv3d.face_dot[3] == 0) {
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set(btheme->tv3d.face_dot, 255, 138, 48, 255);
|
2012-03-30 01:51:25 +00:00
|
|
|
btheme->tv3d.facedot_size = 4;
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2015-07-01 12:47:44 +10:00
|
|
|
if (!USER_VERSION_ATLEAST(236, 0)) {
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
/* illegal combo... */
|
|
|
|
if (U.flag & USER_LMOUSESELECT)
|
|
|
|
U.flag &= ~USER_TWOBUTTONMOUSE;
|
|
|
|
}
|
2015-07-01 12:47:44 +10:00
|
|
|
if (!USER_VERSION_ATLEAST(237, 0)) {
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
bTheme *btheme;
|
|
|
|
/* new space type */
|
2012-03-30 01:51:25 +00:00
|
|
|
for (btheme = U.themes.first; btheme; btheme = btheme->next) {
|
2012-05-27 19:40:36 +00:00
|
|
|
/* check for (alpha == 0) is safe, then color was never set */
|
2012-03-30 01:51:25 +00:00
|
|
|
if (btheme->ttime.back[3] == 0) {
|
2012-07-07 22:51:57 +00:00
|
|
|
/* copied from ui_theme_init_default */
|
2012-03-30 01:51:25 +00:00
|
|
|
btheme->ttime = btheme->tv3d;
|
|
|
|
rgba_char_args_set_fl(btheme->ttime.back, 0.45, 0.45, 0.45, 1.0);
|
|
|
|
rgba_char_args_set_fl(btheme->ttime.grid, 0.36, 0.36, 0.36, 1.0);
|
2012-10-20 20:20:02 +00:00
|
|
|
rgba_char_args_set(btheme->ttime.shade1, 173, 173, 173, 255); /* sliders */
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
}
|
2012-03-30 01:51:25 +00:00
|
|
|
if (btheme->text.syntaxn[3] == 0) {
|
|
|
|
rgba_char_args_set(btheme->text.syntaxn, 0, 0, 200, 255); /* Numbers Blue*/
|
|
|
|
rgba_char_args_set(btheme->text.syntaxl, 100, 0, 0, 255); /* Strings red */
|
|
|
|
rgba_char_args_set(btheme->text.syntaxc, 0, 100, 50, 255); /* Comments greenish */
|
|
|
|
rgba_char_args_set(btheme->text.syntaxv, 95, 95, 0, 255); /* Special */
|
|
|
|
rgba_char_args_set(btheme->text.syntaxb, 128, 0, 80, 255); /* Builtin, red-purple */
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2015-07-01 12:47:44 +10:00
|
|
|
if (!USER_VERSION_ATLEAST(238, 0)) {
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
bTheme *btheme;
|
|
|
|
/* bone colors */
|
2012-03-30 01:51:25 +00:00
|
|
|
for (btheme = U.themes.first; btheme; btheme = btheme->next) {
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
/* check for alpha==0 is safe, then color was never set */
|
2012-03-30 01:51:25 +00:00
|
|
|
if (btheme->tv3d.bone_solid[3] == 0) {
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set(btheme->tv3d.bone_solid, 200, 200, 200, 255);
|
|
|
|
rgba_char_args_set(btheme->tv3d.bone_pose, 80, 200, 255, 80);
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2015-07-01 12:47:44 +10:00
|
|
|
if (!USER_VERSION_ATLEAST(239, 0)) {
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
bTheme *btheme;
|
|
|
|
/* bone colors */
|
2012-03-30 01:51:25 +00:00
|
|
|
for (btheme = U.themes.first; btheme; btheme = btheme->next) {
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
/* check for alpha==0 is safe, then color was never set */
|
2012-03-30 01:51:25 +00:00
|
|
|
if (btheme->tnla.strip[3] == 0) {
|
|
|
|
rgba_char_args_set(btheme->tnla.strip_select, 0xff, 0xff, 0xaa, 255);
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set(btheme->tnla.strip, 0xe4, 0x9c, 0xc6, 255);
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2015-07-01 12:47:44 +10:00
|
|
|
if (!USER_VERSION_ATLEAST(240, 0)) {
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
bTheme *btheme;
|
|
|
|
|
2012-03-30 01:51:25 +00:00
|
|
|
for (btheme = U.themes.first; btheme; btheme = btheme->next) {
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
/* Lamp theme, check for alpha==0 is safe, then color was never set */
|
2012-03-30 01:51:25 +00:00
|
|
|
if (btheme->tv3d.lamp[3] == 0) {
|
|
|
|
rgba_char_args_set(btheme->tv3d.lamp, 0, 0, 0, 40);
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
/* TEMPORAL, remove me! (ton) */
|
|
|
|
U.uiflag |= USER_PLAINMENUS;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
2012-03-30 01:51:25 +00:00
|
|
|
if (U.obcenter_dia == 0) U.obcenter_dia = 6;
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
}
|
2015-07-01 12:47:44 +10:00
|
|
|
if (!USER_VERSION_ATLEAST(242, 0)) {
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
bTheme *btheme;
|
2012-03-30 01:51:25 +00:00
|
|
|
for (btheme = U.themes.first; btheme; btheme = btheme->next) {
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
/* Node editor theme, check for alpha==0 is safe, then color was never set */
|
2012-03-30 01:51:25 +00:00
|
|
|
if (btheme->tnode.syntaxn[3] == 0) {
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
/* re-uses syntax color storage */
|
2012-03-30 01:51:25 +00:00
|
|
|
btheme->tnode = btheme->tv3d;
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set(btheme->tnode.edge_select, 255, 255, 255, 255);
|
2012-03-30 01:51:25 +00:00
|
|
|
rgba_char_args_set(btheme->tnode.syntaxl, 150, 150, 150, 255); /* TH_NODE, backdrop */
|
|
|
|
rgba_char_args_set(btheme->tnode.syntaxn, 129, 131, 144, 255); /* in/output */
|
|
|
|
rgba_char_args_set(btheme->tnode.syntaxb, 127, 127, 127, 255); /* operator */
|
|
|
|
rgba_char_args_set(btheme->tnode.syntaxv, 142, 138, 145, 255); /* generator */
|
|
|
|
rgba_char_args_set(btheme->tnode.syntaxc, 120, 145, 120, 255); /* group */
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
}
|
|
|
|
/* Group theme colors */
|
2012-03-30 01:51:25 +00:00
|
|
|
if (btheme->tv3d.group[3] == 0) {
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set(btheme->tv3d.group, 0x0C, 0x30, 0x0C, 255);
|
|
|
|
rgba_char_args_set(btheme->tv3d.group_active, 0x66, 0xFF, 0x66, 255);
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
}
|
|
|
|
/* Sequence editor theme*/
|
2012-03-30 01:51:25 +00:00
|
|
|
if (btheme->tseq.movie[3] == 0) {
|
|
|
|
rgba_char_args_set(btheme->tseq.movie, 81, 105, 135, 255);
|
|
|
|
rgba_char_args_set(btheme->tseq.image, 109, 88, 129, 255);
|
|
|
|
rgba_char_args_set(btheme->tseq.scene, 78, 152, 62, 255);
|
|
|
|
rgba_char_args_set(btheme->tseq.audio, 46, 143, 143, 255);
|
|
|
|
rgba_char_args_set(btheme->tseq.effect, 169, 84, 124, 255);
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set(btheme->tseq.transition, 162, 95, 111, 255);
|
2012-03-30 01:51:25 +00:00
|
|
|
rgba_char_args_set(btheme->tseq.meta, 109, 145, 131, 255);
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* set defaults for 3D View rotating axis indicator */
|
2010-07-15 11:51:43 +00:00
|
|
|
/* since size can't be set to 0, this indicates it's not saved in startup.blend */
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
if (U.rvisize == 0) {
|
|
|
|
U.rvisize = 15;
|
|
|
|
U.rvibright = 8;
|
|
|
|
U.uiflag |= USER_SHOW_ROTVIEWICON;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
2015-07-01 12:47:44 +10:00
|
|
|
if (!USER_VERSION_ATLEAST(243, 0)) {
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
bTheme *btheme;
|
|
|
|
|
2012-03-30 01:51:25 +00:00
|
|
|
for (btheme = U.themes.first; btheme; btheme = btheme->next) {
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
/* long keyframe color */
|
|
|
|
/* check for alpha==0 is safe, then color was never set */
|
2012-03-30 01:51:25 +00:00
|
|
|
if (btheme->tact.strip[3] == 0) {
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set(btheme->tv3d.edge_sharp, 255, 32, 32, 255);
|
2012-03-30 01:51:25 +00:00
|
|
|
rgba_char_args_set(btheme->tact.strip_select, 0xff, 0xff, 0xaa, 204);
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set(btheme->tact.strip, 0xe4, 0x9c, 0xc6, 204);
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* IPO-Editor - Vertex Size*/
|
2012-03-24 06:38:07 +00:00
|
|
|
if (btheme->tipo.vertex_size == 0) {
|
2012-03-30 01:51:25 +00:00
|
|
|
btheme->tipo.vertex_size = 3;
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2015-07-01 12:47:44 +10:00
|
|
|
if (!USER_VERSION_ATLEAST(244, 0)) {
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
/* set default number of recently-used files (if not set) */
|
|
|
|
if (U.recent_files == 0) U.recent_files = 10;
|
|
|
|
}
|
2015-07-01 12:47:44 +10:00
|
|
|
if (!USER_VERSION_ATLEAST(245, 3)) {
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
bTheme *btheme;
|
2012-03-30 01:51:25 +00:00
|
|
|
for (btheme = U.themes.first; btheme; btheme = btheme->next) {
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set(btheme->tv3d.editmesh_active, 255, 255, 255, 128);
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
}
|
2012-03-30 01:51:25 +00:00
|
|
|
if (U.coba_weight.tot == 0)
|
2013-03-18 18:25:05 +00:00
|
|
|
init_colorband(&U.coba_weight, true);
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
}
|
2015-07-01 12:47:44 +10:00
|
|
|
if (!USER_VERSION_ATLEAST(245, 3)) {
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
bTheme *btheme;
|
2012-03-30 01:51:25 +00:00
|
|
|
for (btheme = U.themes.first; btheme; btheme = btheme->next) {
|
2010-12-03 12:30:59 +00:00
|
|
|
/* these should all use the same color */
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set(btheme->tv3d.cframe, 0x60, 0xc0, 0x40, 255);
|
|
|
|
rgba_char_args_set(btheme->tipo.cframe, 0x60, 0xc0, 0x40, 255);
|
|
|
|
rgba_char_args_set(btheme->tact.cframe, 0x60, 0xc0, 0x40, 255);
|
|
|
|
rgba_char_args_set(btheme->tnla.cframe, 0x60, 0xc0, 0x40, 255);
|
|
|
|
rgba_char_args_set(btheme->tseq.cframe, 0x60, 0xc0, 0x40, 255);
|
|
|
|
//rgba_char_args_set(btheme->tsnd.cframe, 0x60, 0xc0, 0x40, 255); Not needed anymore
|
|
|
|
rgba_char_args_set(btheme->ttime.cframe, 0x60, 0xc0, 0x40, 255);
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
}
|
|
|
|
}
|
2015-07-01 12:47:44 +10:00
|
|
|
if (!USER_VERSION_ATLEAST(245, 3)) {
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
bTheme *btheme;
|
2012-03-30 01:51:25 +00:00
|
|
|
for (btheme = U.themes.first; btheme; btheme = btheme->next) {
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
/* action channel groups (recolor anyway) */
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set(btheme->tact.group, 0x39, 0x7d, 0x1b, 255);
|
|
|
|
rgba_char_args_set(btheme->tact.group_active, 0x7d, 0xe9, 0x60, 255);
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
|
|
|
|
/* bone custom-color sets */
|
2011-03-29 09:28:46 +00:00
|
|
|
if (btheme->tarm[0].solid[3] == 0)
|
|
|
|
ui_theme_init_boneColorSets(btheme);
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
}
|
|
|
|
}
|
2015-07-01 12:47:44 +10:00
|
|
|
if (!USER_VERSION_ATLEAST(245, 3)) {
|
2012-03-30 01:51:25 +00:00
|
|
|
U.flag |= USER_ADD_VIEWALIGNED | USER_ADD_EDITMODE;
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
}
|
2015-07-01 12:47:44 +10:00
|
|
|
if (!USER_VERSION_ATLEAST(245, 3)) {
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
bTheme *btheme;
|
|
|
|
|
|
|
|
/* adjust themes */
|
2012-03-30 01:51:25 +00:00
|
|
|
for (btheme = U.themes.first; btheme; btheme = btheme->next) {
|
2014-04-27 00:22:49 +10:00
|
|
|
const char *col;
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
|
|
|
|
/* IPO Editor: Handles/Vertices */
|
|
|
|
col = btheme->tipo.vertex;
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set(btheme->tipo.handle_vertex, col[0], col[1], col[2], 255);
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
col = btheme->tipo.vertex_select;
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set(btheme->tipo.handle_vertex_select, col[0], col[1], col[2], 255);
|
2012-03-30 01:51:25 +00:00
|
|
|
btheme->tipo.handle_vertex_size = btheme->tipo.vertex_size;
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
|
|
|
|
/* Sequence/Image Editor: colors for GPencil text */
|
|
|
|
col = btheme->tv3d.bone_pose;
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set(btheme->tseq.bone_pose, col[0], col[1], col[2], 255);
|
|
|
|
rgba_char_args_set(btheme->tima.bone_pose, col[0], col[1], col[2], 255);
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
col = btheme->tv3d.vertex_select;
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set(btheme->tseq.vertex_select, col[0], col[1], col[2], 255);
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
}
|
|
|
|
}
|
2015-07-01 12:47:44 +10:00
|
|
|
if (!USER_VERSION_ATLEAST(250, 0)) {
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
bTheme *btheme;
|
|
|
|
|
2012-03-30 01:51:25 +00:00
|
|
|
for (btheme = U.themes.first; btheme; btheme = btheme->next) {
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
/* this was not properly initialized in 2.45 */
|
2012-03-30 01:51:25 +00:00
|
|
|
if (btheme->tima.face_dot[3] == 0) {
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set(btheme->tima.editmesh_active, 255, 255, 255, 128);
|
|
|
|
rgba_char_args_set(btheme->tima.face_dot, 255, 133, 0, 255);
|
2012-03-30 01:51:25 +00:00
|
|
|
btheme->tima.facedot_size = 2;
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
}
|
|
|
|
|
2013-05-09 10:03:38 +00:00
|
|
|
/* DopeSheet - (Object) Channel color */
|
2012-03-30 01:51:25 +00:00
|
|
|
rgba_char_args_set(btheme->tact.ds_channel, 82, 96, 110, 255);
|
|
|
|
rgba_char_args_set(btheme->tact.ds_subchannel, 124, 137, 150, 255);
|
2013-05-09 10:03:38 +00:00
|
|
|
/* DopeSheet - Group Channel color (saner version) */
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set(btheme->tact.group, 79, 101, 73, 255);
|
|
|
|
rgba_char_args_set(btheme->tact.group_active, 135, 177, 125, 255);
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
|
|
|
|
/* Graph Editor - (Object) Channel color */
|
2012-03-30 01:51:25 +00:00
|
|
|
rgba_char_args_set(btheme->tipo.ds_channel, 82, 96, 110, 255);
|
|
|
|
rgba_char_args_set(btheme->tipo.ds_subchannel, 124, 137, 150, 255);
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
/* Graph Editor - Group Channel color */
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set(btheme->tipo.group, 79, 101, 73, 255);
|
|
|
|
rgba_char_args_set(btheme->tipo.group_active, 135, 177, 125, 255);
|
2009-06-27 00:40:25 +00:00
|
|
|
|
|
|
|
/* Nla Editor - (Object) Channel color */
|
2012-03-30 01:51:25 +00:00
|
|
|
rgba_char_args_set(btheme->tnla.ds_channel, 82, 96, 110, 255);
|
|
|
|
rgba_char_args_set(btheme->tnla.ds_subchannel, 124, 137, 150, 255);
|
2009-06-27 00:40:25 +00:00
|
|
|
/* NLA Editor - New Strip colors */
|
2012-03-30 01:51:25 +00:00
|
|
|
rgba_char_args_set(btheme->tnla.strip, 12, 10, 10, 128);
|
|
|
|
rgba_char_args_set(btheme->tnla.strip_select, 255, 140, 0, 255);
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* adjust grease-pencil distances */
|
2012-03-30 01:51:25 +00:00
|
|
|
U.gp_manhattendist = 1;
|
|
|
|
U.gp_euclideandist = 2;
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
|
|
|
|
/* adjust default interpolation for new IPO-curves */
|
2012-03-30 01:51:25 +00:00
|
|
|
U.ipo_new = BEZT_IPO_BEZ;
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
}
|
|
|
|
|
2015-07-01 12:47:44 +10:00
|
|
|
if (!USER_VERSION_ATLEAST(250, 1)) {
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
bTheme *btheme;
|
|
|
|
|
2012-03-30 01:51:25 +00:00
|
|
|
for (btheme = U.themes.first; btheme; btheme = btheme->next) {
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
|
|
|
|
/* common (new) variables, it checks for alpha==0 */
|
|
|
|
ui_theme_init_new(btheme);
|
|
|
|
|
2012-03-30 01:51:25 +00:00
|
|
|
if (btheme->tui.wcol_num.outline[3] == 0)
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
ui_widget_color_init(&btheme->tui);
|
2009-06-16 13:09:36 +00:00
|
|
|
|
|
|
|
/* Logic editor theme, check for alpha==0 is safe, then color was never set */
|
2012-03-30 01:51:25 +00:00
|
|
|
if (btheme->tlogic.syntaxn[3] == 0) {
|
2009-06-16 13:09:36 +00:00
|
|
|
/* re-uses syntax color storage */
|
2012-03-30 01:51:25 +00:00
|
|
|
btheme->tlogic = btheme->tv3d;
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set(btheme->tlogic.back, 100, 100, 100, 255);
|
2009-06-16 13:09:36 +00:00
|
|
|
}
|
2009-07-15 19:19:43 +00:00
|
|
|
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set_fl(btheme->tinfo.back, 0.45, 0.45, 0.45, 1.0);
|
|
|
|
rgba_char_args_set_fl(btheme->tuserpref.back, 0.45, 0.45, 0.45, 1.0);
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
}
|
|
|
|
}
|
2009-09-04 21:34:17 +00:00
|
|
|
|
2015-07-01 12:47:44 +10:00
|
|
|
if (!USER_VERSION_ATLEAST(250, 3)) {
|
2009-09-04 21:34:17 +00:00
|
|
|
/* new audio system */
|
2012-03-24 06:38:07 +00:00
|
|
|
if (U.audiochannels == 0)
|
2009-09-04 21:34:17 +00:00
|
|
|
U.audiochannels = 2;
|
2012-03-24 06:38:07 +00:00
|
|
|
if (U.audiodevice == 0) {
|
2009-12-07 20:38:09 +00:00
|
|
|
#ifdef WITH_OPENAL
|
2009-09-04 21:34:17 +00:00
|
|
|
U.audiodevice = 2;
|
2009-12-07 20:38:09 +00:00
|
|
|
#endif
|
|
|
|
#ifdef WITH_SDL
|
|
|
|
U.audiodevice = 1;
|
|
|
|
#endif
|
|
|
|
}
|
2012-03-24 06:38:07 +00:00
|
|
|
if (U.audioformat == 0)
|
2009-09-04 21:34:17 +00:00
|
|
|
U.audioformat = 0x24;
|
2012-03-24 06:38:07 +00:00
|
|
|
if (U.audiorate == 0)
|
2015-12-27 16:33:54 +01:00
|
|
|
U.audiorate = 48000;
|
2009-09-04 21:34:17 +00:00
|
|
|
}
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
|
2015-07-01 12:47:44 +10:00
|
|
|
if (!USER_VERSION_ATLEAST(250, 8)) {
|
2009-12-24 09:26:06 +00:00
|
|
|
wmKeyMap *km;
|
|
|
|
|
2012-03-30 01:51:25 +00:00
|
|
|
for (km = U.user_keymaps.first; km; km = km->next) {
|
2015-01-26 16:03:11 +01:00
|
|
|
if (STREQ(km->idname, "Armature_Sketch"))
|
2009-12-24 09:26:06 +00:00
|
|
|
strcpy(km->idname, "Armature Sketch");
|
2015-01-26 16:03:11 +01:00
|
|
|
else if (STREQ(km->idname, "View3D"))
|
2010-09-06 05:40:52 +00:00
|
|
|
strcpy(km->idname, "3D View");
|
2015-01-26 16:03:11 +01:00
|
|
|
else if (STREQ(km->idname, "View3D Generic"))
|
2010-09-06 05:40:52 +00:00
|
|
|
strcpy(km->idname, "3D View Generic");
|
2015-01-26 16:03:11 +01:00
|
|
|
else if (STREQ(km->idname, "EditMesh"))
|
2009-12-24 09:26:06 +00:00
|
|
|
strcpy(km->idname, "Mesh");
|
2015-01-26 16:03:11 +01:00
|
|
|
else if (STREQ(km->idname, "TimeLine"))
|
2009-12-24 09:26:06 +00:00
|
|
|
strcpy(km->idname, "Timeline");
|
2015-01-26 16:03:11 +01:00
|
|
|
else if (STREQ(km->idname, "UVEdit"))
|
2009-12-24 09:26:06 +00:00
|
|
|
strcpy(km->idname, "UV Editor");
|
2015-01-26 16:03:11 +01:00
|
|
|
else if (STREQ(km->idname, "Animation_Channels"))
|
2009-12-24 09:26:06 +00:00
|
|
|
strcpy(km->idname, "Animation Channels");
|
2015-01-26 16:03:11 +01:00
|
|
|
else if (STREQ(km->idname, "GraphEdit Keys"))
|
2009-12-24 09:26:06 +00:00
|
|
|
strcpy(km->idname, "Graph Editor");
|
2015-01-26 16:03:11 +01:00
|
|
|
else if (STREQ(km->idname, "GraphEdit Generic"))
|
2009-12-24 09:26:06 +00:00
|
|
|
strcpy(km->idname, "Graph Editor Generic");
|
2015-01-26 16:03:11 +01:00
|
|
|
else if (STREQ(km->idname, "Action_Keys"))
|
2009-12-24 09:26:06 +00:00
|
|
|
strcpy(km->idname, "Dopesheet");
|
2015-01-26 16:03:11 +01:00
|
|
|
else if (STREQ(km->idname, "NLA Data"))
|
2009-12-24 09:26:06 +00:00
|
|
|
strcpy(km->idname, "NLA Editor");
|
2015-01-26 16:03:11 +01:00
|
|
|
else if (STREQ(km->idname, "Node Generic"))
|
2009-12-24 09:26:06 +00:00
|
|
|
strcpy(km->idname, "Node Editor");
|
2015-01-26 16:03:11 +01:00
|
|
|
else if (STREQ(km->idname, "Logic Generic"))
|
2009-12-24 09:26:06 +00:00
|
|
|
strcpy(km->idname, "Logic Editor");
|
2015-01-26 16:03:11 +01:00
|
|
|
else if (STREQ(km->idname, "File"))
|
2009-12-24 09:26:06 +00:00
|
|
|
strcpy(km->idname, "File Browser");
|
2015-01-26 16:03:11 +01:00
|
|
|
else if (STREQ(km->idname, "FileMain"))
|
2009-12-24 09:26:06 +00:00
|
|
|
strcpy(km->idname, "File Browser Main");
|
2015-01-26 16:03:11 +01:00
|
|
|
else if (STREQ(km->idname, "FileButtons"))
|
2009-12-24 09:26:06 +00:00
|
|
|
strcpy(km->idname, "File Browser Buttons");
|
2015-01-26 16:03:11 +01:00
|
|
|
else if (STREQ(km->idname, "Buttons Generic"))
|
2009-12-24 09:26:06 +00:00
|
|
|
strcpy(km->idname, "Property Editor");
|
|
|
|
}
|
|
|
|
}
|
2015-07-01 12:47:44 +10:00
|
|
|
if (!USER_VERSION_ATLEAST(250, 16)) {
|
2012-03-24 06:38:07 +00:00
|
|
|
if (U.wmdrawmethod == USER_DRAW_TRIPLE)
|
2010-01-31 23:45:51 +00:00
|
|
|
U.wmdrawmethod = USER_DRAW_AUTOMATIC;
|
|
|
|
}
|
2010-04-01 02:28:08 +00:00
|
|
|
|
2015-07-01 12:47:44 +10:00
|
|
|
if (!USER_VERSION_ATLEAST(252, 3)) {
|
2010-04-01 02:28:08 +00:00
|
|
|
if (U.flag & USER_LMOUSESELECT)
|
|
|
|
U.flag &= ~USER_TWOBUTTONMOUSE;
|
|
|
|
}
|
2015-07-01 12:47:44 +10:00
|
|
|
if (!USER_VERSION_ATLEAST(252, 4)) {
|
Keyframe Defaults and Cleanups:
This commit fixes reports #21638 and #21818, which were both also Durian feature requests.
Cbanges:
* Added new default setting for the type of handles created when creating keyframes. This can be found in the user-preferences, and is used whenever existing keyframes aren't being overwritten (instead of the value being always taken from the keyframes either side, #21638).
* When keyframing over existing keyframes, only the values will be changed. The handles will be offset by the same amount that the value of the keyframe changed, though how well this works in practice still needs to be tested more thoroughly (#21818, already fixed earlier, but this commit is the full fix).
* When 'free' handles are added by default, they are offset to be +/- 1 frame on either side of the keyframe so that it is obvious that they can be moved. However, they just take the same value of the keyframe since this is easiest.
* Properly initialising handle colour defaults for 3D-View and Graph Editor. Graph Editor's theme userprefs also show these settings now, though the layout is really quick hack-style.
2010-04-02 01:03:40 +00:00
|
|
|
bTheme *btheme;
|
|
|
|
|
|
|
|
/* default new handle type is auto handles */
|
|
|
|
U.keyhandles_new = HD_AUTO;
|
|
|
|
|
|
|
|
/* init new curve colors */
|
2012-03-30 01:51:25 +00:00
|
|
|
for (btheme = U.themes.first; btheme; btheme = btheme->next) {
|
2013-10-30 10:38:45 +01:00
|
|
|
ui_theme_space_init_handles_color(&btheme->tv3d);
|
|
|
|
ui_theme_space_init_handles_color(&btheme->tipo);
|
|
|
|
|
2010-04-06 02:36:37 +00:00
|
|
|
/* edge crease */
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set_fl(btheme->tv3d.edge_crease, 0.8, 0, 0.6, 1.0);
|
Keyframe Defaults and Cleanups:
This commit fixes reports #21638 and #21818, which were both also Durian feature requests.
Cbanges:
* Added new default setting for the type of handles created when creating keyframes. This can be found in the user-preferences, and is used whenever existing keyframes aren't being overwritten (instead of the value being always taken from the keyframes either side, #21638).
* When keyframing over existing keyframes, only the values will be changed. The handles will be offset by the same amount that the value of the keyframe changed, though how well this works in practice still needs to be tested more thoroughly (#21818, already fixed earlier, but this commit is the full fix).
* When 'free' handles are added by default, they are offset to be +/- 1 frame on either side of the keyframe so that it is obvious that they can be moved. However, they just take the same value of the keyframe since this is easiest.
* Properly initialising handle colour defaults for 3D-View and Graph Editor. Graph Editor's theme userprefs also show these settings now, though the layout is really quick hack-style.
2010-04-02 01:03:40 +00:00
|
|
|
}
|
|
|
|
}
|
2015-07-01 12:47:44 +10:00
|
|
|
if (!USER_VERSION_ATLEAST(253, 0)) {
|
2010-04-30 04:48:40 +00:00
|
|
|
bTheme *btheme;
|
2010-01-31 23:45:51 +00:00
|
|
|
|
2010-04-30 04:48:40 +00:00
|
|
|
/* init new curve colors */
|
2012-03-30 01:51:25 +00:00
|
|
|
for (btheme = U.themes.first; btheme; btheme = btheme->next) {
|
2010-04-30 04:48:40 +00:00
|
|
|
if (btheme->tv3d.lastsel_point[3] == 0)
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set(btheme->tv3d.lastsel_point, 0xff, 0xff, 0xff, 255);
|
2010-04-30 04:48:40 +00:00
|
|
|
}
|
|
|
|
}
|
2015-07-01 12:47:44 +10:00
|
|
|
if (!USER_VERSION_ATLEAST(252, 5)) {
|
2010-05-27 08:22:16 +00:00
|
|
|
bTheme *btheme;
|
|
|
|
|
|
|
|
/* interface_widgets.c */
|
2012-03-30 01:51:25 +00:00
|
|
|
struct uiWidgetColors wcol_progress = {
|
2010-05-27 08:22:16 +00:00
|
|
|
{0, 0, 0, 255},
|
|
|
|
{190, 190, 190, 255},
|
|
|
|
{100, 100, 100, 180},
|
2016-01-18 01:39:09 +01:00
|
|
|
{128, 128, 128, 255},
|
2010-05-27 08:22:16 +00:00
|
|
|
|
|
|
|
{0, 0, 0, 255},
|
|
|
|
{255, 255, 255, 255},
|
|
|
|
|
|
|
|
0,
|
|
|
|
5, -5
|
|
|
|
};
|
|
|
|
|
2012-03-30 01:51:25 +00:00
|
|
|
for (btheme = U.themes.first; btheme; btheme = btheme->next) {
|
2010-05-27 08:22:16 +00:00
|
|
|
/* init progress bar theme */
|
2012-03-30 01:51:25 +00:00
|
|
|
btheme->tui.wcol_progress = wcol_progress;
|
2010-05-27 08:22:16 +00:00
|
|
|
}
|
|
|
|
}
|
2010-12-20 03:59:22 +00:00
|
|
|
|
2015-07-01 12:47:44 +10:00
|
|
|
if (!USER_VERSION_ATLEAST(255, 2)) {
|
2010-12-20 03:59:22 +00:00
|
|
|
bTheme *btheme;
|
2012-03-30 01:51:25 +00:00
|
|
|
for (btheme = U.themes.first; btheme; btheme = btheme->next) {
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set(btheme->tv3d.extra_edge_len, 32, 0, 0, 255);
|
|
|
|
rgba_char_args_set(btheme->tv3d.extra_face_angle, 0, 32, 0, 255);
|
|
|
|
rgba_char_args_set(btheme->tv3d.extra_face_area, 0, 0, 128, 255);
|
2010-12-20 03:59:22 +00:00
|
|
|
}
|
|
|
|
}
|
2009-12-24 09:26:06 +00:00
|
|
|
|
2015-07-01 12:47:44 +10:00
|
|
|
if (!USER_VERSION_ATLEAST(256, 4)) {
|
2011-03-14 03:34:57 +00:00
|
|
|
bTheme *btheme;
|
2012-03-30 01:51:25 +00:00
|
|
|
for (btheme = U.themes.first; btheme; btheme = btheme->next) {
|
|
|
|
if ((btheme->tv3d.outline_width) == 0) btheme->tv3d.outline_width = 1;
|
2011-03-14 03:34:57 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-07-01 12:47:44 +10:00
|
|
|
if (!USER_VERSION_ATLEAST(257, 0)) {
|
2012-07-21 16:21:42 +00:00
|
|
|
/* clear "AUTOKEY_FLAG_ONLYKEYINGSET" flag from userprefs,
|
|
|
|
* so that it doesn't linger around from old configs like a ghost */
|
2011-02-04 08:33:07 +00:00
|
|
|
U.autokey_flag &= ~AUTOKEY_FLAG_ONLYKEYINGSET;
|
|
|
|
}
|
2011-08-04 10:05:14 +00:00
|
|
|
|
2015-07-01 12:47:44 +10:00
|
|
|
if (!USER_VERSION_ATLEAST(258, 2)) {
|
2011-08-04 10:05:14 +00:00
|
|
|
bTheme *btheme;
|
2012-03-30 01:51:25 +00:00
|
|
|
for (btheme = U.themes.first; btheme; btheme = btheme->next) {
|
2011-08-04 10:05:14 +00:00
|
|
|
btheme->tnode.noodle_curving = 5;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-07-01 12:47:44 +10:00
|
|
|
if (!USER_VERSION_ATLEAST(259, 1)) {
|
2011-08-30 08:22:03 +00:00
|
|
|
bTheme *btheme;
|
2011-11-09 03:38:36 +00:00
|
|
|
|
2012-03-30 01:51:25 +00:00
|
|
|
for (btheme = U.themes.first; btheme; btheme = btheme->next) {
|
2011-08-30 08:22:03 +00:00
|
|
|
btheme->tv3d.speaker[3] = 255;
|
2011-08-04 10:05:14 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-07-01 12:47:44 +10:00
|
|
|
if (!USER_VERSION_ATLEAST(260, 3)) {
|
2011-11-07 12:55:18 +00:00
|
|
|
bTheme *btheme;
|
2011-11-09 03:38:36 +00:00
|
|
|
|
|
|
|
/* if new keyframes handle default is stuff "auto", make it "auto-clamped" instead
|
|
|
|
* was changed in 260 as part of GSoC11, but version patch was wrong
|
|
|
|
*/
|
|
|
|
if (U.keyhandles_new == HD_AUTO)
|
|
|
|
U.keyhandles_new = HD_AUTO_ANIM;
|
|
|
|
|
2012-03-30 01:51:25 +00:00
|
|
|
for (btheme = U.themes.first; btheme; btheme = btheme->next) {
|
2012-03-24 06:38:07 +00:00
|
|
|
if (btheme->tv3d.bundle_solid[3] == 0)
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set(btheme->tv3d.bundle_solid, 200, 200, 200, 255);
|
2011-11-09 03:38:36 +00:00
|
|
|
|
2012-03-24 06:38:07 +00:00
|
|
|
if (btheme->tv3d.camera_path[3] == 0)
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set(btheme->tv3d.camera_path, 0x00, 0x00, 0x00, 255);
|
2011-11-09 03:38:36 +00:00
|
|
|
|
2012-03-24 06:38:07 +00:00
|
|
|
if ((btheme->tclip.back[3]) == 0) {
|
2012-03-30 01:51:25 +00:00
|
|
|
btheme->tclip = btheme->tv3d;
|
2011-11-09 03:38:36 +00:00
|
|
|
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set(btheme->tclip.marker_outline, 0x00, 0x00, 0x00, 255);
|
|
|
|
rgba_char_args_set(btheme->tclip.marker, 0x7f, 0x7f, 0x00, 255);
|
|
|
|
rgba_char_args_set(btheme->tclip.act_marker, 0xff, 0xff, 0xff, 255);
|
|
|
|
rgba_char_args_set(btheme->tclip.sel_marker, 0xff, 0xff, 0x00, 255);
|
|
|
|
rgba_char_args_set(btheme->tclip.dis_marker, 0x7f, 0x00, 0x00, 255);
|
|
|
|
rgba_char_args_set(btheme->tclip.lock_marker, 0x7f, 0x7f, 0x7f, 255);
|
|
|
|
rgba_char_args_set(btheme->tclip.path_before, 0xff, 0x00, 0x00, 255);
|
|
|
|
rgba_char_args_set(btheme->tclip.path_after, 0x00, 0x00, 0xff, 255);
|
|
|
|
rgba_char_args_set(btheme->tclip.grid, 0x5e, 0x5e, 0x5e, 255);
|
|
|
|
rgba_char_args_set(btheme->tclip.cframe, 0x60, 0xc0, 0x40, 255);
|
|
|
|
rgba_char_args_set(btheme->tclip.handle_vertex, 0x00, 0x00, 0x00, 0xff);
|
|
|
|
rgba_char_args_set(btheme->tclip.handle_vertex_select, 0xff, 0xff, 0, 0xff);
|
2013-10-30 10:38:45 +01:00
|
|
|
btheme->tclip.handle_vertex_size = 5;
|
2011-11-07 12:55:18 +00:00
|
|
|
}
|
2011-11-09 03:38:36 +00:00
|
|
|
|
|
|
|
/* auto-clamped handles -> based on auto */
|
2012-03-24 06:38:07 +00:00
|
|
|
if (btheme->tipo.handle_auto_clamped[3] == 0)
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set(btheme->tipo.handle_auto_clamped, 0x99, 0x40, 0x30, 255);
|
2012-03-24 06:38:07 +00:00
|
|
|
if (btheme->tipo.handle_sel_auto_clamped[3] == 0)
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set(btheme->tipo.handle_sel_auto_clamped, 0xf0, 0xaf, 0x90, 255);
|
2011-11-07 12:55:18 +00:00
|
|
|
}
|
2011-11-09 03:38:36 +00:00
|
|
|
|
|
|
|
/* enable (Cycles) addon by default */
|
2012-03-24 06:38:07 +00:00
|
|
|
if (!BLI_findstring(&U.addons, "cycles", offsetof(bAddon, module))) {
|
2012-03-30 01:51:25 +00:00
|
|
|
bAddon *baddon = MEM_callocN(sizeof(bAddon), "bAddon");
|
2011-11-08 17:00:40 +00:00
|
|
|
BLI_strncpy(baddon->module, "cycles", sizeof(baddon->module));
|
|
|
|
BLI_addtail(&U.addons, baddon);
|
2011-11-08 06:30:02 +00:00
|
|
|
}
|
|
|
|
}
|
2012-01-22 06:10:21 +00:00
|
|
|
|
2015-07-01 12:47:44 +10:00
|
|
|
if (!USER_VERSION_ATLEAST(260, 5)) {
|
2011-11-19 20:57:53 +00:00
|
|
|
bTheme *btheme;
|
2012-01-22 06:10:21 +00:00
|
|
|
|
2012-03-30 01:51:25 +00:00
|
|
|
for (btheme = U.themes.first; btheme; btheme = btheme->next) {
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set(btheme->tui.panel.header, 0, 0, 0, 25);
|
2012-03-30 01:51:25 +00:00
|
|
|
btheme->tui.icon_alpha = 1.0;
|
2011-11-08 17:00:40 +00:00
|
|
|
}
|
2011-11-07 12:55:18 +00:00
|
|
|
}
|
2012-01-22 06:10:21 +00:00
|
|
|
|
2015-07-01 12:47:44 +10:00
|
|
|
if (!USER_VERSION_ATLEAST(261, 4)) {
|
2012-01-17 16:31:13 +00:00
|
|
|
bTheme *btheme;
|
2012-03-30 01:51:25 +00:00
|
|
|
for (btheme = U.themes.first; btheme; btheme = btheme->next) {
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set_fl(btheme->tima.preview_stitch_face, 0.071, 0.259, 0.694, 0.150);
|
|
|
|
rgba_char_args_set_fl(btheme->tima.preview_stitch_edge, 1.0, 0.522, 0.0, 0.7);
|
|
|
|
rgba_char_args_set_fl(btheme->tima.preview_stitch_vert, 1.0, 0.522, 0.0, 0.5);
|
|
|
|
rgba_char_args_set_fl(btheme->tima.preview_stitch_stitchable, 0.0, 1.0, 0.0, 1.0);
|
|
|
|
rgba_char_args_set_fl(btheme->tima.preview_stitch_unstitchable, 1.0, 0.0, 0.0, 1.0);
|
|
|
|
rgba_char_args_set_fl(btheme->tima.preview_stitch_active, 0.886, 0.824, 0.765, 0.140);
|
2012-01-22 06:10:21 +00:00
|
|
|
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set_fl(btheme->toops.match, 0.2, 0.5, 0.2, 0.3);
|
|
|
|
rgba_char_args_set_fl(btheme->toops.selected_highlight, 0.51, 0.53, 0.55, 0.3);
|
2012-01-17 16:31:13 +00:00
|
|
|
}
|
2012-01-22 06:10:21 +00:00
|
|
|
|
2014-01-04 17:16:19 +11:00
|
|
|
U.use_16bit_textures = true;
|
2012-01-17 16:31:13 +00:00
|
|
|
}
|
2012-01-22 06:10:21 +00:00
|
|
|
|
2015-07-01 12:47:44 +10:00
|
|
|
if (!USER_VERSION_ATLEAST(262, 2)) {
|
2012-03-15 21:11:14 +00:00
|
|
|
bTheme *btheme;
|
2012-03-30 01:51:25 +00:00
|
|
|
for (btheme = U.themes.first; btheme; btheme = btheme->next) {
|
2012-03-15 21:11:14 +00:00
|
|
|
if (btheme->tui.wcol_menu_item.item[3] == 255)
|
2012-03-20 09:45:17 +00:00
|
|
|
rgba_char_args_set(btheme->tui.wcol_menu_item.item, 172, 172, 172, 128);
|
2012-03-15 21:11:14 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-07-01 12:47:44 +10:00
|
|
|
if (!USER_VERSION_ATLEAST(262, 3)) {
|
2012-03-19 22:29:16 +00:00
|
|
|
bTheme *btheme;
|
2012-03-30 01:51:25 +00:00
|
|
|
for (btheme = U.themes.first; btheme; btheme = btheme->next) {
|
2012-03-19 22:29:16 +00:00
|
|
|
if (btheme->tui.wcol_tooltip.inner[3] == 0) {
|
|
|
|
btheme->tui.wcol_tooltip = btheme->tui.wcol_menu_back;
|
|
|
|
}
|
2012-03-22 20:24:11 +00:00
|
|
|
if (btheme->tui.wcol_tooltip.text[0] == 160) { /* hrmf */
|
|
|
|
rgba_char_args_set(btheme->tui.wcol_tooltip.text, 255, 255, 255, 255);
|
|
|
|
}
|
2012-03-19 22:29:16 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-07-01 12:47:44 +10:00
|
|
|
if (!USER_VERSION_ATLEAST(262, 4)) {
|
2012-03-26 13:36:22 +00:00
|
|
|
bTheme *btheme;
|
2012-03-30 01:51:25 +00:00
|
|
|
for (btheme = U.themes.first; btheme; btheme = btheme->next) {
|
2013-08-04 18:12:49 +00:00
|
|
|
if (btheme->tseq.movieclip[3] == 0) {
|
2012-03-26 13:36:22 +00:00
|
|
|
rgba_char_args_set(btheme->tseq.movieclip, 32, 32, 143, 255);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-07-01 12:47:44 +10:00
|
|
|
if (!USER_VERSION_ATLEAST(263, 2)) {
|
2012-04-30 16:19:20 +00:00
|
|
|
bTheme *btheme;
|
|
|
|
for (btheme = U.themes.first; btheme; btheme = btheme->next) {
|
|
|
|
if (btheme->tclip.strip[0] == 0) {
|
|
|
|
rgba_char_args_set(btheme->tclip.list, 0x66, 0x66, 0x66, 0xff);
|
|
|
|
rgba_char_args_set(btheme->tclip.strip, 0x0c, 0x0a, 0x0a, 0x80);
|
|
|
|
rgba_char_args_set(btheme->tclip.strip_select, 0xff, 0x8c, 0x00, 0xff);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-07-01 12:47:44 +10:00
|
|
|
if (!USER_VERSION_ATLEAST(263, 6)) {
|
2012-05-22 15:29:15 +00:00
|
|
|
bTheme *btheme;
|
|
|
|
for (btheme = U.themes.first; btheme; btheme = btheme->next)
|
|
|
|
rgba_char_args_set(btheme->tv3d.skin_root, 180, 77, 77, 255);
|
|
|
|
}
|
2012-06-04 01:17:37 +00:00
|
|
|
|
2015-07-01 12:47:44 +10:00
|
|
|
if (!USER_VERSION_ATLEAST(263, 7)) {
|
2012-06-04 01:17:37 +00:00
|
|
|
bTheme *btheme;
|
|
|
|
|
|
|
|
for (btheme = U.themes.first; btheme; btheme = btheme->next) {
|
2013-05-09 10:03:38 +00:00
|
|
|
/* DopeSheet Summary */
|
2012-06-04 01:17:37 +00:00
|
|
|
rgba_char_args_set(btheme->tact.anim_active, 204, 112, 26, 102);
|
|
|
|
|
|
|
|
/* NLA Colors */
|
2012-06-27 18:29:47 +00:00
|
|
|
rgba_char_args_set(btheme->tnla.anim_active, 204, 112, 26, 102); /* same as dopesheet above */
|
|
|
|
rgba_char_args_set(btheme->tnla.anim_non_active, 153, 135, 97, 77);
|
2012-06-04 01:17:37 +00:00
|
|
|
|
|
|
|
rgba_char_args_set(btheme->tnla.nla_tweaking, 77, 243, 26, 77);
|
|
|
|
rgba_char_args_set(btheme->tnla.nla_tweakdupli, 217, 0, 0, 255);
|
|
|
|
|
|
|
|
rgba_char_args_set(btheme->tnla.nla_transition, 28, 38, 48, 255);
|
|
|
|
rgba_char_args_set(btheme->tnla.nla_transition_sel, 46, 117, 219, 255);
|
|
|
|
rgba_char_args_set(btheme->tnla.nla_meta, 51, 38, 66, 255);
|
|
|
|
rgba_char_args_set(btheme->tnla.nla_meta_sel, 105, 33, 150, 255);
|
|
|
|
rgba_char_args_set(btheme->tnla.nla_sound, 43, 61, 61, 255);
|
|
|
|
rgba_char_args_set(btheme->tnla.nla_sound_sel, 31, 122, 122, 255);
|
|
|
|
}
|
|
|
|
}
|
2012-05-22 15:29:15 +00:00
|
|
|
|
2015-07-01 12:47:44 +10:00
|
|
|
if (!USER_VERSION_ATLEAST(263, 11)) {
|
2012-06-07 18:24:36 +00:00
|
|
|
bTheme *btheme;
|
|
|
|
for (btheme = U.themes.first; btheme; btheme = btheme->next) {
|
2013-08-04 18:12:49 +00:00
|
|
|
if (btheme->tseq.mask[3] == 0) {
|
2012-06-07 18:24:36 +00:00
|
|
|
rgba_char_args_set(btheme->tseq.mask, 152, 78, 62, 255);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2012-05-22 15:29:15 +00:00
|
|
|
|
2015-07-01 12:47:44 +10:00
|
|
|
if (!USER_VERSION_ATLEAST(263, 15)) {
|
2012-07-26 10:53:59 +00:00
|
|
|
bTheme *btheme;
|
|
|
|
for (btheme = U.themes.first; btheme; btheme = btheme->next) {
|
|
|
|
rgba_char_args_set(btheme->tv3d.bone_pose_active, 140, 255, 255, 80);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-07-01 12:47:44 +10:00
|
|
|
if (!USER_VERSION_ATLEAST(263, 16)) {
|
2012-07-26 15:50:45 +00:00
|
|
|
bTheme *btheme;
|
|
|
|
|
|
|
|
for (btheme = U.themes.first; btheme; btheme = btheme->next) {
|
|
|
|
if (btheme->tact.anim_active[3] == 0)
|
|
|
|
rgba_char_args_set(btheme->tact.anim_active, 204, 112, 26, 102);
|
|
|
|
|
|
|
|
if (btheme->tnla.anim_active[3] == 0)
|
|
|
|
rgba_char_args_set(btheme->tnla.anim_active, 204, 112, 26, 102);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-07-01 12:47:44 +10:00
|
|
|
if (!USER_VERSION_ATLEAST(263, 22)) {
|
2012-09-24 17:57:09 +00:00
|
|
|
bTheme *btheme;
|
|
|
|
|
|
|
|
for (btheme = U.themes.first; btheme; btheme = btheme->next) {
|
|
|
|
if (btheme->tipo.lastsel_point[3] == 0)
|
|
|
|
rgba_char_args_set(btheme->tipo.lastsel_point, 0xff, 0xff, 0xff, 255);
|
|
|
|
|
|
|
|
if (btheme->tv3d.skin_root[3] == 0)
|
|
|
|
rgba_char_args_set(btheme->tv3d.skin_root, 180, 77, 77, 255);
|
|
|
|
}
|
|
|
|
}
|
Axis Colours are now Themeable
This commit allows you to set the RGB <-> XYZ axis colours used for things like
the mini axis indicator, grid axis indicators, manipulators, transform
constraint indicators, F-Curves (when using XYZ to RGB colouring option), and
perhaps something else I've missed. Previously, these places all used hardcoded
defines (220 * i/j/k), but the readability of these colours was often quite
poor, especially when used with certain themes.
The settings for these colours can be found under the "User Interface" section
of the themes (i.e. same set of colours is used across editors). I could have
made these per editor, but since it's unlikely that these will need to be too
different across editors in practice (+ being easier to version patch), they are
stored under the UI section.
2012-11-09 06:36:11 +00:00
|
|
|
|
2015-07-01 12:47:44 +10:00
|
|
|
if (!USER_VERSION_ATLEAST(264, 9)) {
|
Axis Colours are now Themeable
This commit allows you to set the RGB <-> XYZ axis colours used for things like
the mini axis indicator, grid axis indicators, manipulators, transform
constraint indicators, F-Curves (when using XYZ to RGB colouring option), and
perhaps something else I've missed. Previously, these places all used hardcoded
defines (220 * i/j/k), but the readability of these colours was often quite
poor, especially when used with certain themes.
The settings for these colours can be found under the "User Interface" section
of the themes (i.e. same set of colours is used across editors). I could have
made these per editor, but since it's unlikely that these will need to be too
different across editors in practice (+ being easier to version patch), they are
stored under the UI section.
2012-11-09 06:36:11 +00:00
|
|
|
bTheme *btheme;
|
|
|
|
|
|
|
|
for (btheme = U.themes.first; btheme; btheme = btheme->next) {
|
|
|
|
rgba_char_args_set(btheme->tui.xaxis, 220, 0, 0, 255);
|
|
|
|
rgba_char_args_set(btheme->tui.yaxis, 0, 220, 0, 255);
|
|
|
|
rgba_char_args_set(btheme->tui.zaxis, 0, 0, 220, 255);
|
|
|
|
}
|
|
|
|
}
|
2012-09-24 17:57:09 +00:00
|
|
|
|
2015-07-01 12:47:44 +10:00
|
|
|
if (!USER_VERSION_ATLEAST(267, 0)) {
|
2013-07-02 16:02:56 +00:00
|
|
|
/* Freestyle color settings */
|
2011-10-06 02:04:43 +00:00
|
|
|
bTheme *btheme;
|
|
|
|
|
2012-12-11 22:00:22 +00:00
|
|
|
for (btheme = U.themes.first; btheme; btheme = btheme->next) {
|
|
|
|
/* check for alpha == 0 is safe, then color was never set */
|
|
|
|
if (btheme->tv3d.freestyle_edge_mark[3] == 0) {
|
2012-03-25 08:20:19 +00:00
|
|
|
rgba_char_args_set(btheme->tv3d.freestyle_edge_mark, 0x7f, 0xff, 0x7f, 255);
|
|
|
|
rgba_char_args_set(btheme->tv3d.freestyle_face_mark, 0x7f, 0xff, 0x7f, 51);
|
2011-10-06 02:04:43 +00:00
|
|
|
}
|
2013-06-08 21:58:00 +00:00
|
|
|
|
|
|
|
if (btheme->tv3d.wire_edit[3] == 0) {
|
|
|
|
rgba_char_args_set(btheme->tv3d.wire_edit, 0x0, 0x0, 0x0, 255);
|
|
|
|
}
|
2011-10-06 02:04:43 +00:00
|
|
|
}
|
|
|
|
|
2013-07-02 16:02:56 +00:00
|
|
|
/* GL Texture Garbage Collection */
|
|
|
|
if (U.textimeout == 0) {
|
|
|
|
U.texcollectrate = 60;
|
|
|
|
U.textimeout = 120;
|
|
|
|
}
|
|
|
|
if (U.memcachelimit <= 0) {
|
|
|
|
U.memcachelimit = 32;
|
|
|
|
}
|
|
|
|
if (U.frameserverport == 0) {
|
|
|
|
U.frameserverport = 8080;
|
|
|
|
}
|
|
|
|
if (U.dbl_click_time == 0) {
|
|
|
|
U.dbl_click_time = 350;
|
|
|
|
}
|
|
|
|
if (U.scrcastfps == 0) {
|
|
|
|
U.scrcastfps = 10;
|
|
|
|
U.scrcastwait = 50;
|
|
|
|
}
|
|
|
|
if (U.v2d_min_gridsize == 0) {
|
|
|
|
U.v2d_min_gridsize = 35;
|
|
|
|
}
|
|
|
|
if (U.dragthreshold == 0)
|
|
|
|
U.dragthreshold = 5;
|
|
|
|
if (U.widget_unit == 0)
|
|
|
|
U.widget_unit = 20;
|
|
|
|
if (U.anisotropic_filter <= 0)
|
|
|
|
U.anisotropic_filter = 1;
|
|
|
|
|
|
|
|
if (U.ndof_sensitivity == 0.0f) {
|
|
|
|
U.ndof_sensitivity = 1.0f;
|
2013-07-05 00:13:14 +00:00
|
|
|
U.ndof_flag = (NDOF_LOCK_HORIZON | NDOF_SHOULD_PAN | NDOF_SHOULD_ZOOM | NDOF_SHOULD_ROTATE);
|
2013-07-02 16:02:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (U.ndof_orbit_sensitivity == 0.0f) {
|
|
|
|
U.ndof_orbit_sensitivity = U.ndof_sensitivity;
|
2012-09-28 12:37:14 +00:00
|
|
|
|
2013-07-02 16:02:56 +00:00
|
|
|
if (!(U.flag & USER_TRACKBALL))
|
|
|
|
U.ndof_flag |= NDOF_TURNTABLE;
|
|
|
|
}
|
|
|
|
if (U.tweak_threshold == 0)
|
|
|
|
U.tweak_threshold = 10;
|
2012-08-19 13:52:36 +00:00
|
|
|
}
|
2011-07-24 08:50:09 +00:00
|
|
|
|
2015-07-01 12:47:44 +10:00
|
|
|
if (!USER_VERSION_ATLEAST(265, 1)) {
|
Holiday coding log :)
Nice formatted version (pictures soon):
http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.66/Usability
Short list of main changes:
- Transparent region option (over main region), added code to blend in/out such panels.
- Min size window now 640 x 480
- Fixed DPI for ui - lots of cleanup and changes everywhere. Icon image need correct size still, layer-in-use icon needs remake.
- Macbook retina support, use command line --no-native-pixels to disable it
- Timeline Marker label was drawing wrong
- Trackpad and magic mouse: supports zoom (hold ctrl)
- Fix for splash position: removed ghost function and made window size update after creation immediate
- Fast undo buffer save now adds UI as well. Could be checked for regular file save even...
Quit.blend and temp file saving use this now.
- Dixed filename in window on reading quit.blend or temp saves, and they now add a warning in window title: "(Recovered)"
- New Userpref option "Keep Session" - this always saves quit.blend, and loads on start.
This allows keeping UI and data without actual saves, until you actually save.
When you load startup.blend and quit, it recognises the quit.blend as a startup (no file name in header)
- Added 3D view copy/paste buffers (selected objects). Shortcuts ctrl-c, ctrl-v (OSX, cmd-c, cmd-v).
Coded partial file saving for it. Could be used for other purposes. Todo: use OS clipboards.
- User preferences (themes, keymaps, user settings) now can be saved as a separate file.
Old option is called "Save Startup File" the new one "Save User Settings".
To visualise this difference, the 'save startup file' button has been removed from user preferences window. That option is available as CTRL+U and in File menu still.
- OSX: fixed bug that stopped giving mouse events outside window.
This also fixes "Continuous Grab" for OSX. (error since 2009)
2012-12-12 18:58:11 +00:00
|
|
|
bTheme *btheme;
|
|
|
|
|
|
|
|
for (btheme = U.themes.first; btheme; btheme = btheme->next) {
|
|
|
|
/* note: the toggle operator for transparent backdrops limits to these spacetypes */
|
|
|
|
if (btheme->tnode.button[3] == 255) {
|
|
|
|
btheme->tv3d.button[3] = 128;
|
|
|
|
btheme->tnode.button[3] = 128;
|
|
|
|
btheme->tima.button[3] = 128;
|
|
|
|
btheme->tseq.button[3] = 128;
|
|
|
|
btheme->tclip.button[3] = 128;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2012-12-15 16:22:18 +00:00
|
|
|
|
|
|
|
/* panel header/backdrop supported locally per editor now */
|
2015-07-01 12:47:44 +10:00
|
|
|
if (!USER_VERSION_ATLEAST(265, 2)) {
|
2012-12-15 16:22:18 +00:00
|
|
|
bTheme *btheme;
|
|
|
|
|
|
|
|
for (btheme = U.themes.first; btheme; btheme = btheme->next) {
|
2014-01-17 03:50:41 +11:00
|
|
|
ThemeSpace *ts;
|
2012-12-15 16:22:18 +00:00
|
|
|
|
|
|
|
/* new color, panel backdrop. Not used anywhere yet, until you enable it */
|
|
|
|
copy_v3_v3_char(btheme->tui.panel.back, btheme->tbuts.button);
|
|
|
|
btheme->tui.panel.back[3] = 128;
|
|
|
|
|
2014-01-17 03:50:41 +11:00
|
|
|
for (ts = UI_THEMESPACE_START(btheme); ts != UI_THEMESPACE_END(btheme); ts++) {
|
|
|
|
ts->panelcolors = btheme->tui.panel;
|
|
|
|
}
|
2012-12-15 16:22:18 +00:00
|
|
|
}
|
|
|
|
}
|
2013-01-19 04:20:53 +00:00
|
|
|
|
2013-02-13 16:52:14 +00:00
|
|
|
/* NOTE!! from now on use U.versionfile and U.subversionfile */
|
2015-07-01 12:47:44 +10:00
|
|
|
#undef USER_VERSION_ATLEAST
|
|
|
|
#define USER_VERSION_ATLEAST(ver, subver) MAIN_VERSION_ATLEAST((&(U)), ver, subver)
|
|
|
|
|
|
|
|
if (!USER_VERSION_ATLEAST(266, 0)) {
|
2012-12-20 16:50:39 +00:00
|
|
|
bTheme *btheme;
|
|
|
|
|
|
|
|
for (btheme = U.themes.first; btheme; btheme = btheme->next) {
|
|
|
|
/* rna definition limits fac to 0.01 */
|
|
|
|
if (btheme->tui.menu_shadow_fac == 0.0f) {
|
|
|
|
btheme->tui.menu_shadow_fac = 0.5f;
|
|
|
|
btheme->tui.menu_shadow_width = 12;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2012-12-29 18:25:03 +00:00
|
|
|
|
2015-07-01 12:47:44 +10:00
|
|
|
if (!USER_VERSION_ATLEAST(265, 4)) {
|
2012-12-29 18:25:03 +00:00
|
|
|
bTheme *btheme;
|
|
|
|
for (btheme = U.themes.first; btheme; btheme = btheme->next) {
|
|
|
|
rgba_char_args_set(btheme->text.syntaxd, 50, 0, 140, 255); /* Decorator/Preprocessor Dir. Blue-purple */
|
|
|
|
rgba_char_args_set(btheme->text.syntaxr, 140, 60, 0, 255); /* Reserved Orange */
|
2015-03-19 14:14:48 +11:00
|
|
|
rgba_char_args_set(btheme->text.syntaxs, 76, 76, 76, 255); /* Gray (mix between fg/bg) */
|
2012-12-29 18:25:03 +00:00
|
|
|
}
|
|
|
|
}
|
2013-01-06 16:45:10 +00:00
|
|
|
|
2015-07-01 12:47:44 +10:00
|
|
|
if (!USER_VERSION_ATLEAST(265, 6)) {
|
2013-01-07 15:42:42 +00:00
|
|
|
bTheme *btheme;
|
|
|
|
for (btheme = U.themes.first; btheme; btheme = btheme->next) {
|
|
|
|
copy_v4_v4_char(btheme->tv3d.gradients.high_gradient, btheme->tv3d.back);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-07-01 12:47:44 +10:00
|
|
|
if (!USER_VERSION_ATLEAST(265, 9)) {
|
2013-01-19 04:20:53 +00:00
|
|
|
bTheme *btheme;
|
|
|
|
for (btheme = U.themes.first; btheme; btheme = btheme->next) {
|
|
|
|
rgba_char_args_test_set(btheme->tnode.syntaxs, 151, 116, 116, 255); /* matte nodes */
|
|
|
|
rgba_char_args_test_set(btheme->tnode.syntaxd, 116, 151, 151, 255); /* distort nodes */
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-07-01 12:47:44 +10:00
|
|
|
if (!USER_VERSION_ATLEAST(265, 11)) {
|
2013-02-18 02:36:36 +00:00
|
|
|
bTheme *btheme;
|
|
|
|
for (btheme = U.themes.first; btheme; btheme = btheme->next) {
|
|
|
|
rgba_char_args_test_set(btheme->tconsole.console_select, 255, 255, 255, 48);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-07-01 12:47:44 +10:00
|
|
|
if (!USER_VERSION_ATLEAST(266, 2)) {
|
2013-03-18 16:34:57 +00:00
|
|
|
bTheme *btheme;
|
|
|
|
for (btheme = U.themes.first; btheme; btheme = btheme->next) {
|
|
|
|
rgba_char_args_test_set(btheme->tnode.console_output, 223, 202, 53, 255); /* interface nodes */
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-07-01 12:47:44 +10:00
|
|
|
if (!USER_VERSION_ATLEAST(268, 3)) {
|
2013-09-05 15:09:10 +00:00
|
|
|
bTheme *btheme;
|
|
|
|
for (btheme = U.themes.first; btheme; btheme = btheme->next) {
|
|
|
|
rgba_char_args_test_set(btheme->tima.uv_others, 96, 96, 96, 255);
|
|
|
|
rgba_char_args_test_set(btheme->tima.uv_shadow, 112, 112, 112, 255);
|
|
|
|
}
|
|
|
|
}
|
2013-12-08 01:36:31 +02:00
|
|
|
|
2015-07-01 12:47:44 +10:00
|
|
|
if (!USER_VERSION_ATLEAST(269, 5)) {
|
2013-12-08 01:36:31 +02:00
|
|
|
bTheme *btheme;
|
|
|
|
for (btheme = U.themes.first; btheme; btheme = btheme->next) {
|
|
|
|
rgba_char_args_set(btheme->tima.wire_edit, 192, 192, 192, 255);
|
|
|
|
rgba_char_args_set(btheme->tima.edge_select, 255, 133, 0, 255);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-07-01 12:47:44 +10:00
|
|
|
if (!USER_VERSION_ATLEAST(269, 6)) {
|
2013-12-01 21:30:04 +01:00
|
|
|
bTheme *btheme;
|
|
|
|
for (btheme = U.themes.first; btheme; btheme = btheme->next) {
|
|
|
|
char r, g, b;
|
|
|
|
r = btheme->tnode.syntaxn[0];
|
|
|
|
g = btheme->tnode.syntaxn[1];
|
|
|
|
b = btheme->tnode.syntaxn[2];
|
|
|
|
rgba_char_args_test_set(btheme->tnode.nodeclass_output, r, g, b, 255);
|
|
|
|
r = btheme->tnode.syntaxb[0];
|
|
|
|
g = btheme->tnode.syntaxb[1];
|
|
|
|
b = btheme->tnode.syntaxb[2];
|
|
|
|
rgba_char_args_test_set(btheme->tnode.nodeclass_filter, r, g, b, 255);
|
|
|
|
rgba_char_args_test_set(btheme->tnode.nodeclass_vector, r, g, b, 255);
|
|
|
|
rgba_char_args_test_set(btheme->tnode.nodeclass_texture, r, g, b, 255);
|
|
|
|
rgba_char_args_test_set(btheme->tnode.nodeclass_shader, r, g, b, 255);
|
|
|
|
rgba_char_args_test_set(btheme->tnode.nodeclass_script, r, g, b, 255);
|
|
|
|
rgba_char_args_test_set(btheme->tnode.nodeclass_pattern, r, g, b, 255);
|
|
|
|
rgba_char_args_test_set(btheme->tnode.nodeclass_layout, r, g, b, 255);
|
|
|
|
}
|
2013-12-18 05:02:42 +11:00
|
|
|
}
|
|
|
|
|
2015-07-01 12:47:44 +10:00
|
|
|
if (!USER_VERSION_ATLEAST(269, 8)) {
|
2013-12-18 05:02:42 +11:00
|
|
|
bTheme *btheme;
|
|
|
|
for (btheme = U.themes.first; btheme; btheme = btheme->next) {
|
|
|
|
rgba_char_args_test_set(btheme->tinfo.info_selected, 96, 128, 255, 255);
|
|
|
|
rgba_char_args_test_set(btheme->tinfo.info_selected_text, 255, 255, 255, 255);
|
|
|
|
rgba_char_args_test_set(btheme->tinfo.info_error, 220, 0, 0, 255);
|
|
|
|
rgba_char_args_test_set(btheme->tinfo.info_error_text, 0, 0, 0, 255);
|
|
|
|
rgba_char_args_test_set(btheme->tinfo.info_warning, 220, 128, 96, 255);
|
|
|
|
rgba_char_args_test_set(btheme->tinfo.info_warning_text, 0, 0, 0, 255);
|
|
|
|
rgba_char_args_test_set(btheme->tinfo.info_info, 0, 170, 0, 255);
|
|
|
|
rgba_char_args_test_set(btheme->tinfo.info_info_text, 0, 0, 0, 255);
|
|
|
|
rgba_char_args_test_set(btheme->tinfo.info_debug, 196, 196, 196, 255);
|
|
|
|
rgba_char_args_test_set(btheme->tinfo.info_debug_text, 0, 0, 0, 255);
|
|
|
|
}
|
2013-12-01 21:30:04 +01:00
|
|
|
}
|
2014-01-16 23:56:40 +13:00
|
|
|
|
2015-07-01 12:47:44 +10:00
|
|
|
if (!USER_VERSION_ATLEAST(269, 9)) {
|
2014-01-16 23:56:40 +13:00
|
|
|
bTheme *btheme;
|
|
|
|
|
2014-01-16 16:47:12 +11:00
|
|
|
U.tw_size = U.tw_size * 5.0f;
|
2014-01-16 23:56:40 +13:00
|
|
|
|
|
|
|
/* Action Editor (and NLA Editor) - Keyframe Colors */
|
2014-01-17 15:26:26 +13:00
|
|
|
/* Graph Editor - larger vertex size defaults */
|
2014-01-16 23:56:40 +13:00
|
|
|
for (btheme = U.themes.first; btheme; btheme = btheme->next) {
|
|
|
|
/* Action Editor ................. */
|
|
|
|
/* key types */
|
|
|
|
rgba_char_args_set(btheme->tact.keytype_keyframe, 232, 232, 232, 255);
|
|
|
|
rgba_char_args_set(btheme->tact.keytype_keyframe_select, 255, 190, 50, 255);
|
|
|
|
rgba_char_args_set(btheme->tact.keytype_extreme, 232, 179, 204, 255);
|
|
|
|
rgba_char_args_set(btheme->tact.keytype_extreme_select, 242, 128, 128, 255);
|
|
|
|
rgba_char_args_set(btheme->tact.keytype_breakdown, 179, 219, 232, 255);
|
|
|
|
rgba_char_args_set(btheme->tact.keytype_breakdown_select, 84, 191, 237, 255);
|
|
|
|
rgba_char_args_set(btheme->tact.keytype_jitter, 148, 229, 117, 255);
|
|
|
|
rgba_char_args_set(btheme->tact.keytype_jitter_select, 97, 192, 66, 255);
|
|
|
|
|
|
|
|
/* key border */
|
2014-04-20 22:05:05 +10:00
|
|
|
rgba_char_args_set(btheme->tact.keyborder, 0, 0, 0, 255);
|
2014-01-16 23:56:40 +13:00
|
|
|
rgba_char_args_set(btheme->tact.keyborder_select, 0, 0, 0, 255);
|
|
|
|
|
|
|
|
/* NLA ............................ */
|
|
|
|
/* key border */
|
2014-04-20 22:05:05 +10:00
|
|
|
rgba_char_args_set(btheme->tnla.keyborder, 0, 0, 0, 255);
|
2014-01-16 23:56:40 +13:00
|
|
|
rgba_char_args_set(btheme->tnla.keyborder_select, 0, 0, 0, 255);
|
2014-01-17 15:26:26 +13:00
|
|
|
|
|
|
|
/* Graph Editor ................... */
|
|
|
|
btheme->tipo.vertex_size = 6;
|
|
|
|
btheme->tipo.handle_vertex_size = 5;
|
2014-01-16 23:56:40 +13:00
|
|
|
}
|
|
|
|
|
2013-11-06 10:59:05 +00:00
|
|
|
/* grease pencil - new layer color */
|
|
|
|
if (U.gpencil_new_layer_col[3] < 0.1f) {
|
|
|
|
/* defaults to black, but must at least be visible! */
|
|
|
|
U.gpencil_new_layer_col[3] = 0.9f;
|
|
|
|
}
|
|
|
|
}
|
2014-01-23 11:44:35 +11:00
|
|
|
|
2015-07-01 12:47:44 +10:00
|
|
|
if (!USER_VERSION_ATLEAST(269, 10)) {
|
2014-01-23 11:44:35 +11:00
|
|
|
bTheme *btheme;
|
|
|
|
for (btheme = U.themes.first; btheme; btheme = btheme->next) {
|
|
|
|
ThemeSpace *ts;
|
|
|
|
|
|
|
|
for (ts = UI_THEMESPACE_START(btheme); ts != UI_THEMESPACE_END(btheme); ts++) {
|
|
|
|
rgba_char_args_set(ts->tab_active, 114, 114, 114, 255);
|
2014-02-19 08:11:54 +11:00
|
|
|
rgba_char_args_set(ts->tab_inactive, 83, 83, 83, 255);
|
|
|
|
rgba_char_args_set(ts->tab_back, 64, 64, 64, 255);
|
2014-01-23 11:44:35 +11:00
|
|
|
rgba_char_args_set(ts->tab_outline, 60, 60, 60, 255);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2013-10-30 10:38:45 +01:00
|
|
|
|
2015-07-01 12:47:44 +10:00
|
|
|
if (!USER_VERSION_ATLEAST(271, 0)) {
|
2014-06-24 19:00:02 +10:00
|
|
|
bTheme *btheme;
|
|
|
|
for (btheme = U.themes.first; btheme; btheme = btheme->next) {
|
|
|
|
rgba_char_args_set(btheme->tui.wcol_tooltip.text, 255, 255, 255, 255);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-07-01 12:47:44 +10:00
|
|
|
if (!USER_VERSION_ATLEAST(272, 2)) {
|
2014-07-21 12:02:05 +02:00
|
|
|
bTheme *btheme;
|
|
|
|
for (btheme = U.themes.first; btheme; btheme = btheme->next) {
|
|
|
|
rgba_char_args_set_fl(btheme->tv3d.paint_curve_handle, 0.5f, 1.0f, 0.5f, 0.5f);
|
|
|
|
rgba_char_args_set_fl(btheme->tv3d.paint_curve_pivot, 1.0f, 0.5f, 0.5f, 0.5f);
|
|
|
|
rgba_char_args_set_fl(btheme->tima.paint_curve_handle, 0.5f, 1.0f, 0.5f, 0.5f);
|
|
|
|
rgba_char_args_set_fl(btheme->tima.paint_curve_pivot, 1.0f, 0.5f, 0.5f, 0.5f);
|
2014-10-14 10:16:46 +02:00
|
|
|
rgba_char_args_set(btheme->tnode.syntaxr, 115, 115, 115, 255);
|
2014-07-21 12:02:05 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-07-01 12:47:44 +10:00
|
|
|
if (!USER_VERSION_ATLEAST(271, 5)) {
|
Pie Menus C code backend.
This commit merges the code in the pie-menu branch.
As per decisions taken the last few days, there are no pie menus
included and there will be an official add-on including overrides of
some keys with pie menus. However, people will now be able to use the
new code in python.
Full Documentation is in http://wiki.blender.org/index.php/Dev:Ref/
Thanks:
Campbell Barton, Dalai Felinto and Ton Roosendaal for the code review
and design comments
Jonathan Williamson, Pawel Lyczkowski, Pablo Vazquez among others for
suggestions during the development.
Special Thanks to Sean Olson, for his support, suggestions, testing and
merciless bugging so that I would finish the pie menu code. Without him
we wouldn't be here. Also to the rest of the developers of the original
python add-on, Patrick Moore and Dan Eicher and finally to Matt Ebb, who
did the research and first implementation and whose code I used to get
started.
2014-08-11 10:39:59 +02:00
|
|
|
bTheme *btheme;
|
|
|
|
|
|
|
|
struct uiWidgetColors wcol_pie_menu = {
|
|
|
|
{10, 10, 10, 200},
|
|
|
|
{25, 25, 25, 230},
|
|
|
|
{140, 140, 140, 255},
|
|
|
|
{45, 45, 45, 230},
|
|
|
|
|
|
|
|
{160, 160, 160, 255},
|
|
|
|
{255, 255, 255, 255},
|
|
|
|
|
|
|
|
1,
|
|
|
|
10, -10
|
|
|
|
};
|
|
|
|
|
2014-08-13 15:11:19 +02:00
|
|
|
U.pie_menu_radius = 100;
|
Pie Menus C code backend.
This commit merges the code in the pie-menu branch.
As per decisions taken the last few days, there are no pie menus
included and there will be an official add-on including overrides of
some keys with pie menus. However, people will now be able to use the
new code in python.
Full Documentation is in http://wiki.blender.org/index.php/Dev:Ref/
Thanks:
Campbell Barton, Dalai Felinto and Ton Roosendaal for the code review
and design comments
Jonathan Williamson, Pawel Lyczkowski, Pablo Vazquez among others for
suggestions during the development.
Special Thanks to Sean Olson, for his support, suggestions, testing and
merciless bugging so that I would finish the pie menu code. Without him
we wouldn't be here. Also to the rest of the developers of the original
python add-on, Patrick Moore and Dan Eicher and finally to Matt Ebb, who
did the research and first implementation and whose code I used to get
started.
2014-08-11 10:39:59 +02:00
|
|
|
U.pie_menu_threshold = 12;
|
|
|
|
U.pie_animation_timeout = 6;
|
|
|
|
|
|
|
|
for (btheme = U.themes.first; btheme; btheme = btheme->next) {
|
|
|
|
btheme->tui.wcol_pie_menu = wcol_pie_menu;
|
2014-08-25 12:47:11 +02:00
|
|
|
|
|
|
|
ui_theme_space_init_handles_color(&btheme->tclip);
|
|
|
|
ui_theme_space_init_handles_color(&btheme->tima);
|
|
|
|
btheme->tima.handle_vertex_size = 5;
|
|
|
|
btheme->tclip.handle_vertex_size = 5;
|
Pie Menus C code backend.
This commit merges the code in the pie-menu branch.
As per decisions taken the last few days, there are no pie menus
included and there will be an official add-on including overrides of
some keys with pie menus. However, people will now be able to use the
new code in python.
Full Documentation is in http://wiki.blender.org/index.php/Dev:Ref/
Thanks:
Campbell Barton, Dalai Felinto and Ton Roosendaal for the code review
and design comments
Jonathan Williamson, Pawel Lyczkowski, Pablo Vazquez among others for
suggestions during the development.
Special Thanks to Sean Olson, for his support, suggestions, testing and
merciless bugging so that I would finish the pie menu code. Without him
we wouldn't be here. Also to the rest of the developers of the original
python add-on, Patrick Moore and Dan Eicher and finally to Matt Ebb, who
did the research and first implementation and whose code I used to get
started.
2014-08-11 10:39:59 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-07-01 12:47:44 +10:00
|
|
|
if (!USER_VERSION_ATLEAST(271, 6)) {
|
2014-08-25 12:45:49 +02:00
|
|
|
bTheme *btheme;
|
|
|
|
for (btheme = U.themes.first; btheme; btheme = btheme->next) {
|
|
|
|
/* check for (alpha == 0) is safe, then color was never set */
|
|
|
|
if (btheme->tv3d.loop_normal[3] == 0) {
|
|
|
|
rgba_char_args_set(btheme->tv3d.loop_normal, 0xDD, 0x23, 0xDD, 255);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-07-01 12:47:44 +10:00
|
|
|
if (!USER_VERSION_ATLEAST(272, 3)) {
|
2014-10-27 18:11:55 +01:00
|
|
|
bTheme *btheme;
|
|
|
|
for (btheme = U.themes.first; btheme; btheme = btheme->next) {
|
2014-12-08 00:38:36 +01:00
|
|
|
rgba_char_args_set_fl(btheme->tui.widget_emboss, 1.0f, 1.0f, 1.0f, 0.02f);
|
2014-10-27 18:11:55 +01:00
|
|
|
}
|
|
|
|
}
|
2015-01-03 18:07:05 +13:00
|
|
|
|
2015-07-01 12:47:44 +10:00
|
|
|
if (!USER_VERSION_ATLEAST(273, 1)) {
|
2015-01-03 18:07:05 +13:00
|
|
|
bTheme *btheme;
|
|
|
|
for (btheme = U.themes.first; btheme; btheme = btheme->next) {
|
|
|
|
/* Grease Pencil vertex settings */
|
|
|
|
rgba_char_args_set(btheme->tv3d.gp_vertex, 0, 0, 0, 255);
|
|
|
|
rgba_char_args_set(btheme->tv3d.gp_vertex_select, 255, 133, 0, 255);
|
|
|
|
btheme->tv3d.gp_vertex_size = 3;
|
|
|
|
|
|
|
|
rgba_char_args_set(btheme->tseq.gp_vertex, 0, 0, 0, 255);
|
|
|
|
rgba_char_args_set(btheme->tseq.gp_vertex_select, 255, 133, 0, 255);
|
|
|
|
btheme->tseq.gp_vertex_size = 3;
|
|
|
|
|
|
|
|
rgba_char_args_set(btheme->tima.gp_vertex, 0, 0, 0, 255);
|
|
|
|
rgba_char_args_set(btheme->tima.gp_vertex_select, 255, 133, 0, 255);
|
|
|
|
btheme->tima.gp_vertex_size = 3;
|
|
|
|
|
|
|
|
rgba_char_args_set(btheme->tnode.gp_vertex, 0, 0, 0, 255);
|
|
|
|
rgba_char_args_set(btheme->tnode.gp_vertex_select, 255, 133, 0, 255);
|
|
|
|
btheme->tnode.gp_vertex_size = 3;
|
2015-01-04 00:48:29 +13:00
|
|
|
|
|
|
|
/* Timeline Keyframe Indicators */
|
2016-10-16 20:30:51 +02:00
|
|
|
rgba_char_args_set(btheme->ttime.time_keyframe, 0xDD, 0xD7, 0x00, 0xFF);
|
|
|
|
rgba_char_args_set(btheme->ttime.time_gp_keyframe, 0xB5, 0xE6, 0x1D, 0xFF);
|
2015-01-03 18:07:05 +13:00
|
|
|
}
|
|
|
|
}
|
2014-10-27 18:11:55 +01:00
|
|
|
|
2015-07-01 12:47:44 +10:00
|
|
|
if (!USER_VERSION_ATLEAST(273, 5)) {
|
2015-01-28 13:03:42 +01:00
|
|
|
bTheme *btheme;
|
|
|
|
for (btheme = U.themes.first; btheme; btheme = btheme->next) {
|
|
|
|
unsigned char *cp = (unsigned char *)btheme->tv3d.clipping_border_3d;
|
|
|
|
int c;
|
|
|
|
copy_v4_v4_char((char *)cp, btheme->tv3d.back);
|
|
|
|
c = cp[0] - 8;
|
|
|
|
CLAMP(c, 0, 255);
|
|
|
|
cp[0] = c;
|
|
|
|
c = cp[1] - 8;
|
|
|
|
CLAMP(c, 0, 255);
|
|
|
|
cp[1] = c;
|
|
|
|
c = cp[2] - 8;
|
|
|
|
CLAMP(c, 0, 255);
|
|
|
|
cp[2] = c;
|
|
|
|
cp[3] = 255;
|
|
|
|
}
|
|
|
|
}
|
2015-04-21 19:01:09 +02:00
|
|
|
|
2015-07-01 12:47:44 +10:00
|
|
|
if (!USER_VERSION_ATLEAST(274, 5)) {
|
2015-04-21 19:01:09 +02:00
|
|
|
bTheme *btheme;
|
|
|
|
for (btheme = U.themes.first; btheme; btheme = btheme->next) {
|
|
|
|
copy_v4_v4_char(btheme->tima.metadatatext, btheme->tima.text_hi);
|
|
|
|
copy_v4_v4_char(btheme->tseq.metadatatext, btheme->tseq.text_hi);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-07-01 12:47:44 +10:00
|
|
|
if (!USER_VERSION_ATLEAST(275, 1)) {
|
2015-06-12 15:25:46 +02:00
|
|
|
bTheme *btheme;
|
|
|
|
for (btheme = U.themes.first; btheme; btheme = btheme->next) {
|
|
|
|
copy_v4_v4_char(btheme->tclip.metadatatext, btheme->tseq.text_hi);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-07-01 13:45:19 +10:00
|
|
|
if (!USER_VERSION_ATLEAST(275, 2)) {
|
|
|
|
U.ndof_deadzone = 0.1;
|
|
|
|
}
|
|
|
|
|
2015-08-01 17:39:48 +02:00
|
|
|
if (!USER_VERSION_ATLEAST(275, 4)) {
|
|
|
|
U.node_margin = 80;
|
|
|
|
}
|
|
|
|
|
2015-09-20 20:17:19 +02:00
|
|
|
if (!USER_VERSION_ATLEAST(276, 1)) {
|
|
|
|
bTheme *btheme;
|
|
|
|
for (btheme = U.themes.first; btheme; btheme = btheme->next) {
|
|
|
|
rgba_char_args_set_fl(btheme->tima.preview_back, 0.0f, 0.0f, 0.0f, 0.3f);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-10-23 04:54:07 +11:00
|
|
|
if (!USER_VERSION_ATLEAST(276, 2)) {
|
|
|
|
bTheme *btheme;
|
|
|
|
for (btheme = U.themes.first; btheme; btheme = btheme->next) {
|
|
|
|
rgba_char_args_set(btheme->tclip.gp_vertex, 0, 0, 0, 255);
|
|
|
|
rgba_char_args_set(btheme->tclip.gp_vertex_select, 255, 133, 0, 255);
|
|
|
|
btheme->tclip.gp_vertex_size = 3;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-12-01 23:56:48 +01:00
|
|
|
if (!USER_VERSION_ATLEAST(276, 3)) {
|
|
|
|
bTheme *btheme;
|
|
|
|
for (btheme = U.themes.first; btheme; btheme = btheme->next) {
|
|
|
|
rgba_char_args_set(btheme->tseq.text_strip, 162, 151, 0, 255);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-01-18 01:39:09 +01:00
|
|
|
if (!USER_VERSION_ATLEAST(276, 8)) {
|
|
|
|
bTheme *btheme;
|
|
|
|
for (btheme = U.themes.first; btheme; btheme = btheme->next) {
|
|
|
|
rgba_char_args_set(btheme->tui.wcol_progress.item, 128, 128, 128, 255);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-02-01 14:01:02 +01:00
|
|
|
if (!USER_VERSION_ATLEAST(276, 10)) {
|
|
|
|
bTheme *btheme;
|
|
|
|
for (btheme = U.themes.first; btheme; btheme = btheme->next) {
|
|
|
|
/* 3dView Keyframe Indicators */
|
2016-10-16 20:30:51 +02:00
|
|
|
rgba_char_args_set(btheme->tv3d.time_keyframe, 0xDD, 0xD7, 0x00, 0xFF);
|
|
|
|
rgba_char_args_set(btheme->tv3d.time_gp_keyframe, 0xB5, 0xE6, 0x1D, 0xFF);
|
2016-02-01 14:01:02 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-02-26 11:15:23 +01:00
|
|
|
if (!USER_VERSION_ATLEAST(277, 0)) {
|
2016-02-05 02:57:53 +11:00
|
|
|
bTheme *btheme;
|
|
|
|
for (btheme = U.themes.first; btheme; btheme = btheme->next) {
|
|
|
|
if (memcmp(btheme->tui.wcol_list_item.item, btheme->tui.wcol_list_item.text_sel, sizeof(char) * 3) == 0) {
|
|
|
|
copy_v4_v4_char(btheme->tui.wcol_list_item.item, btheme->tui.wcol_text.item);
|
|
|
|
copy_v4_v4_char(btheme->tui.wcol_list_item.text_sel, btheme->tui.wcol_text.text_sel);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2016-07-03 03:42:28 +12:00
|
|
|
|
|
|
|
if (!USER_VERSION_ATLEAST(277, 2)) {
|
|
|
|
bTheme *btheme;
|
|
|
|
for (btheme = U.themes.first; btheme; btheme = btheme->next) {
|
|
|
|
if (btheme->tact.keyframe_scale_fac < 0.1f)
|
|
|
|
btheme->tact.keyframe_scale_fac = 1.0f;
|
|
|
|
}
|
|
|
|
}
|
2016-02-05 02:57:53 +11:00
|
|
|
|
2016-10-17 19:43:35 +00:00
|
|
|
if (!USER_VERSION_ATLEAST(278, 2)) {
|
2016-09-21 23:04:26 +02:00
|
|
|
bTheme *btheme;
|
|
|
|
for (btheme = U.themes.first; btheme; btheme = btheme->next) {
|
|
|
|
rgba_char_args_set(btheme->tv3d.vertex_bevel, 0, 165, 255, 255);
|
|
|
|
rgba_char_args_set(btheme->tv3d.edge_bevel, 0, 165, 255, 255);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-11-12 16:14:09 +01:00
|
|
|
if (!USER_VERSION_ATLEAST(278, 3)) {
|
|
|
|
for (bTheme *btheme = U.themes.first; btheme; btheme = btheme->next) {
|
|
|
|
/* Keyframe Indicators (were using wrong alpha) */
|
|
|
|
btheme->tv3d.time_keyframe[3] = btheme->tv3d.time_gp_keyframe[3] = 255;
|
|
|
|
btheme->ttime.time_keyframe[3] = btheme->ttime.time_gp_keyframe[3] = 255;
|
|
|
|
}
|
|
|
|
}
|
Main Workspace Integration
This commit does the main integration of workspaces, which is a design we agreed on during the 2.8 UI workshop (see https://wiki.blender.org/index.php/Dev:2.8/UI/Workshop_Writeup)
Workspaces should generally be stable, I'm not aware of any remaining bugs (or I've forgotten them :) ). If you find any, let me know!
(Exception: mode switching button might get out of sync with actual mode in some cases, would consider that a limitation/ToDo. Needs to be resolved at some point.)
== Main Changes/Features
* Introduces the new Workspaces as data-blocks.
* Allow storing a number of custom workspaces as part of the user configuration. Needs further work to allow adding and deleting individual workspaces.
* Bundle a default workspace configuration with Blender (current screen-layouts converted to workspaces).
* Pressing button to add a workspace spawns a menu to select between "Duplicate Current" and the workspaces from the user configuration. If no workspaces are stored in the user configuration, the default workspaces are listed instead.
* Store screen-layouts (`bScreen`) per workspace.
* Store an active screen-layout per workspace. Changing the workspace will enable this layout.
* Store active mode in workspace. Changing the workspace will also enter the mode of the new workspace. (Note that we still store the active mode in the object, moving this completely to workspaces is a separate project.)
* Store an active render layer per workspace.
* Moved mode switch from 3D View header to Info Editor header.
* Store active scene in window (not directly workspace related, but overlaps quite a bit).
* Removed 'Use Global Scene' User Preference option.
* Compatibility with old files - a new workspace is created for every screen-layout of old files. Old Blender versions should be able to read files saved with workspace support as well.
* Default .blend only contains one workspace ("General").
* Support appending workspaces.
Opening files without UI and commandline rendering should work fine.
Note that the UI is temporary! We plan to introduce a new global topbar
that contains the workspace options and tabs for switching workspaces.
== Technical Notes
* Workspaces are data-blocks.
* Adding and removing `bScreen`s should be done through `ED_workspace_layout` API now.
* A workspace can be active in multiple windows at the same time.
* The mode menu (which is now in the Info Editor header) doesn't display "Grease Pencil Edit" mode anymore since its availability depends on the active editor. Will be fixed by making Grease Pencil an own object type (as planned).
* The button to change the active workspace object mode may get out of sync with the mode of the active object. Will either be resolved by moving mode out of object data, or we'll disable workspace modes again (there's a `#define USE_WORKSPACE_MODE` for that).
* Screen-layouts (`bScreen`) are IDs and thus stored in a main list-base. Had to add a wrapper `WorkSpaceLayout` so we can store them in a list-base within workspaces, too. On the long run we could completely replace `bScreen` by workspace structs.
* `WorkSpace` types use some special compiler trickery to allow marking structs and struct members as private. BKE_workspace API should be used for accessing those.
* Added scene operators `SCENE_OT_`. Was previously done through screen operators.
== BPY API Changes
* Removed `Screen.scene`, added `Window.scene`
* Removed `UserPreferencesView.use_global_scene`
* Added `Context.workspace`, `Window.workspace` and `BlendData.workspaces`
* Added `bpy.types.WorkSpace` containing `screens`, `object_mode` and `render_layer`
* Added Screen.layout_name for the layout name that'll be displayed in the UI (may differ from internal name)
== What's left?
* There are a few open design questions (T50521). We should find the needed answers and implement them.
* Allow adding and removing individual workspaces from workspace configuration (needs UI design).
* Get the override system ready and support overrides per workspace.
* Support custom UI setups as part of workspaces (hidden panels, hidden buttons, customizable toolbars, etc).
* Allow enabling add-ons per workspace.
* Support custom workspace keymaps.
* Remove special exception for workspaces in linking code (so they're always appended, never linked). Depends on a few things, so best to solve later.
* Get the topbar done.
* Workspaces need a proper icon, current one is just a placeholder :)
Reviewed By: campbellbarton, mont29
Tags: #user_interface, #bf_blender_2.8
Maniphest Tasks: T50521
Differential Revision: https://developer.blender.org/D2451
2017-06-01 19:56:58 +02:00
|
|
|
if (!USER_VERSION_ATLEAST(280, 1)) {
|
2017-03-17 17:08:20 +01:00
|
|
|
/* interface_widgets.c */
|
|
|
|
struct uiWidgetColors wcol_tab = {
|
|
|
|
{255, 255, 255, 255},
|
|
|
|
{83, 83, 83, 255},
|
|
|
|
{114, 114, 114, 255},
|
|
|
|
{90, 90, 90, 255},
|
|
|
|
|
|
|
|
{0, 0, 0, 255},
|
|
|
|
{0, 0, 0, 255},
|
|
|
|
|
|
|
|
0,
|
|
|
|
0, 0
|
|
|
|
};
|
|
|
|
|
|
|
|
for (bTheme *btheme = U.themes.first; btheme; btheme = btheme->next) {
|
|
|
|
btheme->tui.wcol_tab = wcol_tab;
|
|
|
|
}
|
2016-02-26 11:15:23 +01:00
|
|
|
}
|
|
|
|
|
Main Workspace Integration
This commit does the main integration of workspaces, which is a design we agreed on during the 2.8 UI workshop (see https://wiki.blender.org/index.php/Dev:2.8/UI/Workshop_Writeup)
Workspaces should generally be stable, I'm not aware of any remaining bugs (or I've forgotten them :) ). If you find any, let me know!
(Exception: mode switching button might get out of sync with actual mode in some cases, would consider that a limitation/ToDo. Needs to be resolved at some point.)
== Main Changes/Features
* Introduces the new Workspaces as data-blocks.
* Allow storing a number of custom workspaces as part of the user configuration. Needs further work to allow adding and deleting individual workspaces.
* Bundle a default workspace configuration with Blender (current screen-layouts converted to workspaces).
* Pressing button to add a workspace spawns a menu to select between "Duplicate Current" and the workspaces from the user configuration. If no workspaces are stored in the user configuration, the default workspaces are listed instead.
* Store screen-layouts (`bScreen`) per workspace.
* Store an active screen-layout per workspace. Changing the workspace will enable this layout.
* Store active mode in workspace. Changing the workspace will also enter the mode of the new workspace. (Note that we still store the active mode in the object, moving this completely to workspaces is a separate project.)
* Store an active render layer per workspace.
* Moved mode switch from 3D View header to Info Editor header.
* Store active scene in window (not directly workspace related, but overlaps quite a bit).
* Removed 'Use Global Scene' User Preference option.
* Compatibility with old files - a new workspace is created for every screen-layout of old files. Old Blender versions should be able to read files saved with workspace support as well.
* Default .blend only contains one workspace ("General").
* Support appending workspaces.
Opening files without UI and commandline rendering should work fine.
Note that the UI is temporary! We plan to introduce a new global topbar
that contains the workspace options and tabs for switching workspaces.
== Technical Notes
* Workspaces are data-blocks.
* Adding and removing `bScreen`s should be done through `ED_workspace_layout` API now.
* A workspace can be active in multiple windows at the same time.
* The mode menu (which is now in the Info Editor header) doesn't display "Grease Pencil Edit" mode anymore since its availability depends on the active editor. Will be fixed by making Grease Pencil an own object type (as planned).
* The button to change the active workspace object mode may get out of sync with the mode of the active object. Will either be resolved by moving mode out of object data, or we'll disable workspace modes again (there's a `#define USE_WORKSPACE_MODE` for that).
* Screen-layouts (`bScreen`) are IDs and thus stored in a main list-base. Had to add a wrapper `WorkSpaceLayout` so we can store them in a list-base within workspaces, too. On the long run we could completely replace `bScreen` by workspace structs.
* `WorkSpace` types use some special compiler trickery to allow marking structs and struct members as private. BKE_workspace API should be used for accessing those.
* Added scene operators `SCENE_OT_`. Was previously done through screen operators.
== BPY API Changes
* Removed `Screen.scene`, added `Window.scene`
* Removed `UserPreferencesView.use_global_scene`
* Added `Context.workspace`, `Window.workspace` and `BlendData.workspaces`
* Added `bpy.types.WorkSpace` containing `screens`, `object_mode` and `render_layer`
* Added Screen.layout_name for the layout name that'll be displayed in the UI (may differ from internal name)
== What's left?
* There are a few open design questions (T50521). We should find the needed answers and implement them.
* Allow adding and removing individual workspaces from workspace configuration (needs UI design).
* Get the override system ready and support overrides per workspace.
* Support custom UI setups as part of workspaces (hidden panels, hidden buttons, customizable toolbars, etc).
* Allow enabling add-ons per workspace.
* Support custom workspace keymaps.
* Remove special exception for workspaces in linking code (so they're always appended, never linked). Depends on a few things, so best to solve later.
* Get the topbar done.
* Workspaces need a proper icon, current one is just a placeholder :)
Reviewed By: campbellbarton, mont29
Tags: #user_interface, #bf_blender_2.8
Maniphest Tasks: T50521
Differential Revision: https://developer.blender.org/D2451
2017-06-01 19:56:58 +02:00
|
|
|
/**
|
|
|
|
* Include next version bump.
|
|
|
|
*
|
|
|
|
* (keep this block even if it becomes empty).
|
|
|
|
*/
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
Holiday coding log :)
Nice formatted version (pictures soon):
http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.66/Usability
Short list of main changes:
- Transparent region option (over main region), added code to blend in/out such panels.
- Min size window now 640 x 480
- Fixed DPI for ui - lots of cleanup and changes everywhere. Icon image need correct size still, layer-in-use icon needs remake.
- Macbook retina support, use command line --no-native-pixels to disable it
- Timeline Marker label was drawing wrong
- Trackpad and magic mouse: supports zoom (hold ctrl)
- Fix for splash position: removed ghost function and made window size update after creation immediate
- Fast undo buffer save now adds UI as well. Could be checked for regular file save even...
Quit.blend and temp file saving use this now.
- Dixed filename in window on reading quit.blend or temp saves, and they now add a warning in window title: "(Recovered)"
- New Userpref option "Keep Session" - this always saves quit.blend, and loads on start.
This allows keeping UI and data without actual saves, until you actually save.
When you load startup.blend and quit, it recognises the quit.blend as a startup (no file name in header)
- Added 3D view copy/paste buffers (selected objects). Shortcuts ctrl-c, ctrl-v (OSX, cmd-c, cmd-v).
Coded partial file saving for it. Could be used for other purposes. Todo: use OS clipboards.
- User preferences (themes, keymaps, user settings) now can be saved as a separate file.
Old option is called "Save Startup File" the new one "Save User Settings".
To visualise this difference, the 'save startup file' button has been removed from user preferences window. That option is available as CTRL+U and in File menu still.
- OSX: fixed bug that stopped giving mouse events outside window.
This also fixes "Continuous Grab" for OSX. (error since 2009)
2012-12-12 18:58:11 +00:00
|
|
|
if (U.pixelsize == 0.0f)
|
|
|
|
U.pixelsize = 1.0f;
|
|
|
|
|
2013-04-29 15:50:12 +00:00
|
|
|
if (U.image_draw_method == 0)
|
|
|
|
U.image_draw_method = IMAGE_DRAW_METHOD_2DTEXTURE;
|
|
|
|
|
2015-07-24 15:44:17 +02:00
|
|
|
// keep the following until the new audaspace is default to be built with
|
|
|
|
#ifdef WITH_SYSTEM_AUDASPACE
|
|
|
|
// we default to the first audio device
|
|
|
|
U.audiodevice = 0;
|
|
|
|
#endif
|
|
|
|
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
/* funny name, but it is GE stuff, moves userdef stuff to engine */
|
|
|
|
// XXX space_set_commmandline_options();
|
|
|
|
/* this timer uses U */
|
|
|
|
// XXX reset_autosave();
|
|
|
|
|
2010-07-14 14:11:03 +00:00
|
|
|
}
|