On 21/09/2015 at 20:23, xxxxxxxx wrote:
So, first post, noob question. :blush:
I have these two really simple scripts that save me some clicks every now and then.
All I want to do is undo them in one go but for the life of me I can't figure out how.
1: To make a single mesh out of anything (e.g. cloner object)
//-------------------------------------------------------------------------------------
def main() :
bc = c4d.GetWorldContainerInstance() # Get the Prefs
oldInsertAt = bc[c4d.WPREF_INSERTAT] # Get the current Insert setting
bc[c4d.WPREF_INSERTAT] = 3 # Set to Parent
c4d.CallCommand(100004772) # Group Objects
c4d.CallCommand(1011010) # Connect
c4d.CallCommand(12236) # Make Editable
bc[c4d.WPREF_INSERTAT] = oldInsertAt # Reset the pref to original value
if \__name\_\_=='\__main\_\_':
main()
//-------------------------------------------------------------------------------------
2: Delete polygons + optimize when in polygon/point mode
or optimize when in edge mode
//-------------------------------------------------------------------------------------
mode = doc.GetMode()
if mode==c4d.Medges: #in edge mode
c4d.CallCommand(440000043) # Dissolve
elif mode!=c4d.Medges: #Not in edge mode
c4d.CallCommand(12109) # Delete
c4d.CallCommand(14039) # Optimize...
//-------------------------------------------------------------------------------------
Any thoughts? please!