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-10-22 03:00:29 +0400
committerJoshua Leung <aligorith@gmail.com>2007-10-22 03:00:29 +0400
commit6422a740c25d33c7e7dcc008d215ae983be00a30 (patch)
treedddeca774208da69659dfbc6f75616dcc6deadd7 /source/blender/src/outliner.c
parenta4e8e87983829e05d33b2c5aa39f88ca24d48cdd (diff)
== Constraints System - Recode 2 ==
Once again, I've recoded the constraints system. This time, the goals were: * To make it more future-proof by 'modernising' the coding style. The long functions filled with switch statements, have given way to function-pointers with smaller functions for specific purposes. * To make it support constraints which use multiple targets more readily that it did. In the past, it was assumed that constraints could only have at most one target. As a result, a lot of code has been shuffled around, and modified. Also, the subversion number has been bumped up. Known issues: * PyConstraints, which were the main motivation for supporting multiple-targets, are currently broken. There are some bimport() error that keeps causing problems. I've also temporarily removed the doDriver support, although it may return in another form soon. * Constraints BPy-API is currently has a few features which currently don't work yet * Outliner currently only displays the names of the constraints instead of the fancy subtarget/target/constraint-name display it used to do. What gets displayed here needs further investigation, as the old way was certainly not that great (and is not compatible with the new system too)
Diffstat (limited to 'source/blender/src/outliner.c')
-rw-r--r--source/blender/src/outliner.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/src/outliner.c b/source/blender/src/outliner.c
index 37d25e4f100..0ed50c75ad4 100644
--- a/source/blender/src/outliner.c
+++ b/source/blender/src/outliner.c
@@ -600,10 +600,13 @@ static TreeElement *outliner_add_element(SpaceOops *soops, ListBase *lb, void *i
tenla1->name= "Constraints";
for(con= pchan->constraints.first; con; con= con->next, const_index++) {
ten1= outliner_add_element(soops, &tenla1->subtree, ob, tenla1, TSE_CONSTRAINT, const_index);
+#if 0 /* disabled as it needs to be reworked for recoded constraints system */
target= get_constraint_target(con, &str);
if(str && str[0]) ten1->name= str;
else if(target) ten1->name= target->id.name+2;
else ten1->name= con->name;
+#endif
+ ten1->name= con->name;
ten1->directdata= con;
/* possible add all other types links? */
}
@@ -651,10 +654,13 @@ static TreeElement *outliner_add_element(SpaceOops *soops, ListBase *lb, void *i
tenla->name= "Constraints";
for(con= ob->constraints.first; con; con= con->next, a++) {
ten= outliner_add_element(soops, &tenla->subtree, ob, tenla, TSE_CONSTRAINT, a);
+#if 0 /* disabled due to constraints system targets recode... code here needs review */
target= get_constraint_target(con, &str);
if(str && str[0]) ten->name= str;
else if(target) ten->name= target->id.name+2;
else ten->name= con->name;
+#endif
+ ten->name= con->name;
ten->directdata= con;
/* possible add all other types links? */
}