Newer
Older
if tex.pov.func_list in {
"f_ellipsoid",
"f_folium_surface",
"f_hyperbolic_torus",
"f_kampyle_of_eudoxus",
"f_parabolic_torus",
"f_quartic_cylinder",
"f_torus2",
}:
if tex.pov.func_list in {
"f_blob2",
"f_cross_ellipsoids",
"f_flange_cover",
"f_isect_ellipsoids",
"f_kummer_surface_v2",
"f_ovals_of_cassini",
"f_rounded_box",
"f_spikes_2d",
"f_strophoid",
}:
if tex.pov.func_list in {
"f_algbr_cyl1",
"f_algbr_cyl2",
"f_algbr_cyl3",
"f_algbr_cyl4",
"f_blob",
"f_mesh1",
"f_poly4",
"f_spikes",
}:
if tex.pov.func_list in {
"f_devils_curve_2d",
"f_dupin_cyclid",
"f_folium_surface_2d",
"f_hetero_mf",
"f_kampyle_of_eudoxus_2d",
"f_lemniscate_of_gerono_2d",
"f_polytubes",
"f_ridge",
"f_ridged_mf",
"f_spiral",
"f_witch_of_agnesi",
}:
if tex.pov.func_list in {
"f_helix1",
"f_helix2",
"f_piriform_2d",
"f_strophoid_2d",
}:
func = 7
if tex.pov.func_list == "f_helical_torus":
func = 8
column_flow = layout.column_flow(columns=3, align=True)
column_flow.prop(tex.pov, "func_plus_x", text="")
column_flow.prop(tex.pov, "func_x", text="Value")
column_flow = layout.column_flow(columns=3, align=True)
column_flow.prop(tex.pov, "func_plus_y", text="")
column_flow.prop(tex.pov, "func_y", text="Value")
column_flow = layout.column_flow(columns=3, align=True)
column_flow.prop(tex.pov, "func_plus_z", text="")
column_flow.prop(tex.pov, "func_z", text="Value")
row = layout.row(align=align)
if func > 0:
row.prop(tex.pov, "func_P0", text="P0")
if func > 1:
row.prop(tex.pov, "func_P1", text="P1")
row = layout.row(align=align)
if func > 2:
row.prop(tex.pov, "func_P2", text="P2")
if func > 3:
row.prop(tex.pov, "func_P3", text="P3")
row = layout.row(align=align)
if func > 4:
row.prop(tex.pov, "func_P4", text="P4")
if func > 5:
row.prop(tex.pov, "func_P5", text="P5")
row = layout.row(align=align)
if func > 6:
row.prop(tex.pov, "func_P6", text="P6")
if func > 7:
row.prop(tex.pov, "func_P7", text="P7")
row = layout.row(align=align)
row.prop(tex.pov, "func_P8", text="P8")
row.prop(tex.pov, "func_P9", text="P9")
###################################################End Patterns############################
layout.prop(tex.pov, "warp_types", text="Warp types") # warp
if tex.pov.warp_types == "TOROIDAL":
layout.prop(
tex.pov, "warp_tor_major_radius", text="Major radius"
)
if tex.pov.warp_types not in {"CUBIC", "NONE"}:
layout.prop(
tex.pov, "warp_orientation", text="Warp orientation"
)
col = layout.column(align=align)
row = col.row()
row.prop(tex.pov, "warp_dist_exp", text="Distance exponent")
row = col.row()
row.prop(tex.pov, "modifier_frequency", text="Frequency")
row.prop(tex.pov, "modifier_phase", text="Phase")
row.label(text="Offset:")
row.label(text="Scale:")
row.label(text="Rotate:")
col = layout.column(align=align)
row = col.row()
row.prop(tex.pov, "tex_mov_x", text="X")
row.prop(tex.pov, "tex_scale_x", text="X")
row.prop(tex.pov, "tex_rot_x", text="X")
row.prop(tex.pov, "tex_mov_y", text="Y")
row.prop(tex.pov, "tex_scale_y", text="Y")
row.prop(tex.pov, "tex_rot_y", text="Y")
row.prop(tex.pov, "tex_mov_z", text="Z")
row.prop(tex.pov, "tex_scale_z", text="Z")
row.prop(tex.pov, "tex_rot_z", text="Z")
row.label(text="Turbulence:")
col = layout.column(align=align)
row = col.row()
row.prop(tex.pov, "warp_turbulence_x", text="X")
row.prop(tex.pov, "modifier_octaves", text="Octaves")
row.prop(tex.pov, "warp_turbulence_y", text="Y")
row.prop(tex.pov, "modifier_lambda", text="Lambda")
row.prop(tex.pov, "warp_turbulence_z", text="Z")
row.prop(tex.pov, "modifier_omega", text="Omega")
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
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
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
3240
3241
3242
3243
3244
3245
3246
3247
class TEXTURE_PT_POV_mapping(TextureSlotPanel, Panel):
"""Use this class to define POV texture mapping buttons"""
bl_label = "Mapping"
COMPAT_ENGINES = {'POVRAY_RENDER'}
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
@classmethod
def poll(cls, context):
idblock = pov_context_tex_datablock(context)
if isinstance(idblock, Brush) and not context.sculpt_object:
return False
if not getattr(context, "texture_slot", None):
return False
engine = context.scene.render.engine
return (engine in cls.COMPAT_ENGINES)
def draw(self, context):
layout = self.layout
idblock = pov_context_tex_datablock(context)
#tex = context.texture_slot
tex = mat.pov_texture_slots[
mat.active_texture_index
]
if not isinstance(idblock, Brush):
split = layout.split(percentage=0.3)
col = split.column()
col.label(text="Coordinates:")
col = split.column()
col.prop(tex, "texture_coords", text="")
if tex.texture_coords == 'ORCO':
"""
ob = context.object
if ob and ob.type == 'MESH':
split = layout.split(percentage=0.3)
split.label(text="Mesh:")
split.prop(ob.data, "texco_mesh", text="")
"""
elif tex.texture_coords == 'UV':
split = layout.split(percentage=0.3)
split.label(text="Map:")
ob = context.object
if ob and ob.type == 'MESH':
split.prop_search(tex, "uv_layer", ob.data, "uv_textures", text="")
else:
split.prop(tex, "uv_layer", text="")
elif tex.texture_coords == 'OBJECT':
split = layout.split(percentage=0.3)
split.label(text="Object:")
split.prop(tex, "object", text="")
elif tex.texture_coords == 'ALONG_STROKE':
split = layout.split(percentage=0.3)
split.label(text="Use Tips:")
split.prop(tex, "use_tips", text="")
if isinstance(idblock, Brush):
if context.sculpt_object or context.image_paint_object:
brush_texture_settings(layout, idblock, context.sculpt_object)
else:
if isinstance(idblock, FreestyleLineStyle):
split = layout.split(percentage=0.3)
split.label(text="Projection:")
split.prop(tex, "mapping", text="")
split = layout.split(percentage=0.3)
split.separator()
row = split.row()
row.prop(tex, "mapping_x", text="")
row.prop(tex, "mapping_y", text="")
row.prop(tex, "mapping_z", text="")
elif isinstance(idblock, Material):
split = layout.split(percentage=0.3)
split.label(text="Projection:")
split.prop(tex, "mapping", text="")
split = layout.split()
col = split.column()
if tex.texture_coords in {'ORCO', 'UV'}:
col.prop(tex, "use_from_dupli")
if (idblock.type == 'VOLUME' and tex.texture_coords == 'ORCO'):
col.prop(tex, "use_map_to_bounds")
elif tex.texture_coords == 'OBJECT':
col.prop(tex, "use_from_original")
if (idblock.type == 'VOLUME'):
col.prop(tex, "use_map_to_bounds")
else:
col.label()
col = split.column()
row = col.row()
row.prop(tex, "mapping_x", text="")
row.prop(tex, "mapping_y", text="")
row.prop(tex, "mapping_z", text="")
row = layout.row()
row.column().prop(tex, "offset")
row.column().prop(tex, "scale")
class TEXTURE_PT_POV_influence(TextureSlotPanel, Panel):
"""Use this class to define pov texture influence buttons."""
bl_label = "Influence"
COMPAT_ENGINES = {'POVRAY_RENDER'}
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
idblock = pov_context_tex_datablock(context)
# isinstance(idblock, Brush) and # Brush used for everything since 2.8
context.scene.texture_context == 'OTHER'
): # XXX replace by isinstance(idblock, bpy.types.Brush) and ...
# Specify below also for pov_world_texture_slots, lights etc.
# to display for various types of slots but only when any
if not getattr(idblock, "pov_texture_slots", None):
return False
return engine in cls.COMPAT_ENGINES
def draw(self, context):
layout = self.layout
idblock = pov_context_tex_datablock(context)
# tex = context.pov_texture_slot
#mat = bpy.context.active_object.active_material
texslot = idblock.pov_texture_slots[
idblock.pov.active_texture_index
] # bpy.data.textures[mat.active_texture_index]
tex = bpy.data.textures[
idblock.pov_texture_slots[idblock.pov.active_texture_index].texture
def factor_but(layout, toggle, factor, name):
row = layout.row(align=True)
row.prop(texslot, toggle, text="")
sub.active = getattr(texslot, toggle)
sub.prop(texslot, factor, text=name, slider=True)
return sub # XXX, temp. use_map_normal needs to override.
if isinstance(idblock, Material):
split = layout.split()
if idblock.pov.type in {'SURFACE', 'WIRE'}:
split = layout.split()
col = split.column()
col.label(text="Diffuse:")
factor_but(
col, "use_map_diffuse", "diffuse_factor", "Intensity"
)
factor_but(
col,
"use_map_color_diffuse",
"diffuse_color_factor",
"Color",
)
factor_but(col, "use_map_alpha", "alpha_factor", "Alpha")
factor_but(
col,
"use_map_translucency",
"translucency_factor",
"Translucency",
)
factor_but(
col, "use_map_specular", "specular_factor", "Intensity"
)
factor_but(
col, "use_map_color_spec", "specular_color_factor", "Color"
)
factor_but(
col, "use_map_hardness", "hardness_factor", "Hardness"
)
col = split.column()
col.label(text="Shading:")
factor_but(col, "use_map_ambient", "ambient_factor", "Ambient")
factor_but(col, "use_map_emit", "emit_factor", "Emit")
factor_but(col, "use_map_mirror", "mirror_factor", "Mirror")
factor_but(col, "use_map_raymir", "raymir_factor", "Ray Mirror")
col.label(text="Geometry:")
# XXX replace 'or' when displacement is fixed to not rely on normal influence value.
sub_tmp = factor_but(
col, "use_map_normal", "normal_factor", "Normal"
)
sub_tmp.active = (
texslot.use_map_normal or texslot.use_map_displacement
)
# END XXX
factor_but(col, "use_map_warp", "warp_factor", "Warp")
factor_but(
col,
"use_map_displacement",
"displacement_factor",
"Displace",
)
# ~ sub.active = texslot.use_map_translucency or texslot.map_emit or texslot.map_alpha or texslot.map_raymir or texslot.map_hardness or texslot.map_ambient or texslot.map_specularity or texslot.map_reflection or texslot.map_mirror
# ~ sub.prop(texslot, "default_value", text="Amount", slider=True)
elif idblock.pov.type == 'HALO':
layout.label(text="Halo:")
split = layout.split()
col = split.column()
factor_but(
col,
"use_map_color_diffuse",
"diffuse_color_factor",
"Color",
)
factor_but(col, "use_map_alpha", "alpha_factor", "Alpha")
col = split.column()
factor_but(col, "use_map_raymir", "raymir_factor", "Size")
factor_but(
col, "use_map_hardness", "hardness_factor", "Hardness"
)
factor_but(
col, "use_map_translucency", "translucency_factor", "Add"
)
elif idblock.pov.type == 'VOLUME':
layout.label(text="Volume:")
split = layout.split()
col = split.column()
factor_but(col, "use_map_density", "density_factor", "Density")
factor_but(
col, "use_map_emission", "emission_factor", "Emission"
)
factor_but(
col, "use_map_scatter", "scattering_factor", "Scattering"
)
factor_but(
col, "use_map_reflect", "reflection_factor", "Reflection"
)
factor_but(
col,
"use_map_color_emission",
"emission_color_factor",
"Emission Color",
)
factor_but(
col,
"use_map_color_transmission",
"transmission_color_factor",
"Transmission Color",
)
factor_but(
col,
"use_map_color_reflection",
"reflection_color_factor",
"Reflection Color",
)
layout.label(text="Geometry:")
split = layout.split()
col = split.column()
factor_but(col, "use_map_warp", "warp_factor", "Warp")
col = split.column()
factor_but(
col,
"use_map_displacement",
"displacement_factor",
"Displace",
)
elif isinstance(idblock, Light):
split = layout.split()
col = split.column()
factor_but(col, "use_map_color", "color_factor", "Color")
col = split.column()
factor_but(col, "use_map_shadow", "shadow_factor", "Shadow")
elif isinstance(idblock, World):
split = layout.split()
col = split.column()
factor_but(col, "use_map_blend", "blend_factor", "Blend")
factor_but(col, "use_map_horizon", "horizon_factor", "Horizon")
col = split.column()
factor_but(
col, "use_map_zenith_up", "zenith_up_factor", "Zenith Up"
)
factor_but(
col, "use_map_zenith_down", "zenith_down_factor", "Zenith Down"
)
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
elif isinstance(idblock, ParticleSettings):
split = layout.split()
col = split.column()
col.label(text="General:")
factor_but(col, "use_map_time", "time_factor", "Time")
factor_but(col, "use_map_life", "life_factor", "Lifetime")
factor_but(col, "use_map_density", "density_factor", "Density")
factor_but(col, "use_map_size", "size_factor", "Size")
col = split.column()
col.label(text="Physics:")
factor_but(col, "use_map_velocity", "velocity_factor", "Velocity")
factor_but(col, "use_map_damp", "damp_factor", "Damp")
factor_but(col, "use_map_gravity", "gravity_factor", "Gravity")
factor_but(col, "use_map_field", "field_factor", "Force Fields")
layout.label(text="Hair:")
split = layout.split()
col = split.column()
factor_but(col, "use_map_length", "length_factor", "Length")
factor_but(col, "use_map_clump", "clump_factor", "Clump")
factor_but(col, "use_map_twist", "twist_factor", "Twist")
col = split.column()
factor_but(
col, "use_map_kink_amp", "kink_amp_factor", "Kink Amplitude"
)
factor_but(
col, "use_map_kink_freq", "kink_freq_factor", "Kink Frequency"
)
factor_but(col, "use_map_rough", "rough_factor", "Rough")
elif isinstance(idblock, FreestyleLineStyle):
split = layout.split()
col = split.column()
factor_but(
col, "use_map_color_diffuse", "diffuse_color_factor", "Color"
)
col = split.column()
factor_but(col, "use_map_alpha", "alpha_factor", "Alpha")
layout.separator()
if not isinstance(idblock, ParticleSettings):
split = layout.split()
col = split.column()
# col.prop(tex, "blend_type", text="Blend") #deprecated since 2.8
# col.prop(tex, "use_rgb_to_intensity") #deprecated since 2.8
# color is used on gray-scale textures even when use_rgb_to_intensity is disabled.
# col.prop(tex, "color", text="") #deprecated since 2.8
# col.prop(tex, "invert", text="Negative") #deprecated since 2.8
# col.prop(tex, "use_stencil") #deprecated since 2.8
# if isinstance(idblock, (Material, World)):
# col.prop(tex, "default_value", text="DVar", slider=True)
class TEXTURE_PT_POV_tex_gamma(TextureButtonsPanel, Panel):
"""Use this class to define pov texture gamma buttons."""
bl_label = "Image Gamma"
COMPAT_ENGINES = {'POVRAY_RENDER'}
def draw_header(self, context):
tex = context.texture
self.layout.prop(
tex.pov, "tex_gamma_enable", text="", icon='SEQ_LUMA_WAVEFORM'
)
def draw(self, context):
layout = self.layout
tex = context.texture
Bastien Montagne
committed
layout.active = tex.pov.tex_gamma_enable
layout.prop(tex.pov, "tex_gamma_value", text="Gamma Value")
# commented out below UI for texture only custom code inside exported material:
# class TEXTURE_PT_povray_replacement_text(TextureButtonsPanel, Panel):
# bl_label = "Custom POV Code"
# COMPAT_ENGINES = {'POVRAY_RENDER'}
# def draw(self, context):
# layout = self.layout
Maurice Raybaud
committed
# tex = context.texture
Maurice Raybaud
committed
# col = layout.column()
# col.label(text="Replace properties with:")
# col.prop(tex.pov, "replacement_text", text="")
Maurice Raybaud
committed
class OBJECT_PT_POV_obj_parameters(ObjectButtonsPanel, Panel):
"""Use this class to define pov specific object level options buttons."""
@classmethod
def poll(cls, context):
engine = context.scene.render.engine
return engine in cls.COMPAT_ENGINES
def draw(self, context):
layout = self.layout
obj = context.object
split = layout.split()
col = split.column(align=True)
Bastien Montagne
committed
col.prop(obj.pov, "importance_value", text="Importance")
Bastien Montagne
committed
col.prop(obj.pov, "collect_photons", text="Receive Photon Caustics")
Maurice Raybaud
committed
if obj.pov.collect_photons:
col.prop(
obj.pov, "spacing_multiplier", text="Photons Spacing Multiplier"
)
split = layout.split()
col = split.column()
col.prop(obj.pov, "hollow")
col.prop(obj.pov, "double_illuminate")
if obj.type == 'META' or obj.pov.curveshape == 'lathe':
# if obj.pov.curveshape == 'sor'
col.prop(obj.pov, "sturm")
col.prop(obj.pov, "no_shadow")
col.prop(obj.pov, "no_image")
col.prop(obj.pov, "no_reflection")
col.prop(obj.pov, "no_radiosity")
col.prop(obj.pov, "inverse")
col.prop(obj.pov, "hierarchy")
# col.prop(obj.pov,"boundorclip",text="Bound / Clip")
# if obj.pov.boundorclip != "none":
# col.prop_search(obj.pov,"boundorclipob",context.blend_data,"objects",text="Object")
# text = "Clipped by"
# if obj.pov.boundorclip == "clipped_by":
# text = "Bounded by"
# col.prop(obj.pov,"addboundorclip",text=text)
Campbell Barton
committed
class OBJECT_PT_POV_obj_sphere(PovDataButtonsPanel, Panel):
"""Use this class to define pov sphere primitive parameters buttons."""
bl_label = "POV Sphere"
COMPAT_ENGINES = {'POVRAY_RENDER'}
# bl_options = {'HIDE_HEADER'}
@classmethod
def poll(cls, context):
engine = context.scene.render.engine
obj = context.object
return (
obj
and obj.pov.object_as == 'SPHERE'
and (engine in cls.COMPAT_ENGINES)
)
def draw(self, context):
layout = self.layout
obj = context.object
col = layout.column()
if obj.pov.object_as == 'SPHERE':
if obj.pov.unlock_parameters == False:
col.prop(
obj.pov,
"unlock_parameters",
text="Exported parameters below",
icon='LOCKED',
)
col.label(text="Sphere radius: " + str(obj.pov.sphere_radius))
else:
col.prop(
obj.pov,
"unlock_parameters",
text="Edit exported parameters",
icon='UNLOCKED',
)
col.label(text="3D view proxy may get out of synch")
col.active = obj.pov.unlock_parameters
layout.operator(
"pov.sphere_update", text="Update", icon="SHADING_RENDERED"
)
# col.label(text="Parameters:")
col.prop(obj.pov, "sphere_radius", text="Radius of Sphere")
Maurice Raybaud
committed
class OBJECT_PT_POV_obj_cylinder(PovDataButtonsPanel, Panel):
"""Use this class to define pov cylinder primitive parameters buttons."""
bl_label = "POV Cylinder"
Maurice Raybaud
committed
COMPAT_ENGINES = {'POVRAY_RENDER'}
# bl_options = {'HIDE_HEADER'}
Maurice Raybaud
committed
@classmethod
def poll(cls, context):
engine = context.scene.render.engine
obj = context.object
return (
obj
and obj.pov.object_as == 'CYLINDER'
and (engine in cls.COMPAT_ENGINES)
)
Maurice Raybaud
committed
def draw(self, context):
layout = self.layout
obj = context.object
Maurice Raybaud
committed
col = layout.column()
if obj.pov.object_as == 'CYLINDER':
if obj.pov.unlock_parameters == False:
col.prop(
obj.pov,
"unlock_parameters",
text="Exported parameters below",
icon='LOCKED',
)
col.label(
text="Cylinder radius: " + str(obj.pov.cylinder_radius)
)
col.label(
text="Cylinder cap location: "
+ str(obj.pov.cylinder_location_cap)
)
Maurice Raybaud
committed
else:
col.prop(
obj.pov,
"unlock_parameters",
text="Edit exported parameters",
icon='UNLOCKED',
)
Maurice Raybaud
committed
col.label(text="3D view proxy may get out of synch")
col.active = obj.pov.unlock_parameters
layout.operator(
"pov.cylinder_update", text="Update", icon="MESH_CYLINDER"
)
# col.label(text="Parameters:")
Maurice Raybaud
committed
col.prop(obj.pov, "cylinder_radius")
col.prop(obj.pov, "cylinder_location_cap")
class OBJECT_PT_POV_obj_cone(PovDataButtonsPanel, Panel):
"""Use this class to define pov cone primitive parameters buttons."""
bl_label = "POV Cone"
COMPAT_ENGINES = {'POVRAY_RENDER'}
# bl_options = {'HIDE_HEADER'}
@classmethod
def poll(cls, context):
engine = context.scene.render.engine
obj = context.object
return (
obj
and obj.pov.object_as == 'CONE'
and (engine in cls.COMPAT_ENGINES)
)
def draw(self, context):
layout = self.layout
obj = context.object
col = layout.column()
if obj.pov.object_as == 'CONE':
if obj.pov.unlock_parameters == False:
col.prop(
obj.pov,
"unlock_parameters",
text="Exported parameters below",
icon='LOCKED',
)
col.label(
text="Cone base radius: " + str(obj.pov.cone_base_radius)
)
col.label(
text="Cone cap radius: " + str(obj.pov.cone_cap_radius)
)
col.label(
text="Cone proxy segments: " + str(obj.pov.cone_segments)
)
col.label(text="Cone height: " + str(obj.pov.cone_height))
else:
col.prop(
obj.pov,
"unlock_parameters",
text="Edit exported parameters",
icon='UNLOCKED',
)
col.label(text="3D view proxy may get out of synch")
col.active = obj.pov.unlock_parameters
layout.operator(
"pov.cone_update", text="Update", icon="MESH_CONE"
)
# col.label(text="Parameters:")
col.prop(
obj.pov, "cone_base_radius", text="Radius of Cone Base"
)
col.prop(obj.pov, "cone_cap_radius", text="Radius of Cone Cap")
col.prop(
obj.pov, "cone_segments", text="Segmentation of Cone proxy"
)
col.prop(obj.pov, "cone_height", text="Height of the cone")
class OBJECT_PT_POV_obj_superellipsoid(PovDataButtonsPanel, Panel):
"""Use this class to define pov superellipsoid primitive parameters buttons."""
bl_label = "POV Superquadric ellipsoid"
COMPAT_ENGINES = {'POVRAY_RENDER'}
# bl_options = {'HIDE_HEADER'}
@classmethod
def poll(cls, context):
engine = context.scene.render.engine
obj = context.object
return (
obj
and obj.pov.object_as == 'SUPERELLIPSOID'
and (engine in cls.COMPAT_ENGINES)
)
def draw(self, context):
layout = self.layout
obj = context.object
col = layout.column()
if obj.pov.object_as == 'SUPERELLIPSOID':
if obj.pov.unlock_parameters == False:
col.prop(
obj.pov,
"unlock_parameters",
text="Exported parameters below",
icon='LOCKED',
)
col.label(text="Radial segmentation: " + str(obj.pov.se_u))
col.label(text="Lateral segmentation: " + str(obj.pov.se_v))
col.label(text="Ring shape: " + str(obj.pov.se_n1))
col.label(text="Cross-section shape: " + str(obj.pov.se_n2))
col.label(text="Fill up and down: " + str(obj.pov.se_edit))
else:
col.prop(
obj.pov,
"unlock_parameters",
text="Edit exported parameters",
icon='UNLOCKED',
)
col.label(text="3D view proxy may get out of synch")
col.active = obj.pov.unlock_parameters
layout.operator(
"pov.superellipsoid_update",
text="Update",
icon="MOD_SUBSURF",
)
# col.label(text="Parameters:")
col.prop(obj.pov, "se_u")
col.prop(obj.pov, "se_v")
col.prop(obj.pov, "se_n1")
col.prop(obj.pov, "se_n2")
col.prop(obj.pov, "se_edit")
class OBJECT_PT_POV_obj_torus(PovDataButtonsPanel, Panel):
"""Use this class to define pov torus primitive parameters buttons."""
bl_label = "POV Torus"
COMPAT_ENGINES = {'POVRAY_RENDER'}
# bl_options = {'HIDE_HEADER'}
@classmethod
def poll(cls, context):
engine = context.scene.render.engine
obj = context.object
return (
obj
and obj.pov.object_as == 'TORUS'
and (engine in cls.COMPAT_ENGINES)
)
def draw(self, context):
layout = self.layout
obj = context.object
col = layout.column()
if obj.pov.object_as == 'TORUS':
if obj.pov.unlock_parameters == False:
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
col.prop(
obj.pov,
"unlock_parameters",
text="Exported parameters below",
icon='LOCKED',
)
col.label(
text="Torus major radius: "
+ str(obj.pov.torus_major_radius)
)
col.label(
text="Torus minor radius: "
+ str(obj.pov.torus_minor_radius)
)
col.label(
text="Torus major segments: "
+ str(obj.pov.torus_major_segments)
)
col.label(
text="Torus minor segments: "
+ str(obj.pov.torus_minor_segments)
)
col.prop(
obj.pov,
"unlock_parameters",
text="Edit exported parameters",
icon='UNLOCKED',
)
col.label(text="3D view proxy may get out of synch")
col.active = obj.pov.unlock_parameters
layout.operator(
"pov.torus_update", text="Update", icon="MESH_TORUS"
)
# col.label(text="Parameters:")
col.prop(obj.pov, "torus_major_radius")
col.prop(obj.pov, "torus_minor_radius")
col.prop(obj.pov, "torus_major_segments")
col.prop(obj.pov, "torus_minor_segments")
class OBJECT_PT_POV_obj_supertorus(PovDataButtonsPanel, Panel):
"""Use this class to define pov supertorus primitive parameters buttons."""
bl_label = "POV SuperTorus"
COMPAT_ENGINES = {'POVRAY_RENDER'}
# bl_options = {'HIDE_HEADER'}
@classmethod
def poll(cls, context):
engine = context.scene.render.engine
obj = context.object
return (
obj
and obj.pov.object_as == 'SUPERTORUS'
and (engine in cls.COMPAT_ENGINES)
)
def draw(self, context):
layout = self.layout
obj = context.object
col = layout.column()
if obj.pov.object_as == 'SUPERTORUS':
if obj.pov.unlock_parameters == False:
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
col.prop(
obj.pov,
"unlock_parameters",
text="Exported parameters below",
icon='LOCKED',
)
col.label(
text="SuperTorus major radius: "
+ str(obj.pov.st_major_radius)
)
col.label(
text="SuperTorus minor radius: "
+ str(obj.pov.st_minor_radius)
)
col.label(
text="SuperTorus major segments: " + str(obj.pov.st_u)
)
col.label(
text="SuperTorus minor segments: " + str(obj.pov.st_v)
)
col.label(
text="SuperTorus Ring Manipulator: " + str(obj.pov.st_ring)
)
col.label(
text="SuperTorus Cross Manipulator: "
+ str(obj.pov.st_cross)
)
col.label(
text="SuperTorus Internal And External radii: "
+ str(obj.pov.st_ie)
)
col.label(
text="SuperTorus accuracy: " + str(ob.pov.st_accuracy)
)
col.label(
text="SuperTorus max gradient: "
+ str(ob.pov.st_max_gradient)
)
col.prop(
obj.pov,
"unlock_parameters",
text="Edit exported parameters",
icon='UNLOCKED',
)
col.label(text="3D view proxy may get out of synch")
col.active = obj.pov.unlock_parameters
layout.operator(
"pov.supertorus_update", text="Update", icon="MESH_TORUS"
)
# col.label(text="Parameters:")
col.prop(obj.pov, "st_major_radius")
col.prop(obj.pov, "st_minor_radius")