We've Moved

The blog has been retired - it's up for legacy reasons, but these days I'm blogging at blog.theodox.com. All of the content from this site has been replicated there, and that's where all of the new content will be posted. The new feed is here . I'm experimenting with crossposting from the live site, but if you want to keep up to date use blog.theodox.com or just theodox.com

Sunday, May 6, 2018

State of Decay 2

SOD 2 box
It’s no accident that there have not been a lot of blog entries in the last several months, but hopefully life will be returning to normal soon. I took the time to clean up my site generator and simplify the site theme, though I expect I’ll probably waste a bunch of time fiddling around over the summer.
In any event, the game is looking good — although I’ve got one HUGE bug I must squish before we go out the door! — and it’s been a real blast to bask in some of the reactions from people who’ve seen the game.
The last couple of years have been kind of a wild ride, professionally — I certainly never thought I’d spend more time staring at C++ than anything else ! — but at least, now that the dust is settling, there should be time for blogging again. With all the crazy stuff I’ve had to learn I’m sure there will be lots to chew over, too.
In any event, the press embargo will lift on May 1st, and opening day will be May 22d. In the meantime, here’s a little video teaser from the company stream with a special shout out to my colleague Jeff Sult, who helped me ferret out a truly insidious bug in the Xbox shader compiler.

PS If you’re wondering… sometimes the Xbox decides to ‘optimize’ exponent operators to use a logarithm instead of a multiply… Which is very nice unless your exponent somehow goes negative, in which case the result is a NAN which can really mess up your PBR G-buffers. Sigh…

Thursday, August 24, 2017

mGui available on CreativeCrash

If you’ve been considering taking mGui for a spin, but don’t want to take on the work of cloning the whole project from GitHub, we’ve uploaded a copy of mGui 2.2 to CreativeCrash as a (free) single file download. All you need to do is download the zip file from here, drop it into a folder where you Maya is looking for python scripts, and you can start writing gui’s with the neat mGui syntax, multicast delegates, and all sorts of other features. You can also check out the tutorials in the wiki for some additional help getting started.
If you’re interested in learning how things work under the hood — or if you’re interested in contributing to the project — you’ll probably still want to grab the GitHub version first. However if all you want to do is write some tools quickly, the zipped up version is an easy way to get started.
PS: We’re always looking for new contributors to the project!

Sunday, July 30, 2017

MGui 2.2 release is live

The latest next point release of mGui — the python module to streamline maya gui creation — is up on on Github, thanks in large part to +Bob White, who put in a lot of the work on this release.

Although this is a point release, it has some exciting improvements:

Improved Menu Support

We've added a more refined an elegant method for handling sub-menus with the SubMenu class. This works like a context manager, so the structure of the menu is obvious when reading the code.

    with Menu(label='TestMenu') as food_menu:            # conventional menu items          hotdog = MenuItem(label = 'Hot Dog')          burger = MenuItem(label = 'Burger')          taco = MenuItem(label = 'Taco')            # a submenu          with SubMenu(label='Pizza') as sm:              pepperoni = CheckBoxMenuItem(label='Pepperoni')              sausage = CheckBoxMenuItem(label='Sausage')              pineapples = CheckBoxMenuItem(label='Pineapples')              for each in (pepperoni, sausage, pineapples):                  each.command += pizza_selected              MenuDivider()            with SubMenu(label='Delivery') as sm:              with RadioMenuItemCollection() as radio:                  eatin = RadioMenuItem('Eat In')                  takeout = RadioMenuItem('Take Out')                  delivery = RadioMenuItem('Delivery')  

We've also enhance menus so they support the same kind of dot notation as other mGui controls. In this example that means you could get to the 'sausage' item as


which is going to be both more readable and more consistent with other mGui code. If you use the YAML menu loader, that also supports submenus:

        - !MMenuItem              key:  check              label:  checkboxes              annotation: Toggle me!              options:                checkBox: True              command: mGui.examples.menu_loader.checkbox              - !MSubMenu              key: submenu              label: submenus                items:                  - !MMenuItem                    key: sub1                    label: Item 1                    - !MMenuItem                    key: sub2                    label: Item 2  

Working with existing items

At various points we supported three different idioms (Menu.from_existing()gui.derive() and Control.wrap(). for putting an mGui wrapper around existng controls. In this release these have been collapsed into a single function, gui.wrap() which has some cool new features:

  • It's automatically recursive. So if you wrap an existing menu, the returned object will have nested properties for all of the menuItems in the menu. If you wrap an existing layout, you'll have nested properties for all the layout's children.
  • It does a better job matching the underlying maya gui widgets to mGui wrapper classes than any of the previous methods. Because of some irregularities in the way Maya relates commands to objects there are still some edge cases the new wrap()should get most cases.
  • For maya objects with python callbacks, you can ask wrap() to convert them to [multicast delegates for you. This does not support mel callbacks yet, but we may be able to expand to supporting them in the future.

The new, improved gui.wrap() should make it much easier to add mGui controls or layouts to menus and windows that come from regular Maya.

For the time being, we've re-pointed gui.derive() at gui.wrap() under the hood so it won't break existing code — it will however issue a deprecation warning so that when we remove derive() in 2.3 people will have had plenty of warning.

Find() method for child controls

We've added a new method to all layouts that will collect all children of a layout by mGui type. This is handy for big complex layouts where you aren't quite sure what something should be called — or for layouts that you've gotten from gui.wrap().


We've also cleaned up and expanded the examples, added more test coverage, and fixed a few minor bugs (the most obvious one will be that the StretchForm() classes properly respect margins, at long last!).

We're starting to put more time into the project wiki, including some new tutorials. Feedback and suggestions are much appreciated! And of course if you run into any problems be sure to log them on the project issues page. We've been debated whether or not we should package the project for PyPi and/or the Maya app store — if you have an opinion you should chime in in the comments or on the issues page.

tags: mayamgui

Sunday, June 12, 2016

The New Hotness

I've finally completed rolling over to to a new, self-hosted blog platform!

The process took a bit longer than I wanted, mostly because it web development remains a messy, iterative process - at least for me.  Since I ended up unifying both the blog and the old Character Rigger's Cookbook as well as on old markdown wiki, I had to do a lot of little scripts to groom the old content into a consistent format and linking strategy.  Add in more than a modicum of CSS noodling and whatnot and my 'couple of weekends' project turned into a couple of months.

However all that is behind me now, and all my future updates are going to be coming up at theodox.github.io  (you can also use www.theodox.com).  If you're subscribed to the current feed, you should switch over to either http://theodox.github.io/feeds/atom.xml or http://theodox.github.io/feeds/rss.xml, depending on your reader; one of the nice side effects of the switch is that the new feeds are much cleaner than Blogger's -- no more CSS gibberish instead of article summaries, thank you very much!)

I'm going to leave this site intact, and I'll try to keep monitoring comments and so on here, but the new site is going to be where all the news stuff comes out.  I'm also going to change the blog.theodox.com redirect so it goes to the new site, so if you're using that in a blogroll you won't have to update it.

PS. I had to touch a lot of content during the migration: there are about 150 blog posts, several dozen wiki pages, and a bunch of articles that all had to be repointed and I'd be pretty surprised if nothing odd slipped through.  Please let me know using the comments at the new site so I can fix up anything that's confusing or misleading.

So, here one more link to the new site, just in case.  Hope to see you there!

Thursday, May 12, 2016

Shamless Job Plug

Just wanted to re-flag the two job openings I'm hiring for at Undead Labs right now.

We're looking for one TA with good python chops to ride herd on the python/maya toolkit, and another TA with good shading and GPU skills to help us wring the most out of the Unreal Engine.  Details of both positions are in the link above.

Contact me directly or apply via the Undead Labs website!

Thursday, April 28, 2016

minor minq manifestations

Blogging has been super light, thanks to the triple whammy of a milestone, a cold, and my grand plan to migrate this blog over to a static site generator.  However I did want to mention that I've been trying to update the minq wiki page so it is more accessible. I'd appreciate any feedback, comments or suggestions to make it clearer.  When you write something yourself you just accept as natural the quirks and habits of thought that go with it, so it's handy to have outside eyes when you're writing documentation.

I've added a couple of minor features as well.  There's a  bunch of operators for counting things -- for example you can get the vertex count of meshes with something like Meshes().get(VertCounts) . On a somewhat related note all streams have a count() function which will return the length of the stream, and a first() method which will pull the head item from a stream -- which is handy if you expect to narrow down to a single item and don't want a single-item iterable.

Last but not least I'd love to hear from the community about good minq hacks -- I'll be happy to add cool ones to the examples file. I'd also appreciate any bugs you find going into the issues page!

Sunday, April 3, 2016

Blogger blues

Wherein our author uses blogger to post a blog post blogging about how much he dislikes blogger.
It's late on a Sunday night and I need to get this off my chest.

I really have come to loathe Blogger.  The sluggish, overly complicated, JS heavy theme, the sluggish, too-complex-for-speed-but-too-simple-for-interesting-stuff editor, and the way it stuffs stylesheet info into the RSS feed come to mind. but overall... it's just gotten on my nerves.

So, I'm probably going to transition the blog over to something else.  My current leading candidate for a site generator is Pelican, a Python based static html site generator which seems to be powerful enough for my not-too-complex needs.  Jekyll is another candidate but all things being equal I'd rather stick with a Python-based setup and the final output will be pretty much the same.

I'm a tad nervous about what happens to old links and traffic so I assume that I'll probably transition over gradually with duplicate postings for a while. If any of you have done something similar in the past I'd be curious to hear about how it went.

In the meantime, I'll just add that I've been dealing with the transition in typical TA fashion. I hacked up a script to download all of the existing blog posts as XML, then used the html2text module on the cheese shop to convert the HTML from the posts into markdown text. I'm still going to have to hand-finish every pieces, cleaning up dead links and missing images and so on:  I'm sure it'll be a TA-style spit'n'bailing-wire party for a while yet.

In the meantime I'm all ears if anybody has more suggestions for site generators, or a reason to go with something other than a static site on github.io, please let me know in the comments!

update:  the new site is here