PDA

View Full Version : Modifier rollout


heavenlypictures
07-06-2011, 05:46 PM
Hi everybody!
I created a scripted plugin modifier. This modifier is available for editable poly, and for splines too. But need different rollout to each object type. I tried to check the base object type with "if-else" and then add the rollouts, but defining rollout only available inside the main plugin clause. How can I make different rollouts for different type base objects. Or is there any filter for modifiers?

Thanks

JHN
07-07-2011, 08:40 AM
You could make a main rollout in the body of the scripted plugin with just a subRollout element in it, stretched to fit the UI, then load the subrollouts with a clause. Not as nice as you'd want it, but a possibilty.

-Johan

heavenlypictures
07-07-2011, 09:41 AM
Yes, it is not so nice, but thanks. But I found another solution: I made a main modifier that is visible on the modifiers list, and 2 other modifiers that are invisible. The main modifier checks the base object's type, and add one of the invisible modifiers that fit the base object type, and delete the main modifier.

JHN
07-07-2011, 04:32 PM
Creative solution, I like it!

-Johan

denisT
07-07-2011, 05:53 PM
I found another solution: I made a main modifier that is visible on the modifiers list, and 2 other modifiers that are invisible. The main modifier checks the base object's type, and add one of the invisible modifiers that fit the base object type, and delete the main modifier.
As a script developer I really don't like this solution. When I create and assign any modifier I expect to have its instance... Why do you not want to simply make two different modifiers (one for poly and one for spline)? It's an absolutely usual practice: Edit Mesh and Edit Poly, Turn to Mesh and Turn to Poly, Mesh Select and Poly Select, etc.

CGTalk Moderation
07-07-2011, 05:53 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.