Add Tabs, Containers and Parameter

It´s possible to create parameters within your plugin which are exposed and direct available within Grid.

Define where a parameter should be exposed

A parameter needs to be linked to a container.

Plugin Tab

Each plugin has an own plugin related tab. To access this you need to use:

self.objectContainer

sp.BaseModule plugins are using self.moduleContainer instead


Existing Tab

self.cc.display

Extension Root

self.cc

self.cc is the root of any extension.


Custom Tab

def afterInit(self):
    myTab = self.addContainer("My New Tab", self.cc)

Sub Container

def afterInit(self):
    myTab  = self.addContainer("My New Tab", self.cc)
    
    mySubContainer1 = self.addContainer("Container1", myTab)
    mySubContainer2 = self.addContainer("Container2", myTab)

Adding a Parameter

def afterInit(self):
    self.objectContainer.addFloatParameter("Example Float", 0, 0, 100)

Adding a Parameter in Container

def afterInit(self):
    mySubContainer1 = self.addContainer("Container1", self.objectContainer)
    mySubContainer1.addFloatParameter("Example Float", 0, 0, 100)
    
    mySubContainer2 = self.addContainer("Container2", self.objectContainer)
    mySubContainer2.addFloatParameter("Example Float", 0, 0, 100)

Adding a Parameter in custom tab in Container

def afterInit(self):
    myTab  = self.addContainer("My New Tab", self.cc)

    mySubContainer1 = self.addContainer("Container1", myTab)
    mySubContainer1.addFloatParameter("Example Float", 0, 0, 100)
    
    mySubContainer2 = self.addContainer("Container2", myTab)
    mySubContainer2.addFloatParameter("Example Float", 0, 0, 100)

Last updated