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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2007-08-20 21:50:04 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2007-08-20 21:50:04 +0400
commit8a46c006d6b8c0ea567e8a79a729c9b15fe2a744 (patch)
tree194cd48ca34d67b91c08d8c7cf783627b8a08d92 /source/blender/src/editipo_lib.c
parentb697f19cf82164e273562664c01bb9c0a97d0e9b (diff)
Add "View Selected" in the IPO editor
- Numpad dot is shortcut key, same as in other windows. (Peach feature request)
Diffstat (limited to 'source/blender/src/editipo_lib.c')
-rw-r--r--source/blender/src/editipo_lib.c33
1 files changed, 19 insertions, 14 deletions
diff --git a/source/blender/src/editipo_lib.c b/source/blender/src/editipo_lib.c
index 971d5365538..15840614d2a 100644
--- a/source/blender/src/editipo_lib.c
+++ b/source/blender/src/editipo_lib.c
@@ -287,7 +287,7 @@ char *getname_fluidsim_ei(int nr)
}
-void boundbox_ipocurve(IpoCurve *icu)
+void boundbox_ipocurve(IpoCurve *icu, int selectedonly)
{
BezTriple *bezt;
float vec[3]={0.0,0.0,0.0};
@@ -302,20 +302,25 @@ void boundbox_ipocurve(IpoCurve *icu)
bezt= icu->bezt;
while(a--) {
if(icu->vartype & IPO_BITS) {
- vec[0]= bezt->vec[1][0];
- vec[1]= 0.0;
- DO_MINMAX(vec, min, max);
-
- vec[1]= 16.0;
- DO_MINMAX(vec, min, max);
+ if((bezt->f2 & 1) || !selectedonly) {
+ vec[0]= bezt->vec[1][0];
+ vec[1]= 0.0;
+ DO_MINMAX(vec, min, max);
+
+ vec[1]= 16.0;
+ DO_MINMAX(vec, min, max);
+ }
}
else {
- if(icu->ipo==IPO_BEZ && a!=icu->totvert-1) {
- DO_MINMAX(bezt->vec[0], min, max);
+ if((bezt->f1 & 1) || !selectedonly) {
+ if(icu->ipo==IPO_BEZ && a!=icu->totvert-1)
+ DO_MINMAX(bezt->vec[0], min, max);
}
- DO_MINMAX(bezt->vec[1], min, max);
- if(icu->ipo==IPO_BEZ && a!=0) {
- DO_MINMAX(bezt->vec[2], min, max);
+ if((bezt->f2 & 1) || !selectedonly)
+ DO_MINMAX(bezt->vec[1], min, max);
+ if((bezt->f3 & 1) || !selectedonly) {
+ if(icu->ipo==IPO_BEZ && a!=0)
+ DO_MINMAX(bezt->vec[2], min, max);
}
}
@@ -337,7 +342,7 @@ void boundbox_ipocurve(IpoCurve *icu)
}
}
-void boundbox_ipo(Ipo *ipo, rctf *bb)
+void boundbox_ipo(Ipo *ipo, rctf *bb, int selectedonly)
{
IpoCurve *icu;
int first= 1;
@@ -345,7 +350,7 @@ void boundbox_ipo(Ipo *ipo, rctf *bb)
icu= ipo->curve.first;
while(icu) {
- boundbox_ipocurve(icu);
+ boundbox_ipocurve(icu, selectedonly);
if(first) {
*bb= icu->totrct;