Page 2 of 2 FirstFirst 12
Results 16 to 20 of 20

Thread: down & adjust events (metool)

  1. #16
    Thanks for posting, Steve!
    I actually have been using plain C so far so this is a nice piece of code to look at if I wanted to see how to write plugins in C++. I've read about wrappers but never really tried using one.

  2. #17
    Please correct me if I am wrong, guys. The way I understand your posts, given the functions provided by the SDK it is not easy/possible to keep adding NEW handles with left mouse click, while retaining the ability to adjust existing handles also with a left mouse click.

    If I create my own function for that purpose, I must somehow detect proximity of the click to an existing handle location. Simple enough, but how do I take the viewport zoom into account? I could not find anything on that in the docs.

    Do you think that the LW tools such as bezier or spline use custom functions for that purpose? Forgive me my fixation on those tools, but the way they adds new handles with left mouse click is exactly what I want for my.. ehm.. bezier ... tool.

  3. #18
    Also, Steve, the wrapper that you used, is it the same that Mike has come up with or is it your own/modified version? I have downloaded Mike's wrapper some time ago, but never had time to dive too deep into it. I am not all that proficient with this stuff, but I think I'll use the wrapper from now on.

  4. #19
    Super Member
    Join Date
    Jul 2003
    Location
    somewhere
    Posts
    1,129
    I haven't seen Mike's wrapper classes. He was kind enough to share a technique for wrapping static LW callbacks to class functions on the yahoo forum.

    http://tech.groups.yahoo.com/group/l.../message/11466

    Here's a little plugin that shows how you might get things working the way you'd like. The picking code is pretty crude but maybe it will help you get some ideas.


    -Steve

  5. #20
    It might be crude, but it seems to do the job. Now let me digest that code.
    Thank you VERY much for your help and the sample code.

    Art

Page 2 of 2 FirstFirst 12

Bookmarks

Posting Permissions

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