Rendering_options['ForegroundColor'] controls view.draw_text
-
So can I link this to my bounding box question, and your and Chris F's replies, viz:
Objects to be moved are selected; a draw tool is used to trace or slightly offset the bounding box points with colour set as you say here. So when another selection is made there would be two boxes, say one fake red one, and the normal blue one for the destination. Both would be cleared on "Store route" or something.
Your post just got me thinking out loud (TOL), but if there are any comments that would be good.
Thanks
-
@ThomThom, ... last week when I was playing with the RenderingOptions, the controls in the SU dialogs did not reflect my changes until I called UI.refresh_inspectors. (I recall we had a discussion with TIG in the Observers thread, about whether these changes were temporary or permanent; I didn't realize at that time, that the dialogs needed to be refreshed.)
Regarding view draw changes, remember that ver 7.1 added View.refresh
.. what's that old saying?
"Believe nothing that you read, and half of what you see!" -
@dan rathbun said:
last week when I was playing with the RenderingOptions, the controls in the SU dialogs did not reflect my changes until I called UI.refresh_inspectors
Would that also refresh the edge colours? because they should be changing as well - but doesn't.
-
@thomthom said:
Typing
Sketchup.active_model.rendering_options['ForegroundColor'] = 'pink'
into the ruby console changes the edge colours to pink.How does this differ from view.drawing_color="pink" ??
-
@thomthom said:
This does not update the Edge colour in the viewport. But
Sketchup.active_model.rendering_options['ForegroundColor']
value is still updated.@ThomThom - I get an immediate change in the displayed edge color when I change rendering_options['ForegroundColor'].
You didn't turn of your DCs again did ya?
EDIT - Oh never mind, you mean within a Tool.
-
@dan rathbun said:
@thomthom said:
Typing
Sketchup.active_model.rendering_options['ForegroundColor'] = 'pink'
into the ruby console changes the edge colours to pink.How does this differ from view.drawing_color="pink" ??
rendering_options['ForegroundColor']
is the Edge Colour setting.view.drawing_color
defines the colour used byview.draw
andview.draw2d
.But
view.draw_text
doesn't use the colour set byview.drawing_color
instead it annoyingly usesrendering_options['ForegroundColor']
. -
I would say this is a bug, as I would have tried using view.drawing_color=
-
@dan rathbun said:
I would say this is a bug, as I would have tried using view.drawing_color=
Yea - it was only by accident I realised it used the edge colour. I thought it was fixed to black - like
view.draw
when y ou try to draw a face. But then I changed the viewport background and the text changed to white - as well as the edge colour. -
Its a bug though. Introduced in the last couple of version of SU. I posted a bug to Google sometime back.
Previous to that, you could use drawing_color (as expected) to control text color.
-
Sketchup.active_model.rendering_options['ForegroundColor'] = color
works fine fordraw_text
method.
However there is a very weird side effect, probably because the change of rendering is done within thedraw
method of a Tool.
This effect is that the SU main window seems to loose the focus, so that any call to UI.messagebox or UI.inputbox is blocked and does not show the dialog box (you have to press Alt to unlock this situation).I did not find a way to circumvent this side effect.
Fredo
Advertisement