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

"Clean scene" option breaks in Blender 3.x #19

Open
Sigmoidas opened this issue Jul 19, 2022 · 3 comments
Open

"Clean scene" option breaks in Blender 3.x #19

Sigmoidas opened this issue Jul 19, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@Sigmoidas
Copy link

I have Blender 3.1.2 and the "Up3date-main" add-on is not able to import CityJSON files from 3D BAG

I keep getting the following error:

Python: Traceback (most recent call last):
  File "C:\Users\HP ZBook 15 G2\AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\Up3date-main\__init__.py", line 72, in execute
    return parser.execute()
  File "C:\Users\HP ZBook 15 G2\AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\Up3date-main\core\objects.py", line 138, in execute
    remove_scene_objects()
  File "C:\Users\HP ZBook 15 G2\AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\Up3date-main\core\utils.py", line 21, in remove_scene_objects
    bpy.ops.object.delete()
  File "C:\Program Files\Blender Foundation\Blender 3.1\3.1\scripts\modules\bpy\ops.py", line 132, in __call__
    ret = _op_call(self.idname_py(), None, kw)
RuntimeError: Operator bpy.ops.object.delete.poll() failed, context is incorrectD

location: <unknown location>:-1
@liberostelios
Copy link
Collaborator

Hi @Sigmoidas,

I am unable to replicate the issue with the given 3D BAG tile. I use Blender 3.2.1 on Linux. I'd suggest you upgrade as well to 3.2.1, if this isn't a problem.

Oddly enough, this is also just related to trying to delete all objects from the scene. I am wondering if you have any particular objects in the scene. In any case, you can just disable the Clean scene option when selecting the file to import to avoid this error altogether. Just make sure to delete any objects you don't need in the scene before that.

@Sigmoidas
Copy link
Author

Sigmoidas commented Jul 20, 2022

@liberostelios yes, leaving a new blender file scene default (not deleting any of the default objects) resolves the issue on Blender 3.1.2.

When importing 3D BAG CityJSON files I used to create a new Blender file, hit A and Delete all the contents in the scene. That used to work fine in Blender 3.0.1

As you mentioned disabling Clean scene in the import options also resolves this issue.

@liberostelios
Copy link
Collaborator

liberostelios commented Jul 20, 2022

Alright. I think I can replicate it, indeed, if I try to load a new CityJSON file without removing the previous one. Probably something is wrong in the part that clean the scene.

I'll mark this as a bug, then. Hopefully we can fix it in the future.

Thanks a lot for reporting this!

@liberostelios liberostelios added the bug Something isn't working label Jul 20, 2022
@liberostelios liberostelios changed the title Not working on Blender 3.1.2 Clean scene breaks in Blender 3.x Jul 20, 2022
@liberostelios liberostelios changed the title Clean scene breaks in Blender 3.x "Clean scene" option breaks in Blender 3.x Jul 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants