'foo' is 'foo'
True
'foo' == 'foo'
True
'foo' is 'foo2'[:-1]
False
'foo' == 'foo2'[:-1]
True
'foo' is 'Foo'.lower()
False
'foo' == 'Foo'.lower()
True
0 == 0.0
True
0 is 0.0
False
0 is False
False
0 == False
True
not 0
True
Thanks to Joe Hornsby for providing these excellent examples.
Ramblings of a 3D artist
You gotta problem...? Well I probably did too.
Monday 22 April 2024
Python3 comparison operators
Thursday 18 April 2024
Free, Opensource Animation Picker - Dreamwall
So, "it ain't 2005 anymore", and quite rightly so.
Why spend time creating a bespoke tool, if there's something out there already that's free, great, and gets the job done?
Dreamwall Anim Picker is a free and intuitive tool that allows the construction of an animation picker for rigs within Maya. It's really good, and I think it will save you a lot of time, check it out here:
https://github.com/DreamWall-Animation/dwpicker
Thursday 28 March 2024
Can't undo in Maya
The Issue:
// Error: line 1: The undo queue is turned off.
:(
The Fix:
In script editor, on a python tab, run:
cmds.undoInfo(state=True)
:)
Thursday 7 March 2024
Cool Maya Time Slider Preference!
I discovered a new time slider preference today that blew my mind slightly;
'Snap to whole frames'.
When you turn this off, as you scrub through the time slider you are able to see how your frames interpolate from one, to the other. Particularly useful if you're trying to debug euler/gimbal issues!
Friday 16 February 2024
Prune weights not working
The Issue:
Hey! My prune weights aren't working! :(
The Fix:
Yeah? Have you tried unlocking your weights?
Friday 27 October 2023
Python debug tip
Want to know a secret?
"*"*100 takes me about 1 second to type.
Why not wrap it in a print?
print("*"*100)
print("var_a:", var_a)
print("var_b:", var_b)
print("var_c:", var_c)
Result:
//****************************************************************************************************
// var_a: pineapple
// var_b: 64
// var_c: <__main__.Dog object at 0x00000248A53D7748> #
//************************************************************************************************
Isn't that easier to read?
How to change all paths in Houdini scene file
The Problem:
I need to change all paths in a Houdini scene file due to a drive change - oh no! All my nodes are invalid, my scene is broken and everything is on fire. Or is it? No its not, i'll tell you why:
The Fix:
1.) Windows > Hscript Textport
2.) Type opchange YOUROLDLOCATION YOURNEWLOCATION
(press enter)
And there you go, all nodes referencing YOUROLDLOCATION will have search'n'replaced it with YOURNEWLOCATION. Magic. Everything fixed. :)
Monday 23 October 2023
How to install numpy for Maya
But how? How do you install numpy for Maya?
Like this:
1.) Press windows, type in cmd and press enter
2.) type in: cd C:\Program Files\Autodesk\Maya20??\bin
3.) type in: mayapy -m pip install numpy
Obviously, replace the ?? in your Maya install directory with your version number.
And there you go - numpy installed! :)
Monday 3 April 2023
Maya Rigging: Joint-based collision detection using Maya muscle nodes
I recently found a great tutorial on created live-collision joints using Mayas in-built muscle system nodes. I thought this was a really clever solution as it is importantly real-time, meaning animators can see the output immediately, and it utilises nodes already existing within Maya.
To read up on how to create this awesome looking system, take a look here:
http://www.rihamtoulan.com/blog/2018/3/24/faking-collisions-with-joints-based-setup-8snd2
Thursday 23 March 2023
Python Generators - using yields and generators
Python generators were something that alluded me for quite a while. A spooky concept that didn't seem necessary. However after using Coroutines in C#, it sort of became a little more clear.
Then, recently I stumbled across an excellent blog post explaining what generators do, how and when to use them:
Check it out!
Monday 9 January 2023
FrancoJam Gamejam Winners 2022!
Towards the end of last year I took part in Creative Assembly's GameJam, and it just got announced that our team won! Hooray!
This year's theme was 'Animal Rescue' inspired by Creative Assembly's charity of the year, so we decided to put a spin on the theme and make a game about an animal (Noah the pigeon) rescuing humans onto his ark. We had a total of 48 hours to make the game.
The idea for the gameplay is to launch Noah the pigeon via a catapult click & drag mechanic to connect a tightrope to pins scattered throughout the level, thus creating a path for the humans to walk across and board the Ark.
Alex Tavener(me) - Art (pigeon, ark, background)Ross Harrop - Art (humans, environment)
Chris Kemp - Programming
Chris Kozlowski - Audio
William Fynn - Moral support & ideas consultant
GG!
Monday 14 November 2022
Houdini: Linking/connecting multiple parameters
Let's say you have a subnet, with near identical parameters to multiple sub-nodes within. How do we go about linking them all? We could tediously, arduously right click > copy > right click > paste relative references for every attribute we want to copy, or...
1.) Open up 'parameter interface' of the subnet, and go to the 'channels' tab
2.) Under 'Linked Channels', type subNode/subNodeparameterName Do this with all nodes you want to link. I found that you can quickly iterate through nodes using a simple IDE/text editor. ONCE FINISHED TYPING, PRESS ENTER! THIS IS INCREDIBLY IMPORTANT!
3.) Click 'Apply' - That's it, all your nodes are now linked via the main subnet node.
For multiparms this functions a little differently, insofar that these 'connections' must be made during attribute instantiation on the master node. If you try to edit/append/remove after the instantiation of the multiparm master attribute, it will not make any changes to the sub node attibutes. I can only assume this is a bug.
Also, occasionally these 'Linked Channels' will appear on the 'Parameter' tab instead of 'Channels'. Pesky Houdini.