Can someone point me the direction to create a mel script, that would allow me to get the selection objects ( mostly cubes ), and create a 4 new planes around each selected object. Also, is it possible to know if the created planes are aligned to the Z or X axis ( because I need to set some attributes based on that ) ?
i would start by finding the bounding box of your object, then creating a new poly plane at the midpoint of each side of the bounding box. then its just a matter of rotating each plane so it aligns along the correct axis.
QUOTE(rgkovach @ 04/14/09, 09:09 AM) [snapback]305734[/snapback] i would start by finding the bounding box of your object, then creating a new poly plane at the midpoint of each side of the bounding box. then its just a matter of rotating each plane so it aligns along the correct axis.
You can actually specify the facing direction of the plane when you create it. That'll save you a step of having to rotate and freeze things then too. Should be the -axis flag.
QUOTE(molemansd7 @ 04/14/09, 03:14 PM) [snapback]305739[/snapback] You can actually specify the facing direction of the plane when you create it. That'll save you a step of having to rotate and freeze things then too. Should be the -axis flag.
Well, so far I can only get the objects boundingbox. I have no idea of how to make a new poly plane and to set its positions. Can you show me some example to do that? I am still a newbie with mel scripting.
Theres actually a easier way to do this, what you do is a strategic split and polycipoff on a duplicate obejct if you must. Thisway even if you cube was slanted it would work
QUOTE(Joojaa @ 04/15/09, 10:12 AM) [snapback]305818[/snapback] Theres actually a easier way to do this, what you do is a strategic split and polycipoff on a duplicate obejct if you must. Thisway even if you cube was slanted it would work
Well, I thought about that, but this is for my collision system and right now, it only works with Axis aligned planes. So, for now, this won't do it for me. But hey it is working now.