== PyConstraints ==

At last! The ability to code constraints in Python. This opens up many interesting rigging possibilities, as well as making prototyping constraints easier.

* A PyConstraint script must begin with the line 
#BPYCONSTRAINT
* It must also define a doConstraint function, which performs the core actions of the constraint.
* PyConstraints use IDProperties to store custom properties for each PyConstraint instance. The scripter can choose which of these ID-Properties to expose to a user to control the behaviour of the constraint. This must be done using the Draw.PupBlock method.

Credits to Joe Eager (joeedh) for coding the original patch on which this is based. I've made heavy revisions to large parts of the patch.

For more detailed information, and some demo scripts, see the following page:
http://aligorith.googlepages.com/pyconstraints2
This commit is contained in:
2007-06-18 07:41:21 +00:00
parent 770291b9ea
commit 01e8789f3f
13 changed files with 862 additions and 37 deletions

View File

@@ -1918,6 +1918,8 @@ static PyObject *M_Constraint_TypeDict( void )
PyInt_FromLong( CONSTRAINT_TYPE_RIGIDBODYJOINT ) );
PyConstant_Insert( d, "CLAMPTO",
PyInt_FromLong( CONSTRAINT_TYPE_CLAMPTO ) );
PyConstant_Insert( d, "PYTHON",
PyInt_FromLong( CONSTRAINT_TYPE_PYTHON ) );
}
return S;
}