Page 1 of 4 123 ... LastLast
Results 1 to 20 of 68
  1. #1
    Member VolantKnave's Avatar
    Join Date
    Feb 2006
    Location
    Norway
    Posts
    113

    [Addon] Align Selection to Grease Pencil

    Note: Assigns the hotkey Shift + Left Mouse (double-click)
    Note: The proportional edit mode breaks when used with a big radius.
    DOWNLOAD V1.0.8 HERE (2.73 and above)


    What does it do?

    This script will allow you to align the selection to the current grease pencil stroke.
    (Works with vertices, objects, paths, bezier curves (except Aligned and Free type curves), edit mode bones.)

    All of this happens in screen space (2D), which means works just like moving vertices around using the "G" hotkey.

    I can only guarantee that it works in 2.73 and above.

    If you have suggestions, find a bug or otherwise have trouble using it, let me know and I will do my best to accommodate!


    Here's a little video of it in action:


    Note: In the video it looks pretty automatic, but you have to press a button or hotkey to actually align the vertices after painting a stroke.

    CHANGELOG:
    1.0.8: Removed buggy pose mode support. Fixed support for "Scene" type grease pencil strokes. Some optimizations.
    1.0.7: Added hotkey, fixed bugs in poll function
    1.0.6: Basic support for UVs
    1.0.5: Better proportional editing (but still buggy), pose bones, curves
    1.0.2: Code cleanup, basic support for bones, objects and proportional editing
    1.0.1: Fixed error caused by not importing view3d_utils
    1.0.0: Addon released. Can align vertices to gpencil stroke.

    TODO:
    • None (feel free to suggest!)
    Last edited by VolantKnave; 22-Dec-15 at 17:16. Reason: Updated to version 1.0.8



  2. #2
    Nice work! Very easy and fast. Thnx!
    Is it possible for armature (bones) too? Disney has similar tool for animation...



  3. #3
    Member VolantKnave's Avatar
    Join Date
    Feb 2006
    Location
    Norway
    Posts
    113
    Thanks!

    Adding support for bones should be pretty simple, at least for bone edit mode. Would be interesting to try and implement it for pose mode as well. I'm guessing that's what you would rather have?

    I'll write it down and see what I can do



  4. #4



  5. #5
    Yes, try it for pose mode, please ( animation mode). It will be great. Thank you for your interest.



  6. #6
    Is this different than LoopTools Gstretch, method Project ?



  7. #7
    Hi, wanted to share my suggestion for shortcut: "D - on release", then it applies as soon as you stop drawing. Downside is, grease pencil isnt usable otherwise in edit mode anymore.



  8. #8
    Member VolantKnave's Avatar
    Join Date
    Feb 2006
    Location
    Norway
    Posts
    113
    From what I can see, Gstretch places the vertices along the entire gpencil stroke, in world space. This little script pushes vertices only horizontally or vertically until it aligns with the gpencil stroke in screen space, regardless of where the stroke actually is placed in the world. This makes my script a bit easier to use for quick adjustments. Gstretch is very useful for other tasks, though.



  9. #9
    Yes, they have little differencies, not much.
    Your script = light blue vertices
    Gstretch = orange
    Grease pencil = green
    Attached Images Attached Images



  10. #10
    Member VolantKnave's Avatar
    Join Date
    Feb 2006
    Location
    Norway
    Posts
    113
    That's pretty interesting.

    What settings/mode of the Gstretch tool is that? I could not get it to work quite like that.

    EDIT: Ok, scratch that. I got it to work like that now. Am I correct that the vertex normals have to actually "hit" the gpencil stroke in order for the Project mode to work?
    Last edited by VolantKnave; 01-Apr-14 at 02:57.



  11. #11
    Gstretch has 3 methods: Spread evenly, Spread and Project.
    Attached Images Attached Images
    Last edited by JuhaW; 01-Apr-14 at 03:01.



  12. #12
    I dont know about that, but vertex normals are part of the algorithm, because sometimes edges overlaps each other.



  13. #13
    Member VolantKnave's Avatar
    Join Date
    Feb 2006
    Location
    Norway
    Posts
    113
    I had some trouble with Project mode where it doesn't do anything, or it only moves a single vertex. I'm assuming that has to do with the vertex normals and how they are used. It did work when the stroke was on the same plane as the vertices I used it on, and the vertex normals pointed directly at it (They were on the edge of a plane).

    Anyway, it's good to investigate this, as I did have a couple of moments when I wrote it where I wondered if I was just duplicating functionality. At least to me, my own script fills a niche that isn't covered by Gstretch. Then I guess it's up to everyone if they want to install an extra addon for a little thing like this.



  14. #14
    Member VolantKnave's Avatar
    Join Date
    Feb 2006
    Location
    Norway
    Posts
    113
    Originally Posted by riidom View Post
    Hi, wanted to share my suggestion for shortcut: "D - on release", then it applies as soon as you stop drawing. Downside is, grease pencil isnt usable otherwise in edit mode anymore.
    That's a great hotkey suggestion. I hadn't thought of that one. The downside can be severe, though, as you mention.

    Double-click D could also work well.



  15. #15
    Originally Posted by riidom View Post
    Hi, wanted to share my suggestion for shortcut: "D - on release", then it applies as soon as you stop drawing. Downside is, grease pencil isnt usable otherwise in edit mode anymore.
    Select none(unselect all) and Grease pencil is fine



  16. #16
    Yes, you are right. I actually tried that, but I was concerned by the fact that the stroke disappears after drawing. Now I just remembered, there is an option where I told the addon to act just like that! Was a bit confused I guess



  17. #17
    Member aermartin's Avatar
    Join Date
    Nov 2008
    Location
    stockholm , sweden
    Posts
    3,138
    amazing just looked for something like this, 2 days ago. Will be awesome for doing shape keys facial animations. So much faster to place vertices after a grease stroke.



  18. #18
    @VolantKnave maybe add Proportional Editing to options?



  19. #19
    Member VolantKnave's Avatar
    Join Date
    Feb 2006
    Location
    Norway
    Posts
    113
    Ah, yes, proportional editing could be very nice. I'll look into it



  20. #20
    Hey riidom, what if there was a checkbox for activating such the feature of "D - on release," just as there is one for activating "Sketch session"?



Page 1 of 4 123 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •