ShowTransition not working

I have another config in this same file that invokes:


This used to work in prior versions of Sketchup, but no longer does (SU2018 MacOS 10.14), and seems to be de-coupled from the Model Info->Animation->Enable scene transitions checkbox. Steps to reproduce:

  1. Check the box Enable scene transition.
  2. Enter Sketchup.active_model.options["PageOptions"]["ShowTransition"]=false in the Ruby console window.
  3. Click another scene.

I posted this a few weeks ago, and it ran fine on v18 for all who tried it…

module JcB
	def show_trans_true
		Sketchup.active_model.options['PageOptions']['ShowTransition'] = true

	def show_trans_false
		Sketchup.active_model.options['PageOptions']['ShowTransition'] = false

	# create a command object.
	cmd ='Toggle Scene Transition') {
		Sketchup.active_model.options['PageOptions']['ShowTransition'] ? show_trans_false : show_trans_true
	cmd.menu_text = 'Toggle Scene Transition'
	cmd.set_validation_proc {
		if Sketchup.active_model.pages.count == 0
	}'View').add_item cmd

end #module


Thanks. My version and yours do seem to work when called from the menu item. Using a shortcut key sometimes works, and sometimes doesn’t, and even invoking from the Ruby console sometimes fails. Maybe it gets confused about active_model. I’ll monitor and see if I can spot a pattern.

are you setting shortcut keys purely from code [ it’s considered to be bad practice ]…

do yours show up when you run Sketchup.get_shortcuts in Ruby Console?

they should be set from the GUI and work best from a menu command…


You were using a mac, right? Are you sure a model window have focus when you trigger the shortcut key?

I still see this bug in SU2019 on Mac!

Sketchup.active_model.options["PageOptions"].each_pair{ |key,value| puts "#{key}:#{value}"}

The options are completely decoupled from UI / Scenes behavior. On Windows everything is fine.

It is very important for me to temporarily disable page transitions, but on Mac it is not possible any more.
Just modify the Animation settings in a model and you will see that the values read by the above code do not change.

It goes all along with long standing issue that Mac loses “active_model” sometimes, even when there is just a single model opened.

Is this a regression in SU2019? (If so, do you know which of the releases?)

Not aware of that one. Got an example? (Or logged it in our issue tracker?)

I tested the code in SU2019.1 and it works fine! So it must be a recent thing…

I would have to write one. It happens in our Batch Render on Mac. At some point, active_model is not accessible anymore and instead of rendering next scene, the last one is being rendered. It is not easy to replicate, because it requires certain user behaviour, which I have not yet identified.
Maybe we will try something in Leeds?

Was this related to linking to standalong C API instead of the Live API?

Yes. The UI decoupling was related to wrong API linking.

I discussed the issue with Hilliard at DevCamp. He noticed that it can happen on Mac in other circumstances. He is on a track to fix the issue.

@tt_su I’m not sure what this “fix” refers to, and I do not see anything in the API release notes referring to this from v19 to the latest release.

Could these “other circumstances” be a core issue(s) ?
(It’s impossible to search the Application Release Notes.)

That’d be my guess, yes.