[Bf-committers] undo fun :)

Ton Roosendaal bf-committers@blender.org
Sat, 31 Jul 2004 16:24:12 +0200


Hi,

> You end up with the original cube with it's original location,  not
> the unrotated edited cube or the undo of the edit mode changes but
> both. Perhaps if leaving editmode was an object level undo push it
> would make more sense. Just thinking.

Yes, yes... undo pushes have to be all over the code in strategic  
places. That's the large amount work that makes me think not to add to  
release now. Otherwise... :)

-Ton-


>
> On Sat, 31 Jul 2004 14:42:02 +0200, Ton Roosendaal <ton@blender.org>  
> wrote:
>> Hi,
>>
>> Couldn't resist trying a hackish idea for undo as almost exists for
>> ages:
>> Idea was to (ab)use the quick file read/write feature Blender has. For
>> each undo step it saves a file in the Blender temp directory.
>>
>> I've tried .blend files up to 5 MB, and that's still behaving OK. The
>> most obvious negative side effects are of course recreating
>> displaylists and drawing lists for particles, which all happens 'on
>> load'. Also a bit 'weird' is that it completely restores everything,
>> including UI changes.
>>
>> To keep the test simple I've only added undo in the transform() for
>> now. Also only works in Object Mode. Use UKEY and SHIFT+UKEY. In the
>> console you can see test prints.
>>
>> Didn't commit it, since we're in freeze, so I add the patch to this
>> mail. :)
>> You can see it's very little code with a nice cycling list usage.  
>> Apply
>> the patch in source/blender/src, there are no include file changes.
>>
>> -Ton-
>>
>>
>>
>>
>
>
> --  
> Johnny Matthews
> johnny.matthews@gmail.com
> _______________________________________________
> Bf-committers mailing list
> Bf-committers@blender.org
> http://www.blender.org/mailman/listinfo/bf-committers
>
>
------------------------------------------------------------------------ 
--
Ton Roosendaal  Blender Foundation ton@blender.org  
http://www.blender.org