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

Stop-motion-OBJ not working in Blender 3.3 #190

Open
protovu opened this issue May 20, 2024 · 2 comments
Open

Stop-motion-OBJ not working in Blender 3.3 #190

protovu opened this issue May 20, 2024 · 2 comments
Labels

Comments

@protovu
Copy link

protovu commented May 20, 2024

Hoping you can help, as this is a great Addon.

Win10

Latest Addon version, 2.2

Simply not behaving correctly.

By comparison, ages ago I used this addon with Blender 2.x ( the 2.1 version of the addon).
When importing the mesh, I would see the import indication of 4 separate 6's in a square configuration.
Then once imported , the mesh would behave as expected. I would be able to adjust the start frame time, and other settings.
Perfect.

Just now trying with Blender3.3 and not seeing the import 6's (if that is meaningful with this version) and even though I follow the correct

I get the following error:

Python: Traceback (most recent call last):
File "C:\Users\User\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\Stop-motion-OBJ\panels.py", line 320, in execute
meshCount = loadSequenceFromMeshFiles(seqObj, mss.dirPath, mss.fileName)
File "C:\Users\User\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\Stop-motion-OBJ\stop_motion_obj.py", line 880, in loadSequenceFromMeshFiles
mss.fileImporter.load(mss.fileFormat, file, False)
File "C:\Users\User\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\Stop-motion-OBJ\stop_motion_obj.py", line 466, in load
self.loadOBJ(filePath, streaming)
File "C:\Users\User\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\Stop-motion-OBJ\stop_motion_obj.py", line 502, in loadOBJ
bpy.ops.wm.obj_import(
File "C:\Program Files\BLENDOCT 3\BlenderOctane\3.3\scripts\modules\bpy\ops.py", line 113, in call
ret = _op_call(self.idname_py(), None, kw)
TypeError: Converting py args to operator properties: : keyword "global_scale" unrecognized

This: Sequence > empty Mesh appears in the outliner.

image

@protovu protovu added the bug label May 20, 2024
@neverhood311
Copy link
Owner

Well this is unfortunate. It looks like they changed the OBJ importer API from version 3.3 to version 3.6. Since Blender 3.3LTS is on its way out in a few months and I'm still trying to get the addon working for 4.0, I'm not going to make a special version for 3.3.

So you have three options, two of which involve some Python surgery.

Option 1: Switch to Blender 3.6. I realize this may not be possible with your circumstances, but this would be the quickest route.

Option 2: "Downgrade" your copy of Stop Motion OBJ to use the legacy OBJ importer. If you navigate to where the addon is installed on your machine (looks like C:\Users\User\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\Stop-motion-OBJ\stop_motion_obj.py based on the error message you shared), open up stop_motion_obj.py in a text editor and find def loadOBJ near line 502. There are a few version checks in this function, two of which are checking for version 3.3. Anywhere it's checking for (3, 3, 0), you'll want to change it to (3, 6, 0). This means that it will use a different OBJ importer using the correct parameters. This should work, but it means you'll be using the legacy (slow) OBJ importer rather than the faster one.

Option 3: Fix the function call to match that of the 3.3 OBJ importer. Like in option 2, you'll need to find def loadOBJ near line 502. It's trying to pass in three parameters that exist in the 3.6 importer, but not in the 3.3 importer: global_scale, use_split_objects, and use_split_groups. If you remove these three parameters from the function call, it should work (I've tried it successfully with Blender 3.3). So after the 'surgery', it should read:

bpy.ops.wm.obj_import(
                filepath=filePath,
                clamp_size=self.obj_clamp_size,
                forward_axis=newForwardAxisStr,
                up_axis=newUpAxisStr)

Hope this helps!

@protovu
Copy link
Author

protovu commented May 21, 2024

Hi Justin,

Thank you for outlining the various options. Most kind of you.
Complicated for my little brain, but I will give these options a try.

Add to the mess.....I am a Blender Octane user, so upgrades there usually involve unwanted surprises that screw up files generated years back. Your addon case in point. I had to revert to Blender 2.9x to get results. Sub-optimal.
Ug.
Your Addon should be part of Blender, I think.

Best,

Rick

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

No branches or pull requests

2 participants