Add basic animation functionality to scribbles #2

Merged
Simon Thommes merged 2 commits from scribble-animation into master 2024-03-07 17:29:33 +01:00
2 changed files with 2 additions and 1 deletions

View File

@ -28,13 +28,14 @@ class SCRIB_OT_draw_curves(bpy.types.Operator):
gp = None
def modal(self, context, event):
if self.init:
if self.init:
#bpy.ops.grease_pencil.brush_stroke('INVOKE_DEFAULT')
bpy.ops.curves.draw('INVOKE_DEFAULT', wait_for_input=False)
self.init = False
else:
self.ng_process.nodes['settings.color'].color = [*self.brush_color, 1.]
self.ng_process.nodes['view_vector'].vector = context.space_data.region_3d.view_rotation @ Vector((0.0, 0.0, 1.0))
self.ng_process.nodes['new_key'].boolean = context.scene.tool_settings.use_keyframe_insert_auto
if 'SCRIB_surface_object' in context.object.keys():
if context.object['SCRIB_surface_object']:
self.ng_process.nodes['surface_object'].inputs[0].default_value = context.object['SCRIB_surface_object']

Binary file not shown.