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

handle exceptions in utils.get_iddata #55

Open
lfertig opened this issue Nov 4, 2019 · 1 comment
Open

handle exceptions in utils.get_iddata #55

lfertig opened this issue Nov 4, 2019 · 1 comment

Comments

@lfertig
Copy link
Collaborator

lfertig commented Nov 4, 2019

Describe the bug
Some objects are currently not id-tagged (views for example). If you use utils.get_iddata() with objectdata=None and the search loop hits an untagged and unnamed item before finding the actual id you're looking for, it raises an error (blender cant create new objects with objectdata=None).

To Reproduce

  1. make sure you have a testfile with e.g. views in it
  2. to provoke the error: run get_iddata() with a uuid thats not in the file, base=context.blend_data.objects and objectdata=None
  3. loop hits the untagged view before finding anything and causes an error because of objectdata=None

Expected behavior
*utils.get_iddata should handle unwanted cases
(*all items that have an uuid in rhino should have one assigned in blender, see Issue #57)

@lfertig lfertig changed the title fix utils.get_iddata handle exceptions in utils.get_iddata Nov 4, 2019
@tsvilans
Copy link
Collaborator

tsvilans commented Nov 4, 2019

This is also a little bit of a problem with utils.get_iddate... doing bpy.data.objects.new("Name", None) creates an Empty object (good) but then it throws an error with materials, because bpy.data.materials.new() only takes 1 argument...

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

2 participants