Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDalai Felinto <dfelinto@gmail.com>2017-11-16 18:39:25 +0300
committerDalai Felinto <dfelinto@gmail.com>2017-11-22 12:13:33 +0300
commit3a95bdfc65d883e7db006fdaadb8ed2cd6553239 (patch)
tree387e3827da8ed17ae655618f8cfaa3ffa565b4cc /source/blender/makesdna
parent8ba6103e66b0e8bcbe70e6ed8f91500fdc7df3ee (diff)
SceneRenderLayer Removal/Refactor
This patch moves all the functionality previously in SceneRenderLayer to SceneLayer. If we want to rename some of these structs now would be a good time to do it, before they are in SceneLayer. Everything should be working, though I will test things further tomorrow. Once this is committed depsgraph can get rid of the workaround added in rna_Main_meshes_new_from_object and finish whatever this patch was preventing from being finished. This patch also adds a few placeholders for the overrides (samples, ...). These are obviously not working, so some unittests that rely on 'lay', and 'zmask' will fail. This patch does not addressed the change of moving samples to ViewRender (I have this as a separate patch and needs some separate discussion). Following next is the individual note of the individual parts that were committed. Note 1: It is up to Cycles to still get rid of exclude_layer internally. Note 2: Cycles still need to handle its own doversion for the use_layer_samples cases and (1) Remove the override as it is (2) Add a new override (scene.cycles.samples) if scene.cycles.use_layer_samples != IGNORE Respecting the expected behaviour when scene.cycles.use_layer_samples == BOUNDED. Note 3: Cycles still need to implement the per-object holdout (similar to how we do shadow catcher). Note 4: There are parts of the old (Blender Internal) rendering pipeline that is still using lay, e.g., in shi->lay. Honestly it will be easier to purge the entire Blender Internal code away instead of taking things from it bit by bit. Reviewers: sergey, campbellbarton, brecht Differential Revision: https://developer.blender.org/D2919
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/DNA_layer_types.h12
-rw-r--r--source/blender/makesdna/DNA_scene_types.h18
2 files changed, 21 insertions, 9 deletions
diff --git a/source/blender/makesdna/DNA_layer_types.h b/source/blender/makesdna/DNA_layer_types.h
index 86931401aae..d78a6af1d11 100644
--- a/source/blender/makesdna/DNA_layer_types.h
+++ b/source/blender/makesdna/DNA_layer_types.h
@@ -31,6 +31,7 @@
extern "C" {
#endif
+#include "DNA_freestyle_types.h"
#include "DNA_listBase.h"
typedef struct Base {
@@ -84,6 +85,16 @@ typedef struct SceneLayer {
struct IDProperty *properties; /* overrides */
struct IDProperty *properties_evaluated;
+ /* Old SceneRenderLayer data. */
+ int layflag;
+ int passflag; /* pass_xor has to be after passflag */
+ int pass_xor;
+ float pass_alpha_threshold;
+
+ struct IDProperty *id_properties; /* Equivalent to datablocks ID properties. */
+
+ struct FreestyleConfig freestyle_config;
+
/* Runtime data */
ListBase drawdata; /* SceneLayerEngineData */
} SceneLayer;
@@ -120,6 +131,7 @@ enum {
enum {
SCENE_LAYER_RENDER = (1 << 0),
SCENE_LAYER_ENGINE_DIRTY = (1 << 1),
+ SCENE_LAYER_FREESTYLE = (1 << 2),
};
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h
index 7ac0e74ae59..9e42c0d0fc8 100644
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -172,24 +172,24 @@ typedef struct AudioData {
typedef struct SceneRenderLayer {
struct SceneRenderLayer *next, *prev;
- char name[64]; /* MAX_NAME */
+ char name[64] DNA_DEPRECATED; /* MAX_NAME */
struct Material *mat_override DNA_DEPRECATED; /* Converted to SceneLayer override. */
unsigned int lay DNA_DEPRECATED; /* Converted to LayerCollection cycles camera visibility override. */
unsigned int lay_zmask DNA_DEPRECATED; /* Converted to LayerCollection cycles holdout override. */
unsigned int lay_exclude DNA_DEPRECATED;
- int layflag;
+ int layflag DNA_DEPRECATED; /* Converted to SceneLayer layflag and flag. */
- int passflag; /* pass_xor has to be after passflag */
- int pass_xor;
+ int passflag DNA_DEPRECATED; /* pass_xor has to be after passflag */
+ int pass_xor DNA_DEPRECATED; /* Converted to SceneLayer passflag and flag. */
int samples DNA_DEPRECATED; /* Converted to SceneLayer override. */
- float pass_alpha_threshold;
+ float pass_alpha_threshold DNA_DEPRECATED; /* Converted to SceneLayer pass_alpha_threshold. */
- IDProperty *prop;
+ IDProperty *prop DNA_DEPRECATED; /* Converted to SceneLayer id_properties. */
- struct FreestyleConfig freestyleConfig;
+ struct FreestyleConfig freestyleConfig DNA_DEPRECATED; /* Converted to SceneLayer freestyleConfig. */
} SceneRenderLayer;
/* srl->layflag */
@@ -662,8 +662,8 @@ typedef struct RenderData {
rcti disprect;
/* information on different layers to be rendered */
- ListBase layers;
- short actlay;
+ ListBase layers DNA_DEPRECATED; /* Converted to Scene->render_layers. */
+ short actlay DNA_DEPRECATED; /* Converted to Scene->active_layer. */
/* number of mblur samples */
short mblur_samples;