Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/07/2024 in all areas

  1. @Smolak import c4d def main(): objs = doc.GetActiveObjects(0) for index, obj in enumerate(objs): inst = c4d.BaseObject(c4d.Oinstance) inst.InsertAfter(obj) inst[c4d.INSTANCEOBJECT_LINK] = obj inst.SetName(obj.GetName()+"_inst") orig_pos = c4d.BaseObject.GetAbsPos(obj) orig_rot = c4d.BaseObject.GetAbsRot(obj) orig_scl = c4d.BaseObject.GetAbsScale(obj) print(orig_pos, orig_rot, orig_scl) inst.SetAbsPos(orig_pos) inst.SetAbsRot(orig_rot) inst.SetAbsScale(orig_scl) if index == 0: doc.SetActiveObject(inst, mode=c4d.SELECTION_NEW) else: doc.SetActiveObject(inst, mode=c4d.SELECTION_ADD) c4d.EventAdd() if __name__=='__main__': main()
    1 point
×
×
  • Create New...