【转】How do I use MDGModifier so I can get reliable Undo/Redo?
来源:互联网 发布:台湾购物数据 编辑:程序博客网 时间:2024/06/05 09:12
I've had several logistical problems with MDGModifiers, exclusively with its ::undo() and ::redo() mechanism. After much trial and error on the topic I've come to the following conclusions:
There are times when you may have to perform a ::doIt() in the middle of your MDGModifier modification so the scene state is valid for further operations. For example, if you use MDGModifier::create(), you will need to ::doIt() so this node exists if you wish to perform any edits using a class other than MDGModifier (finding an MPlug on your new node, for instance).
Do not continue to use a MDGModifier object after you have called its ::doIt() method!
My "Golden Rule" for MDGModifier is now the following:
"Execute ::doIt() as soon as I need to update the state of the scene, then immediately allocate another MDGModifier for further edits. Continue, rinse, repeat."
All allocated MDGModifier nodes go onto a stack. The stack in undone in FILO order, and redone in FIFO order.
- 【转】How do I use MDGModifier so I can get reliable Undo/Redo?
- How do I use IStream?
- How can i get FWHM?
- How do I use Cygwin in Geophysics ?
- UE4 How do I use InstancedStaticMeshes ?
- ActiveMQ - How do I use SSL
- how can I use void** function(void**)
- How Do I get Started with Oracle?
- How do I get into graphics?
- How do I get a preference value?
- How do I get started with CUDA?
- So do I 与 So I do
- what can i do?
- what can i do
- I CAN DO IT
- So many things I have to do but nothing I can do
- How do I use software from a PPA?
- How do I use WPF bindings with RelativeSource?
- 工资涨10倍,物价降一半
- pku 3259 Wormholes(SPFA判负环)
- IE Cookie Format
- 虚函数与private
- Sent per second to Anxi Wang
- 【转】How do I use MDGModifier so I can get reliable Undo/Redo?
- Antenna与j2me打包
- Hibernate 原理
- The DATA_SECTION Pragma
- px像素如何转为dip设备独立像素
- Antenna与j2me打包
- C++ Plug-in 技术的一些深度思考(1)
- 游戏跨区的实践总结(二)
- 关于asp.net Tab选项卡的应用注意