bgelogic.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:bge-logic-nodes-add-on 作者: thepgi 项目源码 文件源码
def evaluate(self):
        armature = self.get_parameter_value(self.armature)
        bone_name = self.get_parameter_value(self.bone_name)
        if armature is LogicNetworkCell.STATUS_WAITING: return
        if bone_name is LogicNetworkCell.STATUS_WAITING: return
        self._set_ready()
        if none_or_invalid(armature): return
        if not bone_name: return
        channel = None
        if (armature is self._prev_armature) and (bone_name == self._prev_bone):
            channel = self._channel
        else:
            self._prev_armature = armature
            self._prev_bone = bone_name
            self._channel = armature.channels[bone_name]
            channel = self._channel
        if channel.rotation_mode is bge.logic.ROT_MODE_QUAT:
            self._rot[:] = mathutils.Quaternion(channel.rotation_quaternion).to_euler()
        else:
            self._rot[:] = channel.rotation_euler
        self._pos[:] = channel.location
        self._sca[:] = channel.scale
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号