Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The files.show() statement contains a series of arguments. The first statement, FILE_PICKER_LOAD, opens the file loader. If you want to save files, replace it with FILE_PICKER_SAVE. The next part specifies the path of directory that will be opened. This path has to be adjusted to your own needs, of course. With the next argument it is possible to restrict the file list to a certain type. In this case only TIFFs and TGAs are displayed. If you want to show all files, use the  *.* notation. Finally you can apply a name to your window. It is just entered between quotation marks, like any other string.

...

Code Block
themeEclipse
languagepython
linenumberstrue
dialog = GUINodesPickerDialog.new()
nodes = dialog.show( TYPE_EMITTER | TYPE_DAEMON )

for single_node in nodes:
    scene.message(single_node.getName())

 

With TYPE_NODE it is possible to restrict the displayed nodes to a certain type:

...

TYPE_PB_EMITTER

TYPE_EMITTER

TYPE_STANDARD_MESH (or: TYPE_MESH)

TYPE_MESH 

TYPE_JOINT

TYPE_GROUP 

TYPE_REALWAVE 

TYPE_MIST 

TYPE_IDOC 

TYPE_GRID_MESH 

TYPE_GRID_DOMAIN 

TYPE_RENDERKIT_MESH 

TYPE_GB_EMITTER

TYPE_MULTIBODY  ...

ALL_TYPES 

 

The individual types are separated with a pipe character, which can be added by pressing AltGr + > (Windows/Linux) and Alt + 7 (OS X).