Commit: 73efb360915a4085efa34bfd394b0c2b00a37c92
Author: Antony Riakiotakis
Date:   Mon Dec 1 12:54:24 2014 +0100
Branches: wiggly-widgets
https://developer.blender.org/rB73efb360915a4085efa34bfd394b0c2b00a37c92

Shapekey widget is correctly bound to the shapekey property and controls
it.

===================================================================

M       source/blender/editors/space_view3d/space_view3d.c

===================================================================

diff --git a/source/blender/editors/space_view3d/space_view3d.c 
b/source/blender/editors/space_view3d/space_view3d.c
index d74ba61..075f1ed 100644
--- a/source/blender/editors/space_view3d/space_view3d.c
+++ b/source/blender/editors/space_view3d/space_view3d.c
@@ -756,7 +756,8 @@ static void WIDGETGROUP_shapekey_draw(struct wmWidgetGroup 
*wgroup, const struct
 {
        float color_shape[4] = {1.0f, 0.3f, 0.0f, 1.0f};
        Object *ob = CTX_data_active_object(C);
-       Camera *ca = ob->data;
+       Key *key = BKE_key_from_object(ob);
+       KeyBlock *kb = BLI_findlink(&key->block, ob->shapenr - 1);
        wmWidget *widget;
        PointerRNA shapeptr;
        float dir[3];
@@ -764,7 +765,7 @@ static void WIDGETGROUP_shapekey_draw(struct wmWidgetGroup 
*wgroup, const struct
        widget = WIDGET_arrow_new(wgroup, UI_ARROW_STYLE_NORMAL, NULL);
        WM_widget_set_3d_scale(widget, false);
        WIDGET_arrow_set_color(widget, color_shape);
-       RNA_pointer_create(&ca->id, &RNA_ShapeKey, ca, &shapeptr);
+       RNA_pointer_create(&key->id, &RNA_ShapeKey, kb, &shapeptr);
        WM_widget_set_origin(widget, ob->obmat[3]);
        WM_widget_property(widget, &shapeptr, "value");
        negate_v3_v3(dir, ob->obmat[2]);

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to