CAD&BIM

반응형

Canvas background 색 변경하기

 

 

https://discourse.mcneel.com/t/hide-canvas-grid-in-grasshopper-and-change-the-color-to-white/65753

 

Hide canvas grid in grasshopper and change the color to white

Hi, I want to hidethe grid in grasshopper, and work on a white background. Is it possible?

discourse.mcneel.com

it is possible, a lot of canvas properties are available via the Grasshopper SDK at runtime and they can also be adjusted in the settings file. The problem editing the settings file is that it only works if Grasshopper is not running. Incidentally, the Canvas background colour is grey, not beige. If it looks beige then your screen is not properly calibrated.

To edit the relevant settings file, do the following:

Start Rhino and Grasshopper.
In the Grasshopper File menu, go to the Special Folders sub menu and pick the Settings folder.
Close all instances of Rhino and Grasshopper.
Open grasshopper_gui.xml in a plain text editor such as NotePad.
You can modify values, but note that certain values are not possible and may result in weird crashes.
Colours are always specified as 4 semi-colon separated numbers. The first number is the alpha value, then red, green and blue. Valid values for each are 0~255.
Most settings in this file deal with the colours of component capsules. However there are also some settings that start with "canvas_" and "wire_". These settings affect the canvas and connector wires.
Once you've saved the xml file with some changes, restart Rhino+Grasshopper to see the difference.

I once posted a GH file with a VB component which could modify the settings in real-time but I can't find it now.

 

가능합니다. 런타임에 Grasshopper SDK를 통해 많은 캔버스 속성을 사용할 수 있으며 설정 파일에서 조정할 수도 있습니다. 설정 파일 편집의 문제는 Grasshopper가 실행되고 있지 않을 때만 작동한다는 것입니다. 덧붙여서 캔버스 배경색은 베이지색이 아닌 회색입니다. 베이지색으로 보이면 화면이 제대로 보정되지 않은 것입니다.

관련 설정 파일을 편집하려면 다음을 수행하십시오.

Rhino와 Grasshopper를 시작하세요.
Grasshopper 파일 메뉴에서 특수 폴더 하위 메뉴로 이동하여 설정 폴더를 선택하십시오.
Rhino 및 Grasshopper의 모든 인스턴스를 닫습니다.
메모장과 같은 일반 텍스트 편집기에서 Grasshopper_gui.xml을 엽니다.
값을 수정할 수 있지만 특정 값은 불가능하며 이상한 충돌이 발생할 수 있습니다.
색상은 항상 4개의 세미콜론으로 구분된 숫자로 지정됩니다. 첫 번째 숫자는 알파 값이고 다음은 빨간색, 녹색, 파란색입니다. 각각의 유효한 값은 0~255입니다.
이 파일의 대부분의 설정은 구성 요소 캡슐의 색상을 다룹니다. 그러나 "canvas_" 및 "wire_"로 시작하는 일부 설정도 있습니다. 이러한 설정은 캔버스 및 커넥터 와이어에 영향을 줍니다.
일부 변경 사항이 있는 xml 파일을 저장했으면 Rhino+Grasshopper를 다시 시작하여 차이점을 확인하세요.

한 번 실시간으로 설정을 수정할 수 있는 VB 구성 요소가 있는 GH 파일을 게시했지만 지금은 찾을 수 없습니다.

 

Grasshopper C#으로 설명해 놓은 사이트이다.

http://james-ramsden.com/change-the-colour-of-the-grasshopper-canvas/

 

Change the colour of the Grasshopper canvas - James Ramsden

To change the colour of the Grasshopper canvas, Johannes Braumann very helpfully provided a C# script. However, the script is now out of date with recent builds of Grasshopper, having been published in 2010. Below is an updated, working version. This scrip

james-ramsden.com

 

아래 동영상을 보고 따라서 만들어 봤다.

https://youtu.be/rOaCnKGPtxY

 

change_gui.gh
0.01MB

반응형

이 글을 공유합시다

facebook twitter kakaoTalk kakaostory naver band