174
Comment:
|
580
|
Deletions are marked like this. | Additions are marked like this. |
Line 3: | Line 3: |
To create a new Item3D widget use must inherit from EMItem3D (you will need to import this class from emitem3d). | To create a new Item3D widget use must inherit from EMItem3D (you will need to import this class from emitem3d). EMItem3D is a new style class so you don't need to multiply inherit from object. For exmaple: {{{#!highlight python class EMNewItem(EMItem3D): name = "myname" nodetype = "mynodetype" def __init__(self, parent=None, children=None, transform=None): if not Transform: transform=transform() EMItem3D.__init__(self,parent=parent,children=children,transform=transform) }}} |
Creating a new Item3D widget for use in EMScene3D
To create a new Item3D widget use must inherit from EMItem3D (you will need to import this class from emitem3d). EMItem3D is a new style class so you don't need to multiply inherit from object.
For exmaple: