/usr/share/k3d/scripts/innovation.py is in k3d-data 0.8.0.3-3build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | #python
import k3d
def innovate():
global context
global k3d
# Give folks a chance to bail ...
if k3d.ui().query_message("Are you sure? Don't run this script on a real working document!", ["OK", "Cancel"]) == 2:
return
# Start recording changes for undo-purposes ...
context.document.start_change_set()
try:
# Deliver "value" ...
for node in k3d.node.lookup(context.document):
node.name = "Microsoft " + node.name + " (TM)"
# Finish recording undos ...
context.document.finish_change_set("Innovate!")
# Communicate the good news to our "customer"!
k3d.ui().message("You have been Innovated ... check your Node List Panel (it's undo-able)")
except:
context.document.cancel_change_set()
raise
innovate()
|