Added location and rotation operator properties for adding objects. The Align to View boolean

is now just used to set the rotation property value during invoke.

This removes some reliance on 3d view info for non-interactive use, and also lets you specify
new object's locations/rotations explicitly when calling from Python.
This commit is contained in:
2009-12-28 04:09:46 +00:00
parent 860e46082f
commit dbf295b904
5 changed files with 181 additions and 112 deletions

View File

@@ -475,11 +475,13 @@ static void txt_add_object(bContext *C, TextLine *firstline, int totline, float
Base *base;
struct TextLine *tmp;
int nchars = 0, a;
float rot[3] = {0.f, 0.f, 0.f};
obedit= add_object(scene, OB_FONT);
base= scene->basact;
ED_object_base_init_from_view(C, base, 1); /* seems to assume view align ? TODO - look into this, could be an operator option */
ED_object_base_init_transform(C, base, NULL, rot); /* seems to assume view align ? TODO - look into this, could be an operator option */
where_is_object(scene, obedit);
obedit->loc[0] += offset[0];