Merged changes in the trunk up to revision 46045.
[blender-staging.git] / source / blender / blenkernel / intern / object.c
index 3ffd81159140be0b4ded20e5eedaceb1664ba684..78a57534e2b332f8e9165f45ea81758be0985faa 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);
 
@@ -632,6 +634,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;