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

Lazy Commands/DataRefs.txt loading breaks upgrading of resources for existing projects #629

Closed
tngreene opened this issue Jan 6, 2021 · 1 comment

Comments

@tngreene
Copy link
Contributor

tngreene commented Jan 6, 2021

  1. Make a .blend file,
  2. Toggle the search window, that resource will load and be saved in command_search_window_state or dataref_search_window_state
  3. Save and close
  4. Replace those resources
  5. Open .blend back up
  6. Since these state variables already have content, they wont get refreshed.

I see two options:

  1. load_handler clears both the state variable and the module's private global variable
    2.. We get rid of lazy loading

I vote 2 because it is more trouble than it is worth (with such a small amount of lines of text).

@tngreene
Copy link
Contributor Author

tngreene commented Jan 7, 2021

If you are stuck, execute this in an interpreter window and attempt to use the feature again:

import io_xplane2blender
import bpy
io_xplane2blender.xplane_utils.xplane_datarefs_txt_parser._datarefs_txt_content.clear()
bpy.context.scene.xplane.dataref_search_window_state.dataref_search_list.clear()

It doesn't touch important data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant