-
Notifications
You must be signed in to change notification settings - Fork 113
Scene.draw etc. #1275
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
Scene.draw etc. #1275
Conversation
src/compas/scene/scene.py
Outdated
|
|
||
| return drawn_objects | ||
|
|
||
| redraw = draw |
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.
But to be honest, I would even vote for not keep this alias, to distinct it from the redraw pluggable
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.
Agree
|
do we even need the redraw pluggable? rhino's redraw can be triggered by the postdraw hook... |
src/compas/scene/context.py
Outdated
|
|
||
|
|
||
| @pluggable(category="drawing-utils") | ||
| def predraw(): |
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.
Docstrings to explain what these do?
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.
@Licini and please add them to __init__ and to the api docs.
src/compas/scene/context.py
Outdated
|
|
||
|
|
||
| @pluggable(category="drawing-utils") | ||
| def postdraw(): |
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.
If these are hooks, I would call them before_draw and after_draw
gonzalocasas
left a comment
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.
LGTM
|
@tomvanmele All adjusted, take a final look? |
@tomvanmele Changes you requested:
get_scene_object_clsso it will always be called.redrawtodraw, and kept it as alias.predrawandpostdraw.Data, as alternative solution to allow non-Data item in SceneObject #1274 .