2008-12-18 03:56:48 +01:00
|
|
|
/**
|
|
|
|
* $Id$
|
|
|
|
*
|
|
|
|
* ***** BEGIN GPL LICENSE BLOCK *****
|
|
|
|
*
|
|
|
|
* 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
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
*
|
|
|
|
* The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
* Contributor(s): Blender Foundation (2008).
|
|
|
|
*
|
|
|
|
* ***** END GPL LICENSE BLOCK *****
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef BKE_CONTEXT_H
|
|
|
|
#define BKE_CONTEXT_H
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "DNA_listBase.h"
|
2009-03-19 20:03:38 +01:00
|
|
|
#include "RNA_types.h"
|
2008-12-18 03:56:48 +01:00
|
|
|
|
|
|
|
struct ARegion;
|
|
|
|
struct bScreen;
|
|
|
|
struct EditMesh;
|
|
|
|
struct ListBase;
|
|
|
|
struct Main;
|
|
|
|
struct Object;
|
|
|
|
struct PointerRNA;
|
|
|
|
struct ReportList;
|
|
|
|
struct Scene;
|
|
|
|
struct ScrArea;
|
|
|
|
struct SpaceLink;
|
2.5
View3D has been split now in a local part (RegionView3D) and a
per-area part (old View3D). Currently local is:
- view transform
- camera zoom/offset
- gpencil (todo)
- custom clipping planes
Rest is in Area still, like active camera, draw type, layers,
localview, custom centers, around-settings, transform widget,
gridlines, and so on (mostly stuff as available in header).
To see it work; also added new feature for region split,
press SHIFT+ALT+CTRL+S for four-split.
The idea is to make a preset 4-split, configured to stick
to top/right/front views for three views.
Another cool idea to explore is to then box-clip all drawing
based on these 3 views.
Note about the code:
- currently view3d still stores some depricated settings, to
convert from older files. Not all settings are copied over
though, like custom clip planes or the 'lock view to object'.
- since some view3d ops are now on area level, the operators
for it should keep track of that.
Bugfix in transform: quat initialize in operator-invoke missed
one zero.
Als brought back GE to compile for missing Ipos and channels.
2009-01-19 17:54:41 +01:00
|
|
|
struct View3D;
|
|
|
|
struct RegionView3D;
|
2008-12-18 03:56:48 +01:00
|
|
|
struct StructRNA;
|
|
|
|
struct ToolSettings;
|
2.5: Space Image ported back
Organized as follows:
uvedit/
uv editing related code
uvedit_draw.c: drawing code
uvedit_ops.c: operators, just a few done
uvedit_unwrap_ops.c: will be operators for unwrapping
uvedit_paramatrizer.c: lscm/abf/stretch/pack
space_image/
space_image.c: registration and common getter/setters
image_draw.c: drawing code, mostly functional
image_panels.c: panels, all commented out
image_render.c: render callbacks, non functional
image_ops.c: operators, only view navigation done
image_header.c: header, menus mostly done but missing buttons
Notes:
* Header menus consist only of Operator and RNA buttons, if they
are not implemented they're displayed grayed out. Ideally the full
header could work like this, but std_libbuttons looks problematic.
* Started using view2d code more than the old code, but for now it
still does own view2d management due to some very specific
requirements that the image window has. The drawing code however
is more clear hopefully, it only uses view2d, and there is no
switching between 'p' and 'f' view2d's anymore, it is always 'f'.
* In order to make uvedit operators more independent I move some
image space settings to scene toolsettings, and the current image
and its buffer is in the context. Especially sync selection and
select mode belonged there anyway as this cannot work correct with
different spaces having different settings anyway.
* Image paint is not back yet, did not want to put that together with
uvedit because there's really no code sharing.. perhaps vertex paint,
image paint and sculpt would be good to have in one module to share
brush code, partial redraw, etc better.
2009-01-15 05:38:18 +01:00
|
|
|
struct Image;
|
2.5: Text Editor back.
There was very little structure in this code, using many globals
and duplicated code. Now it should be better structured. Most
things should work, the main parts that are not back yet are the
python plugins and markers. Notes:
* Blenfont is used for drawing the text, nicely anti-aliased.
* A monospace truetype font was added, since that is needed for
the text editor. It's Bitstream Vera Sans Mono. This is the
default gnome terminal font, but it doesn't fit entirely well
with the other font I think, can be changed easily of course.
* Clipboard copy/cut/paste now always uses the system clipboard,
the code for the own cut buffer was removed.
* The interface buttons should support copy/cut/paste again now
as well.
* WM_clipboard_text_get/WM_clipboard_text_set were added to the
windowmanager code.
* Find panel is now a kind of second header, instead of a panel.
This needs especially a way to start editing the text field
immediately on open still.
* Operators are independent of the actual space when possible,
was a bit of puzzling but got it solved nice with notifiers,
and some lazy init for syntax highlight in the drawing code.
* RNA was created for the text editor space and used for buttons.
* Operators:
* New, Open, Reload, Save, Save As, Make Internal
* Run Script, Refresh Pyconstraints
* Copy, Cut, Paste
* Convert Whitespace, Uncomment, Comment, Indent, Unindent
* Line Break, Insert
* Next Marker, Previous Marker, Clear All Markers, Mark All
* Select Line, Select All
* Jump, Move, Move Select, Delete, Toggle Overwrite
* Scroll, Scroll Bar, Set Cursor, Line Number
* Find and Replace, Find, Replace, Find Set Selected,
Replace Set Selected
* To 3D Object
* Resolve Conflict
2009-03-01 00:33:35 +01:00
|
|
|
struct Text;
|
2.5: Space Image ported back
Organized as follows:
uvedit/
uv editing related code
uvedit_draw.c: drawing code
uvedit_ops.c: operators, just a few done
uvedit_unwrap_ops.c: will be operators for unwrapping
uvedit_paramatrizer.c: lscm/abf/stretch/pack
space_image/
space_image.c: registration and common getter/setters
image_draw.c: drawing code, mostly functional
image_panels.c: panels, all commented out
image_render.c: render callbacks, non functional
image_ops.c: operators, only view navigation done
image_header.c: header, menus mostly done but missing buttons
Notes:
* Header menus consist only of Operator and RNA buttons, if they
are not implemented they're displayed grayed out. Ideally the full
header could work like this, but std_libbuttons looks problematic.
* Started using view2d code more than the old code, but for now it
still does own view2d management due to some very specific
requirements that the image window has. The drawing code however
is more clear hopefully, it only uses view2d, and there is no
switching between 'p' and 'f' view2d's anymore, it is always 'f'.
* In order to make uvedit operators more independent I move some
image space settings to scene toolsettings, and the current image
and its buffer is in the context. Especially sync selection and
select mode belonged there anyway as this cannot work correct with
different spaces having different settings anyway.
* Image paint is not back yet, did not want to put that together with
uvedit because there's really no code sharing.. perhaps vertex paint,
image paint and sculpt would be good to have in one module to share
brush code, partial redraw, etc better.
2009-01-15 05:38:18 +01:00
|
|
|
struct ImBuf;
|
2009-02-05 04:28:07 +01:00
|
|
|
struct EditBone;
|
|
|
|
struct bPoseChannel;
|
2008-12-18 03:56:48 +01:00
|
|
|
struct wmWindow;
|
|
|
|
struct wmWindowManager;
|
2.5: Text Editor back.
There was very little structure in this code, using many globals
and duplicated code. Now it should be better structured. Most
things should work, the main parts that are not back yet are the
python plugins and markers. Notes:
* Blenfont is used for drawing the text, nicely anti-aliased.
* A monospace truetype font was added, since that is needed for
the text editor. It's Bitstream Vera Sans Mono. This is the
default gnome terminal font, but it doesn't fit entirely well
with the other font I think, can be changed easily of course.
* Clipboard copy/cut/paste now always uses the system clipboard,
the code for the own cut buffer was removed.
* The interface buttons should support copy/cut/paste again now
as well.
* WM_clipboard_text_get/WM_clipboard_text_set were added to the
windowmanager code.
* Find panel is now a kind of second header, instead of a panel.
This needs especially a way to start editing the text field
immediately on open still.
* Operators are independent of the actual space when possible,
was a bit of puzzling but got it solved nice with notifiers,
and some lazy init for syntax highlight in the drawing code.
* RNA was created for the text editor space and used for buttons.
* Operators:
* New, Open, Reload, Save, Save As, Make Internal
* Run Script, Refresh Pyconstraints
* Copy, Cut, Paste
* Convert Whitespace, Uncomment, Comment, Indent, Unindent
* Line Break, Insert
* Next Marker, Previous Marker, Clear All Markers, Mark All
* Select Line, Select All
* Jump, Move, Move Select, Delete, Toggle Overwrite
* Scroll, Scroll Bar, Set Cursor, Line Number
* Find and Replace, Find, Replace, Find Set Selected,
Replace Set Selected
* To 3D Object
* Resolve Conflict
2009-03-01 00:33:35 +01:00
|
|
|
struct SpaceText;
|
|
|
|
struct SpaceImage;
|
2009-03-19 20:03:38 +01:00
|
|
|
struct ID;
|
2008-12-18 03:56:48 +01:00
|
|
|
|
|
|
|
/* Structs */
|
|
|
|
|
|
|
|
struct bContext;
|
|
|
|
typedef struct bContext bContext;
|
|
|
|
|
2008-12-23 03:07:13 +01:00
|
|
|
struct bContextDataResult;
|
|
|
|
typedef struct bContextDataResult bContextDataResult;
|
2008-12-18 03:56:48 +01:00
|
|
|
|
|
|
|
typedef int (*bContextDataCallback)(const bContext *C,
|
2009-03-19 20:03:38 +01:00
|
|
|
const char *member, bContextDataResult *result);
|
2008-12-18 03:56:48 +01:00
|
|
|
|
2009-05-29 01:13:42 +02:00
|
|
|
typedef struct bContextStoreEntry {
|
|
|
|
struct bContextStoreEntry *next, *prev;
|
|
|
|
|
|
|
|
char name[128];
|
|
|
|
PointerRNA ptr;
|
|
|
|
} bContextStoreEntry;
|
|
|
|
|
|
|
|
typedef struct bContextStore {
|
|
|
|
struct bContextStore *next, *prev;
|
|
|
|
|
|
|
|
ListBase entries;
|
|
|
|
int used;
|
|
|
|
} bContextStore;
|
|
|
|
|
2008-12-18 03:56:48 +01:00
|
|
|
/* Context */
|
|
|
|
|
|
|
|
bContext *CTX_create(void);
|
|
|
|
void CTX_free(bContext *C);
|
|
|
|
|
2009-03-25 21:49:15 +01:00
|
|
|
bContext *CTX_copy(const bContext *C);
|
2008-12-18 03:56:48 +01:00
|
|
|
|
2009-05-29 01:13:42 +02:00
|
|
|
/* Stored Context */
|
|
|
|
|
|
|
|
bContextStore *CTX_store_add(ListBase *contexts, char *name, PointerRNA *ptr);
|
|
|
|
void CTX_store_set(bContext *C, bContextStore *store);
|
|
|
|
bContextStore *CTX_store_copy(bContextStore *store);
|
|
|
|
void CTX_store_free(bContextStore *store);
|
|
|
|
void CTX_store_free_list(ListBase *contexts);
|
|
|
|
|
2009-07-18 21:40:26 +02:00
|
|
|
/* need to store if python is initialized or not */
|
|
|
|
int CTX_py_init_get(bContext *C);
|
|
|
|
int CTX_py_init_set(bContext *C, int value);
|
|
|
|
|
2008-12-18 03:56:48 +01:00
|
|
|
/* Window Manager Context */
|
|
|
|
|
|
|
|
struct wmWindowManager *CTX_wm_manager(const bContext *C);
|
|
|
|
struct wmWindow *CTX_wm_window(const bContext *C);
|
|
|
|
struct bScreen *CTX_wm_screen(const bContext *C);
|
|
|
|
struct ScrArea *CTX_wm_area(const bContext *C);
|
|
|
|
struct SpaceLink *CTX_wm_space_data(const bContext *C);
|
|
|
|
struct ARegion *CTX_wm_region(const bContext *C);
|
|
|
|
void *CTX_wm_region_data(const bContext *C);
|
2009-03-25 21:49:15 +01:00
|
|
|
struct ARegion *CTX_wm_menu(const bContext *C);
|
2009-07-16 02:50:27 +02:00
|
|
|
struct ReportList *CTX_wm_reports(const bContext *C);
|
2008-12-18 03:56:48 +01:00
|
|
|
|
2.5: Text Editor back.
There was very little structure in this code, using many globals
and duplicated code. Now it should be better structured. Most
things should work, the main parts that are not back yet are the
python plugins and markers. Notes:
* Blenfont is used for drawing the text, nicely anti-aliased.
* A monospace truetype font was added, since that is needed for
the text editor. It's Bitstream Vera Sans Mono. This is the
default gnome terminal font, but it doesn't fit entirely well
with the other font I think, can be changed easily of course.
* Clipboard copy/cut/paste now always uses the system clipboard,
the code for the own cut buffer was removed.
* The interface buttons should support copy/cut/paste again now
as well.
* WM_clipboard_text_get/WM_clipboard_text_set were added to the
windowmanager code.
* Find panel is now a kind of second header, instead of a panel.
This needs especially a way to start editing the text field
immediately on open still.
* Operators are independent of the actual space when possible,
was a bit of puzzling but got it solved nice with notifiers,
and some lazy init for syntax highlight in the drawing code.
* RNA was created for the text editor space and used for buttons.
* Operators:
* New, Open, Reload, Save, Save As, Make Internal
* Run Script, Refresh Pyconstraints
* Copy, Cut, Paste
* Convert Whitespace, Uncomment, Comment, Indent, Unindent
* Line Break, Insert
* Next Marker, Previous Marker, Clear All Markers, Mark All
* Select Line, Select All
* Jump, Move, Move Select, Delete, Toggle Overwrite
* Scroll, Scroll Bar, Set Cursor, Line Number
* Find and Replace, Find, Replace, Find Set Selected,
Replace Set Selected
* To 3D Object
* Resolve Conflict
2009-03-01 00:33:35 +01:00
|
|
|
struct View3D *CTX_wm_view3d(const bContext *C);
|
|
|
|
struct RegionView3D *CTX_wm_region_view3d(const bContext *C);
|
|
|
|
struct SpaceText *CTX_wm_space_text(const bContext *C);
|
|
|
|
struct SpaceImage *CTX_wm_space_image(const bContext *C);
|
2009-07-16 02:50:27 +02:00
|
|
|
struct SpaceConsole *CTX_wm_space_console(const bContext *C);
|
2.5: Text Editor back.
There was very little structure in this code, using many globals
and duplicated code. Now it should be better structured. Most
things should work, the main parts that are not back yet are the
python plugins and markers. Notes:
* Blenfont is used for drawing the text, nicely anti-aliased.
* A monospace truetype font was added, since that is needed for
the text editor. It's Bitstream Vera Sans Mono. This is the
default gnome terminal font, but it doesn't fit entirely well
with the other font I think, can be changed easily of course.
* Clipboard copy/cut/paste now always uses the system clipboard,
the code for the own cut buffer was removed.
* The interface buttons should support copy/cut/paste again now
as well.
* WM_clipboard_text_get/WM_clipboard_text_set were added to the
windowmanager code.
* Find panel is now a kind of second header, instead of a panel.
This needs especially a way to start editing the text field
immediately on open still.
* Operators are independent of the actual space when possible,
was a bit of puzzling but got it solved nice with notifiers,
and some lazy init for syntax highlight in the drawing code.
* RNA was created for the text editor space and used for buttons.
* Operators:
* New, Open, Reload, Save, Save As, Make Internal
* Run Script, Refresh Pyconstraints
* Copy, Cut, Paste
* Convert Whitespace, Uncomment, Comment, Indent, Unindent
* Line Break, Insert
* Next Marker, Previous Marker, Clear All Markers, Mark All
* Select Line, Select All
* Jump, Move, Move Select, Delete, Toggle Overwrite
* Scroll, Scroll Bar, Set Cursor, Line Number
* Find and Replace, Find, Replace, Find Set Selected,
Replace Set Selected
* To 3D Object
* Resolve Conflict
2009-03-01 00:33:35 +01:00
|
|
|
|
2008-12-18 03:56:48 +01:00
|
|
|
void CTX_wm_manager_set(bContext *C, struct wmWindowManager *wm);
|
|
|
|
void CTX_wm_window_set(bContext *C, struct wmWindow *win);
|
|
|
|
void CTX_wm_screen_set(bContext *C, struct bScreen *screen); /* to be removed */
|
2009-03-25 21:49:15 +01:00
|
|
|
void CTX_wm_area_set(bContext *C, struct ScrArea *sa);
|
|
|
|
void CTX_wm_region_set(bContext *C, struct ARegion *region);
|
|
|
|
void CTX_wm_menu_set(bContext *C, struct ARegion *menu);
|
2008-12-18 03:56:48 +01:00
|
|
|
|
2008-12-23 03:07:13 +01:00
|
|
|
/* Data Context
|
|
|
|
|
2009-06-20 16:55:28 +02:00
|
|
|
- listbases consist of CollectionPointerLink items and must be
|
|
|
|
freed with BLI_freelistN!
|
|
|
|
- the dir listbase consits of LinkData items */
|
2008-12-23 03:07:13 +01:00
|
|
|
|
2009-06-20 16:55:28 +02:00
|
|
|
PointerRNA CTX_data_pointer_get(const bContext *C, const char *member);
|
2009-06-24 16:03:55 +02:00
|
|
|
PointerRNA CTX_data_pointer_get_type(const bContext *C, const char *member, StructRNA *type);
|
2009-06-20 16:55:28 +02:00
|
|
|
ListBase CTX_data_collection_get(const bContext *C, const char *member);
|
|
|
|
ListBase CTX_data_dir_get(const bContext *C);
|
|
|
|
void CTX_data_get(const bContext *C, const char *member, PointerRNA *r_ptr, ListBase *r_lb);
|
2009-03-19 20:03:38 +01:00
|
|
|
|
|
|
|
void CTX_data_id_pointer_set(bContextDataResult *result, struct ID *id);
|
|
|
|
void CTX_data_pointer_set(bContextDataResult *result, struct ID *id, StructRNA *type, void *data);
|
|
|
|
|
|
|
|
void CTX_data_id_list_add(bContextDataResult *result, struct ID *id);
|
|
|
|
void CTX_data_list_add(bContextDataResult *result, struct ID *id, StructRNA *type, void *data);
|
|
|
|
|
2009-06-20 16:55:28 +02:00
|
|
|
void CTX_data_dir_set(bContextDataResult *result, const char **member);
|
|
|
|
|
2009-03-19 20:03:38 +01:00
|
|
|
int CTX_data_equals(const char *member, const char *str);
|
2009-06-20 16:55:28 +02:00
|
|
|
int CTX_data_dir(const char *member);
|
2009-03-19 20:03:38 +01:00
|
|
|
|
|
|
|
/*void CTX_data_pointer_set(bContextDataResult *result, void *data);
|
|
|
|
void CTX_data_list_add(bContextDataResult *result, void *data);*/
|
2008-12-23 03:07:13 +01:00
|
|
|
|
|
|
|
#define CTX_DATA_BEGIN(C, Type, instance, member) \
|
|
|
|
{ \
|
|
|
|
ListBase ctx_data_list; \
|
2009-03-19 20:03:38 +01:00
|
|
|
CollectionPointerLink *ctx_link; \
|
2008-12-23 03:07:13 +01:00
|
|
|
CTX_data_##member(C, &ctx_data_list); \
|
2009-03-19 20:03:38 +01:00
|
|
|
for(ctx_link=ctx_data_list.first; ctx_link; ctx_link=ctx_link->next) { \
|
|
|
|
Type instance= ctx_link->ptr.data;
|
2008-12-23 03:07:13 +01:00
|
|
|
|
|
|
|
#define CTX_DATA_END \
|
|
|
|
} \
|
|
|
|
BLI_freelistN(&ctx_data_list); \
|
|
|
|
}
|
|
|
|
|
2009-01-17 01:51:42 +01:00
|
|
|
int ctx_data_list_count(const bContext *C, int (*func)(const bContext*, ListBase*));
|
|
|
|
|
|
|
|
#define CTX_DATA_COUNT(C, member) \
|
|
|
|
ctx_data_list_count(C, CTX_data_##member)
|
2009-01-03 00:58:03 +01:00
|
|
|
|
2008-12-23 03:07:13 +01:00
|
|
|
/* Data Context Members */
|
2008-12-18 03:56:48 +01:00
|
|
|
|
|
|
|
struct Main *CTX_data_main(const bContext *C);
|
|
|
|
struct Scene *CTX_data_scene(const bContext *C);
|
|
|
|
struct ToolSettings *CTX_data_tool_settings(const bContext *C);
|
|
|
|
|
|
|
|
void CTX_data_main_set(bContext *C, struct Main *bmain);
|
|
|
|
void CTX_data_scene_set(bContext *C, struct Scene *bmain);
|
|
|
|
|
2009-01-17 19:35:33 +01:00
|
|
|
int CTX_data_selected_editable_objects(const bContext *C, ListBase *list);
|
|
|
|
int CTX_data_selected_editable_bases(const bContext *C, ListBase *list);
|
|
|
|
|
2008-12-23 03:07:13 +01:00
|
|
|
int CTX_data_selected_objects(const bContext *C, ListBase *list);
|
|
|
|
int CTX_data_selected_bases(const bContext *C, ListBase *list);
|
|
|
|
|
2008-12-28 19:10:24 +01:00
|
|
|
int CTX_data_visible_objects(const bContext *C, ListBase *list);
|
|
|
|
int CTX_data_visible_bases(const bContext *C, ListBase *list);
|
|
|
|
|
2009-07-11 13:31:49 +02:00
|
|
|
int CTX_data_selectable_objects(const bContext *C, ListBase *list);
|
|
|
|
int CTX_data_selectable_bases(const bContext *C, ListBase *list);
|
|
|
|
|
2008-12-23 03:07:13 +01:00
|
|
|
struct Object *CTX_data_active_object(const bContext *C);
|
|
|
|
struct Base *CTX_data_active_base(const bContext *C);
|
2008-12-18 03:56:48 +01:00
|
|
|
struct Object *CTX_data_edit_object(const bContext *C);
|
|
|
|
|
2.5: Space Image ported back
Organized as follows:
uvedit/
uv editing related code
uvedit_draw.c: drawing code
uvedit_ops.c: operators, just a few done
uvedit_unwrap_ops.c: will be operators for unwrapping
uvedit_paramatrizer.c: lscm/abf/stretch/pack
space_image/
space_image.c: registration and common getter/setters
image_draw.c: drawing code, mostly functional
image_panels.c: panels, all commented out
image_render.c: render callbacks, non functional
image_ops.c: operators, only view navigation done
image_header.c: header, menus mostly done but missing buttons
Notes:
* Header menus consist only of Operator and RNA buttons, if they
are not implemented they're displayed grayed out. Ideally the full
header could work like this, but std_libbuttons looks problematic.
* Started using view2d code more than the old code, but for now it
still does own view2d management due to some very specific
requirements that the image window has. The drawing code however
is more clear hopefully, it only uses view2d, and there is no
switching between 'p' and 'f' view2d's anymore, it is always 'f'.
* In order to make uvedit operators more independent I move some
image space settings to scene toolsettings, and the current image
and its buffer is in the context. Especially sync selection and
select mode belonged there anyway as this cannot work correct with
different spaces having different settings anyway.
* Image paint is not back yet, did not want to put that together with
uvedit because there's really no code sharing.. perhaps vertex paint,
image paint and sculpt would be good to have in one module to share
brush code, partial redraw, etc better.
2009-01-15 05:38:18 +01:00
|
|
|
struct Image *CTX_data_edit_image(const bContext *C);
|
|
|
|
|
2.5: Text Editor back.
There was very little structure in this code, using many globals
and duplicated code. Now it should be better structured. Most
things should work, the main parts that are not back yet are the
python plugins and markers. Notes:
* Blenfont is used for drawing the text, nicely anti-aliased.
* A monospace truetype font was added, since that is needed for
the text editor. It's Bitstream Vera Sans Mono. This is the
default gnome terminal font, but it doesn't fit entirely well
with the other font I think, can be changed easily of course.
* Clipboard copy/cut/paste now always uses the system clipboard,
the code for the own cut buffer was removed.
* The interface buttons should support copy/cut/paste again now
as well.
* WM_clipboard_text_get/WM_clipboard_text_set were added to the
windowmanager code.
* Find panel is now a kind of second header, instead of a panel.
This needs especially a way to start editing the text field
immediately on open still.
* Operators are independent of the actual space when possible,
was a bit of puzzling but got it solved nice with notifiers,
and some lazy init for syntax highlight in the drawing code.
* RNA was created for the text editor space and used for buttons.
* Operators:
* New, Open, Reload, Save, Save As, Make Internal
* Run Script, Refresh Pyconstraints
* Copy, Cut, Paste
* Convert Whitespace, Uncomment, Comment, Indent, Unindent
* Line Break, Insert
* Next Marker, Previous Marker, Clear All Markers, Mark All
* Select Line, Select All
* Jump, Move, Move Select, Delete, Toggle Overwrite
* Scroll, Scroll Bar, Set Cursor, Line Number
* Find and Replace, Find, Replace, Find Set Selected,
Replace Set Selected
* To 3D Object
* Resolve Conflict
2009-03-01 00:33:35 +01:00
|
|
|
struct Text *CTX_data_edit_text(const bContext *C);
|
|
|
|
|
2009-01-03 00:58:03 +01:00
|
|
|
int CTX_data_selected_nodes(const bContext *C, ListBase *list);
|
|
|
|
|
2009-02-05 04:28:07 +01:00
|
|
|
struct EditBone *CTX_data_active_bone(const bContext *C);
|
|
|
|
int CTX_data_selected_bones(const bContext *C, ListBase *list);
|
|
|
|
int CTX_data_selected_editable_bones(const bContext *C, ListBase *list);
|
2009-02-14 08:27:12 +01:00
|
|
|
int CTX_data_visible_bones(const bContext *C, ListBase *list);
|
|
|
|
int CTX_data_editable_bones(const bContext *C, ListBase *list);
|
2009-02-05 04:28:07 +01:00
|
|
|
|
|
|
|
struct bPoseChannel *CTX_data_active_pchan(const bContext *C);
|
|
|
|
int CTX_data_selected_pchans(const bContext *C, ListBase *list);
|
2009-02-14 08:27:12 +01:00
|
|
|
int CTX_data_visible_pchans(const bContext *C, ListBase *list);
|
2009-02-05 04:28:07 +01:00
|
|
|
|
2008-12-18 03:56:48 +01:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|