diff options
author | Ton Roosendaal <ton@blender.org> | 2013-01-22 22:36:11 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2013-01-22 22:36:11 +0400 |
commit | 6740b4f73aacec65d5110a4773b55944ab022510 (patch) | |
tree | b6b155d8f2b8969b46ec50dfd0437b161df9d0a9 /source/blender/makesrna | |
parent | a099bd8bb0d45c605802ff92567200fce307239c (diff) |
Matcap fix: on enabling it, and when no matcap was selected before,
it sets first matcap icon.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index dfe0f8fed82..5d009a627e6 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -397,6 +397,13 @@ static void rna_SpaceView3D_matcap_update(Main *UNUSED(bmain), Scene *UNUSED(sce } } +static void rna_SpaceView3D_matcap_enable(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) +{ + View3D *v3d = (View3D *)(ptr->data); + + if (v3d->matcap_icon == 0) + v3d->matcap_icon = ICON_MATCAP_01; +} static void rna_SpaceView3D_pivot_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr) { @@ -1866,7 +1873,7 @@ static void rna_def_space_view3d(BlenderRNA *brna) prop = RNA_def_property(srna, "use_matcap", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag2", V3D_SOLID_MATCAP); RNA_def_property_ui_text(prop, "Matcap", "Active Objects draw images mapped on normals, enhancing Solid Draw Mode"); - RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); + RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_SpaceView3D_matcap_enable"); prop = RNA_def_property(srna, "matcap_icon", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "matcap_icon"); |