Guest unlimited Posted March 12, 2016 Share Posted March 12, 2016 If anyone can help lift the veil on this it would be much appreciated. In the attached file I have been looking at the Choice Item node which contains a hardcoded list and then presents that list as a pop up list in the PIO. I would like to modify this Choice Item node to create an input port to take the list values from the preceding List node ( rather than the hard coded list that it contains currently ) - my current attempt creates an error when run (also included in the file). Many thanks, Martyn Quote Link to comment
Patrick Winkler Posted March 12, 2016 Share Posted March 12, 2016 (edited) Hi unlimited, I tried the same and didn't succed as well. The problem is that list has the default value within the class Params defintion. @Marionette.NodeDefinition class Params(metaclass = Marionette.OrderedClass): this = Marionette.Node( 'Choice Item' ) list = Marionette.PortInLists ( 9999 ) list.SetDescription( "The first input" ) print ( 'A', list.value) # will print the default value 9999 def RunNode(self): print ('B', self.Params.list.value) # will print the incoming values Edited March 12, 2016 by Patrick Winkler Quote Link to comment
Guest unlimited Posted March 12, 2016 Share Posted March 12, 2016 Hi Patrick, Not sure I follow - are you offering me a solution or saying you are seeing the same problem? Thanks Quote Link to comment
Marionette Maven Marissa Farrell Posted March 12, 2016 Marionette Maven Share Posted March 12, 2016 This isn't currently possible because the OIP controls are defined before runtime. We can't dynamically refresh the OIP controls within the script, unfortunately. I can't remember if this limitation is a hard limit or if we can find a workaround at a later time, but I'm going to guess it will be this way for at least another version. Quote Link to comment
Guest unlimited Posted March 14, 2016 Share Posted March 14, 2016 OK thanks Marissa. So, other than using the print node or the script warning dialogue, is there any way of showing the list generated by my script in any sort of dialogue ( even if its just read only )? Thanks, Martyn Quote Link to comment
Marionette Maven Marissa Farrell Posted March 14, 2016 Marionette Maven Share Posted March 14, 2016 Are you aware of Debug Mode? Many users aren't completely satisfied with it in its current state, but to use it, have the Marionette tool selected and in the mode bar activate the Bug icon. To use it, you can click on a wired output and it will activate a dialog box with the data that flows through that wire. We're trying to find a more user friendly way to run it - right now, each time you select a wire, the entire network is rerun (annoying) but it provides at least another method of seeing what's flowing through your network. Quote Link to comment
Guest unlimited Posted March 14, 2016 Share Posted March 14, 2016 Hi Marissa, Yes I am aware of the Debug, and I can see how my question was misleading but I was looking for a way of showing a shortlist of items from a larger list, generated at runtime, in order for the user to choose from. Any thoughts of any way to do this? Quote Link to comment
Marionette Maven Marissa Farrell Posted March 14, 2016 Marionette Maven Share Posted March 14, 2016 The closest I can think of would be to use the filter node to filter items from a list that meet a certain requirement... But even then, the user wouldn't be able to choose one the way that I think you're asking for. There's not currently a way that I'm aware of to interrupt the script to have user selection. There might be some hope if using dialog boxes, but I haven't explored that. Quote Link to comment
Guest unlimited Posted March 14, 2016 Share Posted March 14, 2016 OK thanks, will have a look. Martyn Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.