Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2008-10-20 08:53:49 +0400
committerJoshua Leung <aligorith@gmail.com>2008-10-20 08:53:49 +0400
commit67e3ac0edfd8d3ac0d2e3e87d473a5bd268b0ce3 (patch)
tree3768239adbc87e7e841eaf7a7dc7931697bca6a7 /source/blender/src
parent90721f3f835fca7fed7dce99a2b7b447eba50e26 (diff)
- Bugfix: 'Hide' button for PoseMode bones (in Editing Buttons) was setting the 'Mult' flag instead
- Tidied up comments in Action Editor code a bit
Diffstat (limited to 'source/blender/src')
-rw-r--r--source/blender/src/buttons_editing.c2
-rw-r--r--source/blender/src/editaction.c11
-rw-r--r--source/blender/src/editaction_gpencil.c12
3 files changed, 16 insertions, 9 deletions
diff --git a/source/blender/src/buttons_editing.c b/source/blender/src/buttons_editing.c
index 4b3e8b1a056..dbf7e76d5f6 100644
--- a/source/blender/src/buttons_editing.c
+++ b/source/blender/src/buttons_editing.c
@@ -4635,7 +4635,7 @@ static void editing_panel_pose_bones(Object *ob, bArmature *arm)
uiDefButBitI(block, TOG, BONE_NO_SCALE, B_ARM_RECALCDATA, "S", 70,by-38,20,19, &curBone->flag, 1.0, 32.0, 0.0, 0.0, "Don't inherit scale from parent Bone");
uiDefButBitI(block, TOGN, BONE_NO_DEFORM, B_ARM_RECALCDATA, "Deform", 90, by-38, 80, 19, &curBone->flag, 0.0, 0.0, 0.0, 0.0, "Indicate if Bone deforms geometry");
uiDefButBitI(block, TOG, BONE_MULT_VG_ENV, B_ARM_RECALCDATA, "Mult", 170,by-38,80,19, &curBone->flag, 1.0, 32.0, 0.0, 0.0, "Multiply Bone Envelope with VertexGroup");
- uiDefButBitI(block, TOG, BONE_MULT_VG_ENV, B_ARM_RECALCDATA, "Hide", 250,by-38,80,19, &curBone->flag, 1.0, 32.0, 0.0, 0.0, "Toggles display of this bone in Edit Mode");
+ uiDefButBitI(block, TOG, BONE_HIDDEN_P, B_ARM_RECALCDATA, "Hide", 250,by-38,80,19, &curBone->flag, 1.0, 32.0, 0.0, 0.0, "Toggles display of this bone in Edit Mode");
/* layers */
uiBlockBeginAlign(block);
diff --git a/source/blender/src/editaction.c b/source/blender/src/editaction.c
index 0f0e38084b6..f976244bf91 100644
--- a/source/blender/src/editaction.c
+++ b/source/blender/src/editaction.c
@@ -2095,9 +2095,9 @@ void paste_actdata ()
short datatype;
Object *ob= OBACT;
- short no_name= 0;
- float offset = CFRA - actcopy_firstframe;
+ const float offset = (float)(CFRA - actcopy_firstframe);
char *actname = NULL, *conname = NULL;
+ short no_name= 0;
/* check if buffer is empty */
if (ELEM(NULL, actcopybuf.first, actcopybuf.last)) {
@@ -2118,13 +2118,13 @@ void paste_actdata ()
/* from selected channels */
for (ale= act_data.first; ale; ale= ale->next) {
- Ipo *ipo_src=NULL;
+ Ipo *ipo_src = NULL;
bActionChannel *achan;
IpoCurve *ico, *icu;
BezTriple *bezt;
int i;
- /* find matching ipo-block */
+ /* find suitable IPO-block from buffer to paste from */
for (achan= actcopybuf.first; achan; achan= achan->next) {
/* try to match data */
if (ale->ownertype == ACTTYPE_ACHAN) {
@@ -2170,7 +2170,8 @@ void paste_actdata ()
/* loop over curves, pasting keyframes */
for (ico= ipo_src->curve.first; ico; ico= ico->next) {
- icu= verify_ipocurve((ID*)ob, ico->blocktype, actname, conname, NULL, ico->adrcode, 1);
+ /* get IPO-curve to paste to (IPO-curve might not exist for destination, so gets created) */
+ icu= verify_ipocurve((ID *)ob, ico->blocktype, actname, conname, NULL, ico->adrcode, 1);
if (icu) {
/* just start pasting, with the the first keyframe on the current frame, and so on */
diff --git a/source/blender/src/editaction_gpencil.c b/source/blender/src/editaction_gpencil.c
index 5ea12faffd4..5d1e73a7b28 100644
--- a/source/blender/src/editaction_gpencil.c
+++ b/source/blender/src/editaction_gpencil.c
@@ -83,7 +83,7 @@
#include "blendef.h"
#include "butspace.h"
-#include "PIL_time.h" /* sleep */
+#include "PIL_time.h"
#include "mydevice.h"
/* ***************************************** */
@@ -220,17 +220,22 @@ void set_gplayer_frame_selection (bGPDlayer *gpl, short mode)
select_gpencil_frames (gpl, mode);
}
+/* select the frame in this layer that occurs on this frame (there should only be one at most) */
void select_gpencil_frame (bGPDlayer *gpl, int selx, short select_mode)
{
bGPDframe *gpf;
/* search through frames for a match */
for (gpf= gpl->frames.first; gpf; gpf= gpf->next) {
- if (gpf->framenum == selx)
+ /* there should only be one frame with this frame-number */
+ if (gpf->framenum == selx) {
gpframe_select(gpf, select_mode);
+ break;
+ }
}
}
+/* select the frames in this layer that occur within the bounds specified */
void borderselect_gplayer_frames (bGPDlayer *gpl, float min, float max, short select_mode)
{
bGPDframe *gpf;
@@ -290,6 +295,7 @@ void deselect_gpencil_layers (void *data, short mode)
/* ***************************************** */
/* Frame Editing Tools */
+/* Delete selected grease-pencil layers */
void delete_gpencil_layers (void)
{
ListBase act_data = {NULL, NULL};
@@ -396,7 +402,7 @@ void free_gpcopybuf ()
}
/* This function adds data to the copy/paste buffer, freeing existing data first
- * Only the selected action channels gets their selected keyframes copied.
+ * Only the selected GP-layers get their selected keyframes copied.
*/
void copy_gpdata ()
{