Pretty Poly Editor Documentation


<= previous = Return to Index = next =>

I. PPE Manual - 9. Personalizing, Macros and Scripts - b Macros


Under construction!
This page does not reflect the current state of PPE or vice versa :-), so read at your own risk!
In the last topic, we saw that PPE stores commands in the log-files and reads them from the startup-file. In this topic we will see that it can store/read from arbitrary files and that you can bind macros to keys so that you can call them very fast. Lets do an example. Lets say we want to do "babushka dolls", that is have 10 dolls, the first inside the second, the second inside the third etc. If you don't have the model for a doll, you can use any other model, for example *******. The aim is to input the repetitive commands once and bind them to a key. Then you only have to press nine times this key and you are done. Before doing such a task you should think about several things. Which commands are repetitive? In this example, for each of the dolls, we have to shrink it and load the next doll. Where to start? We could have also used load next doll and shrink it (start one command earlier/later) What state of PPE does the macro need? Cursor?**** While reading this, try:
  1. Open the model.
  2. The next steps will already belong to the repetitive ones. So, choose file/start macro recording from the viewer-menu.
  3. Shrink the model by scaling it with factor of, say 0.85
  4. Merge the next model into the scene by using file/merge model.
  5. We are done with one repetition, so say file/stop macro recording. PPE will ask you what to do with the macro. Tell it we want to bind it (not permanently) to a key, lets say the key "t". BTW, while recording the macro, we have already done the first repetition. So, if we want 10 repetitions, we only have to use the macro 9 times
  6. Press "t" once. You will see that one model is added, in the correct size.
  7. Press "t" as often as you like (probably 8 more times).
So, you saw that all the commands that the user submits between "start macro recording" and "stop macro recording", are recorded. After "stop macro recording", you are asked what to do with the recorded commands. You can Macrodebug mode can be used to debug macros or scripts. All the PPE-commands that are executed from a macro or script are displayed. Please note that in a script, "normal" python commands, for example assignment to a variable or a for-statement are not displayed. The command is displayed before it is executed.
<= previous = Return to Index = next =>