Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/01/2019 in all areas

  1. import c4d def rename(obj): texture_tag = obj.GetTag(c4d.Ttexture) if not texture_tag: return mat = texture_tag[c4d.TEXTURETAG_MATERIAL] if not mat: return name = "{}.{}".format(obj.GetName(), mat.GetName()) doc.AddUndo(c4d.UNDOTYPE_CHANGE, obj) obj.SetName(name) def iter_hierarchy(obj): while obj: rename(obj) iter_hierarchy(obj.GetDown()) obj = obj.GetNext() def main(): doc = c4d.documents.GetActiveDocument() if not doc: return doc.StartUndo() iter_hierarchy(doc.GetFirstObject()) doc.EndUndo() c4d.EventAdd() if __name__=='__main__': main() Coded without opening c4d so there might have errors. You can change how name are structured at line 10.
    1 point
×
×
  • Create New...