diff options
Diffstat (limited to 'source/blender/editors/include')
-rw-r--r-- | source/blender/editors/include/ED_scene.h | 40 | ||||
-rw-r--r-- | source/blender/editors/include/ED_screen.h | 47 | ||||
-rw-r--r-- | source/blender/editors/include/ED_view3d.h | 7 |
3 files changed, 84 insertions, 10 deletions
diff --git a/source/blender/editors/include/ED_scene.h b/source/blender/editors/include/ED_scene.h new file mode 100644 index 00000000000..2f67f7befae --- /dev/null +++ b/source/blender/editors/include/ED_scene.h @@ -0,0 +1,40 @@ +/* + * ***** 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file ED_scene.h + * \ingroup editors + */ + +#ifndef __ED_SCENE_H__ +#define __ED_SCENE_H__ + +#include "BLI_compiler_attrs.h" + +enum eSceneCopyMethod; + +struct Scene *ED_scene_add(struct Main *bmain, bContext *C, struct wmWindow *win, enum eSceneCopyMethod method) ATTR_NONNULL(); +bool ED_scene_delete(bContext *C, struct Main *bmain, struct wmWindow *win, struct Scene *scene) ATTR_NONNULL(); +void ED_scene_exit(bContext *C) ATTR_NONNULL(); +void ED_scene_changed_update(struct Main *bmain, bContext *C, struct Scene *scene_new, + const struct bScreen *active_screen) ATTR_NONNULL(); + +void ED_operatortypes_scene(void); + +#endif /* __ED_SCENE_H__ */ diff --git a/source/blender/editors/include/ED_screen.h b/source/blender/editors/include/ED_screen.h index 1208b1f31b6..dec8bf7d615 100644 --- a/source/blender/editors/include/ED_screen.h +++ b/source/blender/editors/include/ED_screen.h @@ -43,6 +43,8 @@ struct wmWindow; struct wmNotifier; struct wmEvent; struct wmKeyConfig; +struct WorkSpace; +struct WorkSpaceInstanceHook; struct bContext; struct Scene; struct bScreen; @@ -107,12 +109,8 @@ void ED_screens_initialize(struct wmWindowManager *wm); void ED_screen_draw(struct wmWindow *win); void ED_screen_refresh(struct wmWindowManager *wm, struct wmWindow *win); void ED_screen_do_listen(struct bContext *C, struct wmNotifier *note); -bScreen *ED_screen_duplicate(struct wmWindow *win, struct bScreen *sc); -bScreen *ED_screen_add(struct wmWindow *win, struct Scene *scene, const char *name); -bool ED_screen_set(struct bContext *C, struct bScreen *sc); -bool ED_screen_delete(struct bContext *C, struct bScreen *sc); -void ED_screen_set_scene(struct bContext *C, struct bScreen *screen, struct Scene *scene); -bool ED_screen_delete_scene(struct bContext *C, struct Scene *scene); +bool ED_screen_change(struct bContext *C, struct bScreen *sc); +void ED_screen_update_after_scene_change(const struct bScreen *screen, struct Scene *scene_new); void ED_screen_set_subwinactive(struct bContext *C, struct wmEvent *event); void ED_screen_exit(struct bContext *C, struct wmWindow *window, struct bScreen *screen); void ED_screen_animation_timer(struct bContext *C, int redraws, int refresh, int sync, int enable); @@ -123,9 +121,42 @@ void ED_screen_full_prevspace(struct bContext *C, ScrArea *sa); void ED_screen_full_restore(struct bContext *C, ScrArea *sa); struct ScrArea *ED_screen_state_toggle(struct bContext *C, struct wmWindow *win, struct ScrArea *sa, const short state); void ED_screens_header_tools_menu_create(struct bContext *C, struct uiLayout *layout, void *arg); -bool ED_screen_stereo3d_required(struct bScreen *screen); +bool ED_screen_stereo3d_required(const struct bScreen *screen, const struct Scene *scene); +Scene *ED_screen_scene_find(const struct bScreen *screen, const struct wmWindowManager *wm); void ED_screen_preview_render(const struct bScreen *screen, int size_x, int size_y, unsigned int *r_rect) ATTR_NONNULL(); +/* workspaces */ +struct WorkSpace *ED_workspace_add( + struct Main *bmain, + const char *name, + SceneLayer *act_render_layer) ATTR_NONNULL(); +bool ED_workspace_change( + struct WorkSpace *workspace_new, + struct bContext *C, + struct wmWindowManager *wm, struct wmWindow *win) ATTR_NONNULL(); +struct WorkSpace *ED_workspace_duplicate( + struct WorkSpace *workspace_old, + struct Main *bmain, struct wmWindow *win); +bool ED_workspace_delete( + struct WorkSpace *workspace, + struct Main *bmain, struct bContext *C, + struct wmWindowManager *wm, struct wmWindow *win) ATTR_NONNULL(); +void ED_workspace_scene_data_sync( + struct WorkSpaceInstanceHook *hook, Scene *scene) ATTR_NONNULL(); +struct WorkSpaceLayout *ED_workspace_layout_add( + struct WorkSpace *workspace, + struct wmWindow *win, + const char *name) ATTR_NONNULL(); +struct WorkSpaceLayout *ED_workspace_layout_duplicate( + struct WorkSpace *workspace, const struct WorkSpaceLayout *layout_old, + struct wmWindow *win) ATTR_NONNULL(); +bool ED_workspace_layout_delete( + struct WorkSpace *workspace, struct WorkSpaceLayout *layout_old, + struct bContext *C) ATTR_NONNULL(); +bool ED_workspace_layout_cycle( + struct WorkSpace *workspace, const short direction, + struct bContext *C) ATTR_NONNULL(); + /* anim */ void ED_update_for_newframe(struct Main *bmain, struct Scene *scene, int mute); @@ -137,6 +168,8 @@ bScreen *ED_screen_animation_no_scrub(const struct wmWindowManager *wm); /* screen keymaps */ void ED_operatortypes_screen(void); void ED_keymap_screen(struct wmKeyConfig *keyconf); +/* workspace keymaps */ +void ED_operatortypes_workspace(void); /* operators; context poll callbacks */ int ED_operator_screenactive(struct bContext *C); diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h index 02243738d6c..667ca099305 100644 --- a/source/blender/editors/include/ED_view3d.h +++ b/source/blender/editors/include/ED_view3d.h @@ -262,8 +262,9 @@ void ED_view3d_calc_camera_border_size( const struct Scene *scene, const struct ARegion *ar, const struct View3D *v3d, const struct RegionView3D *rv3d, float r_size[2]); -bool ED_view3d_calc_render_border(struct Scene *scene, struct View3D *v3d, - struct ARegion *ar, struct rcti *rect); +bool ED_view3d_calc_render_border( + const struct Scene *scene, struct View3D *v3d, + struct ARegion *ar, struct rcti *rect); void ED_view3d_clipping_calc_from_boundbox(float clip[6][4], const struct BoundBox *clipbb, const bool is_flip); void ED_view3d_clipping_calc(struct BoundBox *bb, float planes[4][4], @@ -388,7 +389,7 @@ char ED_view3d_axis_view_opposite(char view); bool ED_view3d_lock(struct RegionView3D *rv3d); uint64_t ED_view3d_datamask(const struct Scene *scene, const struct View3D *v3d); -uint64_t ED_view3d_screen_datamask(const struct bScreen *screen); +uint64_t ED_view3d_screen_datamask(const struct Scene *scene, const struct bScreen *screen); bool ED_view3d_offset_lock_check(const struct View3D *v3d, const struct RegionView3D *rv3d); |