{"action":"created","issue":{"url":"https://api.github.com/repos/H-uru/libhsplasma/issues/80","repository_url":"https://api.github.com/repos/H-uru/libhsplasma","labels_url":"https://api.github.com/repos/H-uru/libhsplasma/issues/80/labels{/name}","comments_url":"https://api.github.com/repos/H-uru/libhsplasma/issues/80/comments","events_url":"https://api.github.com/repos/H-uru/libhsplasma/issues/80/events","html_url":"https://github.com/H-uru/libhsplasma/pull/80","id":195054319,"number":80,"title":"Pf camera python bindings","user":{"login":"Lunanne","id":728708,"avatar_url":"https://avatars.githubusercontent.com/u/728708?v=3","gravatar_id":"","url":"https://api.github.com/users/Lunanne","html_url":"https://github.com/Lunanne","followers_url":"https://api.github.com/users/Lunanne/followers","following_url":"https://api.github.com/users/Lunanne/following{/other_user}","gists_url":"https://api.github.com/users/Lunanne/gists{/gist_id}","starred_url":"https://api.github.com/users/Lunanne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Lunanne/subscriptions","organizations_url":"https://api.github.com/users/Lunanne/orgs","repos_url":"https://api.github.com/users/Lunanne/repos","events_url":"https://api.github.com/users/Lunanne/events{/privacy}","received_events_url":"https://api.github.com/users/Lunanne/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-12-12T18:51:46Z","updated_at":"2016-12-13T02:25:48Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/H-uru/libhsplasma/pulls/80","html_url":"https://github.com/H-uru/libhsplasma/pull/80","diff_url":"https://github.com/H-uru/libhsplasma/pull/80.diff","patch_url":"https://github.com/H-uru/libhsplasma/pull/80.patch"},"body":"I'm not sure this is ready to merge yet but I'm looking for some feedback/have some questions:\r\n* Is the current work correct?\r\n* Do I only need to add bindings for any camera subclass with extra values or does inheritance not work?\r\n* How do I even test this?\r\n"},"comment":{"url":"https://api.github.com/repos/H-uru/libhsplasma/issues/comments/266617185","html_url":"https://github.com/H-uru/libhsplasma/pull/80#issuecomment-266617185","issue_url":"https://api.github.com/repos/H-uru/libhsplasma/issues/80","id":266617185,"user":{"login":"Hoikas","id":714455,"avatar_url":"https://avatars.githubusercontent.com/u/714455?v=3","gravatar_id":"","url":"https://api.github.com/users/Hoikas","html_url":"https://github.com/Hoikas","followers_url":"https://api.github.com/users/Hoikas/followers","following_url":"https://api.github.com/users/Hoikas/following{/other_user}","gists_url":"https://api.github.com/users/Hoikas/gists{/gist_id}","starred_url":"https://api.github.com/users/Hoikas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hoikas/subscriptions","organizations_url":"https://api.github.com/users/Hoikas/orgs","repos_url":"https://api.github.com/users/Hoikas/repos","events_url":"https://api.github.com/users/Hoikas/events{/privacy}","received_events_url":"https://api.github.com/users/Hoikas/received_events","type":"User","site_admin":false},"created_at":"2016-12-13T02:25:47Z","updated_at":"2016-12-13T02:25:47Z","body":"Good job cranking out a ton of annoying boilerplate. A few things...\r\n\r\n1. It looks like you did not add `plCameraBrain1` to the module definition in Module.cpp. This binding won't be available to Python if you don't do that.\r\n\r\n2. Your code will crash with an access violation on Windows. `plCameraBrain1` is a base class for many other camera brains. There is an issue that @branan knows way more about than I do, when any derived pyKeyedObject tries to access `self->fThis` of the base class, bad things happen. You must therefore cast all access to `self->fThis`. This is the basic pattern I used in pyActivatorConditionalObject:\r\n\r\n```\r\nstatic inline plActivatorConditionalObject* IConvertCond(pyActivatorConditionalObject* self) {\r\n    return plActivatorConditionalObject::Convert(IConvert((pyCreatable*)self));\r\n}\r\n\r\nstatic PyObject* pyActivatorConditionalObject_clearActivators(pyActivatorConditionalObject* self) {\r\n    IConvertCond(self)->clearActivators();\r\n    Py_INCREF(Py_None);\r\n    return Py_None;\r\n}\r\n```\r\n\r\n3. As mentioned above, there are lots of classes derived from `plCameraBrain1`, many of which have no additional added members. These would be quite easy to make bindings for very quickly.\r\n\r\n4. Look at some of the other classes like `pyObjInterface` and other users of `pyVector3` and `pyBitVector` and try to match their implementation. One of the most annoying things I have encountered in developing Korman is when the libHSPlasma interface differs for no readily apparent reason. It makes the whole \"duck typing\" thing pointless when general conventions are (slightly) different :sad:"}}
{"actor":{"display_login":"Hoikas"}}