Maniphest T63682

looptools gstretch/gpencil bug
Closed, Resolved

Assigned To
Brendon Murphy (meta-androcto)
Authored By
Ariel Gimenez (Kone9)
Apr 17 2019, 3:30 PM
Tags
  • Add-ons (Community)
Subscribers
Antonio Vazquez (antoniov)
Ariel Gimenez (Kone9)
Brendon Murphy (meta-androcto)
George Vogiatzis (Gvgeo)
ma kadir (mak485)
Philipp Oeser (lichtwerk)
Stephen Swaney (stiv)
1 More Subscribers

Description

System Information
Operating system: windows 7 64 bits
Graphics card: gforce 9800gt

Blender Version

Broken:

(example: 2.80, edbf15d3c044, blender2.8, 2018-11-28, as found on the splash screen)
It does not work well and if you press Gstrech it shows a bug

Worked: (optional)

Short description of error

Exact steps for others to reproduce the error
just press GStrech and they will see the error

Related Objects

Mentioned In
T63811: Looptool Gstretch not working
Mentioned Here
rBA934b32af8ef7: loop tools: hacky attempt at fixing gstretch

Event Timeline

Ariel Gimenez (Kone9) created this task.Apr 17 2019, 3:30 PM
Stephen Swaney (stiv) lowered the priority of this task from 90 to 30.Apr 17 2019, 4:21 PM
Stephen Swaney (stiv) added a subscriber: Stephen Swaney (stiv).

From the barely legible error, it looks like there is no Grease Pencil stroke associated with this object.

Got a .blend for us that shows the problem?

Ariel Gimenez (Kone9) added a comment.Apr 17 2019, 7:30 PM

yes, try this .blend although the problem also appears with a new .blend file
I use google translate{F6954713}

Ariel Gimenez (Kone9) added a comment.Apr 17 2019, 7:42 PM

.blend
compressed in zip{F6954776}

Ariel Gimenez (Kone9) added a comment.Apr 17 2019, 7:44 PM

Also if you open a new file and press gstrech you will see what the bug does.
The tool is malfunctioning in general.
google translate

George Vogiatzis (Gvgeo) raised the priority of this task from 30 to 90.Apr 20 2019, 5:24 PM
George Vogiatzis (Gvgeo) added a subscriber: George Vogiatzis (Gvgeo).

From what I can tell, grease_pencil was in object or scene in 2.79.
The addon used the objects grease_pencil to stretch the vertices.
Now grease_pencil is a separate object.
The error is exactly that, object has no grease_pencil anymore.
Not sure how the annotation work. Must be in scene?

The addon needs to be updated for 2.80.
The default cube is enough for the error.

Traceback (most recent call last):
  File "D:\blender-2.80\2.80\scripts\addons\mesh_looptools.py", line 3986, in invoke
    return self.execute(context)
  File "D:\blender-2.80\2.80\scripts\addons\mesh_looptools.py", line 4016, in execute
    if get_grease_pencil(object, context):
  File "D:\blender-2.80\2.80\scripts\addons\mesh_looptools.py", line 64, in get_grease_pencil
    gp = object.grease_pencil
AttributeError: 'Object' object has no attribute 'grease_pencil'
Ariel Gimenez (Kone9) added a comment.Apr 20 2019, 5:33 PM

I really do not know what is wrong, but thanks for the explanation .. And yes, with a cube you can see the error

Philipp Oeser (lichtwerk) renamed this task from looptools BUG! to looptools gstretch bug.Apr 23 2019, 9:33 AM
Philipp Oeser (lichtwerk) mentioned this in T63811: Looptool Gstretch not working.
Philipp Oeser (lichtwerk) merged a task: T63811: Looptool Gstretch not working.
Philipp Oeser (lichtwerk) added subscribers: ma kadir (mak485), Philipp Oeser (lichtwerk).
Philipp Oeser (lichtwerk) lowered the priority of this task from 90 to 50.Apr 23 2019, 9:44 AM

Will confirm for now, not sure yet how to convert this feature to 2.8, needs some thinking [since gpencil is indeed a separate object in 2.8]

Philipp Oeser (lichtwerk) renamed this task from looptools gstretch bug to looptools gstretch/gpencil bug.Apr 23 2019, 9:45 AM
ma kadir (mak485) added a comment.Apr 23 2019, 11:08 AM

in general, it was working with 2.80.54 (abt 6th april build), some thing changed by this time.

Brendon Murphy (meta-androcto) added a subscriber: Brendon Murphy (meta-androcto).Apr 23 2019, 12:08 PM

hi, I've been looking here: https://docs.blender.org/api/blender2.8/bpy.ops.gpencil.html

64		-     gp = object.grease_pencil
	64	+     gp = bpy.data.grease_pencils
65	65	      if not gp:
66		-         gp = context.scene.grease_pencil
	66	+         gp = context.view_layers.grease_pencils
67	67	      return gp

This led to an error here:

2844		-     layer = gp.layers.active
	2844	+     layer = context.active_gpencil_layer

which led to errors in:

2845	2846	      if not layer:

this was to do with

frame = layer.active_frame

@Philipp Oeser (lichtwerk) I'm just guessing and stuck on frame atm. maybe on the right track?

Yuriy Sivalniev (yursiv) added a subscriber: Yuriy Sivalniev (yursiv).May 2 2019, 12:06 PM
This comment was removed by Yuriy Sivalniev (yursiv).
Brendon Murphy (meta-androcto) added subscribers: Antonio Vazquez (antoniov), Vladimir Spivak (cwolf3d).May 3 2019, 9:40 AM

Committed 934b32af8ef7 although it only part fixes the issue.
Using the default cube I needed to subdivide an edge at least once for it to run in Spread modes.
Project function not working.
@Vladimir Spivak (cwolf3d) and @Antonio Vazquez (antoniov) are helping with the issue.

Vladimir Spivak (cwolf3d) added a comment.May 4 2019, 4:58 PM

LoopTools: Gstretch fix. Grease pencil must have name 'GPencil'. Script take only the first strokes.
https://developer.blender.org/rBAb23f15603088f2e382ce9a53093b58debc3d70e6

Brendon Murphy (meta-androcto) changed the task status from Unknown Status to Resolved.Jun 9 2019, 2:04 AM
Brendon Murphy (meta-androcto) claimed this task.

closing as resolved