drock019 Posted July 26, 2024 Share Posted July 26, 2024 Hi, I'm trying to create a marionette script that will allow me to select a choice from a list and only produce the item selected via the list. The example I'm showing would be 3 different rectangles. I've put them into an ordered list. I've created a popup and used it as an index. when i run the script it proceeds to create all 3 objects rather than just the indexed item. Is there something else that I'm missing? Thank you Derek Quote Link to comment
FranAJA Posted July 30, 2024 Share Posted July 30, 2024 (edited) You are just creating a simple list and selecting an handle but the rectangles at the beginning will be created anyway. You should tell to the script how to filtering in some way what you want and what you do not want. You can create a IF sequence, or simply duplicating the rectangle you want and delete the others. Edited July 30, 2024 by FranAJA Quote Link to comment
drock019 Posted July 31, 2024 Author Share Posted July 31, 2024 Thank you, I was able to get it to work by deleting and duplicating. While this is working it's not ideal coding (drawing objects just to delete them). I think you are right and the items need to be filtered some way. I'm trying to understand the IF node more but I'm having a hard time understanding how I can create a test that is not only "true or false". Thanks again Derek Quote Link to comment
drock019 Posted July 31, 2024 Author Share Posted July 31, 2024 Ok, I was able to do more test and got it to work. I think my issue was that I was thinking of my choices as multiple nested 'if-then-else' statements rather than just a bunch of different 'If' nodes. I applied this method to a different script and now it only passes only the information selected and draws only 1 of the object. I think this might be the cleaner solution. I'm open to any further suggestions to keep my script from becoming overly bloated. Thanks for your help and direction. Derek 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.