Skip to content
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

Davidl/headless #1

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Davidl/headless #1

wants to merge 3 commits into from

Conversation

davidandresleon
Copy link

-slightly modified init.py to include Rhino module in globals in order to be able to call it from another context
-uploaded gh-headless example based on RunHelper example.

@sbaer
Copy link
Member

sbaer commented Nov 18, 2019

@davidandresleon why did you have to modify init.py? Were things not working without this modification?

@davidandresleon
Copy link
Author

@sbaer I sure tried to avoid it, but that´s the only way I could make Grasshopper load headless, by bringing the Rhino module that loads RhinoCore in init.py into the scope that imports Grasshopper.

I believe the changes made in init.py are not substantial enough to mess with current functionality, but of course I could be wrong.

If you know a better way to approach this or feel uneasy about changing init.py, please feel free to reject this PR and let me know!

@sbaer
Copy link
Member

sbaer commented Nov 18, 2019

My only issue with this is that I don't understand why it works one way and not the other.

@davidandresleon
Copy link
Author

davidandresleon commented Nov 19, 2019

I wish I could tell you why... I only know it works only if I a) reference the Rhino module set as global in __init__. py(as in the PR) or b) initialize RhinoCore from the example file instead of __init__. py. I'll try to find out more, any help ideas would be very much welcome.

@davidandresleon
Copy link
Author

one more thing. when running the script with the current init, it the issue arrises when calling Grasshopper.Kernel.GH_DocumentIO() which is the first call to the Grasshopper module

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants