1
# ##### BEGIN GPL LICENSE BLOCK #####
3
# This program is free software; you can redistribute it and/or
4
# modify it under the terms of the GNU General Public License
5
# as published by the Free Software Foundation; either version 2
6
# of the License, or (at your option) any later version.
8
# This program is distributed in the hope that it will be useful,
9
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
# GNU General Public License for more details.
13
# You should have received a copy of the GNU General Public License
14
# along with this program; if not, write to the Free Software Foundation,
15
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17
# ##### END GPL LICENSE BLOCK #####
23
from bpy.props import (StringProperty,
32
# Temporally register old props, so we can access their values.
35
# Mapping old names -> old default values
36
# XXX We could also store the new name, but as it is just the same without leading pov_ ...
37
# Get default values of pov scene props.
39
for k in ["pov_tempfiles_enable", "pov_deletefiles_enable", "pov_scene_name", "pov_scene_path",
40
"pov_renderimage_path", "pov_list_lf_enable", "pov_radio_enable",
41
"pov_radio_display_advanced", "pov_media_enable", "pov_media_samples", "pov_media_color",
42
"pov_baking_enable", "pov_indentation_character", "pov_indentation_spaces",
43
"pov_comments_enable", "pov_command_line_switches", "pov_antialias_enable",
44
"pov_antialias_method", "pov_antialias_depth", "pov_antialias_threshold",
45
"pov_jitter_enable", "pov_jitter_amount", "pov_antialias_gamma", "pov_max_trace_level",
46
"pov_photon_spacing", "pov_photon_max_trace_level", "pov_photon_adc_bailout",
47
"pov_photon_gather_min", "pov_photon_gather_max", "pov_radio_adc_bailout",
48
"pov_radio_always_sample", "pov_radio_brightness", "pov_radio_count",
49
"pov_radio_error_bound", "pov_radio_gray_threshold", "pov_radio_low_error_factor",
50
"pov_radio_media", "pov_radio_minimum_reuse", "pov_radio_nearest_count",
51
"pov_radio_normal", "pov_radio_recursion_limit", "pov_radio_pretrace_start",
52
"pov_radio_pretrace_end"]:
53
old_sce_props[k] = getattr(bpy.types.Scene, k)[1].get('default', None)
55
# Get default values of pov material props.
57
for k in ["pov_irid_enable", "pov_mirror_use_IOR", "pov_mirror_metallic", "pov_conserve_energy",
58
"pov_irid_amount", "pov_irid_thickness", "pov_irid_turbulence", "pov_interior_fade_color",
59
"pov_caustics_enable", "pov_fake_caustics", "pov_fake_caustics_power",
60
"pov_photons_refraction", "pov_photons_dispersion", "pov_photons_reflection",
61
"pov_refraction_type", "pov_replacement_text"]:
62
old_mat_props[k] = getattr(bpy.types.Material, k)[1].get('default', None)
64
# Get default values of pov texture props.
66
for k in ["pov_tex_gamma_enable", "pov_tex_gamma_value", "pov_replacement_text"]:
67
old_tex_props[k] = getattr(bpy.types.Texture, k)[1].get('default', None)
69
# Get default values of pov object props.
71
for k in ["pov_importance_value", "pov_collect_photons", "pov_replacement_text"]:
72
old_obj_props[k] = getattr(bpy.types.Object, k)[1].get('default', None)
74
# Get default values of pov camera props.
76
for k in ["pov_dof_enable", "pov_dof_aperture", "pov_dof_samples_min", "pov_dof_samples_max",
77
"pov_dof_variance", "pov_dof_confidence", "pov_replacement_text"]:
78
old_cam_props[k] = getattr(bpy.types.Camera, k)[1].get('default', None)
80
# Get default values of pov text props.
82
for k in ["pov_custom_code"]:
83
old_txt_props[k] = getattr(bpy.types.Text, k)[1].get('default', None)
85
################################################################################################
87
# For each old pov property of each scene, if its value is not equal to the default one,
88
# copy it to relevant new prop...
89
for sce in bpy.data.scenes:
90
for k, d in old_sce_props.items():
91
val = getattr(sce, k, d)
93
setattr(sce.pov, k[4:], val)
94
# The same goes for materials, textures, etc.
95
for mat in bpy.data.materials:
96
for k, d in old_mat_props.items():
97
val = getattr(mat, k, d)
99
setattr(mat.pov, k[4:], val)
100
for tex in bpy.data.textures:
101
for k, d in old_tex_props.items():
102
val = getattr(tex, k, d)
104
setattr(tex.pov, k[4:], val)
105
for obj in bpy.data.objects:
106
for k, d in old_obj_props.items():
107
val = getattr(obj, k, d)
109
setattr(obj.pov, k[4:], val)
110
for cam in bpy.data.cameras:
111
for k, d in old_cam_props.items():
112
val = getattr(cam, k, d)
114
setattr(cam.pov, k[4:], val)
115
for txt in bpy.data.texts:
116
for k, d in old_txt_props.items():
117
val = getattr(txt, k, d)
119
setattr(txt.pov, k[4:], val)
120
# Finally, unregister old props !
124
class RenderCopySettings(bpy.types.Operator):
126
Update old POV properties to new ones.
128
bl_idname = "scene.pov_update_properties"
129
bl_label = "PovRay render: Update to script v0.0.9"
130
bl_option = {'REGISTER'}
133
def poll(cls, context):
136
def execute(self, context):
142
Scene = bpy.types.Scene
143
Mat = bpy.types.Material
144
Tex = bpy.types.Texture
145
Obj = bpy.types.Object
146
Cam = bpy.types.Camera
147
Text = bpy.types.Text
148
###########################SCENE##################################
151
Scene.pov_tempfiles_enable = BoolProperty(
152
name="Enable Tempfiles",
153
description="Enable the OS-Tempfiles. Otherwise set the path where to save the files",
155
Scene.pov_deletefiles_enable = BoolProperty(
157
description="Delete files after rendering. Doesn't work with the image",
159
Scene.pov_scene_name = StringProperty(
161
description="Name of POV-Ray scene to create. Empty name will use the name of the blend file",
162
default="", maxlen=1024)
163
Scene.pov_scene_path = StringProperty(
164
name="Export scene path",
165
# description="Path to directory where the exported scene (POV and INI) is created", # Bug in POV-Ray RC3
166
description="Path to directory where the files are created",
167
default="", maxlen=1024, subtype="DIR_PATH")
168
Scene.pov_renderimage_path = StringProperty(
169
name="Rendered image path",
170
description="Full path to directory where the rendered image is saved",
171
default="", maxlen=1024, subtype="DIR_PATH")
172
Scene.pov_list_lf_enable = BoolProperty(
174
description="Enable line breaks in lists (vectors and indices). Disabled: lists are exported in one line",
177
# Not a real pov option, just to know if we should write
178
Scene.pov_radio_enable = BoolProperty(
179
name="Enable Radiosity",
180
description="Enable POV-Rays radiosity calculation",
182
Scene.pov_radio_display_advanced = BoolProperty(
183
name="Advanced Options",
184
description="Show advanced options",
186
Scene.pov_media_enable = BoolProperty(
188
description="Enable POV-Rays atmospheric media",
190
Scene.pov_media_samples = IntProperty(
191
name="Samples", description="Number of samples taken from camera to first object encountered along ray path for media calculation",
192
min=1, max=100, default=35)
194
Scene.pov_media_color = FloatVectorProperty(
196
description="The atmospheric media color",
202
default=(0.001, 0.001, 0.001),
203
options={'ANIMATABLE'})
205
Scene.pov_baking_enable = BoolProperty(
206
name="Enable Baking",
207
description="Enable POV-Rays texture baking",
209
Scene.pov_indentation_character = EnumProperty(
211
description="Select the indentation type",
212
items=(("0", "None", "No indentation"),
213
("1", "Tabs", "Indentation with tabs"),
214
("2", "Spaces", "Indentation with spaces")),
216
Scene.pov_indentation_spaces = IntProperty(
217
name="Quantity of spaces",
218
description="The number of spaces for indentation",
219
min=1, max=10, default=4)
221
Scene.pov_comments_enable = BoolProperty(
222
name="Enable Comments",
223
description="Add comments to pov file",
227
Scene.pov_command_line_switches = StringProperty(name="Command Line Switches",
228
description="Command line switches consist of a + (plus) or - (minus) sign, followed by one or more alphabetic characters and possibly a numeric value",
229
default="", maxlen=500)
231
Scene.pov_antialias_enable = BoolProperty(
232
name="Anti-Alias", description="Enable Anti-Aliasing",
235
Scene.pov_antialias_method = EnumProperty(
237
description="AA-sampling method. Type 1 is an adaptive, non-recursive, super-sampling method. Type 2 is an adaptive and recursive super-sampling method",
238
items=(("0", "non-recursive AA", "Type 1 Sampling in POV-Ray"),
239
("1", "recursive AA", "Type 2 Sampling in POV-Ray")),
242
Scene.pov_antialias_depth = IntProperty(
243
name="Antialias Depth", description="Depth of pixel for sampling",
244
min=1, max=9, default=3)
246
Scene.pov_antialias_threshold = FloatProperty(
247
name="Antialias Threshold", description="Tolerance for sub-pixels",
248
min=0.0, max=1.0, soft_min=0.05, soft_max=0.5, default=0.1)
250
Scene.pov_jitter_enable = BoolProperty(
251
name="Jitter", description="Enable Jittering. Adds noise into the sampling process (it should be avoided to use jitter in animation)",
254
Scene.pov_jitter_amount = FloatProperty(
255
name="Jitter Amount", description="Amount of jittering",
256
min=0.0, max=1.0, soft_min=0.01, soft_max=1.0, default=1.0)
258
Scene.pov_antialias_gamma = FloatProperty(
259
name="Antialias Gamma", description="POV-Ray compares gamma-adjusted values for super sampling. Antialias Gamma sets the Gamma before comparison",
260
min=0.0, max=5.0, soft_min=0.01, soft_max=2.5, default=2.5)
262
Scene.pov_max_trace_level = IntProperty(
263
name="Max Trace Level", description="Number of reflections/refractions allowed on ray path",
264
min=1, max=256, default=5)
266
Scene.pov_photon_spacing = FloatProperty(
267
name="Spacing", description="Average distance between photons on surfaces. half this get four times as many surface photons",
268
min=0.001, max=1.000, soft_min=0.001, soft_max=1.000, default=0.005, precision=3)
270
Scene.pov_photon_max_trace_level = IntProperty(
271
name="Max Trace Level", description="Number of reflections/refractions allowed on ray path",
272
min=1, max=256, default=5)
274
Scene.pov_photon_adc_bailout = FloatProperty(
275
name="ADC Bailout", description="The adc_bailout for photons. Use adc_bailout = 0.01 / brightest_ambient_object for good results",
276
min=0.0, max=1000.0, soft_min=0.0, soft_max=1.0, default=0.1, precision=3)
278
Scene.pov_photon_gather_min = IntProperty(
279
name="Gather Min", description="Minimum number of photons gathered for each point",
280
min=1, max=256, default=20)
282
Scene.pov_photon_gather_max = IntProperty(
283
name="Gather Max", description="Maximum number of photons gathered for each point",
284
min=1, max=256, default=100)
286
Scene.pov_radio_adc_bailout = FloatProperty(
287
name="ADC Bailout", description="The adc_bailout for radiosity rays. Use adc_bailout = 0.01 / brightest_ambient_object for good results",
288
min=0.0, max=1000.0, soft_min=0.0, soft_max=1.0, default=0.01, precision=3)
290
Scene.pov_radio_always_sample = BoolProperty(
291
name="Always Sample", description="Only use the data from the pretrace step and not gather any new samples during the final radiosity pass",
294
Scene.pov_radio_brightness = FloatProperty(
295
name="Brightness", description="Amount objects are brightened before being returned upwards to the rest of the system",
296
min=0.0, max=1000.0, soft_min=0.0, soft_max=10.0, default=1.0)
298
Scene.pov_radio_count = IntProperty(
299
name="Ray Count", description="Number of rays for each new radiosity value to be calculated (halton sequence over 1600)",
300
min=1, max=10000, soft_max=1600, default=35)
302
Scene.pov_radio_error_bound = FloatProperty(
303
name="Error Bound", description="One of the two main speed/quality tuning values, lower values are more accurate",
304
min=0.0, max=1000.0, soft_min=0.1, soft_max=10.0, default=1.8)
306
Scene.pov_radio_gray_threshold = FloatProperty(
307
name="Gray Threshold", description="One of the two main speed/quality tuning values, lower values are more accurate",
308
min=0.0, max=1.0, soft_min=0, soft_max=1, default=0.0)
310
Scene.pov_radio_low_error_factor = FloatProperty(
311
name="Low Error Factor", description="Just enough samples is slightly blotchy. Low error changes error tolerance for less critical last refining pass",
312
min=0.0, max=1.0, soft_min=0.0, soft_max=1.0, default=0.5)
314
# max_sample - not available yet
315
Scene.pov_radio_media = BoolProperty(
316
name="Media", description="Radiosity estimation can be affected by media",
319
Scene.pov_radio_minimum_reuse = FloatProperty(
320
name="Minimum Reuse", description="Fraction of the screen width which sets the minimum radius of reuse for each sample point (At values higher than 2% expect errors)",
321
min=0.0, max=1.0, soft_min=0.1, soft_max=0.1, default=0.015, precision=3)
323
Scene.pov_radio_nearest_count = IntProperty(
324
name="Nearest Count", description="Number of old ambient values blended together to create a new interpolated value",
325
min=1, max=20, default=5)
327
Scene.pov_radio_normal = BoolProperty(
328
name="Normals", description="Radiosity estimation can be affected by normals",
331
Scene.pov_radio_recursion_limit = IntProperty(
332
name="Recursion Limit", description="how many recursion levels are used to calculate the diffuse inter-reflection",
333
min=1, max=20, default=3)
335
Scene.pov_radio_pretrace_start = FloatProperty(
336
name="Pretrace Start", description="Fraction of the screen width which sets the size of the blocks in the mosaic preview first pass",
337
min=0.01, max=1.00, soft_min=0.02, soft_max=1.0, default=0.08)
339
Scene.pov_radio_pretrace_end = FloatProperty(
340
name="Pretrace End", description="Fraction of the screen width which sets the size of the blocks in the mosaic preview last pass",
341
min=0.001, max=1.00, soft_min=0.01, soft_max=1.00, default=0.04, precision=3)
343
#############################MATERIAL######################################
345
Mat.pov_irid_enable = BoolProperty(
346
name="Enable Iridescence",
347
description="Newton's thin film interference (like an oil slick on a puddle of water or the rainbow hues of a soap bubble.)",
350
Mat.pov_mirror_use_IOR = BoolProperty(
351
name="Correct Reflection",
352
description="Use same IOR as raytrace transparency to calculate mirror reflections. More physically correct",
355
Mat.pov_mirror_metallic = BoolProperty(
356
name="Metallic Reflection",
357
description="mirror reflections get colored as diffuse (for metallic materials)",
360
Mat.pov_conserve_energy = BoolProperty(
361
name="Conserve Energy",
362
description="Light transmitted is more correctly reduced by mirror reflections, also the sum of diffuse and translucency gets reduced below one ",
365
Mat.pov_irid_amount = FloatProperty(
367
description="Contribution of the iridescence effect to the overall surface color. As a rule of thumb keep to around 0.25 (25% contribution) or less, but experiment. If the surface is coming out too white, try lowering the diffuse and possibly the ambient values of the surface",
368
min=0.0, max=1.0, soft_min=0.01, soft_max=1.0, default=0.25)
370
Mat.pov_irid_thickness = FloatProperty(
372
description="A very thin film will have a high frequency of color changes while a thick film will have large areas of color",
373
min=0.0, max=1000.0, soft_min=0.1, soft_max=10.0, default=1)
375
Mat.pov_irid_turbulence = FloatProperty(
377
description="This parameter varies the thickness",
378
min=0.0, max=10.0, soft_min=0.000, soft_max=1.0, default=0)
380
Mat.pov_interior_fade_color = FloatVectorProperty(
382
description="Color of filtered attenuation for transparent materials",
389
options={'ANIMATABLE'})
391
Mat.pov_caustics_enable = BoolProperty(
393
description="use only fake refractive caustics (default) or photon based reflective/refractive caustics",
396
Mat.pov_fake_caustics = BoolProperty(
397
name="Fake Caustics",
398
description="use only (Fast) fake refractive caustics",
401
Mat.pov_fake_caustics_power = FloatProperty(
402
name="Fake caustics power",
403
description="Values typically range from 0.0 to 1.0 or higher. Zero is no caustics. Low, non-zero values give broad hot-spots while higher values give tighter, smaller simulated focal points",
404
min=0.00, max=10.0, soft_min=0.00, soft_max=1.10, default=0.1)
406
Mat.pov_photons_refraction = BoolProperty(
407
name="Refractive Photon Caustics",
408
description="more physically correct",
411
Mat.pov_photons_dispersion = FloatProperty(
412
name="chromatic dispersion",
413
description="Light passing through will be separated according to wavelength. This ratio of refractive indices for violet to red controls how much the colors are spread out 1 = no dispersion, good values are 1.01 to 1.1",
414
min=1.0000, max=10.000, soft_min=1.0000, soft_max=1.1000, precision=4, default=1.0000)
416
Mat.pov_photons_reflection = BoolProperty(
417
name="Reflective Photon Caustics",
418
description="Use this to make your Sauron's ring ;-P",
421
Mat.pov_refraction_type = EnumProperty(
422
items=[("0", "None", "use only reflective caustics"),
423
("1", "Fake Caustics", "use fake caustics"),
424
("2", "Photons Caustics", "use photons for refractive caustics"),
427
description="use fake caustics (fast) or true photons for refractive Caustics",
429
##################################CustomPOV Code############################
430
Mat.pov_replacement_text = StringProperty(
431
name="Declared name:",
432
description="Type the declared name in custom POV code or an external .inc it points at. texture {} expected",
435
#Only DUMMIES below for now:
436
Tex.pov_replacement_text = StringProperty(
437
name="Declared name:",
438
description="Type the declared name in custom POV code or an external .inc it points at. pigment {} expected",
441
Obj.pov_replacement_text = StringProperty(
442
name="Declared name:",
443
description="Type the declared name in custom POV code or an external .inc it points at. Any POV shape expected e.g: isosurface {}",
446
Cam.pov_replacement_text = StringProperty(
447
name="Texts in blend file",
448
description="Type the declared name in custom POV code or an external .inc it points at. camera {} expected",
450
##############################TEXTURE######################################
452
#Custom texture gamma
453
Tex.pov_tex_gamma_enable = BoolProperty(
454
name="Enable custom texture gamma",
455
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)",
458
Tex.pov_tex_gamma_value = FloatProperty(
459
name="Custom texture gamma",
460
description="value for which the file was issued e.g. a Raw photo is gamma 1.0",
461
min=0.45, max=5.00, soft_min=1.00, soft_max=2.50, default=1.00)
463
#################################OBJECT####################################
466
Obj.pov_importance_value = FloatProperty(
467
name="Radiosity Importance",
468
description="Priority value relative to other objects for sampling radiosity rays. Increase to get more radiosity rays at comparatively small yet bright objects",
469
min=0.01, max=1.00, default=1.00)
472
Obj.pov_collect_photons = BoolProperty(
473
name="Receive Photon Caustics",
474
description="Enable object to collect photons from other objects caustics. Turn off for objects that don't really need to receive caustics (e.g. objects that generate caustics often don't need to show any on themselves) ",
477
##################################CAMERA###################################
480
Cam.pov_dof_enable = BoolProperty(
481
name="Depth Of Field",
482
description="Enable POV-Ray Depth Of Field ",
485
#Aperture (Intensity of the Blur)
486
Cam.pov_dof_aperture = FloatProperty(
488
description="Similar to a real camera's aperture effect over focal blur (though not in physical units and independant of focal length).Increase to get more blur",
489
min=0.01, max=1.00, default=0.25)
491
#Aperture adaptive sampling
492
Cam.pov_dof_samples_min = IntProperty(
494
description="Minimum number of rays to use for each pixel",
495
min=1, max=128, default=96)
497
Cam.pov_dof_samples_max = IntProperty(
499
description="Maximum number of rays to use for each pixel",
500
min=1, max=128, default=128)
502
Cam.pov_dof_variance = IntProperty(
504
description="Minimum threshold (fractional value) for adaptive DOF sampling (up increases quality and render time). The value for the variance should be in the range of the smallest displayable color difference",
505
min=1, max=100000, soft_max=10000, default=256)
507
Cam.pov_dof_confidence = FloatProperty(
509
description="Probability to reach the real color value. Larger confidence values will lead to more samples, slower traces and better images",
510
min=0.01, max=0.99, default=0.90)
512
###################################TEXT####################################
514
Text.pov_custom_code = BoolProperty(
516
description="Add this text at the top of the exported POV-Ray file",
521
Scene = bpy.types.Scene
522
Mat = bpy.types.Material
523
Tex = bpy.types.Texture
524
Obj = bpy.types.Object
525
Cam = bpy.types.Camera
526
Text = bpy.types.Text
527
del Scene.pov_tempfiles_enable # CR
528
del Scene.pov_scene_name # CR
529
del Scene.pov_deletefiles_enable # CR
530
del Scene.pov_scene_path # CR
531
del Scene.pov_renderimage_path # CR
532
del Scene.pov_list_lf_enable # CR
533
del Scene.pov_radio_enable
534
del Scene.pov_radio_display_advanced
535
del Scene.pov_radio_adc_bailout
536
del Scene.pov_radio_always_sample
537
del Scene.pov_radio_brightness
538
del Scene.pov_radio_count
539
del Scene.pov_radio_error_bound
540
del Scene.pov_radio_gray_threshold
541
del Scene.pov_radio_low_error_factor
542
del Scene.pov_radio_media
543
del Scene.pov_radio_minimum_reuse
544
del Scene.pov_radio_nearest_count
545
del Scene.pov_radio_normal
546
del Scene.pov_radio_recursion_limit
547
del Scene.pov_radio_pretrace_start # MR
548
del Scene.pov_radio_pretrace_end # MR
549
del Scene.pov_media_enable # MR
550
del Scene.pov_media_samples # MR
551
del Scene.pov_media_color # MR
552
del Scene.pov_baking_enable # MR
553
del Scene.pov_max_trace_level # MR
554
del Scene.pov_photon_spacing # MR
555
del Scene.pov_photon_max_trace_level # MR
556
del Scene.pov_photon_adc_bailout # MR
557
del Scene.pov_photon_gather_min # MR
558
del Scene.pov_photon_gather_max # MR
559
del Scene.pov_antialias_enable # CR
560
del Scene.pov_antialias_method # CR
561
del Scene.pov_antialias_depth # CR
562
del Scene.pov_antialias_threshold # CR
563
del Scene.pov_antialias_gamma # CR
564
del Scene.pov_jitter_enable # CR
565
del Scene.pov_jitter_amount # CR
566
del Scene.pov_command_line_switches # CR
567
del Scene.pov_indentation_character # CR
568
del Scene.pov_indentation_spaces # CR
569
del Scene.pov_comments_enable # CR
570
del Mat.pov_irid_enable # MR
571
del Mat.pov_mirror_use_IOR # MR
572
del Mat.pov_mirror_metallic # MR
573
del Mat.pov_conserve_energy # MR
574
del Mat.pov_irid_amount # MR
575
del Mat.pov_irid_thickness # MR
576
del Mat.pov_irid_turbulence # MR
577
del Mat.pov_interior_fade_color # MR
578
del Mat.pov_caustics_enable # MR
579
del Mat.pov_fake_caustics # MR
580
del Mat.pov_fake_caustics_power # MR
581
del Mat.pov_photons_refraction # MR
582
del Mat.pov_photons_dispersion # MR
583
del Mat.pov_photons_reflection # MR
584
del Mat.pov_refraction_type # MR
585
del Mat.pov_replacement_text # MR
586
del Tex.pov_tex_gamma_enable # MR
587
del Tex.pov_tex_gamma_value # MR
588
del Tex.pov_replacement_text # MR
589
del Obj.pov_importance_value # MR
590
del Obj.pov_collect_photons # MR
591
del Obj.pov_replacement_text # MR
592
del Cam.pov_dof_enable # MR
593
del Cam.pov_dof_aperture # MR
594
del Cam.pov_dof_samples_min # MR
595
del Cam.pov_dof_samples_max # MR
596
del Cam.pov_dof_variance # MR
597
del Cam.pov_dof_confidence # MR
598
del Cam.pov_replacement_text # MR
599
del Text.pov_custom_code # MR