Merged changes in the trunk up to revision 36551.
[blender.git] / source / blender / blenkernel / intern / object.c
index cbe0a959f1587e6f55fbed77cbf693b627621487..15c4028478cab83b7ce748c4deeeb6a09018cf9f 100644 (file)
 
 #include "GPU_material.h"
 
+#include "FRS_freestyle.h"
+
 /* Local function protos */
 static void solve_parenting (Scene *scene, Object *ob, Object *par, float obmat[][4], float slowmat[][4], int simul);
 
@@ -589,6 +591,14 @@ void unlink_object(Object *ob)
                                        }
                                SEQ_END
                        }
+
+                       {
+                               SceneRenderLayer *srl;
+
+                               for (srl= sce->r.layers.first; srl; srl= srl->next) {
+                                       FRS_unlink_target_object(&srl->freestyleConfig, ob);
+                               }
+                       }
                }
 
                sce= sce->id.next;