Newer
Older
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
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
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
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:
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:
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",
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:
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()
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
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"),
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
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
Bastien Montagne
committed
###############################################################################
# Texture POV properties.
###############################################################################
class RenderPovSettingsTexture(PropertyGroup):
"""Declare texture level properties controllable in UI and translated to POV."""
# former Space properties from removed Blender Internal
active_texture_index: IntProperty(
name = "Index for texture_slots",
default = 0,
)
use_limited_texture_context: BoolProperty(
name="",
description="Use the limited version of texture user (for ‘old shading’ mode)",
default=True,
)
texture_context: EnumProperty(
name="Texture context",
description="Type of texture data to display and edit",
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"
default = 'MATERIAL',
)
# Custom texture gamma
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,
)
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
)
Bastien Montagne
committed
##################################CustomPOV Code############################
# 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="")
Bastien Montagne
committed
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
name="Texture_Type",
description="Choose between Blender or POV parameters to specify texture",
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)),
default='emulator',
)
name="Magnet style",
description="magnet or julia",
items=(('mandel', "Mandelbrot", ""),('julia', "Julia", "")),
default='julia',
)
name="Magnet_type",
description="1 or 2",
min=1, max=2, default=2
)
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'
)
name="Warp Orientation",
description="Select the orientation of warp",
items=(('x', "X", ""), ('y', "Y", ""), ('z', "Z", "")),
default='y',
)
name="Waves type",
description="Select the type of waves",
items=(('ramp', "Ramp", ""), ('sine', "Sine", ""), ('scallop', "Scallop", ""),
('cubic', "Cubic", ""), ('poly', "Poly", ""), ('triangle', 'Triangle', "")),
default='ramp',
)
name="Noise Generators",
description="Noise Generators",
min=1, max=3, default=1,
)
name="Distance exponent",
description="Distance exponent",
min=0.0, max=100.0, default=1.0,
)
warp_tor_major_radius: FloatProperty(
name="Major radius",
description="Torus is distance from major radius",
min=0.0, max=5.0, default=1.0,
)
warp_turbulence_x: FloatProperty(
name="Turbulence X",
description="Turbulence X",
min=0.0, max=5.0, default=0.0,
)
warp_turbulence_y: FloatProperty(
name="Turbulence Y",
description="Turbulence Y",
min=0.0, max=5.0, default=0.0
)
warp_turbulence_z: FloatProperty(
name="Turbulence Z",
description="Turbulence Z",
min=0.0, max=5.0, default=0.0
)
name="Turbulence octaves",
description="Turbulence octaves",
min=1, max=10, default=1
)
name="Turbulence lambda",
description="Turbulence lambda",
min=0.0, max=5.0, default=1.00
)
name="Turbulence omega",
description="Turbulence omega",
min=0.0, max=10.0, default=1.00
)
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(
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(
name="Turbulence",
description="Turbulence",
min=0.0, max=5.0, default=2.0
)
name="Numbers",
description="Numbers",
min=1, max=27, default=2
)
name="Control0",
description="Control0",
min=0, max=100, default=1
)
name="Control1",
description="Control1",
min=0, max=100, default=1
)
name="Brick size x",
description="",
min=0.0000, max=1.0000, default=0.2500
)
name="Brick size y",
description="",
min=0.0000, max=1.0000, default=0.0525
)
name="Brick size z",
description="",
min=0.0000, max=1.0000, default=0.1250
)
name="Mortar",
description="Mortar",
min=0.000, max=1.500, default=0.01
)
name="Julia Complex 1",
description="",
min=0.000, max=1.500, default=0.360
)
name="Julia Complex 2",
description="",
min=0.000, max=1.500, default=0.250
)
name="Fractal Iteration",
description="",
min=0, max=100, default=20
)
name="Fractal Exponent",
description="",
min=2, max=33, default=2
)
name="Fractal Interior",
description="",
min=1, max=6, default=1
)
name="Fractal Interior Factor",
description="",
min=0.0, max=10.0, default=1.0
)
name="Fractal Exterior",
description="",
min=1, max=8, default=1
)
name="Fractal Exterior Factor",
description="",
min=0.0, max=10.0, default=1.0
)
name="Gradient orientation X",
description="",
min=0, max=1, default=0
)
name="Gradient orientation Y",
description="",
min=0, max=1, default=1
)
name="Gradient orientation Z",
description="",
min=0, max=1, default=0
)
name="Pavement sides",
description="",
items=(('3', "3", ""), ('4', "4", ""), ('6', "6", "")),
default='3'
)
name="Pavement pattern 2",
description="maximum: 2",
min=1, max=2, default=2
)
name="Pavement pattern 3",
description="maximum: 3",
min=1, max=3, default=3
)
name="Pavement pattern 4",
description="maximum: 4",
min=1, max=4, default=4
)
name="Pavement pattern 5",
description="maximum: 5",
min=1, max=5, default=5
)
name="Pavement pattern 7",
description="maximum: 7",
min=1, max=7, default=7
)
name="Pavement pattern 12",
description="maximum: 12",
min=1, max=12, default=12
)
name="Pavement pattern 22",
description="maximum: 22",
min=1, max=22, default=22
)
name="Pavement pattern 35",
description="maximum: 35",
min=1, max=35, default=35,
)
name="Pavement tiles",
description="If sides = 6, maximum tiles 5!!!",
min=1, max=6, default=1
)