2. Choose Python (for C4D below R20)
3. Start new script, menu File ➩ New File
4. Paste the code into the code field
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import c4d | |
#Welcome to the world of Python | |
def main(): | |
doc.StartUndo() | |
s = doc.GetSelection() | |
for x in s: | |
try: | |
p = x.GetUp() | |
doc.AddUndo(c4d.UNDOTYPE_BITS, x) | |
x.DelBit(c4d.BIT_ACTIVE) | |
doc.AddUndo(c4d.UNDOTYPE_BITS, p) | |
p.SetBit(c4d.BIT_ACTIVE) | |
except: | |
pass | |
c4d.EventAdd() | |
doc.EndUndo() | |
if __name__=='__main__': | |
main() |
5. You can render (current viewport) or load the icon for your script using File ➩ Render or File ➩ Load Icon
6. Save your new script File ➩ Save the script
7. Push the Shortcut button on the bottom right, assign your own key
8. Save your C4D config
You're done
No comments:
Post a Comment