Page MenuHome

looptools gstretch/gpencil bug
Closed, ResolvedPublic


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

Blender Version


(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



Event Timeline

Stephen Swaney (stiv) triaged this task as Needs Information from User priority.

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?

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

compressed in zip{F6954776}

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 Needs Information from User to Needs Triage by Developer.

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\", line 3986, in invoke
    return self.execute(context)
  File "D:\blender-2.80\2.80\scripts\addons\", line 4016, in execute
    if get_grease_pencil(object, context):
  File "D:\blender-2.80\2.80\scripts\addons\", line 64, in get_grease_pencil
    gp = object.grease_pencil
AttributeError: 'Object' object has no attribute 'grease_pencil'

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) triaged this task as Confirmed, Medium priority.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

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

hi, I've been looking here:

64		-     gp = object.grease_pencil
	64	+     gp =
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 =
	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?

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.
@Spivak Vladimir (cwolf3d) and @Antonio Vazquez (antoniov) are helping with the issue.

LoopTools: Gstretch fix. Grease pencil must have name 'GPencil'. Script take only the first strokes.

closing as resolved