SimpleCommandPlugin now gets the dimension and selection

This commit is contained in:
David Vierra 2016-06-24 05:02:41 -10:00
parent 5afb3b276b
commit f0c509d82f
2 changed files with 5 additions and 3 deletions

View File

@ -89,9 +89,11 @@ class SimpleCommandPlugin(CommandPlugin):
if result == QtGui.QDialog.Accepted: if result == QtGui.QDialog.Accepted:
command = SimpleRevisionCommand(self.editorSession, self.displayName) command = SimpleRevisionCommand(self.editorSession, self.displayName)
with self.editorSession.beginCommand(command): with self.editorSession.beginCommand(command):
self.perform(self.editorSession.worldEditor, dialog.getOptions()) self.perform(self.editorSession.currentDimension,
self.editorSession.currentSelection,
dialog.getOptions())
def perform(self, world, options): def perform(self, dimension, selection, options):
raise NotImplementedError raise NotImplementedError

View File

@ -90,7 +90,7 @@ class SimpleOptionsDemo(SimpleCommandPlugin):
} }
] ]
def perform(self, world, options): def perform(self, dimension, selection, options):
lines = [] lines = []
for key in [ for key in [
'myIntOption', 'myIntOption',