diff options
author | Jiri Hnidek <jiri.hnidek@tul.cz> | 2009-07-29 16:35:09 +0400 |
---|---|---|
committer | Jiri Hnidek <jiri.hnidek@tul.cz> | 2009-07-29 16:35:09 +0400 |
commit | f75005c2a89f6cc5f1bdac33e26341a14ed92888 (patch) | |
tree | f83839e709b1167ce9eac42dc8acacd2ec2943cb /source/blender/editors/transform | |
parent | b3d07534679e243759892f2a1206dc8756a1c004 (diff) |
2.5 MetaBalls
- It is possible to work with MetaBalls in edit mode now
- Added basic UI to the button window (feel free to change it :-))
- Header menus should work
- Undo & redo should work
- Removed global variable editelems and lastelem (moved it to the MetaBall struct)
- All tools from old editmball.c was converted to the operators
- Added lastelem to the RNA
- Experimental: mb->editelems is only pointer at mb->elems or NULL (depends on Mode). ListBase of MetaElems is not duplicated in edit mode.
Tested with scons at Linux and mac OS X
TODO:
- Recalc data after Undo or Redo
- Solve issue with basic MetaBall and Python UI script (only base MetaBall object influence Wiresize and Threshold)
- Fix orientation of manipulator in "Normal mode"
Diffstat (limited to 'source/blender/editors/transform')
-rw-r--r-- | source/blender/editors/transform/transform_conversions.c | 8 | ||||
-rw-r--r-- | source/blender/editors/transform/transform_manipulator.c | 5 |
2 files changed, 5 insertions, 8 deletions
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index c14b8c8a646..40e133f554f 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -1217,8 +1217,7 @@ static void createTransArmatureVerts(bContext *C, TransInfo *t) static void createTransMBallVerts(bContext *C, TransInfo *t) { - // TRANSFORM_FIX_ME -#if 0 + MetaBall *mb = (MetaBall*)t->obedit->data; MetaElem *ml; TransData *td; TransDataExtension *tx; @@ -1227,7 +1226,7 @@ static void createTransMBallVerts(bContext *C, TransInfo *t) int propmode = t->flag & T_PROP_EDIT; /* count totals */ - for(ml= editelems.first; ml; ml= ml->next) { + for(ml= mb->editelems->first; ml; ml= ml->next) { if(ml->flag & SELECT) countsel++; if(propmode) count++; } @@ -1244,7 +1243,7 @@ static void createTransMBallVerts(bContext *C, TransInfo *t) Mat3CpyMat4(mtx, t->obedit->obmat); Mat3Inv(smtx, mtx); - for(ml= editelems.first; ml; ml= ml->next) { + for(ml= mb->editelems->first; ml; ml= ml->next) { if(propmode || (ml->flag & SELECT)) { td->loc= &ml->x; VECCOPY(td->iloc, td->loc); @@ -1285,7 +1284,6 @@ static void createTransMBallVerts(bContext *C, TransInfo *t) tx++; } } -#endif } /* ********************* curve/surface ********* */ diff --git a/source/blender/editors/transform/transform_manipulator.c b/source/blender/editors/transform/transform_manipulator.c index 78837b3b0bb..3366f8d72d7 100644 --- a/source/blender/editors/transform/transform_manipulator.c +++ b/source/blender/editors/transform/transform_manipulator.c @@ -301,11 +301,10 @@ int calc_manipulator_stats(const bContext *C) } } else if(obedit->type==OB_MBALL) { - /* editmball.c */ - ListBase editelems= {NULL, NULL}; /* XXX */ + MetaBall *mb = (MetaBall*)obedit->data; MetaElem *ml, *ml_sel=NULL; - ml= editelems.first; + ml= mb->editelems->first; while(ml) { if(ml->flag & SELECT) { calc_tw_center(scene, &ml->x); |