資源簡介
用blender打開ski模型文件的腳本

代碼片段和文件信息
#!BPY
#?Copyright?(c)?2010?Rainer?Kesselschlaeger
#?
#?Permission?is?hereby?granted?free?of?charge?to?any?person?obtaining?a?copy
#?of?this?software?and?associated?documentation?files?(the?“Software“)?to?deal
#?in?the?Software?without?restriction?including?without?limitation?the?rights
#?to?use?copy?modify?merge?publish?distribute?sublicense?and/or?sell
#?copies?of?the?Software?and?to?permit?persons?to?whom?the?Software?is
#?furnished?to?do?so?subject?to?the?following?conditions:
#?
#?The?above?copyright?notice?and?this?permission?notice?shall?be?included?in
#?all?copies?or?substantial?portions?of?the?Software.
#?
#?THE?SOFTWARE?IS?PROVIDED?“AS?IS“?WITHOUT?WARRANTY?OF?ANY?KIND?EXPRESS?OR
#?IMPLIED?INCLUDING?BUT?NOT?LIMITED?TO?THE?WARRANTIES?OF?MERCHANTABILITY
#?FITNESS?FOR?A?PARTICULAR?PURPOSE?AND?NONINFRINGEMENT.?IN?NO?EVENT?SHALL?THE
#?AUTHORS?OR?COPYRIGHT?HOLDERS?BE?LIABLE?FOR?ANY?CLAIM?DAMAGES?OR?OTHER
#?LIABILITY?WHETHER?IN?AN?ACTION?OF?CONTRACT?TORT?OR?OTHERWISE?ARISING?FROM
#?OUT?OF?OR?IN?CONNECTION?WITH?THE?SOFTWARE?OR?THE?USE?OR?OTHER?DEALINGS?IN
#?THE?SOFTWARE.
#?*****?END?MIT?LICENSE?BLOCK?*****
“““?Registration?info?for?Blender?menus
Name:?‘Equalize?normals?on?adjacent?faces‘
Blender:?249
Group:?‘object‘
Tooltip:?‘Equalize?vertex?normals?on?adjacent?faces?to?make?them?appear?virtually?connected‘
“““
__author__=?“Rainer?Kesselschlaeger“
__email__?=?[“katzeklick:gmx*de“]
__url__?=?(“http://www.blender.org“?“http://www.texturu.org“)
__version__?=?“v1.0“
__bpydoc__?=?“““\
Equalizes?vertex?normals?on?adjacent?faces?to?make?them?appear?virtually?connected.
Usage:
First?select?an?object?in?object?Mode?then?call?this?script?from?object?menu.
The?calculated?vertex?normals?of?this?script?remain?only?temporary?because
Blender?calculates?them?again?at?own?will?after?various?operations?like?
editing?parts?of?a?mesh?-?or?even?simply?switching?from?Edit?mode?to
object?Mode.
Because?of?that?the?main?use?of?this?script?is?preparing?data?for?an
export?or?setup?objects?for?nicer?rendering.
“““
import?Blender
from?Blender?import?Window
#?Helper:?Make?a?copy?of?a?mesh?(only?vertices?and?faces)
#?????????this?makes?unlinking?the?mesh?easier
#?-----------------------------------------------------------------------------
def?CopyMesh_VNF?(srcMesh?newName):
????newMesh?=?Blender.Mesh.New(newName)
????
????#?Copy?vertices
????for?vert?in?srcMesh.verts:
????????newMesh.verts.extend(vert.co)
????????vertex?=?newMesh.verts[-1]
????????vertex.no?=?vert.no
????
????#?Copy?faces
????for?face?in?srcMesh.faces:
????????face_verts?=?(face.verts[0].index?face.verts[1].index?face.verts[2].index)
????????#print?face_verts
????????newMesh.faces.extend(face_verts)
????
????return?newMesh
????
#?-----------------------------------------------------------------------------
def?GetMeshTemplate(Mesh_obj):
????
????posi_array?=?[]
????norm_array?=?[]
???
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????7930??2010-02-19?02:04??Python_sc
?????文件??????37118??2010-02-19?02:48??Python_sc
?????文件???????3858??2010-02-19?01:58??Python_sc
?????文件??????35220??2010-02-19?02:26??Python_sc
?????文件???????3816??2010-02-19?02:05??Python_sc
?????文件???????3850??2010-02-19?02:07??Python_sc
?????目錄??????????0??2011-03-17?19:49??Python_sc
-----------?---------??----------?-----??----
????????????????91792????????????????????7
- 上一篇:STM32無刷直流電機PWM控制
- 下一篇:尚硅谷2018大數據全套
評論
共有 條評論