Whenever I hit Numpad. (align view to selection), it doesn't show up in the info panel. Is there an operator for this, so that I can use it in scripting?
1 Answer
The operator name is bpy.ops.view3d.view_selected()
. See my answer here for additional information on this and also how to quickly reach the online manual and the API reference. Here are the accompanying docs for the operator.
Hover over a button and you should see a short description etc.. This can be useful for getting operator names.
You can go to the 3d view header and go to View > Align View > View Selected and check the operator name there.
Copy To Clipboard
While your mouse is over the menu item you can press Ctrl + C and the Python command gets copied to the clipboard to save you retyping it.
Log Everything
Some operators are excluded from the report window because typically you don't want setting the cursor (for example) to be logged, however this can be overridden by either...
- Starting blender with the command line argument
--debug-wm
- Running this in the python console
bpy.app.debug_wm = True
Then output of all operators executed will be logged in the info space and the console.
-
$\begingroup$ I knew about the hover trick, but I couldn't find the "View Selected" operator in the view menu. $\endgroup$– DanielCommented May 28, 2013 at 15:35
-
1$\begingroup$ You can also search in the Input tab of the user preferences if it has a hotkey $\endgroup$ Commented May 28, 2013 at 19:00