diff options
author | Ton Roosendaal <ton@blender.org> | 2009-01-19 19:54:41 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2009-01-19 19:54:41 +0300 |
commit | bc63213844e723b0c552da446fb7fa9f9e7ea5f6 (patch) | |
tree | 433519ee3526536032e62226a058f6ec4fd17a1a /source/blender/editors/armature | |
parent | 9b049d89a1bc36534875c67e097415e034d0624d (diff) |
2.5
View3D has been split now in a local part (RegionView3D) and a
per-area part (old View3D). Currently local is:
- view transform
- camera zoom/offset
- gpencil (todo)
- custom clipping planes
Rest is in Area still, like active camera, draw type, layers,
localview, custom centers, around-settings, transform widget,
gridlines, and so on (mostly stuff as available in header).
To see it work; also added new feature for region split,
press SHIFT+ALT+CTRL+S for four-split.
The idea is to make a preset 4-split, configured to stick
to top/right/front views for three views.
Another cool idea to explore is to then box-clip all drawing
based on these 3 views.
Note about the code:
- currently view3d still stores some depricated settings, to
convert from older files. Not all settings are copied over
though, like custom clip planes or the 'lock view to object'.
- since some view3d ops are now on area level, the operators
for it should keep track of that.
Bugfix in transform: quat initialize in operator-invoke missed
one zero.
Als brought back GE to compile for missing Ipos and channels.
Diffstat (limited to 'source/blender/editors/armature')
-rw-r--r-- | source/blender/editors/armature/editarmature.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c index 5a751236e6e..67b8f211eaa 100644 --- a/source/blender/editors/armature/editarmature.c +++ b/source/blender/editors/armature/editarmature.c @@ -2023,7 +2023,7 @@ static EditBone *add_editbone(Object *obedit, char *name) return bone; } -static void add_primitive_bone(Scene *scene, View3D *v3d, short newob) +static void add_primitive_bone(Scene *scene, View3D *v3d, RegionView3D *rv3d, short newob) { Object *obedit= scene->obedit; // XXX get from context float obmat[3][3], curs[3], viewmat[3][3], totmat[3][3], imat[3][3]; @@ -2035,7 +2035,8 @@ static void add_primitive_bone(Scene *scene, View3D *v3d, short newob) Mat4Invert(obedit->imat, obedit->obmat); Mat4MulVecfl(obedit->imat, curs); - if ( !(newob) || (U.flag & USER_ADD_VIEWALIGNED) ) Mat3CpyMat4(obmat, v3d->viewmat); + if ( !(newob) || (U.flag & USER_ADD_VIEWALIGNED) ) + Mat3CpyMat4(obmat, rv3d->viewmat); else Mat3One(obmat); Mat3CpyMat4(viewmat, obedit->obmat); @@ -2058,6 +2059,7 @@ static void add_primitive_bone(Scene *scene, View3D *v3d, short newob) void add_primitiveArmature(Scene *scene, View3D *v3d, int type) { + RegionView3D *rv3d= NULL; // XXX get from context Object *obedit= scene->obedit; // XXX get from context short newob=0; @@ -2071,7 +2073,7 @@ void add_primitiveArmature(Scene *scene, View3D *v3d, int type) /* If we're not the "obedit", make a new object and enter editmode */ if (obedit==NULL) { add_object(scene, OB_ARMATURE); - ED_object_base_init_from_view(scene, v3d, BASACT); + ED_object_base_init_from_view(NULL, BASACT); // XXX NULL is C obedit= BASACT->object; where_is_object(scene, obedit); @@ -2082,7 +2084,7 @@ void add_primitiveArmature(Scene *scene, View3D *v3d, int type) } /* no primitive support yet */ - add_primitive_bone(scene, v3d, newob); + add_primitive_bone(scene, v3d, rv3d, newob); countall(); // flushes selection! @@ -4815,7 +4817,7 @@ void generateSkeletonFromReebGraph(Scene *scene, ReebGraph *rg) } dst = add_object(scene, OB_ARMATURE); - ED_object_base_init_from_view(scene, NULL, scene->basact); + ED_object_base_init_from_view(NULL, scene->basact); // XXX NULL is C obedit= scene->basact->object; /* Copy orientation from source */ |