Detecting The Link Object Of UserData field.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 12/12/2010 at 07:14, xxxxxxxx wrote:
User Information:
Cinema 4D Version:
Platform: Windows ; Mac OSX ;
Language(s) : C.O.F.F.E.E ; XPRESSO ;---------
Hi All,I have simple problem here.
In an empty scene, create a camera with a UserData field called "Link" and of the link type.Now, add an expresso TAg to the camera and drop in the Camera, A COFFEE node and a Result node.
Connect the UserData field to the input of the COFFEE node and the Output to the Result.
Here is the code:
main() { if (Input1 == NULL) { Output1 = 0.0; } else { Output1 = 1.0; } }
Quite simple, if there is no object in the UserData link field, it outputs 0, if there is, it outputs 1.
But this does not work. Can anyone explain why, and how to make it work?
Thanks
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 12/12/2010 at 12:40, xxxxxxxx wrote:
Change NULL to nil.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 12/12/2010 at 13:09, xxxxxxxx wrote:
Hi Dragon Seer, that code works for me...
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 13/12/2010 at 06:32, xxxxxxxx wrote:
Thank you, that does work. but I have to ask...
What is the difference between NULL and nil?
They both highlight as orange keywords in the editor...
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 13/12/2010 at 07:31, xxxxxxxx wrote:
Afaik nil stands for an undefined status in COFFEE. For instance if a variable hasn't been initialized.
cheers,
Matthias