distant light

Used for distant light operations.
To get and set information of individual distant lights, get the distant_light_item class reference via distant_light_item.


xshade
scene
distant_light

List of Methods

append_light_item Appends a distant light item
distant_light_item Returns the distant_light_item object of the specified number
load Loads distant light settings from a file
physical_sky Gets a physical_sky object
remove_light_item Deletes the distant light item of the specified number
save Saves the distant light settings to a file

List of Properties

active_item The number of the selected distant light
number_of_lights The number of distant lights
sky_light The sky light intensity
sky_light_color The sky light color




Method Details

append_light_item

Appends a distant light item.

xshade.scene().distant_light.append_light_item()

distant_light_item

Returns the distant_light_item object of the specified number.
Return value :
  distant_light_item object
Arguments :
  int : number of the distant light item : An exception is thrown if the specified number does not exist
See also :
  number_of_lights The number of distant lights
  distant_light_item

#Output the intensity of distant_light_item number 0
print xshade.scene().distant_light.distant_light_item(0).intensity

load

Loads distant light settings from a file.
Arguments :
  file_path
See also :
  save

#Load distant light settings
dialog = xshade.create_dialog_with_uuid()
file_path = dialog.ask_path(True, '*.shddtl|shddtl')
xshade.scene().distant_light.load(file_path)

physical_sky

Gets a physical sky operations object.
Arguments :
  physical_sky object
See also :
  physical_sky

physical_sky = xshade.scene().distant_light.physical_sky()

remove_light_item

Deletes the distant light item of the specified number.
Arguments :
  int : number of the distant light item

#Delete distant light item number 1
xshade.scene().distant_light.remove_light_item(1)

save

Saves the distant light settings to a file.
Arguments :
  file_path
See also :
  load

#Save the distant light settings
dialog = xshade.create_dialog_with_uuid()
file_path = dialog.ask_path(False, '*.shddtl|shddtl')
xshade.scene().distant_light.save(file_path)

Property Details

active_item

The number of the selected distant light.

  • Get
  • Set

Type :
  int

print xshade.scene().distant_light.active_item

number_of_lights

The number of distant lights.

  • Get
  • Set

Type :
  int

print xshade.scene().distant_light.number_of_lights

sky_light

The sky light intensity.

  • Get
  • Set

Type :
  float

print xshade.scene().distant_light.sky_light

sky_light_color

The sky light color.

  • Get
  • Set

Type :
  rgb

print xshade.scene().distant_light.sky_light_color