Skip to content

Instantly share code, notes, and snippets.

@CGArtPython
Created July 21, 2023 07:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CGArtPython/f4d1fc945d0ca0b483144ae695a20b27 to your computer and use it in GitHub Desktop.
Save CGArtPython/f4d1fc945d0ca0b483144ae695a20b27 to your computer and use it in GitHub Desktop.
In Blender there are names for the object and the data that the object represents.
import bpy
bpy.ops.object.light_add(type='SUN')
light_obj = bpy.context.active_object
light.name = "light object name"
light.data.name = "light data name"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment