Skip to content
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

Import fails - Blender 3.4 removed use_customdata_edge_bevel mesh property #72

Closed
shugosmail opened this issue Nov 17, 2022 · 20 comments
Closed

Comments

@shugosmail
Copy link

Hi,
can you please update plugin to work with Blender 3.4 and newer? Blender recently removed use_customdata_edge_bevel
Here is more information about Python breaking changes in 3.4:
https://wiki.blender.org/wiki/Reference/Release_Notes/3.4/Python_API

Python: Traceback (most recent call last):
File "C:\Users\shugo\AppData\Roaming\Blender Foundation\Blender\3.5\scripts\addons\io_scene_importldraw\importldraw.py", line 391, in execute
loadldraw.loadFromFile(self, self.filepath)
File "C:\Users\shugo\AppData\Roaming\Blender Foundation\Blender\3.5\scripts\addons\io_scene_importldraw\loadldraw\loadldraw.py", line 4300, in loadFromFile
rootOb = createBlenderObjectsFromNode(node, node.matrix, name)
File "C:\Users\shugo\AppData\Roaming\Blender Foundation\Blender\3.5\scripts\addons\io_scene_importldraw\loadldraw\loadldraw.py", line 3579, in createBlenderObjectsFromNode
ob.data.use_customdata_edge_bevel = True
AttributeError: 'Mesh' object has no attribute 'use_customdata_edge_bevel'
bpy.ops.import_scene.importldraw(filepath="D:\io\Wietse Bricks\WBCorvetteMOC - Copy.ldr", ldrawPath="D:\Blender Versions\ldraw3\", bevelEdges=True)

@TobyLobster
Copy link
Owner

Done, see latest release.

@shugosmail
Copy link
Author

Hi and thank your for your quick response. I tried it and import now works without crash but there's still some issue with bevels

Blender 3.3.1 ImportLdraw 1.1.11 (2465 objects, 27.5M tris, 15M faces)
blender_3 3 1_importldraw_1 1 11

Blender 3.4 Beta ImportLdraw 1.1.13 ( 2465 objects, only 9.9M tris and 6.3M faces )
blender_3 4_importldraw_1 1 13

Both scenes were imported with the same bevel options
image

@grahamwheaton
Copy link

Same issue for me

@shugosmail
Copy link
Author

@TobyLobster Hi, could you please fix also the bevel options as mentioned above? Thank you very much.

@TobyLobster
Copy link
Owner

Fixed in latest release

@shugosmail
Copy link
Author

Hi, I tested it on version 3.4.1 Stable (build from 13.1.2023) and it's still not working.

Python: Traceback (most recent call last):
File "C:\Users\shugo\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\io_scene_importldraw\importldraw.py", line 391, in execute
loadldraw.loadFromFile(self, self.filepath)
File "C:\Users\shugo\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\io_scene_importldraw\loadldraw\loadldraw.py", line 4319, in loadFromFile
rootOb = createBlenderObjectsFromNode(node, node.matrix, name)
File "C:\Users\shugo\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\io_scene_importldraw\loadldraw\loadldraw.py", line 3702, in createBlenderObjectsFromNode
createBlenderObjectsFromNode(childNode, childNode.matrix, childNode.filename, childColourName, blenderParentTransform, matmul(localToWorldSpaceMatrix, localMatrix), blenderNodeParent)
File "C:\Users\shugo\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\io_scene_importldraw\loadldraw\loadldraw.py", line 3618, in createBlenderObjectsFromNode
bpy.ops.object.mode_set(mode='EDIT')
File "D:\Blender Versions\blender-3.4.1-stable_2023_01_13_+v34.ef9ca44dee7f-windows.amd64-release\3.4\scripts\modules\bpy\ops.py", line 113, in call
ret = _op_call(self.idname_py(), None, kw)
TypeError: Converting py args to operator properties: enum "EDIT" not found in ('OBJECT')

I also tried to use blender 3.5 and import dosn't have Bevel edges.

@TobyLobster
Copy link
Owner

Perhaps you could try installing this version as a test:
importldraw1.1.15_without_background_exr_for_blender_281.zip
If it works I will make a proper release.

@shugosmail
Copy link
Author

I also tried to comment out mode_set before but then I started having this error log ( and i dont know anything about blender python API so i could continue experimenting :D )

Python: Traceback (most recent call last):
File "C:\Users\shugo\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\io_scene_importldraw\importldraw.py", line 391, in execute
loadldraw.loadFromFile(self, self.filepath)
File "C:\Users\shugo\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\io_scene_importldraw\loadldraw\loadldraw.py", line 4319, in loadFromFile
rootOb = createBlenderObjectsFromNode(node, node.matrix, name)
File "C:\Users\shugo\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\io_scene_importldraw\loadldraw\loadldraw.py", line 3702, in createBlenderObjectsFromNode
createBlenderObjectsFromNode(childNode, childNode.matrix, childNode.filename, childColourName, blenderParentTransform, matmul(localToWorldSpaceMatrix, localMatrix), blenderNodeParent)
File "C:\Users\shugo\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\io_scene_importldraw\loadldraw\loadldraw.py", line 3624, in createBlenderObjectsFromNode
bpy.ops.mesh.customdata_bevel_weight_edge_add()
File "D:\Blender Versions\blender-3.4.1-stable_2023_01_13_+v34.ef9ca44dee7f-windows.amd64-release\3.4\scripts\modules\bpy\ops.py", line 113, in call
ret = _op_call(self.idname_py(), None, kw)
RuntimeError: Operator bpy.ops.mesh.customdata_bevel_weight_edge_add.poll() failed, context is incorrect

@TobyLobster
Copy link
Owner

Ok, I suggest the original version is the correct version. Perhaps there is an issue importing a specific model? If you can open other models ok then send me one that doesn't work and I can look at it. When you import do you have a 3d viewport visible? (It may have problems if you don't).

@shugosmail
Copy link
Author

Yes 3D viewsport is my default view.
It generates erros on whatever model I choose (different builds of Blender 3.4/3.4.1). And same ldr file worked in 3.3.1 using previous version of importldraw. Here's is the smallest example I've got. Can you reproduce my errors with this?
Wall.zip

In Blender 3.5 I don't get error with enum EDIT mode not found in but there are still bevel edges missing.

@TobyLobster
Copy link
Owner

Screenshot 2023-01-13 at 20 35 45

Seems to work here (Blender 3.4.1). Weird - I don't know why this isn't working for you. Is there some configuration difference maybe??

@TobyLobster TobyLobster reopened this Jan 13, 2023
@shugosmail
Copy link
Author

Really weird hmmm. At least it works for me in Blender 3.5 but still, I can't get bevel edges working. If you zoom in your picture above, do you see bevel edges working?

@TobyLobster
Copy link
Owner

You're right, I don't see the bevelled edges in an up close render. I don't know why they are not appearing though, since the Bevel modifier is present (see screenshot), and sharp edges are present (you can select them in EDIT mode). So why are they not rendering?

@TobyLobster
Copy link
Owner

They are not getting the custom weight data, I'm investigating...

@grahamwheaton
Copy link

Thanks for trying to fix.

Yes same problem for me with Blender: 3.4.1

All the edges that should be Bevel weight 1 are marked as 'Sharp' and 'Bevel weight 0'

Blender 3.3: (Working)
33

Blender 3.4:
34

@TobyLobster
Copy link
Owner

@shugosmail
Copy link
Author

Just tested, works in Blender 3.5. Thank you!

@Maxinger15
Copy link

Hi,
I installed the addon v1.1.15 in Blender 3.5.1 and there is the error again.
AttributeError: 'Mesh' object has no attribute 'use_customdata_edge_bevel'

It works fine in Blender 3.5.0

@Michuklon
Copy link

hi, I tried to use this addon, but it doesn't import any Lego pieces, just empties. why is this happening?https://i.imgur.com/EuchAY4.png
I followed every step

@dvell
Copy link

dvell commented Jul 28, 2023

Hello, I installed the addon v1.1.18 in Blender 3.6.1 and unfortunately getting the error too:
obrazek

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants