Author Topic: Python commands to create Corona lights/cameras etc.  (Read 1221 times)

2021-08-25, 16:17:44

JPeters

  • Active Users
  • **
  • Posts: 87
    • View Profile
Hi guys,

Just a quick question, is there a list or page somewhere that lists the proper Python commands to create Corona lights or cameras etc.?

With "proper" I mean not "c4d.CallCommand(1032104) # Corona Light" but rather something along the lines of "c4d.BaseObject(c4d.Ocamera)"

Thanks!

2021-08-26, 15:56:46
Reply #1

mmarcotic

  • Former Corona Team Member
  • Active Users
  • **
  • Posts: 544
  • Jan - C4D QA
    • View Profile
Hello,

since our objects are not part of the c4d module, there will not be any c4d.Ocoronalight, however, you can substitute
Code: [Select]
c4d.CallCommand(1032104) with
Code: [Select]
doc.insertObject(c4d.BaseObject(1032104))
Additionally, Corona Camera is a tag and not an object, so you should follow the syntax of creating a camera and then adding a Corona Camera Tag (1032177)

Jan
Learn how to report bugs for Corona in C4D here.

2021-08-27, 09:47:04
Reply #2

JPeters

  • Active Users
  • **
  • Posts: 87
    • View Profile
Hi Jan,

This is very helpful, thank you!

Now I can create the objects in memory first, name them etc. and then insert them in the hierarchy like a normal C4D object.

You can't do this with the "c4d.CallCommand" syntax since it just creates the object in the root of the scene.

Cheers,