Merging fluidcontrol to trunk from rev16649 fluidcontrol branch. Code provided by...
[blender-staging.git] / source / blender / blenkernel / intern / object.c
index 3ed169ff77daf04df2446cbab7ec84363d85e64a..5d352c1e11db51f4aeb7a4cb61ab3383c838ee5c 100644 (file)
@@ -269,7 +269,6 @@ void free_object(Object *ob)
                MEM_freeN(ob->pd);
        }
        if(ob->soft) sbFree(ob->soft);
-       if(ob->fluidsimSettings) fluidsimSettingsFree(ob->fluidsimSettings);
        if(ob->gpulamp.first) GPU_lamp_free(ob);
 }
 
@@ -748,6 +747,9 @@ void *add_lamp(char *name)
        la->atm_extinction_factor = 1.0;
        la->atm_distance_factor = 1.0;
        la->sun_intensity = 1.0;
+       la->skyblendtype= MA_RAMP_ADD;
+       la->skyblendfac= 1.0f;
+
        curvemapping_initialize(la->curfalloff);
        return la;
 }
@@ -960,7 +962,8 @@ Object *add_only_object(int type, char *name)
        ob->anisotropicFriction[0] = 1.0f;
        ob->anisotropicFriction[1] = 1.0f;
        ob->anisotropicFriction[2] = 1.0f;
-       ob->gameflag= OB_PROP;
+       ob->gameflag= OB_PROP|OB_COLLISION;
+       ob->margin = 0.0;
 
        /* NT fluid sim defaults */
        ob->fluidsimFlag = 0;
@@ -1213,15 +1216,6 @@ Object *copy_object(Object *ob)
        }
        obn->soft= copy_softbody(ob->soft);
 
-       /* NT copy fluid sim setting memory */
-       if(obn->fluidsimSettings) {
-               obn->fluidsimSettings = fluidsimSettingsCopy(ob->fluidsimSettings);
-               /* copying might fail... */
-               if(obn->fluidsimSettings) {
-                       obn->fluidsimSettings->orgMesh = (Mesh *)obn->data;
-               }
-       }
-
        copy_object_particlesystems(obn, ob);
        
        obn->derivedDeform = NULL;