Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Python is an interactive, object-oriented programming language. In Blender, it is used as a general-purpose scripting language and to create add-ons to extend Blender's functionality.
4
votes
1
answer
724
views
How to get XYZ euler rotation of 3DView?
I'd like to extract the user view orientation of the current 3DView. Since I didn't find a direct command to get it, my approach would be to take its matrix using bpy.context.region_data.view_matrix.t …
4
votes
multi-line text box with popup menu
I just found this way of doing it.
Put this at the top of your add-on (you can also test it alone in the text editor):
import bpy
def ShowMessageBox(title = "Message Box", icon = 'INFO', lines=""):
…
3
votes
How to create a "linked copy" scene in Python without using ops?
This is not an intended feature and there's no python command to properly fix that. …
3
votes
Efficient way to get selected vertices via python (without iterating over the entire mesh)
Since Blender 2.8, multi-object editing makes the previously given answers insufficient, as they don't list the selected vertices of non active objects.
The following snippet solves this issue by cre …
3
votes
2
answers
810
views
Enable/disable 3D cursor tool properties from python
I'd like to enable Surface Project and set the orientation mode of the 3D Cursor from python, as if I did it from the header's tool settings. … Is it actually possible to change them from python? …
3
votes
0
answers
502
views
How to find python code of a built-in python operator?
To my knowledge, some built-in operators are written in python. … However, I don't know how to:
tell if any operator is a python one
find its code
In my particular case, I'd like to get the code for bpy.ops.scene.new(type='LINK_COPY') (provided it's a python operator …
2
votes
0
answers
50
views
tracking operators ignore frame update [duplicate]
I'm trying to make a script that adds motion trackers every n frames and tracks them but I can't get the detect_features and track_markers operators to run on a specified frame.
My approach is to jump …
2
votes
Accepted
How to calculate a parent inverse matrix?
Oh wow, that was embarrassingly easy.
Cube.matrix_parent_inverse = Cam.matrix_local.inverted
2
votes
1
answer
1k
views
Return an image's dimensions
How do I get the height and width (in pixels) of an image that's been imported in Blender?
bpy.data.images['myImage'].???
1
vote
How to get XYZ euler rotation of 3DView?
bpy.context.region_data.view_matrix.transposed().to_euler()
Tanks HENDRIX, that was pretty simple
1
vote
0
answers
327
views
"Copy Data Path" grayed out : what does it imply?
Does this mean that:
this element can't be accessed from python in any way whatsoever
it only can't be accessed from python through this particular interface area you clicked on but can be in another …
1
vote
How do I copy existing properties in the UI so I can include them in my custom panel?
If you want the properties to be identical to the original ones, you should set Slider to False or simply not include Slider at all.
A Slider is a bar that fills the field from left to right. When di …
1
vote
1
answer
64
views
Copied scene needs a user?
From the default startup, if you run
bpy.context.scene.copy()
you get a copy of your scene that has 0 user and gets added to the orphan data.
In reality, if you save and revert the file, your scene wi …
1
vote
Script to auto-detect features to track using Python
You have to update the frame with the right command:
⚠ Note that none of these will properly do it for the tracker operators:
bpy.context.scene.frame_current = frameNumber
bpy.context.scene.frame_set( …
1
vote
1
answer
961
views
multi-line text box with popup menu
How can I make a multi-line text box using the popup_menu function in my add-on?
The idea is that I could use it as a function that I could call anywhere and put any text in it.