Skip to main content
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
Results tagged with
Search options not deleted user 71670

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
2 answers
1k views

Blender 2.8 Python Addon: How to register a Button?

I am sure one could define a shortcut in the preferences, but for several reasons I'm interested in this add-on solution: I'm trying to learn Python. …
Luis's user avatar
  • 109
0 votes
0 answers
352 views

of a registerable rna type (ToolSettiRegister Addon: ValueError: register_class(...): expect...

This question follows: Blender 2.8 Python Addon: How to register a Button? Late thanks dr.Sybren! I like your "Scripting for Artists". …
Luis's user avatar
  • 109
1 vote
1 answer
168 views

foreach_set - Doesn't "False" toggle selection off?

I have some verticies selected (for example vtx[0] from total 9), but try to select some others using "foreach_set". So, I create an array (...here with 8 times "False", except vtx[8] is "True") and " …
Luis's user avatar
  • 109
1 vote

foreach_set - Doesn't "False" toggle selection off?

This seems to work: oa = bpy.context.active_object bpy.ops.object.mode_set(mode='OBJECT') sl = np.zeros(9, dtype=np.int32) sl[8] = 1 setV = np.zeros(len(oa.data.vertices), dtype=np.bool) setE = np. …
Luis's user avatar
  • 109
0 votes
0 answers
75 views

Invoking Operator fetched from C.window_manager.operators

This follows my question "Accessing Transform Operator History inclusive constraint_axis in Python script" As you can see, I get an operator from the "history" stored in C.window_manager.operators inclusive …
Luis's user avatar
  • 109
0 votes
0 answers
93 views

Is it possible to force invoked default transform operator to start/finish with custom event?

This is a very simplified version of the addon, I'm working on: import bpy import numpy as np def get_oa(): bpy.context.view_layer.update() layer = bpy.context.view_layer layer.update() …
Luis's user avatar
  • 109
0 votes
0 answers
128 views

Accessing Transform Operator History inclusive constraint_axis in Python script

Please have a look at this: I am writing a script wich changes selected verts. Lets say the user is in Box-select-mode (...or whatever tool), selects something, does some constrained transformatio …
Luis's user avatar
  • 109
1 vote
1 answer
265 views

How to get 2D-viewport coords using numpy?

I started an add-on by copying operators and ended up using numpy. I have some raw 3D-vertex-coords and need there 2D-viewport-coords. I'd like to do the following, but with numpy: for area in bpy. …
Luis's user avatar
  • 109
0 votes

How to "refresh" variables / selected components for an operator in python script?

The right answer is, that all tho code outside the OP stays "static". Running everything inside the OP solves the problem.
Luis's user avatar
  • 109
1 vote
1 answer
527 views

How to "refresh" variables / selected components for an operator in python script?

I'm working on an addon changing selected verticies per keyboard. It collects data: import bpy import numpy as np import bmesh ################ update scene #################### bpy.context.view_laye …
Luis's user avatar
  • 109