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?