mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-27 23:34:57 -04:00
actor: Minor style improvements
This commit is contained in:
parent
bb6976d558
commit
7c4e2660a4
@ -424,7 +424,7 @@ class Actor(DirectObject, NodePath):
|
|||||||
subpartDef.subset.isIncludeEmpty(), subpartDef.subset)
|
subpartDef.subset.isIncludeEmpty(), subpartDef.subset)
|
||||||
|
|
||||||
def __doListJoints(self, indentLevel, part, isIncluded, subset):
|
def __doListJoints(self, indentLevel, part, isIncluded, subset):
|
||||||
name = part.getName()
|
name = part.name
|
||||||
if subset.matchesInclude(name):
|
if subset.matchesInclude(name):
|
||||||
isIncluded = True
|
isIncluded = True
|
||||||
elif subset.matchesExclude(name):
|
elif subset.matchesExclude(name):
|
||||||
@ -437,9 +437,9 @@ class Actor(DirectObject, NodePath):
|
|||||||
part.outputValue(lineStream)
|
part.outputValue(lineStream)
|
||||||
value = lineStream.getLine()
|
value = lineStream.getLine()
|
||||||
|
|
||||||
print(' '.join((' ' * indentLevel, part.getName(), value)))
|
print(' '.join((' ' * indentLevel, name, value)))
|
||||||
|
|
||||||
for child in part.getChildren():
|
for child in part.children:
|
||||||
self.__doListJoints(indentLevel + 2, child, isIncluded, subset)
|
self.__doListJoints(indentLevel + 2, child, isIncluded, subset)
|
||||||
|
|
||||||
|
|
||||||
@ -1206,11 +1206,11 @@ class Actor(DirectObject, NodePath):
|
|||||||
|
|
||||||
return jointsA & jointsB
|
return jointsA & jointsB
|
||||||
|
|
||||||
def __getPartJoints(self, joints, pattern, partNode, subset, isIncluded):
|
def __getPartJoints(self, joints, pattern, part, subset, isIncluded):
|
||||||
""" Recursively walks the joint hierarchy to look for matching
|
""" Recursively walks the joint hierarchy to look for matching
|
||||||
joint names, implementing getJoints(). """
|
joint names, implementing getJoints(). """
|
||||||
|
|
||||||
name = partNode.getName()
|
name = part.name
|
||||||
if subset:
|
if subset:
|
||||||
# Constrain the traversal just to the named subset.
|
# Constrain the traversal just to the named subset.
|
||||||
if subset.matchesInclude(name):
|
if subset.matchesInclude(name):
|
||||||
@ -1218,10 +1218,10 @@ class Actor(DirectObject, NodePath):
|
|||||||
elif subset.matchesExclude(name):
|
elif subset.matchesExclude(name):
|
||||||
isIncluded = False
|
isIncluded = False
|
||||||
|
|
||||||
if isIncluded and pattern.matches(name) and isinstance(partNode, MovingPartBase):
|
if isIncluded and pattern.matches(name) and isinstance(part, MovingPartBase):
|
||||||
joints.append(partNode)
|
joints.append(part)
|
||||||
|
|
||||||
for child in partNode.getChildren():
|
for child in part.children:
|
||||||
self.__getPartJoints(joints, pattern, child, subset, isIncluded)
|
self.__getPartJoints(joints, pattern, child, subset, isIncluded)
|
||||||
|
|
||||||
def getJointTransform(self, partName, jointName, lodName='lodRoot'):
|
def getJointTransform(self, partName, jointName, lodName='lodRoot'):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user