• Welcome to World Machine Community. Please login or sign up.
October 17, 2019, 03:45:43 am


Read the Development Diary for an inside look at World Machine's progress!

Sharing (external) parameters among multiple devices?

Started by sfriedberg, August 20, 2014, 06:11:55 pm

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


I'm considering a plugin (or family of related plugins) with a potentially large list of parameters.  The majority of these parameters should be set consistently across instances of the plugin (family), and ideally should be loadable/storable to a file.

Obviously, it's possible to go into each device instance and load the desired configuration.  I'm curious if there is a PDK-supported way to share this data across multiple device instances without the explicit loading step, either completely implicitly behind the scenes, or explicitly in layout by wiring each device to a "configuration master" device.  I'm looking for something more structured than simply stuffing data into a global variable.


Hi there,

First, the bad news:

There's currently no sanctioned, official way to do this in the PDK. So any solution will be a roll-your-own, most likely in code rather than expressed in the WM device world.

The best option I can see is to have your family of devices share a singleton that holds the parameter information that should be held in common. Note that since this will be shared across all device instances, all access mechanisms must be thread-safe as WM may build your devices on any available build thread. You could still have a "Config Master" device that is allowed to set these common globals, while all other devices must only read them.

Honestly however, the ideal scenario is to express this dependency within the World Machine device graph. There is no mechanism to do this right now. This ability (creating "structs" or "arrays" of data packets) is something that I am strongly considering adding as an infrastructure feature, as it can dramatically simplify a few things I have in mind to create in the future, and also would help with this situation (your exhaustive set of parameters could be bundled from the config master into a single "cable" and hooked to each of your devices).
-- Stephen Schmitt
- Creator of World Machine


Quote from: Remnant on August 20, 2014, 06:25:25 pmyour exhaustive set of parameters could be bundled from the config master into a single "cable" and hooked to each of your devices
Oh, yeah, that would be lovely.   :D

Quick Reply

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Note: this post will not display until it's been approved by a moderator.

Please leave this box empty:
Type the letters shown in the picture
Listen to the letters / Request another image

Type the letters shown in the picture:

Shortcuts: ALT+S save/post or ALT+P preview