2008-12-09 - System log: Code of beauty

Read what's going on behind the scenes and in the minds of the developers of Craft Director Tools.
Post Reply
User avatar
Micael Belin
CTO
Posts: 168
Joined: Thu Apr 03, 2008 9:39 am
Location: Gothenburg, Sweden
Contact:

2008-12-09 - System log: Code of beauty

Post by Micael Belin » Tue Dec 09, 2008 5:17 pm

It seems Maya has an issue with replacing keys in an already existing animation curve. As long as i prepare the curve and remove unnecessary keys, everything seems to run fine.
I threw the new adaptor to the butcher for some evaluation. I haven't heard anything yet. Must be a good sign.

Then i started with the next problem. We are experiencing problem with memory management with one of our in-development adaptors, which basically requires some adjustments in how we interact between our modules. I spent today basically testing out various solution ideas and verified which ones are most applicable in our situation.


This is what i came up with.

Code: Select all


template <class T>
class ReturnValue
{
private:
	T *obj;
public:
	virtual const T &operator = ( T &other) const
	{
		*obj = other;
		return *obj;
	}
	ReturnValue(T &object) {obj = &object;};
};

They say beauty is in the eye of the beholder, and man, this is as beautiful as it can get!

Wonder what it's for? Give me your best guess! Someday i might post the full article.
micael.fredriksson@craftanimations.com
http://www.craftanimations.com

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest