How do you change bitmap color based on color picker? Need some help.

How do I get the color of the created bitmap to use the color chosen in the Color Picker? It seems like it should be something simple but I am unable to figure it out. Help would be appreciated. Thanks
John

rollout color1 "color"
(
colorpicker theColor "Bar Color: " color:[0,0,255] modal:false
 
button btnMake "Make" width:140 height:24
 
on btnMake pressed do
(
bm1=bitmap 100 100 color:red
pasteBitmap bm1 bm1 (box2 0 0 25 50) [100,100]
display bm1
)
 
)
createDialog color1 150 60

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Admin's picture

Personally I can't think of

Personally I can't think of an easy way although I know Martin Breidt has a solution for it in his infooverlay script - http://www.scriptspot.com/3ds-max/scripts/infooverlay

Christopher Grant
Admin, ScriptSpot.com

JokerMartini's picture

In the same script how do I

In the same script how do I go about pasting a string of text over the blue background. Just a simple line of text like "Hello how are you?"

I've been having issues getting that to work right.
Thanks

John

I see your from riverside CA, I'm from Long Beach CA!

AttachmentSize
font.jpg 14.29 KB

John Martini
Digital Artist
http://www.JokerMartini.com (new site)

JokerMartini's picture

Alright great. Thanks a ton!

Alright great. Thanks a ton!

John Martini
Digital Artist
http://www.JokerMartini.com (new site)

Admin's picture

I moved your question to the

I moved your question to the scripting forum...

To answer your question - you don't need to paste anything into the bitmap you just need to use a variable to store the color from the color picker then create a bitmap directly with that color.

rollout color1 "color"
(
colorpicker theColor "Bar Color: " color:[0,0,255] modal:false
 
button btnMake "Make" width:140 height:24
 
on btnMake pressed do
(
curcolor = theColor.color
bm1=bitmap 100 100 color:curcolor
display bm1
)
 
)
createDialog color1 150 60

Christopher Grant
Admin, ScriptSpot.com

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.