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:75df9841-8003-da23-10fb-844b23815784 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | B842:F1847:1EEB591:2791BA9:697F3F3D |
| html-safe-nonce | 1091141d260c714e36e40f9c87d9aa92f0bbbc8157bddc5bf204eabb4393ae4a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCODQyOkYxODQ3OjFFRUI1OTE6Mjc5MUJBOTo2OTdGM0YzRCIsInZpc2l0b3JfaWQiOiIzNDI5MzM3NDE0MDE3OTU3NjkzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | febfbfdf9096abd85fa992350d12e5c52fb385412c33b5a4e0168ac9ab2dfea9 |
| 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