parameters: (self, obj, propName, val, fSelectObject=False, fUndo=True)
docstring: Update object property value and
          call update function if defined.
docstring_summary: Update object property value and
          call update function if defined.
docstring_tokens: Update object property value and call update function if defined .
function: def updateObjectPropValue(self, obj, propName, val, fSelectObject=False, fUndo=True):
          """
          Update object property value and
          call update function if defined.
          """
          objDef = obj[OG.OBJ_DEF]
          objProp = obj[OG.OBJ_PROP]
  
          propDef = objDef.properties[propName]
          propDataType = propDef[OG.PROP_DATATYPE]
  
          if propDataType != OG.PROP_BLIND:
              val = OG.TYPE_CONV[propDataType](val)
              oldVal = objProp[propName]
  
              if propDef[OG.PROP_FUNC] is None:
                  func = None
                  undoFunc = None
              else:
                  funcName = propDef[OG.PROP_FUNC][OG.FUNC_NAME]
                  funcArgs = propDef[OG.PROP_FUNC][OG.FUNC_ARGS]
  
                  # populate keyword arguments
                  kwargs = {}
                  undoKwargs = {}
                  for key in funcArgs.keys():
                      if funcArgs[key] == OG.ARG_VAL:
                          kwargs[key] = val
                          undoKwargs[key] = oldVal
                      elif funcArgs[key] == OG.ARG_OBJ:
                          undoKwargs[key] = obj
                          objProp[propName] = val
                          kwargs[key] = obj
                      elif funcArgs[key] == OG.ARG_NOLOADING:
                          kwargs[key] = fSelectObject
                          undoKwargs[key] = fSelectObject
                      else:
                          kwargs[key] = funcArgs[key]
                          undoKwargs[key] = funcArgs[key]
  
                  if isinstance(funcName, str):
                      if funcName.startswith('.'):
                          if self.editor:
                              func = Functor(getattr(self.editor, "objectHandler%s"%funcName), **kwargs)
                              undoFunc = Functor(getattr(self.editor, "objectHandler%s"%funcName), **undoKwargs)
                          else: # when loaded outside of LE
                              func = Functor(getattr(base, "objectHandler%s"%funcName), **kwargs)
                              undoFunc = Functor(getattr(base, ".objectHandler%s"%funcName), **undoKwargs)
                      else:
                          func = Functor(eval(funcName), **kwargs)
                          undoFunc = Functor(eval(funcName), **undoKwargs)
                  else:
                      func = Functor(funcName, **kwargs)
                      undoFunc = Functor(funcName, **undoKwargs)
  
                  # finally call update function
                  #func(**kwargs)
          else:
              oldVal = objProp[propName]
              func = None
              undoFunc = None
          action = ActionUpdateObjectProp(self.editor, fSelectObject, obj, propName, val, oldVal, func, undoFunc)
          if fUndo:
              self.editor.actionMgr.push(action)
          action()
  
          if self.editor:
              self.editor.fNeedToSave = True
              if fSelectObject:
                  base.direct.select(obj[OG.OBJ_NP], fUndo=0)
function_tokens: def updateObjectPropValue ( self , obj , propName , val , fSelectObject = False , fUndo = True ) : objDef = obj [ OG . OBJ_DEF ] objProp = obj [ OG . OBJ_PROP ] propDef = objDef . properties [ propName ] propDataType = propDef [ OG . PROP_DATATYPE ] if propDataType != OG . PROP_BLIND : val = OG . TYPE_CONV [ propDataType ] ( val ) oldVal = objProp [ propName ] if propDef [ OG . PROP_FUNC ] is None : func = None undoFunc = None else : funcName = propDef [ OG . PROP_FUNC ] [ OG . FUNC_NAME ] funcArgs = propDef [ OG . PROP_FUNC ] [ OG . FUNC_ARGS ] # populate keyword arguments kwargs = { } undoKwargs = { } for key in funcArgs . keys ( ) : if funcArgs [ key ] == OG . ARG_VAL : kwargs [ key ] = val undoKwargs [ key ] = oldVal elif funcArgs [ key ] == OG . ARG_OBJ : undoKwargs [ key ] = obj objProp [ propName ] = val kwargs [ key ] = obj elif funcArgs [ key ] == OG . ARG_NOLOADING : kwargs [ key ] = fSelectObject undoKwargs [ key ] = fSelectObject else : kwargs [ key ] = funcArgs [ key ] undoKwargs [ key ] = funcArgs [ key ] if isinstance ( funcName , str ) : if funcName . startswith ( '.' ) : if self . editor : func = Functor ( getattr ( self . editor , "objectHandler%s" % funcName ) , * * kwargs ) undoFunc = Functor ( getattr ( self . editor , "objectHandler%s" % funcName ) , * * undoKwargs ) else : # when loaded outside of LE func = Functor ( getattr ( base , "objectHandler%s" % funcName ) , * * kwargs ) undoFunc = Functor ( getattr ( base , ".objectHandler%s" % funcName ) , * * undoKwargs ) else : func = Functor ( eval ( funcName ) , * * kwargs ) undoFunc = Functor ( eval ( funcName ) , * * undoKwargs ) else : func = Functor ( funcName , * * kwargs ) undoFunc = Functor ( funcName , * * undoKwargs ) # finally call update function #func(**kwargs) else : oldVal = objProp [ propName ] func = None undoFunc = None action = ActionUpdateObjectProp ( self . editor , fSelectObject , obj , propName , val , oldVal , func , undoFunc ) if fUndo : self . editor . actionMgr . push ( action ) action ( ) if self . editor : self . editor . fNeedToSave = True if fSelectObject : base . direct . select ( obj [ OG . OBJ_NP ] , fUndo = 0 )