From 029bbb3489c247252491a6ab9ba5a231513f86df Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Wed, 14 Jan 2009 19:26:11 +0000 Subject: 2.5 Editmesh: add primitive basics back. Had to clean up a load of crap there... but it's sorta in control, so I think Shul can pick it up again. Test: ctrl+0 adds plane, or ctrl+9 adds grid. Notes for Shul: - i've added a transform function, which gets correctly passed on to the add_prim function, should work for all object transforms. Only the code inside add_prim might be needed to check (it uses 4x4 mat now, not a 3x3) - The old code with buttons has been ifdeffed out, check for user input and make it rna properties, which get read in the exec(), and handed over to the add_prim. Set them default now to the values from old buttons. - Operator naming is preferred lower case, I gave this a new name. - check a bit on formatting code, but don't use the old code as example! Look also at ED_keymap_mesh() for example. --- source/blender/editors/mesh/editmesh_lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/mesh/editmesh_lib.c') diff --git a/source/blender/editors/mesh/editmesh_lib.c b/source/blender/editors/mesh/editmesh_lib.c index de6cd14b453..93de720d4f6 100644 --- a/source/blender/editors/mesh/editmesh_lib.c +++ b/source/blender/editors/mesh/editmesh_lib.c @@ -1357,7 +1357,7 @@ short extrudeflag_vert(Object *obedit, EditMesh *em, short flag, float *nor) short sel=0, del_old= 0, is_face_sel=0; ModifierData *md; - if(em) return 0; + if(em==NULL) return 0; md = obedit->modifiers.first; -- cgit v1.2.3