Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
mika-f committed Nov 23, 2023
2 parents 94a57e8 + 3704941 commit 22b907c
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ body:
- 2.9.0
- 2.10.0
- 2.11.0
- 2.12.0
validations:
required: true
- type: dropdown
Expand Down Expand Up @@ -66,6 +67,7 @@ body:
- 3.6.2
- 3.6.4
- 3.6.5
- 4.0.0
- edge
- type: textarea
id: logs
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/feature-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,5 @@ body:
- 3.6.2
- 3.6.4
- 3.6.5
- 4.0.0
- edge
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ v2.0.0 supports the following versions of Blender:
- Blender 3.6.2 (x64 - Windows)
- Blender 3.6.4 (x64 - Windows)
- Blender 3.6.5 (x64 - Windows)
- Blender 4.0.0 (x64 - Windows)

## Installation

Expand Down
2 changes: 1 addition & 1 deletion src/blender-extension/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"author": "Natsuneko",
"description": "Blender add-on for import some files from drag-and-drop",
"blender": (3, 1, 0),
"version": (2, 11, 0),
"version": (2, 12, 0),
"location": "Drag and Drop Support",
"warning": "",
"category": "Import-Export",
Expand Down
28 changes: 22 additions & 6 deletions src/blender-injection/BlenderPatchPatterns.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,20 @@
struct BlenderPatchPattern
{
private:
// reference of func:bpy_interface.c#BPY_run_string_eval
// <= 3.6.5 reference of func:bpy_interface.c#BPY_run_string_eval
// >= 4.0.0 reference of func:bpy_interface_run.cc#BPY_run_string_eval
std::string _bpy_interface_BPY_run_string_eval;

// reference of func:space_view3d.c#view3d_ima_empty_drop_poll
// <= 3.6.5 reference of func:space_view3d.c#view3d_ima_empty_drop_poll
// >= 4.0.0 reference of func:space_view3d.cc#view3d_ima_empty_drop_poll
std::string _space_view3d_view3d_ima_empty_drop_poll;

// reference of func:space_view3d.c#view3d_ima_drop_poll
// <= 3.6.5 reference of func:space_view3d.c#view3d_ima_drop_poll
// >= 4.0.0 reference of func:space_view3d.cc#view3d_ima_drop_poll
std::string _space_view3d_view3d_ima_drop_poll;

// reference of func:view3d_select.c#ED_view3d_give_object_under_cursor
// <= 3.6.5 reference of func:view3d_select.c#ED_view3d_give_object_under_cursor
// >= 4.0.0 reference of func:view3d_select.cc#ED_view3d_give_object_under_cursor
std::string _view3d_select_ED_view3d_give_object_under_cursor;

public:
Expand Down Expand Up @@ -51,7 +55,8 @@ struct BlenderPatchPattern
}
};

// FUNCTION LOCATION - BPY_run_string_eval (search: "addon_utils.disable_all()" as ANSI string)
// FUNCTION LOCATION - BPY_run_string_eval (search: "addon_utils.disable_all()" as ANSI string)
// IMPLEMENTATION LOCATION - ANY
//
// XXX: LEA RAX, QWORD PTR [00007FF625E46700H] // RAX = ptr:addon_utils
// XXX: MOV QWORD PTR [RSP+38H], 0000000000000000H // [RSP+38] = NULL
Expand All @@ -63,7 +68,8 @@ struct BlenderPatchPattern
// XXX: CALL 00007FF61FF9E3C0H //
//
//
// FUNCTION LOCATION - view3d_ima_empty_drop_poll / view3d_id_path_drop_copy (search: "OBJECT_OT_drop_named_image" as ANSI string)
// FUNCTION LOCATION - view3d_ima_empty_drop_poll / view3d_id_path_drop_copy (search: "OBJECT_OT_drop_named_image" as ANSI string)
// IMPLEMENTATION LOCATION - source/blender/editors/space_view3d/space_view3d.cc
//
// XXX: LEA R9, QWORD PTR [00007FF7F2CAA530H] // R9 = ptr:view3d_id_path_drop_copy
// XXX: MOV QWORD PTR [RSP+28H], R14 // [RSP+28] = /* unknown */
Expand All @@ -79,6 +85,7 @@ struct BlenderPatchPattern
// FUNCTION LOCATION - ED_view3d_give_object_under_cursor (visit: "view3d_ima_empty_drop_poll" and second CALL)

static std::unordered_map<std::string, BlenderPatchPattern> Patchers{
#pragma region Blender 3.x
{

"3.1.0",
Expand Down Expand Up @@ -258,5 +265,14 @@ static std::unordered_map<std::string, BlenderPatchPattern> Patchers{
"E8 7B FF FF FF 84 C0",
"E8 EB BD 00 00 48 85 C0",
}
},
#pragma endregion
{
"4.0.0", {
"E8 A9 4E 45 00",
"4C 8D 05 09 0A 00 00",
"E8 7B FF FF FF 84 C0",
"E8 FB 26 00 00 48 85 C0"
}
}
};

0 comments on commit 22b907c

Please sign in to comment.