2011-02-23 10:52:22 +00:00
|
|
|
/*
|
2009-01-20 11:09:26 +00:00
|
|
|
* ***** 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,
|
2010-02-12 13:34:04 +00:00
|
|
|
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2009-01-20 11:09:26 +00:00
|
|
|
*
|
|
|
|
* The Original Code is Copyright (C) 2008 Blender Foundation.
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* Contributor(s): Blender Foundation
|
|
|
|
*
|
|
|
|
* ***** END GPL LICENSE BLOCK *****
|
|
|
|
*/
|
|
|
|
|
2011-02-27 20:29:51 +00:00
|
|
|
/** \file blender/editors/render/render_intern.h
|
|
|
|
* \ingroup edrend
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2012-02-17 18:59:41 +00:00
|
|
|
#ifndef __RENDER_INTERN_H__
|
|
|
|
#define __RENDER_INTERN_H__
|
2009-01-20 11:09:26 +00:00
|
|
|
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
struct wmOperatorType;
|
2010-03-08 16:36:53 +00:00
|
|
|
struct RenderResult;
|
|
|
|
struct Scene;
|
2013-12-17 23:42:38 +06:00
|
|
|
struct ScrArea;
|
2009-01-20 11:09:26 +00:00
|
|
|
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
/* render_shading.c */
|
|
|
|
void OBJECT_OT_material_slot_add(struct wmOperatorType *ot);
|
|
|
|
void OBJECT_OT_material_slot_remove(struct wmOperatorType *ot);
|
|
|
|
void OBJECT_OT_material_slot_assign(struct wmOperatorType *ot);
|
|
|
|
void OBJECT_OT_material_slot_select(struct wmOperatorType *ot);
|
|
|
|
void OBJECT_OT_material_slot_deselect(struct wmOperatorType *ot);
|
2009-10-07 16:32:55 +00:00
|
|
|
void OBJECT_OT_material_slot_copy(struct wmOperatorType *ot);
|
2009-01-20 11:09:26 +00:00
|
|
|
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
void MATERIAL_OT_new(struct wmOperatorType *ot);
|
|
|
|
void TEXTURE_OT_new(struct wmOperatorType *ot);
|
|
|
|
void WORLD_OT_new(struct wmOperatorType *ot);
|
2009-01-20 11:09:26 +00:00
|
|
|
|
2010-01-28 17:31:11 +00:00
|
|
|
void MATERIAL_OT_copy(struct wmOperatorType *ot);
|
|
|
|
void MATERIAL_OT_paste(struct wmOperatorType *ot);
|
|
|
|
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
void SCENE_OT_render_layer_add(struct wmOperatorType *ot);
|
|
|
|
void SCENE_OT_render_layer_remove(struct wmOperatorType *ot);
|
2012-12-20 07:57:26 +00:00
|
|
|
|
|
|
|
#ifdef WITH_FREESTYLE
|
2009-10-07 05:16:23 +00:00
|
|
|
void SCENE_OT_freestyle_module_add(struct wmOperatorType *ot);
|
|
|
|
void SCENE_OT_freestyle_module_remove(struct wmOperatorType *ot);
|
2010-06-25 22:45:42 +00:00
|
|
|
void SCENE_OT_freestyle_module_move(struct wmOperatorType *ot);
|
|
|
|
void SCENE_OT_freestyle_lineset_add(struct wmOperatorType *ot);
|
2011-11-13 21:55:13 +00:00
|
|
|
void SCENE_OT_freestyle_lineset_copy(struct wmOperatorType *ot);
|
2011-11-20 23:44:50 +00:00
|
|
|
void SCENE_OT_freestyle_lineset_paste(struct wmOperatorType *ot);
|
2010-06-25 22:45:42 +00:00
|
|
|
void SCENE_OT_freestyle_lineset_remove(struct wmOperatorType *ot);
|
|
|
|
void SCENE_OT_freestyle_lineset_move(struct wmOperatorType *ot);
|
|
|
|
void SCENE_OT_freestyle_linestyle_new(struct wmOperatorType *ot);
|
2010-07-20 17:57:33 +00:00
|
|
|
void SCENE_OT_freestyle_color_modifier_add(struct wmOperatorType *ot);
|
|
|
|
void SCENE_OT_freestyle_alpha_modifier_add(struct wmOperatorType *ot);
|
|
|
|
void SCENE_OT_freestyle_thickness_modifier_add(struct wmOperatorType *ot);
|
2011-08-19 14:05:11 +00:00
|
|
|
void SCENE_OT_freestyle_geometry_modifier_add(struct wmOperatorType *ot);
|
2010-07-20 17:57:33 +00:00
|
|
|
void SCENE_OT_freestyle_modifier_remove(struct wmOperatorType *ot);
|
|
|
|
void SCENE_OT_freestyle_modifier_move(struct wmOperatorType *ot);
|
2012-08-02 20:30:23 +00:00
|
|
|
void SCENE_OT_freestyle_modifier_copy(struct wmOperatorType *ot);
|
2012-12-20 07:57:26 +00:00
|
|
|
#endif
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
|
2010-03-29 05:37:34 +00:00
|
|
|
|
|
|
|
void TEXTURE_OT_slot_copy(struct wmOperatorType *ot);
|
|
|
|
void TEXTURE_OT_slot_paste(struct wmOperatorType *ot);
|
2009-10-12 16:00:39 +00:00
|
|
|
void TEXTURE_OT_slot_move(struct wmOperatorType *ot);
|
2010-03-11 07:43:49 +00:00
|
|
|
void TEXTURE_OT_envmap_save(struct wmOperatorType *ot);
|
|
|
|
void TEXTURE_OT_envmap_clear(struct wmOperatorType *ot);
|
|
|
|
void TEXTURE_OT_envmap_clear_all(struct wmOperatorType *ot);
|
2009-10-12 16:00:39 +00:00
|
|
|
|
2010-03-08 16:36:53 +00:00
|
|
|
/* render_internal.c */
|
|
|
|
void RENDER_OT_render(struct wmOperatorType *ot);
|
2013-07-08 22:26:10 +00:00
|
|
|
void render_view3d_update(struct RenderEngine *engine, const struct bContext *C);
|
Blender Internal Render in viewport
Because of our release soon, feature has been added behind the Debug Menu.
CTRL+ALT+D and set it to -1. Or commandline --debug-value -1.
When debug set to -1, you can put the viewport to 'render' mode, just like
for Cycles. Notes for testers: (and please no bugs in tracker for this :)
- It renders without AA, MBlur, Panorama, Sequence, Composite
- Only active render layer gets rendered. Select another layer will re-render.
- But yes: it works for FreeStyle renders!
- Also does great for local view.
- BI is not well suited for incremental renders on view changes. This only
works for non-raytrace scenes, or zoom in ortho or camera mode, or for
Material changes. In most cases a full re-render is being done.
- ESC works to stop the preview render.
- Borders render as well. (CTRL+B)
- Force a refresh with arrow key left/right. A lot of settings don't trigger
re-render yet.
Tech notes:
- FreeStyle is adding a lot of temp objects/meshes in the Main database. This
caused DepsGraph to trigger changes (and redraws). I've prepended the names
for these temp objects with char number 27 (ESC), and made these names be
ignored for tag update checking.
- Fixed some bugs that were noticable with such excessive re-renders, like
for opening file window, quit during renders.
2013-04-16 17:39:20 +00:00
|
|
|
void render_view3d_draw(struct RenderEngine *engine, const struct bContext *C);
|
2010-03-08 16:36:53 +00:00
|
|
|
|
2011-05-19 11:34:11 +00:00
|
|
|
/* render_view.c */
|
2013-12-17 23:42:38 +06:00
|
|
|
struct ScrArea *render_view_open(struct bContext *C, int mx, int my);
|
2011-05-19 11:34:11 +00:00
|
|
|
|
|
|
|
void RENDER_OT_view_show(struct wmOperatorType *ot);
|
|
|
|
void RENDER_OT_view_cancel(struct wmOperatorType *ot);
|
2009-10-12 16:00:39 +00:00
|
|
|
|
2010-03-08 16:36:53 +00:00
|
|
|
/* render_opengl.c */
|
|
|
|
void RENDER_OT_opengl(struct wmOperatorType *ot);
|
2009-10-12 16:00:39 +00:00
|
|
|
|
2012-02-17 18:59:41 +00:00
|
|
|
#endif /* __RENDER_INTERN_H__ */
|
2009-01-20 11:09:26 +00:00
|
|
|
|