New operator with filepath input list of indeterminate length

   2048   4   0
User Avatar
Member
19 posts
Joined: 5月 2016
Offline
I want to create a new geometry operator. The operator will load a set of point clouds from specified files, then decorate them with a few new attributes. At present I can achieve this with a file node connected to two attribute create nodes.

I would like for the new operator to take in a list of paths as a parameter (paths to the point cloud files). The number of paths depends on the number of available point clouds. This arbitrary length input parameter is what I am struggling with.

Is it possible to create a parameter list of filepaths that I can append an arbitrary number of files to?
User Avatar
Member
53 posts
Joined: 8月 2009
Offline
There are probably several approaches here, but you might like to look at the documentation for a multiparm block. It is a special type of folder in the parameter editor that allows the creation of multiple parameters.
Peter Quint
User Avatar
Member
19 posts
Joined: 5月 2016
Offline
From the parameter input side, this is exactly what I was looking for. Thanks.

I have been trying to figure out how I can generate multiple file SOP's based on the number of inputs in the input list. If anyone has ideas on how I can achieve this, I would love to hear them.
User Avatar
Member
8538 posts
Joined: 7月 2007
Online
have a look inside of FileMerge SOP it's loading variable number of files based on the settings
or if it's just for loadig use Instance SOP, or other methods mentioned in for example this thread and its links: http://forums.odforce.net/topic/26113-point-string-attribute-to-a-file_name-in-a-file-sop/?do=findComment&comment=151477 [forums.odforce.net]
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
19 posts
Joined: 5月 2016
Offline
Perfect, thanks tamte. I simply modified a file merge instance.
  • Quick Links