f01e84e3a5
EEVEE-Next world volume are infinite like Cycles. EEVEE-Classic world volumes end at the clip_end of the camera/viewport. This can lead to confusion as it would render different then expected. This PR adds an operator to convert a world volume into a mesh volume. The operator can be found in the shader editor (world mode) and in the properties panel/World/Volume. **Why an operator?** As this alters the content of the scene we want the artist to be in control of the conversion. Doing it automatic lead to a lot of complexity and cases that might not be expected by the user. Pull Request: https://projects.blender.org/blender/blender/pulls/119734
68 lines
1.4 KiB
Python
68 lines
1.4 KiB
Python
# SPDX-FileCopyrightText: 2009-2023 Blender Authors
|
|
#
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
from __future__ import annotations
|
|
|
|
# support reloading sub-modules
|
|
if "bpy" in locals():
|
|
from importlib import reload
|
|
_modules_loaded[:] = [reload(val) for val in _modules_loaded]
|
|
del reload
|
|
|
|
_modules = [
|
|
"add_mesh_torus",
|
|
"anim",
|
|
"assets",
|
|
"clip",
|
|
"console",
|
|
"constraint",
|
|
"file",
|
|
"geometry_nodes",
|
|
"image",
|
|
"mesh",
|
|
"node",
|
|
"object",
|
|
"object_align",
|
|
"object_quick_effects",
|
|
"object_randomize_transform",
|
|
"presets",
|
|
"rigidbody",
|
|
"screen_play_rendered_anim",
|
|
"sequencer",
|
|
"spreadsheet",
|
|
"userpref",
|
|
"uvcalc_follow_active",
|
|
"uvcalc_lightmap",
|
|
"uvcalc_transform",
|
|
"vertexpaint_dirt",
|
|
"view3d",
|
|
"world",
|
|
"wm",
|
|
]
|
|
|
|
import bpy
|
|
|
|
if bpy.app.build_options.freestyle:
|
|
_modules.append("freestyle")
|
|
|
|
__import__(name=__name__, fromlist=_modules)
|
|
_namespace = globals()
|
|
_modules_loaded = [_namespace[name] for name in _modules]
|
|
del _namespace
|
|
|
|
|
|
def register():
|
|
from bpy.utils import register_class
|
|
for mod in _modules_loaded:
|
|
for cls in mod.classes:
|
|
register_class(cls)
|
|
|
|
|
|
def unregister():
|
|
from bpy.utils import unregister_class
|
|
for mod in reversed(_modules_loaded):
|
|
for cls in reversed(mod.classes):
|
|
if cls.is_registered:
|
|
unregister_class(cls)
|