Quantcast
Channel: Grasshopper Developer - McNeel Forum
Viewing all articles
Browse latest Browse all 3664

GHPython: Adding Volatile Data To Output Parameters (Unexpected Nulls)

$
0
0

@AndersDeleuran wrote:

Hi All,

I realise this is probably something I should be writing in a compiled component, but:

I’m fiddling about with some ideas that involves assigning data to output parameters, without assigning them as usual (that is, via the implied link between the parameter name and the variable name in the code) but instead based on their index. As far as I’ve been able to gather, this requires going through the GH_Param for the output parameter and implementing one of the methods there for adding/appending data. This appears to work somewhat, but I wonder if this is even the “correct” approach?

For instance, in this minimal example I get “strange” nulls if the GHPython components have input parameters, but things appear to work as (I) expected without any inputs:

180913_AddVolatileData_GHPython_00.gh (4.7 KB)

I’ve tried other approaches as well, such as accessing the GH_Structure of the parameter directly and calling Append, AppendRange etc, with the same result as above.

Any inputs here would be great.

Cheerio,

Anders

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 3664

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>