BLENDER_v241REND 1SRt:mWSRanimationRh>>DȸSQPDATARnP;DATAP;n;RDATA;n;P;DATA;n(<;DATA(<np<;DATAp<n<(<DATA<n=p<DATA=nH=<DATAH=n==xDATA=n=H=xDATA=n >=DATA >nh>=xDATAh>n >DATA>o>P;;DATA>o@?>R;DATA@?o?>R(<DATA?o?@?;p<DATA?o@?(<p<DATA@o`@?P;<DATA`@o@@;=DATA@o@`@<=DATA@o8A@(<H=DATA8AoA@p<H=DATAAoA8A<=DATAAoBA==DATABoXBA<=DATAXBoBB= >DATABoBXB= >DATABo0CB(<=DATA0CoxCBH= >DATAxCoC0C=h>DATACoDxCp<h>DATADoC >h>DATAȸSq`MSR(<p<;LPD0RDATAPD^0R333? DdCLzաDp1AXCC(BDC??DATAT0R`PD333? /9DATA`MSqXEȸS<P;;=DATAXEqG`MSH= >h>p<p==o?yyyPNRDATANYXF333?l???'@g ?????%g '@?pop=ણ=o!>)9ѾZD?-A5 ?Ae '@?p==o????'@g ???-A B? #<Cg ?'@DATA(XF]RN333?lzC̽̌?zC@EE #< #<`jFzD OBzC̽̌?DATATR`XF333?l/9DATAGqKXE=<= >?PC@AHMwwwxyHcRDATAHYcR333?D?2ѕ70`U>9]z;]z?U>\m7/R??v~ʰ2ѮU>;]z?0=]zU>g=5Cz@??J37ѕ7td#?z?9]z?q?@sVU]w fOA/RAj? i@^)=J>aؾtBv֟O>Kq>|Ac(@?PC@AHM?2ѕ70`U>9]z;]z?U>\m7/R?!G?C!zQ}2p=A B? #<Chi@DATATcR`H333?D/9DATAKqQG(<= >H=| m=>o?wwwxPLODATALYO333????t????3??t?| m=>o=:>?q=A5{@t?| m=>o????t????p=A B? #<Ct??DATATO`L333?/9DATAQqK >==h>??PףyyyRHVDATA(R]`S333? zC̽̌?zC@GG #< #<`jFzD OBzC̽̌?DATA`SYHVR333? ??? ???? A???PA A!O?j?}GCHB? A B? #<CDATATHV``S333? /9SRtWmP:SRmodlisationxX[H[8__УPDATAxXnXDATAXnYxXDATAYnPYXDATAPYnYYDATAYnYPYDATAYn(ZYDATA(ZnpZYDATApZnZ(ZDATAZn[pZ0DATA[nZ0DATAH[o[XYDATA[o[H[xXPYDATA[o \[xXYDATA \oh\[PYYDATAh\o\ \YYDATA\o\h\X(ZDATA\o@]\YpZDATA@]o]\(ZpZDATA]o]@]YZDATA]o^]YZDATA^o`^](Z[DATA`^o^^pZ[DATA^o^`^Z[DATA^o8_^YpZDATA8_o^Y(ZDATA_qȌxXYYPY^<>o?LP@MR3XPOVxDATAPOVpPROutputRender>DATAPRpx~RPOVRenderRender@>DATAx~Rp`PRAnimRender>DATA`pXax~RFormatRender>DATAXap0b`Link and MaterialsEditing>DATA0bpcXaCameraEditing@>DATAcpc0bPreviewWorld>DATAcpdcWorldWorld@>DATAdpecAnim settingsObject>DATAephfdDrawObject@>DATAhfp@geConstraintsObject>DATA@gphhfPreviewTexture>DATAhph@gRadio RenderRadio>DATAhpihRadio ToolRadio@>DATAipjhPreviewMaterial>DATAjpxkiMaterialMaterial@>DATAxkpPljShadersMaterial>DATAPlp(mxkMirror TranspMaterial>xkDATA(mpnPlTextureMaterial>DATAnpn(mMeshEditing@>DATAnponPreviewLamp>DATAoppnLampLamp@>DATApp`qoShadow and SpotLamp>DATA`qp8rpTexture and InputLamp>DATA8rps`qMap ToLamp>`qDATAsps8rMesh ToolsEditing>DATAsptsMesh Tools 1Editing>DATAtpusScriptlinksScript>DATAuppvtAnimAnim>DATApvpHwuSoundSound>DATAHwp xpvListenerSound@>DATA xpxHwSequencerSound>DATAxpy xRampsMaterial@>jDATAypzxTextureTexture@>DATAzp{yMist / Stars / PhysicsWorld>{DATA{pX|zAmb OccWorld>DATAX|p0}{Texture and InputWorld>DATA0}p~X|Map ToWorld>X|DATA~p~0}Curve and SurfaceEditing@>DATA~p~Curve ToolsEditing>DATAp~Curve Tools1Editing>DATAphHooksObject@>eDATAhp@Particle InteractionObject>hfDATA@phTexture faceEditing>DATAp@UV CalculationEditing>@DATApȄModifiersEditing>DATAȄpShapesEditing>DATApxȄSoftbodyObject>hfDATAxpEffectsObject>hfDATAP^X333?_DdCOUêjD7ymCC(BDC??DATAXY@P333?_???Ȃ>7??? ө?Ȃ??^<>o;2ZF,?r$BTR"E@cȂ???r$B B?=CȂ>7DATAT@`X333?_Save AsFONTATHC:\Creation\BlenderFiles\Pythons\Mesh2Curve\Mesh2Curve_1.3.blendlend DATAȌqȍ_(ZXYpZ SSDATAȍqУȌZ[pZY =!=o?11314  ؓH\\ȎDATAȎpBackgroundView3d>"DATApxȎTransform PropertiesIpoE7>"UWDATAxpPOutputRender>DATAPp(xRenderRender@>DATA(pPAnimRender>DATAp(FormatRender>DATAxؓd 333?ȍ$ F?DATA eДؓ333?ȍDATAДY333?ȍ???<,s?Y????<,@sͿY@? =!=oIν2;=+n<? A~A<,@sͿY@? =!=o????<,s?Y?? A B?=C<,s?Y DATAbД333?ȍCC???DATAc-T 333?ȍ?zDzDBC  zDzD=HB DATA-Tx 333?ȍ?zDzD~gyBXևC  FzD #<HB DATA(x]К-T333?ȍzC̽̌?VtD)|@   #< #<`jFzD OBzC̽̌?DATAКgx 333?ȍELECT IMAGE?  n&(&#\Rfichier\Blenderfiles\text site\\XDATA^К333?ȍDdCBDNCC(BDC??@DATAa333?ȍq= ff?KK+KK+BA@ A@CC #<@@@DATA,@OB0DATA,@OBq= DATAp 333?ȍzCC1y8BC@?CFC= ADATAp_H333?ȍ{CA:2C?jA@@ A@FB= A DATATH`p333?ȍQSAVE TEXT FILEC:\Creation\BlenderFiles\Pythons\Mesh2Curve\.\a\.blender\scripts\\Mesh2Curve.pyndyddlendEND  oKDATAУqȍY(Z[Zb=x=o?//3/4 0ȫ0D0DФФDATAФpTransform PropertiesView3d&8>>,DATAY333?У"q>Kqh_?ik?w>Yh>k?E>0io@k-?"q>ik?thTw>>k?th_?E>;?X A?<dÛ=[<`:z4="źh>9<?l@1A"[> @N A,Z:ۚB ;?X A?b=x=o?"q>Kqh_?ik?w>Yh>k?E>0io@k-?Q4?m޾-鲾w'߾{sAA B??0==C;X@ ????DATA_h333?У{CA]\uo?YDATA_м333?,b@{CAhXDA A@FB= A DATAмY333?,b@????????8=i>o?fffAD&@??fffA B? #<CDATAT`м333?,b@SELECT MOVIEc:\RRFichier\BlenderFiles\nos\render\cuments\0001_0120.avi S DATA@qȰ8=H>o?aaa @DATA@_333?g@zCAzCA1||1 A@FB= A DATAY@333?g@????????8=H>o?fffA*@??fffA B? #<CDATAT`333?g@AVE TARGA/t1.blend9DATAq@8Ȱ8=>o?___`DATA(]333?lm@B̽̌?B̽̌? #< #<`jFzD SQB̽̌?DATAY333?lm@????????8=>o?fffA@??fffA B? #<CDATAT`333?lm@OAD FILE/9SCPWSC1P=Nxxz+>%o?8 Az+>%o?8 Az+>%o?8 A=hPSdd??< ddd??_@ @????L?fff??@ A////render\//#DVDATAxOlXDATAOx0DATAO[nDATA(hN,d'=A@DATAVZ ?o: DATAxDATAPSP`ddivxDATAd`0 =\K,2z`H???dc:\divx.logc:\test.divxc:\mvinfo.binc:\newrc.txtCAtCACameraL>=B B@?LALALamp?????A4B>??? B4B?@@???WO P=NMWOWorld:h>H>?&M>C>r???A@pA A?L= TXdTXMesh2Curve.pyH'X8hhؠ{ \DATA<H'XC:\Creation\BlenderFiles\Pythons\Mesh2Curve\Mesh2Curve.py%xDATA!THrT,'EDATAXSrTDATAX9xC---DATAXx9SlkDATA0cXwV DATA0x8RVX?DATAP(XTDATAP:HT>DATAP`:R[DATA(SSDATA(p:PDATAp(:XV[kDATAp0;qRDATAHh;HV1DATAH;(%DATAH<HX=DATA @<pEX) laDATA h<H19-MDATAh  =`tDATAhX=PUgDATA@=(t05-JDATA@(>xVDATA@`>aDATA>8VDATA`0?0 =DATA`h?SDATA`?0~RDATA8?qTDATA8@X7NDATA8H@ TLDATA@%DATAX A=N)3DATAXXA8(DATAXA;N*DATA0A>?DATA0x`B:R=frDATAx0B0@ a:DATAxHC89DATAPC6NDATAPC (XADATAPhD@DATA(Dp{T>DATA(pPEr.DATAp(E---DATApEVCK=DATAH`FTI=DATAHF(VA08-JDATAHXGS3DATA GS#r'MDATA hGUL=DATAh hH(?N!DATAhH}V####DATA@IVreatDATA@`IV!reatDATA@IVDATAJVDATA`85XpVDATA`HJRDATA`J6Rort DATA8JS$DATA8 KRDATA8XKX&DATAKHX%DATAXLX%DATAX`LXDATAXLPX%DATA0MX%DATA0xXMXDATAx0MXX%DATAxNppVDATAP8NpVDATAPpNpV~DATAPN(VDATA(NqVDATA(p@OpqV>DATAp(OqVDATApOrVDATAH(PPrVDATAHxPrV">DATAHPrVDATA(Q0sVLDATA(pQsVDATAp(4X@ DATApQVV[1]DATAHRtV[1]]DATAH`RS 15DATAHRPtV# 15DATA RtVDATA h(SVDATAh x5Xp!NDATAhpSHDATA@xcX04 DATA@SPVnqDATA@SHDATA(TtVd1DATA`xTVHDATA`8cXVDATA`TXDATA8TxVDATA8GS0V DATA8@GSV DATA@UVDATAXUXREERFDATAXUXV DATAXV0uVu-1)DATA0PVVlRDATA0xVuVnd].DATAx0VuVDATAx(WQXDATAPhW vVnd].DATAPWpvVnd].DATAPXX1DATA(hXX1DATA(pXvVEDATAp(HY.S4DATAp0Z5XXDATAHZ7N DATAH[Xct DATAH[ T DATA [(4N 4DATA h\(V 4DATAh P\ T DATAh\T DATA@\@wVRDATA@X] DATA@](PVRDATA ^HDATA`X^h DATA`^bXDATA`^PVMDATA8X_8QVDATA8_0=2DATA%P%$87S>=DATAP%%%gV REEDATA%%P%H8S2atDATA%(&%(8S3DATA(&p&%gV DATAp&&(&Ќ(9S u-1)DATA&'p&h9Su-1)DATA'H'&H9SmAdd(DATAH'''H:S sDATA''H'( DATA' ('hHgVDATA (h('0DATAh(( (gVDATA((h(@F@ DATA(@)(fVDATA@)(fV(pfV DATA(fV)@)p4NqqDATA))(fV3NHnTDATA)*)DATA*`*)@DATA`***xnqEEDATA**`*0eVeditDATA*8+*pnqDATA8++*eVDATA++8+PeVDATA+,+8#DATA,X,+S #DATAX,,,ВDATA,,X,DATA,0-,@DATA0-x-,x(L]DATAx--0-DATA-.x-8DDATA.P.-`DATAP... DATA..P.(DATA.(/.`DATA(/p/.eVl:DATAp//(/dVl:DATA/0p/@`(DATA0H0/,l:DATAH000  DATA00H0@`DATA0 10xUDATA 1h10xdVqDATAh11 1H0dVqDATA11h1(KqqDATA1@21cVDATA@221XN("OnDATA22@2ؙcVcesDATA2320DATA3`32Ph DATA`333(kDATA33`3ؚxk DATA38430k DATA8443DATA4484(l DATA454XcVqqqqDATA5X54HhlKqDATAX555ȜlDATA55X5cV DATA5065`8m:DATA06x65НmGn[0DATAx6606H(nDATA67x6bVDATA7P76؞bVlqDATAP777xnDATA77P7PnDATA7(87n9DATA(8p87`oqqDATAp88(88o!DATA8p88bVDATA!T#!BPY=DATAS=DATAD9""" Registration info for Blender menus: <- these words are ignoredDATAx9Name: 'Mesh2Curve'DATAcXBlender: 240DATA8R"""DATA(Xry:DATA:__author__ = '3R - R3gis'DATA`:__version__ = '1.4'DATAS__url__ = ["Script's site , http://blenderfrance.free.fr/python/","Author's site , http://cybercreator.free.fr", "French Blender support forum, http://www.zoo-logique.org/3D.Blender/newsportal/thread.php?group=3D.Blender"]eDATA :__email__=["3R, r3gis@free.fr"]DATA:=DATA0;=DATAh;__bpydoc__ = """\DATA(;This script transform a mesh in curve1DATA<DATA,@<Select yours meshs and launch the script.EEDATAL<The mesh must be a linear (no faces and a point linked to 1 or 2 points)REEDATA = 32DATAhX=Script will create the same number of curves objects that you have independent lines in your(s) mesh(s)DATA= 32DATA(>Note :DATAd`>Don't forget to make a Remove Double before launching the script if you are not sure of your meshEEDATA>DATA0?"""DATAh?@DATA?DATA?# $$DATA@#DATAPH@# --------------------------------------------------------------------------2:3DATA(@# ***** BEGIN GPL LICENSE BLOCK *****DATA A#0 DATA,XA# Copyright (C) 2004-2005: Regis MontoyaDATAA# DATA@A# This program is free software; you can redistribute it and/orDATA@`B# modify it under the terms of the GNU General Public LicenseDATADB# as published by the Free Software Foundation; either version 21DATA<HC# of the License, or (at your option) any later version.<DATAC#DATADC# This program is distributed in the hope that it will be useful,(LDATADhD# but WITHOUT ANY WARRANTY; without even the implied warranty ofDATA@D# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See theDATA0PE# GNU General Public License for more details. DATAE#DATADE# You should have received a copy of the GNU General Public LicenseDATAL`F# along with this program; if not, write to the Free Software Foundation,DATADF# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.dDATAXG#DATA$G# ***** END GPL LICENCE BLOCK *****DATAPG# --------------------------------------------------------------------------5DATA$hH#################################DATA H# Script pour convertir un #DATA I# mesh en path ##DATA$`I#################################-2DATAI# by 3R - 18/12/2005DATAJ# pour tout probleme :DATA85X# r3gis@free.frDATAHJ#32DATAJ# ou sur le newsgroup:DATA(J# http://zoo-logique.org/3D.Blender/d?DATA K##DATA(XK#You can visit www.cybercreator.sup.fr2DATA(K#####################################.pDATA(L#-------------Utilisation-----------#DATA`L# # #DATA(L#Selectionner le mesh a transformer #DATA(M#Le mesh doit etre une ligne brisee ##DATA XM#Lancer avec Alt+P #DATA(M#####################################DATAN 32DATA8N 32DATApN 32DATANimport Blender, mathDATA Nfrom Blender import NMesh,CurveDATA@@Oprint("-----BEGINNING of Mesh2Curve Script's processing-----") DATAODATAODATA (Pversion=Blender.Get('version')DATA$xPeditmode=Blender.Window.EditMode()DATAP 32DATAPQ#Fonction dans le cas 2D pour trouver le Plan le Plus Probable de Projection5nDATAQdef PPPP(LV,ListeBout):DATA4X global mesh==[DATAQ if ListeBout==[]:DATAR bout2=[LV[0],LV[1]]DATA`R else:DATA$R bout2=[ListeBout[0],ListeBout[1]]DATAR riDATA(S #InitialisationREEDATA x5X debut=0DATApS fini=0DATAxcX ind=bout2[0]DATAS VecteurDePPP=[0,0,0]DATAS pts=[]DATA (T pt0=mesh.verts[bout2[0]].coxtDATAxT pts.append(pt0)REEDATA8cX while fini==0:DATAT try:DATAT u=LV.index(ind)EDATAGS if u%2==0:,0DATA@GS LV.pop(u)p(DATA@U ind=LV.pop(u)EEDATA U else:DATAU LV.pop(u)p(DATAV ind=LV.pop(u-1)DATAPV if debut==0:DATAV pt1=mesh.verts[ind].coEDATAV pts.append(pt1)DATA (W else:DATAhW pt2=mesh.verts[ind].coEDATAW pts.append(pt2)DATA4X x=[pt0[0]-pt1[0],pt0[1]-pt1[1],pt0[2]-pt1[2]]EEDATA4hX y=[pt2[0]-pt1[0],pt2[1]-pt1[1],pt2[2]-pt1[2]]EEDATAHX xvy=[x[1]*y[2]-x[2]*y[1],x[2]*y[0]-x[0]*y[2],x[0]*y[1]-x[1]*y[0]]qqDATAHY if ((VecteurDePPP[0]+xvy[0])**2+(VecteurDePPP[1]+xvy[1])**2+(VecteurDePPP[2]+xvy[2])**2) >= ((VecteurDePPP[0]-xvy[0])**2+(VecteurDePPP[1]-xvy[1])**2+(VecteurDePPP[2]-xvy[2])**2):EDATA\0Z VecteurDePPP=[VecteurDePPP[0]+xvy[0],VecteurDePPP[1]+xvy[1],VecteurDePPP[2]+xvy[2]])]DATA Z else:DATA\[ VecteurDePPP=[VecteurDePPP[0]-xvy[0],VecteurDePPP[1]-xvy[1],VecteurDePPP[2]-xvy[2]]REEDATA [ pt0=pt1DATA [ pt1=pt2DATA \ except:EEDATA P\ fini=1DATA \ debut=1EEDATAT\ Norme = math.sqrt((VecteurDePPP[0])**2+(VecteurDePPP[1])**2+(VecteurDePPP[2])**2)EDATAX] if Norme<>0:DATAT] VecteurDePPP=[VecteurDePPP[0]/Norme,VecteurDePPP[1]/Norme,VecteurDePPP[2]/Norme]EDATA ^ zmoy=0DATA X^ compteur=0DATA^ for pt in pts:DATAP^ zmoy=zmoy+VecteurDePPP[0]*pt[0]+VecteurDePPP[1]*pt[1]+VecteurDePPP[2]*pt[2]DATAX_ compteur=compteur+1DATA_ zmoy=zmoy/compteurDATA_ return [VecteurDePPP,zmoy]DATA8` iDATAp`DATA@`#Fonction pour trouver les bouts dans des chaines de vertexsr mDATAadef TrouveBout(Vertexs):REEDATAha global mesh,objREEDATA a bout=[]DATAa ok=1DATA$(b for i in range(len(mesh.verts)):EDATAb if Vertexs.count(i)==1:EDATAb bout.append(i)DATAc if Vertexs.count(i)>2:EEDATAthc Blender.Draw.PupMenu(str(mesh.name)+" have a point used for more than 2 edges|%tCheck at the cursor position")DATAd ok=0DATAHd Mat=obj.getMatrix()DATAdd Vect=Blender.Mathutils.Vector([mesh.verts[i].co[0],mesh.verts[i].co[1],mesh.verts[i].co[2],1])EEDATA(e Curs=Vect*MatctDATApe print Mat,Vect,CursDATA8e Blender.Window.SetCursorPos(Curs[0],Curs[1],Curs[2])DATAT f print "Impossible : "+str(mesh.name)+" have a point used for more than 2 edges"DATA f breakDATA(f if Vertexs.count(i)==0 and courbe==0:DATA@@g Blender.Draw.PupMenu(str(mesh.name)+" have a point lost")#DATA0g print str(mesh.name)+" have a point lost"DATAh bout.append(i)DATAXh bout.append(i)DATAh pDATAhDATAi if len(bout)%2==1:DATAXi ok=0DATAdi #Cas ou il y a un nombre impair de bout... normalement impossible(ou sinon il y a eu une erreur)EDATA(j 32DATA `j if ok<>0:DATAj return bout DATAj else: DATAk return "PB"erDATAXk 32DATA k#Creation d'une ligne de curveDATA<kdef convert(Vertexs,ListeBout,courbe,Mode_3D,Mode_Type):qqDATAPl global mesh,objDATAl 32DATAl #Creation de l'objetDATAHm path=Blender.Object.New('Curve',str(obj.name)+" curve "+str(courbe))xDATA8m curve=Blender.Curve.New(str(obj.name)+" "+str(courbe))DATAm path.link(curve)DATA(@n Blender.Scene.GetCurrent().link(path)DATA(n #Cas 2D => rajustement a la localiteEEDATAnangDATA(oMatDATA`o if Mode_3D==0:DATA o CVertexs=[i for i in Vertexs]DATA o PPP=PPPP(CVertexs,ListeBout)qDATA @p zm=PPP[1]DATA p vn=PPP[0]DATAp #Matrice #DATAq Mat=obj.getMatrix()DATAHq Mat.invert()DATA4q v2=Blender.Mathutils.Vector([vn[0],vn[1],vn[2]])DATA(q v1=Blender.Mathutils.Vector([0,0,1])DATA(Hr v3=Blender.Mathutils.CrossVecs(v1,v2)DATAr try:DATA4r ang=Blender.Mathutils.AngleBetweenVecs(v1,v2)REEDATA8@s RMat=Blender.Mathutils.RotationMatrix(ang,4,"r",v3)xDATA s except:DATALs RMat=Blender.Mathutils.Matrix([1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1])DATAhtDATAt else:DATAt zm=0DATAu vn=[0,0,0]DATALPu RMat=Blender.Mathutils.Matrix([1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1])DATAuDATAv RMDATA@v #Cas ou la liste de bout est vide ... Mais il y a des vertexs qui repondent au bon criteres (cf fct ci-dessus) => Cas cycleREEDATAv if ListeBout==[]:DATA 8w bout=[Vertexs[0],Vertexs[1]]DATA w cyclic=1DATA`w #Cas ou la liste de bout contient des element ... au moins 2 cf ci-dessus... => cas lineaireDATAXx else:DATA$x bout=[ListeBout[0],ListeBout[1]]DATA x cyclic=0DATA(y 32DATA4`y #Initialisation de la copie a proprement parlerREEDATAy fini=0DATAz ind=bout[0]l yDATA@z 32DATAxz #Inutile si on endpoint:EEDATAz pt=mesh.verts[bout[0]].coEDATA { #Terme correctif du au mode 2DDATA0h{ ptSvn=pt[0]*vn[0]+pt[1]*vn[1]+pt[2]*vn[2]-zmDATA\{ V_pt=Blender.Mathutils.Vector([pt[0]-ptSvn*vn[0],pt[1]-ptSvn*vn[1],pt[2]-ptSvn*vn[2],0])DATAX| if version>=238:DATA| V_pl=RMat*V_ptDATA| else:DATA0 } V_pl=Blender.Mathutils.MatMultVec(RMat,V_pt)DATA4} curve.appendNurb([V_pl[0],V_pl[1],V_pl[2],100])n[2DATA(} #Definition des attribus de la curveDATA@~ if cyclic==1:DATA~ curve[0].setFlagU(1)DATA ~ #curve[0].setType(Mode_Type)DATA if Mode_3D==0:DATAX curve.setFlag(6)DATA else:DATA curve.setFlag(7)DATA(DATA` cuDATA while fini==0:DATA؀ try:DATA< #on prend la premiere fois dans la liste ou apparait indDATA u=Vertexs.index(ind)DATAȁ DATA$ #Cas 1 : ind etait le point v1EEDATAX if u%2==0:ndDATA #on le point indDATA Vertexs.pop(u)DATA( #on prend le point qui lui etait lie et en meme temps on le vire aussi de la liste pour que le passage suivant ne le prenne pas en compte#DATA ind=Vertexs.pop(u)DATA0 DATA$h #Cas 2 : ind etait le point v2EEDATA  else:DATA Vertexs.pop(u)DATAH ind=Vertexs.pop(u-1)REEDATA$ #On rajoute a la courbe le pt indDATA pt=mesh.verts[ind].co1DATA@ if cyclic==0:REEDATA4 ptSvn=pt[0]*vn[0]+pt[1]*vn[1]+pt[2]*vn[2]-zmV_pDATA` V_pt=Blender.Mathutils.Vector([pt[0]-ptSvn*vn[0],pt[1]-ptSvn*vn[1],pt[2]-ptSvn*vn[2],0])DATA if version>=238:DATAȇ V_pl=RMat*V_ptDATA  else:DATA4P V_pl=Blender.Mathutils.MatMultVec(RMat,V_pt)qDATA4 curve[0].append([V_pl[0],V_pl[1],V_pl[2],100])]DATA  if cyclic==1:DATA h try:DATA u=Vertexs.index(ind)EEDATA4 ptSvn=pt[0]*vn[0]+pt[1]*vn[1]+pt[2]*vn[2]-zmpDATA`` V_pt=Blender.Mathutils.Vector([pt[0]-ptSvn*vn[0],pt[1]-ptSvn*vn[1],pt[2]-ptSvn*vn[2],0])DATA if version>=238:DATA8 V_pl=RMat*V_ptDATA  else:fDATA4 V_pl=Blender.Mathutils.MatMultVec(RMat,V_pt)qDATA4( curve[0].append([V_pl[0],V_pl[1],V_pl[2],100])DATA  except:DATA Ќ passDATA DATApH #Si cas 1 et cas 2 retourne une erreur c'est que Vertex n'a pas de point ind donc ya plus de boulot a faire) DATA  except:DATA ( fini=1DATAh if Mode_Type==0:DATA  curve[0].setType(Mode_Type)DATA curve.update()DATAH@ #La on update la curve et on la met a sa place... la meme que le meshDATA OMat=obj.getMatrix()DATA NMat=RMat*OMatDATA path.setMatrix(NMat)DATA3N path.layers=obj.layersDATA 32DATAodeDATA DATA0 return VertexsDATAp reDATA######################DATA#Fonction principaleDATA$8ObjSel=Blender.Object.GetSelected()DATA aremesh=0DATAВ###DATAlenDATA@odeDATAPxMode_3D=abs(Blender.Draw.PupMenu("Conversion Mode%t|Mode 3D%x1|Mode 2D%x0"))DATAif Mode_3D==0:DATAH8 Mode_Type=Blender.Draw.PupMenu("Conversion Type%t|Nurb%x1|Poly%x0"))xDATAelse:DATA Mode_Type=4DATA(DATA`#Boucle sur chaque objetREEDATAfor obj in ObjSel:DATA mesh=obj.getData()DATA,@ if type(mesh)==Blender.Types.NMeshType:REEDATA0 #C'est bon : au moins un mesh selectionneeDATA  aremesh=1DATA@ 2DATAXx #Remplissage des points du mesh dans Vertex par couple de points liees par une faceDATA #Mfaces=mesh.facesDATAH Medges=mesh.edgesDATAL #test d'erreur dans le cas ou il y aurai des faces (Version Blender>2.38)DATA #if Mfaces<>[]:DATAPX # Blender.Draw.PupMenu(str(mesh.name)+" have a face : can\'t be converted ")DATAؙ # continue DATA 32DATAP Vertexs=[]PupDATA for edge in Medges:DATA$ؚ Vertexs.append(edge.v1.index)REEDATA$0 Vertexs.append(edge.v2.index)qEEDATA.DATA  courbe=0DATA while Vertexs<>[]:DATALH print "Conversion for : "+str(obj.name)+"/ line number : "+str(courbe+1)DATAȜ bout=TrouveBout(Vertexs)DATA if bout<>"PB":DATA<` Vertexs=convert(Vertexs,bout,courbe,Mode_3D,Mode_Type)qDATAHН print "Created curve object : "+str(obj.name)+" curve "+str(courbe)DATAH courbe=courbe+1DATA elif bout=="PB":DATA؞ Vertexs=[]DATA aDATAPif aremesh==0:4DATA< Blender.Draw.PupMenu("Nothing done : No mesh selected")EEDATAditDATA$8Blender.Window.EditMode(editmode)DATABlender.Redraw(-1)OBG0OBCamera f=1Cx@???]'?ʰ2~??~ʰ2U>:]z?ƕ70:]zU>f=1Cx@??????J\%P/?92$ ?ݜ`0U?OBd??)d??>)d????OB0GXOBLamp ~?>@-@????3???i!3?h!3??h!i!3~?>@-@?????h!3i!??3g-?i!3>@A,~?DOBd?? #=?>=?@???OBXG0OBPlanez+>%o?8 A???;;=w>U ??uj=wiCξT?F==~siϾ j?z+>%o?8 A?????DOBd?? #=?>=?@???P ME.MEPlanep:T|?@`S?i<@d@t@g@DATAp3֯@̘0@@?n=^b@?  zr$M+)V@=@%>_Ti??Zʐ:FGҰW@<>u1}y04?@`?&?~ @xɾ{>t8<@?n?x}@?7*y'*^@H@ZT_K =@3 @Xn@SHB50[ug@KMU@kẼ@|>A@@USߴY3>lyE*@ ?eB?ɖ_@#/s@#ߧGu|6Jw@b{t\nQu)2@F43iΘ2v%@fG['l@3قVi6E@D@d l\@xr^Ǧ=*[(@b9C3?|@1@#s0"@@$@/]l0Nma@.V@m;?YdUu q@?ZJDATA,:T0 GLOBrWP MDNA1?@ A!BC7 "DEFGHIJKLMNO*P#$Q%R%STUVWXYZ[\]^!_`abcd&efgh'i(jklmnopqrstuvwxyz{|) }~  *stu+*,'i##FGTUE(44y*#)+,-2rstuvFG&*P.*/_rstu     ef+ +!"#$%&'()&**+,-./012345678P09:1 !_2223;<=>?@ABCDEFGHIJ4KL43; M N*/OPqQpRSTU5 VWXYZ[\]^6_WX[^777`^abcdefghij6k5lm8n`09o:63; p N'q'r's*;tu/O vQpRqwPxyz{cd49|}~0000988<'===6k5l  <> ? 3; *u/O@> ABCDE?F qQpRP@`BGXCGA`DstuEHHH"IH7  JH'i"KH'i"LHMHNHO HyPHE0'iQ H'i"RHSH'iTab06*uUUU"3FpV''_ ''*;t3;WX    N  /OQpRD      !"#P$P % & ' ( )*+,-./ 0 1 2Y3Z4[5V6V789:\;]<]=^^^'>"?@Y ABCDEFGHIJK__ZLM`NaOPQRSTUVWXYZE[\]^0__`,\abcdefghijklmnopqrs?t?u?vwxyb8rz{|}~*&Pcddd'ie  f  0ghbef]B      !"#$i%E0'jjj&'k ()*+,E-./010'l'2b3l4# 5d6m789:;<=>? @cA iBkChsgDP EnFGHIo #(jBJKLMNp5qqOPrQRSTUVWXYZ['2o\p]^_`abHcdefgo8hijklmnopqrs3t uvw0sxyz{|}~qqqOPrQRtqqOPrQRuqqOPrQR0s  *+lvqqOPrQRsl mNEw qqOPrQRsJ0xqqOPrQRyz {qqOPrQRs   |}qqOPrQRs#Jl~ qqOPrQRlsqqOPrQR 7l qqOPrQ07lqqOPrQsQqqOPrQ     0%   !"#$%&$'()*+,-./0123456789:;<=>?@ABCDEFGH"IJKLMNOPQRSTUVWX_-YZ[\]^_`abcdefghijklmnopqrst uvwxyz{|}~E0'   l @rrrOP     %RT 4 9 }~  & 4*l$Q      4)Z,Ny| "^   "     "E0"/""0"""E' !" #$%E0" &''( ")*+,-./ 01% 20'" &3456' W7"89:;cd< =>?@=AB 6'?C"DEl'2"' FGQRHIJK "ELM'NOPQRSTU "ELMm7VWXYZ['\!]E0"^_ 0 `" ' abcdefgh i!_!j k*Blmnopq7rstuvwxyz{|qqOPrQs=0]"}''*QpRD    ~' m   "Xp/   0"wE0  QpDtX * "cW qqOPrQRsW* c 'X0'cd'c'c' 'NW7' ' 'E0q   '*W78ENDB