[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [24637] trunk/blender/source: rename pose_channels to bones
Campbell Barton
ideasman42 at gmail.com
Wed Nov 18 12:40:56 CET 2009
Revision: 24637
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=24637
Author: campbellbarton
Date: 2009-11-18 12:40:55 +0100 (Wed, 18 Nov 2009)
Log Message:
-----------
rename pose_channels to bones
was: object.pose.pose_channels["Bone"]
now: object.pose.bones["Bone"]
Modified Paths:
--------------
trunk/blender/source/blender/blenkernel/intern/action.c
trunk/blender/source/blender/blenkernel/intern/anim_sys.c
trunk/blender/source/blender/blenkernel/intern/depsgraph.c
trunk/blender/source/blender/blenkernel/intern/fcurve.c
trunk/blender/source/blender/blenkernel/intern/ipo.c
trunk/blender/source/blender/collada/DocumentImporter.cpp
trunk/blender/source/blender/editors/animation/anim_filter.c
trunk/blender/source/blender/editors/animation/anim_ipo_utils.c
trunk/blender/source/blender/editors/animation/keyframing.c
trunk/blender/source/blender/editors/animation/keyingsets.c
trunk/blender/source/blender/editors/armature/editarmature.c
trunk/blender/source/blender/editors/armature/poseSlide.c
trunk/blender/source/blender/editors/screen/screen_context.c
trunk/blender/source/blender/editors/space_node/node_ops.c
trunk/blender/source/blender/editors/space_view3d/drawarmature.c
trunk/blender/source/blender/editors/space_view3d/view3d_buttons.c
trunk/blender/source/blender/makesrna/RNA_access.h
trunk/blender/source/blender/makesrna/intern/rna_constraint.c
trunk/blender/source/blender/makesrna/intern/rna_main.c
trunk/blender/source/blender/makesrna/intern/rna_pose.c
trunk/blender/source/blender/makesrna/intern/rna_scene.c
trunk/blender/source/gameengine/Converter/BL_ArmatureConstraint.cpp
Modified: trunk/blender/source/blender/blenkernel/intern/action.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/action.c 2009-11-18 11:11:21 UTC (rev 24636)
+++ trunk/blender/source/blender/blenkernel/intern/action.c 2009-11-18 11:40:55 UTC (rev 24637)
@@ -868,7 +868,7 @@
/* build PointerRNA from provided data to obtain the paths to use */
if (pchan)
- RNA_pointer_create((ID *)ob, &RNA_PoseChannel, pchan, &ptr);
+ RNA_pointer_create((ID *)ob, &RNA_PoseBone, pchan, &ptr);
else if (ob)
RNA_id_pointer_create((ID *)ob, &ptr);
else
Modified: trunk/blender/source/blender/blenkernel/intern/anim_sys.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/anim_sys.c 2009-11-18 11:11:21 UTC (rev 24636)
+++ trunk/blender/source/blender/blenkernel/intern/anim_sys.c 2009-11-18 11:40:55 UTC (rev 24637)
@@ -353,7 +353,7 @@
/* Fix all RNA-Paths in the AnimData block used by the given ID block
* NOTE: it is assumed that the structure we're replacing is <prefix><["><name><"]>
- * i.e. pose.pose_channels["Bone"]
+ * i.e. pose.bones["Bone"]
*/
void BKE_animdata_fix_paths_rename (ID *owner_id, AnimData *adt, char *prefix, char *oldName, char *newName)
{
@@ -388,7 +388,7 @@
/* Fix all RNA-Paths throughout the database (directly access the Global.main version)
* NOTE: it is assumed that the structure we're replacing is <prefix><["><name><"]>
- * i.e. pose.pose_channels["Bone"]
+ * i.e. pose.bones["Bone"]
*/
void BKE_all_animdata_fix_paths_rename (char *prefix, char *oldName, char *newName)
{
Modified: trunk/blender/source/blender/blenkernel/intern/depsgraph.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/depsgraph.c 2009-11-18 11:11:21 UTC (rev 24636)
+++ trunk/blender/source/blender/blenkernel/intern/depsgraph.c 2009-11-18 11:40:55 UTC (rev 24637)
@@ -327,7 +327,7 @@
node1 = dag_get_node(dag, dtar->id);
/* check if bone... */
- if ((ob->type==OB_ARMATURE) && dtar->rna_path && strstr(dtar->rna_path, "pose.pose_channels["))
+ if ((ob->type==OB_ARMATURE) && dtar->rna_path && strstr(dtar->rna_path, "pose.bones["))
dag_add_relation(dag, node1, node, isdata?DAG_RL_DATA_DATA:DAG_RL_DATA_OB, "Driver");
/* check if ob data */
else if (dtar->rna_path && strstr(dtar->rna_path, "data."))
Modified: trunk/blender/source/blender/blenkernel/intern/fcurve.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/fcurve.c 2009-11-18 11:11:21 UTC (rev 24636)
+++ trunk/blender/source/blender/blenkernel/intern/fcurve.c 2009-11-18 11:40:55 UTC (rev 24637)
@@ -881,7 +881,7 @@
/* resolve path so that we have pointer to the right posechannel */
if (RNA_path_resolve(&id_ptr, dtar->rna_path, &ptr, &prop)) {
/* is pointer valid (i.e. pointing to an actual posechannel */
- if ((ptr.type == &RNA_PoseChannel) && (ptr.data)) {
+ if ((ptr.type == &RNA_PoseBone) && (ptr.data)) {
/* first or second target? */
if (i)
*pchan1= ptr.data;
Modified: trunk/blender/source/blender/blenkernel/intern/ipo.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/ipo.c 2009-11-18 11:11:21 UTC (rev 24636)
+++ trunk/blender/source/blender/blenkernel/intern/ipo.c 2009-11-18 11:40:55 UTC (rev 24637)
@@ -919,11 +919,11 @@
/* append preceeding bits to path */
if ((actname && actname[0]) && (constname && constname[0])) {
/* Constraint in Pose-Channel */
- sprintf(buf, "pose.pose_channels[\"%s\"].constraints[\"%s\"]", actname, constname);
+ sprintf(buf, "pose.bones[\"%s\"].constraints[\"%s\"]", actname, constname);
}
else if (actname && actname[0]) {
/* Pose-Channel */
- sprintf(buf, "pose.pose_channels[\"%s\"]", actname);
+ sprintf(buf, "pose.bones[\"%s\"]", actname);
}
else if (constname && constname[0]) {
/* Constraint in Object */
Modified: trunk/blender/source/blender/collada/DocumentImporter.cpp
===================================================================
--- trunk/blender/source/blender/collada/DocumentImporter.cpp 2009-11-18 11:11:21 UTC (rev 24636)
+++ trunk/blender/source/blender/collada/DocumentImporter.cpp 2009-11-18 11:40:55 UTC (rev 24637)
@@ -989,7 +989,7 @@
void get_rna_path_for_joint(COLLADAFW::Node *node, char *joint_path, size_t count)
{
- BLI_snprintf(joint_path, count, "pose.pose_channels[\"%s\"]", get_joint_name(node));
+ BLI_snprintf(joint_path, count, "pose.bones[\"%s\"]", get_joint_name(node));
}
void fix_animation()
@@ -1979,7 +1979,7 @@
return true;
}
- // for bones rna_path is like: pose.pose_channels["bone-name"].rotation
+ // for bones rna_path is like: pose.bones["bone-name"].rotation
// what does this AnimationList animate?
Animation& animated = uid_animated_map[anim_list_id];
@@ -2165,7 +2165,7 @@
char joint_path[100];
char rna_path[100];
- BLI_snprintf(joint_path, sizeof(joint_path), "pose.pose_channels[\"%s\"]", grp->name);
+ BLI_snprintf(joint_path, sizeof(joint_path), "pose.bones[\"%s\"]", grp->name);
BLI_snprintf(rna_path, sizeof(rna_path), "%s.rotation_euler", joint_path);
FCurve *quatcu[4] = {
Modified: trunk/blender/source/blender/editors/animation/anim_filter.c
===================================================================
--- trunk/blender/source/blender/editors/animation/anim_filter.c 2009-11-18 11:11:21 UTC (rev 24636)
+++ trunk/blender/source/blender/editors/animation/anim_filter.c 2009-11-18 11:40:55 UTC (rev 24637)
@@ -779,13 +779,13 @@
{
Object *ob= (Object *)owner_id;
- /* only consider if F-Curve involves pose_channels */
- if ((fcu->rna_path) && strstr(fcu->rna_path, "pose_channels")) {
+ /* only consider if F-Curve involves pose.bones */
+ if ((fcu->rna_path) && strstr(fcu->rna_path, "bones")) {
bPoseChannel *pchan;
char *bone_name;
/* get bone-name, and check if this bone is selected */
- bone_name= BLI_getQuotedStr(fcu->rna_path, "pose_channels[");
+ bone_name= BLI_getQuotedStr(fcu->rna_path, "bones[");
pchan= get_pose_channel(ob->pose, bone_name);
if (bone_name) MEM_freeN(bone_name);
Modified: trunk/blender/source/blender/editors/animation/anim_ipo_utils.c
===================================================================
--- trunk/blender/source/blender/editors/animation/anim_ipo_utils.c 2009-11-18 11:11:21 UTC (rev 24636)
+++ trunk/blender/source/blender/editors/animation/anim_ipo_utils.c 2009-11-18 11:40:55 UTC (rev 24637)
@@ -109,9 +109,9 @@
* - however, if we're showing subdata of bones (probably there will be other exceptions later)
* need to include that info too since it gets confusing otherwise
*/
- if (strstr(fcu->rna_path, "pose_channels") && strstr(fcu->rna_path, "constraints")) {
+ if (strstr(fcu->rna_path, "bones") && strstr(fcu->rna_path, "constraints")) {
/* perform string 'chopping' to get "Bone Name : Constraint Name" */
- char *pchanName= BLI_getQuotedStr(fcu->rna_path, "pose_channels[");
+ char *pchanName= BLI_getQuotedStr(fcu->rna_path, "bones[");
char *constName= BLI_getQuotedStr(fcu->rna_path, "constraints[");
/* assemble the string to display in the UI... */
Modified: trunk/blender/source/blender/editors/animation/keyframing.c
===================================================================
--- trunk/blender/source/blender/editors/animation/keyframing.c 2009-11-18 11:11:21 UTC (rev 24636)
+++ trunk/blender/source/blender/editors/animation/keyframing.c 2009-11-18 11:40:55 UTC (rev 24637)
@@ -511,7 +511,7 @@
con= ob->constraints.first;
identifier= (char *)RNA_property_identifier(prop);
}
- else if (ptr->type == &RNA_PoseChannel) {
+ else if (ptr->type == &RNA_PoseBone) {
/* Pose Channel */
bPoseChannel *pchan= (bPoseChannel *)ptr->data;
@@ -622,7 +622,7 @@
}
}
}
- else if (ptr->type == &RNA_PoseChannel) {
+ else if (ptr->type == &RNA_PoseBone) {
Object *ob= (Object *)ptr->id.data; /* we assume that this is always set, and is an object */
bPoseChannel *pchan= (bPoseChannel *)ptr->data;
float tmat[4][4];
Modified: trunk/blender/source/blender/editors/animation/keyingsets.c
===================================================================
--- trunk/blender/source/blender/editors/animation/keyingsets.c 2009-11-18 11:11:21 UTC (rev 24636)
+++ trunk/blender/source/blender/editors/animation/keyingsets.c 2009-11-18 11:40:55 UTC (rev 24637)
@@ -1395,7 +1395,7 @@
// FIXME: this currently only works with a few hardcoded cases
if ((ksp->templates & KSP_TEMPLATE_PCHAN) && (cks->pchan)) {
/* add basic pose-channel path access */
- BLI_dynstr_append(pathds, "pose.pose_channels[\"");
+ BLI_dynstr_append(pathds, "pose.bones[\"");
BLI_dynstr_append(pathds, cks->pchan->name);
BLI_dynstr_append(pathds, "\"]");
Modified: trunk/blender/source/blender/editors/armature/editarmature.c
===================================================================
--- trunk/blender/source/blender/editors/armature/editarmature.c 2009-11-18 11:11:21 UTC (rev 24636)
+++ trunk/blender/source/blender/editors/armature/editarmature.c 2009-11-18 11:40:55 UTC (rev 24637)
@@ -5411,7 +5411,7 @@
// 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);
+ BKE_animdata_fix_paths_rename(&ob->id, ob->adt, "pose.bones", oldname, newname);
}
}
}
Modified: trunk/blender/source/blender/editors/armature/poseSlide.c
===================================================================
--- trunk/blender/source/blender/editors/armature/poseSlide.c 2009-11-18 11:11:21 UTC (rev 24636)
+++ trunk/blender/source/blender/editors/armature/poseSlide.c 2009-11-18 11:40:55 UTC (rev 24637)
@@ -195,7 +195,7 @@
pfl->pchan= pchan;
/* get the RNA path to this pchan - this needs to be freed! */
- RNA_pointer_create((ID *)pso->ob, &RNA_PoseChannel, pchan, &ptr);
+ RNA_pointer_create((ID *)pso->ob, &RNA_PoseBone, pchan, &ptr);
pfl->pchan_path= RNA_path_from_ID_to_struct(&ptr);
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list