Grasshopper

algorithmic modeling for Rhino

I have a few "utility" python components that I would like to "disable/override" the ZUI display.  Is that possible?  I was looking in ghenv.Component.Attributes, but couldn't seem to find something related.

The component looks like this.  I don't want to restrict a users ability to right click and "show output "out" parameter, just prevent the ZUI from showing on this particular component.

Any suggestions would be greatly appreciated!

Views: 2351

Replies to This Discussion

if you're distributing them as user objects already, wouldn't the easiest thing be to wrap the python scripts in clusters? then you have full control of the inputs/outputs, no ZUI. 

That is a much simpler idea.  I always forget about that...as a matter of fact.... I think you recommended that solution to me to solve the issue of getting correct icons showing when hovering over an input on a python component.

I've just started the process of updating our custom components for rhino 6 and my OCD about the ZUI was driving me crazy.  I'll let it go and just dump them in a cluster!

you can override the attributes of  the component,do not use RenderVariableParameterUI method

That is difficult to maintain though (i.e. having to either manually or automate the wrapping/wiring of up the GHPython each time you update/issue it/them). Since you'll be updating for Rhino 6, I'd recommend looking into compiling GHPython components to a "proper" plugin. I would think that this should allow you to disable ZUI's. Giulio can definitely tell you more about this and maybe even add/edit features based on your feedback.

It can easily achieve this goal by c#(I'll try it with py)

Thanks for the suggestions!  The point of this particular component is to help users document the components they use in a definition.  Then, when another team member opens the document, they can see what components were used.  (If you work by yourself, this is probably not an issue, but in a team environment, it is helpful...beyond the built in GH mechanism that alerts if components are missing when you open the file).

Some of the code was modified from some stuff giulio and andrew H had posted.

While the cluster option is easiest, it loses it's "place" in the generated category list.

Anyway, this works in both R5 and R6, but I had some trouble compiling in R6, (global name 'ghenv' is not defined).  Here is the current version if anyone could offer some suggestions for compiling this in R6, I would appreciate it!

Attachments:

Maybe a seperate question:

In Rhino 6, when using the gh_component sdk mode, for a python component, is this:

from ghpythonlib.componentbase import executingcomponent as component
ghdoc = component.OnPingDocument(self)

The same as this in rhino 5, standard python component:
ghdoc = ghenv.Component.OnPingDocument()

User object attached.

Attachments:

Quite late, bu in case someone else is looking, "ghdoc" is the same in the two cases. ghenv should work now also in compiled components.

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service