Page MenuHome

PythonProject
ActivePublic

Members

  • This project does not have any members.

Watchers (9)

Details

Description

Python API for scripting and console editor.

Module Owner: @Campbell Barton (campbellbarton)

Recent Activity

Sat, Feb 16

Vlad (Darcvizer) added a comment to T60891: Python bgl docs still includes deprecated OpenGL functions.

I would be happy to give an example of how to transfer the coordinates of a real object, rather than enter them manually.
https://docs.blender.org/api/blender2.8/gpu.html#wireframe-cube-using-index-buffer

Sat, Feb 16, 11:33 AM · Python, BF Blender

Thu, Feb 14

Bastian Neumann (bneu) added a comment to T60934: Undo crashes when calling bpy.ops.ed.undo_history(index=0) from Python in background mode.

Thank you for providing an fix for that issue.

Thu, Feb 14, 8:28 AM · Python, BF Blender
G. Krause (G.Krause) added a comment to T61443: ExportHelper crashes with exit code 3221226356 when called.

I have updated my Blender to yesterday's version and am unfortunately still having the same crashes.
I also updated my sample code in the first post, seems I deleted too much code when I was simplifying it. I am very sorry for that.
It should work (or rather crash) as intended now. I even added a small panel for convenience's sake.

Thu, Feb 14, 4:04 AM · Python, BF Blender: 2.8
G. Krause (G.Krause) raised the priority of T61443: ExportHelper crashes with exit code 3221226356 when called from Needs Information from User to Needs Triage by Developer.
Thu, Feb 14, 3:53 AM · Python, BF Blender: 2.8

Wed, Feb 13

Jacques Lucke (JacquesLucke) triaged T61443: ExportHelper crashes with exit code 3221226356 when called as Needs Information from User priority.

I cannot reproduce this in the current build. Please check if the issue still exists.
If yes, then please start Blender from the terminal and post the output here.

Wed, Feb 13, 5:33 PM · Python, BF Blender: 2.8
Sebastian Parborg (zeddb) merged task T59113: Addon's keymaps are not registered at Blender opening if the addon's enable state is saved in user preferences into T60766: Modal keymap customization from an addon is not restored properly.
Wed, Feb 13, 4:39 PM · Python, BF Blender

Tue, Feb 12

Piotr Kowalczyk (dopiotrko) added a comment to T61297: Blender is losing reference to collection property item when used in a recursive function?.

Ok. Thanks for Your help, and sorry for posting it here.

Tue, Feb 12, 3:20 PM · Addons, Python, BF Blender
Philipp Oeser (lichtwerk) added a comment to T61297: Blender is losing reference to collection property item when used in a recursive function?.

thanx @Bastien Montagne (mont29) for clearing that up! (sorry for my uneducated fiddeling here...)

Tue, Feb 12, 3:05 PM · Addons, Python, BF Blender
Piotr Kowalczyk (dopiotrko) added a comment to T61297: Blender is losing reference to collection property item when used in a recursive function?.
Tue, Feb 12, 2:57 PM · Addons, Python, BF Blender
dima glib (dairin0d) added a comment to T61433: Non-single-column layouts are not displayed correctly in menus.

Thanks again!

Tue, Feb 12, 2:55 PM · User Interface, Python, BF Blender
Bastien Montagne (mont29) closed T61297: Blender is losing reference to collection property item when used in a recursive function? as Invalid.

First of all, this is not a bug report at all, and should not be handled here. We have a site for that kind of question: https://devtalk.blender.org/

Tue, Feb 12, 2:44 PM · Addons, Python, BF Blender
Philipp Oeser (lichtwerk) added a comment to T61297: Blender is losing reference to collection property item when used in a recursive function?.

I can only repeat myself: I am on shaky ground here, if the above file doesnt work for you, I am probably out of ideas...

Tue, Feb 12, 2:42 PM · Addons, Python, BF Blender
Piotr Kowalczyk (dopiotrko) added a comment to T61297: Blender is losing reference to collection property item when used in a recursive function?.

Sorry, Your blend file was not empty, my mistake. But the error still occurs.

Tue, Feb 12, 2:35 PM · Addons, Python, BF Blender
Philipp Oeser (lichtwerk) added a comment to T61433: Non-single-column layouts are not displayed correctly in menus.

Not sure if this is the recommended way, but picking a region type for your spacetype that doesnt draw panels automatically seems fine, I guess...
So for space TEXT_EDITOR, you could use bl_region_type = 'HEADER', bl_region_type = 'WINDOW'?

Tue, Feb 12, 2:24 PM · User Interface, Python, BF Blender
Piotr Kowalczyk (dopiotrko) added a comment to T61297: Blender is losing reference to collection property item when used in a recursive function?.

This .blend file You attached is (as far as I know) default init blend file, so I can't check what You have changed. Please attach the changed .py file.
I followed Your directions:

  • I removed enumerate (It was there for testing purposes anyway), but this did not solve the problem.
  • I assume that Your step 2 was passing 'deepcopy(branch['sub_items'])' instead of ''branch['sub_items'] into the recursive function. It did not solve the problem for me (did it for You?). Please remember that (like I wrote in the comments of my py file) calling operator again does not replicate the error: "I have to restart blender to repeat the error". And after that changes error is still there. Also, the problem from Your link is little different from mine, because my problem is with 'current_item' variable (not with ''branch['sub_items']"). I am not passing 'current_item' to the recursive call, and as far as I know my current_tems variables from every scope point to a different object, coz I create it in the scope, not passing it as a parameter.

Regards.

Tue, Feb 12, 2:08 PM · Addons, Python, BF Blender
dima glib (dairin0d) added a comment to T61433: Non-single-column layouts are not displayed correctly in menus.

Thanks! layout.popover() seems like exactly what I need.

Tue, Feb 12, 1:24 PM · User Interface, Python, BF Blender
Philipp Oeser (lichtwerk) placed T61297: Blender is losing reference to collection property item when used in a recursive function? up for grabs.
Tue, Feb 12, 1:12 PM · Addons, Python, BF Blender
Philipp Oeser (lichtwerk) triaged T61297: Blender is losing reference to collection property item when used in a recursive function? as Normal priority.

Can confirm the crash (when accessing/printing the current_item after the recursive call)

Tue, Feb 12, 1:11 PM · Addons, Python, BF Blender
Piotr Kowalczyk (dopiotrko) added a comment to T61297: Blender is losing reference to collection property item when used in a recursive function?.

?

Tue, Feb 12, 12:14 PM · Addons, Python, BF Blender
Philipp Oeser (lichtwerk) closed T61433: Non-single-column layouts are not displayed correctly in menus as Resolved.

Oki, closing then

Tue, Feb 12, 11:33 AM · User Interface, Python, BF Blender
William Reynish (billreynish) added a comment to T61433: Non-single-column layouts are not displayed correctly in menus.

I think this is just a limitation of the menu system. For more custom layouts, use a popover.

Tue, Feb 12, 11:26 AM · User Interface, Python, BF Blender
Philipp Oeser (lichtwerk) added projects to T61433: Non-single-column layouts are not displayed correctly in menus: Python, User Interface.

Menus are a bit limited in regards to layout.
I dont have an exact list of these limitations (I just remeber I had an issue in D4215 as well).

Tue, Feb 12, 11:22 AM · User Interface, Python, BF Blender
G. Krause (G.Krause) updated the task description for T61443: ExportHelper crashes with exit code 3221226356 when called.
Tue, Feb 12, 11:19 AM · Python, BF Blender: 2.8
G. Krause (G.Krause) created T61443: ExportHelper crashes with exit code 3221226356 when called.
Tue, Feb 12, 11:12 AM · Python, BF Blender: 2.8
Philipp Oeser (lichtwerk) merged T61418: prop_search() on collections returns annotated name of collection in destination string property into T58641: Identifier resulted from prop_search is prefixed by three spaces..
Tue, Feb 12, 9:35 AM · Python, BF Blender

Sun, Feb 10

Campbell Barton (campbellbarton) added a comment to D4326: Fix Python 3 syntax errors reported in T61332.

I think this isn't worth worrying about, we could use from __future__ import print_function all over for our utilities, but in practice we never had people adding back old style print statements.

Sun, Feb 10, 12:57 AM · Python

Sat, Feb 9

Chris Clauss (ccc) added a comment to D4326: Fix Python 3 syntax errors reported in T61332.

The future import makes legacy print statements syntax errors even in Python 2 which prevents Python 2 developers from making changes which break Python 3 compatibility.

Sat, Feb 9, 7:38 AM · Python
Campbell Barton (campbellbarton) abandoned D4326: Fix Python 3 syntax errors reported in T61332.

Committed rB7262ac6202eb9258293473f35a24f375f9d6f635, no need for __future__

Sat, Feb 9, 3:13 AM · Python

Fri, Feb 8

Jacques Lucke (JacquesLucke) added a reviewer for D4326: Fix Python 3 syntax errors reported in T61332: Jacques Lucke (JacquesLucke).
Fri, Feb 8, 10:28 PM · Python
Philipp Oeser (lichtwerk) reopened T61297: Blender is losing reference to collection property item when used in a recursive function? as "Open".

That was probably a bit too quick on my side, need to look at that again (on Monday)...

Fri, Feb 8, 9:01 PM · Addons, Python, BF Blender
Chris Clauss (ccc) created D4326: Fix Python 3 syntax errors reported in T61332.
Fri, Feb 8, 8:40 PM · Python
Piotr Kowalczyk (dopiotrko) added a comment to T61297: Blender is losing reference to collection property item when used in a recursive function?.

I regret to write: it is not it :(.
I changed init to sub_init and I steel get TypeError: unsubscriptable object.


Regards

Fri, Feb 8, 7:27 PM · Addons, Python, BF Blender
Adam Dominec (emu) added a comment to T60093: Cycles bake (bpy.ops.object.bake) unstable when using `uv_layer` parameter.

I couldn't check that the bake result is correct. Yesterday's daily build crashes upon clicking the image dropdown menu in Image editor or UV editor. That's an unrelated issue, and I'll wait a day or two before reporting it.

Fri, Feb 8, 2:47 PM · BF Blender, Python, Cycles
Adam Dominec (emu) closed T60093: Cycles bake (bpy.ops.object.bake) unstable when using `uv_layer` parameter as Resolved.

Cool, it seems to be fixed in current daily builds. I close my bug report as resolved.

Fri, Feb 8, 2:41 PM · BF Blender, Python, Cycles
Philipp Oeser (lichtwerk) closed T61297: Blender is losing reference to collection property item when used in a recursive function? as Resolved.

RNA_def_property: runtime property identifier "TreeItems.items" - this keyword is reserved by python

Fri, Feb 8, 11:35 AM · Addons, Python, BF Blender
Piotr Kowalczyk (dopiotrko) updated the task description for T61297: Blender is losing reference to collection property item when used in a recursive function?.
Fri, Feb 8, 11:03 AM · Addons, Python, BF Blender
Jeducious (jameshcrowther) added a comment to T60934: Undo crashes when calling bpy.ops.ed.undo_history(index=0) from Python in background mode.

@Campbell Barton (campbellbarton) Thank you :), just downloaded the latest 2.80 beta directly from blender.org and so far, all working well. Thanks again. Can't overstate how grateful we are.... and relieved too. :)

Fri, Feb 8, 9:43 AM · Python, BF Blender
Campbell Barton (campbellbarton) changed the status of T60934: Undo crashes when calling bpy.ops.ed.undo_history(index=0) from Python in background mode from Archived to Resolved.

Committed basic undo system support in background mode: rB3d16a268ee688da25f72a1adb08fdaab454c344d

Fri, Feb 8, 12:21 AM · Python, BF Blender

Thu, Feb 7

Piotr Kowalczyk (dopiotrko) updated the task description for T61297: Blender is losing reference to collection property item when used in a recursive function?.
Thu, Feb 7, 11:13 PM · Addons, Python, BF Blender
Piotr Kowalczyk (dopiotrko) created T61297: Blender is losing reference to collection property item when used in a recursive function?.
Thu, Feb 7, 11:02 PM · Addons, Python, BF Blender
Sebastian Parborg (zeddb) triaged T55020: Blender crash when creating node tree links with Python as Needs Information from User priority.

Is this still an issue if you use the latest intel drivers?

Thu, Feb 7, 7:12 PM · Platform: Windows, Nodes, Python, BF Blender
Sebastian Parborg (zeddb) triaged T61264: obj.to_mesh() crashes on mesh with armature modifier, when run 2x as Confirmed, Medium priority.
Thu, Feb 7, 12:46 PM · Python, BF Blender: 2.8
Sebastian Parborg (zeddb) assigned T61264: obj.to_mesh() crashes on mesh with armature modifier, when run 2x to Sergey Sharybin (sergey).

I'm getting the following assert when changing the properties:
BLI_assert failed: blender/source/blender/depsgraph/intern/depsgraph_query.cc:145, DEG_get_evaluated_scene(), at 'scene_cow != __null && DEG::deg_copy_on_write_is_expanded(&scene_cow->id)'

Thu, Feb 7, 12:46 PM · Python, BF Blender: 2.8
Tom Edwards (artfunkel) added a comment to T60934: Undo crashes when calling bpy.ops.ed.undo_history(index=0) from Python in background mode.

I also take copies of objects. I then, among other things:

Thu, Feb 7, 10:57 AM · Python, BF Blender
Jose Conseco (joseconseco) created T61264: obj.to_mesh() crashes on mesh with armature modifier, when run 2x.
Thu, Feb 7, 1:12 AM · Python, BF Blender: 2.8
Campbell Barton (campbellbarton) added a comment to T60934: Undo crashes when calling bpy.ops.ed.undo_history(index=0) from Python in background mode.

@Jeducious (jameshcrowther), updated P563 although this should be documented.

Thu, Feb 7, 12:31 AM · Python, BF Blender

Wed, Feb 6

Tom Edwards (artfunkel) added a comment to T60934: Undo crashes when calling bpy.ops.ed.undo_history(index=0) from Python in background mode.

I maintain an exporter add-on which messes extensively with the scene during export, then uses undo to clean everything up. Now that undo is unavailable in background mode junk objects are leaking out everywhere. I don't think that many users of my addon are running it in background mode...but *I* am for my unit tests, and those directly affect the quality of the addon.

Wed, Feb 6, 12:47 PM · Python, BF Blender
Benjamin Humpherys (brhumphe) removed a watcher for Python: Benjamin Humpherys (brhumphe).
Wed, Feb 6, 4:47 AM
Jeducious (jameshcrowther) added a comment to T60934: Undo crashes when calling bpy.ops.ed.undo_history(index=0) from Python in background mode.

Hi @Bastian Neumann (bneu), this is mostly a question of priorities since there are enough high priority undo bugs open which need attention, see: T61045

2.79b also didn't properly initialize undo, eg: wm_files.c

	if (!G.background) {
		BKE_undo_reset();
		BKE_undo_write(C, "original");  /* save current state */
	}

While it didn't crash, it wasn't fully working either.

This is something to look into, if we should have basic memfile undo support in background mode, or add the ability to fully initialize undo.

Some context for how you're using this feature in 2.79 would be helpful.


I commented about this on the thread that explained how to use it, but no one ever replied to my comment that it wasn't working.

Could you link to this post?

Wed, Feb 6, 4:46 AM · Python, BF Blender
Jeducious (jameshcrowther) added a comment to T60934: Undo crashes when calling bpy.ops.ed.undo_history(index=0) from Python in background mode.

@Jeducious (jameshcrowther), can you briefly explain what you need undo in background mode for? For memory usage on render nodes being able to save memory is quite important, and now might be a good time to make such a breaking change. However there may be solutions to handle both cases.

Note that there is a replacement for scene_update_post in the form of depsgraph_update_post and the new timer API.

Wed, Feb 6, 4:34 AM · Python, BF Blender