Merged changes in the trunk up to revision 42116.
[blender.git] / source / blender / blenkernel / intern / object.c
index 0b0a0039501f6dc7f0f936103dd3845e2c608bfa..d0858ea032a304c90244a49f21872ae9772a5864 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);
 
@@ -602,6 +604,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;