Grasshopper

algorithmic modeling for Rhino

Hello everybody.

I have a trouble. To begin programming components for Grasshoper I wrote my first "HelloWorld" component. I downloaded add-on for VS 2010 and built my component. In the "bin" directory I found *.gha file and put it into the "Special Folder" in Grasshoper.

Following instructions my component should appear in the "Extra" tab. But I have neither "Extra" tab, nor my component. But the *.gha file in use. I couldn't move or remove it from the "Special Foolder".

In the attachments *.gha file and my project.

Any ideas?

Thanks in advance!

Views: 507

Attachments:

Replies to This Discussion

Hi Anton,

the code seems to be fine, I think the problem is with the icon image. I see the following error in the Rhino command line when this gha file is being loaded:

An error occured during GHA assembly loading:
Path: C:\Users\David\AppData\Roaming\Grasshopper\Libraries\TestGras.gha
Exception System.InvalidOperationException:
Message: Bitmap pixel format is not supported: Format8bppIndexed

I recommend switching to a 32 bit-per-pixel png file (8 bits for Red, Green, Blue and Alpha). I'll see why this error happens and whether I can fix it though so that indexed images are supported in future releases.

--

David Rutten

david@mcneel.com

Poprad, Slovakia

I fixed it so that (hopefully) all possible pixelformats are now supported. They are still internally converted into 32BppArgb (and eventually 32BppPArgb for display performance pursposes, but there's nothing you can do about that) so to speed up loading I still recommend using full alpha png files.

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Hi David,

Thank you very much! I've changed file format to png, following your advice and everything is working.

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