Render: remove unused Blender Internal view layer settings
These should have been removed earlier but were forgotten.
This commit is contained in:
@@ -179,7 +179,7 @@ static ViewLayer *view_layer_add(const char *name)
|
||||
BLI_strncpy_utf8(view_layer->name, name, sizeof(view_layer->name));
|
||||
|
||||
/* Pure rendering pipeline settings. */
|
||||
view_layer->layflag = 0x7FFF; /* solid ztra halo edge strand */
|
||||
view_layer->layflag = SCE_LAY_FLAG_DEFAULT;
|
||||
view_layer->passflag = SCE_PASS_COMBINED;
|
||||
view_layer->pass_alpha_threshold = 0.5f;
|
||||
view_layer->cryptomatte_levels = 6;
|
||||
|
@@ -416,7 +416,6 @@ static bool is_noncolor_pass(eScenePassType pass_type)
|
||||
SCE_PASS_VECTOR,
|
||||
SCE_PASS_INDEXOB,
|
||||
SCE_PASS_UV,
|
||||
SCE_PASS_RAYHITS,
|
||||
SCE_PASS_INDEXMA);
|
||||
}
|
||||
|
||||
|
@@ -138,7 +138,7 @@ BlenderStrokeRenderer::BlenderStrokeRenderer(Render *re, int render_count)
|
||||
|
||||
// Scene layer.
|
||||
ViewLayer *view_layer = (ViewLayer *)freestyle_scene->view_layers.first;
|
||||
view_layer->layflag = SCE_LAY_SOLID | SCE_LAY_ZTRA;
|
||||
view_layer->layflag = SCE_LAY_SOLID;
|
||||
|
||||
// Camera
|
||||
Object *object_camera = BKE_object_add(freestyle_bmain, view_layer, OB_CAMERA, nullptr);
|
||||
|
@@ -233,22 +233,24 @@ typedef struct SceneRenderLayer {
|
||||
|
||||
/** #SceneRenderLayer.layflag */
|
||||
#define SCE_LAY_SOLID (1 << 0)
|
||||
#define SCE_LAY_ZTRA (1 << 1)
|
||||
#define SCE_LAY_HALO (1 << 2)
|
||||
#define SCE_LAY_EDGE (1 << 3)
|
||||
#define SCE_LAY_UNUSED_1 (1 << 1)
|
||||
#define SCE_LAY_UNUSED_2 (1 << 2)
|
||||
#define SCE_LAY_UNUSED_3 (1 << 3)
|
||||
#define SCE_LAY_SKY (1 << 4)
|
||||
#define SCE_LAY_STRAND (1 << 5)
|
||||
#define SCE_LAY_FRS (1 << 6)
|
||||
#define SCE_LAY_AO (1 << 7)
|
||||
#define SCE_LAY_VOLUMES (1 << 8)
|
||||
#define SCE_LAY_MOTION_BLUR (1 << 9)
|
||||
/* flags between (1 << 9) and (1 << 15) are set to 1 already, for future options */
|
||||
|
||||
#define SCE_LAY_ALL_Z (1 << 15)
|
||||
/* #define SCE_LAY_XOR (1 << 16) */ /* UNUSED */
|
||||
/* Flags between (1 << 9) and (1 << 15) are set to 1 already, for future options. */
|
||||
#define SCE_LAY_FLAG_DEFAULT ((1 << 15) - 1)
|
||||
|
||||
#define SCE_LAY_UNUSED_4 (1 << 15)
|
||||
#define SCE_LAY_UNUSED_5 (1 << 16)
|
||||
#define SCE_LAY_DISABLE (1 << 17)
|
||||
#define SCE_LAY_ZMASK (1 << 18)
|
||||
#define SCE_LAY_NEG_ZMASK (1 << 19)
|
||||
#define SCE_LAY_UNUSED_6 (1 << 18)
|
||||
#define SCE_LAY_UNUSED_7 (1 << 19)
|
||||
|
||||
/** #SceneRenderLayer.passflag */
|
||||
typedef enum eScenePassType {
|
||||
@@ -267,7 +269,7 @@ typedef enum eScenePassType {
|
||||
SCE_PASS_UV = (1 << 12),
|
||||
SCE_PASS_UNUSED_6 = (1 << 13), /* INDIRECT */
|
||||
SCE_PASS_MIST = (1 << 14),
|
||||
SCE_PASS_RAYHITS = (1 << 15),
|
||||
SCE_PASS_UNUSED_7 = (1 << 15), /* RAYHITS */
|
||||
SCE_PASS_EMIT = (1 << 16),
|
||||
SCE_PASS_ENVIRONMENT = (1 << 17),
|
||||
SCE_PASS_INDEXMA = (1 << 18),
|
||||
@@ -302,7 +304,6 @@ typedef enum eScenePassType {
|
||||
#define RE_PASSNAME_INDEXMA "IndexMA"
|
||||
#define RE_PASSNAME_MIST "Mist"
|
||||
|
||||
#define RE_PASSNAME_RAYHITS "RayHits"
|
||||
#define RE_PASSNAME_DIFFUSE_DIRECT "DiffDir"
|
||||
#define RE_PASSNAME_DIFFUSE_INDIRECT "DiffInd"
|
||||
#define RE_PASSNAME_DIFFUSE_COLOR "DiffCol"
|
||||
|
@@ -4120,41 +4120,6 @@ void rna_def_view_layer_common(BlenderRNA *brna, StructRNA *srna, const bool sce
|
||||
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_ViewLayer_pass_update");
|
||||
}
|
||||
|
||||
/* layer options */
|
||||
prop = RNA_def_property(srna, "use_zmask", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_ZMASK);
|
||||
RNA_def_property_ui_text(prop, "Zmask", "Only render what's in front of the solid z values");
|
||||
if (scene) {
|
||||
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_glsl_update");
|
||||
}
|
||||
else {
|
||||
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
||||
}
|
||||
|
||||
prop = RNA_def_property(srna, "invert_zmask", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_NEG_ZMASK);
|
||||
RNA_def_property_ui_text(
|
||||
prop,
|
||||
"Zmask Negate",
|
||||
"For Zmask, only render what is behind solid z values instead of in front");
|
||||
if (scene) {
|
||||
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_glsl_update");
|
||||
}
|
||||
else {
|
||||
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
||||
}
|
||||
|
||||
prop = RNA_def_property(srna, "use_all_z", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_ALL_Z);
|
||||
RNA_def_property_ui_text(
|
||||
prop, "All Z", "Fill in Z values for solid faces in invisible layers, for masking");
|
||||
if (scene) {
|
||||
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
||||
}
|
||||
else {
|
||||
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
||||
}
|
||||
|
||||
prop = RNA_def_property(srna, "use_solid", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_SOLID);
|
||||
RNA_def_property_ui_text(prop, "Solid", "Render Solid faces in this Layer");
|
||||
@@ -4164,29 +4129,6 @@ void rna_def_view_layer_common(BlenderRNA *brna, StructRNA *srna, const bool sce
|
||||
else {
|
||||
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
||||
}
|
||||
|
||||
prop = RNA_def_property(srna, "use_halo", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_HALO);
|
||||
RNA_def_property_ui_text(prop, "Halo", "Render Halos in this Layer (on top of Solid)");
|
||||
if (scene) {
|
||||
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
||||
}
|
||||
else {
|
||||
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
||||
}
|
||||
|
||||
prop = RNA_def_property(srna, "use_ztransp", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_ZTRA);
|
||||
RNA_def_property_ui_text(prop,
|
||||
"Z-Transparent",
|
||||
"Render Z-transparent faces in this layer (on top of Solid and Halos)");
|
||||
if (scene) {
|
||||
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
||||
}
|
||||
else {
|
||||
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
||||
}
|
||||
|
||||
prop = RNA_def_property(srna, "use_sky", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_SKY);
|
||||
RNA_def_property_ui_text(prop, "Sky", "Render Sky in this Layer");
|
||||
@@ -4207,17 +4149,6 @@ void rna_def_view_layer_common(BlenderRNA *brna, StructRNA *srna, const bool sce
|
||||
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
||||
}
|
||||
|
||||
prop = RNA_def_property(srna, "use_edge_enhance", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_EDGE);
|
||||
RNA_def_property_ui_text(
|
||||
prop, "Edge", "Render edge-enhance in this layer (only works for solid faces)");
|
||||
if (scene) {
|
||||
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
||||
}
|
||||
else {
|
||||
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
||||
}
|
||||
|
||||
prop = RNA_def_property(srna, "use_strand", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_STRAND);
|
||||
RNA_def_property_ui_text(prop, "Strand", "Render Strands in this Layer");
|
||||
|
@@ -1056,7 +1056,6 @@ int RE_pass_depth(const eScenePassType pass_type)
|
||||
case SCE_PASS_NORMAL:
|
||||
case SCE_PASS_VECTOR:
|
||||
case SCE_PASS_INDEXOB: /* XXX double check */
|
||||
case SCE_PASS_RAYHITS: /* XXX double check */
|
||||
case SCE_PASS_EMIT:
|
||||
case SCE_PASS_ENVIRONMENT:
|
||||
case SCE_PASS_INDEXMA:
|
||||
|
@@ -2806,7 +2806,6 @@ RenderPass *RE_pass_find_by_type(volatile RenderLayer *rl, int passtype, const c
|
||||
CHECK_PASS(INDEXOB);
|
||||
CHECK_PASS(INDEXMA);
|
||||
CHECK_PASS(MIST);
|
||||
CHECK_PASS(RAYHITS);
|
||||
CHECK_PASS(DIFFUSE_DIRECT);
|
||||
CHECK_PASS(DIFFUSE_INDIRECT);
|
||||
CHECK_PASS(DIFFUSE_COLOR);
|
||||
|
@@ -332,7 +332,6 @@ RenderResult *render_result_new(
|
||||
BLI_strncpy(rl->name, view_layer->name, sizeof(rl->name));
|
||||
rl->layflag = view_layer->layflag;
|
||||
|
||||
/* for debugging: view_layer->passflag | SCE_PASS_RAYHITS; */
|
||||
rl->passflag = view_layer->passflag;
|
||||
|
||||
rl->rectx = rectx;
|
||||
@@ -399,9 +398,6 @@ RenderResult *render_result_new(
|
||||
if (view_layer->passflag & SCE_PASS_MIST) {
|
||||
RENDER_LAYER_ADD_PASS_SAFE(rr, rl, 1, RE_PASSNAME_MIST, view, "Z");
|
||||
}
|
||||
if (rl->passflag & SCE_PASS_RAYHITS) {
|
||||
RENDER_LAYER_ADD_PASS_SAFE(rr, rl, 4, RE_PASSNAME_RAYHITS, view, "RGB");
|
||||
}
|
||||
if (view_layer->passflag & SCE_PASS_DIFFUSE_DIRECT) {
|
||||
RENDER_LAYER_ADD_PASS_SAFE(rr, rl, 3, RE_PASSNAME_DIFFUSE_DIRECT, view, "RGB");
|
||||
}
|
||||
@@ -474,7 +470,7 @@ RenderResult *render_result_new(
|
||||
}
|
||||
|
||||
/* NOTE: this has to be in sync with `scene.c`. */
|
||||
rl->layflag = 0x7FFF; /* solid ztra halo strand */
|
||||
rl->layflag = SCE_LAY_FLAG_DEFAULT;
|
||||
rl->passflag = SCE_PASS_COMBINED;
|
||||
|
||||
re->active_view_layer = 0;
|
||||
@@ -581,7 +577,6 @@ static int passtype_from_name(const char *name)
|
||||
CHECK_PASS(INDEXOB);
|
||||
CHECK_PASS(INDEXMA);
|
||||
CHECK_PASS(MIST);
|
||||
CHECK_PASS(RAYHITS);
|
||||
CHECK_PASS(DIFFUSE_DIRECT);
|
||||
CHECK_PASS(DIFFUSE_INDIRECT);
|
||||
CHECK_PASS(DIFFUSE_COLOR);
|
||||
|
Reference in New Issue
Block a user