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

Feature/dev #50

Merged
merged 2 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions bioxelnodes/assets/Nodes/BioxelNodes_latest.blend
Git LFS file not shown
2 changes: 1 addition & 1 deletion bioxelnodes/blender_manifest.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
schema_version = "1.0.0"

id = "bioxelnodes"
version = "1.0.5"
version = "1.0.6"
name = "Bioxel Nodes"
tagline = "For scientific volumetric data visualization in Blender"
maintainer = "Ma Nan <[email protected]>"
Expand Down
2 changes: 1 addition & 1 deletion bioxelnodes/constants.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from pathlib import Path

VERSIONS = [{"label": "Latest", "node_version": (1, 0, 5)},
VERSIONS = [{"label": "Latest", "node_version": (1, 0, 6)},
{"label": "v0.3.x", "node_version": (0, 3, 3)},
{"label": "v0.2.x", "node_version": (0, 2, 9)}]

Expand Down
3 changes: 2 additions & 1 deletion bioxelnodes/menus.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
ExtractNodeMesh, ExtractNodeBboxWire, ExtractNodeShapeWire)

from .operators.io import (ImportAsLabel, ImportAsScalar, ImportAsColor)
from .operators.misc import (CleanTemp, Help,
from .operators.misc import (AddEeveeEnv, CleanTemp, Help,
ReLinkNodeLib, RemoveAllMissingLayers,
RenderSettingPreset, SaveAllLayersCache,
SaveNodeLib, SliceViewer)
Expand Down Expand Up @@ -212,6 +212,7 @@ def draw(self, context):
layout.menu(DangerZoneMenu.bl_idname)

layout.separator()
layout.operator(AddEeveeEnv.bl_idname)
layout.menu(RenderSettingMenu.bl_idname)

layout.separator()
Expand Down
34 changes: 34 additions & 0 deletions bioxelnodes/operators/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,3 +274,37 @@ def execute(self, context):
'https://omoolab.github.io/BioxelNodes/latest/', new=2)

return {'FINISHED'}


class AddEeveeEnv(bpy.types.Operator):
bl_idname = "bioxelnodes.add_eevee_env"
bl_label = "Add EEVEE Env Light"
bl_description = "To make volume shadow less dark"

def execute(self, context):
bpy.ops.object.light_add(
type='POINT', align='WORLD', location=(0, 0, 0), scale=(1, 1, 1))
light_obj = bpy.context.active_object
light_obj.name = "EeveeEnv"
light_obj.data.shadow_soft_size = 100
light_obj.data.energy = 1e+06
light_obj.data.color = (0.1, 0.1, 0.1)
light_obj.data.use_shadow = False
light_obj.data.diffuse_factor = 0
light_obj.data.specular_factor = 0
light_obj.data.transmission_factor = 0

light_obj.hide_select = True
light_obj.lock_location[0] = True
light_obj.lock_location[1] = True
light_obj.lock_location[2] = True
light_obj.lock_rotation[0] = True
light_obj.lock_rotation[1] = True
light_obj.lock_rotation[2] = True
light_obj.lock_scale[0] = True
light_obj.lock_scale[1] = True
light_obj.lock_scale[2] = True

bpy.context.scene.eevee.use_volumetric_shadows = True

return {'FINISHED'}
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "bioxelnodes"
version = "1.0.5"
version = "1.0.6"
description = ""
authors = ["Ma Nan <[email protected]>"]
license = "MIT"
Expand Down
Loading