diff options
author | Ton Roosendaal <ton@blender.org> | 2013-04-16 21:39:20 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2013-04-16 21:39:20 +0400 |
commit | ae58968e0a610d1b2551bdb5e4d489a8105fd812 (patch) | |
tree | 54036ce7a2ac86bb80542371de6952f1213970f5 /source/blender/render/extern | |
parent | 6dcee054bef7846d6a07f20ca2aa32cba94bab60 (diff) |
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.
Diffstat (limited to 'source/blender/render/extern')
-rw-r--r-- | source/blender/render/extern/include/RE_engine.h | 6 | ||||
-rw-r--r-- | source/blender/render/extern/include/RE_pipeline.h | 6 |
2 files changed, 11 insertions, 1 deletions
diff --git a/source/blender/render/extern/include/RE_engine.h b/source/blender/render/extern/include/RE_engine.h index cb35b0045f7..7c1bc4d12d6 100644 --- a/source/blender/render/extern/include/RE_engine.h +++ b/source/blender/render/extern/include/RE_engine.h @@ -66,6 +66,10 @@ struct Scene; #define RE_ENGINE_HIGHLIGHT_TILES 32 #define RE_ENGINE_USED_FOR_VIEWPORT 64 +/* RenderEngine.update_flag, used by internal now */ +#define RE_ENGINE_UPDATE_MA 1 +#define RE_ENGINE_UPDATE_OTHER 2 + extern ListBase R_engines; typedef struct RenderEngineType { @@ -92,7 +96,7 @@ typedef struct RenderEngine { RenderEngineType *type; void *py_instance; - int flag; + int flag, update_flag; struct Object *camera_override; int tile_x; diff --git a/source/blender/render/extern/include/RE_pipeline.h b/source/blender/render/extern/include/RE_pipeline.h index 96106296443..9a8b1620f71 100644 --- a/source/blender/render/extern/include/RE_pipeline.h +++ b/source/blender/render/extern/include/RE_pipeline.h @@ -197,12 +197,18 @@ void RE_SetPixelSize(struct Render *re, float pixsize); /* option to set viewmatrix before making dbase */ void RE_SetView(struct Render *re, float mat[4][4]); +/* get current view and window transform */ +void RE_GetView(struct Render *re, float mat[4][4]); +void RE_GetViewPlane(struct Render *re, rctf *viewplane, rcti *disprect); + /* make or free the dbase */ void RE_Database_FromScene(struct Render *re, struct Main *bmain, struct Scene *scene, unsigned int lay, int use_camera_view); void RE_Database_Free(struct Render *re); /* project dbase again, when viewplane/perspective changed */ void RE_DataBase_ApplyWindow(struct Render *re); +/* rotate scene again, for incremental render */ +void RE_DataBase_IncrementalView(struct Render *re, float viewmat[4][4], int restore); /* override the scene setting for amount threads, commandline */ void RE_set_max_threads(int threads); |