diff --git "a/I:\\Games\\SteamLibrary\\steamapps\\common\\Blender\\2.79\\scripts\\addons\\mesh_bsurfaces_base.py" "b/I:\\Games\\SteamLibrary\\steamapps\\common\\Blender\\2.79\\scripts\\addons\\mesh_bsurfaces_patched.py" index 8094385..e28bbf5 100644 --- "a/I:\\Games\\SteamLibrary\\steamapps\\common\\Blender\\2.79\\scripts\\addons\\mesh_bsurfaces_base.py" +++ "b/I:\\Games\\SteamLibrary\\steamapps\\common\\Blender\\2.79\\scripts\\addons\\mesh_bsurfaces_patched.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[ len(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 = [] @@ -3156,8 +3157,9 @@ class GPENCIL_OT_SURFSK_add_surface(Operator): # XXX gpencil.convert now keep org object as active/selected, *not* newly created curve! # XXX This is far from perfect, but should work in most cases... # self.original_curve = bpy.context.object + GP_Layer_ = bpy.app.translations.pgettext_data('GP_Layer') for ob in bpy.context.selected_objects: - if ob != bpy.context.scene.objects.active and ob.name.startswith("GP_Layer"): + if ob != bpy.context.scene.objects.active and (ob.name.startswith(GP_Layer_) or ob.name.startswith('GP_Layer')): self.original_curve = ob self.using_external_curves = False elif self.strokes_type == "EXTERNAL_CURVE":