Python / EndOpenDocument triggered on paste?

Hi,

I wonder why ?

Run the script which register a dummy event handler on EndOpenDocument.
Create an object (e.g. circle)
Cut and paste it.
Dummy event handler is triggered and prints its name.

If it is normal, which I doubt or don’t understand, how can I know it is from a paste command ?

I load stuff with scripts when a doc is open.
I don’t want to do it each time I paste something.

Regards

eod_triggered_on_paste.py (726 Bytes)

1 Like

Hi @lahos,

This is expected, as Paste is a file import procedure.

– Dale

Ok.

A stream more than a file I guess.

But how can I have an event handler which detects a “real .3dm file” has just been loaded ?

Thanks

No, not a stream.

Bingo !

Thank you.