diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-03-19 13:15:37 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-03-19 13:16:57 +0300 |
commit | e839a2565190556d397449e07b00c5f03fee6fb5 (patch) | |
tree | e80973ce1772eb91596404e6bf478c3400786880 /source/blender | |
parent | 7e9575f7a16caa408102897ae8f14b6c61f9369c (diff) |
RNA: add MetaElem.select & use_scale_stiffness
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/makesrna/intern/rna_meta.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_meta.c b/source/blender/makesrna/intern/rna_meta.c index 382e83a5650..a391defe542 100644 --- a/source/blender/makesrna/intern/rna_meta.c +++ b/source/blender/makesrna/intern/rna_meta.c @@ -87,6 +87,14 @@ static void rna_Meta_texspace_size_set(PointerRNA *ptr, const float *values) copy_v3_v3(mb->size, values); } +static void rna_MetaBall_redraw_data(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) +{ + ID *id = ptr->owner_id; + + DEG_id_tag_update(id, ID_RECALC_COPY_ON_WRITE); + WM_main_add_notifier(NC_GEOM | ND_DATA, id); +} + static void rna_MetaBall_update_data(Main *bmain, Scene *scene, PointerRNA *ptr) { MetaBall *mb = (MetaBall *)ptr->owner_id; @@ -254,6 +262,16 @@ static void rna_def_metaelement(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Negative", "Set metaball as negative one"); RNA_def_property_update(prop, 0, "rna_MetaBall_update_data"); + prop = RNA_def_property(srna, "use_scale_stiffness", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", MB_SCALE_RAD); + RNA_def_property_ui_text(prop, "Scale Stiffness", "Scale stiffness instead of radius"); + RNA_def_property_update(prop, 0, "rna_MetaBall_redraw_data"); + + prop = RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", 1); /* SELECT */ + RNA_def_property_ui_text(prop, "Select", "Select element"); + RNA_def_property_update(prop, 0, "rna_MetaBall_redraw_data"); + prop = RNA_def_property(srna, "hide", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", MB_HIDE); RNA_def_property_ui_text(prop, "Hide", "Hide element"); |