diff options
author | Joshua Leung <aligorith@gmail.com> | 2009-09-11 13:09:54 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2009-09-11 13:09:54 +0400 |
commit | 40576677b1dff5373d5b673b599ea9beb094b1ea (patch) | |
tree | 041ae7cce55736e0bdd6e81c3e104df4cc8aaf4e /source | |
parent | 2b5f89ed9f66292e3f6736c85d91b85a3c709210 (diff) |
2.5: Two Bugfixes
* Mesh Deform modifier now correctly shows Bind/Unbind buttons. Previously, only Bind got shown...
* Selecting keyframes in the Graph Editor using Border Select now allows the keyframes to be editable afterwards. Previously, the curves weren't getting selected afterwards, therefore, the poll operators would skip those curves.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/space_graph/graph_select.c | 9 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_modifier.c | 12 |
2 files changed, 19 insertions, 2 deletions
diff --git a/source/blender/editors/space_graph/graph_select.c b/source/blender/editors/space_graph/graph_select.c index 43f35862315..728c9310a47 100644 --- a/source/blender/editors/space_graph/graph_select.c +++ b/source/blender/editors/space_graph/graph_select.c @@ -234,6 +234,7 @@ static void borderselect_graphkeys (bAnimContext *ac, rcti rect, short mode, sho /* loop over data, doing border select */ for (ale= anim_data.first; ale; ale= ale->next) { AnimData *adt= ANIM_nla_mapping_get(ac, ale); + FCurve *fcu= (FCurve *)ale->key_data; /* set horizontal range (if applicable) */ if (mode != BEZT_OK_VALUERANGE) { @@ -253,7 +254,13 @@ static void borderselect_graphkeys (bAnimContext *ac, rcti rect, short mode, sho } /* select keyframes that are in the appropriate places */ - ANIM_fcurve_keys_bezier_loop(&bed, ale->key_data, ok_cb, select_cb, NULL); + ANIM_fcurve_keys_bezier_loop(&bed, fcu, ok_cb, select_cb, NULL); + + /* select the curve too + * NOTE: this should really only happen if the curve got touched... + */ + if (selectmode == SELECT_ADD) + fcu->flag |= FCURVE_SELECTED; } /* cleanup */ diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index 28223d2f80b..32e34559f1f 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -384,6 +384,11 @@ static void rna_ArrayModifier_curve_set(PointerRNA *ptr, PointerRNA value) modifier_object_set(&((ArrayModifierData*)ptr->data)->curve_ob, OB_CURVE, value); } +static int rna_MeshDeformModifier_is_bound_get(PointerRNA *ptr) +{ + return (((MeshDeformModifierData*)ptr->data)->bindcos != NULL); +} + static PointerRNA rna_SoftBodyModifier_settings_get(PointerRNA *ptr) { Object *ob= (Object*)ptr->id.data; @@ -1368,7 +1373,12 @@ static void rna_def_modifier_meshdeform(BlenderRNA *brna) RNA_def_property_pointer_funcs(prop, NULL, "rna_MeshDeformModifier_object_set", NULL); RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update"); - + + prop= RNA_def_property(srna, "is_bound", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_funcs(prop, "rna_MeshDeformModifier_is_bound_get", NULL); + RNA_def_property_ui_text(prop, "Bound", "Whether geometry has been bound to control cage."); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); + prop= RNA_def_property(srna, "invert", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_MDEF_INVERT_VGROUP); RNA_def_property_ui_text(prop, "Invert", "Invert vertex group influence."); |