Addon: LoopTools Gstrech + deleted annotation = broken #67465

Closed
opened 2019-07-22 18:58:48 +02:00 by Vyacheslav Kobozev · 12 comments

System Information
Operating system: Windows-7-6.1.7601-SP1 64 Bits
Graphics card: GeForce GTX 660 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 430.86

Blender Version
Broken: version: 2.80 (sub 74), branch: master, commit date: 2019-07-18 14:52, hash: blender/blender@38d4483c6a

Deleting annotation will break Gstretch permanently

Exact steps for others to reproduce the error
First variant:

  1. Draw annotation line.
  2. Delete annotation layer via View toolshelf
  3. Try to use Gstretch. It will fail and warn that «Note» layer not found

Second variant:

  1. Draw annotation line along selected edges,
  2. Push Gstrech
  3. Now in Adjustment menu push «Delete GP strokes», Gstretch will be cancelled and button not work until new line will be created

General problem: I have no choice to use Gstrech with or without annotation. Once annotation line is created, Gstrech will work with it.
I should delete all annotation data and purge em before Gstretch will start to work without annotation guide and with warning «Annotation not found»
If I will create empty annotation layer, Gstrech will stop work again.

Gstrech bug.blend

So I prefer do not have ability to use guides than have this bug.

Traceback (most recent call last):
  File "F:\Progs\Graphics\3d\blender 2.80\2.80\scripts\addons\mesh_looptools.py", line 3984, in invoke
    return self.execute(context)
  File "F:\Progs\Graphics\3d\blender 2.80\2.80\scripts\addons\mesh_looptools.py", line 4000, in execute
    strokes = gstretch_get_strokes(self, context)
  File "F:\Progs\Graphics\3d\blender 2.80\2.80\scripts\addons\mesh_looptools.py", line 2843, in gstretch_get_strokes
    layer = bpy.data.grease_pencils["Annotations"].layers["Note"]
KeyError: 'bpy_prop_collection[key]: key "Note" not found'

location: <unknown location>:-1

And button «Remove all annotation strokes» can ruin a lot of work. It trying to delete default layer with name «Note»
If I rename it, it causes error.

Traceback (most recent call last):
  File "F:\Progs\Graphics\3d\blender 2.80\2.80\scripts\addons\mesh_looptools.py", line 3828, in execute
    bpy.data.grease_pencils["Annotations"].layers["Note"].clear()
KeyError: 'bpy_prop_collection[key]: key "Note" not found'

location: <unknown location>:-1
**System Information** Operating system: Windows-7-6.1.7601-SP1 64 Bits Graphics card: GeForce GTX 660 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 430.86 **Blender Version** Broken: version: 2.80 (sub 74), branch: master, commit date: 2019-07-18 14:52, hash: `blender/blender@38d4483c6a` Deleting annotation will break Gstretch permanently **Exact steps for others to reproduce the error** First variant: 1. Draw annotation line. 2. Delete annotation layer via View toolshelf 3. Try to use Gstretch. It will fail and warn that «Note» layer not found Second variant: 1. Draw annotation line along selected edges, 2. Push Gstrech 3. Now in Adjustment menu push «Delete GP strokes», Gstretch will be cancelled and button not work until new line will be created General problem: I have no choice to use Gstrech with or without annotation. Once annotation line is created, Gstrech will work with it. I should delete all annotation data and purge em before Gstretch will start to work without annotation guide and with warning «Annotation not found» If I will create empty annotation layer, Gstrech will stop work again. [Gstrech bug.blend](https://archive.blender.org/developer/F7623275/Gstrech_bug.blend) So I prefer do not have ability to use guides than have this bug. ``` Traceback (most recent call last): File "F:\Progs\Graphics\3d\blender 2.80\2.80\scripts\addons\mesh_looptools.py", line 3984, in invoke return self.execute(context) File "F:\Progs\Graphics\3d\blender 2.80\2.80\scripts\addons\mesh_looptools.py", line 4000, in execute strokes = gstretch_get_strokes(self, context) File "F:\Progs\Graphics\3d\blender 2.80\2.80\scripts\addons\mesh_looptools.py", line 2843, in gstretch_get_strokes layer = bpy.data.grease_pencils["Annotations"].layers["Note"] KeyError: 'bpy_prop_collection[key]: key "Note" not found' location: <unknown location>:-1 ``` And button «Remove all annotation strokes» can ruin a lot of work. It trying to delete default layer with name «Note» If I rename it, it causes error. ``` Traceback (most recent call last): File "F:\Progs\Graphics\3d\blender 2.80\2.80\scripts\addons\mesh_looptools.py", line 3828, in execute bpy.data.grease_pencils["Annotations"].layers["Note"].clear() KeyError: 'bpy_prop_collection[key]: key "Note" not found' location: <unknown location>:-1 ```

Added subscriber: @Vyach

Added subscriber: @Vyach
Vladimir Spivak self-assigned this 2019-07-22 19:07:19 +02:00
Member

Added subscriber: @BrendonMurphy

Added subscriber: @BrendonMurphy
Member

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Member

hi, this should be fixed now. be6738522d let us know if there's any more issues.

hi, this should be fixed now. be6738522d23 let us know if there's any more issues.

@BrendonMurphy
I checked it again. Still have problem.
Now it work with active annotation layer
No error, but Gstretch stop to work after cancelling/deleting annotation stroke at all until I delete data.
There should be manual checkbox to allow me to select if i want use stroke or not.
If there is no stroke in active annotation layer, Gstrech should ignore this setting. If there is stroke but switch is off, It should ignore stroke too.

2019-07-24_13-03-35.mp4

In most cases I use it for straight lines.

@BrendonMurphy I checked it again. Still have problem. Now it work with active annotation layer No error, but Gstretch stop to work after cancelling/deleting annotation stroke at all until I delete data. There should be manual checkbox to allow me to select if i want use stroke or not. If there is no stroke in active annotation layer, Gstrech should ignore this setting. If there is stroke but switch is off, It should ignore stroke too. [2019-07-24_13-03-35.mp4](https://archive.blender.org/developer/F7626491/2019-07-24_13-03-35.mp4) In most cases I use it for straight lines.

Changed status from 'Resolved' to: 'Open'

Changed status from 'Resolved' to: 'Open'
Corrected. Test it. https://developer.blender.org/rBA705801c799b0a1ab20249163633c2a2707e08fe1

@cwolf3d
Tested. Thanks for adding checkbox.

After deleting annotation layer via View toolshelf, Gstrech continue to use disconnected (unlinked) stroke data.
I think, it should check connection to current scene.

May be it should ignore invisible stroke because it is very strange to ask software to «snap to something invisible somwhere in the scene».
On the other hand may be not: it is not possible to make annotation semitransparent. What do you think?
What do you think about it?

If user want to see edges more clear, he can adjust opacity of

2019-07-25_13-42-53.mp4

@cwolf3d Tested. Thanks for adding checkbox. After deleting annotation layer via View toolshelf, Gstrech continue to use disconnected (unlinked) stroke data. I think, it should check connection to current scene. May be it should ignore invisible stroke because it is very strange to ask software to «snap to something invisible somwhere in the scene». On the other hand may be not: it is not possible to make annotation semitransparent. What do you think? What do you think about it? If user want to see edges more clear, he can adjust opacity of [2019-07-25_13-42-53.mp4](https://archive.blender.org/developer/F7628076/2019-07-25_13-42-53.mp4)

Also I found that GPencil object or data have influence too, but
function ignores GPencil-object transforms as you can see:

2019-07-25_13-57-39.mp4

Also I found that GPencil object or data have influence too, but function ignores GPencil-object transforms as you can see: [2019-07-25_13-57-39.mp4](https://archive.blender.org/developer/F7628087/2019-07-25_13-57-39.mp4)

@cwolf3d any news?

@cwolf3d any news?
Slightly fixed it. https://developer.blender.org/rBA8ca469749f4d007f696bae3e6d529c25a77f52e3

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#67465
No description provided.