[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [11276] trunk/blender/source/blender: A few minor changes:
Joshua Leung
aligorith at gmail.com
Sun Jul 15 09:05:24 CEST 2007
Revision: 11276
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=11276
Author: aligorith
Date: 2007-07-15 09:05:24 +0200 (Sun, 15 Jul 2007)
Log Message:
-----------
A few minor changes:
* Removed obsolete comments from constraints code
* ChildOf constraint buttons: Set/Clear Inverse are now Set/Clear Offset. Hopefully that makes it a bit clearer for users.
Modified Paths:
--------------
trunk/blender/source/blender/blenkernel/intern/constraint.c
trunk/blender/source/blender/src/buttons_editing.c
trunk/blender/source/blender/src/buttons_object.c
trunk/blender/source/blender/src/editconstraint.c
Modified: trunk/blender/source/blender/blenkernel/intern/constraint.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/constraint.c 2007-07-15 04:35:56 UTC (rev 11275)
+++ trunk/blender/source/blender/blenkernel/intern/constraint.c 2007-07-15 07:05:24 UTC (rev 11276)
@@ -1051,7 +1051,6 @@
/* generic function to get the appropriate matrix for most target cases */
/* The cases where the target can be object data have not been implemented */
-// TODO: add 'space' handling stuff here!
static void constraint_target_to_mat4 (Object *ob, const char *substring, float mat[][4], short from, short to)
{
/* Case OBJECT */
Modified: trunk/blender/source/blender/src/buttons_editing.c
===================================================================
--- trunk/blender/source/blender/src/buttons_editing.c 2007-07-15 04:35:56 UTC (rev 11275)
+++ trunk/blender/source/blender/src/buttons_editing.c 2007-07-15 07:05:24 UTC (rev 11276)
@@ -3480,9 +3480,8 @@
int index, numbones, i;
char (*qsort_ptr)[32] = NULL;
- sprintf (string, "Parent%%t| %%x%d", -1); /* That space is there
- * for a reason
- */
+ /* That space is there for a reason - for no parent */
+ sprintf (string, "Parent%%t| %%x%d", -1);
numbones = BLI_countlist(&G.edbo);
Modified: trunk/blender/source/blender/src/buttons_object.c
===================================================================
--- trunk/blender/source/blender/src/buttons_object.c 2007-07-15 04:35:56 UTC (rev 11275)
+++ trunk/blender/source/blender/src/buttons_object.c 2007-07-15 07:05:24 UTC (rev 11276)
@@ -837,10 +837,10 @@
/* Inverse options */
uiBlockBeginAlign(block);
- but=uiDefBut(block, BUT, B_CONSTRAINT_TEST, "Set Inverse", *xco, *yco-151, (width/2),18, NULL, 0, 24, 0, 0, "Calculate current Parent-Inverse Matrix");
+ but=uiDefBut(block, BUT, B_CONSTRAINT_TEST, "Set Offset", *xco, *yco-151, (width/2),18, NULL, 0, 24, 0, 0, "Calculate current Parent-Inverse Matrix (i.e. restore offset from parent)");
uiButSetFunc(but, childof_const_setinv, data, NULL);
- but=uiDefBut(block, BUT, B_CONSTRAINT_TEST, "Clear Inverse", *xco+((width/2)+10), *yco-151, (width/2),18, NULL, 0, 24, 0, 0, "Clear Parent-Inverse Matrix");
+ but=uiDefBut(block, BUT, B_CONSTRAINT_TEST, "Clear Offset", *xco+((width/2)+10), *yco-151, (width/2),18, NULL, 0, 24, 0, 0, "Clear Parent-Inverse Matrix (i.e. clear offset from parent)");
uiButSetFunc(but, childof_const_clearinv, data, NULL);
uiBlockEndAlign(block);
}
Modified: trunk/blender/source/blender/src/editconstraint.c
===================================================================
--- trunk/blender/source/blender/src/editconstraint.c 2007-07-15 04:35:56 UTC (rev 11275)
+++ trunk/blender/source/blender/src/editconstraint.c 2007-07-15 07:05:24 UTC (rev 11276)
@@ -276,8 +276,8 @@
/* Check parents */
/* Get the constraint list for this object */
- if (strlen (substring)){
- switch (owner->type){
+ if (strlen (substring)) {
+ switch (owner->type) {
case OB_ARMATURE:
type = TARGET_BONE;
break;
@@ -290,7 +290,7 @@
type = TARGET_OBJECT;
- switch (type){
+ switch (type) {
case TARGET_OBJECT:
conlist = &owner->constraints;
break;
@@ -308,12 +308,12 @@
break;
}
- /* Cycle constraints */
- if (conlist){
- for (curcon = conlist->first; curcon; curcon=curcon->next){
+ /* Check all constraints - is constraint valid? */
+ if (conlist) {
+ for (curcon = conlist->first; curcon; curcon=curcon->next) {
curcon->flag &= ~CONSTRAINT_DISABLE;
- switch (curcon->type){
+ switch (curcon->type) {
case CONSTRAINT_TYPE_PYTHON:
{
bPythonConstraint *data = curcon->data;
@@ -952,7 +952,7 @@
int index = *((int *)arg2);
int i;
- /* innovative use of a for loop to search */
+ /* innovative use of a for...loop to search */
for (text=G.main->text.first, i=1; text && index!=i; i++, text=text->id.next);
data->text = text;
}
More information about the Bf-blender-cvs
mailing list