diff --git a/OP_layer_picker.py b/OP_layer_picker.py index d23cf00..ba41a2b 100644 --- a/OP_layer_picker.py +++ b/OP_layer_picker.py @@ -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: diff --git a/OP_material_picker.py b/OP_material_picker.py index 7043510..855f493 100644 --- a/OP_material_picker.py +++ b/OP_material_picker.py @@ -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 diff --git a/OP_realign.py b/OP_realign.py index 37ae019..e4a14d5 100644 --- a/OP_realign.py +++ b/OP_realign.py @@ -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)