This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #from setuptools import setup | |
| from direct.showutil.dist import setup | |
| setup( | |
| name="asset_flipper", | |
| options = { | |
| 'build_apps': { | |
| 'copy_paths': ['.'], | |
| 'exclude_paths': ['build/*', 'setup.py', 'requirements.txt', 'wheels/*', '*.swp'], | |
| 'gui_apps': { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def debug_model(self, actor): | |
| """ | |
| [14:24] <rdb> wezu: GeomVertexData has a getTransformTable(); | |
| TransformTable has a getTransform(n), which returns | |
| JointVertexTransform, which has getJoint() | |
| [14:24] <rdb> The n in getTransform(n) is the index, I think. | |
| """ | |
| mesh=actor._Actor__geomNode | |
| #mesh.ls() returns: | |
| #PandaNode character S:(ShaderAttrib) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| >>> from panda3d.core import * | |
| >>> from direct.showbase import ShowBase | |
| >>> base=ShowBase.ShowBase() | |
| Known pipe types: | |
| wglGraphicsPipe | |
| (all display modules loaded.) | |
| >>> walkmesh=loader.load_model('level_walkmesh.bam') | |
| >>> walkmesh.ls() | |
| PandaNode walkmesh | |
| GeomNode walkmesh (4 geoms) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from panda3d.core import * | |
| from direct.showbase.DirectObject import DirectObject | |
| __all__ = ['CameraControler'] | |
| class CameraControler (DirectObject): | |
| def __init__(self, pos=(0,0,3.0), offset=(0, 12, 12), speed=1.0, zoom_speed=1.0): | |
| self.node = render.attach_new_node("node") | |
| self.node.set_pos(pos) | |
| self.gimbal = self.node.attach_new_node("gimbal") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os, sys | |
| def find_camel_functions(sourcefile): | |
| return_dict={'__file__':set()} | |
| current_set=return_dict['__file__'] | |
| with open(sourcefile, 'r') as f: | |
| for line in f: | |
| if line.strip().startswith('class '): | |
| class_name=line.strip().split(' ')[1] | |
| if '(' in class_name: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Traceback (most recent call last): | |
| File "main.py", line 1, in <module> | |
| File "C:\Panda3D-1.10.0-x64-py36\python\lib\importlib\_bootstrap.py", line 961, in _find_and_load | |
| return _find_and_load_unlocked(name, import_) | |
| File "C:\Panda3D-1.10.0-x64-py36\python\lib\importlib\_bootstrap.py", line 950, in _find_and_load_unlocked | |
| module = _load_unlocked(spec) | |
| File "C:\Panda3D-1.10.0-x64-py36\python\lib\importlib\_bootstrap.py", line 655, in _load_unlocked | |
| spec.loader.exec_module(module) | |
| File "C:\Panda3D-1.10.0-x64-py36\python\lib\importlib\_bootstrap.py", line 798, in exec_module | |
| exec(code, module.__dict__) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| PS C:\p3d\quest_for_fire_py3> py -3 setup.py build_apps | |
| running build_apps | |
| Building platforms: win_amd64 | |
| creating C:\p3d\quest_for_fire_py3\build | |
| creating C:\p3d\quest_for_fire_py3\build\win_amd64 | |
| Collecting panda3d (from -r ./requirements.txt (line 2)) | |
| Saved c:\p3d\quest_for_fire_py3\build\__whl_cache__\panda3d-1.10.0.dev1101+g923ff14-cp36-cp36m-win_amd64.whl | |
| Successfully downloaded panda3d | |
| Traceback (most recent call last): | |
| File "setup.py", line 14, in <module> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from panda3d.core import * | |
| from panda3d.bullet import * | |
| __all__ = ['Detector'] | |
| class Detector: | |
| def __init__(self): | |
| self.world_node = render.attach_new_node('World') | |
| self.world = BulletWorld() | |
| self.mask={'walkmesh':BitMask32.bit(1), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| PS C:\Panda3D-1.10.0-x64-py36\samples\asteroids> py -3 setup.py build_apps | |
| running build_apps | |
| Building platforms: manylinux1_x86_64,macosx_10_6_x86_64,win_amd64 | |
| creating C:\Panda3D-1.10.0-x64-py36\samples\asteroids\build | |
| creating C:\Panda3D-1.10.0-x64-py36\samples\asteroids\build\manylinux1_x86_64 | |
| Collecting panda3d (from -r ./requirements.txt (line 2)) | |
| Saved c:\panda3d-1.10.0-x64-py36\samples\asteroids\build\__whl_cache__\panda3d-1.10.0.dev1101+g923ff14-cp36-cp36m-many | |
| linux1_x86_64.whl | |
| Successfully downloaded panda3d | |
| There are some missing modules: ['__builtin__', '_hashlib', '_posixsubprocess', 'panda3d.core', 'panda3d.direct', 'selec |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| self.accept('1', self.change_filter_setting, ['ao', 'bias', -0.1]) | |
| self.accept('2', self.change_filter_setting, ['ao', 'bias', 0.1]) | |
| self.accept('3', self.change_filter_setting, ['ao', 'sample_rad', -0.1]) | |
| self.accept('4', self.change_filter_setting, ['ao', 'sample_rad', 0.1]) | |
| self.accept('5', self.change_filter_setting, ['ao', 'intensity', -0.1]) | |
| self.accept('6', self.change_filter_setting, ['ao', 'intensity', 0.1]) | |
| self.accept('7', self.change_filter_setting, ['ao', 'scale', -0.1]) | |
| self.accept('8', self.change_filter_setting, ['ao', 'scale', 0.1]) | |
| self.accept('9', self.change_filter_setting, ['ao', 'fade_distance', -1.0]) | |
| self.accept('0', self.change_filter_setting, ['ao', 'fade_distance', 1.0]) |