On 04/05/2015 at 12:10, xxxxxxxx wrote:
Damn, it is not working :-(
Here is my code:
**
bc=c4d.BaseContainer()
the_trunk is a polygonal object created inside my code
bc[c4d.MDATA_BRIDGE_OBJINDEX1] = the_trunk
result[0> is a polygonal object that results from a previous SendModelingCommand
bc[c4d.MDATA_BRIDGE_OBJINDEX2] = result[0]
selection is the polygon index to bridge from, in the trunk
bc[c4d.MDATA_BRIDGE_ELEMENT1] = selection
the second to last polygon from result[0>
bc[c4d.MDATA_BRIDGE_ELEMENT2] = polygon_count-1
idx1[index1> points to the point in the_trunk that is nearer (this point is part of the polygon that is referenced in selection
bc[c4d.MDATA_BRIDGE_ELEMENT3] = idx1[index1]
idx2[index2> points to the point in result[0> that is nearer (this point is part of the polygon that is referenced by polygon_count-1
bc[c4d.MDATA_BRIDGE_ELEMENT4] = idx2[index2]
bc[c4d.MDATA_BRIDGE_DELETE] = True
select the polygons in the_trunk and result[0>
trunk_select.DeselectAll()
trunk_select.Select(selection)
branch_select.DeselectAll()
branch_select.Select(polygon_count-1)
worked=utils.SendModelingCommand(command=c4d.ID_MODELING_BRIDGE_TOOL,list=[the_trunk,result[0]],mode=c4d.MODELINGCOMMANDMODE_POLYGONSELECTION,bc=bc,doc=the_trunk.GetDocument())
this ALWAYS prints False :-(
print worked
**
What could I be doing wrong?