2 Commits

Author SHA1 Message Date
akaneyu 0a29707c3c Fix: start position of the selection may be incorrect 2025-03-23 13:37:58 +09:00
akaneyu bbace1896a Support Blender 4.4 2025-03-23 00:57:13 +09:00
3 changed files with 29 additions and 18 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
'''
Copyright (C) 2021 - 2024 Akaneyu
Copyright (C) 2021 - 2025 Akaneyu
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -18,7 +18,7 @@
bl_info = {
"name": "Image Editor Plus",
"author": "akaneyu",
"version": (1, 9, 0),
"version": (1, 10, 0),
"blender": (3, 3, 0),
"location": "Image",
"warning": "",
+2 -1
View File
@@ -1,5 +1,5 @@
'''
Copyright (C) 2021 - 2024 Akaneyu
Copyright (C) 2021 - 2025 Akaneyu
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -136,6 +136,7 @@ def draw_handler():
# release the selection if the image is changed
if area_session.selection or area_session.selection_region:
if area_session.prev_image:
if img != area_session.prev_image:
cancel_selection(context)
+17 -7
View File
@@ -1,5 +1,5 @@
'''
Copyright (C) 2021 - 2024 Akaneyu
Copyright (C) 2021 - 2025 Akaneyu
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -26,7 +26,9 @@ class IMAGE_EDITOR_PLUS_OT_make_selection(bpy.types.Operator):
bl_idname = "image_editor_plus.make_selection"
bl_label = "Make Selection"
def __init__(self):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.lmb = False
def modal(self, context, event):
@@ -43,12 +45,14 @@ class IMAGE_EDITOR_PLUS_OT_make_selection(bpy.types.Operator):
if area_session.selection_region:
area_session.selection_region[1] = region_pos
else:
area_session.selection_region = [region_pos, region_pos]
elif event.type == 'LEFTMOUSE':
if event.value == 'PRESS':
self.lmb = True
region_pos = [event.mouse_region_x, event.mouse_region_y]
area_session.selection_region = [region_pos, region_pos]
elif event.value == 'RELEASE':
self.lmb = False
@@ -397,7 +401,9 @@ class IMAGE_EDITOR_PLUS_OT_move_layer(bpy.types.Operator):
bl_idname = "image_editor_plus.move_layer"
bl_label = "Move Layer"
def __init__(self):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.start_input_position = [0, 0]
self.start_layer_location = [0, 0]
@@ -885,7 +891,9 @@ class IMAGE_EDITOR_PLUS_OT_rotate_layer_arbitrary(bpy.types.Operator):
bl_idname = "image_editor_plus.rotate_layer_arbitrary"
bl_label = "Rotate Layer Arbitrary"
def __init__(self):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.start_input_position = [0, 0]
self.start_layer_angle = 0
@@ -967,7 +975,9 @@ class IMAGE_EDITOR_PLUS_OT_scale_layer(bpy.types.Operator):
bl_idname = "image_editor_plus.scale_layer"
bl_label = "Scale Layer"
def __init__(self):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.start_input_position = [0, 0]
self.start_layer_scale_x = 1.0
self.start_layer_scale_y = 1.0