from direct.leveleditor.ObjectPalette import ObjectDoubleSmileys, ObjectPalette, ObjectProp, ObjectSmiley

This is just a sample code.

LevelEditor, ObjectHandler, ObjectPalette should be rewritten to be game specific.

You can define object template class inheriting ObjectBase to define properties shared by multiple object types. When you are defining properties you should specify their name, UI type, data type, update function, default value, and value range.

Then you need implement ObjectPalette class inheriting ObjectPaletteBase, and in the populate function you can define ObjectPalette tree structure.

Inheritance diagram

Inheritance diagram of direct.leveleditor.ObjectPalette

class ObjectDoubleSmileys(*args, **kw)[source]

Bases: direct.leveleditor.ObjectPalette.ObjectProp

__init__(self, *args, **kw)[source]
class ObjectPalette[source]

Bases: direct.leveleditor.ObjectPaletteBase.ObjectPaletteBase

class ObjectProp(*args, **kw)[source]

Bases: direct.leveleditor.ObjectPaletteBase.ObjectBase

__init__(self, *args, **kw)[source]
class ObjectSmiley(*args, **kw)[source]

Bases: direct.leveleditor.ObjectPalette.ObjectProp

__init__(self, *args, **kw)[source]