-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting a python error. #7
Comments
I had the same error, and resolved it by enabling the plugin called "Import-Export: Wavefront OBJ format (legacy)" |
That resolves the issue indeed, worth mentioning in the DOCS as some users disabled that legacy importer for startup time savings. |
Ive just had the same error using Blender 4.0. |
I'm getting the same error has anyone found a solution to this? |
Any solutions for blender 4.0 ? |
For blender 3.3 and 4.0, the OBJ Import/Export is now built into the system, so the API calls bpy.ops.export_scene.obj and bpy.ops.import_scene.obj no longer exist. I dug into the blender API changes and found the new functions for OBJ Import/Export and implemented those but I'm not entirely sure it is the correct fix, as some of the arguments from the original functions aren't in the new functions. However, for someone else to test and verify if they would like, these are the changes I made inside the failing file:
On line 73, I changed the OBJ export command from:
to
On line 96, I changed the OBJ Import command from:
to
If someone else could verify if these are the correct changes then would be as appreciated as this is the first time using this plugin for me in Blender, so I'm not sure if the results are correct or not, and I haven't installed the older versions to verify. |
4.0, it's not working |
@natahnd i ran your fix and got this error |
Turns out bpy.ops.import_scene.obj was removed at I just downgraded to
|
I am in the process of migrating all my addons to Blender >= 4
…On Sat, Jan 13, 2024 at 3:08 PM Musabbir Arrafi ***@***.***> wrote:
Turns out bpy.ops.import_scene.obj was removed at bpy>=4 which is the
latest blender-api for python, hence the error. In bpy>4 you have to use
bpy.ops.wm.obj_import(filepath='')
I just downgraded to bpy==3.60 and it worked for me:
pip install bpy=3.6.0
—
Reply to this email directly, view it on GitHub
<#7 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEJUGIGTVM3R5J5TOMCL6MTYOKIOBAVCNFSM6AAAAAASUDZ7VCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOJQGQ3DQMBSHE>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
that would be great, thank you! |
The error you're reporting suggests that the changes haven't been applied in your Blender correctly. This likely requires a restart of Blender if you changed the python script whilst it was open. The reason I can tell its not updated is it's saying: "calling operator bpy.ops.export_scene.obj error" whereas the new function name, if updated correctly is bpy.ops.wm.obj_export. That said I would wait for the official update as indicated in the above comments :) |
I have no idea what this means but this is the error I'm getting. I'm on blender 3.3.1
The text was updated successfully, but these errors were encountered: