#ポリゴンメッシュの選択してる二頂点間にエッジを張るスクリプト #active_orderの欠番バグを修正したバージョン #まずは選択してる頂点の数が二点のみかどうか(二点以外は実行しない) if xshade.scene().selection_mode==2: if xshade.scene().active_shape().number_of_active_control_points==2 and xshade.scene().active_shape().type==7 and xshade.scene().is_modify_mode==True: #総頂点数をカウントして変数totalverに入れる totalver=xshade.scene().active_shape().total_number_of_control_points #選択している二頂点の頂点番号をtyouten1,tyouten2に格納 i=0 tyoutensuu=0 while(i0: if tyoutensuu==0: tyouten1=i tyoutensuu=1 else: tyouten2=i # if xshade.scene().active_shape().vertex(i).active_order==2: # tyouten2=i i=i+1 #二頂点間にすでにエッジが張られていないかチェックしてからエッジを張る totaledge=xshade.scene().active_shape().number_of_edges edgearu=0 #まだ張られてないなら0、すでに張られてるなら1 i=0 while(i