Title: [Binding/Sofa.Config] Add Sofa.future & Sofa.Config by damienmarchal · Pull Request #184 · sofa-framework/SofaPython3 · GitHub
Open Graph Title: [Binding/Sofa.Config] Add Sofa.future & Sofa.Config by damienmarchal · Pull Request #184 · sofa-framework/SofaPython3
X Title: [Binding/Sofa.Config] Add Sofa.future & Sofa.Config by damienmarchal · Pull Request #184 · sofa-framework/SofaPython3
Description: Implement a control mecanism to activate/de-activate feature of the SofaPython3 binding so we have more freedom to experiment. Example of use (taken from PR #173): from Sofa.Lifecycle import __feature__ def createScene(root): with __new_feature__("object_auto_init",True): root.addObject("MechanicalObject", position=[12,3]) # init() is now called automatically The mechanisme is composed of three parts: SofaPython3::Lifecycle (the c++ part) SofaPython3::Binding::Lifecycle (the python binding of the c++ Config) To add a new feature: In binding/Sofa/package/lifecycle.py, add you feature at the begnining as indicated in the file. Then in your c++ code you can then test if the feature is activated by doing if( sofapython3::lifecycle::features::get("global_auto_init") ) .... Or in your python code you can also test if the feature is activated by doing import Sofa.Lifecycle if Sofa.Lifecycle.has_feature("global_auto_init"): print("The feature is activated")
Open Graph Description: Implement a control mecanism to activate/de-activate feature of the SofaPython3 binding so we have more freedom to experiment. Example of use (taken from PR #173): from Sofa.Lifecycle import __feat...
X Description: Implement a control mecanism to activate/de-activate feature of the SofaPython3 binding so we have more freedom to experiment. Example of use (taken from PR #173): from Sofa.Lifecycle import __feat...
Opengraph URL: https://github.com/sofa-framework/SofaPython3/pull/184
X: @github
Domain: patch-diff.githubusercontent.com
| route-pattern | /:user_id/:repository/pull/:id/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:b6c3e505-de2a-edcf-b402-4f152e808efa |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | E69A:38B3D7:81FD1A2:A84DDCE:697E7918 |
| html-safe-nonce | 471f371737400a5c08d4aa5e2a1a6ef95746facba7d8f20233e9818b43e2e909 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNjlBOjM4QjNENzo4MUZEMUEyOkE4NEREQ0U6Njk3RTc5MTgiLCJ2aXNpdG9yX2lkIjoiMzMxMjUxMTUxNjEzMjkzMTg2NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 64b145cbe5bbc89ef53d54d1b25ae2c1784cfdd171719d47a845f6b4f78dcd67 |
| hovercard-subject-tag | pull_request:734955897 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,checks,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/sofa-framework/SofaPython3/pull/184/checks |
| twitter:image | https://avatars.githubusercontent.com/u/12644882?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/12644882?s=400&v=4 |
| og:image:alt | Implement a control mecanism to activate/de-activate feature of the SofaPython3 binding so we have more freedom to experiment. Example of use (taken from PR #173): from Sofa.Lifecycle import __feat... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 60279d4097367e16897439d16d6bbe4180663db828c666eeed2656988ffe59f6 |
| turbo-cache-control | no-preview |
| go-import | github.com/sofa-framework/SofaPython3 git https://github.com/sofa-framework/SofaPython3.git |
| octolytics-dimension-user_id | 11028508 |
| octolytics-dimension-user_login | sofa-framework |
| octolytics-dimension-repository_id | 260159147 |
| octolytics-dimension-repository_nwo | sofa-framework/SofaPython3 |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 260159147 |
| octolytics-dimension-repository_network_root_nwo | sofa-framework/SofaPython3 |
| turbo-body-classes | logged-out env-production page-responsive full-width full-width-p-0 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7c85641c598ad130c74f7bcc27f58575cac69551 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width