2015-08-16 17:32:01 +10: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
|
2018-06-01 18:19:39 +02:00
|
|
|
* of the License, or (at your option) any later version.
|
2015-08-16 17:32:01 +10: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,
|
|
|
|
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
*
|
|
|
|
* The Original Code is Copyright (C) 2011 Blender Foundation.
|
|
|
|
* All rights reserved.
|
|
|
|
*/
|
|
|
|
|
2019-02-06 15:42:22 +11:00
|
|
|
/** \file \ingroup blt
|
2015-08-16 17:32:01 +10:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef __BLT_TRANSLATION_H__
|
|
|
|
#define __BLT_TRANSLATION_H__
|
|
|
|
|
|
|
|
#include "BLI_utildefines.h" /* for bool type */
|
|
|
|
|
|
|
|
#define TEXT_DOMAIN_NAME "blender"
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
bool BLT_is_default_context(const char *msgctxt);
|
|
|
|
const char *BLT_pgettext(const char *msgctxt, const char *msgid);
|
|
|
|
|
|
|
|
/* translation */
|
|
|
|
bool BLT_translate(void);
|
|
|
|
bool BLT_translate_iface(void);
|
|
|
|
bool BLT_translate_tooltips(void);
|
|
|
|
bool BLT_translate_new_dataname(void);
|
|
|
|
const char *BLT_translate_do(const char *msgctxt, const char *msgid);
|
|
|
|
const char *BLT_translate_do_iface(const char *msgctxt, const char *msgid);
|
|
|
|
const char *BLT_translate_do_tooltip(const char *msgctxt, const char *msgid);
|
|
|
|
const char *BLT_translate_do_new_dataname(const char *msgctxt, const char *msgid);
|
|
|
|
|
2016-05-03 12:38:21 +02:00
|
|
|
bool BLT_lang_is_ime_supported(void);
|
2015-08-16 17:32:01 +10:00
|
|
|
|
|
|
|
/* The "translation-marker" macro. */
|
|
|
|
#define N_(msgid) msgid
|
|
|
|
#define CTX_N_(context, msgid) msgid
|
|
|
|
|
|
|
|
/* Those macros should be used everywhere in UI code. */
|
|
|
|
#ifdef WITH_INTERNATIONAL
|
|
|
|
/*# define _(msgid) BLT_gettext(msgid) */
|
|
|
|
# define IFACE_(msgid) BLT_translate_do_iface(NULL, msgid)
|
|
|
|
# define TIP_(msgid) BLT_translate_do_tooltip(NULL, msgid)
|
|
|
|
# define DATA_(msgid) BLT_translate_do_new_dataname(NULL, msgid)
|
|
|
|
# define CTX_IFACE_(context, msgid) BLT_translate_do_iface(context, msgid)
|
|
|
|
# define CTX_TIP_(context, msgid) BLT_translate_do_tooltip(context, msgid)
|
|
|
|
# define CTX_DATA_(context, msgid) BLT_translate_do_new_dataname(context, msgid)
|
|
|
|
#else
|
|
|
|
/*# define _(msgid) msgid */
|
|
|
|
# define IFACE_(msgid) msgid
|
|
|
|
# define TIP_(msgid) msgid
|
|
|
|
# define DATA_(msgid) msgid
|
|
|
|
# define CTX_IFACE_(context, msgid) msgid
|
|
|
|
# define CTX_TIP_(context, msgid) msgid
|
|
|
|
# define CTX_DATA_(context, msgid) msgid
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Helper macro, when we want to define a same msgid for multiple msgctxt...
|
|
|
|
* Does nothing in C, but is "parsed" by our i18n py tools.
|
|
|
|
* XXX Currently limited to at most 16 contexts at once
|
|
|
|
* (but you can call it several times with the same msgid, should you need more contexts!).
|
|
|
|
*/
|
|
|
|
#define BLT_I18N_MSGID_MULTI_CTXT(msgid, ...)
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
* All i18n contexts must be defined here.
|
|
|
|
* This is a nice way to be sure not to use a context twice for different
|
|
|
|
* things, and limit the number of existing contexts!
|
|
|
|
* WARNING! Contexts should not be longer than BKE_ST_MAXNAME - 1!
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* Default, void context.
|
|
|
|
* WARNING! The "" context is not the same as no (NULL) context at mo/boost::locale level!
|
|
|
|
* NOTE: We translate BLT_I18NCONTEXT_DEFAULT as BLT_I18NCONTEXT_DEFAULT_BPY in Python, as we can't use "natural"
|
|
|
|
* None value in rna string properties... :/
|
|
|
|
* The void string "" is also interpreted as BLT_I18NCONTEXT_DEFAULT.
|
|
|
|
* For perf reason, we only use the first char to detect this context, so other contexts should never start
|
|
|
|
* with the same char!
|
|
|
|
*/
|
|
|
|
#define BLT_I18NCONTEXT_DEFAULT NULL
|
|
|
|
#define BLT_I18NCONTEXT_DEFAULT_BPYRNA "*"
|
|
|
|
|
|
|
|
/* Default context for operator names/labels. */
|
|
|
|
#define BLT_I18NCONTEXT_OPERATOR_DEFAULT "Operator"
|
|
|
|
|
2015-09-27 09:49:41 +02:00
|
|
|
/* Context for events/keymaps (necessary, since those often use one or two letters,
|
|
|
|
* easy to get collisions with other areas...). */
|
|
|
|
#define BLT_I18NCONTEXT_UI_EVENTS "UI_Events_KeyMaps"
|
|
|
|
|
|
|
|
/* Mark the msgid applies to several elements (needed in some cases, as english adjectives have no plural mark :( ). */
|
2015-08-16 17:32:01 +10:00
|
|
|
#define BLT_I18NCONTEXT_PLURAL "Plural"
|
|
|
|
|
|
|
|
/* ID-types contexts. */
|
|
|
|
/* WARNING! Keep it in sync with idtypes in blenkernel/intern/idcode.c */
|
|
|
|
#define BLT_I18NCONTEXT_ID_ACTION "Action"
|
|
|
|
#define BLT_I18NCONTEXT_ID_ARMATURE "Armature"
|
|
|
|
#define BLT_I18NCONTEXT_ID_BRUSH "Brush"
|
|
|
|
#define BLT_I18NCONTEXT_ID_CAMERA "Camera"
|
Basic Alembic support
All in all, this patch adds an Alembic importer, an Alembic exporter,
and a new CacheFile data block which, for now, wraps around an Alembic
archive. This data block is made available through a new modifier ("Mesh
Sequence Cache") as well as a new constraint ("Transform Cache") to
somewhat properly support respectively geometric and transformation data
streaming from alembic caches.
A more in-depth documentation is to be found on the wiki, as well as a
guide to compile alembic: https://wiki.blender.org/index.php/
User:Kevindietrich/AlembicBasicIo.
Many thanks to everyone involved in this little project, and huge shout
out to "cgstrive" for the thorough testings with Maya, 3ds Max, Houdini
and Realflow as well as @fjuhec, @jensverwiebe and @jasperge for the
custom builds and compile fixes.
Reviewers: sergey, campbellbarton, mont29
Reviewed By: sergey, campbellbarton, mont29
Differential Revision: https://developer.blender.org/D2060
2016-08-06 06:20:37 +02:00
|
|
|
#define BLT_I18NCONTEXT_ID_CACHEFILE "CacheFile"
|
Collections and groups unification
OVERVIEW
* In 2.7 terminology, all layers and groups are now collection datablocks.
* These collections are nestable, linkable, instanceable, overrideable, ..
which opens up new ways to set up scenes and link + override data.
* Viewport/render visibility and selectability are now a part of the collection
and shared across all view layers and linkable.
* View layers define which subset of the scene collection hierarchy is excluded
for each. For many workflows one view layer can be used, these are more of an
advanced feature now.
OUTLINER
* The outliner now has a "View Layer" display mode instead of "Collections",
which can display the collections and/or objects in the view layer.
* In this display mode, collections can be excluded with the right click menu.
These will then be greyed out and their objects will be excluded.
* To view collections not linked to any scene, the "Blender File" display mode
can be used, with the new filtering option to just see Colleciton datablocks.
* The outliner right click menus for collections and objects were reorganized.
* Drag and drop still needs to be improved. Like before, dragging the icon or
text gives different results, we'll unify this later.
LINKING AND OVERRIDES
* Collections can now be linked into the scene without creating an instance,
with the link/append operator or from the collections view in the outliner.
* Collections can get static overrides with the right click menu in the outliner,
but this is rather unreliable and not clearly communicated at the moment.
* We still need to improve the make override operator to turn collection instances
into collections with overrides directly in the scene.
PERFORMANCE
* We tried to make performance not worse than before and improve it in some
cases. The main thing that's still a bit slower is multiple scenes, we have to
change the layer syncing to only updated affected scenes.
* Collections keep a list of their parent collections for faster incremental
updates in syncing and caching.
* View layer bases are now in a object -> base hash to avoid quadratic time
lookups internally and in API functions like visible_get().
VERSIONING
* Compatibility with 2.7 files should be improved due to the new visibility
controls. Of course users may not want to set up their scenes differently
now to avoid having separate layers and groups.
* Compatibility with 2.8 is mostly there, and was tested on Eevee demo and Hero
files. There's a few things which are know to be not quite compatible, like
nested layer collections inside groups.
* The versioning code for 2.8 files is quite complicated, and isolated behind
#ifdef so it can be removed at the end of the release cycle.
KNOWN ISSUES
* The G-key group operators in the 3D viewport were left mostly as is, they
need to be modified still to fit better.
* Same for the groups panel in the object properties. This needs to be updated
still, or perhaps replaced by something better.
* Collections must all have a unique name. Less restrictive namespacing is to
be done later, we'll have to see how important this is as all objects within
the collections must also have a unique name anyway.
* Full scene copy and delete scene are exactly doing the right thing yet.
Differential Revision: https://developer.blender.org/D3383
https://code.blender.org/2018/05/collections-and-groups/
2018-04-30 15:57:22 +02:00
|
|
|
#define BLT_I18NCONTEXT_ID_COLLECTION "Collection"
|
2015-08-16 17:32:01 +10:00
|
|
|
#define BLT_I18NCONTEXT_ID_CURVE "Curve"
|
|
|
|
#define BLT_I18NCONTEXT_ID_FREESTYLELINESTYLE "FreestyleLineStyle"
|
|
|
|
#define BLT_I18NCONTEXT_ID_GPENCIL "GPencil"
|
|
|
|
#define BLT_I18NCONTEXT_ID_ID "ID"
|
|
|
|
#define BLT_I18NCONTEXT_ID_IMAGE "Image"
|
|
|
|
/*#define BLT_I18NCONTEXT_ID_IPO "Ipo"*/ /* Deprecated */
|
|
|
|
#define BLT_I18NCONTEXT_ID_SHAPEKEY "Key"
|
|
|
|
#define BLT_I18NCONTEXT_ID_LAMP "Lamp"
|
|
|
|
#define BLT_I18NCONTEXT_ID_LIBRARY "Library"
|
|
|
|
#define BLT_I18NCONTEXT_ID_LATTICE "Lattice"
|
|
|
|
#define BLT_I18NCONTEXT_ID_MATERIAL "Material"
|
|
|
|
#define BLT_I18NCONTEXT_ID_METABALL "Metaball"
|
|
|
|
#define BLT_I18NCONTEXT_ID_MESH "Mesh"
|
|
|
|
#define BLT_I18NCONTEXT_ID_NODETREE "NodeTree"
|
|
|
|
#define BLT_I18NCONTEXT_ID_OBJECT "Object"
|
|
|
|
#define BLT_I18NCONTEXT_ID_PAINTCURVE "PaintCurve"
|
|
|
|
#define BLT_I18NCONTEXT_ID_PALETTE "Palette"
|
2016-12-28 17:30:58 +01:00
|
|
|
#define BLT_I18NCONTEXT_ID_PARTICLESETTINGS "ParticleSettings"
|
2017-06-12 20:59:54 +10:00
|
|
|
#define BLT_I18NCONTEXT_ID_LIGHTPROBE "LightProbe"
|
2015-08-16 17:32:01 +10:00
|
|
|
#define BLT_I18NCONTEXT_ID_SCENE "Scene"
|
|
|
|
#define BLT_I18NCONTEXT_ID_SCREEN "Screen"
|
|
|
|
#define BLT_I18NCONTEXT_ID_SEQUENCE "Sequence"
|
|
|
|
#define BLT_I18NCONTEXT_ID_SPEAKER "Speaker"
|
|
|
|
#define BLT_I18NCONTEXT_ID_SOUND "Sound"
|
|
|
|
#define BLT_I18NCONTEXT_ID_TEXTURE "Texture"
|
|
|
|
#define BLT_I18NCONTEXT_ID_TEXT "Text"
|
|
|
|
#define BLT_I18NCONTEXT_ID_VFONT "VFont"
|
|
|
|
#define BLT_I18NCONTEXT_ID_WORLD "World"
|
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
|
|
|
#define BLT_I18NCONTEXT_ID_WORKSPACE "WorkSpace"
|
2015-08-16 17:32:01 +10:00
|
|
|
#define BLT_I18NCONTEXT_ID_WINDOWMANAGER "WindowManager"
|
|
|
|
#define BLT_I18NCONTEXT_ID_MOVIECLIP "MovieClip"
|
|
|
|
#define BLT_I18NCONTEXT_ID_MASK "Mask"
|
|
|
|
|
|
|
|
/* Helper for bpy.app.i18n object... */
|
|
|
|
typedef struct {
|
|
|
|
const char *c_id;
|
|
|
|
const char *py_id;
|
|
|
|
const char *value;
|
|
|
|
} BLT_i18n_contexts_descriptor;
|
|
|
|
|
|
|
|
#define BLT_I18NCONTEXTS_ITEM(ctxt_id, py_id) {#ctxt_id, py_id, ctxt_id}
|
|
|
|
|
|
|
|
#define BLT_I18NCONTEXTS_DESC { \
|
|
|
|
BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_DEFAULT, "default_real"), \
|
|
|
|
BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_DEFAULT_BPYRNA, "default"), \
|
|
|
|
BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "operator_default"), \
|
2015-09-27 09:49:41 +02:00
|
|
|
BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_UI_EVENTS, "ui_events_keymaps"), \
|
2015-08-16 17:32:01 +10:00
|
|
|
BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_PLURAL, "plural"), \
|
|
|
|
BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_ACTION, "id_action"), \
|
|
|
|
BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_ARMATURE, "id_armature"), \
|
|
|
|
BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_BRUSH, "id_brush"), \
|
|
|
|
BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_CAMERA, "id_camera"), \
|
Basic Alembic support
All in all, this patch adds an Alembic importer, an Alembic exporter,
and a new CacheFile data block which, for now, wraps around an Alembic
archive. This data block is made available through a new modifier ("Mesh
Sequence Cache") as well as a new constraint ("Transform Cache") to
somewhat properly support respectively geometric and transformation data
streaming from alembic caches.
A more in-depth documentation is to be found on the wiki, as well as a
guide to compile alembic: https://wiki.blender.org/index.php/
User:Kevindietrich/AlembicBasicIo.
Many thanks to everyone involved in this little project, and huge shout
out to "cgstrive" for the thorough testings with Maya, 3ds Max, Houdini
and Realflow as well as @fjuhec, @jensverwiebe and @jasperge for the
custom builds and compile fixes.
Reviewers: sergey, campbellbarton, mont29
Reviewed By: sergey, campbellbarton, mont29
Differential Revision: https://developer.blender.org/D2060
2016-08-06 06:20:37 +02:00
|
|
|
BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_CACHEFILE, "id_cachefile"), \
|
Collections and groups unification
OVERVIEW
* In 2.7 terminology, all layers and groups are now collection datablocks.
* These collections are nestable, linkable, instanceable, overrideable, ..
which opens up new ways to set up scenes and link + override data.
* Viewport/render visibility and selectability are now a part of the collection
and shared across all view layers and linkable.
* View layers define which subset of the scene collection hierarchy is excluded
for each. For many workflows one view layer can be used, these are more of an
advanced feature now.
OUTLINER
* The outliner now has a "View Layer" display mode instead of "Collections",
which can display the collections and/or objects in the view layer.
* In this display mode, collections can be excluded with the right click menu.
These will then be greyed out and their objects will be excluded.
* To view collections not linked to any scene, the "Blender File" display mode
can be used, with the new filtering option to just see Colleciton datablocks.
* The outliner right click menus for collections and objects were reorganized.
* Drag and drop still needs to be improved. Like before, dragging the icon or
text gives different results, we'll unify this later.
LINKING AND OVERRIDES
* Collections can now be linked into the scene without creating an instance,
with the link/append operator or from the collections view in the outliner.
* Collections can get static overrides with the right click menu in the outliner,
but this is rather unreliable and not clearly communicated at the moment.
* We still need to improve the make override operator to turn collection instances
into collections with overrides directly in the scene.
PERFORMANCE
* We tried to make performance not worse than before and improve it in some
cases. The main thing that's still a bit slower is multiple scenes, we have to
change the layer syncing to only updated affected scenes.
* Collections keep a list of their parent collections for faster incremental
updates in syncing and caching.
* View layer bases are now in a object -> base hash to avoid quadratic time
lookups internally and in API functions like visible_get().
VERSIONING
* Compatibility with 2.7 files should be improved due to the new visibility
controls. Of course users may not want to set up their scenes differently
now to avoid having separate layers and groups.
* Compatibility with 2.8 is mostly there, and was tested on Eevee demo and Hero
files. There's a few things which are know to be not quite compatible, like
nested layer collections inside groups.
* The versioning code for 2.8 files is quite complicated, and isolated behind
#ifdef so it can be removed at the end of the release cycle.
KNOWN ISSUES
* The G-key group operators in the 3D viewport were left mostly as is, they
need to be modified still to fit better.
* Same for the groups panel in the object properties. This needs to be updated
still, or perhaps replaced by something better.
* Collections must all have a unique name. Less restrictive namespacing is to
be done later, we'll have to see how important this is as all objects within
the collections must also have a unique name anyway.
* Full scene copy and delete scene are exactly doing the right thing yet.
Differential Revision: https://developer.blender.org/D3383
https://code.blender.org/2018/05/collections-and-groups/
2018-04-30 15:57:22 +02:00
|
|
|
BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_COLLECTION, "id_collection"), \
|
2015-08-16 17:32:01 +10:00
|
|
|
BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_CURVE, "id_curve"), \
|
|
|
|
BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_FREESTYLELINESTYLE, "id_fs_linestyle"), \
|
|
|
|
BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_GPENCIL, "id_gpencil"), \
|
|
|
|
BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_ID, "id_id"), \
|
|
|
|
BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_IMAGE, "id_image"), \
|
|
|
|
/*BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_IPO, "id_ipo"),*/ \
|
|
|
|
BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_SHAPEKEY, "id_shapekey"), \
|
|
|
|
BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_LAMP, "id_lamp"), \
|
|
|
|
BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_LIBRARY, "id_library"), \
|
|
|
|
BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_LATTICE, "id_lattice"), \
|
|
|
|
BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_MASK, "id_mask"), \
|
|
|
|
BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_MATERIAL, "id_material"), \
|
|
|
|
BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_METABALL, "id_metaball"), \
|
|
|
|
BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_MESH, "id_mesh"), \
|
|
|
|
BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_MOVIECLIP, "id_movieclip"), \
|
|
|
|
BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_NODETREE, "id_nodetree"), \
|
|
|
|
BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_OBJECT, "id_object"), \
|
|
|
|
BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_PAINTCURVE, "id_paintcurve"), \
|
|
|
|
BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_PALETTE, "id_palette"), \
|
2016-12-28 17:30:58 +01:00
|
|
|
BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_PARTICLESETTINGS, "id_particlesettings"), \
|
2017-06-12 20:59:54 +10:00
|
|
|
BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_LIGHTPROBE, "id_lightprobe"), \
|
2015-08-16 17:32:01 +10:00
|
|
|
BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_SCENE, "id_scene"), \
|
|
|
|
BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_SCREEN, "id_screen"), \
|
|
|
|
BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_SEQUENCE, "id_sequence"), \
|
|
|
|
BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_SPEAKER, "id_speaker"), \
|
|
|
|
BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_SOUND, "id_sound"), \
|
|
|
|
BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_TEXTURE, "id_texture"), \
|
|
|
|
BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_TEXT, "id_text"), \
|
|
|
|
BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_VFONT, "id_vfont"), \
|
|
|
|
BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_WORLD, "id_world"), \
|
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
|
|
|
BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_WORKSPACE, "id_workspace"), \
|
2015-08-16 17:32:01 +10:00
|
|
|
BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_WINDOWMANAGER, "id_windowmanager"), \
|
|
|
|
{NULL, NULL, NULL} \
|
|
|
|
}
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
};
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* __BLT_TRANSLATION_H__ */
|