# Calling a function on duplicating

I am wondering if it is possible to call a Python function inside a Blender when an object with a name that starts with foo_ gets duplicated? Thanks in advance.

• You are probably looking for this: blender.stackexchange.com/a/19669/7777 You just need to watch the number of objects inside a scene with this watcher. – Jaroslav Jerryno Novotny Jan 13 '16 at 10:11
• I saw that answer, it would work, but i am new in python, so as I understand all i need to change is add_watcher() line, but how to watch the change in number of objects in scene? – Vlad Ovaho Jan 13 '16 at 11:08