Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: Fail to paste from clipboard in 3D viewport (Blender 4.2.0) (Image Paste 1.8.1) (Windows 10) #56

Closed
herbyhack opened this issue Jul 19, 2024 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@herbyhack
Copy link

Describe the bug

Add-on fails to paste image from clipboard into 3D viewport (either as reference image or plane). Blender 4.2.0 (Windows 10).

The addon seems to still be functioning fine in the Blender Image Editor. (Haven't tested further in Shader Editor or Video Editor)

Image below is for pasting image "...as Plane" (very similar error for "...as Reference" - please see log below)

image

Step to reproduce

  1. Snip something in Windows 10 (Win+Shift+S)
  2. Go to bledner 3d vieport.
  3. Shift A -> Image -> Paste from Clipboard as...

Relevant log output

********************************************
//******* Paste as Plane...***/// ERROR:
********************************************

Python: Traceback (most recent call last):
  File "C:\Users\Andrew\AppData\Roaming\Blender Foundation\Blender\4.2\scripts\addons\imagepaste\imagepaste\operators.py", line 161, in execute
    bpy.ops.import_image.to_plane(files=[{"name": image.filepath}])
  File "C:\Program Files\Blender Foundation\Blender\blender-4.2.0-LTS-windows-x64\4.2\scripts\modules\bpy\ops.py", line 109, in __call__
    ret = _op_call(self.idname_py(), kw)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: Calling operator "bpy.ops.import_image.to_plane" error, could not be found


***********************************************
//******* Paste as Reference...***/// ERROR:
***********************************************

Python: Traceback (most recent call last):
  File "C:\Users\Andrew\AppData\Roaming\Blender Foundation\Blender\4.2\scripts\addons\imagepaste\imagepaste\operators.py", line 188, in execute
    bpy.ops.object.load_reference_image(filepath=image.filepath)
  File "C:\Program Files\Blender Foundation\Blender\blender-4.2.0-LTS-windows-x64\4.2\scripts\modules\bpy\ops.py", line 109, in __call__
    ret = _op_call(self.idname_py(), kw)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: Calling operator "bpy.ops.object.load_reference_image" error, could not be found

Expected behavior

Image should paste to 3D viewport as Plane or Reference.

Platform

Windows

Platform version

Windows 10 Pro (10.0.19045 Build 19045)

Blender version

Other

ImagePaste Version

1.8.1

@herbyhack herbyhack added the bug Something isn't working label Jul 19, 2024
@alikish4
Copy link

I experience this as well, blender 4.2 win 10

@williamchange
Copy link
Contributor

The operators probably got renamed but replacing them from the operators.py file should make them work again

bpy.ops.import_image.to_plane to bpy.ops.image.import_as_mesh_planes
bpy.ops.object.load_reference_image to bpy.ops.object.empty_image_add

Here's the add-on with the fix (Blender 4.2+)
ImagePaste-1.8.2.zip

opfix.mp4

@herbyhack
Copy link
Author

herbyhack commented Jul 20, 2024 via email

@herbyhack
Copy link
Author

Image below of addon (1.8.2) working effectively in Blender 4.2.0

image

@b-init
Copy link
Owner

b-init commented Jul 20, 2024

Sorry I haven't been available. Thanks a lot @williamchange for the fix and others for reporting and helping. This addon would have died long ago without you. I'll update the release and on other platforms.

@b-init b-init closed this as completed Jul 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants