Open shyamd opened 5 years ago
Thinking of moving it to pymatgen. Monkey patched right now to facilitate an easy move
On Wed, Jul 17, 2019 at 08:12, Shyam Dwaraknath notifications@github.com wrote:
It appears the conversion of objects to scenes is monkey patched into place. There should be a better way to do this.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/materialsproject/crystaltoolkit/issues/76?email_source=notifications&email_token=AAWWWREO2CRUFDMUDLDXHGLP74ZG3A5CNFSM4IERPYIKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4G7YUILQ, or mute the thread https://github.com/notifications/unsubscribe-auth/AAWWWRFIV3OLHQR3ESVHQ3TP74ZG3ANCNFSM4IERPYIA .
Specifically the get_scene() method for anything that can be displayed in 3D...
On Wed, Jul 17, 2019 at 08:28, Matthew Horton mkhorton@lbl.gov wrote:
Thinking of moving it to pymatgen. Monkey patched right now to facilitate an easy move
On Wed, Jul 17, 2019 at 08:12, Shyam Dwaraknath notifications@github.com wrote:
It appears the conversion of objects to scenes is monkey patched into place. There should be a better way to do this.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/materialsproject/crystaltoolkit/issues/76?email_source=notifications&email_token=AAWWWREO2CRUFDMUDLDXHGLP74ZG3A5CNFSM4IERPYIKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4G7YUILQ, or mute the thread https://github.com/notifications/unsubscribe-auth/AAWWWRFIV3OLHQR3ESVHQ3TP74ZG3ANCNFSM4IERPYIA .
Any thoughts on this btw?
On Wed, Jul 17, 2019 at 08:29, Matthew Horton mkhorton@lbl.gov wrote:
Specifically the get_scene() method for anything that can be displayed in 3D...
On Wed, Jul 17, 2019 at 08:28, Matthew Horton mkhorton@lbl.gov wrote:
Thinking of moving it to pymatgen. Monkey patched right now to facilitate an easy move
On Wed, Jul 17, 2019 at 08:12, Shyam Dwaraknath notifications@github.com wrote:
It appears the conversion of objects to scenes is monkey patched into place. There should be a better way to do this.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/materialsproject/crystaltoolkit/issues/76?email_source=notifications&email_token=AAWWWREO2CRUFDMUDLDXHGLP74ZG3A5CNFSM4IERPYIKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4G7YUILQ, or mute the thread https://github.com/notifications/unsubscribe-auth/AAWWWRFIV3OLHQR3ESVHQ3TP74ZG3ANCNFSM4IERPYIA .
Yeah, i don't like the idea of putting the get_scene into pymatgen since that makes a bi-directional dependency.
My first thoughts are to make an Abstract Renderable
class that also implements a registry pattern. Then we can make adaptors that implement Renderable
and register themselves so that we can just something like Renderable.render(object)
without having to know what it is.
Yeah, I wasn’t intending to make crystal toolkit the dependency for that reason. It’d require moving the scene classes etc into a small standalone package I think.
The abstract Renderable is interesting
On Wed, Jul 17, 2019 at 08:53, Shyam Dwaraknath notifications@github.com wrote:
Yeah, i don't like the idea of putting the get_scene into pymatgen since that makes a bi-directional dependency.
My first thoughts are to make an Abstract Renderable class that also implements a registry pattern. Then we can make adaptors that implement Renderable and register themselves so that we can just something like Renderable.render(object) without having to know what it is.
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/materialsproject/crystaltoolkit/issues/76?email_source=notifications&email_token=AAWWWRDCDALZMJCM2ILT453P7456JA5CNFSM4IERPYIKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2E3JVY#issuecomment-512341207, or mute the thread https://github.com/notifications/unsubscribe-auth/AAWWWRC7UPKOSOUWLV23ST3P7456JANCNFSM4IERPYIA .
Update on this issue. No action has currently been taken, all get_scene()
methods for external objects are still in crystal_toolkit.renderables
, and patching happens on import of Crystal Toolkit. However, the idea proposed in this issue is still sound, and monkey-patching not ideal, so leaving the issue open to re-visit in future.
It appears the conversion of objects to scenes is monkey patched into place. There should be a better way to do this.