On 05/05/2017 at 14:39, xxxxxxxx wrote:
I have a plane and I have a sphere, and I'd like to select the plane's polygons within the sphere to apply some subdivision to the selected polygons. So far I only selected all polygons and applied the subdivision. What would be a good approach to make that selection based on the sphere?
import c4d from c4d import gui, utils #Welcome to the world of Python def main() : poly = op.GetAllPolygons() doc.StartUndo() settings = c4d.BaseContainer() # Settings [c4d.BOOLEOBJECT_TYPE] doc.AddUndo(c4d.UNDOTYPE_CHANGE, op) res = utils.SendModelingCommand(command = c4d.MCOMMAND_SUBDIVIDE, list = [op], mode = c4d.MODELINGCOMMANDMODE_POLYGONSELECTION, bc = settings, doc = doc) doc.EndUndo() c4d.EventAdd() if __name__=='__main__': main()