ok...
so I've decided to start work on a model converter...

I'm a lousy Py programmeer and I'm trying to understand a few things...
but first off:

I want to store vert XYZ data in 'verts' as a list...
say we have 3 verts, the var would look like this:

verts = [X,Y,Z , X,Y,Z , X,Y,Z]

#done with this:
while (count > 0):
    verts.append(vec(),vec(),vec())
    count -= 1

now how would I read from the 'verts' as 1 vert at a time??
I'm thinking something like:
verts[0], verts[1], verts[2]

but that would just return the first offset...

can someone help :/

Recommended Answers

All 5 Replies

You can't append 3 values to a list

TypeError: append() takes exactly one argument (3 given)

Further, what is this vec() function ?

You can't append 3 values to a list

TypeError: append() takes exactly one argument (3 given)

Further, what is this vec() function ?

I know...
didn't feel like typing the entire code...

(I'm on Wii)

So you want to read verts from a file and write it in your own format? You just need to be able to read a line from a file, delete any un-needed characters and split the string up into three parts. Then you can convert them to int and make a list of these. Just do google searches for the above bits and pieces. Should turn something up.

So you want to read verts from a file and write it in your own format? You just need to be able to read a line from a file, delete any un-needed characters and split the string up into three parts. Then you can convert them to int and make a list of these. Just do google searches for the above bits and pieces. Should turn something up.

dat is hex... (from a GCN game)
obj is ascii

the dat format is complex...
it has a header that takes you to a relocation table...

I want my converter to store everything in a var before prompting to save an obj :/

btw, I'm tired of 0 results on google D:

ignore that last post :/

I've just thought of a better way...
just rename the obj after the dat :/

^whith doing that, I can do 'per vert' conversion

EDIT: @ any admin that spots this
don't delete this thread...
there will be times I'll need to bring up something about this :/

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.