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

Today

Campbell Barton (campbellbarton) added a comment to T59090: Confusing DepsgraphUpdate fields.

@Brecht Van Lommel (brecht) as far as I can see dirty applies here: internally ID_RECALC_TRANSFORM / ID_RECALC_GEOMETRY means this data needs to be recalculated, and that the current state isn't ensured to be up to date.

Mon, Dec 10, 3:40 AM · Python, BF Blender: 2.8, BF Blender
Brecht Van Lommel (brecht) assigned T59090: Confusing DepsgraphUpdate fields to Campbell Barton (campbellbarton).

@Campbell Barton (campbellbarton), please revert rB45fdf41be8 and rB6d38d824377.

Mon, Dec 10, 12:26 AM · Python, BF Blender: 2.8, BF Blender

Yesterday

Paul Melis (paulmelis) added a comment to T59089: Custom render engine not being called for interactive rendering, get EVEE instead..

well, no shading at all, but that's to be expected since you don't seem to have implemented any drawing in view_draw yet.

Sun, Dec 9, 11:27 PM · BF Blender: 2.8, Python, BF Blender
Paul Melis (paulmelis) added a comment to T59090: Confusing DepsgraphUpdate fields.

This is the conventional terminology in computing. Read "is dirty" as meaning "needs cleanup" or in this case, "needs updated".

Sun, Dec 9, 11:25 PM · Python, BF Blender: 2.8, BF Blender
Benjamin Humpherys (brhumphe) added a comment to T59089: Custom render engine not being called for interactive rendering, get EVEE instead..

Confirmed on 168a6a4bfc1 on windows. Running the script AND setting the renderer from the command line does not update which engine is used in the renderer shading mode in the 3d viewport, despite the mode being set:

>>> bpy.context.scene.render.engine
'custom_renderer'
Sun, Dec 9, 11:23 PM · BF Blender: 2.8, Python, BF Blender
Benjamin Humpherys (brhumphe) added a comment to T59090: Confusing DepsgraphUpdate fields.

It seems contradictory when something called is_xxx_dirty being True actually means "not updated".

Sun, Dec 9, 10:47 PM · Python, BF Blender: 2.8, BF Blender
Paul Melis (paulmelis) added a comment to T59090: Confusing DepsgraphUpdate fields.

Hmm, more weird behaviour:

Sun, Dec 9, 10:37 PM · Python, BF Blender: 2.8, BF Blender
Paul Melis (paulmelis) created T59090: Confusing DepsgraphUpdate fields.
Sun, Dec 9, 10:28 PM · Python, BF Blender: 2.8, BF Blender
Paul Melis (paulmelis) created T59089: Custom render engine not being called for interactive rendering, get EVEE instead..
Sun, Dec 9, 10:06 PM · BF Blender: 2.8, Python, BF Blender
Benjamin Humpherys (brhumphe) added a comment to T59044: Cannot programmatically set context area to FILE_BROWSE.

The problem is the message does not correctly show all the valid enum values. For example, 'CONSOLE' is truncated.

Sun, Dec 9, 7:07 AM · Python, BF Blender: 2.8

Sat, Dec 8

Benjamin Humpherys (brhumphe) added a project to T59044: Cannot programmatically set context area to FILE_BROWSE: Python.
Sat, Dec 8, 10:50 PM · Python, BF Blender: 2.8
Jose Conseco (joseconseco) reopened T58734: bvhtree.fromObject - error ( returned NULL without setting an error) in blender 2.8 as "Open".

Thanks for the fix. The operation bvhtree .fromObject now works when executed once. But it crashes on second run of operation each time:
Steps to reproduce:
run in console:

from mathutils.bvhtree import BVHTree
BVHTree.FromObject(C.active_object, C.depsgraph) 
BVHTree.FromObject(C.active_object, C.depsgraph)  #it will crash here (no error)
Sat, Dec 8, 6:19 PM · BF Blender: 2.8, Python
Philipp Oeser (lichtwerk) triaged T58937: Appended menus to VIEW3D_MT_editor_menus are not displayed as Confirmed priority.

Seems like VIEW3D_HT_header calls
VIEW3D_MT_editor_menus.draw_collapsible(context, layout)

Sat, Dec 8, 3:30 PM · Python, BF Blender: 2.8, BF Blender

Fri, Dec 7

Bastien Montagne (mont29) closed T58856: Python: "to_mesh" broken in 2.8 as Resolved by committing rBde491abf9962: Fix modifiers evaluation outside of depsgraph/CoW context..
Fri, Dec 7, 6:59 PM · Python, BF Blender: 2.8
Bastien Montagne (mont29) added a comment to T58856: Python: "to_mesh" broken in 2.8.

Please do not merge reports just because they use the same general 'end tool'… applying armature modifier has little to see with applying one using curves.

Fri, Dec 7, 3:34 PM · Python, BF Blender: 2.8
Dalai Felinto (dfelinto) added a comment to T58734: bvhtree.fromObject - error ( returned NULL without setting an error) in blender 2.8.

For the record, the API changed, see e7c3f7ba6f1385a2138862de8568e571fa97b5b4.

Fri, Dec 7, 3:02 PM · BF Blender: 2.8, Python
domlysz (domlysz) created T58937: Appended menus to VIEW3D_MT_editor_menus are not displayed.
Fri, Dec 7, 2:22 PM · Python, BF Blender: 2.8, BF Blender
Philipp Oeser (lichtwerk) edited projects for T58856: Python: "to_mesh" broken in 2.8, added: BF Blender: 2.8, Python; removed BF Blender.
Fri, Dec 7, 2:14 PM · Python, BF Blender: 2.8
Terrell (GameDragon) created T58928: New Action causes crash when duplicating bone.
Fri, Dec 7, 1:20 PM · Python, BF Blender
Dalai Felinto (dfelinto) added a comment to T58641: Identifier resulted from prop_search is prefixed by three spaces..

For the records, this also causes T58917 to happen. I will see there if I can change the stored data to pointer (don't recall why I used strings in the first place).

Fri, Dec 7, 11:52 AM · Python, BF Blender: 2.8, BF Blender

Thu, Dec 6

Brecht Van Lommel (brecht) closed T55778: Cannot link object via bpy.context.collection.objects.link() after manual Delete operator invocation (*) as Resolved.

This appears to be fixed.

Thu, Dec 6, 8:02 PM · Python, BF Blender: 2.8
Jacques Lucke (JacquesLucke) assigned T58803: module 'bpy.utils' has no attribute 'register_tool' to Campbell Barton (campbellbarton).
Thu, Dec 6, 3:29 PM · Python, BF Blender: 2.8

Wed, Dec 5

Brecht Van Lommel (brecht) closed T58823: API object.hide_render flag and its relation to collection visibility inconsistent as Archived.

object.hide_render does not tell you if the object is hidden, it only returns the value of the property as set by the user. This is the same as in 2.7x.

Wed, Dec 5, 11:05 PM · Python, BF Blender: 2.8, BF Blender
Benjamin Humpherys (brhumphe) added a project to T58803: module 'bpy.utils' has no attribute 'register_tool': Python.
Wed, Dec 5, 10:19 PM · Python, BF Blender: 2.8
Paul Melis (paulmelis) added a comment to T58823: API object.hide_render flag and its relation to collection visibility inconsistent .

Wed, Dec 5, 9:42 PM · Python, BF Blender: 2.8, BF Blender
Paul Melis (paulmelis) created T58823: API object.hide_render flag and its relation to collection visibility inconsistent .
Wed, Dec 5, 9:41 PM · Python, BF Blender: 2.8, BF Blender
Alexander Gavrilov (angavrilov) closed T58391: Curve shape keys python data gets mixed up and extra points added as Resolved by committing rB16aa7dfa196d: Fix T58391: correctly handle Curve Shape Key layout in Python API..
Wed, Dec 5, 4:37 PM · Python, BF Blender: 2.8
Alexander Gavrilov (angavrilov) claimed T58391: Curve shape keys python data gets mixed up and extra points added.

Curve shapekey data is more complicated than coordinates, and even more so in 2.8 after rB12788906. I suspect python API wrappers don't take that into account.

Wed, Dec 5, 12:57 PM · Python, BF Blender: 2.8
Philipp Oeser (lichtwerk) edited projects for T58391: Curve shape keys python data gets mixed up and extra points added, added: BF Blender: 2.8, Python; removed BF Blender.
Wed, Dec 5, 12:02 PM · Python, BF Blender: 2.8
Bastien Montagne (mont29) closed T58734: bvhtree.fromObject - error ( returned NULL without setting an error) in blender 2.8 as Resolved.
Wed, Dec 5, 11:29 AM · BF Blender: 2.8, Python

Tue, Dec 4

Jose Conseco (joseconseco) created T58734: bvhtree.fromObject - error ( returned NULL without setting an error) in blender 2.8.
Tue, Dec 4, 8:03 PM · BF Blender: 2.8, Python
Jacques Lucke (JacquesLucke) added a comment to T58641: Identifier resulted from prop_search is prefixed by three spaces..

Maybe the description of ID.name should be changed.
So we have three types of names in the api now?

  • object name
  • object name + library part
  • prefix + object name + library part
Tue, Dec 4, 4:54 PM · Python, BF Blender: 2.8, BF Blender
Bastien Montagne (mont29) added a comment to T58641: Identifier resulted from prop_search is prefixed by three spaces..

And I do not think prop_search storing extended name is fine, it's just way too complicated to change this to store actual full ID name, so not worth the effort imho.

Tue, Dec 4, 4:50 PM · Python, BF Blender: 2.8, BF Blender
Bastien Montagne (mont29) added a comment to T58641: Identifier resulted from prop_search is prefixed by three spaces..

Making name collision impossible with a single string is close to impossible (guess since ID names have fixed max length, we could force lib part beyond the 67th char to get that result, but would not be very user-friendly display then).

Tue, Dec 4, 4:49 PM · Python, BF Blender: 2.8, BF Blender
Jacques Lucke (JacquesLucke) added a comment to T58641: Identifier resulted from prop_search is prefixed by three spaces..

Ok, I think that .prop_search uses the extended names is fine. (If it is documented somewhere what all the letters mean exactly. I have not found any docs for that yet.)

Tue, Dec 4, 4:27 PM · Python, BF Blender: 2.8, BF Blender
Bastien Montagne (mont29) added a comment to T58641: Identifier resulted from prop_search is prefixed by three spaces..

But if you are interested in diving into the search_prop & friends maze to avoid that behavior, be my guest. For now I think we have something that works well and easily in all decent cases. If user wants to start naming their object L Cube [untitled.blend], that’s their issue. Just use Pointer prop to store IDs then.

Tue, Dec 4, 4:13 PM · Python, BF Blender: 2.8, BF Blender
Bastien Montagne (mont29) added a comment to T58641: Identifier resulted from prop_search is prefixed by three spaces..

If you are crazy enough to name your objects that way, there is no miracle indeed. That’s why I said that ID should be stored in Pointer prop, not string one, unless absolutely not possible to do otherwise.

Tue, Dec 4, 4:10 PM · Python, BF Blender: 2.8, BF Blender
Jacques Lucke (JacquesLucke) added a comment to T58641: Identifier resulted from prop_search is prefixed by three spaces..

Well, this little trick does not make id names really unique, right? When I have two local objects named Cube and L Cube [untitled.blend] and one linked object called Cube (linked from a file called untitled.blend), then I can't access the linked object object from bpy.data.objects[...].

Tue, Dec 4, 4:05 PM · Python, BF Blender: 2.8, BF Blender
Bastien Montagne (mont29) added a comment to T58641: Identifier resulted from prop_search is prefixed by three spaces..

Eeeeeh… well, thing is, for UI display, we use those three-chars prefixed names (having some info like linked, orphaned, etc.). It will also append the library name in case of linked datablock. This ensures fully unique ID name (identifier, inside of a given ID type) across whole .blend file.

Tue, Dec 4, 3:41 PM · Python, BF Blender: 2.8, BF Blender
Jacques Lucke (JacquesLucke) added a comment to T58641: Identifier resulted from prop_search is prefixed by three spaces..

I looked into the code and it seems like these three letters are used to differentiate e.g. linked objects.

Tue, Dec 4, 12:18 PM · Python, BF Blender: 2.8, BF Blender
Brecht Van Lommel (brecht) added a comment to T58641: Identifier resulted from prop_search is prefixed by three spaces..

It sounds like a bug to me, can't think of a reason why it should be like that.

Tue, Dec 4, 12:17 PM · Python, BF Blender: 2.8, BF Blender
Jacques Lucke (JacquesLucke) triaged T58641: Identifier resulted from prop_search is prefixed by three spaces. as Confirmed priority.

I can confirm that. Is it supposed to be like that, @Brecht Van Lommel (brecht) @Bastien Montagne (mont29) ?

Tue, Dec 4, 12:16 PM · Python, BF Blender: 2.8, BF Blender
Campbell Barton (campbellbarton) closed T58474: Gizmo Operator Template fails on rerun as Resolved by committing rBc631782542f4: Fix T58474: Gizmo Operator template fails on rerun.
Tue, Dec 4, 12:19 AM · Python, BF Blender: 2.8, BF Blender

Mon, Dec 3

Omar Ahmad (OmarSquircleArt) created T58641: Identifier resulted from prop_search is prefixed by three spaces..
Mon, Dec 3, 8:51 PM · Python, BF Blender: 2.8, BF Blender

Sun, Dec 2

lucas veber (lucky3) added a comment to T58525: Python: "make_single_user" operator crashes.

Oops sorry, I had searched for any "make_single_user" bugs, which did not output anything. Will search for more keywords next time.

Sun, Dec 2, 4:20 PM · Python, BF Blender: 2.8, BF Blender
Brecht Van Lommel (brecht) merged task T58525: Python: "make_single_user" operator crashes into T58351: Make Single User crashes.
Sun, Dec 2, 4:13 PM · Python, BF Blender: 2.8, BF Blender
lucas veber (lucky3) created T58525: Python: "make_single_user" operator crashes.
Sun, Dec 2, 4:02 PM · Python, BF Blender: 2.8, BF Blender
Benjamin Humpherys (brhumphe) added a comment to T58069: "ModuleNotFoundError: No module named 'bpy_types'" when building as Python module.

@Campbell Barton (campbellbarton) Fair enough. I can see how changing it to work with sys.path could be more effort than it’s worth. It’s good to know what the issue is, this was bugging me for weeks! If I find a solution I’ll pass it along.

Sun, Dec 2, 1:21 AM · Python, BF Blender

Sat, Dec 1

Campbell Barton (campbellbarton) added a comment to T58069: "ModuleNotFoundError: No module named 'bpy_types'" when building as Python module.

@Benjamin Humpherys (brhumphe) if you get this working, it'd be good to apply changes to CMake.

Sat, Dec 1, 11:48 PM · Python, BF Blender
Florian Meyer (testscreenings) created T58474: Gizmo Operator Template fails on rerun.
Sat, Dec 1, 10:23 PM · Python, BF Blender: 2.8, BF Blender