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>2009-10-20 16:04:56 +0400
committerJoshua Leung <aligorith@gmail.com>2009-10-20 16:04:56 +0400
commit00f3d83b6ab5f4f9ee4f69457e492db72a03cf30 (patch)
treedd57f5d8b0bb859a0403225a11d118844a728c68 /source/blender/editors/armature
parentec6bccfad1609fa09a703d7496310da246fd5825 (diff)
Graph Editor: Added 2D Cursor
I've finally given in, and implemented a '2d-cursor' for the Graph Editor. This is simply represented as an additional horizontal line that meets with the current frame indicator, forming a cross-hair. It can be disabled from the View menu. Currently, the only tool which takes this into account is the Snapping tools (Shift-S), where I've hooked up a tool I added some time ago. TODO: - expose this cursor to the transform tools for scaling/rotation options...
Diffstat (limited to 'source/blender/editors/armature')
-rw-r--r--source/blender/editors/armature/editarmature.c63
1 files changed, 6 insertions, 57 deletions
diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c
index b92b69c4e8e..f379ff6c395 100644
--- a/source/blender/editors/armature/editarmature.c
+++ b/source/blender/editors/armature/editarmature.c
@@ -5037,11 +5037,11 @@ static int pose_de_select_all_exec(bContext *C, wmOperator *op)
/* Set the flags */
CTX_DATA_BEGIN(C, bPoseChannel *, pchan, visible_pchans) {
- /* select pchan, only if selectable */
- if ((pchan->bone->flag & BONE_UNSELECTABLE) == 0) {
- if (sel==0) pchan->bone->flag &= ~(BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL|BONE_ACTIVE);
- else pchan->bone->flag |= BONE_SELECTED;
- }
+ /* select pchan only if selectable, but deselect works always */
+ if (sel==0)
+ pchan->bone->flag &= ~(BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL|BONE_ACTIVE);
+ else if ((pchan->bone->flag & BONE_UNSELECTABLE)==0)
+ pchan->bone->flag |= BONE_SELECTED;
}
CTX_DATA_END;
@@ -5313,21 +5313,7 @@ void ED_armature_bone_rename(bArmature *arm, char *oldnamep, char *newnamep)
/* we have the object using the armature */
if (arm==ob->data) {
Object *cob;
- //bAction *act;
- //bActionChannel *achan;
- //bActionStrip *strip;
- /* Rename action channel if necessary */
-#if 0 // XXX old animation system
- act = ob->action;
- if (act && !act->id.lib) {
- /* Find the appropriate channel */
- achan= get_action_channel(act, oldname);
- if (achan)
- BLI_strncpy(achan->name, newname, MAXBONENAME);
- }
-#endif // XXX old animation system
-
/* Rename the pose channel, if it exists */
if (ob->pose) {
bPoseChannel *pchan = get_pose_channel(ob->pose, oldname);
@@ -5335,20 +5321,6 @@ void ED_armature_bone_rename(bArmature *arm, char *oldnamep, char *newnamep)
BLI_strncpy(pchan->name, newname, MAXBONENAME);
}
- /* check all nla-strips too */
-#if 0 // XXX old animation system
- for (strip= ob->nlastrips.first; strip; strip= strip->next) {
- /* Rename action channel if necessary */
- act = strip->act;
- if (act && !act->id.lib) {
- /* Find the appropriate channel */
- achan= get_action_channel(act, oldname);
- if (achan)
- BLI_strncpy(achan->name, newname, MAXBONENAME);
- }
- }
-#endif // XXX old animation system
-
/* Update any object constraints to use the new bone name */
for (cob= G.main->object.first; cob; cob= cob->id.next) {
if (cob->constraints.first)
@@ -5381,35 +5353,12 @@ void ED_armature_bone_rename(bArmature *arm, char *oldnamep, char *newnamep)
}
/* Fix animation data attached to this object */
+ // TODO: should we be using the database wide version instead (since drivers may break)
if (ob->adt) {
/* posechannels only... */
BKE_animdata_fix_paths_rename(&ob->id, ob->adt, "pose.pose_channels", oldname, newname);
}
}
-
- /* do entire db - ipo's for the drivers */
-#if 0 // XXX old animation system
- for (ipo= G.main->ipo.first; ipo; ipo= ipo->id.next) {
- IpoCurve *icu;
-
- /* check each curve's driver */
- for (icu= ipo->curve.first; icu; icu= icu->next) {
- IpoDriver *icd= icu->driver;
-
- if ((icd) && (icd->ob)) {
- ob= icd->ob;
-
- if (icu->driver->type == IPO_DRIVER_TYPE_NORMAL) {
- if (!strcmp(oldname, icd->name))
- BLI_strncpy(icd->name, newname, MAXBONENAME);
- }
- else {
- /* TODO: pydrivers need to be treated differently */
- }
- }
- }
- }
-#endif // XXX old animation system
}
}