[Bf-blender-cvs] [12bd214b9ae] blender2.8: World: Use enum for mist falloff parameter.
Clément Foucault
noreply at git.blender.org
Thu Feb 1 20:49:06 CET 2018
Commit: 12bd214b9ae5acc1c68346f82cf7eedffba0b21f
Author: Clément Foucault
Date: Thu Feb 1 18:08:06 2018 +0100
Branches: blender2.8
https://developer.blender.org/rB12bd214b9ae5acc1c68346f82cf7eedffba0b21f
World: Use enum for mist falloff parameter.
===================================================================
M source/blender/makesdna/DNA_world_types.h
M source/blender/makesrna/intern/rna_world.c
===================================================================
diff --git a/source/blender/makesdna/DNA_world_types.h b/source/blender/makesdna/DNA_world_types.h
index 2ab99617ee8..3361e50e257 100644
--- a/source/blender/makesdna/DNA_world_types.h
+++ b/source/blender/makesdna/DNA_world_types.h
@@ -163,6 +163,12 @@ enum {
WO_AOMUL = 3,
};
+enum {
+ WO_MIST_QUADRATIC = 0,
+ WO_MIST_LINEAR = 1,
+ WO_MIST_INVERSE_QUADRATIC = 2,
+};
+
/* ao_samp_method - methods for sampling the AO hemi */
#define WO_AOSAMP_CONSTANT 0
#define WO_AOSAMP_HALTON 1
diff --git a/source/blender/makesrna/intern/rna_world.c b/source/blender/makesrna/intern/rna_world.c
index 15fa686a40a..e78355ee426 100644
--- a/source/blender/makesrna/intern/rna_world.c
+++ b/source/blender/makesrna/intern/rna_world.c
@@ -396,9 +396,9 @@ static void rna_def_world_mist(BlenderRNA *brna)
PropertyRNA *prop;
static const EnumPropertyItem falloff_items[] = {
- {0, "QUADRATIC", 0, "Quadratic", "Use quadratic progression"},
- {1, "LINEAR", 0, "Linear", "Use linear progression"},
- {2, "INVERSE_QUADRATIC", 0, "Inverse Quadratic", "Use inverse quadratic progression"},
+ {WO_MIST_QUADRATIC, "QUADRATIC", 0, "Quadratic", "Use quadratic progression"},
+ {WO_MIST_LINEAR, "LINEAR", 0, "Linear", "Use linear progression"},
+ {WO_MIST_INVERSE_QUADRATIC, "INVERSE_QUADRATIC", 0, "Inverse Quadratic", "Use inverse quadratic progression"},
{0, NULL, 0, NULL, NULL}
};
More information about the Bf-blender-cvs
mailing list