Skip to content

Commit

Permalink
Bakery for all fixing
Browse files Browse the repository at this point in the history
  • Loading branch information
nortikin committed Feb 1, 2025
1 parent 66fed7f commit e8f9a9f
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 6 deletions.
8 changes: 4 additions & 4 deletions nodes/solid/solid_viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,10 +396,10 @@ def draw_buttons_ext(self, context, layout):

layout.prop(self, 'vector_light', text='')

def bake(self):
bpy.ops.node.sverchok_mesh_baker_mk3(
node_name=self.name, tree_name=self.id_data.name
)

def bake(self, context):
with context.temp_override(node=self):
bpy.ops.node.sverchok_solid_baker_mk3()

def rclick_menu(self, context, layout):
self.draw_additional_props(context, layout, n_panel=False)
Expand Down
4 changes: 4 additions & 0 deletions nodes/viz/viewer_draw_curve.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,10 @@ def draw_buttons(self, context, layout):
row.separator()
self.wrapper_tracked_ui_draw_op(row, Sv3DviewAlign.bl_idname, icon='CURSOR', text='')

def bake(self, context):
with context.temp_override(node=self):
bpy.ops.node.sverchok_curve_baker()

def sv_init(self, context):
self.inputs.new('SvCurveSocket', 'Curve')
self.inputs.new('SvStringsSocket', 'Resolution').prop_name = 'resolution'
Expand Down
2 changes: 1 addition & 1 deletion nodes/viz/viewer_draw_mk4.py
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,7 @@ def rclick_menu(self, context, layout):
layout.separator()
self.node_replacement_menu(context, layout)

def bake(self):
def bake(self, context):
bpy.ops.node.sverchok_mesh_baker_mk3(
node_name=self.name, tree_name=self.id_data.name
)
Expand Down
4 changes: 4 additions & 0 deletions nodes/viz/viewer_draw_surface.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,10 @@ def draw_buttons(self, context, layout):
row.separator()
self.wrapper_tracked_ui_draw_op(row, Sv3DviewAlign.bl_idname, icon='CURSOR', text='')

def bake(self, context):
with context.temp_override(node=self):
bpy.ops.node.sverchok_surface_baker()

def draw_buttons_ext(self, context, layout):
layout.prop(self, 'light_vector')
self.draw_buttons(context, layout)
Expand Down
2 changes: 1 addition & 1 deletion ui/sv_panels.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ def execute(self, context):
for node in ng.nodes:
if hasattr(node, 'bake'):
if getattr(node, 'activate', getattr(node, 'show_objects', False)):
node.bake()
node.bake(context)

return {'FINISHED'}

Expand Down

0 comments on commit e8f9a9f

Please sign in to comment.