PythonProject
ActivePublic

Members

  • This project does not have any members.

Properties

Description

Python API for scripting and console editor.

Module Owner: @Campbell Barton (campbellbarton)

Recent Activity

Thu, Apr 13

Aaron Carlisle (Blendify) closed T37754: Patch: DatablockProperty and DatablockVectorProperty as "Resolved".

Committed in rBa7b3047cefcb

Thu, Apr 13, 9:38 PM · Python, BF Blender
Aaron Carlisle (Blendify) added inline comments to D2621: API Docs: Add html logo.
Thu, Apr 13, 6:41 PM · Python, BF Blender, Documentation
Aaron Carlisle (Blendify) created D2621: API Docs: Add html logo.
Thu, Apr 13, 6:39 PM · Python, BF Blender, Documentation

Sun, Apr 9

Ulysse Martin (youle) added a comment to T51114: PyAPI: Problem to compile API (sphinx_doc_gen.**).

There's a new version of sphinx (1.5.5) which seems to fix the issue. I don't know if all the documentation is compiled but the issue seems fixed. I let you test, confirm and close if this is ok for you. Bye!

Sun, Apr 9, 3:34 PM · Documentation, Python, BF Blender
Konstantin (Ko) added a comment to T47811: Blender 2.8x / Python, Proposed Changes.

Scipy can realy help to terrain heightfield generation and image processing addons. Like "Sverchok" one, or "ANT landscape". scipy module and Sverchok

Sun, Apr 9, 12:43 PM · Restricted Project, Python

Fri, Apr 7

Ulysse Martin (youle) edited the description of T51114: PyAPI: Problem to compile API (sphinx_doc_gen.**).
Fri, Apr 7, 8:39 PM · Documentation, Python, BF Blender
Andrew Martin (Mutz) closed T51136: user_clear causing crash to desktop as "Invalid".

Not a bug

Fri, Apr 7, 1:01 AM · Python

Thu, Apr 6

Andrew Martin (Mutz) created T51136: user_clear causing crash to desktop.
Thu, Apr 6, 2:50 PM · Python

Wed, Apr 5

Campbell Barton (campbellbarton) updated subscribers of T47811: Blender 2.8x / Python, Proposed Changes.
Wed, Apr 5, 5:54 AM · Restricted Project, Python
Campbell Barton (campbellbarton) added a comment to T47811: Blender 2.8x / Python, Proposed Changes.

Update: Move to Python3.6 is planned after 2.79 release.

Wed, Apr 5, 5:53 AM · Restricted Project, Python
Campbell Barton (campbellbarton) edited the description of T47811: Blender 2.8x / Python, Proposed Changes.
Wed, Apr 5, 5:52 AM · Restricted Project, Python

Tue, Apr 4

Aaron Carlisle (Blendify) assigned T51114: PyAPI: Problem to compile API (sphinx_doc_gen.**) to Campbell Barton (campbellbarton).
Tue, Apr 4, 9:00 PM · Documentation, Python, BF Blender
Sybren A. Stüvel (sybren) added a comment to T47811: Blender 2.8x / Python, Proposed Changes.

This is a bit not related, but several addons still use imp.reload instead of importlib.

Tue, Apr 4, 9:37 AM · Restricted Project, Python

Mon, Apr 3

Vuk Gardašević (lijenstina) added a comment to T47811: Blender 2.8x / Python, Proposed Changes.

This is a bit not related, but several addons still use imp.reload instead of importlib.
Also some example could be added to the python documentation about the proper way of reloading the modules in complex add-ons using __init__.
(like the the case of reloading modules after other imports - it will prevent the add-on of registering).
The example in the API in Gotchas is not covering that case that is quite often in Blender.

Mon, Apr 3, 8:57 PM · Restricted Project, Python

Fri, Mar 31

Sybren A. Stüvel (sybren) added a comment to T47811: Blender 2.8x / Python, Proposed Changes.

Just a note about handlers:
I did not check how it works but ... to avoid misusing them, it would be interesting to add information in console about adding and removing handlers. This would help add-on developers to take more care about using them.

Fri, Mar 31, 5:46 PM · Restricted Project, Python

Tue, Mar 28

Jeducious (jameshcrowther) added a comment to T47811: Blender 2.8x / Python, Proposed Changes.

I think there is sufficient information in the blender api, though I think the issue here is that the scene_handler_pre handler does something that is not expected by triggering constantly.

Tue, Mar 28, 5:34 AM · Restricted Project, Python
Germano Cavalcante (mano-wii) added a comment to T47811: Blender 2.8x / Python, Proposed Changes.

Just a note about handlers:
I did not check how it works but ... to avoid misusing them, it would be interesting to add information in console about adding and removing handlers. This would help add-on developers to take more care about using them.

Tue, Mar 28, 5:14 AM · Restricted Project, Python
Jeducious (jameshcrowther) added a comment to T47811: Blender 2.8x / Python, Proposed Changes.

@Campbell Barton (campbellbarton) I like the approach of not adding this into 2.8 so we can find a way around this, more time would really be appreciated so we can perhaps work together to find a more acceptable way forward :D.

Tue, Mar 28, 5:00 AM · Restricted Project, Python
Campbell Barton (campbellbarton) added a comment to T47811: Blender 2.8x / Python, Proposed Changes.

@Jeducious (jameshcrowther), in reply to your post - running Python scripts continuously is just not very scalable. A single addon might use it... but once more then a few start to use this its likely to slow Blender down.

Tue, Mar 28, 3:45 AM · Restricted Project, Python
Campbell Barton (campbellbarton) added a comment to T47811: Blender 2.8x / Python, Proposed Changes.

@Sybren A. Stüvel (sybren), thanks for the info, seems this is worth supporting, from xxx import * is discouraged by pep8 and our own style guide. Just did a quick check and used of this are mostly in addons (and some tests but in general its not used).

Tue, Mar 28, 3:37 AM · Restricted Project, Python
Aaron Carlisle (Blendify) removed projects from T51052: CacheFile Open Operator Crashes Blender: Platform: Windows, Platform: Linux.
Tue, Mar 28, 1:15 AM · Python, Import/Export, BF Blender

Mon, Mar 27

Sybren A. Stüvel (sybren) added a comment to T47811: Blender 2.8x / Python, Proposed Changes.

If we can't actually make use of them in any meaningful way, beyond them acting as type-comments.

For example, if tools to validate types don't work properly when run within Blender.

Code readability is a nice aspect you mention but if we cant validate them its quite weak and likely some are wrong nobody notices.

Mon, Mar 27, 12:08 PM · Restricted Project, Python

Sun, Mar 26

Jared Webber (lvxejay) added a comment to T51052: CacheFile Open Operator Crashes Blender.

Operator requires an execution override to work properly:

Sun, Mar 26, 11:03 AM · Python, Import/Export, BF Blender
Jared Webber (lvxejay) added a comment to T51052: CacheFile Open Operator Crashes Blender.

When called from the Dynamic Context Menu (spacebar), it works just fine

Sun, Mar 26, 10:51 AM · Python, Import/Export, BF Blender
Jeducious (jameshcrowther) added a comment to T47811: Blender 2.8x / Python, Proposed Changes.

Hi, my comment regards the propsed changes to the scene_update_pre handler. To some extent I'm echoing Brendon's concerns - (repeated below).

Sun, Mar 26, 10:35 AM · Restricted Project, Python
Campbell Barton (campbellbarton) triaged T51052: CacheFile Open Operator Crashes Blender as "Confirmed" priority.
Sun, Mar 26, 9:10 AM · Python, Import/Export, BF Blender
Jared Webber (lvxejay) created T51052: CacheFile Open Operator Crashes Blender.
Sun, Mar 26, 9:08 AM · Python, Import/Export, BF Blender
Campbell Barton (campbellbarton) added a comment to T47811: Blender 2.8x / Python, Proposed Changes.

Let's start using [type hints]. Python code can be very "we get this thing from somewhere and pass it along"-like, and figuring out what it is supposed to be can be challenging. By declaring types (even if Python itself doesn't check) IMO we get easier to read & understand code. Furthermore, IDEs can also use those to aid developers with code completion.

Python continues to improve its type declarations, in 3.6x they're quite good, but think its worth seeing how we can get real benefits from them.

In what way are the benefits I described not "real"?

Sun, Mar 26, 7:52 AM · Restricted Project, Python

Mar 21 2017

Sybren A. Stüvel (sybren) added a comment to T47811: Blender 2.8x / Python, Proposed Changes.

Let's start using [type hints]. Python code can be very "we get this thing from somewhere and pass it along"-like, and figuring out what it is supposed to be can be challenging. By declaring types (even if Python itself doesn't check) IMO we get easier to read & understand code. Furthermore, IDEs can also use those to aid developers with code completion.

Python continues to improve its type declarations, in 3.6x they're quite good, but think its worth seeing how we can get real benefits from them.

Mar 21 2017, 2:54 PM · Restricted Project, Python

Mar 20 2017

Campbell Barton (campbellbarton) added a comment to T47811: Blender 2.8x / Python, Proposed Changes.

Replace our own auto-completion with Python's for the Py-Console (more a general TODO).

Again, nice TODO, but think this can be done pretty much any time?

I would be so happy if the history management of our Py-Console would be the same as Python, Bash, ZSH and others. In other words: after pressing up a few times, once you press enter, the new entry is at the bottom of the history, and your "history pointer" is there to; pressing down shouldn't do anything (because you're at the bottom of the history), and pressing up should give you the previous command. Right now you're floating somewhere in the middle of your history.

Mar 20 2017, 3:43 PM · Restricted Project, Python
Campbell Barton (campbellbarton) edited the description of T47811: Blender 2.8x / Python, Proposed Changes.
Mar 20 2017, 3:36 PM · Restricted Project, Python
Campbell Barton (campbellbarton) added a comment to T47811: Blender 2.8x / Python, Proposed Changes.

@Sybren A. Stüvel (sybren) using @ is handy but quite a disruptive change.

Mar 20 2017, 3:33 PM · Restricted Project, Python
Campbell Barton (campbellbarton) edited the description of T47811: Blender 2.8x / Python, Proposed Changes.
Mar 20 2017, 3:20 PM · Restricted Project, Python

Mar 18 2017

Campbell Barton (campbellbarton) edited the description of T47811: Blender 2.8x / Python, Proposed Changes.
Mar 18 2017, 10:01 AM · Restricted Project, Python
Campbell Barton (campbellbarton) edited the description of T47811: Blender 2.8x / Python, Proposed Changes.
Mar 18 2017, 10:00 AM · Restricted Project, Python

Mar 17 2017

Campbell Barton (campbellbarton) edited the description of T47811: Blender 2.8x / Python, Proposed Changes.
Mar 17 2017, 10:20 AM · Restricted Project, Python

Mar 14 2017

Alexandr Zinovev (raa) abandoned D2453: Add "undo_history" property to bpy.context.

Commited rB1208792adb30
Thanks, @Campbell Barton (campbellbarton)!

Mar 14 2017, 6:52 PM · Python, BF Blender
Aaron Carlisle (Blendify) closed T30723: Style cleanup suggestion (blender\release\scripts\modules), *Postponed for 2.63 release* as "Archived".
Mar 14 2017, 3:42 PM · Python, BF Blender
Alexandr Zinovev (raa) updated the diff for D2453: Add "undo_history" property to bpy.context.

Add operators with UNDO flag into C.window_manager.operators.

Mar 14 2017, 3:28 PM · Python, BF Blender

Mar 13 2017

Germano Cavalcante (mano-wii) changed the status of T50920: Crash when passing geom and context to bmesh.ops.delete when all is selected from "Invalid" to "Resolved" by committing rB2b3cc2438820: Fix T50920: Adds missing edges on return of bisect operator.
Mar 13 2017, 1:22 PM · Python, BF Blender

Mar 12 2017

Aaron Carlisle (Blendify) abandoned D2295: Remove old blender.org theme.

Will be going with a different approach soonish.

Mar 12 2017, 5:57 PM · Python, BF Blender
Germano Cavalcante (mano-wii) added a comment to T50920: Crash when passing geom and context to bmesh.ops.delete when all is selected.

Thus:

vn, en, fn = len(bm.verts), len(bm.edges), len(bm.faces)
op()
geom += bm.verts[vn:] + bm.edges[en:] + bm.faces[fn:]
Mar 12 2017, 5:28 PM · Python, BF Blender
Tom Wilson (hedgehog90) added a comment to T50920: Crash when passing geom and context to bmesh.ops.delete when all is selected.

I posted the question on BSE.

Mar 12 2017, 1:17 PM · Python, BF Blender
Germano Cavalcante (mano-wii) closed T50920: Crash when passing geom and context to bmesh.ops.delete when all is selected as "Invalid".

Actually the crash occurs because the execution of the script is being interrupted before the bmesh.update_edit_mesh(mesh).

Mar 12 2017, 12:50 AM · Python, BF Blender

Mar 11 2017

Shane Ambler (sambler) created T50920: Crash when passing geom and context to bmesh.ops.delete when all is selected.
Mar 11 2017, 10:07 AM · Python, BF Blender
Campbell Barton (campbellbarton) added a comment to D2453: Add "undo_history" property to bpy.context.

Talking with @Bastien Montagne (mont29), P453 - we think it might be best to add undo operators into window_manager.operators list, it allows most flexibility.

Mar 11 2017, 9:24 AM · Python, BF Blender

Mar 10 2017

Bastien Montagne (mont29) closed T50907: API documentation link broken in some releases as "Archived".

yeah, need to generate 2.78c API doc… thanks for the report, not a bug in any case.

Mar 10 2017, 3:28 PM · Python, Documentation
Campbell Barton (campbellbarton) added a comment to D2453: Add "undo_history" property to bpy.context.

Would rather follow logic that toolbar uses to check if an operator will show in the toolbar, this patch basically duplicates that logic.

Mar 10 2017, 10:57 AM · Python, BF Blender
Michael Otto (mayqel) created T50907: API documentation link broken in some releases.
Mar 10 2017, 9:30 AM · Python, Documentation

Mar 6 2017

Valera Barashkov (valera) added a comment to T50721: BVH overlap() failing to detect intersection due to bmesh rotation not updating until script ends.

Thanks! I was so convinced this was a bug, should have check the forums or stack overflow first..

Mar 6 2017, 5:57 PM · Python