Changing Opacity of Safe Frame Bars

Hi everyone. I’m digging the codes of @thomthom’s Safe Frames plugin to edit a small parameter. I’ve hit a little snag because I’ve come to the point where I don’t know where to look.

Basically, I want to adjust the transparency of the safe frame bars and make them opaque. I still get distracted by the semi visible parts that are covered by the bars and was wondering if there was a way of making the bars darker or opaque? Thanks.

Sketchup.active_model.rendering_options['BandColor'] = Sketchup::Color.new(128, 0, 0, 0.8)
2 Likes

Hey Thomas. Thank you for the hint. Unfortunately, I’m having trouble finding that exact line. I’ve looked in all the rb files here -

but the only lines that have anything similar to “Sketchup.active_model” are these -

@since 1.0.0

def self.create_camera_window
#puts ‘self.create_camera_window’
view = Sketchup.active_model.active_view
camera = view.camera


@since 1.0.0

def self.width_changed(value)
#puts “width_changed( #{value} )”
view = Sketchup.active_model.active_view
if view.camera.aspect_ratio == 0.0
ratio = view.vpheight.to_f / view.vpwidth.to_f
else
ratio = 1.0 / view.camera.aspect_ratio
end
@window[:txt_height].value = ( value.to_i * ratio ).to_i
nil
end

Could you also say where that line is, please? Or do I have to add it myself? (in that case where?) :slight_smile: Thanks a bunch in advance.

Did you try entering ThomThom’s snippet in the Ruby Console?

1 Like

Aha! Now it worked. Thanks a lot Dave. Didn’t think about putting the code in the Console. Is there any way of “saving” this parameter for the aforementioned plugin, so that I don’t have to copy-paste that line every time?

It was just a guess on my part since ThomThom didn’t tell you where to put it.

Is there any way of “saving” this parameter for the aforementioned plugin, so that I don’t have to copy-paste that line every time?

Maybe ThomThom can answer that.

I expect you could turn it into a little plugin and run it. In your case it seems it might be nice to just set the opacity that way in the extension.

1 Like

Thanks again.

I had a sudden idea from this. Maybe if ThomThom decides to “refresh” the plugin some time in the future, he could add a setting to control the transparency of the safe bars as well? The colour itself, I believe, is not important, since it doesn’t show up in exports. But a transparency controller with 25% increments would be nice. Just an idea though. :slight_smile:

1 Like

Can you file this suggestion in the repository’s issue tracker please? GitHub - SketchUp/sketchup-safe-frames

I’m sorry ThomThom, I have trouble following you. I’ve just signed up on that website. Is this the correct place to file the idea? My suggestion is not really an “issue”, is it?

Yes it is. Thomas will tag it with the correct kind of label (“Bug”, “Enhancement”, “Question”, etc.)
You can always prefix the issue title with “[FR]”.

2 Likes

Okay, thanks Dan. It seems I’ve misunderstood the context the word “issue” was used in. I thought it meant “problem” or “mistake” or “error” or anything similar. If regarded as “an important topic for debate or discussion” like Google says, it makes sense.

Yea, in the context of GitHub (or BitBucket, or any other tracker system) an “issue” is considered a “ticket”, “item” - something generic which is then later categorised and prioritised.

Hello everyone,

I found this thread might hold the solution to an advanced camera issue I have run into since upgrading to SKP 2017.

My exported images are jumbled with grey fragmented bars.

If I could just turn off their opacity, that would be a possible work-around.

Is someone able to suggest what code to paste into the terminal? Thomthom maybe can you update the snippet to “turn off” the bars comletely?

Thank you!

1 Like

Hello. It seems your issue is more connected to your graphic card, rather than the Advanced Camera Tool. Is SketchUp using your 12 GB (wow!) TitanX card?

And to put it with opacity what would be the solution

The black safe frames was a regression bug in SU2017M0. It’s might be fixed in SU2017M3 (not sure). But at least in SU2018M0.

I found this post by searching, but can anyone tell me how the camera’s grid is set in the first photo? I don’t think it’s a watermark. It’s an old thread, but if you’ve seen it, I’d appreciate an answer.

1 Like

I’m not sure, but depending on what you want, maybe you should look into this new plugin:

1 Like

Hello! OP here. Your comment made me scroll back 6 years back to my original post, which filled me with nostalgia. Thank you, haha!
To answer your question - it is actually a watermark. I made it in Illustrator. If you know the software, it’s easy to make. If I remember correctly, I made maybe 5 different grids for different ratios: 19x6, 1x1, 2x1, 2.4x1 etc, so that I could use them in combination with ThomThom’s Safe Frame plugin.

It’s just a transparent PNG file, the white guidelines are 2 pixels thick at 50% transparency. After applying it as a watermark in SketchUp, make sure to keep the ratio locked, so it doesn’t stretch vertically and cross your safe frames. Good luck! Let me know if you need further help.

Hi, thanks for the reply. I was actually researching the watermark option and figured out how to do it. I succeeded in getting the watermark inside the safe frame. Anyway, thanks for the answer. I’ve fixed the accidental untranslated comment.

1 Like