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>2007-12-01 14:57:16 +0300
committerJoshua Leung <aligorith@gmail.com>2007-12-01 14:57:16 +0300
commit092e9dcdc342aa173e24a5ab286b1faee4fe8a53 (patch)
treeeecccff8127ffaee5ff15eb489487ecb937a29e4 /source/blender/src/poseobject.c
parent45c41ffb693f96856d5969a2427e504472026162 (diff)
== Bone Paths - More Tweaks (Cessen requests) ==
* "Around Current Frame" option now works differently. When this option is activated, the path range calculated remains the same (PSta -> PEnd), but only PPre and PPost amount of path-points on either side of the current frame get shown. This is less clumsy to use, and looks quite neat! * "Clear Paths" now only clears the paths of the selected bones, not all bones. The old behaviour can still be obtained by selecting all bones, but previously there was no way to only clear paths of selected bones. * Own fix: path colours are now drawn less saturated, as they were showing up TOO strongly. TODO: * Fix up interface for "Around current..." option. It's quite confusing atm. * Selective recalculation of path on certain operations could also be investigated further...
Diffstat (limited to 'source/blender/src/poseobject.c')
-rw-r--r--source/blender/src/poseobject.c24
1 files changed, 8 insertions, 16 deletions
diff --git a/source/blender/src/poseobject.c b/source/blender/src/poseobject.c
index 68af3d7c64c..fe7dd0109e1 100644
--- a/source/blender/src/poseobject.c
+++ b/source/blender/src/poseobject.c
@@ -219,7 +219,9 @@ int pose_channel_in_IK_chain(Object *ob, bPoseChannel *pchan)
/* ********************************************** */
-/* for the object with pose/action: create path curves for selected bones */
+/* For the object with pose/action: create path curves for selected bones
+ * This recalculates the WHOLE path within the pchan->pathsf and pchan->pathef range
+ */
void pose_calculate_path(Object *ob)
{
bArmature *arm;
@@ -238,24 +240,14 @@ void pose_calculate_path(Object *ob)
arm->pathsf = SFRA;
arm->pathef = EFRA;
}
- if ((arm->pathbc == 0) || (arm->pathac == 0)) {
- arm->pathbc = 15;
- arm->pathac = 15;
- }
if (arm->pathsize == 0) {
arm->pathsize = 1;
}
/* set frame values */
cfra= CFRA;
- if (arm->pathflag & ARM_PATH_ACFRA) {
- sfra = cfra - arm->pathbc;
- efra = cfra + arm->pathac;
- }
- else {
- sfra = arm->pathsf;
- efra = arm->pathef;
- }
+ sfra = arm->pathsf;
+ efra = arm->pathef;
if (efra<=sfra) return;
DAG_object_update_flags(G.scene, ob, screen_view3d_layers());
@@ -310,7 +302,7 @@ void pose_calculate_path(Object *ob)
}
-/* for the object with pose/action: clear all path curves */
+/* for the object with pose/action: clear path curves for selected bones only */
void pose_clear_paths(Object *ob)
{
bPoseChannel *pchan;
@@ -319,8 +311,8 @@ void pose_clear_paths(Object *ob)
return;
/* free the path blocks */
- for(pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) {
- if(pchan->path) {
+ for (pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) {
+ if (pchan->path) {
MEM_freeN(pchan->path);
pchan->path= NULL;
}