J. Miller Posted February 24, 2007 Share Posted February 24, 2007 I would like to get the user selection in a custom PIO. How does when write the magic words to get the value from the 'Render" pane of the OIP that the user selected as a texture. Hopefully this is an easy one for somebody. I can get the values of the fields i have created, but this selection has me stumped Thanks in advance Jeff Miller BSL Productions Quote Link to comment
_c_ Posted February 25, 2007 Share Posted February 25, 2007 Can you explain again? orso Quote Link to comment
J. Miller Posted February 25, 2007 Author Share Posted February 25, 2007 In short when an object is selected the OIP has a set of panes 'Shape', 'Data', 'Render'. If a user selects a texture to apply it shows in the 'Render' pane in a text pop up. I want to get the field containing that name. texture := GetRField(objhan, ?, ?); I am trying to figure out the '?' in the statement. Maybe you can do this but I am hoping that isn't true. Hope that helps a little more Jeff Miller Quote Link to comment
J. Miller Posted February 25, 2007 Author Share Posted February 25, 2007 oops what i meant to say was maybe you CAN'T do this, but i am hoping this isn't true. Jeff Quote Link to comment
Petri Posted February 25, 2007 Share Posted February 25, 2007 Have you tried FUNCTION GetTextureRef(obj :HANDLE; partID :INTEGER; resolveByClass :BOOLEAN) :LONGINT; Quote Link to comment
J. Miller Posted February 25, 2007 Author Share Posted February 25, 2007 No but i will Thanks Petri. Can one get a string name from the LONGINT that is returned? Sorry if it's another easy question, but it's the 1st time i attempting to access this type of information. Jeff Quote Link to comment
J. Miller Posted February 25, 2007 Author Share Posted February 25, 2007 GOT IT! Thanks for your help. Seems I'm not the only working on a Sunday. Jeff Quote Link to comment
_c_ Posted February 25, 2007 Share Posted February 25, 2007 (edited) I never scripted textures myself, but it looks like you have to loop down all textures in a doc and compare the longint returned. I'd use BuildResourceList with folderIndex 0 to get this done. Orso P.S. we really crossed mail: how did you get that done? Edited February 25, 2007 by _c_ Quote Link to comment
Petri Posted February 25, 2007 Share Posted February 25, 2007 Index2Name(-LONGINT); (Yes, there is a minus sign.) Quote Link to comment
_c_ Posted February 25, 2007 Share Posted February 25, 2007 Thank you, nice to know! Orso Quote Link to comment
Petri Posted February 25, 2007 Share Posted February 25, 2007 GOT IT! You're welcome. I think I may have use for this myself... Quote Link to comment
Petri Posted February 25, 2007 Share Posted February 25, 2007 Thank you, nice to know! You're welcome, too. The same approach works also with hatches and gradients. They have negative index numbers, but the function wants a positive number. (I have just recently learned this from someone here...) Quote Link to comment
J. Miller Posted February 25, 2007 Author Share Posted February 25, 2007 OK I am getting closer now... BUT Can anyone explain how to get the user set values from the EditTetureSpace Function. I am calling this thru a custom PIO i would like to reset my texture from these choices. thanks in advance Jeff Miller Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.