Keystroke to jump to scenes

In working on an animation I may set a scene transition to 10 or 15 seconds. But when working on the model it would be nice to get from scene to scene without waiting for the long transition. I know the transition can be switched off in settings but going backwards and forwards into settings is as time consuming as waiting the 10 seconds, but something like a “ctrl+click” on a scene tab or similar to override the transition would be nice. Maybe it is already possible?

1 Like

I agree on the problem but not on the proposed solution. There just isn’t any way for users to discover that Ctrl (or another modifier keys) would change function of the button. To know it you would have to read it somewhere or be told by someone. Even then it may be hard to remember which button to use, as the choice is arbitrary.

However, clicking on a scene tab when already in a transition to that scene could jump directly to it. The same logic could extend to double click directly activating a scene with no transition. While this implementation doesn’t have any clear signifiers either, it makes sense for [at least some] users to click several times when being inpatient and you could then discover it for yourself.

3 Likes

Double clicking would be fine by me, but I’m not sure if the idea of “discovery” is an appropriate or reasonable methodology. Sketchup comes with instructions for its tools and functionality, many of which we have to read about despite the intuitive aspects of the software?, for example, “ctrl+eraser” to hide a line being one. I don’t think we would have to rely on “discovery” to find that, as it would be written in the manual and it too could have had other “arbitrary” key combinations, but that’s how it was decided. So I’m not sure that a similar instruction to “ctl+select scene tab” to bypass transition is so obscure. Maybe it’s a function very few would need and so may not be worth implementing. There must be a way around it as Fredo’s animator for example, once in it, allows for this jumping from scene to scene even though the transition info exists?
But I appreciate your agreement with the problem ! :smile:

Discoverability is key for all good interface design. Modifier keys in SketchUp are always spelled out both in the status bar and instructor, so you can learn them just by the cues from within the program itself.

1 Like

this can be done with a very simple Ruby that adds the delay and transition to each Page…

it over-rides the Preferences settings only when playing a slideshow…

model = Sketchup.active_model
scenes = model.pages
scenes.each {|s| 
  s.transition_time = 4
  s.delay_time = 2
  }

john

2 Likes

Is it possible to assign a shortcut to “enable scene transitions” in the preferences, so you could toggle the delay? I wasn’t able to find it in the list, but maybe it’s possible with a simple ruby script.

Not natively but with Ruby you’d just have to expose the underlying value as a menu entry and then you could assign a shortcut to it.

2 Likes

Thanks for that John, I appreciate your input, I tried the ruby script and while it does override the settings, this would be much the same as unchecking transitions in the preferences? What I am ideally after is a shortcut key that will override the settings so that in a sequence of scenes that have a 10 second transition, I can access a scene tab on the fly without having to wait those 10 seconds, by say a “shift+click on tab” or similar. To implement a script and then undo that each time may not be any more efficient than going into settings to do it. As I mention, this may not be such a common issue that would justify a resolution.

Not an expert at all, but does Windows have anything equivalent to Mac’s Automator that might help with this? Basically, it allows you to run scripts in a given program. I have one of my function keys set up to type my email address, for example.

Not that I know of. A small Ruby snippet could easily fix this though.

So technically speaking a snippet could become an extension and as an extension it could be given a shortcut key.

To get really technical, it doesn’t even have to be an extension, a plugin would do.

I would define a plugin as any piece of code that loads on SketchUp load, from one of the plugin folders, while a snippet is something I’d execute from the Ruby Console. Extensions are a subset of plugins that follows a certain file structure to avoid clashes with other plugins and to be easy to uninstall, as well as provides metadata in a unified way.

Extensions are however the best way to assure plugins don’t clash, and I would advise anyone intending to publish a plugin to make sure it is also an extension.

2 Likes

Well put!
Just seems to me the answer to the original question would be a plugin to toggle the little tick in the Enable Scene Transitions box. This way uou could set it to a shortcut and toggle it on and off without going to Model info.
So tap the key and click the tab and away you go with no delay.
And of course you know what level of coding I’m at, somewhere around pre kindergarten…

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

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



	# create a command object.
	cmd = UI::Command.new('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
			MF_GRAYED
		else
			MF_ENABLED
		end
	}
	UI.menu('View').add_item cmd

end #module

now you can add a shortcut key or use View menu item…

john

4 Likes

It works, so you aren’t just a pretty face.

4 Likes

Genius, thanks John you are a gentleman and a scholar, that is exactly the solution.

As I am not too familiar with the Ruby protocol, would this be something I would have to load in any new session (SU startup) or once in there, there it remains?

Many thanks again.

try loading this as a rbz and it should stick;…

toggle _scene_transition.rb.rbz (898 Bytes)

john

3 Likes

Nice. Will do.
Thanks again.

I’m a little confused - are you just wanting to go from Scene to without clicking on a Tab? In Windows, PageUp and PageDown does that.

Page up and down does scroll through the scenes, but it goes from one to the next and includes the scene transition that you have set. What @john_drivenupthewall’s plugin does is toggle off the scene transition time and let’s you jump from one scene to any other instantly , as in no slow animated transition.