More Snapping and Double Removal Options with Python

Yet another python add-on for today!  I hope this is one that will be useful to a great many of you, even though its pretty hard to explain how it works… bear with me as I expect it will speed up your modelling work flow. I’ve long been frustrated by the limitations of ‘Remove Doubles’ […]

Yet another python add-on for today!  I hope this is one that will be useful to a great many of you, even though its pretty hard to explain how it works… bear with me as I expect it will speed up your modelling work flow.

I’ve long been frustrated by the limitations of ‘Remove Doubles’ in blender.  Remove doubles searches for verts which are close together (in all axes) and merges them, which is great.  However sometimes its nice to be able to constrain this action to a single (or pair of) axes.  For instance if I have a row of vertices running along the X axis and I want all of them to have the same Y and Z coordinates I could select the entire row then press “s” (to scale), “shift-x” (to constrain to Y and Z), then “0” (to snap all of them together) .  This is fine if you only have one row of vertices.  Say now that you have 100 such rows of vertices, all running roughly in the X axis direction, and you want each row to run exactly in the x-axis, so for every single one of those 100 rows you have to select each row, and press “s, shift-x, 0, enter”.  Does it get a bit boring?  Would you prefer if it was automated?

Have a look at the quick tutorial image below to see what I mean, and then if you want, download the add-on and install it.  As always let me know if you find any bugs in the comments below and I’ll try to fix them ASAP.  Happy (faster) blending!

DOWNLOAD: https://urchn.org/wp/wp-content/uploads/2010/08/snap_with_axis_constraints.zip

Tutorial:

how to use the axis constrainable snap & remove doubles tools

On another note we’ve been out to the pictures a few times recently.  We saw a double feature of “I am Love” and “Winter’s Bone” on Sunday.  Personally I thought that the cinematography in Winter’s Bone was a refreshing break from the all-to-common extreme-DOF-fatigue that we got to see in the europudding (see Truffaut) of a movie that was “I am Love”, a film laced with religious salvation metaphor and comic (decency induced) visual-analogy-as-substitute-for-the-explicit.  Conversely the portrayal of value-less material items as symbolic of ‘our’ personal hollow ambitions for wealth (in the form of tacky debris spread around the dwelling; toy horses, kitsch garden ornaments displaying cherubic qualities), set against the wholesome immaterial but valuable actions of the film’s main character provided an interesting subtext for what would otherwise have been a straightforward plot.  Sadly some of our friends didn’t see it the same way and criticized the ‘off’ direction and cinematography.  One way to look at it is that they were only judging according to their own personal objective perceptions of how films ‘should’ be directed and shot, rather than to how an audience subjectively perceives a film.  Fire off in the comments; lets hear your own views!

Edge Tools Expanded

Just a quick one to say that I’ve expanded the functionality of the bevel_weights add-on to now include the following functions: Ctrl+E Set Edge Bevel Weights (for use with bevel weight modifier) Ctrl+E Average Selected Bevel Weights Select Menu > Select Same Bevel Weights (adds to the selection any edges which have an equal bevel […]

Just a quick one to say that I’ve expanded the functionality of the bevel_weights add-on to now include the following functions:

  • Ctrl+E Set Edge Bevel Weights (for use with bevel weight modifier)
  • Ctrl+E Average Selected Bevel Weights
  • Select Menu > Select Same Bevel Weights (adds to the selection any edges which have an equal bevel weight to the active edge)
  • Select Menu > Select Same Creases (ditto but for edge crease values for use with subsurfs)
  • Select Menu > Select All Creased Edges
  • Select Menu > Select All Beveled Edges
  • Select Menu > Select All Marked-Sharp Edges (as opposed to the built in select sharp which works on edge angles)
  • W-key > Bevel – bringing the functionality of the old 2.49 style ‘destructive’ beveling is back.
  • Ctrl+V Smooth Vertex Group Weights (instead of the blur brush use to create nice gradations in VG weighting)

The add-on is now called edge_tools and is available here:

http://www.pasteall.org/19308/python

UPDATE: should work with r34878 onwards

I had a terrible time trying to make sure that the ‘destructive’ style beveling didn’t affect any other edges’ bevel weights.  Basically it works by setting bevel weights for any selected edges then it adds a bevel modifier and applies it.  Of course the user only wants the selected edges to be ‘destructively’ beveled, and not any edges which already have bevel weights so the script needs to preserve the pre-existing bevel weights.  I tried various methods: first I created a custom “FloatProperty” for each edge to store the existing bevel weight in (these seemed to survive the modifier but got their values deleted).   Then I tried creating edge custom properties whose names included the bevel weight’s numerical value which I could get as a string by parsing the properties with dir() (I then discovered that properties from one edge got propagated to all edges by the modifier stack).  Then I noticed that edge crease values seemed to be stored to floating point accuracy.  I thought that by shuffling bits around I would be able to store two numeric values (the edge crease and the bevel weight) in the edge crease’s value temporarily, which would have worked fine, except for the fact that by a quirk of the python API the edge creases get rounded up to 2 decimal places when setting them.  Finally with all other plans foiled I wrote a function to generate identifier strings based on edges’ vertex locations which I could then store as dictionary keys with the old bevel weights as the values!  So you can see how several hours of experimentation and head-scratching later I finally managed to implement a very simple feature… hope you find it useful! Josh

A Quick Python Time-saver

Just a very quick post to share some speed-ups we’re using in the studio.  Some of you may have noticed that blender 2.5’s UI is missing its bevel weight options from 2.49.  Luckily all the bevel weights are editable in python.  We’ve coded this quick add-on to bring back the missing functionality (which you can […]

Just a very quick post to share some speed-ups we’re using in the studio.  Some of you may have noticed that blender 2.5’s UI is missing its bevel weight options from 2.49.  Luckily all the bevel weights are editable in python.  We’ve coded this quick add-on to bring back the missing functionality (which you can install from the user preferences add-on tab [remember to enable it] or run from a blender text window).

EDIT: Updated yet again for 2.55 (thanks for the comments below – sorry for sluggishness on my part!)

http://www.pasteall.org/17726/python

After you’ve installed the add-on tab into edit mode and hit spacebar and type ‘Bevel’ and you’ll see the three functions.  Remember to add a bevel modifier and set it to ‘weights’ mode.

We’ve also been using Richard Olsson’s Batch Renamer to help keep scenes organised.  If you add a custom keybinding to it then there’s no more copying and pasting into the buttons window.

That’s all for now,  I’ll blog again soon with some of the models I’ve been working on!

Josh

Edit: Nathan Letwory (AKA Jesterking) made a nice tutorial video about this on youtube:

Across the Pond

Hello Everyone, I’m Josh, one of new crew members for tube.  I travelled over to the US from England last week, and I’m here until mid September undertaking cultural studies, and working on the models for the film.  While I attempt to mediate transatlantic differences (such as introducing the rest of the team to Branston […]

Hello Everyone,

I’m Josh, one of new crew members for tube.  I travelled over to the US from England last week, and I’m here until mid September undertaking cultural studies, and working on the models for the film.  While I attempt to mediate transatlantic differences (such as introducing the rest of the team to Branston Pickle and Marmite, explaining the etymology of ‘bangers and mash’, and justifying why I need a knitted cosy for my teapot), my hosts are offering an American exchange programme complete with drive-in movies, fried dough, Independence Day Celebrations and Root Beer.  In my time away from the screen I’ve been out enjoying the fresh air, beautiful countryside and very un-British weather.  I’ve been running to and from work each day (8 ½ miles each way), and when I had a few hours to spare last weekend I biked up to the Sugarloaf Mountain.

Fresh out of finishing a long and traumatic Architecture degree at Cambridge University, I vowed never to work in the industry again.  My first task in the studio, however, was to design the station roof and columns, and to provide general advice to the rest of the team on all things architectural!  Being British, and naturally strongly resistant to change, I was slightly thrown when I realised the team was working with up to the minute svn builds of Blender.  Back home in my own work I’d been hanging on to the 2.49 vintage with its historical interface not unlike the quirky 400 year old tumbledown cottage I lived in at uni.  2.5 comes with its own breed of glossy newness, an impersonal homogeneity with other 3D apps akin to the monotony of the skyscrapers in downtown LA and a feature set which sprawls on and on like the city-edge of Phoenix, Arizona.

Bewildered at first, I was tempted away from the path of the righteous by the glowing red devil’s tail of Maya on one side and the swirling captivating vortex of 3DS on the other, but eventually I found my way through the valley of darkness.  I still miss many of the 2.49 features which haven’t yet been ported – skinning loops and multi-knife-cuts to name a few, and in my first few days I’ve spent a considerable amount of time filing bug reports, hopefully for the greater good.

There are still some very simple features I wish had been integrated into the new release.  As what Pirsig might call a ‘mechanic of the photographic mind school’, all of my previous organisation and labelling systems have been tainted with a certain amount of… dyslexic logic.  To make life easier for everyone else on the project I have to name every object, bone, group and file according to a strictly prescribed style, not least so our python automation knows what’s going on!  While I don’t mind accumulating road miles on my way to and from Amherst every day, I hate the unnecessary mouse miles blender’s UI demands.  I’ve illustrated one of the key issues (which could be solved by a simple hotkey and under-mouse-dialog) using an analogy that will be familiar even to non-blender users.

After breaking free from summers spent as a CAD-monkey in local architecture firms, I now find myself pining for the logical and consistent snapping and tracking systems I was so familiar with from hours spent in front of Rhino, Vectorworks, AutoCAD and the like.  At least the resulting ‘errors’ present in my incapable use of Blender’s snaps often results in a more derelict and aged look!  Here’s a work-in-progress snapshot of the interior of the train which I’ve been working on today, by virtually bashing it up:

That’s all for now,

Josh

A happy post

Hi everyone, I am Becky!!!!!    I am a Hampshire College student and I come from Guangzhou, China. My first summer in the States is actually pretty cool! We work hard during the day, but also hang out after work: movies, “swimming”, parties, and frozen yogurt of course.  😀 Since the beginning of summer, I’ve […]

Hi everyone,

I am Becky!!!!!    I am a Hampshire College student and I come from Guangzhou, China. My first summer in the States is actually pretty cool! We work hard during the day, but also hang out after work: movies, “swimming”, parties, and frozen yogurt of course.  😀

Since the beginning of summer, I’ve been working on some concept art and animatics . It is exciting to experience how initial ideas develop to fruition, which includes lots of contribution from different intellectuals. For quite a while, we have been tweaking our main character Gilgamesh’ s model sheet, to make it awesome for 3D modeling. I also have been working on Gilgamesh’s clothing design with Fateh and Redo(from Argentina)!   So finally, here we go! Check out our Gilgamesh. 😛

And, here are some of the animatics that I have been working on lately.

And Soon we will be moving on to creating the animatics for time lapse sequences and other concepts. Yay!

So hot today,I almost melted.   o_O||

So, stay cool, guys!!    😛

Bye !!!!

©URCHIN 2015