Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Oeser <info@graphics-engineer.com>2018-07-13 15:32:34 +0300
committerPhilipp Oeser <info@graphics-engineer.com>2018-07-13 15:32:34 +0300
commit66fe0a63528b8654700d62ca3e6701010159cadc (patch)
tree68910a5c805c02819568d169ac213a264170d9c0
parente2c5cd7326840b89c2c8b80c5b85339206b3f0ac (diff)
Fix Bsurfaces error with international 'Translate New Data' option
second issue mentioned in T55960, this time the name lookup of the generated shrinkwrap modifier could go wrong thanx @icyp for investigating
-rw-r--r--mesh_bsurfaces.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/mesh_bsurfaces.py b/mesh_bsurfaces.py
index b6debec2..d6c855de 100644
--- a/mesh_bsurfaces.py
+++ b/mesh_bsurfaces.py
@@ -1592,10 +1592,11 @@ class GPENCIL_OT_SURFSK_add_surface(Operator):
final_ob_duplicate = bpy.context.scene.objects.active
bpy.ops.object.modifier_add('INVOKE_REGION_WIN', type='SHRINKWRAP')
- final_ob_duplicate.modifiers["Shrinkwrap"].wrap_method = "NEAREST_VERTEX"
- final_ob_duplicate.modifiers["Shrinkwrap"].target = self.main_object
+ shrinkwrap_modifier = final_ob_duplicate.modifiers[-1]
+ shrinkwrap_modifier.wrap_method = "NEAREST_VERTEX"
+ shrinkwrap_modifier.target = self.main_object
- bpy.ops.object.modifier_apply('INVOKE_REGION_WIN', apply_as='DATA', modifier='Shrinkwrap')
+ bpy.ops.object.modifier_apply('INVOKE_REGION_WIN', apply_as='DATA', modifier=shrinkwrap_modifier.name)
# Make list with verts of original mesh as index and coords as value
main_object_verts_coords = []