Skip to content
Snippets Groups Projects
Commit 62240714 authored by Campbell Barton's avatar Campbell Barton
Browse files

fix from perfection cat (sindra1961), update for API changes.

parent c4fb4a11
No related branches found
No related tags found
No related merge requests found
...@@ -825,8 +825,8 @@ def register(): ...@@ -825,8 +825,8 @@ def register():
bpy.types.Scene.SURFSK_precision = bpy.props.IntProperty(name="Precision", description="Precision level of the surface calculation", default=4, min=0, max=100000) bpy.types.Scene.SURFSK_precision = bpy.props.IntProperty(name="Precision", description="Precision level of the surface calculation", default=4, min=0, max=100000)
bpy.types.Scene.SURFSK_keep_strokes = bpy.props.BoolProperty(name="Keep strokes", description="Keeps the sketched strokes after adding the surface", default=False) bpy.types.Scene.SURFSK_keep_strokes = bpy.props.BoolProperty(name="Keep strokes", description="Keeps the sketched strokes after adding the surface", default=False)
keymap_item_add_surf = bpy.data.window_managers[0].keyconfigs.active.keymaps["3D View"].items.new("gpencil.surfsk_add_surface","E","PRESS", key_modifier="D") keymap_item_add_surf = bpy.data.window_managers[0].keyconfigs.active.keymaps["3D View"].keymap_items.new("gpencil.surfsk_add_surface","E","PRESS", key_modifier="D")
keymap_item_stroke_to_curve = bpy.data.window_managers[0].keyconfigs.active.keymaps["3D View"].items.new("gpencil.surfsk_strokes_to_curves","C","PRESS", key_modifier="D") keymap_item_stroke_to_curve = bpy.data.window_managers[0].keyconfigs.active.keymaps["3D View"].keymap_items.new("gpencil.surfsk_strokes_to_curves","C","PRESS", key_modifier="D")
def unregister(): def unregister():
...@@ -840,12 +840,12 @@ def unregister(): ...@@ -840,12 +840,12 @@ def unregister():
del bpy.types.Scene.SURFSK_keep_strokes del bpy.types.Scene.SURFSK_keep_strokes
km = bpy.data.window_managers[0].keyconfigs.active.keymaps["3D View"] km = bpy.data.window_managers[0].keyconfigs.active.keymaps["3D View"]
for kmi in km.items: for kmi in km.keymap_items:
if kmi.idname == 'wm.call_menu': if kmi.idname == 'wm.call_menu':
if kmi.properties.name == "GPENCIL_OT_SURFSK_add_surface": if kmi.properties.name == "GPENCIL_OT_SURFSK_add_surface":
km.items.remove(kmi) km.keymap_items.remove(kmi)
elif kmi.properties.name == "GPENCIL_OT_SURFSK_strokes_to_curves": elif kmi.properties.name == "GPENCIL_OT_SURFSK_strokes_to_curves":
km.items.remove(kmi) km.keymap_items.remove(kmi)
else: else:
continue continue
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment