def __init__(self): QtWidgets.QDockWidget.__init__(self) DocObject.__init__(self, None) self.mgr = None self.setWindowTitle("Object Properties") w = QtWidgets.QWidget(self) self.ui = Ui_ObjectProperties() self.ui.setupUi(w) self.ui.comboClass.setEditable(True) self.setWidget(w) self.entity = None self.valueItemByPropName = {} self.propertiesDelegate = ObjectPropertiesDelegate(self) self.propertiesModel = ObjectPropertiesModel(self) self.ui.propertiesView.setMouseTracking(True) self.ui.propertiesView.setModel(self.propertiesModel) self.ui.propertiesView.setItemDelegate(self.propertiesDelegate) self.ui.propertiesView.header().setDefaultAlignment( QtCore.Qt.AlignCenter) self.ui.propertiesView.clicked.connect(self.__propertyClicked) self.ui.lePropertyFilter.textChanged.connect(self.__filterProperties) self.ui.comboClass.currentIndexChanged.connect( self.__changeEntityClass) self.updateAvailableClasses() base.qtWindow.addDockWindow(self, "right") self.clearAll() self.setEnabled(False)
def __init__(self, mgr): DocObject.__init__(self, mgr.doc) self.mgr = mgr self.enabled = False self.activated = False self.properties = None self.entryIdx = 0 self.lastEntries = None
def __init__(self, doc): DocObject.__init__(self, doc) self.tools = [] self.funcs = {} self.currentTool = None self.selectTool = None self.connected = False self.toolGroup = None self.toolProperties = ToolProperties.getGlobalPtr() self.acceptGlobal('documentActivated', self.__onDocActivated) self.acceptGlobal('documentDeactivated', self.__onDocDeactivated)
def __init__(self, viewport): DocObject.__init__(self, viewport.doc) self.viewport = viewport self.enabled = False self.mouseSensitivity = 0.3 self.cameraSpeed = 500 # 1/16 feet per second self.timeToSpeed = 0.5 # seconds self.moveStart = 0.0 self.cameraRotateSpeed = 75.0 self.cameraSmooth = 0.7 self.slideFactor = 0.75 self.maxPitch = 90 self.minPitch = -90 self.diagonalFactor = math.sqrt(2.0) / 2.0 self.lastSpeeds = Vec3(0) self.moving = False self.cursor = QtGui.QCursor() self.cursor.setShape(QtCore.Qt.BlankCursor) tex = base.loader.loadTexture('resources/icons/editor-crosshair.png') tex.setMinfilter(SamplerState.FTLinear) tex.setMagfilter(SamplerState.FTLinear) crosshair = OnscreenImage(tex) crosshair.setTransparency(True) crosshair.setScale(0.04) crosshair.reparentTo(NodePath()) self.crosshair = crosshair self.inputState = {} self.addInput("forward", KeyBind.Forward3DView) self.addInput("reverse", KeyBind.Back3DView) self.addInput("slideLeft", KeyBind.Left3DView) self.addInput("slideRight", KeyBind.Right3DView) self.addInput("floatDown", KeyBind.Down3DView) self.addInput("floatUp", KeyBind.Up3DView) self.addInput("lookUp", KeyBind.LookUp3DView) self.addInput("lookDown", KeyBind.LookDown3DView) self.addInput("lookRight", KeyBind.LookRight3DView) self.addInput("lookLeft", KeyBind.LookLeft3DView) self.accept(KeyBinds.getPandaShortcut(KeyBind.FlyCam), self.handleZ) self.doc.taskMgr.add(self.__flyCamTask, 'flyCam')
def __init__(self, doc): DocObject.__init__(self, doc) self.viewports = [] self.activeViewport = None self.lastMouse = None self.acceptGlobal('documentActivated', self.__onDocActivated) self.acceptGlobal('documentDeactivated', self.__onDocDeactivated) self.tickTask = self.doc.taskMgr.add(self.__update, 'updateViewports', sort = -100) self.accept('mouse1', self.m1Down) self.accept('mouse1-up', self.m1Up) self.accept('mouse2', self.m2Down) self.accept('mouse2-up', self.m2Up) self.accept('mouse3', self.m3Down) self.accept('mouse3-up', self.m3Up) self.accept('wheel_down', self.wheelDown) self.accept('wheel_up', self.wheelUp) self.accept('f9', self.screenshot)
def __init__(self, doc): DocObject.__init__(self, doc) self.selectedObjects = [] self.selectionMins = Point3() self.selectionMaxs = Point3() self.selectionCenter = Point3() # We'll select groups by default self.selectionModes = {} self.funcs = {} self.selectionMode = None self.connected = False self.acceptGlobal('documentActivated', self.__onDocActivated) self.acceptGlobal('documentDeactivated', self.__onDocDeactivated) self.accept('objectTransformChanged', self.handleObjectTransformChange) self.accept('mapObjectBoundsChanged', self.handleMapObjectBoundsChanged) self.addSelectionModes() self.setSelectionMode(SelectionType.Groups)
def __init__(self, doc): DocObject.__init__(self, doc)
def __init__(self, mgr): DocObject.__init__(self, mgr.doc) self.enabled = False self.activated = False self.mgr = mgr self.options = None