| Class | Limelight::Scene |
| In: |
lib/limelight/scene.rb
|
| Parent: | Prop |
| visible | -> | visible? |
| button_groups | [R] | |
| cast | [R] | |
| casting_director | [R] | |
| production | [RW] | |
| stage | [RW] | |
| styles | [RW] | |
| visible | [RW] |
# File lib/limelight/scene.rb, line 27
27: def initialize(options={})
28: path = options.delete(:path) || ""
29: @root = FileLoader.for_root(path)
30: super(options)
31: @button_groups = ButtonGroupCache.new
32: @prop_index = {}
33: @cast = Module.new
34: # illuminate
35: end
Add the Prop to the index. Provides fast lookup by id.
# File lib/limelight/scene.rb, line 103
103: def index_prop(prop)
104: return if prop.id.nil? || prop.id.empty?
105: indexee = @prop_index[prop.id]
106: if indexee.nil?
107: @prop_index[prop.id] = prop
108: else
109: raise LimelightException.new("Duplicate id: #{prop.id}") if indexee != prop
110: end
111: end
Opens a FileChooser for a new Production. Loads the chosen Production.
# File lib/limelight/scene.rb, line 79
79: def open_chosen_production
80: options = { :title => "Open New Limelight Production", :description => "Limelight Production", :directory => @directory }
81: chosen_file = stage.choose_file(options) { |file| Util.is_limelight_scene?(file) || Util.is_limelight_production?(file) }
82: if chosen_file
83: @directory = File.dirname(chosen_file)
84: open_production(chosen_file)
85: end
86: end
Creates a new Producer to open the specified Production.
# File lib/limelight/scene.rb, line 90
90: def open_production(production_path)
91: Thread.new { Context.instance.studio.open(production_path) }
92: end