Merged changes in the trunk up to revision 51853.
[blender-staging.git] / source / blender / blenkernel / intern / object.c
index 5b211d7f09aa113c452d37cd6b2cfd85388c7027..535400014976ad09760b1c230b6b0667aab7b2f7 100644 (file)
 
 #include "GPU_material.h"
 
+#include "FRS_freestyle.h"
+
 /* Local function protos */
 float originmat[3][3];  /* after BKE_object_where_is_calc(), can be used in other functions (bad!) */
 
@@ -630,6 +632,14 @@ void BKE_object_unlink(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;