make gui backwards compatible with this weeks softbody blend files
[blender.git] / source / blender / src / buttons_logic.c
index dcb0f8742106d821b2e565dc0d338c9dc8756fd7..58fb2d456b954a5c9a7db0d4b9a6c59269c1bf82 100644 (file)
@@ -2983,6 +2983,10 @@ static uiBlock *advanced_bullet_menu(void *arg_ob)
        Object *ob = arg_ob;
        short yco = 105, xco = 0;
 
+       /* create a BulletSoftBody structure if not already existing */
+       if ((ob->body_type & OB_BODY_TYPE_SOFT) && !ob->bsoft)
+               ob->bsoft = bsbNew();
+
        block= uiNewBlock(&curarea->uiblocks, "advanced_bullet_options", UI_EMBOSS, UI_HELV, curarea->win);
        /* use this for a fake extra empy space around the buttons */
        uiDefBut(block, LABEL, 0, "", -5, -10, 255, 140, NULL, 0, 0, 0, 0, "");