from . import LayerView

def getMetaData():
    return { "name": "LayerView", "type": "View"  }

def register(app):
    app.getController().addView("LayerView", LayerView.LayerView())

from . import LayerView

def getMetaData():
    return { "name": "LayerView", "type": "View"  }

def register(app):
    return LayerView.LayerView()

Update plugin's register functions to return the object instance instead of performing the registration themselves
Update plugin's register functions to return the object instance instead of performing the registration themselves

  from . import LayerView
  
  def getMetaData():
      return { "name": "LayerView", "type": "View"  }
  
  def register(app):
-     app.getController().addView("LayerView", LayerView.LayerView())
+     return LayerView.LayerView()
  
Update plugin's register functions to return the object instance instead of performing the registration themselves
## Code Before:
from . import LayerView

def getMetaData():
    return { "name": "LayerView", "type": "View"  }

def register(app):
    app.getController().addView("LayerView", LayerView.LayerView())

## Instruction:
Update plugin's register functions to return the object instance instead of performing the registration themselves
## Code After:
from . import LayerView

def getMetaData():
    return { "name": "LayerView", "type": "View"  }

def register(app):
    return LayerView.LayerView()
