Jump to content

Black Color and ZERO_VECTOR


DimitriMango
 Share

You are about to reply to a thread that has been inactive for 1258 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Hello ­čÖé

Have done a script with some settings driven via a configuration NC.

One of the setting is a color who should be typed as a vector in the NC. Through the process of processing datas (value) read in the NC, I've added a condition to check if the typed color vector is correctly typed if((vector)value) //keep this data; else //it's not a vector, put a default forced value just in case the typed setting would be wrongly typed.

Surprisingly <0, 0, 0> -corresponding to black color vector- and even correctly typed is treated as FALSE as a conditional in if((vector)value) as it is equivalent to ZERO_VECTOR, which is also the result of anything else wrongly typed in this case.

Do you have any clue to overpass this? Have a nice day!

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 1258 days.

Please take a moment to consider if this thread is worth bumping.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...