[Bf-committers] Transform Whitepaper
Ton Roosendaal
bf-committers@blender.org
Thu, 11 Mar 2004 18:36:14 +0100
Hi Martin,
Finally my todolist gets to the level I'm here! :)
Find initial comments mixed in below:
> The main goal of redoing the transform code is of
> course to clean and split the nice 1600 lines of
> crammed up code and make it more easy to add new
> functionality (whether it's a new transformation mode,
> new constraining, etc).
I would like to see added some way to have Python playing with it. And
of course, enabling the much wanted 'transform 3d widget'
(manipulators).
That would mean: the system has to become event based, and not with a
sub-loop anymore.
> Transform
> |
> |- Parsing the mode
> |
> |- Initialising Trans_Constraint with mode arguments (if needed)
> |
> |- Running all the pretransform code (trans init, centre, ...)
> |
> |- Actual transformation
> | |- Mouse Input
> | |- Keyboard Input
> | |- Constraint
> | |- Applying the transformation
> | |- Screen Update
> |
> |- After trans code
In principle this already has the structure I mean, but it could be
made more explicit.
From event based perspective it could be like:
Start Transformer engine
|- Parsing the mode
|- Initialising Trans_Constraint with mode arguments (if needed)
|- Running all the pretransform code (trans init, centre, ...)
|
|- maybe: some callback to verify if data operated on is still valid
|-
|- end with: setting up some 'transform handler' which can be called
from event loops
Handle Transformer
|- mouse input
|- keyboard input
|- constraint
|- etc
Close Transformer
|- after trans code
None of these three chunks will have subloops. The old 'transform()'
function then can just still have a subloop calling the 'handler', but
python and a 3D widget then can use it as event based system.
To look at is:
- where does 'transformer' data reside, in a Blender SpaceWindow, in a
scene?
- what if 2 transformers operate simulteneously (could work!)
And also... the methods how IpoKey currently works with it is very
complex...
-Ton-
------------------------------------------------------------------------
--
Ton Roosendaal Blender Foundation ton@blender.org
http://www.blender.org