fix cannot extract wire
This commit is contained in:
@@ -15,8 +15,8 @@ from .operators.container import (AddLocator, AddSlicer, ContainerProps,
|
|||||||
SaveContainer, LoadContainer,
|
SaveContainer, LoadContainer,
|
||||||
AddPieCutter, AddPlaneCutter,
|
AddPieCutter, AddPlaneCutter,
|
||||||
AddCylinderCutter, AddCubeCutter, AddSphereCutter,
|
AddCylinderCutter, AddCubeCutter, AddSphereCutter,
|
||||||
ExtractBboxWire, ExtractMesh, ExtractVolume, ExtractShapeWire,
|
ExtractBboxWire, ExtractMesh, ExtractShapeWire,
|
||||||
ExtractNodeMesh, ExtractNodeBboxWire, ExtractNodeVolume, ExtractNodeShapeWire)
|
ExtractNodeMesh, ExtractNodeBboxWire, ExtractNodeShapeWire)
|
||||||
|
|
||||||
from .operators.io import (ImportAsLabel, ImportAsScalar, ImportAsColor)
|
from .operators.io import (ImportAsLabel, ImportAsScalar, ImportAsColor)
|
||||||
from .operators.misc import (CleanTemp,
|
from .operators.misc import (CleanTemp,
|
||||||
@@ -80,7 +80,6 @@ class ExtractFromContainerMenu(bpy.types.Menu):
|
|||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
layout.operator(ExtractMesh.bl_idname)
|
layout.operator(ExtractMesh.bl_idname)
|
||||||
layout.operator(ExtractVolume.bl_idname)
|
|
||||||
layout.operator(ExtractShapeWire.bl_idname)
|
layout.operator(ExtractShapeWire.bl_idname)
|
||||||
layout.operator(ExtractBboxWire.bl_idname)
|
layout.operator(ExtractBboxWire.bl_idname)
|
||||||
|
|
||||||
@@ -261,7 +260,6 @@ class NodeContextMenu(bpy.types.Menu):
|
|||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
layout.operator(ExtractNodeMesh.bl_idname)
|
layout.operator(ExtractNodeMesh.bl_idname)
|
||||||
layout.operator(ExtractNodeVolume.bl_idname)
|
|
||||||
layout.operator(ExtractNodeShapeWire.bl_idname)
|
layout.operator(ExtractNodeShapeWire.bl_idname)
|
||||||
layout.operator(ExtractNodeBboxWire.bl_idname)
|
layout.operator(ExtractNodeBboxWire.bl_idname)
|
||||||
|
|
||||||
|
|||||||
@@ -152,14 +152,6 @@ class ExtractNodeMesh(bpy.types.Operator, ExtractNodeObject):
|
|||||||
object_type = "Mesh"
|
object_type = "Mesh"
|
||||||
|
|
||||||
|
|
||||||
class ExtractNodeVolume(bpy.types.Operator, ExtractNodeObject):
|
|
||||||
bl_idname = "bioxelnodes.extract_node_volume"
|
|
||||||
bl_label = "Extract Volume"
|
|
||||||
bl_description = "Extract Volume"
|
|
||||||
bl_icon = "OUTLINER_OB_VOLUME"
|
|
||||||
object_type = "Volume"
|
|
||||||
|
|
||||||
|
|
||||||
class ExtractNodeShapeWire(bpy.types.Operator, ExtractNodeObject):
|
class ExtractNodeShapeWire(bpy.types.Operator, ExtractNodeObject):
|
||||||
bl_idname = "bioxelnodes.extract_node_shape_wire"
|
bl_idname = "bioxelnodes.extract_node_shape_wire"
|
||||||
bl_label = "Extract Shape Wire"
|
bl_label = "Extract Shape Wire"
|
||||||
@@ -204,7 +196,17 @@ class ExtractObject():
|
|||||||
use_link=get_use_link())
|
use_link=get_use_link())
|
||||||
|
|
||||||
fetch_mesh_node.inputs[0].default_value = container_obj
|
fetch_mesh_node.inputs[0].default_value = container_obj
|
||||||
node_group.links.new(fetch_mesh_node.outputs[0], output_node.inputs[0])
|
|
||||||
|
if self.object_type == "Mesh":
|
||||||
|
node_group.links.new(
|
||||||
|
fetch_mesh_node.outputs[0], output_node.inputs[0])
|
||||||
|
else:
|
||||||
|
curve_to_mesh_node = node_group.nodes.new(
|
||||||
|
"GeometryNodeCurveToMesh")
|
||||||
|
node_group.links.new(
|
||||||
|
fetch_mesh_node.outputs[0], curve_to_mesh_node.inputs[0])
|
||||||
|
node_group.links.new(
|
||||||
|
curve_to_mesh_node.outputs[0], output_node.inputs[0])
|
||||||
|
|
||||||
for modifier in obj.modifiers:
|
for modifier in obj.modifiers:
|
||||||
bpy.ops.object.modifier_apply(modifier=modifier.name)
|
bpy.ops.object.modifier_apply(modifier=modifier.name)
|
||||||
@@ -226,14 +228,6 @@ class ExtractMesh(bpy.types.Operator, ExtractObject):
|
|||||||
object_type = "Mesh"
|
object_type = "Mesh"
|
||||||
|
|
||||||
|
|
||||||
class ExtractVolume(bpy.types.Operator, ExtractObject):
|
|
||||||
bl_idname = "bioxelnodes.extract_volume"
|
|
||||||
bl_label = "Extract Volume"
|
|
||||||
bl_description = "Extract Volume"
|
|
||||||
bl_icon = "OUTLINER_OB_VOLUME"
|
|
||||||
object_type = "Volume"
|
|
||||||
|
|
||||||
|
|
||||||
class ExtractShapeWire(bpy.types.Operator, ExtractObject):
|
class ExtractShapeWire(bpy.types.Operator, ExtractObject):
|
||||||
bl_idname = "bioxelnodes.extract_shape_wire"
|
bl_idname = "bioxelnodes.extract_shape_wire"
|
||||||
bl_label = "Extract Shape Wire"
|
bl_label = "Extract Shape Wire"
|
||||||
|
|||||||
Reference in New Issue
Block a user