Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Go Back   mental images Forum > mental ray > mental ray - Shaders > mr Shaders - Advanced

Reply
 
Thread Tools Display Modes
  #1  
Old April 12th, 2010, 22:06
Victor.Feliz Victor.Feliz is offline
mi Dev Forum User
 
Join Date: Mar 2009
Posts: 10
Unhappy How to detect that state->text_list[0] has been filed

If you try to export tex_list[0] as color obviously if tex_list is not filled some garbage is shown instead the proper values.

My intention is that if tex_list[0] hasn't be filled it returns pure grey.

Thanks in advance.
Reply With Quote
  #2  
Old April 21st, 2010, 01:09
bart bart is offline
Super Moderator
 
Join Date: Dec 2004
Location: Marina Del Rey, California
Posts: 2,179
Default

Perhaps you could use the mi_query for miQ_NUM_TEXTURES which returns the number of textures in state->tex_list
__________________
Bart
LAmrUG Forum Originator
Director of Training, mental images
Reply With Quote
  #3  
Old April 22nd, 2010, 14:59
Victor.Feliz Victor.Feliz is offline
mi Dev Forum User
 
Join Date: Mar 2009
Posts: 10
Default

It works

Code:
miInteger num_textures;
miBoolean texquery = mi_query(miQ_NUM_TEXTURES, state, miNULLTAG, &num_textures);
if (num_textures!=0)
{
//Make cool things
}
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT +1. The time now is 06:20.