code fix on operators and draw cam handler

2.0.5

- changed: redo panel for GP layer picker has better name and display active layer name
- changed: some operator id_name to expose "add shortcut" in context menu for some button
- fixed: error with draw_cam handler when no camera is active
This commit is contained in:
Pullusb
2022-10-07 02:20:28 +02:00
parent 43a28876d1
commit 8e3b3871e6
6 changed files with 29 additions and 17 deletions
+7 -7
View File
@@ -11,7 +11,7 @@ from . import utils
class GPTB_OT_copy_text(bpy.types.Operator):
bl_idname = "wm.copytext"
bl_label = "Copy to clipboard"
bl_label = "Copy To Clipboard"
bl_description = "Insert passed text to clipboard"
bl_options = {"REGISTER", "INTERNAL"}
@@ -24,8 +24,8 @@ class GPTB_OT_copy_text(bpy.types.Operator):
return {"FINISHED"}
class GPTB_OT_flipx_view(bpy.types.Operator):
bl_idname = "gp.mirror_flipx"
bl_label = "cam mirror flipx"
bl_idname = "view3d.camera_mirror_flipx"
bl_label = "Cam Mirror Flipx"
bl_description = "Invert X scale on camera to flip image horizontally"
bl_options = {"REGISTER"}
@@ -39,7 +39,7 @@ class GPTB_OT_flipx_view(bpy.types.Operator):
class GPTB_OT_rename_data_from_obj(bpy.types.Operator):
bl_idname = "gp.rename_data_from_obj"
bl_label = "Rename GP from object"
bl_label = "Rename GP From Object"
bl_description = "Rename the GP datablock with the same name as the object"
bl_options = {"REGISTER"}
@@ -120,7 +120,7 @@ def get_gp_alignement_vector(context):
class GPTB_OT_draw_cam(bpy.types.Operator):
bl_idname = "gp.draw_cam_switch"
bl_label = "Draw cam switch"
bl_label = "Draw Cam Switch"
bl_description = "switch between main camera and draw (manipulate) camera"
bl_options = {"REGISTER"}
@@ -245,7 +245,7 @@ class GPTB_OT_draw_cam(bpy.types.Operator):
class GPTB_OT_set_view_as_cam(bpy.types.Operator):
bl_idname = "gp.set_view_as_cam"
bl_label = "Cam at view"
bl_label = "Cam At View"
bl_description = "Place the active camera at current viewpoint, parent to active object. (need to be out of camera)"
bl_options = {"REGISTER"}
@@ -286,7 +286,7 @@ class GPTB_OT_set_view_as_cam(bpy.types.Operator):
class GPTB_OT_reset_cam_rot(bpy.types.Operator):
bl_idname = "gp.reset_cam_rot"
bl_label = "Reset rotation"
bl_label = "Reset Rotation"
bl_description = "Reset rotation of the draw manipulation camera"
bl_options = {"REGISTER"}