[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [25821] trunk/blender: Bugfix #20605: Shape key values not keyable from mesh data panel.
Joshua Leung
aligorith at gmail.com
Fri Jan 8 03:02:55 CET 2010
Revision: 25821
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=25821
Author: aligorith
Date: 2010-01-08 03:02:52 +0100 (Fri, 08 Jan 2010)
Log Message:
-----------
Bugfix #20605: Shape key values not keyable from mesh data panel. Keyable from Datablock browser.
See the bugreport comments for full breakdown of the fix.
--
The change in brush.c is to get blender compiling again, after my previous commit which tried to fix a compiler warning related to this (but in the header file instead).
Modified Paths:
--------------
trunk/blender/release/scripts/ui/properties_data_mesh.py
trunk/blender/source/blender/blenkernel/intern/brush.c
trunk/blender/source/blender/makesrna/intern/rna_key.c
Modified: trunk/blender/release/scripts/ui/properties_data_mesh.py
===================================================================
--- trunk/blender/release/scripts/ui/properties_data_mesh.py 2010-01-08 01:39:41 UTC (rev 25820)
+++ trunk/blender/release/scripts/ui/properties_data_mesh.py 2010-01-08 02:02:52 UTC (rev 25821)
@@ -150,7 +150,12 @@
ob = context.object
key = ob.data.shape_keys
- kb = ob.active_shape_key
+ if key and len(key.keys):
+ # this is so that we get the active shapekey from the
+ # shapekeys block, not from object data
+ kb = key.keys[ob.active_shape_key.name]
+ else:
+ kb = None
wide_ui = context.region.width > narrowui
enable_edit = ob.mode != 'EDIT'
Modified: trunk/blender/source/blender/blenkernel/intern/brush.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/brush.c 2010-01-08 01:39:41 UTC (rev 25820)
+++ trunk/blender/source/blender/blenkernel/intern/brush.c 2010-01-08 02:02:52 UTC (rev 25821)
@@ -225,7 +225,7 @@
}
}
-void brush_curve_preset(Brush *b, CurveMappingPreset preset)
+void brush_curve_preset(Brush *b, /*CurveMappingPreset*/int preset)
{
CurveMap *cm = NULL;
Modified: trunk/blender/source/blender/makesrna/intern/rna_key.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_key.c 2010-01-08 01:39:41 UTC (rev 25820)
+++ trunk/blender/source/blender/makesrna/intern/rna_key.c 2010-01-08 02:02:52 UTC (rev 25821)
@@ -283,7 +283,13 @@
static char *rna_ShapeKey_path(PointerRNA *ptr)
{
- return BLI_sprintfN("keys[\"%s\"]", ((KeyBlock*)ptr->data)->name);
+ KeyBlock *kb= (KeyBlock *)ptr->data;
+ ID *id= ptr->id.data;
+
+ if ((id) && (GS(id->name) != ID_KE))
+ return BLI_sprintfN("shape_keys.keys[\"%s\"]", kb->name);
+ else
+ return BLI_sprintfN("keys[\"%s\"]", kb->name);
}
static void rna_Key_update_data(Main *bmain, Scene *scene, PointerRNA *ptr)
More information about the Bf-blender-cvs
mailing list