Grasshopper

algorithmic modeling for Rhino

When making clusters, user objects, or custom components how should my output data be formatted?

Via David Rutten on this discussion

 

"The rules are quite complex and sometimes change per version, but there are two important reasons for the behaviour:

  1. The ways datatrees change should be predictable per component. I.e. if you provide a single number the output should not differ fundamentally from when you provide two numbers as input.
  2. A component should not destroy information stored in datatrees, as they are a sort of history record telling you where data came from.

The current logic is outlined in this document.

In short:

  • If all inputs have item access and all outputs have item access then the datatree layout is copied from the master input parameter.
  • If all inputs have list access and all outputs have list access, then the datatree layout is copied from the master input parameter.
  • If some inputs have item while some outputs have list access, those outputs will have their trees grown by one layer.
  • Input and outputs which have tree access are completely at the mercy of the component and their behaviour will differ on a per component basis."

Views: 879

Replies to This Discussion

Is there a question here?

--

David Rutten

david@mcneel.com

Poprad, Slovakia

No question. Just posting it for the use of others developing user objects and custom components. I feel its a useful piece of information to follow.

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