Takanu / Capsule

(Blender 4.1) Universal batch export manager
https://takanu.itch.io/capsule-blender-addon
GNU General Public License v3.0
191 stars 12 forks source link

TypeError: Area not found in screen #40

Closed MattGraczyk closed 1 year ago

MattGraczyk commented 1 year ago

Hey there, I'm not 100% if this is a capsule bug but I'm experiencing an issue where I'm unable to create a new capsule data file in a new scene. When I try I get the below error message.

I tried to find some solutions elsewhere and a user suggested to someone else that it could be an issue relating to not being in Object Space or not having a 3D Viewport open but neither apply here, even after making sure I had left any other modes and had the correct window type open for sure.

Error: Python: Traceback (most recent call last): File "C:\Users\mattg\AppData\Roaming\Blender Foundation\Blender\3.2\scripts\addons\Capsule\ui_operators.py", line 525, in execute with context.temp_override(window = override['window'], area = override['area'], TypeError: Area not found in screen

Thanks for any help you can give! Likely it could be a local issue and not one with capsule but the addon has been working well for me up until today.

Takanu commented 1 year ago

Hey, this is an issue i'm aware with and usually appears when you have multiple Blender windows open, or when it is unable to find a 3D View in your current Blender UI setup.

For now, make sure you export on the main Blender window with a 3D View present as this should always work. Let me know if this works!

nCore commented 1 year ago

I have the exact same issue unfortunately:

image

I am in object mode and I have just one window, one instance of blender ran through Steam. Tried this on my project file, on fresh empty blender file - nothing helps.

EDIT: This is Blender 3.4.1 on Windows 10

Takanu commented 1 year ago

This is definitely a bug on my end and something I need to fix, but make sure you aren't maximizing a single panel in the UI (like you can do by using Ctrl+Space). This error is occurring because Capsule has failed to find an area of the UI that is a 3D View and this is one of the ways it can trip up.

petersgiles commented 1 year ago

I'm very new to blender, I'm trying to process a bunch of Synty Studio Polygon assets for Godot by importing FBX adding materials and then exporting them all with Capsule.

image

I get the error above.

I don't understand what you mean by 3D View. Is there a keyboard shortcut to enable it? I've done a Google Search and some other add-in is mentioned but it doesn't mean much to me.

Can you take a screenshot or two to demonstrate the current workaround for this bug?

Takanu commented 1 year ago

Let me know if this workaround works but it should be:

If my memory of this is correct, the bug occurs when the plugin tries and fails to find a 3D View to perform actions in.

petersgiles commented 1 year ago

Thanks for your quick reply, I really appreciate it. It didn't really help me though, and that's more about Blender and its cryptic interface than anything else.

What specific "button/menu item/keypress" do you press in Blender to get the 3D View you are talking about?

Takanu commented 1 year ago

You should only need to have your cursor "actively" in a 3D View while exporting, but I'd have assumed that's already what you're doing when exporting. Regardless this is definitely my fault and I need to find a much more robust way of fetching the Blender panels I need during export.

I don't know when i'll next have time to patch this but it's definitely something I'm going to fix as this has historically caused issues for people.

Bit-Rot commented 1 year ago

+1 to getting this error when attempting to create capsule data for a scene.

Just installed 3.4.1, start blender, Load factory settings, install capsule and attempt to create capsule data - get the same error as above.

image

Bit-Rot commented 1 year ago

For those encountering this issue when adding capsule data, I was able to work around it by accessing the preferences area via a panel in the viewport rather than the Edit > Preferences... menu. See screenshot below:

image

petersgiles commented 1 year ago
Screenshot 2023-02-25 at 1 29 20 pm

Yes can confirm accessing the preferences via a panel avoids the error

Takanu commented 1 year ago

Thanks for finding a workaround @Bit-Rot , i'm spending today doing bug fixes and ill get this one fixed. One workaround I did find is using the "Create Capsule Data" button that appears in every other panel Capsule uses other than the Preferences Menu.

Takanu commented 1 year ago

Looks like I found the issue - the fix has been pushed and it will be included in 1.37. Please let me know if it worked or not 😅