-
Notifications
You must be signed in to change notification settings - Fork 75
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
[Codebase] Automatically find or add world #334
Conversation
It sounded like AI and had redundancy, I'm ashamed
@Dragorn421 could you look at this at some point? |
Would an exception or warning popup work better? |
Co-authored-by: Dragorn421 <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great!
This will fix #330 |
fast64_internal/utility.py
Outdated
return scene.world | ||
if bpy.data.worlds: | ||
world: World = bpy.data.worlds.values()[0] | ||
print(f'No world selected in scene, selected the first one found in this file "{world.name}".') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually I just realized this severely spams the console. Could you add a counter for this print and only print it the first 10 times or something
use a dirty global variable :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks
Possible solution to #330
Never changes the actual scene.world, as that should be left to the user, the important logic is in create_or_get_world.
This will almost never create a world because of the f3d nodes library having its own world