Attach a new scene to an existing storyboard.
Params:
name - The name of the scene
parent - The storyboard to attach this current scene to.
976819
function(name, parent) {
      
      this.name = name;
      this.parent = parent;
      
      // if the parent has a custom context the child should inherit it
      if (parent._context && (parent._context._id !== parent._id)) {
        
        this._context = parent._context;
        if (this.scenes) {
          _.each(this.scenes , function(scene) {
            scene.attach(scene.name, this);
          }, this);
        }
      }
      return this;
    }
1272891
def createNode(self, cls, name, *args, **kw):
        
        m = self.findNode(name)
        if m is None:
            m = cls(name, *args, **kw)
            self.addNode(m)
        return m
1222524
def add_to_context(self, name, **attrs):
        
        context = self.get_context(name=name)
        attrs_ = context['context']
        attrs_.update(**attrs)
1061962
function (name) {
        var scene = this._scene;
        if (scene) {
            var nodeRepository = scene._nodeRepository;
            delete nodeRepository[this.name];
            nodeRepository[name] = this;
        }
        this.name = name;
    }
670733
def add_child(self, story_element_type=None, outline=None, name=None, description=None, **kwargs):
        '''
        
        '''
        if not outline:
            outline = self.outline
        if outline != self.outline:
            raise IntegrityError('Elements must be from the same outline!')
        tree_manipulation.send(
            sender=self.__class__,
            instance=self,
            action='add_child',
            target_node_type=story_element_type,
            target_node=None,
            pos=None
        )
        return super().add_child(
            story_element_type=story_element_type,
            outline=outline,
            name=name,
            description=description,
            **kwargs
        )
293434
def add_gripper(self, arm_name, gripper):
        
        if arm_name in self.grippers:
            raise ValueError("Attempts to add multiple grippers to one body")

        arm_subtree = self.worldbody.find(".//body[@name='{}']".format(arm_name))

        for actuator in gripper.actuator:

            if actuator.get("name") is None:
                raise XMLError("Actuator has no name")

            if not actuator.get("name").startswith("gripper"):
                raise XMLError(
                    "Actuator name {} does not have prefix 'gripper'".format(
                        actuator.get("name")
                    )
                )

        for body in gripper.worldbody:
            arm_subtree.append(body)

        self.merge(gripper, merge_body=False)
        self.grippers[arm_name] = gripper
540479
def add_child(name)
      child = self.class.new(name, self)
      yield child if block_given?
      children << child
      child
    end
26339
def add(self, name, obj=None):
        """"""
        if obj:
            text = '\n::\n\n' + indent(str(obj))
        else:
            text = views.view(name, self.dstore)
        if text:
            title = self.title[name]
            line = '-' * len(title)
            self.text += '\n'.join(['\n\n' + title, line, text])
758605
def story_root_for_new_outline(sender, instance, created, *args, **kwargs):
    '''
    
    '''
    if created and isinstance(instance, Outline):
        streeroot = StoryElementNode.add_root(outline=instance, story_element_type='root')
        streeroot.save()
        instance.refresh_from_db()
43194
def add_namespace(self, name, a_namespace):
        """"""
        # save a local copy of the namespace
        self.namespaces[name] = a_namespace
        # iterate through the namespace branding each of the options with the
        # name of the subparser to which they belong
        for k in a_namespace.keys_breadth_first():
            an_option = a_namespace[k]
            if not an_option.foreign_data:
                an_option.foreign_data = DotDict()
            an_option.foreign_data['argparse.owning_subparser_name'] = name
1360054
def addinnode(self, otherplus, node, objectname):
        
        # do a test for unique object here
        newelement = otherplus.dt[node.upper()]
413985
def _call_scene_func(gen, func_name, create_new_scene, *args, **kwargs):
        """"""
        for scn in gen:
            new_scn = getattr(scn, func_name)(*args, **kwargs)
            if create_new_scene:
                yield new_scn
            else:
                yield scn
1174290
def _assign_name(self, obj, name, shaders):
        
        if self._is_global(obj):
            assert name not in self._global_ns
            self._global_ns[name] = obj
        else:
            for shader in shaders:
                ns = self._shader_ns[shader]
                assert name not in ns
                ns[name] = obj
        self._object_names[obj] = name
384541
def add(name, options={}, &block)
      options = options[:_defaults].(name, options) if options[:_defaults] # FIXME: pipeline?
      base    = options[:_base]

      if options.delete(:inherit) and parent_property = get(name)
        base    = parent_property[:nested]
        options = parent_property.merge(options) # TODO: Definition#merge
      end

      if options[:_nested_builder]
        options[:nested] = build_nested(
          options.merge(
            _base: base,
            _name: name,
            _block: block,
          )
        )
      end

      # clean up, we don't want that stored in the Definition instance.
      [:_defaults, :_base, :_nested_builder, :_features].each { |key| options.delete(key) }

      self[name.to_s] = @definition_class.new(name, options)
    end
444759
def add_section(self, name):
        

        assert isinstance(name, str)

        # Skip existing sections
        for section in self.sections:
            if section.name == name:
                return section

        item = defaults["common"].copy()
        item["name"] = name

        item["itemType"] = "section"

        item = self.add_item(item)
        self.sections.append(item)

        return item
265538
def add_menu(self, name):
        
        if self.menubar is None:
            raise ValueError("No menu bar configured")
        return self.menubar.add_name(name)
265189
def add_dep(self, name, dep):
        
        logger.debug("name: %s, dep: %s", name, dep)

        if dep not in self._deps:
            self._deps[name] = dep