Skip to main content
added 6 characters in body
Source Link
Harry McKenzie
  • 14.5k
  • 11
  • 34
  • 74

Trying to interpolate using bpy.ops.gpencil.interpolate()bpy.ops.gpencil.interpolate() and bpy.ops.gpencil.interpolate_sequence().

Needbpy.ops.gpencil.interpolate_sequence() which need a context override so I tried this code:

import bpy
from bpy import context

for window in context.window_manager.windows:
    screen = window.screen
    for area in screen.areas:
        if area.type == 'VIEW_3D':
            with context.temp_override(window=window, area=area):
                bpy.ops.gpencil.interpolate_sequence() 
            break

Results in a crash. Maybe it's not possible to do interpolation this way?

Trying to interpolate using bpy.ops.gpencil.interpolate() and bpy.ops.gpencil.interpolate_sequence().

Need a context override so I tried this code:

import bpy
from bpy import context

for window in context.window_manager.windows:
    screen = window.screen
    for area in screen.areas:
        if area.type == 'VIEW_3D':
            with context.temp_override(window=window, area=area):
                bpy.ops.gpencil.interpolate_sequence() 
            break

Results in a crash. Maybe it's not possible to do interpolation this way?

Trying to interpolate using bpy.ops.gpencil.interpolate() and bpy.ops.gpencil.interpolate_sequence() which need a context override so I tried this code:

import bpy
from bpy import context

for window in context.window_manager.windows:
    screen = window.screen
    for area in screen.areas:
        if area.type == 'VIEW_3D':
            with context.temp_override(window=window, area=area):
                bpy.ops.gpencil.interpolate_sequence() 
            break

Results in a crash. Maybe it's not possible to do interpolation this way?

Source Link

Script Grease Pencil Interpolation?

Trying to interpolate using bpy.ops.gpencil.interpolate() and bpy.ops.gpencil.interpolate_sequence().

Need a context override so I tried this code:

import bpy
from bpy import context

for window in context.window_manager.windows:
    screen = window.screen
    for area in screen.areas:
        if area.type == 'VIEW_3D':
            with context.temp_override(window=window, area=area):
                bpy.ops.gpencil.interpolate_sequence() 
            break

Results in a crash. Maybe it's not possible to do interpolation this way?