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:
authorTon Roosendaal <ton@blender.org>2005-10-28 12:11:15 +0400
committerTon Roosendaal <ton@blender.org>2005-10-28 12:11:15 +0400
commit595447a85ea2e388fa17b4a44dacf256ac97f343 (patch)
tree3461e1157f41cbe304f8e346cd2ac5c8333c395d /source/blender/src/outliner.c
parent0dde486eeae6c563059bfab408f1ed5bd239ad85 (diff)
Here's another milestone: Shape Keys now can be inserted in Actions and NLA
It works like for moving Object Ipos to the Action, press the Action icon in the header of the IpoWindow, to the left of the mode selection menu. It then creates an Action (if not existed) and moves the Shape Ipo to the Action, using custom channel "Shape". Main code change was that evaluating Ipo Curves for Relative Shapes had to be recoded, but that's pretty minor and even much cleaner. (added "curval" in the KeyBlock struct). That this feature can work is thanks to the full modifier/derivedmesh recode Daniel did, can't give him enough credits! :) Also; small fixes in Outliner, for clicking on the Ipo icon (sets the Ipo window to show that Ipo).
Diffstat (limited to 'source/blender/src/outliner.c')
-rw-r--r--source/blender/src/outliner.c43
1 files changed, 30 insertions, 13 deletions
diff --git a/source/blender/src/outliner.c b/source/blender/src/outliner.c
index 64d4d77cc43..417bf489eae 100644
--- a/source/blender/src/outliner.c
+++ b/source/blender/src/outliner.c
@@ -1156,7 +1156,16 @@ static int tree_element_active_ipo(SpaceOops *soops, TreeElement *te, int set)
tselems= TREESTORE(tes);
if(set) {
- ob->ipowin= tes->idcode;
+ if(tes->idcode==ID_AC) {
+ if(ob->ipoflag & OB_ACTION_OB)
+ ob->ipowin= ID_OB;
+ else if(ob->ipoflag & OB_ACTION_KEY)
+ ob->ipowin= ID_KE;
+ else
+ ob->ipowin= ID_PO;
+ }
+ else ob->ipowin= tes->idcode;
+
if(ob->ipowin==ID_MA) tree_element_active_material(soops, tes, 1);
else if(ob->ipowin==ID_AC) {
bActionChannel *chan;
@@ -1173,21 +1182,29 @@ static int tree_element_active_ipo(SpaceOops *soops, TreeElement *te, int set)
allqueue(REDRAWIPO, ob->ipowin);
}
- else if(ob->ipowin==tes->idcode) {
- if(ob->ipowin==ID_MA) {
- Material *ma= give_current_material(ob, ob->actcol);
- if(ma==(Material *)tselems->id) return 1;
+ else {
+ if(tes->idcode==ID_AC) {
+ if(ob->ipoflag & OB_ACTION_OB)
+ return ob->ipowin==ID_OB;
+ else if(ob->ipoflag & OB_ACTION_KEY)
+ return ob->ipowin==ID_KE;
+ else if(ob->ipowin==ID_AC) {
+ bActionChannel *chan;
+ short a=0;
+ for(chan=ob->action->chanbase.first; chan; chan= chan->next) {
+ if(a==te->index) break;
+ if(chan->ipo) a++;
+ }
+ if(chan==get_hilighted_action_channel(ob->action)) return 1;
+ }
}
- else if(ob->ipowin==ID_AC) {
- bActionChannel *chan;
- short a=0;
- for(chan=ob->action->chanbase.first; chan; chan= chan->next) {
- if(a==te->index) break;
- if(chan->ipo) a++;
+ else if(ob->ipowin==tes->idcode) {
+ if(ob->ipowin==ID_MA) {
+ Material *ma= give_current_material(ob, ob->actcol);
+ if(ma==(Material *)tselems->id) return 1;
}
- if(chan==get_hilighted_action_channel(ob->action)) return 1;
+ else return 1;
}
- else return 1;
}
return 0;
}