Empty Object: Center images by default
authorCampbell Barton <ideasman42@gmail.com>
Fri, 6 Jul 2018 08:05:14 +0000 (10:05 +0200)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 6 Jul 2018 08:05:37 +0000 (10:05 +0200)
source/blender/blenkernel/intern/object.c

index eeb0ab22bd6852169ebeed69e2c11a6c71f4e2e5..86326655cfeb92dbc1796cdb8f48b5d88d59773a 100644 (file)
@@ -619,6 +619,9 @@ void BKE_object_init(Object *ob)
        ob->dt = OB_TEXTURE;
        ob->empty_drawtype = OB_PLAINAXES;
        ob->empty_drawsize = 1.0;
+       if (ob->type == OB_EMPTY) {
+               copy_v2_fl(ob->ima_ofs, -0.5f);
+       }
 
        if (ELEM(ob->type, OB_LAMP, OB_CAMERA, OB_SPEAKER)) {
                ob->trackflag = OB_NEGZ;