== PyConstraints - 2 Fixes ==

* Error print for getSettings was lacking a newline
* When adding a PyConstraint using Ctrl-Alt-C, the script is now queried to find out whether it uses a target.
This commit is contained in:
2007-06-20 09:58:16 +00:00
parent d9b94275c0
commit 8975e34439
2 changed files with 12 additions and 3 deletions

View File

@@ -747,17 +747,26 @@ void add_constraint(int only_IK)
}
else if(nr==18) {
char *menustr;
int scriptint= 0, dummy_active=0;
int scriptint= 0, dummy_int=0;
float dummy_matrix[4][4];
/* popup a list of usable scripts */
menustr = buildmenu_pyconstraints(NULL, &dummy_active);
menustr = buildmenu_pyconstraints(NULL, &dummy_int);
scriptint = pupmenu(menustr);
MEM_freeN(menustr);
/* only add constraint if a script was chosen */
if (scriptint) {
/* add constraint */
con = add_new_constraint(CONSTRAINT_TYPE_PYTHON);
validate_pyconstraint_cb(con->data, &scriptint);
/* make sure target allowance is set correctly */
dummy_int = BPY_pyconstraint_targets(con->data, dummy_matrix);
if (dummy_int) {
bPythonConstraint *pycon= (bPythonConstraint *)con->data;
pycon->flag |= PYCON_USETARGETS;
}
}
}