Skip to main content

All Questions

Tagged with
2 votes
1 answer
990 views

Align object to view with Python

I was trying to a add a plane primitive using Blender Python and aligning it to the viewport. I already tried setting align_view = True when adding it via Python, ...
Bert's user avatar
  • 23
10 votes
2 answers
14k views

How to get mouse position in a window with Python?

I want to detect if the mouse is in certain area of the 3d View, so I can display a custom menu when it will be in the left top corner, over the view name ("User Persp" etc).
PLyczkowski's user avatar
9 votes
2 answers
3k views

No redraw after assigning new vertex position with python

I'm trying to write a new operator which modifies my geometry in some way, but I'm struggling with vertex manipulation. I can get the selected vertices fine and also print the individual components. ...
Miguellissimo's user avatar
1 vote
1 answer
660 views

Is there a way to make an operator know if the context viewport is in ortho or perspective mode?

I would like my custom operator to have 2 behaviours : Case 1: Viewport is in perspective mode, do function 1. Case 2: Viewport is in orthogonal mode, do function 2. How can I get that information ...
matali's user avatar
  • 2,811
3 votes
1 answer
2k views

Zoom to selection in Python gives RuntimeError

I'm new to Blender Python and writing a start-up script that imports mesh from another application to Blender for rendering. I have a small problem however - imported mesh objects are too large for ...
zetah's user avatar
  • 133
13 votes
4 answers
19k views

How to toggle visibible / selectable / renderable for multiple objects?

For quite long time, I was looking for a faster way to toggle (or toggle off) visible / selectable and renderable for many objects, as illustrated below: I know we can do the relatively quick select ...
Leon Cheung's user avatar
  • 27.9k
4 votes
1 answer
2k views

Test if the mouse is over any object in the 3D View with python?

How can I find out if the mouse is over any object in the 3D View area with Python?
Rasa Mohamed's user avatar
0 votes
1 answer
5k views

Repeat a Python function multiple times

I am writing a Python script, and I need to repeat one line of code 24 times. How can I do that? I tried a for and while loop, and still cannot get it to repeat. ...
rioforce's user avatar
  • 2,062
5 votes
1 answer
1k views

Python - 3DView Border Select

I am scripting a plugin in Blender Python (using the newest Blender version, 2.69) and I want to select a region with the Border Select tool in the 3DViewport. I have looked this up in the ...
rioforce's user avatar
  • 2,062
22 votes
5 answers
22k views

How to set cursor location, pivot_point in script?

I am trying to set a cursor location and pivot point with bpy.types.SpaceView3D.pivot_point='CURSOR' bpy.types.SpaceView3D.cursor_location = (0.0, 0.0, 0.0) and ...
dimus's user avatar
  • 3,312
7 votes
1 answer
2k views

Moving user perspective in Blender with Python

How can I move the user perspective in Blender with Python? I did some research, but I wasn't able, to find anything. For clarification: I want to move the user camera in the 3D view. I want to ...
user avatar
16 votes
2 answers
5k views

How can I navigate the viewport using Python?

Normally, with most actions that you want to script with Python there is a pop-up tooltip that shows you the function that you want to use. However, for viewport navigation there are no pop-ups, you ...
fouric's user avatar
  • 3,251

15 30 50 per page
1
12 13 14 15
16