Viewer-Node Control Script

by - 2012/10/09 27 Comments Production

Here’s a short demo of one of the scripts that you can find on the DVD in the Mango SVN scripts folder. It’s called space_node_viewer_bookmark.py.


It’s a small utility to make navigating huge node-trees a bit easier, and we had a lot of those.
All the time while I was working with these huge node setups I thought that I would love to be able to define certain checkpoints in the node-tree to be able to quickly connect the viewer node to them to check out the result without having to zoom and scroll like crazy. Also jumping to the last node or comparing the result before and after some nodes was something that I always wanted to have.

But I always thought it would be super hard and complicated to do, involving some advanced C coding etc. But one day I asked Campbell what he thought about that and he said “No, that wouldn’t be hard at all! In fact, it’s probably just a few lines of python”.
Well, that was quite some motivation for me to seriously try to learn python.

So Campbell gave me a few hints and showed me how to approach the problem. It took me quite a few days and a lot more hints from the awesome and always helpful Campbell, but eventually I had it working. Yay!

So what it does is to define a list of bookmarks (or slots/tags whatever you want to call it), that get assigned with a hotkey (e.g. Shift+O) as a property to a node. You can then “call” that bookmark with a second hotkey (e.g. “O”) and that will connect the viewer node and center the view there. I made 3 different keys, U, I and O for 3 different “checkpoint nodes”. They also have different colors so that you can tell them apart. The colors are also used to re-assign the tags on load, because the “tag-property” does not get saved. So Blender uses the colors to determine and re-assign the tags to the node, so that when you open up a blendfile that had these tags they will still work.
You can also clear the bookmarks with alt+b.

 

There are 4 more hotkeys, 2 quite useful, 2 maybe not so much. With the keys J and K you can go to the leftest or lowest node in the tree. Might be helpful to quickly center the view to different areas. The other 2 keys are L and P. These do not center the view to that node, only connect the viewer node to the last node before viewer and composite (L-Key) or the previous node (P-Key), and I found that quite handy.
It’s one of my first own scripts that I wrote, so it’s probably not perfect. So if you know python and want to change all this, just do it!
But that’s the cool thing, because Blender is open source you can really hack in your own stuff into Blender. That’s so awesome, and a great motiviation for me to try to learn more python.

And for those of you who are (like me)  intimidated of python or code: Personally, I am really an idiot when it comes to math and code etc, so if I can manage to write at least do a few lines of code, then you can do too!

:)

And most importantly, if anyone of you who are better in code than me thinks he can do this better or improve the script, by all means, go ahead! I think there is a lot more stuff that can be improved!

There are many more scripts and addons like this on the Tears of Steel DVD that you can check out and use.
So! –> http://www.blender3d.org/e-shop/product_info_n.php?products_id=143

 

  1. Greg Zaal says:

    I wonder what quick_sanity.py does :D

  2. As a 30+ years SW developer I have to say: writing coding is not hard.

    What is always the hard part is to get the knowledge/documentation against what you have to code.

    And that is always the time consuming part :)

  3. FZ says:

    Hey when will the soundtrack been released?
    Really waiting to hear the hole tracks :D

    Thanks!

  4. n-pigeon says:

    Why those addons are not in official release of Blender?

    • LswaN says:

      Could be a few reasons, first off the addons have only been used for this one project and may have unknown bugs, also some of them may just be quick-fix scripts that wouldn’t be useful for most people. They might also be planned as full features coded into Blender, to be released later. Or maybe they will be added into official Blender releases after people have had time to test the scripts out.
      Just my thoughts, I could be completely wrong about this too.

  5. blendercomp says:

    Wicked cool! :)

  6. LswaN says:

    “Just a few lines of python,” huh? Looks like over four hundred lines to me :)
    Obviously there was quite a bit of thought and work put into this, looking forward to trying it when the DVD ships!

  7. Rob Fisher says:

    It looks the problem (that this script goes some way to solving) is that you have a large number of GUI elements spread over an area much wider than will fit on the screen. I’m wondering if it might be more productive to work with a textual representation of the same information, in some sort of declarative language. This is how programmers work most of the time and text editors have evolved to make navigating large amounts of code very efficient. Is there an underlying textual representation of the nodes in Blender that is human readable? Do people edit it directly?

    On the other hand I can see the benefit of being able to visualise curves and see colours and connections. Maybe some kind of text/GUI hybrid could be developed.

  8. 3pointedit says:

    Yeah, just a few lines. A few HUNDRED. Great work though, terrific to see an artist be able to implement the tool they require.

  9. Carsten says:

    Nobody typed it in so far from the video? ;-)

    Great work guys!

  10. NFP Digital says:

    you have some interesting names for scripts

  11. jan the freeze says:

    When will you send out the DVD’s?

  12. xongerzr says:

    Hello! Fashion,novel style,low price and good quality,the good shopping places,
    free shipping and quantity discount,
    Air/ jordan /shoes(1-24) $33,
    Air/ max /shoes $35,
    Air/Force/one $35,
    handbags $36,
    Jeans $36,
    T-Shirt $20,
    sunglasses $16,
    (NFL MLB NBA NHL) jerseys $25,
    Accept credit card and cash payments
    ====== w/ww.gocntrade.c/om ======

  13. monwatches says:

    This guy does not have earned to be allowed in this country allow on your own be making thousands and thousands from men and women which have no clue what he is about and what he has already done to defame the Usa as well as the persons that reside right here. He ought to be banned from the United states….but no, he arrives right here and will get wealthy simply because persons are not wise adequate to investigation the bastard before idolizing him. Get up The united states, learn who the poor men are.

  14. Tae says:

    When will you avoid the spam comments? Apart from the 15 other Python scripts . . . there is a smart quotes filter.

  15. It’s great that you are getting thoughts from this paragraph as well as from our
    discussion made at this place.

  16. Laurel says:

    In this article, will tell you about the myths in making brochures and the truth behind them.
    Mobile spy software plan continues to bee around for many years nonetheless not all mobile phones have this attribute.

    At $249, the Barnes & Noble Nook Color is one of the lowest-priced and most
    powerful budget tablet that you’ll find.

  17. I am really loving the theme/design of your blog. Do you ever
    run into any web browser compatibility issues? A number of my blog readers have
    complained about my site not operating correctly in Explorer but looks great in Opera.

    Do you have any ideas to help fix this problem?

  18. For your Rome Vacation Package, they will be proving you with proper accommodation if you are staying overnight.

    The German soprano’s recent engagements include the title role of Jen. GÖTTERDÄMMERUNG by
    Richard Wagner NEW PRODUCTION PREMIERE.

    my blog divosta homes verona walk naples fl

  19. Named as ‘One of America’s 10 Greatest Pizzas’ by American Heritage Magazine, and ‘Best Pizza
    in Midtown’ by Midtown Lunch, Naples 45 satisfies with their simple and unpretentious Neapolitan flavors.
    The symptoms of the common cold are familiar to everyone and include: – nasal
    congestion, sneezing, coughing, runny nose, watery eyes, a stuffy head, headache, minor
    muscle aches and pains, tiredness and a sore throat.

    He liked it but would prefer good ole’ American-made beer.

    Review my web page: steak restaurants naples fl

  20. What’s up to every , since I am really eager of reading
    this weblog’s post to be updated daily. It contains fastidious stuff.

  21. Pretty section of content. I just stumbled upon your web site and in accession capital to assert
    that I acquire in fact enjoyed account your blog posts.
    Anyway I will be subscribing to your augment and even I achievement
    you access consistently fast.

  22. Magnificent site. Plenty of useful info here. I am sending it to a few friends
    ans also sharing in delicious. And of course, thank you to your effort!

  23. air max 90 says:

    ike went on a plunge in Chinese, 2013 fiscal year, Nike Greater China and tiawan revenue fell 5%, and only declined in Greater China, The usa and other regions are growing. In fact, since the 2008 Beijing Olympics, Nike has been doing a series of trouble.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>