multi_frame editing changed to scene toolsetting property

master
pullusb 2024-11-11 17:34:47 +01:00
parent 7bc7d5d9ff
commit 4732110b93
3 changed files with 7 additions and 7 deletions

View File

@ -74,9 +74,9 @@ class GP_OT_pick_closest_layer(Operator):
self.inv_mat = self.ob.matrix_world.inverted()
self.point_pair = []
if gp.use_multiedit:
if context.scene.tool_settings.use_grease_pencil_multi_frame_editing:
for layer_id, l in enumerate(gp.layers):
if l.hide:# l.lock or
if l.hide: # l.lock or
continue
for f in l.frames:
if not f.select:
@ -91,7 +91,7 @@ class GP_OT_pick_closest_layer(Operator):
else:
# [s for l in gp.layers if not l.lock and not l.hide for s in l.current_frame().stokes]
for layer_id, l in enumerate(gp.layers):
if l.hide or not l.current_frame():# l.lock or
if l.hide or not l.current_frame(): # l.lock or
continue
for s in l.current_frame().strokes:
if self.stroke_filter == 'STROKE' and not self.ob.data.materials[s.material_index].grease_pencil.show_stroke:

View File

@ -77,7 +77,7 @@ class GP_OT_pick_closest_material(Operator):
self.stroke_list = []
self.inv_mat = self.ob.matrix_world.inverted()
if self.gp.use_multiedit:
if context.scene.tool_settings.use_grease_pencil_multi_frame_editing:
for l in self.gp.layers:
if l.hide:# l.lock or
continue
@ -233,7 +233,7 @@ class GP_OT_pick_closest_material(Operator):
self.stroke_list = []
self.inv_mat = self.ob.matrix_world.inverted()
if gp.use_multiedit:
if context.scene.tool_settings.use_grease_pencil_multi_frame_editing:
for l in gp.layers:
if l.hide:# l.lock or
continue

View File

@ -283,7 +283,7 @@ class GPTB_OT_realign(bpy.types.Operator):
## add option to bake strokes if rotation anim is not constant ? might generate too many Keyframes
def invoke(self, context, event):
if context.object.data.use_multiedit:
if context.scene.tool_settings.use_grease_pencil_multi_frame_editing:
self.report({'ERROR'}, 'Does not work in Multiframe mode')
return {"CANCELLED"}
@ -383,7 +383,7 @@ class GPTB_OT_batch_reproject_all_frames(bpy.types.Operator):
default='CURRENT')
def invoke(self, context, event):
if context.object.data.use_multiedit:
if context.scene.tool_settings.use_grease_pencil_multi_frame_editing:
self.report({'ERROR'}, 'Does not work in Multi-edit')
return {"CANCELLED"}
return context.window_manager.invoke_props_dialog(self)