Merged changes in the trunk up to revision 36408.
[blender.git] / source / blender / blenkernel / intern / object.c
index 7e85fa5bf38fd7db3958d48984362b3bb7c5fe88..2721d02eab612b0f6e3fc33116a2f78b6628d429 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;