View Full Version : Dotnet question.
06-10-2008, 09:16 PM
Hi, I'm curently developping a dotnet editor for 3dsmax but I must say that I'm stuck here...does someone know if there's a way to get the path to an image from the .backgroundimage property, once it has been assign ?
06-10-2008, 10:39 PM
That's very cool :)
As for your question; I don't think you can. The .Image / .Bitmap classes only contain a GDI object, not a reference to a bitmap file. You could set the filename in the .Tag property whenever you change the .BackgroundImage; that way you can read it back out easily.
06-10-2008, 11:47 PM
Yes, I thing that putting this in the tag is a great solution but How can I read the selected image in the open dialog of the propertygrid ?
Thank for your help!
06-11-2008, 12:23 PM
should be just a case of getting the selected element and getting .BackgroundImage out of it? Do you have some base code to poke at?
06-11-2008, 12:45 PM
Well...my code is not very clean for now but since I can't figure this out, you can take a look at it, if you wish :-P
06-11-2008, 02:02 PM
well I meant more for this part:
How can I read the selected image in the open dialog of the propertygrid
Now that I know what you're talking about (script's looking good so far, btw)... that is a very good question; and I'm afraid that the answer appears to be complex, requiring you to prepare custom code, etc.
It might be easier to add a custom property to the propertyEditor that then writes to .Image and .Image.Tag, than to create a new container and checking for the event (which, according to the last poster, isn't particularly working; but I'd imagine the prior poster there checked their code to confirm it works), but I can't say I'd know the intricate details of doing that within max.
06-11-2008, 02:30 PM
I allready write the code to make a custom property grid and it allowed me much more control but it was so slow to process that I decided to use propertygrid instead, but I guess I could add just one for the image property since it seam to be a problem :-P
thank for the link to the msdn forum this will be hellfull to!
06-11-2008, 02:30 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2015, Jelsoft Enterprises Ltd.