Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2009-02-25 17:50:40 +0300
committerTon Roosendaal <ton@blender.org>2009-02-25 17:50:40 +0300
commitc3078c94fb48cc1376b170bb3c7ce1f2e14fa2f3 (patch)
tree0a3764a70ec84e373ae5e40889909bedba373f12 /source/blender/editors/object
parentc0a6cb950d683f5ef35031cd250d3e8b79f5609e (diff)
2.5
SHIFT+A add armature didn't add a bone yet. :)
Diffstat (limited to 'source/blender/editors/object')
-rw-r--r--source/blender/editors/object/object_edit.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c
index 6e2b38acd8d..cc07c334aec 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -582,6 +582,8 @@ void OBJECT_OT_text_add(wmOperatorType *ot)
static int object_add_armature_exec(bContext *C, wmOperator *op)
{
Object *obedit= CTX_data_edit_object(C);
+ View3D *v3d= CTX_wm_view3d(C);
+ RegionView3D *rv3d= NULL;
int newob= 0;
if ((obedit==NULL) || (obedit->type != OB_ARMATURE)) {
@@ -591,10 +593,12 @@ static int object_add_armature_exec(bContext *C, wmOperator *op)
}
else DAG_object_flush_update(CTX_data_scene(C), obedit, OB_RECALC_DATA);
- //nu= add_nurbs_primitive(C, RNA_enum_get(op->ptr, "type"), newob);
- //editnurb= curve_get_editcurve(CTX_data_edit_object(C));
- //BLI_addtail(editnurb, nu);
+ if(v3d)
+ rv3d= CTX_wm_region(C)->regiondata;
+ /* v3d and rv3d are allowed to be NULL */
+ add_primitive_bone(CTX_data_scene(C), v3d, rv3d);
+
/* userdef */
if (newob && (U.flag & USER_ADD_EDITMODE)==0) {
ED_object_exit_editmode(C, EM_FREEDATA);