This is a very interesting thing and inspires me to new work, since it is a little bit different from Gstretch.
Thank you so much for your effort and work!
But at first time using it I was despaired, since ran into the following issue.
I was testing your Addon on 2 different Windows machines with “fresh” Blender profiles (default settings) and when I selected a loop of verts, draw with the Grease Pencil and hit the Button (“Align verts to Gpencil Stroke”), then I get the following error:
Traceback (most recent call last):
File “C:\Users%username%\AppData\Roaming\Blender Foundation\Blender\2.70\scripts\addons\mesh_align_to_gpencil_view.py”, line 62, in execute
verts_world_2d = [location_to_region(obj.matrix_world * v.co) for v in verts_local_3d]
File “C:\Users%username%\AppData\Roaming\Blender Foundation\Blender\2.70\scripts\addons\mesh_align_to_gpencil_view.py”, line 62, in <listcomp>
verts_world_2d = [location_to_region(obj.matrix_world * v.co) for v in verts_local_3d]
File “C:\Users%username%\AppData\Roaming\Blender Foundation\Blender\2.70\scripts\addons\mesh_align_to_gpencil_view.py”, line 220, in location_to_region
return bpy_extras.view3d_utils.location_3d_to_region_2d(bpy.context.region, bpy.context.space_data.region_3d, worldcoords)
AttributeError: ‘module’ object has no attribute ‘view3d_utils’
location: <unknown location>:-1
With Blender 2.70, official release.
Now I wanted to know, if something is wrong with my Blender and I enabled (temporarily) Looptools where Gstrech worked fine and well I just played around and pressed “your” Button again…
The thing is, now it worked!
When I enable Looptools (temporarily), your Addon will work as it should, until I close Blender and start it again without LoopTools turned on (then the same error comes up).
I discovered this, since I usually test new Addons before I add them to my “workspace Blender” and since I wanted to make sure and compare between them.
It seems, it is possible to reproduce this error by using a new (fresh) Blender “profile” (default settings, LoopTools not enabled), put your script in the addons-directory and enable it, select a vert loop and make a Grease Pencil stroke and hit “your” Button.
Then you will get the posted error message.
When you have Looptools enabled all the time it will work fine.
Anyways I love the Addon and hope, you will continue the work also with all the TO-DOs in your schedule!
Greetings
EDIT:
oh, i see schoggi was faster - well, maybe this clarifies things