Accessing objects info in XSI 2004-06-11 - By Homam Bahnassi
Back Besides the two caveats you mentioned there's another problem:
miTag tag; mi_query(miQ_INST_ITEM, NULL, state->instance, &tag); const char *name = mi_api_tag_lookup(tag);
I used the previous code to get the name of an object and it worked fine except when rendering 'instances'. It doesn't return the name of the 'instance'! Instead it returns the name of the object that was instantiated from, and this is not what I want. This is because the mi_query function always returns tag to the original object (Which I find it strange).
I need to access instance-wise unique data (a single integer is fine) which of course works on render slaves also.
Thanks, Homam Bahnassi 3D Supervisor In|Framez
> -- --Original Message-- -- > From: Halfdan Ingvarsson [mailto:hingvars@(protected)] > Sent: Friday, June 11, 2004 5:49 PM > To: XSI@(protected) > Subject: RE: [MRay] Accessing objects info in XSI > > mi_api_tag_lookup will give you almost what you need. It will return the > name of the object as pushed to mental ray. > > There are two caveats, though: > First, you will have to strip off some suffixes from it to get the name as > it is in XSI. > > Secondly, it will not work on render slaves as the name table is not > transferred to them (will return a NULL). > > - � > > -- --Original Message-- -- > From: owner-xsi@(protected) [mailto:owner-xsi@(protected)]On Behalf > Of Homam Bahnassi > Sent: Friday, 11 June, 2004 05:14 > To: shader@(protected); XSI@(protected) > Subject: [MRay] Accessing objects info in XSI > > > I'm writing a shader for XSI and I need my shader to get some info from > the > object being rendered. In my case I need to get the object's name. > I messed with mi_query but with no luck. If it's possible how could this > done? > > Thanks, > Homam Bahnassi > 3D Supervisor > In|Framez > > > --- > Unsubscribe? Mail Majordomo@(protected) with the following text in body: > unsubscribe xsi
--- Unsubscribe? Mail Majordomo@(protected) with the following text in body: unsubscribe xsi
|
|