def NodeInitProps(self): self.method = api.ChoiceProp(idname="Method", default="Canny", choices=["Find Edges", "Canny"], label="Method:") self.lower_threshold = api.PositiveIntegerProp( idname="Lower Threshold", default=30, min_val=0, max_val=100, widget=api.SLIDER_WIDGET, label="Lower Threshold:") self.higher_threshold = api.PositiveIntegerProp( idname="Higher Threshold", default=100, min_val=0, max_val=100, widget=api.SLIDER_WIDGET, label="Higher Threshold:") self.NodeAddProp(self.method) self.NodeAddProp(self.lower_threshold) self.NodeAddProp(self.higher_threshold)
def NodeInitProps(self): filter_type = api.ChoiceProp(idname="Filter Type", default="Gaussian", choices=["Box", "Gaussian"], label="Filter Type:") kernel_size = api.PositiveIntegerProp( idname="Kernel Size", default=1, min_val=1, max_val=400, widget=api.SLIDER_WIDGET, label="Kernel Size:", ) kernel_x = api.PositiveIntegerProp( idname="Kernel X", default=1, min_val=1, max_val=1600, widget=api.SLIDER_WIDGET, label="Kernel X:", ) kernel_y = api.PositiveIntegerProp( idname="Kernel Y", default=1, min_val=1, max_val=1600, widget=api.SLIDER_WIDGET, label="Kernel Y:", ) self.NodeAddProp(filter_type) self.NodeAddProp(kernel_size) self.NodeAddProp(kernel_x) self.NodeAddProp(kernel_y)
def NodeInitProps(self): self.layer_prop = api.ChoiceProp( idname="Layer", default="", label="Layer:", choices=self.QueryBlenderImageLayers()) self.NodeAddProp(self.layer_prop)
def NodeInitProps(self): p = api.ChoiceProp( idname="Direction", default="Horizontal", label="Direction:", choices=["Horizontal", "Vertical"], ) self.NodeAddProp(p)
def NodeInitProps(self): p = api.ChoiceProp(idname="Blend Mode", default="Multiply", label="Blend Mode:", choices=[ 'Add', 'Add Modulo', 'Subtract', 'Subtract Modulo', 'Multiply', 'Screen', 'Difference', 'Darker', 'Lighter', 'Soft Light', 'Hard Light', 'Overlay' ]) self.NodeAddProp(p)
def NodeInitProps(self): p1 = api.ChoiceProp(idname="Image Channel", default="R", label="Image Channel:", choices=['R', 'G', 'B', 'A']) p2 = api.BooleanProp(idname="Greyscale", default=False, label="Greyscale:", cb_label="Greyscale image channel") self.NodeAddProp(p1) self.NodeAddProp(p2)
def NodeInitProps(self): operation = api.ChoiceProp(idname="Operation", default="Erode", choices=[ "Dilate", "Erode", "Opening", "Closing", "Top Hat", "Black Hat" ], label="Operation:") kernel_shape = api.ChoiceProp( idname="Kernel Shape", default="Rectangle", choices=["Rectangle", "Ellipse", "Cross"], label="Kernel Shape:") kernel_size = api.PositiveIntegerProp(idname="Kernel Size", default=5, min_val=1, max_val=100, widget=api.SLIDER_WIDGET, label="Kernel Size:") self.NodeAddProp(operation) self.NodeAddProp(kernel_shape) self.NodeAddProp(kernel_size)
def NodeInitProps(self): # General self.method = api.ChoiceProp(idname="Method", default="Rectangle", choices=["Rectangle", "Circle"], label="Method:") self.NodeAddProp(self.method) # Rectangle self.x = api.PositiveIntegerProp(idname="X", default=0, min_val=0, max_val=100000, widget=api.SPINBOX_WIDGET, label="X:") self.y = api.PositiveIntegerProp(idname="Y", default=0, min_val=0, max_val=100000, widget=api.SPINBOX_WIDGET, label="Y:") self.width = api.PositiveIntegerProp(idname="Width", default=255, min_val=1, max_val=100000, widget=api.SPINBOX_WIDGET, label="Width:") self.height = api.PositiveIntegerProp(idname="Height", default=255, min_val=1, max_val=100000, widget=api.SPINBOX_WIDGET, label="Height:") self.NodeAddProp(self.x) self.NodeAddProp(self.y) self.NodeAddProp(self.width) self.NodeAddProp(self.height) # Circle self.center = api.SizeProp(idname="Center", default=[255, 255], min_val=0, max_val=100000, label="Center:", visible=False) self.radius = api.PositiveIntegerProp(idname="Radius", default=255, min_val=1, max_val=100000, widget=api.SPINBOX_WIDGET, label="Radius:", visible=False) self.NodeAddProp(self.center) self.NodeAddProp(self.radius)