[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [39414] branches/soc-2011-pepper/source/ blender/editors/armature/poseobject.c: Remove some unused code + warning fix
Joshua Leung
aligorith at gmail.com
Mon Aug 15 13:51:42 CEST 2011
Revision: 39414
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=39414
Author: aligorith
Date: 2011-08-15 11:51:42 +0000 (Mon, 15 Aug 2011)
Log Message:
-----------
Remove some unused code + warning fix
Modified Paths:
--------------
branches/soc-2011-pepper/source/blender/editors/armature/poseobject.c
Modified: branches/soc-2011-pepper/source/blender/editors/armature/poseobject.c
===================================================================
--- branches/soc-2011-pepper/source/blender/editors/armature/poseobject.c 2011-08-15 11:34:29 UTC (rev 39413)
+++ branches/soc-2011-pepper/source/blender/editors/armature/poseobject.c 2011-08-15 11:51:42 UTC (rev 39414)
@@ -107,24 +107,6 @@
return NULL;
}
-
-/* This function is used to indicate that a bone is selected and needs keyframes inserted */
-static void set_pose_keys (Object *ob)
-{
- bArmature *arm= ob->data;
- bPoseChannel *chan;
-
- if (ob->pose){
- for (chan=ob->pose->chanbase.first; chan; chan=chan->next){
- Bone *bone= chan->bone;
- if ((bone) && (bone->flag & BONE_SELECTED) && (arm->layer & bone->layer))
- chan->flag |= POSE_KEY;
- else
- chan->flag &= ~POSE_KEY;
- }
- }
-}
-
/* This function is used to process the necessary updates for */
void ED_armature_enter_posemode(bContext *C, Base *base)
{
@@ -634,7 +616,7 @@
*/
for (ksp = ks->paths.first; ksp; ksp = ksp->next) {
/* only items related to this object will be relevant */
- if ((ksp->id == ob) && (ksp->rna_path != NULL)) {
+ if ((ksp->id == &ob->id) && (ksp->rna_path != NULL)) {
if (strstr(ksp->rna_path, "bones")) {
char *boneName = BLI_getQuotedStr(ksp->rna_path, "bones[");
@@ -1005,6 +987,25 @@
g_posebuf=NULL;
}
+/* This function is used to indicate that a bone is selected
+ * and needs to be included in copy buffer (used to be for inserting keys)
+ */
+static void set_pose_keys (Object *ob)
+{
+ bArmature *arm= ob->data;
+ bPoseChannel *chan;
+
+ if (ob->pose){
+ for (chan=ob->pose->chanbase.first; chan; chan=chan->next){
+ Bone *bone= chan->bone;
+ if ((bone) && (bone->flag & BONE_SELECTED) && (arm->layer & bone->layer))
+ chan->flag |= POSE_KEY;
+ else
+ chan->flag &= ~POSE_KEY;
+ }
+ }
+}
+
/* ---- */
static int pose_copy_exec (bContext *C, wmOperator *op)
@@ -1239,8 +1240,8 @@
}
/* ********************************************** */
+/* Bone Groups */
-
static int pose_group_add_exec (bContext *C, wmOperator *UNUSED(op))
{
ScrArea *sa= CTX_wm_area(C);
@@ -2253,41 +2254,7 @@
/* context: active channel */
#if 0
-void pose_special_editmenu(Scene *scene)
-{
- Object *obedit= scene->obedit; // XXX context
- Object *ob= OBACT;
- short nr;
-
- /* paranoia checks */
- if(!ob && !ob->pose) return;
- if(ob==obedit || (ob->mode & OB_MODE_POSE)==0) return;
-
- nr= pupmenu("Specials%t|Select Constraint Target%x1|Flip Left-Right Names%x2|Calculate Paths%x3|Clear Paths%x4|Clear User Transform %x5|Relax Pose %x6|%l|AutoName Left-Right%x7|AutoName Front-Back%x8|AutoName Top-Bottom%x9");
- if(nr==1) {
- pose_select_constraint_target(scene);
- }
- else if(nr==2) {
- pose_flip_names();
- }
- else if(nr==3) {
- pose_calculate_path(C, ob);
- }
- else if(nr==4) {
- pose_clear_paths(ob);
- }
- else if(nr==5) {
- pose_clear_user_transforms(ob);
- }
- else if(nr==6) {
- pose_relax();
- }
- else if(ELEM3(nr, 7, 8, 9)) {
- pose_autoside_names(nr-7);
- }
-}
-
/* Restore selected pose-bones to 'action'-defined pose */
static void pose_clear_user_transforms(Object *ob)
{
More information about the Bf-blender-cvs
mailing list