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/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:169573c2-f4a7-c938-86c2-728e4a37e802 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | B258:2D4182:A0D276:CD496E:697E72EC |
| html-safe-nonce | 6a4b987b3ae8d73288ab0f93f16a2a257275bfba1a54ccd039b518a1dd923271 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMjU4OjJENDE4MjpBMEQyNzY6Q0Q0OTZFOjY5N0U3MkVDIiwidmlzaXRvcl9pZCI6Ijc1OTIwNDU4MzA3MDIyNjUwNjgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 53338395002263dda0ac1921751240f8c434ace3f4e44b94ea1d74415b7d7196 |
| hovercard-subject-tag | pull_request:734955897 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,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/files |
| 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 |
| diff-view | unified |
| 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 |
| disable-turbo | true |
| 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