class_docstr: Base camera class.
  
  The Camera describes the perspective from which a ViewBox views its
  subscene, and the way that user interaction affects that perspective.
  
  Most functionality is implemented in subclasses. This base class has
  no user interaction and causes the subscene to use the same coordinate
  system as the ViewBox.
  
  Parameters
  ----------
  interactive : bool
      Whether the camera processes mouse and keyboard events.
  flip : tuple of bools
      For each dimension, specify whether it is flipped.
  up : {'+z', '-z', '+y', '-y', '+x', '-x'}
      The direction that is considered up. Default '+z'. Not all
      camera's may support this (yet).
  parent : Node
      The parent of the camera.
  name : str
      Name used to identify the camera in the scene.
class_docstr_tok: ["Base","camera","class",".","The","Camera","describes","the","perspective","from","which","a","ViewBox","views","its","subscene",",","and","the","way","that","user","interaction","affects","that","perspective",".","Most","functionality","is","implemented","in","subclasses",".","This","base","class","has","no","user","interaction","and","causes","the","subscene","to","use","the","same","coordinate","system","as","the","ViewBox",".","Parameters","--","--","--","--","--","interactive",":","bool","Whether","the","camera","processes","mouse","and","keyboard","events",".","flip",":","tuple","of","bools","For","each","dimension",",","specify","whether","it","is","flipped",".","up",":","{","'+z","'",",","'-z","'",",","'+y","'",",","'-y","'",",","'+x","'",",","'-x","'","}","The","direction","that","is","considered","up",".","Default","'+z","'",".","Not","all","camera","'s","may","support","this","(","yet",")",".","parent",":","Node","The","parent","of","the","camera",".","name",":","str","Name","used","to","identify","the","camera","in","the","scene","."]
docstr: Set the view state of the camera
  
  Should be a dict (or kwargs) as returned by get_state. It can
  be an incomlete dict, in which case only the specified
  properties are set.
  
  Parameters
  ----------
  state : dict
      The camera state.
  **kwargs : dict
      Unused keyword arguments.
docstr_tok: ["Set","the","view","state","of","the","camera","Should","be","a","dict","(","or","kwargs",")","as","returned","by","get_state",".","It","can","be","an","incomlete","dict",",","in","which","case","only","the","specified","properties","are","set",".","Parameters","--","--","--","--","--","state",":","dict","The","camera","state",".","*","*","kwargs",":","dict","Unused","keyword","arguments","."]
code: def set_state(self, state=None, **kwargs):
      """Set the view state of the camera
  
      Should be a dict (or kwargs) as returned by get_state. It can
      be an incomlete dict, in which case only the specified
      properties are set.
  
      Parameters
      ----------
      state : dict
          The camera state.
      **kwargs : dict
          Unused keyword arguments.
      """
      state = state or {}
      state.update(kwargs)
  
      # In first pass, process tuple keys which select subproperties. This
      # is an undocumented feature used for selective linking of camera state.
      #
      # Subproperties are handled by first copying old value of the root
      # property, then setting the subproperty on this copy, and finally
      # assigning the copied object back to the camera property. There needs
      # to be an assignment of the root property so setters are called and
      # update is triggered.
      for key in list(state.keys()):
          if isinstance(key, tuple):
              key1 = key[0]
              if key1 not in state:
                  root_prop = getattr(self, key1)
                  # We make copies by passing the old object to the type's
                  # constructor. This needs to be supported as is the case in
                  # e.g. the geometry.Rect class.
                  state[key1] = root_prop.__class__(root_prop)
              nested_setattr(state[key1], key[1:], state[key])
  
      # In second pass, assign the new root properties.
      for key, val in state.items():
          if isinstance(key, tuple):
              continue
          if key not in self._state_props:
              raise KeyError(
                  "Not a valid camera state property %r" % key
              )
          setattr(self, key, val)
  
imports: from __future__ import division
  from ...util import keys
  from ..node import Node
  from ...visuals.transforms import STTransform, MatrixTransform, NullTransform, TransformCache
label_desc: Use image node_id 23 for calling the BaseCamera obj's underlying member method code with example usage: obj.set_state(state) without return types