[Closed] Open rollout in modifier panel?
Why do I always find these odd ones.
So I have a scripted modifier that will read the rollouts from another modifier or custom attributes, right now I’m just putting local array variable that holds all the rollouts, so I get that and then use addRollout to display them in the modifier. However they open in the Utilities Panel instead of the modifier panel. Is this some sort of scope issue? If in the modifier that should be displaying them I create a rollout in a function and use addRollout (callFunction()) it will open in the modifier. But if I get the rollouts from some where else and try and display them they open in the Utils panel. Can any one think of a way to force the rollouts to open in the modifier?
Looks like rollouts are in some special kind of scope as all sorts of things are failing.
When I get a rollout from another source like a scripted plugin and use addRollouts and it open in the Utilities panel the rollout works as it should and can call the functions that were local to the plugin as it did before.
When I try to open the same rollout in a rolloutFloater or createDialog it fails to see the local functions to the scripted plugin. How ever if in a scripted plugin, from a function in it I remove the rollouts and then launch them with a createDialog or rolloutFloater it works as it should. I do this all the time so that I can float a UI from a scripted modifier so you can keep using the modifier panel for other things.
Any one know what is going on here? I was hopping to have a single modifier or floating tool that would collect all the rollouts from the plugins and ca defs and display them.
Even stranger again. If in one of the plugins where the rollouts are I place a function that just returns an array of rollouts instead of using just a local array I can call createDialog (thePLugin.theRollouts()) and it works and the rollouts can still see the scope of the plugin they were created in. However I still can’t get them to open in another modifier this way as they always get forced to the Utilities panel. I’ll see if I can come up with some test code soon so that I can post it.
Afaik, addRollout only works in conjunction with scripted utilities and rollout floaters. Have you tried using a subRollout control inside the scripted modifier and adding the rollouts to this? I don’t think there’s another way to get them to show up in your scripted modifier.
Martijn
Yes I have and it wasn’t a good solution either, still had scope problems as well.
Thanks