Override/Disable ZUI display on a python component? - Grasshopper2024-03-28T18:40:58Zhttps://www.grasshopper3d.com/forum/topics/override-disable-zui-display-on-a-python-component?commentId=2985220%3AComment%3A1783674&xg_source=activity&feed=yes&xn_auth=noQuite late, bu in case someon…tag:www.grasshopper3d.com,2018-02-27:2985220:Comment:18893662018-02-27T10:14:28.779ZGiulio Piacentinohttps://www.grasshopper3d.com/profile/GiulioPiacentino
<p><span>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.</span></p>
<p><span>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.</span></p> Maybe a seperate question:
In…tag:www.grasshopper3d.com,2017-07-15:2985220:Comment:17841032017-07-15T18:09:11.984ZChris Hanleyhttps://www.grasshopper3d.com/profile/ChrisHanley
<p>Maybe a seperate question:</p>
<p>In Rhino 6, when using the gh_component sdk mode, for a python component, is this:</p>
<p>from ghpythonlib.componentbase import executingcomponent as component<br/>ghdoc = component.OnPingDocument(self)</p>
<p>The same as this in rhino 5, standard python component:<br/>ghdoc = ghenv.Component.OnPingDocument()</p>
<p>User object attached.</p>
<p>Maybe a seperate question:</p>
<p>In Rhino 6, when using the gh_component sdk mode, for a python component, is this:</p>
<p>from ghpythonlib.componentbase import executingcomponent as component<br/>ghdoc = component.OnPingDocument(self)</p>
<p>The same as this in rhino 5, standard python component:<br/>ghdoc = ghenv.Component.OnPingDocument()</p>
<p>User object attached.</p> Thanks for the suggestions! …tag:www.grasshopper3d.com,2017-07-14:2985220:Comment:17839632017-07-14T17:52:18.587ZChris Hanleyhttps://www.grasshopper3d.com/profile/ChrisHanley
<p>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).</p>
<p>Some of the code was modified from some stuff giulio and andrew H…</p>
<p>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).</p>
<p>Some of the code was modified from some stuff giulio and andrew H had posted.</p>
<p>While the cluster option is easiest, it loses it's "place" in the generated category list.</p>
<p>Anyway, this works in both R5 and R6, but I had some trouble compiling in R6, (<span>global name 'ghenv' is not defined). <a href="http://storage.ning.com/topology/rest/1.0/file/get/2769305343?profile=original" target="_self"><img width="721" src="http://storage.ning.com/topology/rest/1.0/file/get/2769305343?profile=RESIZE_1024x1024" width="721" class="align-full"/></a>Here is the current version if anyone could offer some suggestions for compiling this in R6, I would appreciate it!</span></p>
<p></p> It can easily achieve this go…tag:www.grasshopper3d.com,2017-07-14:2985220:Comment:17837562017-07-14T08:37:29.114Z0ddw589ypu3jvhttps://www.grasshopper3d.com/xn/detail/u_0ddw589ypu3jv
<p><img width="632" height="316" class="align-full" src="http://storage.ning.com/topology/rest/1.0/file/get/2769304941?profile=original"/>It can easily achieve this goal by c#(I'll try it with py)</p>
<p><img width="632" height="316" class="align-full" src="http://storage.ning.com/topology/rest/1.0/file/get/2769304941?profile=original"/>It can easily achieve this goal by c#(I'll try it with py)</p> That is difficult to maintain…tag:www.grasshopper3d.com,2017-07-14:2985220:Comment:17836742017-07-14T07:50:20.496ZAnders Holden Deleuranhttps://www.grasshopper3d.com/profile/AndersHoldenDeleuran
<p>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 <a href="https://discourse.mcneel.com/t/tutorial-creating-a-grasshopper-component-with-the-python-ghpy-compiler/38552" target="_blank">compiling GHPython components to a "proper" plugin</a>. I would think that this should allow you to disable ZUI's. Giulio can definitely…</p>
<p>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 <a href="https://discourse.mcneel.com/t/tutorial-creating-a-grasshopper-component-with-the-python-ghpy-compiler/38552" target="_blank">compiling GHPython components to a "proper" plugin</a>. 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.</p> you can override the attribut…tag:www.grasshopper3d.com,2017-07-14:2985220:Comment:17836002017-07-14T04:08:21.093Z0ddw589ypu3jvhttps://www.grasshopper3d.com/xn/detail/u_0ddw589ypu3jv
<p>you can <span>override</span> the attributes of the component,do not use <span>RenderVariableParameterUI</span> method</p>
<p>you can <span>override</span> the attributes of the component,do not use <span>RenderVariableParameterUI</span> method</p> That is a much simpler idea.…tag:www.grasshopper3d.com,2017-07-13:2985220:Comment:17837152017-07-13T21:30:14.828ZChris Hanleyhttps://www.grasshopper3d.com/profile/ChrisHanley
<p>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.</p>
<p>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!</p>
<p></p>
<p></p>
<p>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.</p>
<p>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!</p>
<p></p>
<p></p> if you're distributing them a…tag:www.grasshopper3d.com,2017-07-13:2985220:Comment:17835562017-07-13T18:26:20.816ZAndrew Heumannhttps://www.grasshopper3d.com/profile/AndrewHeumann
<p>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. </p>
<p>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. </p>