Open kkaja123 opened 4 years ago
Thanks for looking into this! Sorry about the radio silence, I haven't been keeping up with my notifications recently.
Does your last post mean your changes cause the offset to be ignored when importing vector fields and I shouldn't merge them, or am I misunderstanding?
At first, I applied the change to the import offset. After some quick testing, I found that the offset was ignored. I made a second commit that removed the change so the offset would be used again.
From my very basic testing, the code in the pull request works. You should make sure that things are working properly, because I have very little experience with this add-on.
@isathar Have you had a chance to see if this PR is ready to merge?
After some testing, I ended up adding a check for volmesh.parent, instead. The parent it refers to is the surrounding wireframe shape that represents the bounds. Since the volume containing the particles is parented to it, setting its location to the imported offset won't do anything, so I added a check for the parent mesh, instead. The offset will now only be set if the parent is found, which should resolve the noneType error messages.
I'll update the current release after some more testing. I've also moved the UI panel to the panels on the right of the workspace, which seems like a much better spot for it (thanks to matanshukry for including it in the suggestion for the flowmap editor).
Remove the upwards scoping to the object's parent since it has been NoneType.
This may be a bug due to the way Blender 2.8 changed the scene collections.
Fixes issue #15.