diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2017-02-07 13:20:15 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2017-02-07 13:31:22 +0300 |
commit | 83adc544382689217e19564fd5f2dd62160956cb (patch) | |
tree | 1026a590c1079b4907a6cab43e2c5759339c4350 /source/blender/blenkernel/BKE_layer.h | |
parent | aeb8e81f2741aabc95d14bce7a83cef45481959c (diff) |
Clay-Engine (merge clay-engine)
Initial work by Clément Foucault with contributions from Dalai Felinto
(mainly per-collection engine settings logic, and depsgraph iterator placeholder).
This makes Blender require OpenGL 3.3. Which means Intel graphic card
and OSX will break. Disable CLAY_ENGINE in CMake in those cases.
This is a prototype render engine intended to help the design of real
render engines. This is mainly an engine with enphasis in matcap and
ambient occlusion.
Implemented Features
--------------------
* Clay Render Engine, following the new API, to be used as reference for
future engines
* A more complete Matcap customization with more options
* Per-Collection render engine settings
* New Ground Truth AO - not enabled
Missing Features
----------------
* Finish object edit mode
- Fix shaders to use new matrix
- Fix artifacts when edge does off screen
- Fix depth issue
- Selection sillhouette
- Mesh wires
- Use mesh normals (for higher quality matcap)
- Non-Mesh objects drawing
- Widget drawing
- Performance issues
* Finish mesh edit mode
- Derived-Mesh-less edit mode API (mesh_rende.c)
* General edit mode
- Per-collection edit mode settings
* General engines
- Per-collection engine settings
(they are their, but they still need to be flushed by depsgraph, and
used by the drawing code)
Diffstat (limited to 'source/blender/blenkernel/BKE_layer.h')
-rw-r--r-- | source/blender/blenkernel/BKE_layer.h | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/source/blender/blenkernel/BKE_layer.h b/source/blender/blenkernel/BKE_layer.h index 850c63f535f..de8a577d272 100644 --- a/source/blender/blenkernel/BKE_layer.h +++ b/source/blender/blenkernel/BKE_layer.h @@ -39,13 +39,17 @@ extern "C" { #define TODO_LAYER_CONTEXT /* get/set current (context) SceneLayer */ #define TODO_LAYER_BASE /* BaseLegacy to Base related TODO */ #define TODO_LAYER_OPERATORS /* collection mamanger and property panel operators */ +#define TODO_LAYER_DEPSGRAPH /* placeholder for real Depsgraph fix */ #define TODO_LAYER /* generic todo */ -struct Base; -struct ID; +struct CollectionEngineSettings; struct LayerCollection; +struct ID; +struct ListBase; struct Main; struct Object; +struct Base; +struct RenderEngine; struct Scene; struct SceneCollection; struct SceneLayer; @@ -66,6 +70,9 @@ void BKE_scene_layer_base_deselect_all(struct SceneLayer *sl); void BKE_scene_layer_base_select(struct SceneLayer *sl, struct Base *selbase); void BKE_scene_layer_base_flag_recalculate(struct SceneLayer *sl); +void BKE_scene_layer_engine_settings_recalculate(struct SceneLayer *sl); +void BKE_scene_layer_engine_settings_update(struct SceneLayer *sl); + void BKE_layer_collection_free(struct SceneLayer *sl, struct LayerCollection *lc); struct LayerCollection *BKE_layer_collection_active(struct SceneLayer *sl); @@ -91,6 +98,24 @@ void BKE_layer_sync_object_unlink(struct Scene *scene, struct SceneCollection *s void BKE_collection_override_datablock_add(struct LayerCollection *lc, const char *data_path, struct ID *id); +/* engine settings */ +typedef void (*CollectionEngineSettingsCB)(struct RenderEngine *engine, struct CollectionEngineSettings *ces); +struct CollectionEngineSettings *BKE_layer_collection_engine_get(struct LayerCollection *lc, const char *engine_name); +void BKE_layer_collection_engine_settings_callback_register(struct Main *bmain, const char *engine_name, CollectionEngineSettingsCB func); +void BKE_layer_collection_engine_settings_callback_free(void); +void BKE_layer_collection_engine_settings_create(struct ListBase *lb, const char *engine_name); +void BKE_layer_collection_engine_settings_free(struct ListBase *lb); + +void BKE_collection_engine_property_add_float(struct CollectionEngineSettings *ces, const char *name, float value); +void BKE_collection_engine_property_add_int(struct CollectionEngineSettings *ces, const char *name, int value); +struct CollectionEngineProperty *BKE_collection_engine_property_get(struct CollectionEngineSettings *ces, const char *name); +int BKE_collection_engine_property_value_get_int(struct CollectionEngineSettings *ces, const char *name); +float BKE_collection_engine_property_value_get_float(struct CollectionEngineSettings *ces, const char *name); +void BKE_collection_engine_property_value_set_int(struct CollectionEngineSettings *ces, const char *name, int value); +void BKE_collection_engine_property_value_set_float(struct CollectionEngineSettings *ces, const char *name, float value); +bool BKE_collection_engine_property_use_get(struct CollectionEngineSettings *ces, const char *name); +void BKE_collection_engine_property_use_set(struct CollectionEngineSettings *ces, const char *name, bool value); + /* iterators */ void BKE_selected_objects_Iterator_begin(Iterator *iter, void *data_in); @@ -172,6 +197,9 @@ void BKE_visible_bases_Iterator_end(Iterator *iter); /* temporary hacky solution waiting for final depsgraph evaluation */ #define DEG_OBJECT_ITER(sl_, ob_) \ { \ + /* temporary solution, waiting for depsgraph update */ \ + BKE_scene_layer_engine_settings_update(sl); \ + \ /* flush all the data to objects*/ \ Base *base_; \ for (base_ = sl->object_bases.first; base_; base_ = base_->next) { \ |