LoginSignup
2
0

More than 3 years have passed since last update.

Grasshopperのプラグインをつくる①

Posted at

セットアップから

Build Eventsを変えます。
Post-build event command line を以下のよう設定します。これでビルドするたびにGrasshopperのLibrariesのフォルダーに入ります。

Copy "$(TargetPath)" "$(TargetDir)$(ProjectName).gha"

Copy "$(TargetPath)" "%AppData%\Grasshopper\Libraries\$(ProjectName).gha"
Erase "$(TargetPath)"

この状態でビルドする。こんな感じに!
02_placenode.PNG

コンポーネントの基礎情報を入れる

myFirstComponent.cs
public LearningGHPluginsComponent()
    : base("myfirstComp", "MFC",
           "This is my first component",
           "GEL", "Tutorial")
     {
     }

コンポーネントのアイコンをつける

03_icon.PNG

Projectを右クリックして、Propertiesへ行く。
Resourceにimageを加える。

04_AddReference.PNG

myFirstComponent.cs
protected override System.Drawing.Bitmap Icon => Properties.Resources.reverse;

05_icon.PNG

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0