Monday, February 8, 2010

#1 Continued

So after more testing with the whole pound one thing (#1) I've discovered that its use goes far beyond checkboxes. In fact I think every GUI control can use it, from floatSliderGrps to textFields. It simply returns that control's value (usually the -v flag). So for instance you can use a floatSliderGrp to change an attribute by making the -dc or -cc flags "setAttr someObject.someAttr #1". Here's a really simple example that you can run in the script editor.

window;
columnLayout;
textField -cc "print #1";
showWindow;

Wednesday, December 23, 2009

boSliders


So I haven't had much time to write obviously, but I wanted to get this one out there. I'm sure there are tons of methods of creating a facial rig, but the method I'm most familiar with is Jason Osipa's blendshape and slider setup. boSliders is a nice tool for quickly making sliders and quickly setting them up. It's main purpose was speed, so I designed it to use marking menus to make things quicker. Feel free to grab it off my scripts site and give it a try! There's a small amount of documentation (mostly unfinished) found at bohdon.com/scripts/docs. The one thing I was sure to finish is the explanation of the major Corner Interpolation types and how their useful. I'll get to finishing it sooner or later, but in the meantime just know that everything is in the right click menus. There's a lot of features, so just try to poke around.

You'll need boRightClickManager to use the script too, so grab that if you haven't!

Tuesday, September 15, 2009

boRandomizer 1.1

So I realized that the channel randomizer in this script was only grabbing the main attributes (attributes directly on the object that is selected). I've modified it so that you can select attributes in the channel box from both the main object, shape, inputs and outputs. This is mainly so I can easily randomize values for things like blendShapes and poly operations... update's available on bohdon.com/scripts

Monday, September 14, 2009

Multi Blend Slider 2.1

Just updated the multi blend slider tool (part of boBlendShapes.mel) so that it works on both multiple targets and multiple bases (it also works if you select the actual blend shape nodes). I also changed the little marking menu to buttons, so you can easily click 0, .333, .5, .666, and 1. Anyhoo! Enjoy.

Thursday, September 3, 2009

Notepad ++ Mel Language

So I've gone through many text editors, and although Komodo is pretty much my favorite, Notepad ++ is undeniably quick and lite, and extremely easy to install on a usb flash drive. Writing User Defined Languages in Notepad ++ is extremely simple as I recently found out, so I decided to edit the 1.0.1 mel udl that has been floating around (on highend and other places).

I've added back quotes (`) as string delimiters, as well as signifying words that start with $ as variables (so you can easily find them!). I've also changed the default color scheme to something a little easier on the eyes and more appealing. Apparently there's no way to fix (enable) escaped string characters, so that's still a present glitch ("hello \"world\"!" is syntactically highlighted as two strings, not one).

Anyway, feel free to grab the plugin. If you have the most recent version of Notepad ++ you can also now grab my styles definition (the darker colored syntax highlighting seen below).

The insertExt.ini and userDefineLang.xml should go in the applications data folder which is usually in user/AppData or something similar. If you've installed npp on a flash drive, then chances are the app data folder is the Notepad ++ folder. The mel.xml goes in plugins, or plugins/APIs. Also, if you grab the Bo Style version, you'll need to put the Bo Style.xml in the themes folder, and choose it with the style configurator (Settings > Style Configurator), you should also enable global background color.

Enjoy.

Thursday, August 27, 2009

boRandomizer 1.0

I've come across a few situations in which I really wanted a nice randomizer, on both an object level and component level. It helps you add some imperfections to your models when needed, and it's great when you've got a ton of objects to lay out, like leaves or grass. Anyway... I made this cool GUI for randomizing just about anything. It also lets you select attributes in the channel box, and randomize their values (useful for randomizing colors and other non-transformational attributes). It works across multiple objects and you can sync nodes/channels etc. To access a bunch of other options, right click on the Translate, Rotate, Scale, or Randomize buttons and you'll see a marking menu including options for X, Y, Z, rounding values, uniform scaling, absolute/relative, world/local/object (and gimbal for rotations). So check it out, it's handy.

Friday, August 14, 2009

Marking Menu Checkboxes and #1

So it's not difficult to realize that trying to learn the finer things about mel is like trying to learn about a language that doesn't even exist. The strange part about this, however, is that every once in a while you come across something implemented by Autodesk, which is seemingly documented nowhere. The even more difficult part about some of these situations, is that due to the wonderfully symbol-filled world of programming, trying to google "#1" is identical to trying to google "1". I'm not really sure what the functionality of the pound symbol is in other programming languages, and maybe that would've helped, but... Anyway, here is a neat feature in mel, of which I couldn't find information about anywhere on the internet. What I know about it is pretty much just from trial and error.

The #1 (pound 1) option is basically the future value of a menuItem's checkbox. So let's say you are in a marking menu with a checkbox called Happy (currently unchecked). If the -command (-c) of happy was "print #1", selecting Happy would output "1" in the script editor (which is now the value of the checkbox). The next time you select Happy (currently checked) the output would be 0 (now unchecked). So the usefulness of this comes in toggling one or more options with a checkbox item.

So let's take the example of toggling the selection mask of polys.
Instead of having to do something like...

menuItem
-l "Toggle Poly Mask"
-c "selectPref -polymesh (!`selectPref -q -polymesh`)"
-checkBox (`selectType -q -polymesh`);


you could simply use

menuItem
-l "Toggle Poly Mask"
-c "selectPref -polymesh #1"
-checkBox (`selectType -q -polymesh`);


Sure not a huge change with only one option, but it definitely came in handy when I was changing about 14 options at once. Trying to use #1 in any other situation but a checkbox command will return a syntax error (you can use it in menuItem checkboxes or even regular checkboxes), so you'd have to use the not (!) technique in such situations. Anyway, putting this out there because it's always nice to have quick answers to quick questions.