File: command_node_inspector.py

package info (click to toggle)
k3d 0.8.0.2-6
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 40,692 kB
  • ctags: 39,695
  • sloc: cpp: 171,303; ansic: 24,129; xml: 6,995; python: 5,796; makefile: 726; sh: 22
file content (22 lines) | stat: -rw-r--r-- 414 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#python

import k3d

class inspector:
	def print_node(self, Node, Level):
		message = ""
		for j in range(Level):
			message += "    "

		message += "command-node: " + Node.command_node_name()

		k3d.log.debug(message)

		for child in Node.children():
			self.print_node(child, Level + 1)

for node in k3d.command_nodes():
	inspector().print_node(node, 0)

k3d.ui().message("Output sent to the K-3D log window.")