diff options
author | Siddhartha Jejurkar <sidd017> | 2021-03-10 13:41:55 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-03-10 13:45:12 +0300 |
commit | 122fefcc8589a09d4e89ed3045f29f07ec6564e9 (patch) | |
tree | 5a450c41f8335016c4bc0cc99a1fd29b8fdc88fc /source/blender/makesdna | |
parent | 3dab6f8b7b8988b727719e7487e793262669f2ee (diff) |
DNA: add defaults for UnifiedPaintSettings
Newly created scenes had unified paint settings zeroed. see T80164
Ref D10658
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_scene_defaults.h | 11 | ||||
-rw-r--r-- | source/blender/makesdna/intern/dna_defaults.c | 1 |
2 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_scene_defaults.h b/source/blender/makesdna/DNA_scene_defaults.h index 3e1b2ef56a1..1a2a8892e64 100644 --- a/source/blender/makesdna/DNA_scene_defaults.h +++ b/source/blender/makesdna/DNA_scene_defaults.h @@ -284,6 +284,15 @@ .count = 10, \ } +#define _DNA_DEFAULTS_UnifiedPaintSettings \ + { \ + .size = 50, \ + .unprojected_radius = 0.29, \ + .alpha = 0.5f, \ + .weight = 0.5f, \ + .flag = UNIFIED_PAINT_SIZE | UNIFIED_PAINT_ALPHA, \ + } + #define _DNA_DEFAULTS_ParticleEditSettings \ { \ .flag = PE_KEEP_LENGTHS | PE_LOCK_FIRST | PE_DEFLECT_EMITTER | PE_AUTO_VELOCITY, \ @@ -346,6 +355,8 @@ \ .curve_paint_settings = _DNA_DEFAULTS_CurvePaintSettings, \ \ + .unified_paint_settings = _DNA_DEFAULTS_UnifiedPaintSettings, \ + \ .statvis = _DNA_DEFAULTS_MeshStatVis, \ \ .proportional_size = 1.0f, \ diff --git a/source/blender/makesdna/intern/dna_defaults.c b/source/blender/makesdna/intern/dna_defaults.c index 3e4d5d87fb0..7aca742a8e6 100644 --- a/source/blender/makesdna/intern/dna_defaults.c +++ b/source/blender/makesdna/intern/dna_defaults.c @@ -425,6 +425,7 @@ const void *DNA_default_table[SDNA_TYPE_MAX] = { SDNA_DEFAULT_DECL(ToolSettings), SDNA_DEFAULT_DECL_EX(CurvePaintSettings, ToolSettings.curve_paint_settings), SDNA_DEFAULT_DECL_EX(ImagePaintSettings, ToolSettings.imapaint), + SDNA_DEFAULT_DECL_EX(UnifiedPaintSettings, ToolSettings.unified_paint_settings), SDNA_DEFAULT_DECL_EX(ParticleEditSettings, ToolSettings.particle), SDNA_DEFAULT_DECL_EX(ParticleBrushData, ToolSettings.particle.brush[0]), SDNA_DEFAULT_DECL_EX(MeshStatVis, ToolSettings.statvis), |