View Full Version : Accumulating ImgTag's to rollout
04-27-2008, 08:28 PM
I'm looking to create a rollout/interface which grabs the viewport as an image and adds it to a rollout/interface. This would then become a library of stored poses with visual reference being the grabbed image. When the user clicks on the image the objects will assume the position that was stored with the viewport grab.
I can grab the viewport and create an image etc, storing the various positions of the objects is ok as well, but how can I create a rollout that can have ImgTag's added to it dynamically, if possible.
I have played with a script that added subrollout's in a dynamic manner which could contain ImgTag - just wondered if anybody had any other ways or thoughts on this.
New to this scripting thing but am finding it very addictive.
04-27-2008, 10:41 PM
'fraid you can't add any control to a standard 3ds Max UI dynamically - removing the rollout, constructing the new one, and re-adding it is the way it's done. Might be able to do something with a .NET form, but who knows :)
If you need a small history, you could - in theory - make your own scrollbar widget / timeline slider or so (a progressbar seems neat for this) which simply dynamically loads the correct bitmap into, say, 3 button (with images) or imgtag controls that are side-by-side, with the center one the current time, left one back in time, right one forward in time. Or 5 images, or whatever would be preferred.
That's how I'd do it anyway - rather than one giant long rollout with tons of bitmaps in it sucking up memory :)
Dynamic rollouts can be done with rollout creator, I don't have the help in front of me so I can't tell you more as I don't use it that often. You can also do by building rollouts as a string and executing them. I like Richard's idea and not suck up all your memory with images.
04-28-2008, 03:38 PM
I wish rolloutCreator really did provide a way to make dynamic rollouts - but it's really just a 'user friendly' interface to building rollouts by way of a string and executing that string; same limitations: have to remove the old rollout, create the new rollout, then add that rollout.
A real 'dynamic' rollout would let you add controls without that close/create/add stuff :)
Since you cannot create dynamic rollouts another option would be to create a button that acts as a preview window since you can assign a bitmap to a button. Then using a drop down list or list box you could store the poses giving them a name. When the user selects a pose using the list box / drop down list the preview image could be displayed in the button. This would allow them to see a preview of the pose after it is selected from the list, without the need of a dynamic rollout. The user can then press the image button to assign the pose to the model.
04-29-2008, 03:46 AM
This is kinda messy, but have you considered using sub-rollouts. These allow you to dynamically add new rollouts to them over time.
You could then use the rollout creator functions as well...
Just an idea
05-01-2008, 10:22 AM
Cheers all, i'm still toying with options.
bnvm, cheers that's very similiar to how the copy pose works in character studio, which is actually what I'm trying to get away from. I think it would be more user friendly to just have an open interface which has all the poses displayed visually.
Pen, guys ..How much memory loss are we talking about first?. I agree that we need all the memory we have for rendering and usage etc but.
One solution I'm playing with creates 20 empty ImgTag's in a rollout which can be filled with images, say 60 x 60 pixels.This limits the amount of poses and memory usage, but a dropdown then loads a new library into those buttons..how does that sound as a half way house ?
I guess the thing is to make sure max empties the old bitmaps from memory...is that Gc()..lite, i shall check ?
05-01-2008, 10:22 AM
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-2013, Jelsoft Enterprises Ltd.