

Instead of SDK and Google search the right Python commands, try opening the menubar > Script > Script Log. PluginCafe online help forum - a good option when you run into trouble.

STK documentation - latest Maxon STK to download in HTML form.Note: For a slightly fancier find/replace dialog see Cinema 4D - my Python script - find replace object names The STK Gui.MessageDialog(str(num_renamed) + ' of ' + str(len(selection)) + Print ' - ' + sel.GetName() + ' > ' + new_nameĭoc.AddUndo(c4d.UNDOTYPE_CHANGE_SMALL, sel)Ĭ4d.EventAdd() # Update C4D to see changes. If len(selection) Script > Console window. Selection = doc.GetActiveObjects(c4d.GETACTIVEOBJECTFLAGS_CHILDREN) # Get the selected objects, including children. Self.option_replace_string = self.GetString(TXT_REPLACE)

Self.option_find_string = self.GetString(TXT_FIND) Self.AddButton(BTN_CANCEL, c4d.BFH_SCALE, name='Cancel') Self.AddButton(BTN_OK, c4d.BFH_SCALE, name='OK') Self.GroupBegin(GROUP_OPTIONS, c4d.BFH_CENTER, 2, 1) Self.SetString(TXT_REPLACE, 'Square') # Default 'replace' string. Self.AddEditText(TXT_REPLACE, c4d.BFH_SCALEFIT) Self.AddStaticText(LBL_INFO2, c4d.BFH_LEFT, name='Replace with:') Self.SetString(TXT_FIND, 'Cube') # Default 'find' string. Self.AddEditText(TXT_FIND, c4d.BFH_SCALEFIT) Self.AddStaticText(LBL_INFO1, c4d.BFH_LEFT, name='Find:') # Unique id numbers for each of the GUI elements # Simple script for doing a Find/Replace over all selected object names.

NOTE: This page is a daughter page of: Cinema 4D
