ivla Wrote:Sorry but I come with yet another trouble. Simple python script for new shape creation does not create new shape.
Please help with troubleshooting.
I tested it and it seems there has to be at least one parameter, a bug in the script plugin, which I'll try to find time to fix soon.
Add to test_shape.wscr:
Code:
params {
param "unused" "0"
}
After that the error is further into parts where the E3D that was constructed might cause errors, I recommend trying with the simpler NewShape form which only takes fs and vs.
Code:
nshp = w3d_newshape.NewShape()
nshp.prefix = "test"
## nshp.obj = e3d_o
nshp.fs = ...
nshp.vs = ...
Here I notice a combine_half_edges error, which might mean one of the faces might be facing the other direction.
You'll need to change the first face:
[0,1,2,3]
to
[0,1,3,2]
And the vertices have to be floats, it can cause weird errors in wings if there are integers in the mesh:
[(-1,1,-1),(-1,1,1),(1,1,-1),(1,1,1),(-1,-1,-1),(-1,-1,1),(1,-1,-1),(1,-1,1)]
now
[(-1.0,1.0,-1.0),(-1.0,1.0,1.0),(1.0,1.0,-1.0),(1.0,1.0,1.0),(-1.0,-1.0,-1.0),(-1.0,-1.0,1.0),(1.0,-1.0,-1.0),(1.0,-1.0,1.0)]
EDIT: I forgot to mention about the main function:
Code:
def mnewshape():
Code:
def mnewshape(params, params_by_key, extra_params):