Wednesday, March 20, 2013

Sync That File!

I've been using komodo edit as my primary code editor for a spat of time now and I'm finding it to be a respectable weapon.  I mostly made the switch because I read somewhere that komodo edit supports vi emulation and I missed my vi-fu.

Another handy feature I'm really, really loving lately is the ability to kick off OS commands from within the komodo editor. For example, I'm in the process of porting some cold fusion code to php. My source files are located on a network share. When I test my updates, I copy the files to a virtual machine and then view the results there. It was getting more and more painful to use windows explorer to copy the files over and click through the overwrite 'are you sure' dialog boxes. Even without dialogs, the mere task of leaving the editor and giving focus to one window followed by moving focus to another grows tedious after a few repetitions.

Here's how I improved my workflow using komodo edit. I created a new run task by clicking 'Tools -> Run Command' which opened a dialog box. Then it was a simple matter of filling out the Command text box and adding a key binding by clicking on the 'Key Binding' tab and choosing the desired key combo. Now I sync my files by simply hitting 'ctrl-.' (the binding I chose) within komodo edit. Slick!

Advanced options include scoping commands globally, by project, or individual files. It's also possible to pass selections as input to the command or dump output from the command into your file. Refer to Komodo's help for all the gory details.

I configured the run command to use robocopy to facilitate the actual file transfers since it's very powerful and ships standard with win 7.

In this particular example I used robocopy with the /mir option which keeps folders (and sub-folders) sync'd (mirrored). This includes deleting files in the destination folder if necessary. A word of warning, robocopy doesn't warn or second guess. It just does. I accidentally nuked a couple folders on my file system when I supplied an erroneous destination path the first time around.

Example Command:
robocopy C:\code\P\php\sample \\webserver\d$\phpincludes\apps\sample /mir

Wednesday, March 13, 2013

It's a Sloppy Sloop!

On occasion, whilst dabbling on zee ol' computer I enjoy sinking time into learning blender- an incredibly powerful 3D graphics modelling and animation application.

Did I mention that it's Free? One of the great things about blender, is the fact that it's open source.

The image above is my latest blender creation, a work-in-progress sloop. "You know... for slooping." The sloop design actually comes from a book I've been reading, "Blender 3D Basics" by Gordon C. Fisher (Packt Publishing).

Just like it says on the cover, it's geared to Blender Beginner's and so far I think it's an excellent resource for shiny new blender heads.

I'm most the way through chapter eight of twelve so I don't have a complete opinion, but based on the material I've digested up to this point, I'd definitely give the book a solid five stars. Examples are clear, and the information is accurate without overloading the reader.

When I started the book I primarily used blender on win 7, although around chapter seven or eight I switched to ubunto 12.10 exclusively. I quickly discovered I didn't know where blender saved render files after hitting f12. I thought I remembered doing the same on win 7 and finding the rendered image saved into my user home directory. This actually may be not true. Nevertheless, I attempted to find where the default save location is on ubuntu.

After poking around in my user directory and blender's install directory and finding nothing, I decided I needed a little more sleuthing power. Since my linux-ese is rusty I used google to locate a few good resources. Ubuntu community docs and Greg's wiki provided the know-how I was in search of.
sudo find / -name "*.png" -amin -1
sudo so I could snoop in every directory. '-amin -1'  so I'd only be looking for .png files accessed within the last minute. I then hit f12 on blender to create a new render and subsequently excuted the find command. Alas, nothing turned up. Apparently the rendered image isn't saved to disk by default after all.

A google search or two later and I arrived at the solution.  After hitting f12 and the image viewer pops open, click on the image menu and select 'Save as Image'. Rocket Science!

Thursday, March 7, 2013

River Dance Dance!

A thumbnail I crafted recently (was it yesterday? it really shouldn't be this hard to remember yesterday, should it?).
<digress>I need to make a few changes to Madstone (per the "customer's" request. Honestly, who is this guy?) I figured I'd use the tracing paper approach. Well, that is once I get some tracing paper. In the mean time, I was itching to draw something else and this thumbnail was as far as I got.</digress>

I drew that on roughly half a post-it note so needless to say, I spent all of three (or less) minutes satisfying my art-hunger. It's not a whole lot to look at, but I was just having a go at creating a composition. You know, thumb nailing.

What's that supposed to be? So glad you asked that question. It's an attempt to compose my favourite scene from Daruna (a table top rpg campaign played amongst friends, documented on the fantastic blog "Random Diversions").

This is my attempt to put together an interesting, high energy depiction of the river attack.  You're looking at a barge with a mud creature clinging to the bow. On the left is an archer attempting to save the bargemen. On the right is another would be rescuer, sprinting across the water's surface via an enchanted helm, a length of rope trailing out behind him. In the distance beyond the barge one can just make out a village.

I know i's a stretch, but hello... less than three minutes.

I can already see some problems.
  • The archer is rotated way too far. He's going to be shooting parallel to the barge, not at the mud creatures climbing on it.
  • The water walker (name: Orca) is too small. Based on the archers head and the horizon, Orca needs to eat a super mushroom. Just ask Andrew Loomis (see image below).
  • There needs to be more urgency in the picture.
As for the last issue, maybe rotating the barge a little and adding some super panicked sailors would help. I'm not entirely sure. But that's the great thing about thumb nails - crank out a bunch out and see what happens.

 On the bright side, I think the major elements are lining up near the thirds of the picture, which typically creates a stronger composition.

Andrew Loomis, Figure Drawing For All It's Worth, pg. 37