Get Bool from Xpresso Inport

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 29/03/2008 at 13:54, xxxxxxxx wrote:

User Information:
Cinema 4D Version:   10.5 
Platform:      Mac OSX  ; 
Language(s) :     C++  ;

---------
Hi!

I have a short question. I can't finde GetBool in the GeData Class.

Does someone know, how I am able to get the settings from an Boolean-Inport? I only find GetReal... in the SDK.

Thanks a lot :)

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 29/03/2008 at 15:11, xxxxxxxx wrote:

If you look reeeeallly hard, you'll find that one doesn't exist. ;)

Use (Bool)GetLong() instead for GeData. Don't ask me why the developers have omitted a GetBool()/GeData(Bool b) for GeData.

That said, GvPort indeed has SetBool() and GetBool() methods. Get the GvPort from the GvNode (GetInPort(), GetOutPort, etc.).

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 29/03/2008 at 15:12, xxxxxxxx wrote:

Try GetLong(), FALSE = 0 and TRUE = 1

cheers,
Matthias

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 30/03/2008 at 04:12, xxxxxxxx wrote:

Hi!

I tried:

GvPort* iptB = bn->GetInPort(1);
     GeData iptdataB = GvGetPortGeData(bn, iptB, run);
     LONG valueC = iptdataB.GetLong();

but kuroyume0161 said, I have to use GetLong instead of GeData. I am confused a little bit...

Thanks for your great help.

P.S.

GePrint(LongToString(valueC));

Returns 0 every time...

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 31/03/2008 at 05:36, xxxxxxxx wrote:

just access the port with GetBool().

> \> GvValue \*vinport = ports.in_values[0]; \> if(!vinport) return FALSE; \> \> if(!vinport->Calculate(bn, GV_PORT_INPUT, run, calc, 0)) return FALSE; \> \> GvPort \*inport = vinport->GetPort(); \> \> Bool value = FALSE; \> \> inport->GetBool(&value;,run); \>

ports is your GvValuesInfo structure

cheers,
Matthias

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 31/03/2008 at 08:58, xxxxxxxx wrote:

thanks a lot... works fine...