def __init__(self, *args, **kwargs): BulletRigidBodyNode.__init__(self, *args, **kwargs) # Remove the shapes connection as this is built from the input # NodePath. #self.attributes. cnnctn = self.FindProperty('shapes') self.attributes.remove(cnnctn)
def __init__(self, *args, **kwargs): BulletRigidBodyNode.__init__(self, *args, **kwargs) # Remove the shapes connection as this is built from the input # NodePath. # self.attributes. cnnctn = self.FindProperty("shapes") self.attributes.remove(cnnctn)
def SetDefaultValues( self ): GameBulletRigidBodyNode.SetDefaultValues( self ) # Attempt to connect this node to the physics world if here is one. if base.scene.physicsWorld is not None: cnnctn = CnnctnList( 'Rigid Body', None, None, BW.attachRigidBody, None, BW.removeRigidBody, base.scene.physicsWorld ) cnnctn.Connect( self.data )
def OnDuplicate(self, origNp, dupeNp): # Duplicate doesn't work for rigid body nodes... foo = blt.BulletRigidBodyNode(origNp.getName()) bar = pm.NodePath(foo) bar.reparentTo(self.data.getParent()) self.data.detachNode() self.data = bar self.data.setTag(game.nodes.TAG_NODE_TYPE, TAG_EMBEDDED_BULLET_TRIANGLE_MESH_SHAPE) #self.SetupNodePath() #print 'DUPE: ', self.data #print 'new: ', dupeNp, ' : ', self.data #print 'from: ', dupeNp for shape in origNp.node().getShapes(): copShape = copy.copy(shape) self.data.node().addShape(copShape) BulletRigidBodyNode.OnDuplicate(self, origNp, dupeNp) return self.data
def __init__( self, *args, **kwargs ): GameBulletRigidBodyNode.__init__( self, *args, **kwargs ) i = self.attributes.index( self.FindProperty( 'shapes' ) ) self.AddAttributes( Attr( 'Num Shapes', int, BRBN.getNumShapes, w=False ), index=i ) self.AddAttributes( Attr( 'Debug Enabled', bool, BRBN.isDebugEnabled, BRBN.setDebugEnabled, w=False ) )
def __init__( self, *args, **kwargs ): GameBulletRigidBodyNode.__init__( self, *args, **kwargs ) i = self.attributes.index( self.FindProperty( 'shapes' ) ) self.AddAttributes( Attr( 'Num Shapes', int, BRBN.getNumShapes, w=False ), index=i ) self.AddAttributes( Attr( 'Debug Enabled', bool, BRBN.isDebugEnabled, BRBN.setDebugEnabled, w=False ) )