Metasequoia BBS

| New message | Normal | Tree |
Status
Tag
Keyword
[9772] If create a cube using script, texture mapping isn't work / tga
[Question] Response
def unitcube(x=0,y=0,z=0):
 obj= MQSystem.newObject()
 num=doc.numObject
 a=num
 obj.name="cube_%d" % a
 obj.addVertex(x-1/2.0,y-1/2.0,z+1/2.0)
 obj.addVertex(x+1/2.0,y-1/2.0,z+1/2.0)
 obj.addVertex(x+1/2.0,y+1/2.0,z+1/2.0)
 obj.addVertex(x-1/2.0,y+1/2.0,z+1/2.0)
 obj.addVertex(x-1/2.0,y-1/2.0,z-1/2.0)
 obj.addVertex(x-1/2.0,y+1/2.0,z-1/2.0)
 obj.addVertex(x+1/2.0,y+1/2.0,z-1/2.0)
 obj.addVertex(x+1/2.0,y-1/2.0,z-1/2.0)
 obj.addFace([0,3,2,1])
 obj.addFace([1,2,6,7])
 obj.addFace([4,7,6,5])
 obj.addFace([0,4,5,3])
 obj.addFace([3,5,6,2])
 obj.addFace([0,1,7,4])


Show more...
2023-07-20 01:48

Show the middle 1 messages.

[9774] Re: If create a cube using script, texture mapping isn't work / tga
problem solved,you need to add new coord to each face of the cube
2023-07-20 07:10
Title
Name
Mail address for renponse notification A mail will be sent when the response is written. This address will be not shown after you post.
Tag Please select from a preset or input arbitrary comma-delimited tags.
Message

Now file attachment is not available temporarily.