1 # SPDX-FileCopyrightText: 2021-2022 Blender Foundation
3 # SPDX-License-Identifier: GPL-2.0-or-later
5 """Declare texturing properties controllable in UI."""
8 from bpy
.utils
import register_class
, unregister_class
9 from bpy
.types
import PropertyGroup
10 from bpy
.props
import (
21 from .shading_properties
import active_texture_name_from_uilist
, active_texture_name_from_search
23 # ---------------------------------------------------------------- #
24 # Texture slots (Material context) exported as POV texture properties.
25 # ---------------------------------------------------------------- #
28 class MaterialTextureSlot(PropertyGroup
):
29 """Declare material texture slot level properties for UI and translated to POV."""
31 bl_idname
= ("pov_texture_slots",)
32 bl_description
= ("Nodeless texture slots",)
34 # Adding a "real" texture datablock as property is not possible
35 # (or at least not easy through a dynamically populated EnumProperty).
36 # That's why we'll use a prop_search() UILayout function in texturing_gui.py.
37 # So we'll assign the name of the needed texture datablock to the below StringProperty.
38 texture
: StringProperty(update
=active_texture_name_from_uilist
)
39 # and use another temporary StringProperty to change the linked data
40 texture_search
: StringProperty(
41 name
="", update
=active_texture_name_from_search
, description
="Browse Texture to be linked"
44 alpha_factor
: FloatProperty(
45 name
="Alpha", description
="Amount texture affects alpha", default
=1.0
48 ambient_factor
: FloatProperty(
49 name
="", description
="Amount texture affects ambient", default
=1.0
52 bump_method
: EnumProperty(
54 description
="Method to use for bump mapping",
56 ("BUMP_ORIGINAL", "Bump Original", ""),
57 ("BUMP_COMPATIBLE", "Bump Compatible", ""),
58 ("BUMP_DEFAULT", "Bump Default", ""),
59 ("BUMP_BEST_QUALITY", "Bump Best Quality", ""),
61 default
="BUMP_ORIGINAL",
64 bump_objectspace
: EnumProperty(
66 description
="Space to apply bump mapping in",
68 ("BUMP_VIEWSPACE", "Bump Viewspace", ""),
69 ("BUMP_OBJECTSPACE", "Bump Objectspace", ""),
70 ("BUMP_TEXTURESPACE", "Bump Texturespace", ""),
72 default
="BUMP_VIEWSPACE",
75 density_factor
: FloatProperty(
76 name
="", description
="Amount texture affects density", default
=1.0
79 diffuse_color_factor
: FloatProperty(
80 name
="", description
="Amount texture affects diffuse color", default
=1.0
83 diffuse_factor
: FloatProperty(
84 name
="", description
="Amount texture affects diffuse reflectivity", default
=1.0
87 displacement_factor
: FloatProperty(
88 name
="", description
="Amount texture displaces the surface", default
=0.2
91 emission_color_factor
: FloatProperty(
92 name
="", description
="Amount texture affects emission color", default
=1.0
95 emission_factor
: FloatProperty(
96 name
="", description
="Amount texture affects emission", default
=1.0
99 emit_factor
: FloatProperty(name
="", description
="Amount texture affects emission", default
=1.0)
101 hardness_factor
: FloatProperty(
102 name
="", description
="Amount texture affects hardness", default
=1.0
105 mapping
: EnumProperty(
109 ("FLAT", "Flat", ""),
110 ("CUBE", "Cube", ""),
111 ("TUBE", "Tube", ""),
112 ("SPHERE", "Sphere", ""),
117 mapping_x
: EnumProperty(
120 items
=(("NONE", "", ""), ("X", "", ""), ("Y", "", ""), ("Z", "", "")),
124 mapping_y
: EnumProperty(
127 items
=(("NONE", "", ""), ("X", "", ""), ("Y", "", ""), ("Z", "", "")),
131 mapping_z
: EnumProperty(
134 items
=(("NONE", "", ""), ("X", "", ""), ("Y", "", ""), ("Z", "", "")),
138 mirror_factor
: FloatProperty(
139 name
="", description
="Amount texture affects mirror color", default
=1.0
142 normal_factor
: FloatProperty(
143 name
="", description
="Amount texture affects normal values", default
=1.0
146 normal_map_space
: EnumProperty(
148 description
="Sets space of normal map image",
150 ("CAMERA", "Camera", ""),
151 ("WORLD", "World", ""),
152 ("OBJECT", "Object", ""),
153 ("TANGENT", "Tangent", ""),
158 object: StringProperty(
160 description
="Object to use for mapping with Object texture coordinates",
164 raymir_factor
: FloatProperty(
165 name
="", description
="Amount texture affects ray mirror", default
=1.0
168 reflection_color_factor
: FloatProperty(
169 name
="", description
="Amount texture affects color of out-scattered light", default
=1.0
172 reflection_factor
: FloatProperty(
173 name
="", description
="Amount texture affects brightness of out-scattered light", default
=1.0
176 scattering_factor
: FloatProperty(
177 name
="", description
="Amount texture affects scattering", default
=1.0
180 specular_color_factor
: FloatProperty(
181 name
="", description
="Amount texture affects specular color", default
=1.0
184 specular_factor
: FloatProperty(
185 name
="", description
="Amount texture affects specular reflectivity", default
=1.0
188 offset
: FloatVectorProperty(
190 description
="Fine tune of the texture mapping X, Y and Z locations ",
195 default
=(0.0, 0.0, 0.0),
196 options
={"ANIMATABLE"},
197 subtype
="TRANSLATION",
200 scale
: FloatVectorProperty(
204 description
="Set scaling for the texture’s X, Y and Z sizes ",
209 default
=(1.0, 1.0, 1.0),
210 options
={"ANIMATABLE"},
213 texture_coords
: EnumProperty(
217 ("GLOBAL", "Global", ""),
218 ("OBJECT", "Object", ""),
220 ("ORCO", "Original Coordinates", ""),
221 ("STRAND", "Strand", ""),
222 ("STICKY", "Sticky", ""),
223 ("WINDOW", "Window", ""),
224 ("NORMAL", "Normal", ""),
225 ("REFLECTION", "Reflection", ""),
226 ("STRESS", "Stress", ""),
227 ("TANGENT", "Tangent", ""),
232 translucency_factor
: FloatProperty(
233 name
="", description
="Amount texture affects translucency", default
=1.0
236 transmission_color_factor
: FloatProperty(
238 description
="Amount texture affects result color after light has been scattered/absorbed",
242 use
: BoolProperty(name
="", description
="Enable this material texture slot", default
=True)
244 use_from_dupli
: BoolProperty(
246 description
="Dupli’s instanced from verts, faces or particles, "
247 "inherit texture coordinate from their parent",
251 use_from_original
: BoolProperty(
253 description
="Dupli’s derive their object coordinates from the "
254 "original objects transformation",
258 use_interpolation
: BoolProperty(
259 name
="", description
="Interpolates pixels using selected filter ", default
=False
262 use_map_alpha
: BoolProperty(
263 name
="", description
="Causes the texture to affect the alpha value", default
=False
266 use_map_ambient
: BoolProperty(
267 name
="", description
="Causes the texture to affect the value of ambient", default
=False
270 use_map_color_diffuse
: BoolProperty(
272 description
="Causes the texture to affect basic color of the material",
276 use_map_color_emission
: BoolProperty(
277 name
="", description
="Causes the texture to affect the color of emission", default
=False
280 use_map_color_reflection
: BoolProperty(
282 description
="Causes the texture to affect the color of scattered light",
286 use_map_color_spec
: BoolProperty(
287 name
="", description
="Causes the texture to affect the specularity color", default
=False
290 use_map_color_transmission
: BoolProperty(
292 description
="Causes the texture to affect the result color after "
293 "other light has been scattered/absorbed",
297 use_map_density
: BoolProperty(
298 name
="", description
="Causes the texture to affect the volume’s density", default
=False
301 use_map_diffuse
: BoolProperty(
303 description
="Causes the texture to affect the value of the materials diffuse reflectivity",
307 use_map_displacement
: BoolProperty(
308 name
="", description
="Let the texture displace the surface", default
=False
311 use_map_emission
: BoolProperty(
312 name
="", description
="Causes the texture to affect the volume’s emission", default
=False
315 use_map_emit
: BoolProperty(
316 name
="", description
="Causes the texture to affect the emit value", default
=False
319 use_map_hardness
: BoolProperty(
320 name
="", description
="Causes the texture to affect the hardness value", default
=False
323 use_map_mirror
: BoolProperty(
324 name
="", description
="Causes the texture to affect the mirror color", default
=False
327 use_map_normal
: BoolProperty(
328 name
="", description
="Causes the texture to affect the rendered normal", default
=False
331 use_map_raymir
: BoolProperty(
332 name
="", description
="Causes the texture to affect the ray-mirror value", default
=False
335 use_map_reflect
: BoolProperty(
337 description
="Causes the texture to affect the reflected light’s brightness",
341 use_map_scatter
: BoolProperty(
342 name
="", description
="Causes the texture to affect the volume’s scattering", default
=False
345 use_map_specular
: BoolProperty(
347 description
="Causes the texture to affect the value of specular reflectivity",
351 use_map_translucency
: BoolProperty(
352 name
="", description
="Causes the texture to affect the translucency value", default
=False
355 use_map_warp
: BoolProperty(
357 description
="Let the texture warp texture coordinates of next channels",
361 uv_layer
: StringProperty(
362 name
="", description
="UV layer to use for mapping with UV texture coordinates", default
=""
365 warp_factor
: FloatProperty(
367 description
="Amount texture affects texture coordinates of next channels",
370 # ---------------------------------------------------------------- #
371 # so that its for loop stays one level less nested
372 # used_texture_slots generator expression requires :
376 tex
= bpy
.data
.textures
[self
.texture
]
377 while tex
.pov
.active_texture_index
< len(bpy
.data
.textures
): # XXX should use slots count
378 tex
.pov
.active_texture_index
+= 1
380 # ---------------------------------------------------------------- #
382 # ---------------------------------------------------------------- #
383 # Texture slots (World context) exported as POV texture properties.
384 # ---------------------------------------------------------------- #
385 class WorldTextureSlot(PropertyGroup
):
386 """Declare world texture slot level properties for UI and translated to POV."""
388 bl_idname
= ("pov_texture_slots",)
389 bl_description
= ("Texture_slots from Blender-2.79",)
391 # Adding a "real" texture datablock as property is not possible
392 # (or at least not easy through a dynamically populated EnumProperty).
393 # That's why we'll use a prop_search() UILayout function in ui.py.
394 # So we'll assign the name of the needed texture datablock to the below StringProperty.
395 texture
: StringProperty(update
=active_texture_name_from_uilist
)
396 # and use another temporary StringProperty to change the linked data
397 texture_search
: StringProperty(
398 name
="", update
=active_texture_name_from_search
, description
="Browse Texture to be linked"
401 blend_factor
: FloatProperty(
403 description
="Amount texture affects color progression of the " "background",
409 horizon_factor
: FloatProperty(
411 description
="Amount texture affects color of the horizon",
417 object: StringProperty(
419 description
="Object to use for mapping with Object texture coordinates",
423 offset
: FloatVectorProperty(
425 description
="Fine tune of the texture mapping X, Y and Z locations ",
430 default
=(0.0, 0.0, 0.0),
431 options
={"ANIMATABLE"},
432 subtype
="TRANSLATION",
435 scale
: FloatVectorProperty(
439 description
="Set scaling for the texture’s X, Y and Z sizes ",
444 default
=(1.0, 1.0, 1.0),
445 options
={"ANIMATABLE"},
448 texture_coords
: EnumProperty(
450 description
="Texture coordinates used to map the texture onto the background",
452 ("VIEW", "View", "Use view vector for the texture coordinates"),
456 "Use global coordinates for the texture coordinates (interior mist)",
461 "Use 360 degree angular coordinates, e.g. for spherical light probes",
463 ("SPHERE", "Sphere", "For 360 degree panorama sky, spherical mapped, only top half"),
464 ("EQUIRECT", "Equirectangular", "For 360 degree panorama sky, equirectangular mapping"),
465 ("TUBE", "Tube", "For 360 degree panorama sky, cylindrical mapped, only top half"),
466 ("OBJECT", "Object", "Use linked object’s coordinates for texture coordinates"),
471 use_map_blend
: BoolProperty(
472 name
="Blend Map", description
="Affect the color progression of the background", default
=True
475 use_map_horizon
: BoolProperty(
476 name
="Horizon Map", description
="Affect the color of the horizon", default
=False
479 use_map_zenith_down
: BoolProperty(
480 name
="", description
="Affect the color of the zenith below", default
=False
483 use_map_zenith_up
: BoolProperty(
484 name
="Zenith Up Map", description
="Affect the color of the zenith above", default
=False
487 zenith_down_factor
: FloatProperty(
489 description
="Amount texture affects color of the zenith below",
495 zenith_up_factor
: FloatProperty(
497 description
="Amount texture affects color of the zenith above",
504 # ---------------------------------------------------------------- #
505 # Space properties from removed former Blender Internal
506 # ---------------------------------------------------------------- #
508 # added below at superclass level so as to be available in World, Material,
509 # and Light, for texture slots use
511 bpy
.types
.ID
.use_limited_texture_context
= BoolProperty(
513 description
="Use the limited version of texture user (for ‘old shading’ mode)",
516 bpy
.types
.ID
.texture_context
= EnumProperty(
517 name
="Texture context",
518 description
="Type of texture data to display and edit",
520 ("MATERIAL", "", "Show material textures", "MATERIAL", 0), # "Show material textures"
521 ("WORLD", "", "Show world textures", "WORLD", 1), # "Show world textures"
522 ("LIGHT", "", "Show lamp textures", "LIGHT", 2), # "Show lamp textures"
523 ("PARTICLES", "", "Show particles textures", "PARTICLES", 3), # "Show particles textures"
524 ("LINESTYLE", "", "Show linestyle textures", "LINE_DATA", 4), # "Show linestyle textures"
525 ("OTHER", "", "Show other data textures", "TEXTURE_DATA", 5), # "Show other data textures"
529 # bpy.types.ID.active_texture_index = IntProperty(
530 # name = "Index for texture_slots",
535 # ---------------------------------------------------------------- #
536 # Texture POV properties.
537 # ---------------------------------------------------------------- #
540 class RenderPovSettingsTexture(PropertyGroup
):
541 """Declare texture level properties controllable in UI and translated to POV."""
543 # former Space properties from removed Blender Internal
544 active_texture_index
: IntProperty(name
="Index for texture_slots", min=0, max=17, default
=0)
546 use_limited_texture_context
: BoolProperty(
548 description
="Use the limited version of texture user (for ‘old shading’ mode)",
552 texture_context
: EnumProperty(
553 name
="Texture context",
554 description
="Type of texture data to display and edit",
556 ("MATERIAL", "", "Show material textures", "MATERIAL", 0), # "Show material textures"
557 ("WORLD", "", "Show world textures", "WORLD", 1), # "Show world textures"
558 ("LAMP", "", "Show lamp textures", "LIGHT", 2), # "Show lamp textures"
562 "Show particles textures",
565 ), # "Show particles textures"
569 "Show linestyle textures",
572 ), # "Show linestyle textures"
576 "Show other data textures",
579 ), # "Show other data textures"
584 # Custom texture gamma
585 tex_gamma_enable
: BoolProperty(
586 name
="Enable custom texture gamma",
587 description
="Notify some custom gamma for which texture has been precorrected "
588 "without the file format carrying it and only if it differs from your "
589 "OS expected standard (see pov doc)",
593 tex_gamma_value
: FloatProperty(
594 name
="Custom texture gamma",
595 description
="value for which the file was issued e.g. a Raw photo is gamma 1.0",
603 # ----------------------------------- CustomPOV Code ----------------------------------- #
604 # commented out below if we wanted custom pov code in texture only, inside exported material:
605 # replacement_text = StringProperty(
606 # name="Declared name:",
607 # description="Type the declared name in custom POV code or an external .inc "
608 # "it points at. pigment {} expected",
611 tex_pattern_type
: EnumProperty(
613 description
="Choose between Blender or POV parameters to specify texture",
615 ("agate", "Agate", "", "PLUGIN", 0),
616 ("aoi", "Aoi", "", "PLUGIN", 1),
617 ("average", "Average", "", "PLUGIN", 2),
618 ("boxed", "Boxed", "", "PLUGIN", 3),
619 ("bozo", "Bozo", "", "PLUGIN", 4),
620 ("bumps", "Bumps", "", "PLUGIN", 5),
621 ("cells", "Cells", "", "PLUGIN", 6),
622 ("crackle", "Crackle", "", "PLUGIN", 7),
623 ("cubic", "Cubic", "", "PLUGIN", 8),
624 ("cylindrical", "Cylindrical", "", "PLUGIN", 9),
625 ("density_file", "Density", "(.df3)", "PLUGIN", 10),
626 ("dents", "Dents", "", "PLUGIN", 11),
627 ("fractal", "Fractal", "", "PLUGIN", 12),
628 ("function", "Function", "", "PLUGIN", 13),
629 ("gradient", "Gradient", "", "PLUGIN", 14),
630 ("granite", "Granite", "", "PLUGIN", 15),
631 ("image_pattern", "Image pattern", "", "PLUGIN", 16),
632 ("leopard", "Leopard", "", "PLUGIN", 17),
633 ("marble", "Marble", "", "PLUGIN", 18),
634 ("onion", "Onion", "", "PLUGIN", 19),
635 ("pigment_pattern", "pigment pattern", "", "PLUGIN", 20),
636 ("planar", "Planar", "", "PLUGIN", 21),
637 ("quilted", "Quilted", "", "PLUGIN", 22),
638 ("radial", "Radial", "", "PLUGIN", 23),
639 ("ripples", "Ripples", "", "PLUGIN", 24),
640 ("slope", "Slope", "", "PLUGIN", 25),
641 ("spherical", "Spherical", "", "PLUGIN", 26),
642 ("spiral1", "Spiral1", "", "PLUGIN", 27),
643 ("spiral2", "Spiral2", "", "PLUGIN", 28),
644 ("spotted", "Spotted", "", "PLUGIN", 29),
645 ("waves", "Waves", "", "PLUGIN", 30),
646 ("wood", "Wood", "", "PLUGIN", 31),
647 ("wrinkles", "Wrinkles", "", "PLUGIN", 32),
648 ("brick", "Brick", "", "PLUGIN", 33),
649 ("checker", "Checker", "", "PLUGIN", 34),
650 ("hexagon", "Hexagon", "", "PLUGIN", 35),
651 ("object", "Mesh", "", "PLUGIN", 36),
652 ("emulator", "Blender Type Emulator", "", "SCRIPTPLUGINS", 37),
657 magnet_style
: EnumProperty(
659 description
="magnet or julia",
660 items
=(("mandel", "Mandelbrot", ""), ("julia", "Julia", "")),
664 magnet_type
: IntProperty(name
="Magnet_type", description
="1 or 2", min=1, max=2, default
=2)
666 warp_types
: EnumProperty(
668 description
="Select the type of warp",
670 ("PLANAR", "Planar", ""),
671 ("CUBIC", "Cubic", ""),
672 ("SPHERICAL", "Spherical", ""),
673 ("TOROIDAL", "Toroidal", ""),
674 ("CYLINDRICAL", "Cylindrical", ""),
675 ("NONE", "None", "No indentation"),
680 warp_orientation
: EnumProperty(
681 name
="Warp Orientation",
682 description
="Select the orientation of warp",
683 items
=(("x", "X", ""), ("y", "Y", ""), ("z", "Z", "")),
687 wave_type
: EnumProperty(
689 description
="Select the type of waves",
691 ("ramp", "Ramp", ""),
692 ("sine", "Sine", ""),
693 ("scallop", "Scallop", ""),
694 ("cubic", "Cubic", ""),
695 ("poly", "Poly", ""),
696 ("triangle", "Triangle", ""),
701 gen_noise
: IntProperty(
702 name
="Noise Generators", description
="Noise Generators", min=1, max=3, default
=1
705 warp_dist_exp
: FloatProperty(
706 name
="Distance exponent", description
="Distance exponent", min=0.0, max=100.0, default
=1.0
709 warp_tor_major_radius
: FloatProperty(
711 description
="Torus is distance from major radius",
717 warp_turbulence_x
: FloatProperty(
718 name
="Turbulence X", description
="Turbulence X", min=0.0, max=5.0, default
=0.0
721 warp_turbulence_y
: FloatProperty(
722 name
="Turbulence Y", description
="Turbulence Y", min=0.0, max=5.0, default
=0.0
725 warp_turbulence_z
: FloatProperty(
726 name
="Turbulence Z", description
="Turbulence Z", min=0.0, max=5.0, default
=0.0
729 modifier_octaves
: IntProperty(
730 name
="Turbulence octaves", description
="Turbulence octaves", min=1, max=10, default
=1
733 modifier_lambda
: FloatProperty(
734 name
="Turbulence lambda", description
="Turbulence lambda", min=0.0, max=5.0, default
=1.00
737 modifier_omega
: FloatProperty(
738 name
="Turbulence omega", description
="Turbulence omega", min=0.0, max=10.0, default
=1.00
741 modifier_phase
: FloatProperty(
743 description
="The phase value causes the map entries to be shifted so that the map "
744 "starts and ends at a different place",
750 modifier_frequency
: FloatProperty(
752 description
="The frequency keyword adjusts the number of times that a color map "
753 "repeats over one cycle of a pattern",
759 modifier_turbulence
: FloatProperty(
760 name
="Turbulence", description
="Turbulence", min=0.0, max=5.0, default
=2.0
763 modifier_numbers
: IntProperty(name
="Numbers", description
="Numbers", min=1, max=27, default
=2)
765 modifier_control0
: IntProperty(
766 name
="Control0", description
="Control0", min=0, max=100, default
=1
769 modifier_control1
: IntProperty(
770 name
="Control1", description
="Control1", min=0, max=100, default
=1
773 brick_size_x
: FloatProperty(
774 name
="Brick size x", description
="", min=0.0000, max=1.0000, default
=0.2500
777 brick_size_y
: FloatProperty(
778 name
="Brick size y", description
="", min=0.0000, max=1.0000, default
=0.0525
781 brick_size_z
: FloatProperty(
782 name
="Brick size z", description
="", min=0.0000, max=1.0000, default
=0.1250
785 brick_mortar
: FloatProperty(
786 name
="Mortar", description
="Mortar", min=0.000, max=1.500, default
=0.01
789 julia_complex_1
: FloatProperty(
790 name
="Julia Complex 1", description
="", min=0.000, max=1.500, default
=0.360
793 julia_complex_2
: FloatProperty(
794 name
="Julia Complex 2", description
="", min=0.000, max=1.500, default
=0.250
797 f_iter
: IntProperty(name
="Fractal Iteration", description
="", min=0, max=100, default
=20)
799 f_exponent
: IntProperty(name
="Fractal Exponent", description
="", min=2, max=33, default
=2)
801 f_ior
: IntProperty(name
="Fractal Interior", description
="", min=1, max=6, default
=1)
803 f_ior_fac
: FloatProperty(
804 name
="Fractal Interior Factor", description
="", min=0.0, max=10.0, default
=1.0
807 f_eor
: IntProperty(name
="Fractal Exterior", description
="", min=1, max=8, default
=1)
809 f_eor_fac
: FloatProperty(
810 name
="Fractal Exterior Factor", description
="", min=0.0, max=10.0, default
=1.0
813 grad_orient_x
: IntProperty(
814 name
="Gradient orientation X", description
="", min=0, max=1, default
=0
817 grad_orient_y
: IntProperty(
818 name
="Gradient orientation Y", description
="", min=0, max=1, default
=1
821 grad_orient_z
: IntProperty(
822 name
="Gradient orientation Z", description
="", min=0, max=1, default
=0
825 pave_sides
: EnumProperty(
826 name
="Pavement sides",
828 items
=(("3", "3", ""), ("4", "4", ""), ("6", "6", "")),
832 pave_pat_2
: IntProperty(
833 name
="Pavement pattern 2", description
="maximum: 2", min=1, max=2, default
=2
836 pave_pat_3
: IntProperty(
837 name
="Pavement pattern 3", description
="maximum: 3", min=1, max=3, default
=3
840 pave_pat_4
: IntProperty(
841 name
="Pavement pattern 4", description
="maximum: 4", min=1, max=4, default
=4
844 pave_pat_5
: IntProperty(
845 name
="Pavement pattern 5", description
="maximum: 5", min=1, max=5, default
=5
848 pave_pat_7
: IntProperty(
849 name
="Pavement pattern 7", description
="maximum: 7", min=1, max=7, default
=7
852 pave_pat_12
: IntProperty(
853 name
="Pavement pattern 12", description
="maximum: 12", min=1, max=12, default
=12
856 pave_pat_22
: IntProperty(
857 name
="Pavement pattern 22", description
="maximum: 22", min=1, max=22, default
=22
860 pave_pat_35
: IntProperty(
861 name
="Pavement pattern 35", description
="maximum: 35", min=1, max=35, default
=35
864 pave_tiles
: IntProperty(
865 name
="Pavement tiles",
866 description
="If sides = 6, maximum tiles 5!!!",
872 pave_form
: IntProperty(name
="Pavement form", description
="", min=0, max=4, default
=0)
874 # -------- FUNCTIONS# ---------------------------------------------------------------- #
876 func_list
: EnumProperty(
878 description
="Select the function for create pattern",
880 ("NONE", "None", "No indentation"),
881 ("f_algbr_cyl1", "Algbr cyl1", ""),
882 ("f_algbr_cyl2", "Algbr cyl2", ""),
883 ("f_algbr_cyl3", "Algbr cyl3", ""),
884 ("f_algbr_cyl4", "Algbr cyl4", ""),
885 ("f_bicorn", "Bicorn", ""),
886 ("f_bifolia", "Bifolia", ""),
887 ("f_blob", "Blob", ""),
888 ("f_blob2", "Blob2", ""),
889 ("f_boy_surface", "Boy surface", ""),
890 ("f_comma", "Comma", ""),
891 ("f_cross_ellipsoids", "Cross ellipsoids", ""),
892 ("f_crossed_trough", "Crossed trough", ""),
893 ("f_cubic_saddle", "Cubic saddle", ""),
894 ("f_cushion", "Cushion", ""),
895 ("f_devils_curve", "Devils curve", ""),
896 ("f_devils_curve_2d", "Devils curve 2d", ""),
897 ("f_dupin_cyclid", "Dupin cyclid", ""),
898 ("f_ellipsoid", "Ellipsoid", ""),
899 ("f_enneper", "Enneper", ""),
900 ("f_flange_cover", "Flange cover", ""),
901 ("f_folium_surface", "Folium surface", ""),
902 ("f_folium_surface_2d", "Folium surface 2d", ""),
903 ("f_glob", "Glob", ""),
904 ("f_heart", "Heart", ""),
905 ("f_helical_torus", "Helical torus", ""),
906 ("f_helix1", "Helix1", ""),
907 ("f_helix2", "Helix2", ""),
908 ("f_hex_x", "Hex x", ""),
909 ("f_hex_y", "Hex y", ""),
910 ("f_hetero_mf", "Hetero mf", ""),
911 ("f_hunt_surface", "Hunt surface", ""),
912 ("f_hyperbolic_torus", "Hyperbolic torus", ""),
913 ("f_isect_ellipsoids", "Isect ellipsoids", ""),
914 ("f_kampyle_of_eudoxus", "Kampyle of eudoxus", ""),
915 ("f_kampyle_of_eudoxus_2d", "Kampyle of eudoxus 2d", ""),
916 ("f_klein_bottle", "Klein bottle", ""),
917 ("f_kummer_surface_v1", "Kummer surface v1", ""),
918 ("f_kummer_surface_v2", "Kummer surface v2", ""),
919 ("f_lemniscate_of_gerono", "Lemniscate of gerono", ""),
920 ("f_lemniscate_of_gerono_2d", "Lemniscate of gerono 2d", ""),
921 ("f_mesh1", "Mesh1", ""),
922 ("f_mitre", "Mitre", ""),
923 ("f_nodal_cubic", "Nodal cubic", ""),
924 ("f_noise3d", "Noise3d", ""),
925 ("f_noise_generator", "Noise generator", ""),
926 ("f_odd", "Odd", ""),
927 ("f_ovals_of_cassini", "Ovals of cassini", ""),
928 ("f_paraboloid", "Paraboloid", ""),
929 ("f_parabolic_torus", "Parabolic torus", ""),
931 ("f_pillow", "Pillow", ""),
932 ("f_piriform", "Piriform", ""),
933 ("f_piriform_2d", "Piriform 2d", ""),
934 ("f_poly4", "Poly4", ""),
935 ("f_polytubes", "Polytubes", ""),
936 ("f_quantum", "Quantum", ""),
937 ("f_quartic_paraboloid", "Quartic paraboloid", ""),
938 ("f_quartic_saddle", "Quartic saddle", ""),
939 ("f_quartic_cylinder", "Quartic cylinder", ""),
941 ("f_ridge", "Ridge", ""),
942 ("f_ridged_mf", "Ridged mf", ""),
943 ("f_rounded_box", "Rounded box", ""),
944 ("f_sphere", "Sphere", ""),
945 ("f_spikes", "Spikes", ""),
946 ("f_spikes_2d", "Spikes 2d", ""),
947 ("f_spiral", "Spiral", ""),
948 ("f_steiners_roman", "Steiners roman", ""),
949 ("f_strophoid", "Strophoid", ""),
950 ("f_strophoid_2d", "Strophoid 2d", ""),
951 ("f_superellipsoid", "Superellipsoid", ""),
953 ("f_torus", "Torus", ""),
954 ("f_torus2", "Torus2", ""),
955 ("f_torus_gumdrop", "Torus gumdrop", ""),
956 ("f_umbrella", "Umbrella", ""),
957 ("f_witch_of_agnesi", "Witch of agnesi", ""),
958 ("f_witch_of_agnesi_2d", "Witch of agnesi 2d", ""),
963 func_x
: FloatProperty(name
="FX", description
="", min=0.0, max=25.0, default
=1.0)
965 func_plus_x
: EnumProperty(
968 items
=(("NONE", "None", ""), ("increase", "*", ""), ("plus", "+", "")),
972 func_y
: FloatProperty(name
="FY", description
="", min=0.0, max=25.0, default
=1.0)
974 func_plus_y
: EnumProperty(
977 items
=(("NONE", "None", ""), ("increase", "*", ""), ("plus", "+", "")),
981 func_z
: FloatProperty(name
="FZ", description
="", min=0.0, max=25.0, default
=1.0)
983 func_plus_z
: EnumProperty(
986 items
=(("NONE", "None", ""), ("increase", "*", ""), ("plus", "+", "")),
990 func_P0
: FloatProperty(name
="P0", description
="", min=0.0, max=25.0, default
=1.0)
992 func_P1
: FloatProperty(name
="P1", description
="", min=0.0, max=25.0, default
=1.0)
994 func_P2
: FloatProperty(name
="P2", description
="", min=0.0, max=25.0, default
=1.0)
996 func_P3
: FloatProperty(name
="P3", description
="", min=0.0, max=25.0, default
=1.0)
998 func_P4
: FloatProperty(name
="P4", description
="", min=0.0, max=25.0, default
=1.0)
1000 func_P5
: FloatProperty(name
="P5", description
="", min=0.0, max=25.0, default
=1.0)
1002 func_P6
: FloatProperty(name
="P6", description
="", min=0.0, max=25.0, default
=1.0)
1004 func_P7
: FloatProperty(name
="P7", description
="", min=0.0, max=25.0, default
=1.0)
1006 func_P8
: FloatProperty(name
="P8", description
="", min=0.0, max=25.0, default
=1.0)
1008 func_P9
: FloatProperty(name
="P9", description
="", min=0.0, max=25.0, default
=1.0)
1010 # ----------------------------------- #
1011 tex_rot_x
: FloatProperty(name
="Rotate X", description
="", min=-180.0, max=180.0, default
=0.0)
1013 tex_rot_y
: FloatProperty(name
="Rotate Y", description
="", min=-180.0, max=180.0, default
=0.0)
1015 tex_rot_z
: FloatProperty(name
="Rotate Z", description
="", min=-180.0, max=180.0, default
=0.0)
1017 tex_mov_x
: FloatProperty(
1018 name
="Move X", description
="", min=-100000.0, max=100000.0, default
=0.0
1021 tex_mov_y
: FloatProperty(
1022 name
="Move Y", description
="", min=-100000.0, max=100000.0, default
=0.0
1025 tex_mov_z
: FloatProperty(
1026 name
="Move Z", description
="", min=-100000.0, max=100000.0, default
=0.0
1029 tex_scale_x
: FloatProperty(name
="Scale X", description
="", min=0.0, max=10000.0, default
=1.0)
1031 tex_scale_y
: FloatProperty(name
="Scale Y", description
="", min=0.0, max=10000.0, default
=1.0)
1033 tex_scale_z
: FloatProperty(name
="Scale Z", description
="", min=0.0, max=10000.0, default
=1.0)
1037 MaterialTextureSlot
,
1039 RenderPovSettingsTexture
,
1047 bpy
.types
.Material
.pov_texture_slots
= CollectionProperty(type=MaterialTextureSlot
)
1048 bpy
.types
.World
.pov_texture_slots
= CollectionProperty(type=WorldTextureSlot
)
1049 bpy
.types
.Texture
.pov
= PointerProperty(type=RenderPovSettingsTexture
)
1053 del bpy
.types
.Texture
.pov
1054 del bpy
.types
.World
.pov_texture_slots
1055 del bpy
.types
.Material
.pov_texture_slots
1057 for cls
in reversed(classes
):
1058 unregister_class(cls
)