BastiaanOlij / gdprocmesh

A procedural mesh generator for Godot build as a GDNative plugin
MIT License
120 stars 13 forks source link

Auto convert reals to ints and vice versa. #15

Closed leopoldek closed 6 years ago

leopoldek commented 6 years ago
BastiaanOlij commented 6 years ago

@Mr-Slurpy , do you know if its possible to set which conversions are allowed on a slot by slot basis? There are a few nodes where it would be cool if they work both for vector3 arrays and surfaces (like the transform node)?

Also, not all real nodes will have integer input support so this is really something that hopefully can be done as such.

leopoldek commented 6 years ago

Yeah sure it's possible each node add a function that dictates whether or not a certain type is allowed as input.

But I'm not sure what you mean by not all real nodes will have integer input support, the pr doesn't actually pass an array of integers, it converts the array to a real array (by chopping off the fraction) and passes that so it's impossible for a node to not support it.

BastiaanOlij commented 6 years ago

Ah! I didn't realize you did the conversion in GDProcMesh... hmm yeah that makes sense I guess :)