diff --git a/src/bioxelnodes/assets/Nodes/BioxelNodes_latest.blend b/src/bioxelnodes/assets/Nodes/BioxelNodes_latest.blend index 864b370..dc5d2a5 100644 --- a/src/bioxelnodes/assets/Nodes/BioxelNodes_latest.blend +++ b/src/bioxelnodes/assets/Nodes/BioxelNodes_latest.blend @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0cce8196479019bb1696092c9d489c8de61b61b7c2b7731d35fa4b7757ac314e -size 9307196 +oid sha256:31506f1565fd95add291ec68921a8e3cd6fb70985fc0e737962ea723a41c0a8c +size 9059134 diff --git a/src/bioxelnodes/menus.py b/src/bioxelnodes/menus.py index da21be1..7934fd5 100644 --- a/src/bioxelnodes/menus.py +++ b/src/bioxelnodes/menus.py @@ -419,7 +419,7 @@ node_menu = NodeMenu( def add(): node_menu.register() - bpy.types.VIEW3D_HT_header.append(VIEW3D_TOPBAR) + # bpy.types.VIEW3D_HT_header.append(VIEW3D_TOPBAR) bpy.types.TOPBAR_MT_editor_menus.append(TOPBAR) bpy.types.NODE_PT_node_tree_properties.prepend(NODE_PROP) bpy.types.NODE_MT_editor_menus.append(NODE_HEAD) @@ -427,7 +427,7 @@ def add(): def remove(): - bpy.types.VIEW3D_HT_header.remove(VIEW3D_TOPBAR) + # bpy.types.VIEW3D_HT_header.remove(VIEW3D_TOPBAR) bpy.types.TOPBAR_MT_editor_menus.remove(TOPBAR) bpy.types.NODE_PT_node_tree_properties.remove(NODE_PROP) bpy.types.NODE_MT_editor_menus.remove(NODE_HEAD) diff --git a/src/bioxelnodes/operators/container.py b/src/bioxelnodes/operators/container.py index 99a474a..d4dad97 100644 --- a/src/bioxelnodes/operators/container.py +++ b/src/bioxelnodes/operators/container.py @@ -510,6 +510,10 @@ class AddLocator(bpy.types.Operator): modifier = container_obj.modifiers[0] node_group = modifier.node_group + try: + selected_node = context.selected_nodes[0] + except: + selected_node = None parent_node = add_node_to_graph("TransformParent", node_group, @@ -518,20 +522,37 @@ class AddLocator(bpy.types.Operator): parent_node.inputs[1].default_value = locator_obj - output_node = get_output_node(node_group) - - if len(output_node.inputs[0].links) == 0: - node_group.links.new(parent_node.outputs[0], - output_node.inputs[0]) - move_node_to_node(parent_node, output_node, (-300, 0)) + if selected_node is None or len(selected_node.outputs) == 0: + output_node = get_output_node(node_group) + if len(output_node.inputs[0].links) == 0: + node_group.links.new(parent_node.outputs[0], + output_node.inputs[0]) + move_node_to_node(parent_node, output_node, (-300, 0)) + else: + pre_output_node = output_node.inputs[0].links[0].from_node + node_group.links.new(pre_output_node.outputs[0], + parent_node.inputs[0]) + node_group.links.new(parent_node.outputs[0], + output_node.inputs[0]) + move_node_between_nodes(parent_node, + [pre_output_node, output_node]) else: - pre_output_node = output_node.inputs[0].links[0].from_node - node_group.links.new(pre_output_node.outputs[0], - parent_node.inputs[0]) - node_group.links.new(parent_node.outputs[0], - output_node.inputs[0]) - move_node_between_nodes(parent_node, - [pre_output_node, output_node]) + try: + to_node = selected_node.outputs[0].links[0].to_node + except: + to_node = None + + if to_node is None: + node_group.links.new(selected_node.outputs[0], + parent_node.inputs[0]) + move_node_to_node(parent_node, selected_node, (300, 0)) + else: + node_group.links.new(selected_node.outputs[0], + parent_node.inputs[0]) + node_group.links.new(parent_node.outputs[0], + to_node.inputs[0]) + move_node_between_nodes(parent_node, + [selected_node, to_node]) return {'FINISHED'} diff --git a/src/bioxelnodes/operators/io.py b/src/bioxelnodes/operators/io.py index 6588c2b..51567aa 100644 --- a/src/bioxelnodes/operators/io.py +++ b/src/bioxelnodes/operators/io.py @@ -857,7 +857,6 @@ class ImportVolumetricDataDialog(bpy.types.Operator): bpy.ops.bioxelnodes.render_setting_preset('EXEC_DEFAULT', preset="balance") bpy.context.scene.render.engine = 'CYCLES' - bpy.ops.bioxelnodes.slice_viewer('EXEC_DEFAULT') self.report({"INFO"}, "Successfully Imported") return {'FINISHED'} diff --git a/src/bioxelnodes/operators/misc.py b/src/bioxelnodes/operators/misc.py index f5f7f7b..a9691cd 100644 --- a/src/bioxelnodes/operators/misc.py +++ b/src/bioxelnodes/operators/misc.py @@ -147,6 +147,7 @@ class RenderSettingPreset(bpy.types.Operator): if self.preset == "performance": # EEVEE # bpy.context.scene.eevee.use_taa_reprojection = False + bpy.context.scene.eevee.use_shadow_jitter_viewport = True bpy.context.scene.eevee.volumetric_tile_size = '2' bpy.context.scene.eevee.volumetric_shadow_samples = 32 bpy.context.scene.eevee.volumetric_samples = 64 @@ -154,7 +155,6 @@ class RenderSettingPreset(bpy.types.Operator): bpy.context.scene.eevee.use_volumetric_shadows = True # Cycles - bpy.context.scene.cycles.shading_system = True bpy.context.scene.cycles.volume_bounces = 0 bpy.context.scene.cycles.transparent_max_bounces = 4 bpy.context.scene.cycles.volume_preview_step_rate = 4 @@ -163,6 +163,7 @@ class RenderSettingPreset(bpy.types.Operator): elif self.preset == "balance": # EEVEE # bpy.context.scene.eevee.use_taa_reprojection = False + bpy.context.scene.eevee.use_shadow_jitter_viewport = True bpy.context.scene.eevee.volumetric_tile_size = '2' bpy.context.scene.eevee.volumetric_shadow_samples = 64 bpy.context.scene.eevee.volumetric_samples = 128 @@ -170,7 +171,6 @@ class RenderSettingPreset(bpy.types.Operator): bpy.context.scene.eevee.use_volumetric_shadows = True # Cycles - bpy.context.scene.cycles.shading_system = True bpy.context.scene.cycles.volume_bounces = 4 bpy.context.scene.cycles.transparent_max_bounces = 8 bpy.context.scene.cycles.volume_preview_step_rate = 1 @@ -179,6 +179,7 @@ class RenderSettingPreset(bpy.types.Operator): elif self.preset == "quality": # EEVEE # bpy.context.scene.eevee.use_taa_reprojection = False + bpy.context.scene.eevee.use_shadow_jitter_viewport = True bpy.context.scene.eevee.volumetric_tile_size = '2' bpy.context.scene.eevee.volumetric_shadow_samples = 128 bpy.context.scene.eevee.volumetric_samples = 256 @@ -186,7 +187,6 @@ class RenderSettingPreset(bpy.types.Operator): bpy.context.scene.eevee.use_volumetric_shadows = True # Cycles - bpy.context.scene.cycles.shading_system = True bpy.context.scene.cycles.volume_bounces = 8 bpy.context.scene.cycles.transparent_max_bounces = 16 bpy.context.scene.cycles.volume_preview_step_rate = 0.5