Moguri / BlenderPanda

Blender addon for integrating Panda3D
MIT License
76 stars 11 forks source link

Add user config to specify the path to the Python binary to use #34

Open Moguri opened 6 years ago

ZedCode commented 6 years ago

Yes please! I prefer to pin development versions of everything in virtualenv and need the ability to specify a path to the python binary.

Moguri commented 6 years ago

As a work around, you can launch Blender from the command line in the virtualenv, and BlenderPanda will use the Python binary from the virtualenv.

ZedCode commented 6 years ago

Thanks for the tip! Can't wait for it to be a UI option, as well!

Moguri commented 6 years ago

Initial support for this has been added via 96bfe7033be376ea28fad20c17474fa247b7ce08. This commit requires a project to exist (and have config files) to be able to set the Python binary path. I would still like to add the ability to set a path via addon preferences for when no project exists.

ZedCode commented 6 years ago

Awesome! I verified I was able to point to a custom Python install. There appears to be a weird issue when I open the blend file sometimes where I will need to switch project, otherwise it tells me I am not pointing to a valid Python path; despite the field being correctly populated. A project switch seemed to be required to fix the issue.

Since this is letting me attempt this pipeline for the first time, I opened up blender, made a large sphere, and opened in Panda3D. I see the resulting BAM file which seems to have (something?) in it, but in the viewport I am unable to see the object I created. Is there any primer for what is exported from blender to the BAM file so I can make sure I'm testing the right thing? (e: sorry if this is kind of a dumb question and somewhat beyond the cope of what you're really intending to help with at this stage)

Thanks for the awesome work!!

ZedCode commented 6 years ago

Oh, I failed at reading, never mind:

self.model = self.loader.loadModel('name_of_model_file.bam')
self.model.reparentTo(self.render)

This is what I was looking for.