from unitypack.modding import import_mesh
new_mesh = tabledata.add_object(43)
import_mesh(new_mesh.contents, 'path_to_mesh')
tabledata.add2ab('some_new_path_in_tabledata.obj', new_mesh.path_id)
oops it has to be 43 not 45
it works, but I have a problem
yeah?
this line --- > import_mesh(new_mesh.contents, 'example')
when I try it, I get an error
Error Type: FileNotFoundError
and then it worked
but it's not right inside the bundle
i'll show you
it's just called .obj
I assume I wasn't supposed to add .obj there but it's the only thing that fixed it
that's ok, but which name you entered for tabledata.add2ab ?
tabledata.add2ab('example.obj', new_mesh.path_id)
maybe give it a name
new_mesh.contents.name = 'some_name'
and then save
that worked
new_mesh = tabledata.add_object(43)
import_mesh(new_mesh.contents, 'path_to_mesh')
tabledata.add2ab('some_new_path_in_tabledata.obj', new_mesh.path_id)
oops it has to be 43 not 45
it works, but I have a problem
yeah?
this line --- > import_mesh(new_mesh.contents, 'example')
when I try it, I get an error
Error Type: FileNotFoundError
I changed the line to ---> import_mesh(new_mesh.contents, 'example.obj')[Errno 2] No such file or directory: 'example'
and then it worked
but it's not right inside the bundle
i'll show you
it's just called .obj
I assume I wasn't supposed to add .obj there but it's the only thing that fixed it
that's ok, but which name you entered for tabledata.add2ab ?
tabledata.add2ab('example.obj', new_mesh.path_id)
maybe give it a name
new_mesh.contents.name = 'some_name'
and then save
that worked