Пример #1
0
	def onTool( self, tool ):
		name = tool.name
		if name == 'add_session':
			self.addSession()

		elif name == 'add_scheme':
			if not self.currentSession:
				logging.warn( 'no quest session specified' )
				return False
			requestSearchView( 
				info    = 'select quest scheme to add',
				context = 'quest_scheme',
				on_search = self.enumerateSelectableGraphs,
				on_selection = self.addSchemeEntry
			)

		elif name == 'remove_scheme':
			if not self.currentSession:
				logging.warn( 'no quest session specified' )
				return False
			for node in self.tree.getSelection():
				if isMockInstance( node, 'QuestSessionSchemeEntry' ):
					self.removeSchemeEntry( node )
				elif isMockInstance( node, 'QuestSession' ):
					self.removeSession( node )

		elif name == 'refresh':
			self.tree.rebuild()
Пример #2
0
	def getNodeChildren( self, node ):
		if node == self.getRootNode():
			return [ session for session in list(node.sessions.values()) ]
		elif isMockInstance( node, 'QuestSession' ):
			return [ entry for entry in list(node.schemeEntries.values()) ]
		elif isMockInstance( node, 'QuestSessionSchemeEntry' ):
			return []
Пример #3
0
 def onPropertyChanged(self, obj, fid, value):
     if isMockInstance(obj, 'SQNode'):
         self.treeRoutineNode.refreshNodeContent(obj)
         if self.currentNodeEditor:
             self.currentNodeEditor.onRefresh(obj)
     elif isMockInstance(obj, 'SQRoutine'):
         pass
Пример #4
0
	def __lt__(self, other):
		node0 = self.node
		node1 = hasattr(other, 'node') and other.node or None
		if not node1:
			return True
		if not node0:
			return False
		tree = self.treeWidget()
		group0 = isMockInstance( node0, 'EntityGroup' )
		group1 = isMockInstance( node1, 'EntityGroup' )
		if group0 != group1:
			if tree.sortOrder() == 0:
				if group0: return True
				if group1: return False
			else:
				if group0: return False
				if group1: return True
		proto0 = node0[ 'FLAG_PROTO_SOURCE' ]
		proto1 = node1[ 'FLAG_PROTO_SOURCE' ]
		if proto0 != proto1:
			if tree.sortOrder() == 0:
				if proto0: return True
				if proto1: return False
			else:
				if proto0: return False
				if proto1: return True
		return super( SceneGraphTreeItem, self ).__lt__( other )
Пример #5
0
 def __lt__(self, other):
     node0 = self.node
     node1 = hasattr(other, 'node') and other.node or None
     if not node1:
         return True
     if not node0:
         return False
     tree = self.treeWidget()
     group0 = isMockInstance(node0, 'EntityGroup')
     group1 = isMockInstance(node1, 'EntityGroup')
     if group0 != group1:
         if tree.sortOrder() == 0:
             if group0: return True
             if group1: return False
         else:
             if group0: return False
             if group1: return True
     proto0 = node0['FLAG_PROTO_SOURCE']
     proto1 = node1['FLAG_PROTO_SOURCE']
     if proto0 != proto1:
         if tree.sortOrder() == 0:
             if proto0: return True
             if proto1: return False
         else:
             if proto0: return False
             if proto1: return True
     return super(SceneGraphTreeItem, self).__lt__(other)
Пример #6
0
 def onPropertyChanged(self, obj, fid, value):
     if isMockInstance(obj, "SQNode"):
         self.treeRoutineNode.refreshNodeContent(obj)
         if self.currentNodeEditor:
             self.currentNodeEditor.onRefresh(obj)
     elif isMockInstance(obj, "SQRoutine"):
         pass
Пример #7
0
	def getNodeParent( self, node ):
		if node == self.getRootNode(): return None
		if isMockInstance( node, 'QuestSession' ):
			return self.getRootNode()
		elif isMockInstance( node, 'QuestSessionSchemeEntry' ):
			return node.session
		else:
			print(node)
			raise Exception( 'Unknown Quest Object Type' )
Пример #8
0
	def updateItemContent( self, item, node, **option ):
		pal = self.palette()
		defaultBrush = QColorF( .8,.8,.8 )
		name = None

		if isMockInstance( node, 'AnimatorTrackGroup' ):
			item.setText( 0, node.toString( node ) )
			item.setIcon( 0, getIcon('track_group') )
		elif isMockInstance( node, 'AnimatorClipSubNode' ):
			item.setText( 0, node.toString( node ) )
			item.setIcon( 0, getIcon(node.getIcon( node )) )
			item.setIcon( 1, getIcon('track_key_0') )
Пример #9
0
	def onItemSelectionChanged( self ):
		m = app.getModule( 'quest_session_manager' )
		for node in self.getSelection():
			if isMockInstance( node, 'QuestSession' ):
				session = node
				schemeEntry = None
				m.setCurrentSelection( session, schemeEntry )

			elif isMockInstance( node, 'QuestSessionSchemeEntry' ):
				session = node.session
				schemeEntry = node
				m.setCurrentSelection( session, schemeEntry )

			break
Пример #10
0
    def updateItemContent(self, item, node, **option):
        if node == self.owner: return
        # name = node.getName( node )
        # item.setText( 0, name or '<unknown>' )
        # item.setIcon( 0, getIcon( 'entity' ) )
        node.forceUpdate(node)
        if node['FLAG_PROTO_SOURCE']:
            item.setIcon(0, getIcon('proto'))
        elif node['PROTO_INSTANCE_STATE']:
            item.setIcon(0, getIcon('instance'))
        elif node['__proto_history']:
            item.setIcon(0, getIcon('instance-sub'))
        elif node['__prefabId']:
            item.setIcon(0, getIcon('instance-prefab'))
        elif isMockInstance(node, 'ProtoContainer'):
            item.setIcon(0, getIcon('instance-container'))
        elif isMockInstance(node, 'PrefabContainer'):
            item.setIcon(0, getIcon('instance-prefab-container'))
        else:
            item.setIcon(0, getIcon('obj'))
        item.setText(0, node.getFullName(node) or '<unnamed>')

        item.setText(1, node.getRootGroupName(node))

        item.setText(2, getMockClassName(node))

        #update icon
        if node.isVisible(node):
            item.setIcon(3, getIcon('entity_vis'))
        elif node.isLocalVisible(node):
            item.setIcon(3, getIcon('entity_parent_invis'))
        else:
            item.setIcon(3, getIcon('entity_invis'))

        if node.isEditLocked(node):
            if node.isLocalEditLocked(node):
                item.setIcon(4, getIcon('entity_lock'))
            else:
                item.setIcon(4, getIcon('entity_parent_lock'))
        else:
            item.setIcon(4, getIcon('entity_nolock'))

        layerName = node.getLayer(node)
        if isinstance(layerName, tuple):
            item.setText(5, '????')
        else:
            item.setText(5, layerName)

        item.setText(6, node.getComponentInfo(node) or '')
Пример #11
0
	def getItemFlags( self, node ):
		flags = {
			'editable' : False
		}
		if isMockInstance( node, 'QuestSession' ):
			flags[ 'editable' ] = True
		return flags
Пример #12
0
	def getItemFlags( self, node ):
		flags = {}
		if isMockInstance( node, 'AnimatorTrackGroup' ):
			flags['editable'] = True
		else:
			flags['editable'] = False
		return flags
Пример #13
0
	def updateItemContent( self, item, node, **option ):
		pal = self.palette()
		defaultBrush = QColorF( .8,.8,.8 )
		name = None
		if isMockInstance( node, 'Layer' ):
			style = defaultBrush
			item.setText( 0, node.name )
			if node.default :
				item.setIcon( 0, getIcon('layer_default') )
			else:
				item.setIcon( 0, getIcon('layer') )

			if node.editorVisible:
				item.setIcon( 1, getIcon('ok') )
			else:
				item.setIcon( 1, getIcon('no'))
				style = _BrushLayerHidden

			if not node.locked:
				item.setIcon( 2, getIcon('ok') )
			else:
				item.setIcon( 2, getIcon('no'))
				
			if node.editorSolo == 'solo':
				item.setIcon( 3, getIcon('ok') )
				style = _BrushLayerSolo
			else:
				item.setIcon( 3, getIcon(None) )
				if self.hasSoloLayer: style = _BrushLayerHidden

			item.setForeground( 0, style )
		else:
			item.setText( 0, '' )
			item.setIcon( 0, getIcon('normal') )
Пример #14
0
    def updateItemContent(self, item, node, **option):
        pal = self.palette()
        defaultBrush = QColorF(.8, .8, .8)
        name = None
        if isMockInstance(node, 'Layer'):
            style = defaultBrush
            item.setText(0, node.name)
            if node.default:
                item.setIcon(0, getIcon('layer_default'))
            else:
                item.setIcon(0, getIcon('layer'))

            if node.editorVisible:
                item.setIcon(1, getIcon('ok'))
            else:
                item.setIcon(1, getIcon('no'))
                style = _BrushLayerHidden

            if not node.locked:
                item.setIcon(2, getIcon('ok'))
            else:
                item.setIcon(2, getIcon('no'))

            if node.editorSolo == 'solo':
                item.setIcon(3, getIcon('ok'))
                style = _BrushLayerSolo
            else:
                item.setIcon(3, getIcon(None))
                if self.hasSoloLayer: style = _BrushLayerHidden

            item.setForeground(0, style)
        else:
            item.setText(0, '')
            item.setIcon(0, getIcon('normal'))
Пример #15
0
	def updateItemContent( self, item, node, **option ):
		name = None
		item.setData( 0, Qt.UserRole, 0 )

		if isMockInstance( node, 'EntityGroup' ):
			item.setText( 0, node.name or '<unnamed>' )
			item.setIcon( 0, getIcon('entity_group') )
			if node.isLocalVisible( node ):
				item.setIcon( 1, getIcon( 'entity_vis' ) )
			else:
				item.setIcon( 1, getIcon( 'entity_invis' ) )

			if node.isLocalEditLocked( node ):
				item.setIcon( 2, getIcon( 'entity_lock' ) )
			else:
				item.setIcon( 2, getIcon( 'entity_nolock' ) )
			item.setData( 0, Qt.UserRole, 1 )

		elif isMockInstance( node, 'Entity' ):
			if node['FLAG_PROTO_SOURCE']:
				item.setIcon( 0, getIcon('proto') )
			elif node['PROTO_INSTANCE_STATE']:
				item.setIcon( 0, getIcon('instance') )
			elif node['__proto_history']:
				item.setIcon( 0, getIcon('instance-sub') )
			elif isMockInstance( node, 'ProtoContainer' ):
				item.setIcon( 0, getIcon('instance-container') )
			else:
				item.setIcon( 0, getIcon('obj') )
			item.setText( 0, node.name or '<unnamed>' )
	
			layerName = node.getLayer( node )
			if isinstance( layerName, tuple ):
				item.setText( 3, '????' )
			else:
				item.setText( 3, layerName )
			# item.setText( 2, node.getClassName( node ) )
			# item.setFont( 0, _fontAnimatable )
			if node.isLocalVisible( node ):
				item.setIcon( 1, getIcon( 'entity_vis' ) )
			else:
				item.setIcon( 1, getIcon( 'entity_invis' ) )

			if node.isLocalEditLocked( node ):
				item.setIcon( 2, getIcon( 'entity_lock' ) )
			else:
				item.setIcon( 2, getIcon( 'entity_nolock' ) )
Пример #16
0
    def updateItemContent(self, item, node, **option):
        name = None
        item.setData(0, Qt.UserRole, 0)

        if isMockInstance(node, 'EntityGroup'):
            item.setText(0, node.name or '<unnamed>')
            item.setIcon(0, getIcon('entity_group'))
            if node.isLocalVisible(node):
                item.setIcon(1, getIcon('entity_vis'))
            else:
                item.setIcon(1, getIcon('entity_invis'))

            if node.isLocalEditLocked(node):
                item.setIcon(2, getIcon('entity_lock'))
            else:
                item.setIcon(2, getIcon('entity_nolock'))
            item.setData(0, Qt.UserRole, 1)

        elif isMockInstance(node, 'Entity'):
            if node['FLAG_PROTO_SOURCE']:
                item.setIcon(0, getIcon('proto'))
            elif node['PROTO_INSTANCE_STATE']:
                item.setIcon(0, getIcon('instance'))
            elif node['__proto_history']:
                item.setIcon(0, getIcon('instance-sub'))
            elif isMockInstance(node, 'ProtoContainer'):
                item.setIcon(0, getIcon('instance-container'))
            else:
                item.setIcon(0, getIcon('obj'))
            item.setText(0, node.name or '<unnamed>')

            layerName = node.getLayer(node)
            if isinstance(layerName, tuple):
                item.setText(3, '????')
            else:
                item.setText(3, layerName)
            # item.setText( 2, node.getClassName( node ) )
            # item.setFont( 0, _fontAnimatable )
            if node.isLocalVisible(node):
                item.setIcon(1, getIcon('entity_vis'))
            else:
                item.setIcon(1, getIcon('entity_invis'))

            if node.isLocalEditLocked(node):
                item.setIcon(2, getIcon('entity_lock'))
            else:
                item.setIcon(2, getIcon('entity_nolock'))
Пример #17
0
	def setTarget( self, target ):
		introspector = self.getIntrospector()
		self.target = target
		self.grid.setTarget( target )		
		if isMockInstance( target, 'Scene' ):
			for mgr in target.getManagers( target ).values():
				if mgr.FLAG_INTERNAL: continue
				editor = introspector.addObjectEditor( mgr )
Пример #18
0
	def updateItemContent( self, item, node, **option ):
		if node == self.getRootNode():
			return

		elif isMockInstance( node, 'QuestSession' ):
			item.setText( 0, node.name or '<NONAME>' )
			item.setIcon( 0, getIcon( 'folder' ) )
			
		elif isMockInstance( node, 'QuestSessionSchemeEntry' ):
			path = node.path
			name = os.path.basename( path )
			if name.endswith( '.quest.graphml' ):
				shortName = name[:-14]
			else:
				shortName, ext = os.path.splitext( name )
			item.setText( 0, shortName )
			item.setIcon( 0, getIcon( 'quest_scheme' ) )
Пример #19
0
	def setTarget( self, target ):
		introspector = self.getIntrospector()
		self.target = target
		self.grid.setTarget( target )		
		if isMockInstance( target, 'Scene' ):
			for mgr in target.getManagers( target ).values():
				if mgr.FLAG_INTERNAL: continue
				editor = introspector.addObjectEditor( mgr )
Пример #20
0
 def getNodeChildren(self, node):
     if isMockInstance(node, 'Game'):
         result = []
         for item in list(node.layers.values()):
             if item.name == '_GII_EDITOR_LAYER': continue
             result.append(item)
         return reversed(result)
     return []
Пример #21
0
	def getNodeChildren( self, node ):
		if isMockInstance( node, 'Game' ):
			result = []
			for item in node.layers.values():
				if item.name == '_GII_EDITOR_LAYER': continue
				result.append( item )
			return reversed( result )
		return []
Пример #22
0
    def setTarget(self, target):
        if not target.components: return
        introspector = self.getIntrospector()
        self.target = target
        self.grid.setTarget(target)
        if isMockInstance(target, 'Entity'):
            if target['__proto_history']:
                self.container.setProperty('proto', True)
            else:
                self.container.setProperty('proto', False)
            self.container.repolish()

            #setup proto tool
            protoState = target['PROTO_INSTANCE_STATE']
            if protoState:
                self.header.containerProto.show()
                protoPath = getProtoPath(target)
                self.header.labelProtoPath.setText(protoPath)
            else:
                self.header.containerProto.hide()

            prefabPath = target['__prefabId']
            if prefabPath:
                self.header.containerPrefab.show()
                self.header.labelPrefabPath.setText(prefabPath)
            else:
                self.header.containerPrefab.hide()

            #add component editors
            for com in list(target.getSortedComponentList(target).values()):
                if com.FLAG_INTERNAL: continue
                editor = introspector.addObjectEditor(
                    com,
                    context_menu='component_context',
                    editor_class=ComponentEditor,
                    show_after_add=False)

            self.buttonAddComponent = buttonAddComponent = QtWidgets.QToolButton(
            )
            buttonAddComponent.setObjectName('ButtonIntrospectorAddComponent')
            buttonAddComponent.setText('Add Component ...')
            buttonAddComponent.setSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                             QtWidgets.QSizePolicy.Fixed)
            buttonAddComponent.clicked.connect(self.onButtonAddComponent)
            introspector.addWidget(self.buttonAddComponent)

            self.buttonPasteComponent = buttonPasteComponent = QtWidgets.QToolButton(
            )
            buttonPasteComponent.setObjectName(
                'ButtonIntrospectorAddComponent')
            buttonPasteComponent.setText('Paste Component')
            buttonPasteComponent.setSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                               QtWidgets.QSizePolicy.Fixed)
            buttonPasteComponent.clicked.connect(self.onButtonPasteComponent)
            introspector.addWidget(self.buttonPasteComponent)

        self.restoreFoldState()
        self.updateAnimatorButton()
Пример #23
0
	def getCurrentClipGroup( self ):
		selection = self.treeClips.getSelection()
		if selection:
			node = selection[ 0 ]
			while node:
				if isMockInstance( node, 'AnimatorClipGroup' ):
					return node
				node = node.parentGroup
		return None
Пример #24
0
 def getNodeChildren(self, node):
     groups = []
     entries = []
     for entry in list(node.children.values()):
         if isMockInstance(entry, 'GizmoVisibilityGroup'):
             groups.append(entry)
         else:
             entries.append(entry)
     return groups + entries
Пример #25
0
	def updateItemContent( self, item, node, **option ):
		if isMockInstance( node, 'AnimatorClipGroup' ):
			# pal = self.palette()
			# defaultBrush = QColorF( .8,.8,.8 )
			# name = None
			item.setText( 0, node.name )
			item.setIcon( 0, getIcon('folder') )
		else:
			item.setText( 0, node.name )
			item.setIcon( 0, getIcon('clip') )
Пример #26
0
	def __lt__(self, other):
		node0 = self.node
		node1 = hasattr(other, 'node') and other.node or None
		if not node1:
			return True
		tree = self.treeWidget()

		# 	col = tree.sortColumn()
		t0 = isMockInstance( node0, 'AnimatorClipGroup' ) and 'group' or 'node'
		t1 = isMockInstance( node1, 'AnimatorClipGroup' ) and 'group' or 'node'

		if t1!=t0:			
			if tree.sortOrder() == 0:
				if t0 == 'group': return True
				if t1 == 'group': return False
			else:
				if t0 == 'group': return False
				if t1 == 'group': return True
		return super( AnimatorClipListTreeItem, self ).__lt__( other )
Пример #27
0
	def onClipSelectioChanged( self ):
		selection = self.treeClips.getSelection()
		if selection:
			clip = selection[0]
		else:
			clip = None
		if isMockInstance( clip, 'AnimatorClip' ):
			self.owner.setTargetClip( clip )
		else:
			#TODO
			pass
Пример #28
0
    def selectEditTarget(self, node):
        self.editingTarget = node
        self.nodePropEditor.setTarget(node)
        #check tool button state
        # isSystem = isMockInstance( node, 'EffectNodeParticleSystem' )
        if isMockInstance(node, 'EffectNodeParticleState'):
            self.window.containerScript.setVisible(True)
            self.paramPropEditor.setVisible(True)
            self.updateScript()

        elif isMockInstance(node, 'EffectScript'):
            self.window.containerScript.setVisible(True)
            self.paramPropEditor.setVisible(False)
            self.paramPropEditor.setTarget(None)
            self.updateScript()

        else:
            self.window.containerScript.setVisible(False)
            self.paramPropEditor.setVisible(False)
            self.paramPropEditor.setTarget(None)
Пример #29
0
 def updateItemContent(self, item, node, **option):
     if isMockInstance(node, 'Entity'):
         item.setText(0, getMockClassName(node))
         item.setText(1, node.getName(node))
     else:
         item.setText(0, getMockClassName(node))
         alias = node._alias
         if alias:
             item.setText(1, alias)
         else:
             item.setText(1, '-')
Пример #30
0
	def setTargetTileMapLayer( self, layer ):
		self.canvas.callMethod( 'editor', 'setTargetTileMapLayer', layer )
		self.canvas.updateCanvas()
		self.targetTileMapLayer = layer
		if isMockInstance( layer, 'CodeTileMapLayer' ):
			self.listCodeTile.show()
			self.listTerrain.hide()
			self.canvas.hide()
			self.listCodeTile.rebuild()
		else:
			self.listCodeTile.hide()
			self.listTerrain.show()
			self.canvas.show()
			self.listTerrain.rebuild()
Пример #31
0
	def getNodeChildren( self, node ):
		if isMockInstance( node, 'EntityGroup' ):
			output = []
			#groups
			for group in node.childGroups:
				output.append( group )
			#entities
			for ent in node.entities:
				if ( not ent.parent ) and ( not ( ent.FLAG_EDITOR_OBJECT or ent.FLAG_INTERNAL ) ):
					output.append( ent )
			# output = sorted( output, cmp = _sortEntity )
			return output

		else: #entity
			output = []
			for ent in node.children:
				if not ( ent.FLAG_EDITOR_OBJECT or ent.FLAG_INTERNAL ):
					output.append( ent )
			# output = sorted( output, cmp = _sortEntity )
			return output
Пример #32
0
    def getNodeChildren(self, node):
        if isMockInstance(node, 'EntityGroup'):
            output = []
            #groups
            for group in node.childGroups:
                output.append(group)
            #entities
            for ent in node.entities:
                if (not ent.parent) and (not (ent.FLAG_EDITOR_OBJECT
                                              or ent.FLAG_INTERNAL)):
                    output.append(ent)
            # output = sorted( output, cmp = _sortEntity )
            return output

        else:  #entity
            output = []
            for ent in node.children:
                if not (ent.FLAG_EDITOR_OBJECT or ent.FLAG_INTERNAL):
                    output.append(ent)
            # output = sorted( output, cmp = _sortEntity )
            return output
Пример #33
0
	def setTarget( self, target ):
		if not target.components: return
		introspector = self.getIntrospector()
		self.target = target
		self.grid.setTarget( target )		
		if isMockInstance( target, 'Entity' ):
			if target['__proto_history']:				
				self.container.setProperty( 'proto', True )
			else:
				self.container.setProperty( 'proto', False )
			self.container.repolish()
			#setup prefab tool
			protoState = target['PROTO_INSTANCE_STATE']
			if protoState:
				self.header.containerPrefab.show()
				protoPath = getProtoPath( target )
				self.header.labelPrefabPath.setText( protoPath )
			else:
				self.header.containerPrefab.hide()
			#add component editors
			for com in target.getSortedComponentList( target ).values():
				if com.FLAG_INTERNAL: continue
				editor = introspector.addObjectEditor(
						com,
						context_menu = 'component_context',
						editor_class = ComponentEditor
					)
				container = editor.getContainer()
			self.buttonAddComponent = buttonAddComponent = QtGui.QToolButton()
			buttonAddComponent.setObjectName( 'ButtonIntrospectorAddComponent' )
			buttonAddComponent.setText( 'Add Component ...' )
			buttonAddComponent.setSizePolicy( QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Fixed )
			buttonAddComponent.clicked.connect( self.onButtonAddComponent )
			introspector.addWidget( self.buttonAddComponent )

		self.restoreFoldState()
		self.updateAnimatorButton()
Пример #34
0
	def getNodeParent( self, node ): # reimplemnt for target node	
		if isMockInstance( node, 'Game' ):
			return None
		return _MOCK.game
Пример #35
0
	def getNodeChildren( self, node ):
		if isMockInstance( node, 'AnimatorClipGroup' ):
			children = node.getChildNodes( node )
			return [ child for child in children.values() ]
		else:
			return []
Пример #36
0
 def getNodeParent(self, node):  # reimplemnt for target node
     if isMockInstance(node, 'Game'):
         return None
     return _MOCK.game
Пример #37
0
	def onPropertyTargetChanged( self, obj ):
		if isMockInstance( obj, 'AnimatorKey' ):
				self.timeline.refreshKey( obj )
		elif isMockInstance( obj, 'AnimatorClipMarker' ):
				self.timeline.refreshMarker( obj )
		self.owner.onObjectEdited( obj )
Пример #38
0
	def createTrackItem( self, trackNode, **options ):
		if isMockInstance( trackNode, 'AnimatorEventTrack' ):
			return TimelineEventTrackItem()
		else:
			return TimelineTrackItem()
Пример #39
0
 def getClipTreeRoot(self):
     if self.targetClip and isMockInstance(self.targetClip,
                                           'AnimatorClipTree'):
         return self.targetClip.getTreeRoot(self.targetClip)
Пример #40
0
 def updateParamProxy(self):
     if isMockInstance(self.editingTarget, 'EffectNodeParticleState'):
         stateNode = self.editingTarget
         self.paramProxy = stateNode.buildParamProxy(stateNode)
         self.paramPropEditor.setTarget(self.paramProxy)
Пример #41
0
	def onItemChanged( self, item, col ):
		node = self.getNodeByItem( item )
		if isMockInstance( node, 'QuestSession' ):
			app.getModule( 'quest_session_manager' ).renameSession( node, item.text(0) )
		else:
			print('WTF?')
Пример #42
0
	def onItemActivated( self, item, col ):
		node = item.node
		if isMockInstance( node, 'QuestSessionSchemeEntry' ):
			path = node.path
			app.getModule( 'asset_browser' ).locateAsset( path )