-
Notifications
You must be signed in to change notification settings - Fork 26
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
C++ OBJ importer #382
C++ OBJ importer #382
Conversation
…roups for the C++ OBJ importer
When MCprep opens the file picker, both OBJs and MTLs can be selected, which was annoying when accidently selecting the MTL file of the OBJ. This adds a quality of life improvement by replacing .mtl with .obj if the user accidently clicks the MTL file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving with the confidence that you'll make the once change (reversion) below to maintain consistent backwards behavior (it's actually less code too)
res = None | ||
if util.min_bv((3, 5)): | ||
res = bpy.ops.wm.obj_import( | ||
filepath=self.filepath, use_split_groups=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this diff hunk can be reverted. This "use_split_groups" works in 3.5 and equally in 3.4 and earlier, as written this would make 3.4 and earlier stop splitting out by objects from the source, which would not be good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what you mean, though I did catch the use of the wrong operator for 3.4 and below. In my testing, use_split_groups
doesn't seem to work in 3.4 and below for the C++ importer
A mistake was made that made MCprep use the C++ OBJ importer in 3.4 and below, which is incorrect behavior.
Anyway, I'll merge this now |
This introduces support for the C++ OBJ importer for Blender 3.5 and above