Created
January 11, 2017 01:22
-
-
Save donovankeith/0e49ead226f59de3b615d206d558ccc5 to your computer and use it in GitHub Desktop.
CV-Set New Selection Cinema 4D Script
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
"""Name-US: CV-Set New Selection | |
Description-US: Deslects all tags and runs the Set Selection command. | |
Installation: | |
------------- | |
1. Save this to a file called "setnewselection.py" in your C4D Scripts Folder | |
2. Restart Cinema 4D | |
Usage: | |
------ | |
1. Select some points/polys/edges | |
2. Plugins > Scripts > "CV-Set New Selection." | |
3. Your selection will be saved! | |
Known Limitations: | |
------------------ | |
1. It may require multiple undo steps to undo. | |
2. Does not check object type or mode to verify anything will actually happen. | |
Author: Donovan Keith <[email protected]> | |
Copyright (C) 2017 Maxon Computer Inc. | |
""" | |
import c4d | |
from c4d import gui | |
def main(): | |
# Deselect all Tags | |
doc.StartUndo() | |
doc.SetActiveTag(None, mode=c4d.SELECTION_NEW) | |
doc.AddUndo(c4d.UNDOTYPE_CHANGE_SMALL, doc) | |
# Set the Selection | |
c4d.CallCommand(12552, 12552) # Set Selection | |
doc.EndUndo() | |
if __name__=='__main__': | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment