-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
395 additions
and
142 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,4 +40,5 @@ body: | |
- 3.4.1 | ||
- 3.5.0 | ||
- 3.5.1 | ||
- 3.6.0 | ||
- edge |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
name: Release for Windows | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v**" | ||
workflow_dispatch: | ||
|
||
jobs: | ||
setup: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
version: ${{ steps.vars.outputs.version }} | ||
steps: | ||
- id: vars | ||
run: | | ||
VERSION=$(echo ${{ github.ref }} | sed -e 's/refs\/tags\///' | sed -e 's/refs\/heads\///' | sed -e 's/\//-/') | ||
echo "version=$VERSION" >> $GITHUB_OUTPUT | ||
build: | ||
runs-on: windows-2022 | ||
needs: [setup] | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Add MSBuild to PATH | ||
uses: microsoft/[email protected] | ||
|
||
- name: Build Injector for Release | ||
run: | | ||
msbuild -p:Configuration=Release -p:Platform=x64 -t:Rebuild src/blender-injection/blender-injection.vcxproj | ||
- name: Build Extension for Release | ||
shell: powershell | ||
run: | | ||
New-Item .\bin -Type Directory | ||
Copy-Item -Recurse .\src\blender-extension\ .\bin\drag-and-drop-support\ | ||
- name: Collect Artifacts | ||
shell: powershell | ||
run: | | ||
$Archive = ".\bin\x64\DragAndDropSupport-${{ needs.setup.outputs.version }}" | ||
$Dest = "$Archive\drag-and-drop-support" | ||
New-Item $Dest -Type Directory | ||
Copy-Item .\src\blender-injection\x64\Release\*.dll $Dest\ | ||
Copy-Item .\src\blender-extension\* $Dest\ | ||
Copy-Item .\src\LICENSE.txt $Archive\ | ||
Compress-Archive "$Dest" "$Dest.zip" | ||
Remove-Item -Recurse $Dest | ||
- name: Packaging Artifacts | ||
shell: powershell | ||
run: | | ||
$Dest = "bin/x64/DragAndDropSupport-${{ needs.setup.outputs.version }}" | ||
Compress-Archive "$Dest" "$Dest.zip" | ||
Remove-Item -Recure $Dest | ||
Get-FileHash -Algorithm SHA256 "$Dest.zip" | Select-Object -ExpandProperty Hash | Tee-Object -FilePath "$Dest.zip.sha256" | ||
Get-FileHash -Algorithm MD5 "$Dest.zip" | Select-Object -ExpandProperty Hash | Tee-Object -FilePath "$Dest.zip.md5" | ||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: Windows-x64-Artifacts | ||
path: bin/x64/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,119 +1,12 @@ | ||
#pragma once | ||
|
||
// define memory layouts of Blender | ||
|
||
struct bContext | ||
{ | ||
int thread; | ||
|
||
struct | ||
{ | ||
void* manager; | ||
void* window; | ||
void* workspace; | ||
void* screen; | ||
void* area; | ||
void* region; | ||
void* menu; | ||
void* gizmo_group; | ||
void* store; | ||
|
||
const char* operator_poll_msg; | ||
|
||
struct PollMsgDyn_Params | ||
{ | ||
char* (*get_fn)(bContext*, void*); | ||
char* (*free_fn)(bContext*, void*); | ||
void* user_data; | ||
} operator_poll_msg_dyn_params; | ||
} wm; | ||
|
||
struct | ||
{ | ||
void* main; | ||
void* scene; | ||
int recursion; | ||
bool py_init; | ||
void* py_context; | ||
void* py_context_orig; | ||
} data; | ||
}; | ||
|
||
using eWM_DragFlags = enum eWM_DragFlags | ||
{ | ||
WM_DRAG_NOP = 0, | ||
WM_DRAG_FREE_DATA = 1, | ||
}; | ||
|
||
using ListBase = struct ListBase | ||
{ | ||
void *first, *last; | ||
}; | ||
|
||
using wmDragActiveDropState = struct wmDragActiveDropState | ||
{ | ||
struct wmDropBox* active_dropbox; | ||
struct ScrArea* area_from; | ||
struct ARegion* region_from; | ||
struct bContextStore* ui_context; | ||
const char* disabled_info; | ||
bool free_disabled_info; | ||
}; | ||
|
||
using wmDrag = struct wmDrag | ||
{ | ||
struct wmDrag *next, *prev; | ||
int icon; | ||
int type; | ||
void* poin; | ||
char path[1024]; | ||
double value; | ||
struct ImBuf* imb; | ||
float imbuf_scale; | ||
wmDragActiveDropState drop_state; | ||
eWM_DragFlags flags; | ||
ListBase ids; | ||
ListBase asset_items; | ||
}; | ||
|
||
using wmTabletData = struct wmTabletData | ||
{ | ||
int active; | ||
float pressure; | ||
float x_tilt; | ||
float y_tilt; | ||
char is_motion_absolute; | ||
}; | ||
|
||
using eWM_EventFlag = enum eWM_EventFlag | ||
{ | ||
WM_EVENT_SCROLL_INVERT = (1 << 0), | ||
WM_EVENT_IS_REPEAT = (1 << 1), | ||
WM_EVENT_FORCE_DRAG_THRESHOLD = (1 << 2), | ||
}; | ||
|
||
using wmEvent = struct wmEvent | ||
{ | ||
struct wmEvent *next, *prev; | ||
short type; | ||
short val; | ||
int xy[2]; | ||
int mval[2]; | ||
char utf8_buf[6]; | ||
uint8_t modifier; | ||
int8_t direction; | ||
short keymodifier; | ||
wmTabletData tablet; | ||
eWM_EventFlag flag; | ||
short custom; | ||
short customdata_free; | ||
void* customdata; | ||
short prev_type; | ||
short prev_val; | ||
int prev_xy[2]; | ||
short prev_press_type; | ||
int prev_press_xy[2]; | ||
uint8_t prev_press_modifier; | ||
short prev_press_keymodifier; | ||
double prev_press_time; | ||
}; | ||
#include "./stubs/bContext.h" | ||
#include "./stubs/eWM_DragDataType.h" | ||
#include "./stubs/eWM_DragFlags.h" | ||
#include "./stubs/eWM_EventFlag.h" | ||
#include "./stubs/ListBase.h" | ||
#include "./stubs/wmDrag.h" | ||
#include "./stubs/wmDragActiveDropState.h" | ||
#include "./stubs/wmDragPath.h" | ||
#include "./stubs/wmEvent.h" | ||
#include "./stubs/wmTabletData.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.