-
Notifications
You must be signed in to change notification settings - Fork 415
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
--[BE] Fix issues with bindings exposed by pybind11-stubgen #2430
Merged
Merged
Changes from 7 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
3ef0d22
--add missing attributes bindings
jturner65 f688ca0
--better docstring
jturner65 48dfeb7
--improve Configuration setters and add initializers
jturner65 544eba0
--add LightLayoutAttributes bindings
jturner65 2b7da70
--improve setter and add initializer masks
jturner65 32604a2
--add SemanticAttributes bindings
jturner65 777f571
--address some sensor binding stub errors
jturner65 d823467
--pull configuration bindings out of simbindings into their own file
jturner65 4a92a51
--add missing enums and docstrings
jturner65 f501547
--rearrange/cleanup
jturner65 8de34a9
--update magnum bindings to catch missing include
jturner65 bb7de79
--Separate scene node definition and extension to address circular dep
jturner65 fd5b3c7
--Temporarily remove link access binding since link lacks bindings
jturner65 a86c933
--Separate Render-related binds for creation and def for circular refs
jturner65 e2401b1
--address LightPositionModel enum in LightInfo ctor
jturner65 95be47d
--clang-tidy
jturner65 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -116,15 +116,15 @@ class LightInstanceAttributes : public AbstractAttributes { | |
|
||
/** | ||
* @brief Gets a smart pointer reference to a copy of the spotlight | ||
* configuration data for this light instance. | ||
* configuration data for this @ref LightInstanceAttributes. | ||
*/ | ||
std::shared_ptr<Configuration> getSpotlightConfiguration() const { | ||
return getSubconfigCopy<Configuration>("spot"); | ||
} | ||
|
||
/** | ||
* @brief Gets a smart pointer reference to the actual spotlight | ||
* configuration data for this light instance. | ||
* configuration data for this @ref LightInstanceAttributes. | ||
*/ | ||
std::shared_ptr<Configuration> editSpotlightConfiguration() { | ||
return editSubconfig<Configuration>("spot"); | ||
|
@@ -248,28 +248,31 @@ class LightLayoutAttributes : public AbstractAttributes { | |
} | ||
|
||
/** | ||
* @brief Add a light instance to this lighting layout | ||
* @brief Add a @ref LightInstanceAttributes to this lighting layout | ||
*/ | ||
void addLightInstance(LightInstanceAttributes::ptr _lightInstance) { | ||
this->setSubAttributesInternal<LightInstanceAttributes>( | ||
_lightInstance, availableLightIDs_, lightInstConfig_, ""); | ||
} | ||
|
||
/** | ||
* @brief Remove a light from this lighting layout | ||
* @brief Remove a named @ref LightInstanceAttributes from this lighting layout | ||
*/ | ||
LightInstanceAttributes::ptr removeLightInstance(const std::string& handle) { | ||
return this->removeNamedSubAttributesInternal<LightInstanceAttributes>( | ||
handle, availableLightIDs_, lightInstConfig_); | ||
} | ||
|
||
/** | ||
* @brief Retrieve a reference to the named @ref LightInstanceAttributes | ||
*/ | ||
LightInstanceAttributes::cptr getLightInstance(const std::string& handle) { | ||
return getNamedSubAttributesInternal<LightInstanceAttributes>( | ||
handle, lightInstConfig_); | ||
} | ||
|
||
/** | ||
* @brief Get the lighting instances for this layout | ||
* @brief Get all the @ref LightInstanceAttributes for this layout | ||
*/ | ||
std::vector<LightInstanceAttributes::cptr> getLightInstances() const { | ||
return this->getSubAttributesListInternal<LightInstanceAttributes>( | ||
|
@@ -278,7 +281,7 @@ class LightLayoutAttributes : public AbstractAttributes { | |
|
||
/** | ||
* @brief Return how many lights are in this light layout - number of | ||
* subconfigs in @ref lightInstConfig_ subconfig. | ||
* @ref LightInstanceAttributes in @ref lightInstConfig_ subconfig. | ||
*/ | ||
int getNumLightInstances() const { | ||
return this->getNumSubAttributesInternal("", lightInstConfig_); | ||
|
@@ -307,13 +310,13 @@ class LightLayoutAttributes : public AbstractAttributes { | |
std::string getObjectInfoInternal() const override; | ||
|
||
/** | ||
* @brief Smartpointer to created light instance configuration. The | ||
* @brief Smartpointer to created @ref LightInstanceAttributes configuration. The | ||
* configuration is created on LightLayoutAttributes construction. | ||
*/ | ||
std::shared_ptr<Configuration> lightInstConfig_{}; | ||
|
||
/** | ||
* @brief Deque holding all released IDs to consume for light instances when | ||
* @brief Deque holding all released IDs to consume for @ref LightInstanceAttributess when | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: |
||
* one is deleted, before using size of lightInstances_ container. | ||
*/ | ||
std::deque<int> availableLightIDs_; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if this actually works, as far as I remember the reason
def()
accepted a plainconst char*
was because it just referenced it without actually copying anywhere. So when retrieving documentation of those, you'll get a crash due to a dangling pointer.I might be wrong, but I personally hope it's not doing a string copy for every docstring. That'd be nasty.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mosra The
__init__.pyi
has an appropriate doc string listed :Would the problem be somewhere else?
__init__.pyi
also has duplicate entries for the const char* and const str& versions. I going to get rid of the const char* specializations.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, alright, then it works. I wasn't sure.