fix: the as color button's text is incorrectly written as "as label"

feat: speed up convertion when as label
feat: add new "Extrude Transform" node
This commit is contained in:
2024-09-27 14:53:47 +08:00
parent 63c593f09a
commit 487cea4662
38 changed files with 241 additions and 25 deletions

View File

@@ -96,8 +96,8 @@ class ImportAsLabel(bpy.types.Operator, ImportVolumetricData):
class ImportAsColor(bpy.types.Operator, ImportVolumetricData):
bl_idname = "bioxelnodes.import_as_color"
bl_label = "Import as Label"
bl_description = "Import Volumetric Data to Container as Label"
bl_label = "Import as Color"
bl_description = "Import Volumetric Data to Container as Color"
bl_icon = "EVENT_C"
read_as = "COLOR"
@@ -505,7 +505,7 @@ class ImportVolumetricDataDialog(bpy.types.Operator):
label_count: bpy.props.IntProperty() # type: ignore
smooth: bpy.props.IntProperty(name="Smooth Size (Larger takes longer time)",
default=3) # type: ignore
default=0) # type: ignore
read_as: bpy.props.EnumProperty(name="Read as",
default="SCALAR",
@@ -624,7 +624,7 @@ class ImportVolumetricDataDialog(bpy.types.Operator):
progress,
progress_step)
label_data = data == np.full_like(data, i+1)
label_data = label_data.astype(np.float32)
# label_data = label_data.astype(np.float32)
try:
layer = Layer(data=label_data,
name=name_i,

View File

@@ -370,8 +370,6 @@ class FillOperator(OutputLayerOperator):
def invoke(self, context, event):
layer_obj = get_selected_layer(context)
if layer_obj:
scalar_min = get_layer_prop_value(layer_obj, "min")
self.fill_value = min(scalar_min, 0)
name = get_layer_label(layer_obj)
context.window_manager.invoke_props_dialog(self,
title=f"Fill {name}")