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

Data block list #3903

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from
Draft

Data block list #3903

wants to merge 8 commits into from

Conversation

Durman
Copy link
Collaborator

@Durman Durman commented Feb 14, 2021

Addressed problem description

closes #3873

2021-02-14_09-36-54
data block list npde

Welcome suggestions if any

Preflight checklist

  • Code changes complete.
  • Code documentation complete.
  • Documentation for users complete.
  • Manual testing done.
  • Ready for merge.

@Durman
Copy link
Collaborator Author

Durman commented Feb 25, 2021

The problem of the Object socket is that it keeps straight reference to a data block which can become invalid in any moment. We have quite a few input nodes with such socket this is probably why it's not big problem now. It looks like that Blender devs did something and calling method of such objects doesn't cause a crash as it was before. Now it rises the references error.

2021-02-25.14-12-23.mp4

Solution could be instead of keeping straight references to keep meta information for searching a data block. Obvious disadvantage of this is that the search will take O(len(data block collection)) each time. To make it more efficient will be tricky task. Probably, a socket ,before sv_get method, should check whether reference to an object is valid and if not search the data block in appropriate collection.

@Durman Durman linked an issue Mar 13, 2021 that may be closed by this pull request
@Durman Durman marked this pull request as draft June 28, 2021 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bpy.data list node Object sockets - ReferenceError
1 participant