Merged changes in the trunk up to revision 34193.
[blender.git] / source / blender / blenkernel / intern / object.c
index c943b2fcfed60f83d782c48b753cc8a1d393ab0d..1ebbdf78f61011faf1e3ed4d61be6258c31bd04b 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);
 
@@ -578,6 +580,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;