Skip to content
Snippets Groups Projects
__init__.py 176 KiB
Newer Older
  • Learn to ignore specific revisions
  • 
                if base_mat.transparency_method == 'RAYTRACE':
                    layout.separator()
                    split = layout.split()
                    split.active = base_mat.use_transparency
    
                    col = split.column()
                    col.prop(rayt, "ior")
                    col.prop(rayt, "filter")
                    col.prop(rayt, "falloff")
                    col.prop(rayt, "depth_max")
                    col.prop(rayt, "depth")
    
                    col = split.column()
                    col.label(text="Gloss:")
                    col.prop(rayt, "gloss_factor", text="Amount")
                    sub = col.column()
                    sub.active = rayt.gloss_factor < 1.0
                    sub.prop(rayt, "gloss_threshold", text="Threshold")
                    sub.prop(rayt, "gloss_samples", text="Samples")
    
    
        class MATERIAL_PT_mirror(MaterialButtonsPanel, Panel):
            bl_label = "Mirror"
            bl_options = {'DEFAULT_CLOSED'}
            COMPAT_ENGINES = {'BLENDER_RENDER'}
    
            @classmethod
            def poll(cls, context):
                mat = context.material
                engine = context.scene.render.engine
                return check_material(mat) and (mat.type in {'SURFACE', 'WIRE'}) and (engine in cls.COMPAT_ENGINES)
    
            def draw_header(self, context):
                raym = active_node_mat(context.material).raytrace_mirror
    
                self.layout.prop(raym, "use", text="")
    
            def draw(self, context):
                layout = self.layout
    
                mat = active_node_mat(context.material)
                raym = mat.raytrace_mirror
    
                layout.active = raym.use
    
                split = layout.split()
    
                col = split.column()
                col.prop(raym, "reflect_factor")
                col.prop(mat, "mirror_color", text="")
    
                col = split.column()
                col.prop(raym, "fresnel")
                sub = col.column()
                sub.active = (raym.fresnel > 0.0)
                sub.prop(raym, "fresnel_factor", text="Blend")
    
                split = layout.split()
    
                col = split.column()
                col.separator()
                col.prop(raym, "depth")
                col.prop(raym, "distance", text="Max Dist")
                col.separator()
                sub = col.split(percentage=0.4)
                sub.active = (raym.distance > 0.0)
                sub.label(text="Fade To:")
                sub.prop(raym, "fade_to", text="")
    
                col = split.column()
                col.label(text="Gloss:")
                col.prop(raym, "gloss_factor", text="Amount")
                sub = col.column()
                sub.active = (raym.gloss_factor < 1.0)
                sub.prop(raym, "gloss_threshold", text="Threshold")
                sub.prop(raym, "gloss_samples", text="Samples")
                sub.prop(raym, "gloss_anisotropic", text="Anisotropic")
    
    
        class MATERIAL_PT_sss(MaterialButtonsPanel, Panel):
            bl_label = "Subsurface Scattering"
            bl_options = {'DEFAULT_CLOSED'}
            COMPAT_ENGINES = {'BLENDER_RENDER'}
    
            @classmethod
            def poll(cls, context):
                mat = context.material
                engine = context.scene.render.engine
                return check_material(mat) and (mat.type in {'SURFACE', 'WIRE'}) and (engine in cls.COMPAT_ENGINES)
    
            def draw_header(self, context):
                mat = active_node_mat(context.material)
                sss = mat.subsurface_scattering
    
                self.layout.active = (not mat.use_shadeless)
                self.layout.prop(sss, "use", text="")
    
            def draw(self, context):
                layout = self.layout
    
                mat = active_node_mat(context.material)
                sss = mat.subsurface_scattering
    
                layout.active = (sss.use) and (not mat.use_shadeless)
    
                row = layout.row().split()
                sub = row.row(align=True).split(align=True, percentage=0.75)
                sub.menu("MATERIAL_MT_sss_presets", text=bpy.types.MATERIAL_MT_sss_presets.bl_label)
                sub.operator("material.sss_preset_add", text="", icon='ZOOMIN')
                sub.operator("material.sss_preset_add", text="", icon='ZOOMOUT').remove_active = True
    
                split = layout.split()
    
                col = split.column()
                col.prop(sss, "ior")
                col.prop(sss, "scale")
                col.prop(sss, "color", text="")
                col.prop(sss, "radius", text="RGB Radius", expand=True)
    
                col = split.column()
                sub = col.column(align=True)
                sub.label(text="Blend:")
                sub.prop(sss, "color_factor", text="Color")
                sub.prop(sss, "texture_factor", text="Texture")
                sub.label(text="Scattering Weight:")
                sub.prop(sss, "front")
                sub.prop(sss, "back")
                col.separator()
                col.prop(sss, "error_threshold", text="Error")
    
    
        class MATERIAL_PT_halo(MaterialButtonsPanel, Panel):
            bl_label = "Halo"
            COMPAT_ENGINES = {'BLENDER_RENDER'}
    
            @classmethod
            def poll(cls, context):
                mat = context.material
                engine = context.scene.render.engine
                return mat and (mat.type == 'HALO') and (engine in cls.COMPAT_ENGINES)
    
            def draw(self, context):
                layout = self.layout
    
                mat = context.material  # don't use node material
                halo = mat.halo
    
                def number_but(layout, toggle, number, name, color):
                    row = layout.row(align=True)
                    row.prop(halo, toggle, text="")
                    sub = row.column(align=True)
                    sub.active = getattr(halo, toggle)
                    sub.prop(halo, number, text=name, translate=False)
                    if not color == "":
                        sub.prop(mat, color, text="")
    
                split = layout.split()
    
                col = split.column()
                col.prop(mat, "alpha")
                col.prop(mat, "diffuse_color", text="")
                col.prop(halo, "seed")
    
                col = split.column()
                col.prop(halo, "size")
                col.prop(halo, "hardness")
                col.prop(halo, "add")
    
                layout.label(text="Options:")
    
                split = layout.split()
                col = split.column()
                col.prop(halo, "use_texture")
                col.prop(halo, "use_vertex_normal")
                col.prop(halo, "use_extreme_alpha")
                col.prop(halo, "use_shaded")
                col.prop(halo, "use_soft")
    
                col = split.column()
                number_but(col, "use_ring", "ring_count", iface_("Rings"), "mirror_color")
                number_but(col, "use_lines", "line_count", iface_("Lines"), "specular_color")
                number_but(col, "use_star", "star_tip_count", iface_("Star Tips"), "")
    
    
        class MATERIAL_PT_flare(MaterialButtonsPanel, Panel):
            bl_label = "Flare"
            COMPAT_ENGINES = {'BLENDER_RENDER'}
    
            @classmethod
            def poll(cls, context):
                mat = context.material
                engine = context.scene.render.engine
                return mat and (mat.type == 'HALO') and (engine in cls.COMPAT_ENGINES)
    
            def draw_header(self, context):
                halo = context.material.halo
    
                self.layout.prop(halo, "use_flare_mode", text="")
    
            def draw(self, context):
                layout = self.layout
    
                mat = context.material  # don't use node material
                halo = mat.halo
    
                layout.active = halo.use_flare_mode
    
                split = layout.split()
    
                col = split.column()
                col.prop(halo, "flare_size", text="Size")
                col.prop(halo, "flare_boost", text="Boost")
                col.prop(halo, "flare_seed", text="Seed")
    
                col = split.column()
                col.prop(halo, "flare_subflare_count", text="Subflares")
                col.prop(halo, "flare_subflare_size", text="Subsize")
    
        '''
    #######################End Old Blender Internal Props##########################
    
    ###############################################################################
    # Povray Nodes
    
    ###############################################################################
    
    class PovraySocketUniversal(bpy.types.NodeSocket):
        bl_idname = 'PovraySocketUniversal'
        bl_label = 'Povray Socket'
    
        value_unlimited: bpy.props.FloatProperty(default=0.0)
        value_0_1: bpy.props.FloatProperty(min=0.0,max=1.0,default=0.0)
        value_0_10: bpy.props.FloatProperty(min=0.0,max=10.0,default=0.0)
        value_000001_10: bpy.props.FloatProperty(min=0.000001,max=10.0,default=0.0)
        value_1_9: bpy.props.IntProperty(min=1,max=9,default=1)
        value_0_255: bpy.props.IntProperty(min=0,max=255,default=0)
        percent: bpy.props.FloatProperty(min=0.0,max=100.0,default=0.0)
    
        def draw(self, context, layout, node, text):
            space = context.space_data
            tree = space.edit_tree
            links=tree.links
            if self.is_linked:
                value=[]
                for link in links:
                    if link.from_node==node:
                        inps=link.to_node.inputs
    
                        for inp in inps:
    
                            if inp.bl_idname=="PovraySocketFloat_0_1" and inp.is_linked:
                                prop="value_0_1"
                                if prop not in value:
                                    value.append(prop)
                            if inp.bl_idname=="PovraySocketFloat_000001_10" and inp.is_linked:
                                prop="value_000001_10"
                                if prop not in value:
                                    value.append(prop)
                            if inp.bl_idname=="PovraySocketFloat_0_10" and inp.is_linked:
                                prop="value_0_10"
                                if prop not in value:
                                    value.append(prop)
                            if inp.bl_idname=="PovraySocketInt_1_9" and inp.is_linked:
                                prop="value_1_9"
                                if prop not in value:
                                    value.append(prop)
                            if inp.bl_idname=="PovraySocketInt_0_255" and inp.is_linked:
                                prop="value_0_255"
                                if prop not in value:
                                    value.append(prop)
                            if inp.bl_idname=="PovraySocketFloatUnlimited" and inp.is_linked:
                                prop="value_unlimited"
                                if prop not in value:
                                    value.append(prop)
                if len(value)==1:
                    layout.prop(self, "%s"%value[0], text=text)
                else:
                    layout.prop(self, "percent", text="Percent")
            else:
                layout.prop(self, "percent", text=text)
        def draw_color(self, context, node):
            return (1, 0, 0, 1)
    
    class PovraySocketFloat_0_1(bpy.types.NodeSocket):
        bl_idname = 'PovraySocketFloat_0_1'
        bl_label = 'Povray Socket'
    
        default_value: bpy.props.FloatProperty(description="Input node Value_0_1",min=0,max=1,default=0)
    
        def draw(self, context, layout, node, text):
            if self.is_linked:
                layout.label(text)
            else:
                layout.prop(self, "default_value", text=text, slider=True)
    
        def draw_color(self, context, node):
            return (0.5, 0.7, 0.7, 1)
    
    class PovraySocketFloat_0_10(bpy.types.NodeSocket):
        bl_idname = 'PovraySocketFloat_0_10'
        bl_label = 'Povray Socket'
    
        default_value: bpy.props.FloatProperty(description="Input node Value_0_10",min=0,max=10,default=0)
    
        def draw(self, context, layout, node, text):
            if node.bl_idname == 'ShaderNormalMapNode' and node.inputs[2].is_linked:
    
                layout.label(text='')
    
                self.hide_value=True
            if self.is_linked:
                layout.label(text)
            else:
                layout.prop(self, "default_value", text=text, slider=True)
        def draw_color(self, context, node):
            return (0.65, 0.65, 0.65, 1)
    
    class PovraySocketFloat_10(bpy.types.NodeSocket):
        bl_idname = 'PovraySocketFloat_10'
        bl_label = 'Povray Socket'
    
        default_value: bpy.props.FloatProperty(description="Input node Value_10",min=-10,max=10,default=0)
    
        def draw(self, context, layout, node, text):
            if node.bl_idname == 'ShaderNormalMapNode' and node.inputs[2].is_linked:
    
                layout.label(text='')
    
                self.hide_value=True
            if self.is_linked:
                layout.label(text)
            else:
                layout.prop(self, "default_value", text=text, slider=True)
        def draw_color(self, context, node):
            return (0.65, 0.65, 0.65, 1)
    
    class PovraySocketFloatPositive(bpy.types.NodeSocket):
        bl_idname = 'PovraySocketFloatPositive'
        bl_label = 'Povray Socket'
    
        default_value: bpy.props.FloatProperty(description="Input Node Value Positive", min=0.0, default=0)
    
        def draw(self, context, layout, node, text):
            if self.is_linked:
                layout.label(text)
            else:
                layout.prop(self, "default_value", text=text, slider=True)
        def draw_color(self, context, node):
            return (0.045, 0.005, 0.136, 1)
    
    class PovraySocketFloat_000001_10(bpy.types.NodeSocket):
        bl_idname = 'PovraySocketFloat_000001_10'
        bl_label = 'Povray Socket'
    
        default_value: bpy.props.FloatProperty(min=0.000001,max=10,default=0.000001)
    
        def draw(self, context, layout, node, text):
            if self.is_output or self.is_linked:
                layout.label(text)
            else:
                layout.prop(self, "default_value", text=text, slider=True)
        def draw_color(self, context, node):
            return (1, 0, 0, 1)
    
    class PovraySocketFloatUnlimited(bpy.types.NodeSocket):
        bl_idname = 'PovraySocketFloatUnlimited'
        bl_label = 'Povray Socket'
    
        default_value: bpy.props.FloatProperty(default = 0.0)
    
        def draw(self, context, layout, node, text):
            if self.is_linked:
                layout.label(text)
            else:
                layout.prop(self, "default_value", text=text, slider=True)
        def draw_color(self, context, node):
            return (0.7, 0.7, 1, 1)
    
    class PovraySocketInt_1_9(bpy.types.NodeSocket):
        bl_idname = 'PovraySocketInt_1_9'
        bl_label = 'Povray Socket'
    
        default_value: bpy.props.IntProperty(description="Input node Value_1_9",min=1,max=9,default=6)
    
        def draw(self, context, layout, node, text):
            if self.is_linked:
                layout.label(text)
            else:
                layout.prop(self, "default_value", text=text)
        def draw_color(self, context, node):
            return (1, 0.7, 0.7, 1)
    
    class PovraySocketInt_0_256(bpy.types.NodeSocket):
        bl_idname = 'PovraySocketInt_0_256'
        bl_label = 'Povray Socket'
    
        default_value: bpy.props.IntProperty(min=0,max=255,default=0)
    
        def draw(self, context, layout, node, text):
            if self.is_linked:
                layout.label(text)
            else:
                layout.prop(self, "default_value", text=text)
        def draw_color(self, context, node):
            return (0.5, 0.5, 0.5, 1)
    
    
    class PovraySocketPattern(bpy.types.NodeSocket):
        bl_idname = 'PovraySocketPattern'
        bl_label = 'Povray Socket'
    
    
        default_value: bpy.props.EnumProperty(
    
                name="Pattern",
                description="Select the pattern",
    
    Maurice Raybaud's avatar
    Maurice Raybaud committed
                items=(
                    ('boxed', "Boxed", ""),
                    ('brick', "Brick", ""),
                    ('cells', "Cells", ""),
                    ('checker', "Checker", ""),
                    ('granite', "Granite", ""),
                    ('leopard', "Leopard", ""),
                    ('marble', "Marble", ""),
                    ('onion', "Onion", ""),
                    ('planar', "Planar", ""),
                    ('quilted', "Quilted", ""),
                    ('ripples', "Ripples", ""),
                    ('radial', "Radial", ""),
                    ('spherical', "Spherical", ""),
                    ('spotted', "Spotted", ""),
                    ('waves', "Waves", ""),
                    ('wood', "Wood", ""),
                    ('wrinkles', "Wrinkles", "")
                ),
    
                default='granite')
    
        def draw(self, context, layout, node, text):
            if self.is_output or self.is_linked:
    
                layout.label(text="Pattern")
    
            else:
                layout.prop(self, "default_value", text=text)
    
        def draw_color(self, context, node):
            return (1, 1, 1, 1)
    
    class PovraySocketColor(bpy.types.NodeSocket):
        bl_idname = 'PovraySocketColor'
        bl_label = 'Povray Socket'
    
    
        default_value: bpy.props.FloatVectorProperty(
    
                precision=4, step=0.01, min=0, soft_max=1,
                default=(0.0, 0.0, 0.0), options={'ANIMATABLE'}, subtype='COLOR')
    
        def draw(self, context, layout, node, text):
            if self.is_output or self.is_linked:
                layout.label(text)
            else:
                layout.prop(self, "default_value", text=text)
    
        def draw_color(self, context, node):
            return (1, 1, 0, 1)
    
    class PovraySocketColorRGBFT(bpy.types.NodeSocket):
        bl_idname = 'PovraySocketColorRGBFT'
        bl_label = 'Povray Socket'
    
    
        default_value: bpy.props.FloatVectorProperty(
    
                precision=4, step=0.01, min=0, soft_max=1,
                default=(0.0, 0.0, 0.0), options={'ANIMATABLE'}, subtype='COLOR')
    
        f: bpy.props.FloatProperty(default = 0.0,min=0.0,max=1.0)
        t: bpy.props.FloatProperty(default = 0.0,min=0.0,max=1.0)
    
        def draw(self, context, layout, node, text):
            if self.is_output or self.is_linked:
                layout.label(text)
            else:
                layout.prop(self, "default_value", text=text)
    
        def draw_color(self, context, node):
            return (1, 1, 0, 1)
    
    class PovraySocketTexture(bpy.types.NodeSocket):
        bl_idname = 'PovraySocketTexture'
        bl_label = 'Povray Socket'
    
        default_value: bpy.props.IntProperty()
    
        def draw(self, context, layout, node, text):
            layout.label(text)
    
        def draw_color(self, context, node):
            return (0, 1, 0, 1)
    
    
    
    class PovraySocketTransform(bpy.types.NodeSocket):
        bl_idname = 'PovraySocketTransform'
        bl_label = 'Povray Socket'
    
        default_value: bpy.props.IntProperty(min=0,max=255,default=0)
    
        def draw(self, context, layout, node, text):
            layout.label(text)
    
        def draw_color(self, context, node):
            return (99/255, 99/255, 199/255, 1)
    
    class PovraySocketNormal(bpy.types.NodeSocket):
        bl_idname = 'PovraySocketNormal'
        bl_label = 'Povray Socket'
    
        default_value: bpy.props.IntProperty(min=0,max=255,default=0)
    
        def draw(self, context, layout, node, text):
            layout.label(text)
    
        def draw_color(self, context, node):
            return (0.65, 0.65, 0.65, 1)
    
    class PovraySocketSlope(bpy.types.NodeSocket):
        bl_idname = 'PovraySocketSlope'
        bl_label = 'Povray Socket'
    
        default_value: bpy.props.FloatProperty(min = 0.0, max = 1.0)
        height: bpy.props.FloatProperty(min = 0.0, max = 10.0)
        slope: bpy.props.FloatProperty(min = -10.0, max = 10.0)
    
        def draw(self, context, layout, node, text):
            if self.is_output or self.is_linked:
                layout.label(text)
            else:
                layout.prop(self,'default_value',text='')
                layout.prop(self,'height',text='')
                layout.prop(self,'slope',text='')
        def draw_color(self, context, node):
            return (0, 0, 0, 1)
    
    class PovraySocketMap(bpy.types.NodeSocket):
        bl_idname = 'PovraySocketMap'
        bl_label = 'Povray Socket'
    
        default_value: bpy.props.StringProperty()
    
        def draw(self, context, layout, node, text):
            layout.label(text)
        def draw_color(self, context, node):
            return (0.2, 0, 0.2, 1)
    
    class PovrayShaderNodeCategory(NodeCategory):
        @classmethod
        def poll(cls, context):
            return context.space_data.tree_type == 'ObjectNodeTree'
    
    class PovrayTextureNodeCategory(NodeCategory):
        @classmethod
        def poll(cls, context):
            return context.space_data.tree_type == 'TextureNodeTree'
    
    class PovraySceneNodeCategory(NodeCategory):
        @classmethod
        def poll(cls, context):
            return context.space_data.tree_type == 'CompositorNodeTree'
    
    node_categories = [
    
        PovrayShaderNodeCategory("SHADEROUTPUT", "Output", items=[
            NodeItem("PovrayOutputNode"),
            ]),
    
        PovrayShaderNodeCategory("SIMPLE", "Simple texture", items=[
            NodeItem("PovrayTextureNode"),
            ]),
    
        PovrayShaderNodeCategory("MAPS", "Maps", items=[
            NodeItem("PovrayBumpMapNode"),
            NodeItem("PovrayColorImageNode"),
            NodeItem("ShaderNormalMapNode"),
            NodeItem("PovraySlopeNode"),
            NodeItem("ShaderTextureMapNode"),
            NodeItem("ShaderNodeValToRGB"),
            ]),
    
        PovrayShaderNodeCategory("OTHER", "Other patterns", items=[
            NodeItem("PovrayImagePatternNode"),
            NodeItem("ShaderPatternNode"),
            ]),
    
        PovrayShaderNodeCategory("COLOR", "Color", items=[
            NodeItem("PovrayPigmentNode"),
            ]),
    
        PovrayShaderNodeCategory("TRANSFORM", "Transform", items=[
            NodeItem("PovrayMappingNode"),
            NodeItem("PovrayMultiplyNode"),
            NodeItem("PovrayModifierNode"),
            NodeItem("PovrayTransformNode"),
            NodeItem("PovrayValueNode"),
            ]),
    
        PovrayShaderNodeCategory("FINISH", "Finish", items=[
            NodeItem("PovrayFinishNode"),
            NodeItem("PovrayDiffuseNode"),
            NodeItem("PovraySpecularNode"),
            NodeItem("PovrayPhongNode"),
            NodeItem("PovrayAmbientNode"),
            NodeItem("PovrayMirrorNode"),
            NodeItem("PovrayIridescenceNode"),
            NodeItem("PovraySubsurfaceNode"),
    
    
        PovrayShaderNodeCategory("CYCLES", "Cycles", items=[
            NodeItem("ShaderNodeAddShader"),
            NodeItem("ShaderNodeAmbientOcclusion"),
            NodeItem("ShaderNodeAttribute"),
            NodeItem("ShaderNodeBackground"),
            NodeItem("ShaderNodeBlackbody"),
            NodeItem("ShaderNodeBrightContrast"),
            NodeItem("ShaderNodeBsdfAnisotropic"),
            NodeItem("ShaderNodeBsdfDiffuse"),
            NodeItem("ShaderNodeBsdfGlass"),
            NodeItem("ShaderNodeBsdfGlossy"),
            NodeItem("ShaderNodeBsdfHair"),
            NodeItem("ShaderNodeBsdfRefraction"),
            NodeItem("ShaderNodeBsdfToon"),
            NodeItem("ShaderNodeBsdfTranslucent"),
            NodeItem("ShaderNodeBsdfTransparent"),
            NodeItem("ShaderNodeBsdfVelvet"),
            NodeItem("ShaderNodeBump"),
            NodeItem("ShaderNodeCameraData"),
            NodeItem("ShaderNodeCombineHSV"),
            NodeItem("ShaderNodeCombineRGB"),
            NodeItem("ShaderNodeCombineXYZ"),
            NodeItem("ShaderNodeEmission"),
            NodeItem("ShaderNodeExtendedMaterial"),
            NodeItem("ShaderNodeFresnel"),
            NodeItem("ShaderNodeGamma"),
            NodeItem("ShaderNodeGeometry"),
            NodeItem("ShaderNodeGroup"),
            NodeItem("ShaderNodeHairInfo"),
            NodeItem("ShaderNodeHoldout"),
            NodeItem("ShaderNodeHueSaturation"),
            NodeItem("ShaderNodeInvert"),
            NodeItem("ShaderNodeLampData"),
            NodeItem("ShaderNodeLayerWeight"),
            NodeItem("ShaderNodeLightFalloff"),
            NodeItem("ShaderNodeLightPath"),
            NodeItem("ShaderNodeMapping"),
            NodeItem("ShaderNodeMaterial"),
            NodeItem("ShaderNodeMath"),
            NodeItem("ShaderNodeMixRGB"),
            NodeItem("ShaderNodeMixShader"),
            NodeItem("ShaderNodeNewGeometry"),
            NodeItem("ShaderNodeNormal"),
            NodeItem("ShaderNodeNormalMap"),
            NodeItem("ShaderNodeObjectInfo"),
            NodeItem("ShaderNodeOutput"),
            NodeItem("ShaderNodeOutputLamp"),
            NodeItem("ShaderNodeOutputLineStyle"),
            NodeItem("ShaderNodeOutputMaterial"),
            NodeItem("ShaderNodeOutputWorld"),
            NodeItem("ShaderNodeParticleInfo"),
            NodeItem("ShaderNodeRGB"),
            NodeItem("ShaderNodeRGBCurve"),
            NodeItem("ShaderNodeRGBToBW"),
            NodeItem("ShaderNodeScript"),
            NodeItem("ShaderNodeSeparateHSV"),
            NodeItem("ShaderNodeSeparateRGB"),
            NodeItem("ShaderNodeSeparateXYZ"),
            NodeItem("ShaderNodeSqueeze"),
            NodeItem("ShaderNodeSubsurfaceScattering"),
            NodeItem("ShaderNodeTangent"),
            NodeItem("ShaderNodeTexBrick"),
            NodeItem("ShaderNodeTexChecker"),
            NodeItem("ShaderNodeTexCoord"),
            NodeItem("ShaderNodeTexEnvironment"),
            NodeItem("ShaderNodeTexGradient"),
            NodeItem("ShaderNodeTexImage"),
            NodeItem("ShaderNodeTexMagic"),
            NodeItem("ShaderNodeTexMusgrave"),
            NodeItem("ShaderNodeTexNoise"),
            NodeItem("ShaderNodeTexPointDensity"),
            NodeItem("ShaderNodeTexSky"),
            NodeItem("ShaderNodeTexVoronoi"),
            NodeItem("ShaderNodeTexWave"),
            NodeItem("ShaderNodeTexture"),
            NodeItem("ShaderNodeUVAlongStroke"),
            NodeItem("ShaderNodeUVMap"),
            NodeItem("ShaderNodeValToRGB"),
            NodeItem("ShaderNodeValue"),
            NodeItem("ShaderNodeVectorCurve"),
            NodeItem("ShaderNodeVectorMath"),
            NodeItem("ShaderNodeVectorTransform"),
            NodeItem("ShaderNodeVolumeAbsorption"),
            NodeItem("ShaderNodeVolumeScatter"),
            NodeItem("ShaderNodeWavelength"),
            NodeItem("ShaderNodeWireframe"),
            ]),
    
        PovrayTextureNodeCategory("TEXTUREOUTPUT", "Output", items=[
            NodeItem("TextureNodeValToRGB"),
            NodeItem("TextureOutputNode"),
            ]),
    
        PovraySceneNodeCategory("ISOSURFACE", "Isosurface", items=[
            NodeItem("IsoPropsNode"),
            ]),
    
        PovraySceneNodeCategory("FOG", "Fog", items=[
            NodeItem("PovrayFogNode"),
    
            ]),
        ]
    ############### end nodes
    
    ###############################################################################
    # Texture POV properties.
    ###############################################################################
    
    class RenderPovSettingsTexture(PropertyGroup):
    
    Maurice Raybaud's avatar
    Maurice Raybaud committed
        """Declare texture level properties controllable in UI and translated to POV."""
    
        # former Space properties from removed Blender Internal
    
        active_texture_index: IntProperty(
    
    Maurice Raybaud's avatar
    Maurice Raybaud committed
            name = "Index for texture_slots",
    
            min=0,
            max=17,
            default=0,
    
        use_limited_texture_context: BoolProperty(
    
    Maurice Raybaud's avatar
    Maurice Raybaud committed
            name="",
            description="Use the limited version of texture user (for ‘old shading’ mode)",
            default=True,
        )
    
    
        texture_context: EnumProperty(
    
    Maurice Raybaud's avatar
    Maurice Raybaud committed
            name="Texture context",
            description="Type of texture data to display and edit",
    
    Maurice Raybaud's avatar
    Maurice Raybaud committed
            items=(
                ('MATERIAL', "", "Show material textures", "MATERIAL",0), # "Show material textures"
                ('WORLD', "", "Show world textures", "WORLD",1), # "Show world textures"
                ('LAMP', "", "Show lamp textures", "LIGHT",2), # "Show lamp textures"
                ('PARTICLES', "", "Show particles textures", "PARTICLES",3), # "Show particles textures"
                ('LINESTYLE', "", "Show linestyle textures", "LINE_DATA",4), # "Show linestyle textures"
                ('OTHER', "", "Show other data textures", "TEXTURE_DATA",5), # "Show other data textures"
    
    Maurice Raybaud's avatar
    Maurice Raybaud committed
            default = 'MATERIAL',
        )
    
        # Custom texture gamma
    
        tex_gamma_enable: BoolProperty(
    
    Maurice Raybaud's avatar
    Maurice Raybaud committed
            name="Enable custom texture gamma",
            description="Notify some custom gamma for which texture has been precorrected "
            "without the file format carrying it and only if it differs from your "
            "OS expected standard (see pov doc)",
            default=False,
        )
    
        tex_gamma_value: FloatProperty(
    
    Maurice Raybaud's avatar
    Maurice Raybaud committed
            name="Custom texture gamma",
            description="value for which the file was issued e.g. a Raw photo is gamma 1.0",
            min=0.45, max=5.00, soft_min=1.00, soft_max=2.50, default=1.00
        )
    
    Maurice Raybaud's avatar
    Maurice Raybaud committed
    
    
        ##################################CustomPOV Code############################
    
    Maurice Raybaud's avatar
    Maurice Raybaud committed
        # commented out below if we wanted custom pov code in texture only, inside exported material:
        # replacement_text = StringProperty(
    
        #        name="Declared name:",
        #        description="Type the declared name in custom POV code or an external .inc "
        #                    "it points at. pigment {} expected",
        #        default="")
    
        tex_pattern_type: EnumProperty(
    
    Maurice Raybaud's avatar
    Maurice Raybaud committed
            name="Texture_Type",
            description="Choose between Blender or POV parameters to specify texture",
    
    Maurice Raybaud's avatar
    Maurice Raybaud committed
            items= (
                ('agate', 'Agate', '','PLUGIN', 0),
                ('aoi', 'Aoi', '', 'PLUGIN', 1),
                ('average', 'Average', '', 'PLUGIN', 2),
                ('boxed', 'Boxed', '', 'PLUGIN', 3),
                ('bozo', 'Bozo', '', 'PLUGIN', 4),
                ('bumps', 'Bumps', '', 'PLUGIN', 5),
                ('cells', 'Cells', '', 'PLUGIN', 6),
                ('crackle', 'Crackle', '', 'PLUGIN', 7),
                ('cubic', 'Cubic', '', 'PLUGIN', 8),
                ('cylindrical', 'Cylindrical', '', 'PLUGIN', 9),
                ('density_file', 'Density', '(.df3)', 'PLUGIN', 10),
                ('dents', 'Dents', '', 'PLUGIN', 11),
                ('fractal', 'Fractal', '', 'PLUGIN', 12),
                ('function', 'Function', '', 'PLUGIN', 13),
                ('gradient', 'Gradient', '', 'PLUGIN', 14),
                ('granite', 'Granite', '', 'PLUGIN', 15),
                ('image_pattern', 'Image pattern', '', 'PLUGIN', 16),
                ('leopard', 'Leopard', '', 'PLUGIN', 17),
                ('marble', 'Marble', '', 'PLUGIN', 18),
                ('onion', 'Onion', '', 'PLUGIN', 19),
                ('pigment_pattern', 'pigment pattern', '', 'PLUGIN', 20),
                ('planar', 'Planar', '', 'PLUGIN', 21),
                ('quilted', 'Quilted', '', 'PLUGIN', 22),
                ('radial', 'Radial', '', 'PLUGIN', 23),
                ('ripples', 'Ripples', '', 'PLUGIN', 24),
                ('slope', 'Slope', '', 'PLUGIN', 25),
                ('spherical', 'Spherical', '', 'PLUGIN', 26),
                ('spiral1', 'Spiral1', '', 'PLUGIN', 27),
                ('spiral2', 'Spiral2', '', 'PLUGIN', 28),
                ('spotted', 'Spotted', '', 'PLUGIN', 29),
                ('waves', 'Waves', '', 'PLUGIN', 30),
                ('wood', 'Wood', '', 'PLUGIN', 31),
                ('wrinkles', 'Wrinkles', '', 'PLUGIN', 32),
                ('brick', "Brick", "", 'PLUGIN', 33),
                ('checker', "Checker", "", 'PLUGIN', 34),
                ('hexagon', "Hexagon", "", 'PLUGIN', 35),
                ('object', "Mesh", "", 'PLUGIN', 36),
                ('emulator', "Internal Emulator", "", 'PLUG', 37)
            ),
    
    Maurice Raybaud's avatar
    Maurice Raybaud committed
            default='emulator',
        )
    
        magnet_style: EnumProperty(
    
    Maurice Raybaud's avatar
    Maurice Raybaud committed
            name="Magnet style",
            description="magnet or julia",
            items=(('mandel', "Mandelbrot", ""),('julia', "Julia", "")),
            default='julia',
        )
    
        magnet_type: IntProperty(
    
    Maurice Raybaud's avatar
    Maurice Raybaud committed
            name="Magnet_type",
            description="1 or 2",
    
            min=1,
            max=2,
            default=2,
    
        warp_types: EnumProperty(
    
    Maurice Raybaud's avatar
    Maurice Raybaud committed
            name="Warp Types",
            description="Select the type of warp",
            items=(('PLANAR', "Planar", ""), ('CUBIC', "Cubic", ""),
                   ('SPHERICAL', "Spherical", ""), ('TOROIDAL', "Toroidal", ""),
                   ('CYLINDRICAL', "Cylindrical", ""), ('NONE', "None", "No indentation")),
            default='NONE'
        )
    
        warp_orientation: EnumProperty(
    
    Maurice Raybaud's avatar
    Maurice Raybaud committed
            name="Warp Orientation",
            description="Select the orientation of warp",
            items=(('x', "X", ""), ('y', "Y", ""), ('z', "Z", "")),
            default='y',
        )
    
        wave_type: EnumProperty(
    
    Maurice Raybaud's avatar
    Maurice Raybaud committed
            name="Waves type",
            description="Select the type of waves",
            items=(('ramp', "Ramp", ""), ('sine', "Sine", ""), ('scallop', "Scallop", ""),
                   ('cubic', "Cubic", ""), ('poly', "Poly", ""), ('triangle', 'Triangle', "")),
            default='ramp',
        )
    
        gen_noise: IntProperty(
    
    Maurice Raybaud's avatar
    Maurice Raybaud committed
            name="Noise Generators",
            description="Noise Generators",
            min=1, max=3, default=1,
        )
    
        warp_dist_exp: FloatProperty(
    
    Maurice Raybaud's avatar
    Maurice Raybaud committed
            name="Distance exponent",
            description="Distance exponent",
            min=0.0, max=100.0, default=1.0,
        )
    
        warp_tor_major_radius: FloatProperty(
    
    Maurice Raybaud's avatar
    Maurice Raybaud committed
            name="Major radius",
            description="Torus is distance from major radius",
            min=0.0, max=5.0, default=1.0,
        )
    
        warp_turbulence_x: FloatProperty(
    
    Maurice Raybaud's avatar
    Maurice Raybaud committed
            name="Turbulence X",
            description="Turbulence X",
            min=0.0, max=5.0, default=0.0,
        )
    
        warp_turbulence_y: FloatProperty(
    
    Maurice Raybaud's avatar
    Maurice Raybaud committed
            name="Turbulence Y",
            description="Turbulence Y",
            min=0.0, max=5.0, default=0.0
        )
    
        warp_turbulence_z: FloatProperty(
    
    Maurice Raybaud's avatar
    Maurice Raybaud committed
            name="Turbulence Z",
            description="Turbulence Z",
            min=0.0, max=5.0, default=0.0
        )
    
        modifier_octaves: IntProperty(
    
    Maurice Raybaud's avatar
    Maurice Raybaud committed
            name="Turbulence octaves",
            description="Turbulence octaves",
            min=1, max=10, default=1
        )
    
        modifier_lambda: FloatProperty(
    
    Maurice Raybaud's avatar
    Maurice Raybaud committed
            name="Turbulence lambda",
            description="Turbulence lambda",
            min=0.0, max=5.0, default=1.00
        )
    
        modifier_omega: FloatProperty(
    
    Maurice Raybaud's avatar
    Maurice Raybaud committed
            name="Turbulence omega",
            description="Turbulence omega",
            min=0.0, max=10.0, default=1.00
        )
    
        modifier_phase: FloatProperty(
    
    Maurice Raybaud's avatar
    Maurice Raybaud committed
            name="Phase",
            description="The phase value causes the map entries to be shifted so that the map "
            "starts and ends at a different place",
            min=0.0, max=2.0, default=0.0
        )
    
        modifier_frequency: FloatProperty(
    
    Maurice Raybaud's avatar
    Maurice Raybaud committed
            name="Frequency",
            description="The frequency keyword adjusts the number of times that a color map "
            "repeats over one cycle of a pattern",
            min=0.0, max=25.0, default=2.0
        )
    
        modifier_turbulence: FloatProperty(
    
    Maurice Raybaud's avatar
    Maurice Raybaud committed
            name="Turbulence",
            description="Turbulence",
            min=0.0, max=5.0, default=2.0
        )
    
        modifier_numbers: IntProperty(
    
    Maurice Raybaud's avatar
    Maurice Raybaud committed
            name="Numbers",
            description="Numbers",
            min=1, max=27, default=2
        )
    
        modifier_control0: IntProperty(
    
    Maurice Raybaud's avatar
    Maurice Raybaud committed
            name="Control0",
            description="Control0",
            min=0, max=100, default=1
        )
    
        modifier_control1: IntProperty(
    
    Maurice Raybaud's avatar
    Maurice Raybaud committed
            name="Control1",
            description="Control1",
            min=0, max=100, default=1
        )
    
        brick_size_x: FloatProperty(
    
    Maurice Raybaud's avatar
    Maurice Raybaud committed
            name="Brick size x",
            description="",
            min=0.0000, max=1.0000, default=0.2500
        )
    
        brick_size_y: FloatProperty(
    
    Maurice Raybaud's avatar
    Maurice Raybaud committed
            name="Brick size y",
            description="",
            min=0.0000, max=1.0000, default=0.0525
        )
    
        brick_size_z: FloatProperty(
    
    Maurice Raybaud's avatar
    Maurice Raybaud committed
            name="Brick size z",
            description="",
            min=0.0000, max=1.0000, default=0.1250
        )
    
        brick_mortar: FloatProperty(
    
    Maurice Raybaud's avatar
    Maurice Raybaud committed
            name="Mortar",
            description="Mortar",
            min=0.000, max=1.500, default=0.01
        )
    
        julia_complex_1: FloatProperty(
    
    Maurice Raybaud's avatar
    Maurice Raybaud committed
            name="Julia Complex 1",
            description="",
            min=0.000, max=1.500, default=0.360
        )
    
        julia_complex_2: FloatProperty(
    
    Maurice Raybaud's avatar
    Maurice Raybaud committed
            name="Julia Complex 2",
            description="",
            min=0.000, max=1.500, default=0.250
        )
    
        f_iter: IntProperty(
    
    Maurice Raybaud's avatar
    Maurice Raybaud committed
            name="Fractal Iteration",
            description="",
            min=0, max=100, default=20
        )
    
        f_exponent: IntProperty(
    
    Maurice Raybaud's avatar
    Maurice Raybaud committed
            name="Fractal Exponent",
            description="",
            min=2, max=33, default=2
        )
    
        f_ior: IntProperty(
    
    Maurice Raybaud's avatar
    Maurice Raybaud committed
            name="Fractal Interior",
            description="",
            min=1, max=6, default=1
        )
    
        f_ior_fac: FloatProperty(
    
    Maurice Raybaud's avatar
    Maurice Raybaud committed
            name="Fractal Interior Factor",
            description="",
            min=0.0, max=10.0, default=1.0
        )
    
        f_eor: IntProperty(
    
    Maurice Raybaud's avatar
    Maurice Raybaud committed
            name="Fractal Exterior",
            description="",
            min=1, max=8, default=1
        )
    
        f_eor_fac: FloatProperty(
    
    Maurice Raybaud's avatar
    Maurice Raybaud committed
            name="Fractal Exterior Factor",
            description="",
            min=0.0, max=10.0, default=1.0
        )
    
        grad_orient_x: IntProperty(
    
    Maurice Raybaud's avatar
    Maurice Raybaud committed
            name="Gradient orientation X",
            description="",
            min=0, max=1, default=0
        )
    
        grad_orient_y: IntProperty(
    
    Maurice Raybaud's avatar
    Maurice Raybaud committed
            name="Gradient orientation Y",
            description="",
            min=0, max=1, default=1
        )
    
        grad_orient_z: IntProperty(
    
    Maurice Raybaud's avatar
    Maurice Raybaud committed
            name="Gradient orientation Z",
            description="",
            min=0, max=1, default=0