[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [33918] trunk/blender/source/blender: - Silencing some gcc warnings (yay! I can finally use this setup
Joshua Leung
aligorith at gmail.com
Tue Dec 28 07:19:05 CET 2010
Revision: 33918
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=33918
Author: aligorith
Date: 2010-12-28 07:18:56 +0100 (Tue, 28 Dec 2010)
Log Message:
-----------
- Silencing some gcc warnings (yay! I can finally use this setup
again)
- Graph Editor "Active Keyframe" panel now displays more descriptive
error messages. In particular, hopefully this helps to alert users of
the default generator modifier for Driver F-Curves
- The first F-Modifier added to a list is now set to be active one for
that list.
Modified Paths:
--------------
trunk/blender/source/blender/blenkernel/intern/fmodifier.c
trunk/blender/source/blender/blenkernel/intern/key.c
trunk/blender/source/blender/editors/armature/editarmature.c
trunk/blender/source/blender/editors/space_graph/graph_buttons.c
Modified: trunk/blender/source/blender/blenkernel/intern/fmodifier.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/fmodifier.c 2010-12-28 05:45:15 UTC (rev 33917)
+++ trunk/blender/source/blender/blenkernel/intern/fmodifier.c 2010-12-28 06:18:56 UTC (rev 33918)
@@ -1009,9 +1009,13 @@
fcm->flag = FMODIFIER_FLAG_EXPANDED;
BLI_addtail(modifiers, fcm);
+ /* tag modifier as "active" if no other modifiers exist in the stack yet */
+ if (modifiers->first == modifiers->last)
+ fcm->flag |= FMODIFIER_FLAG_ACTIVE;
+
/* add modifier's data */
fcm->data= MEM_callocN(fmi->size, fmi->structName);
-
+
/* init custom settings if necessary */
if (fmi->new_data)
fmi->new_data(fcm->data);
Modified: trunk/blender/source/blender/blenkernel/intern/key.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/key.c 2010-12-28 05:45:15 UTC (rev 33917)
+++ trunk/blender/source/blender/blenkernel/intern/key.c 2010-12-28 06:18:56 UTC (rev 33918)
@@ -1191,7 +1191,7 @@
if(key->slurph && key->type!=KEY_RELATIVE) {
Nurb *nu;
- int mode, i= 0, remain= 0, estep, count;
+ int mode=0, i= 0, remain= 0, estep=0, count=0;
delta= (float)key->slurph / tot;
Modified: trunk/blender/source/blender/editors/armature/editarmature.c
===================================================================
--- trunk/blender/source/blender/editors/armature/editarmature.c 2010-12-28 05:45:15 UTC (rev 33917)
+++ trunk/blender/source/blender/editors/armature/editarmature.c 2010-12-28 06:18:56 UTC (rev 33918)
@@ -5037,7 +5037,7 @@
else {
/* perform clamping using euler form (3-components) */
float eul[3], oldeul[3], quat1[4] = {0};
- float qlen;
+ float qlen = 0.0f;
if (pchan->rotmode == ROT_MODE_QUAT) {
qlen= normalize_qt_qt(quat1, pchan->quat);
@@ -5061,10 +5061,10 @@
if (pchan->rotmode == ROT_MODE_QUAT) {
eul_to_quat(pchan->quat, eul);
-
+
/* restore original quat size */
mul_qt_fl(pchan->quat, qlen);
-
+
/* quaternions flip w sign to accumulate rotations correctly */
if ((quat1[0]<0.0f && pchan->quat[0]>0.0f) || (quat1[0]>0.0f && pchan->quat[0]<0.0f)) {
mul_qt_fl(pchan->quat, -1.0f);
Modified: trunk/blender/source/blender/editors/space_graph/graph_buttons.c
===================================================================
--- trunk/blender/source/blender/editors/space_graph/graph_buttons.c 2010-12-28 05:45:15 UTC (rev 33917)
+++ trunk/blender/source/blender/editors/space_graph/graph_buttons.c 2010-12-28 06:18:56 UTC (rev 33918)
@@ -278,8 +278,19 @@
if (bezt->ipo == BEZT_IPO_BEZ)
uiItemR(col, &bezt_ptr, "handle_right", 0, NULL, ICON_NULL);
}
- else
- uiItemL(layout, "No active keyframe on F-Curve", ICON_NULL);
+ else {
+ if ((fcu->bezt == NULL) && (fcu->modifiers.first)) {
+ /* modifiers only - so no keyframes to be active */
+ uiItemL(layout, "F-Curve only has F-Modifiers", ICON_NULL);
+ uiItemL(layout, "See Modifiers panel below", ICON_INFO);
+ }
+ else if (fcu->fpt) {
+ /* samples only */
+ uiItemL(layout, "F-Curve doesn't have any keyframes as it only contains sampled points", ICON_NULL);
+ }
+ else
+ uiItemL(layout, "No active keyframe on F-Curve", ICON_NULL);
+ }
MEM_freeN(ale);
}
More information about the Bf-blender-cvs
mailing list