On 16/08/2018 at 13:30, xxxxxxxx wrote:
To automate some of my modelling workflows, I am currently trying to execute some bridge commands via scripts. Specifically, I try to bridge two polygons. How can I do this with a python script? I have two objects and the selected polygons to bridge. I tried:
c4d.CallCommand(450000008) # Bridge
tool()[c4d.MDATA_BRIDGE_OBJINDEX1] = doc.SearchObject("Test2")
tool()[c4d.MDATA_BRIDGE_OBJINDEX2] = doc.SearchObject("Test")
tool()[c4d.MDATA_BRIDGE_ELEMENT1] = 0
tool()[c4d.MDATA_BRIDGE_ELEMENT2] = 0
tool()[c4d.MDATA_BRIDGE_DELETE] = True
tool()[c4d.MDATA_BRIDGE_ISO] = False
c4d.CallButton(tool(), c4d.MDATA_APPLY)
But I had no luck so far. Honestly, I have no clue what MDATA_BRIDGE_OBJINDEX1 and MDATA_BRIDGE_ELEMENT1 really should be. There is also no real documentation how this should work.