Skip to content

Commit

Permalink
organize scripts for qt5 and qt4
Browse files Browse the repository at this point in the history
  • Loading branch information
Neill3d committed Feb 4, 2019
1 parent 5262775 commit 9c227b4
Show file tree
Hide file tree
Showing 84 changed files with 484 additions and 15 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
*.bsc
*.pdb
*.ilk
*.ipch

# Precompiled Headers
*.gch
Expand Down
2 changes: 1 addition & 1 deletion PythonScripts/Startup/AdditiveAnimationTool.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def PopulateLayout(mainLyt):
b.OnClick.Add( OnButtonAboutClick )
main.Add(b, 24)

gDEVELOPMENT = True
gDEVELOPMENT = False

def CreateTool():
print "create tool"
Expand Down
2 changes: 1 addition & 1 deletion PythonScripts/Startup/CleanUpManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
import sys
import math

gDEVELOPMENT = True
gDEVELOPMENT = False

CLEANUP_MANAGER_VERSION = 0.62

Expand Down
2 changes: 1 addition & 1 deletion PythonScripts/Startup/PostProcessingTool.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from pyfbsdk_additions import *

TOOL_TITLE = 'Post Processing Tool'
gDEVELOPMENT = True
gDEVELOPMENT = False
DATA_CLASSNAME = 'PostPersistentData' # PostPersistentData
DATA_DEFAULT_NAME = 'Post Processing'
DATA_CLASSID = 55
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def ShowEvent(self, pControl, pEvent):
gToolName = "File Reference Advanced Tool"

#Development? - need to recreate each time!!
gDEVELOPMENT = True
gDEVELOPMENT = False

if gDEVELOPMENT:
FBDestroyToolByName(gToolName)
Expand Down
28 changes: 17 additions & 11 deletions Setup_Compiler/OpenMoBu.iss
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "OpenMoBu for Autodesk® MotionBuilder®"
#define MyAppVersion "1.3.0b"
#define MyAppVersion "2019.0.1b"
#define MyAppPublisher "Neill3d"
#define MyAppURL "https://github.com/Neill3d/OpenMoBu"
#define MyAppExeName "Setup_OpenMoBu_1_3_0b"
#define MyAppExeName "Setup_OpenMoBu_2019_0_1b"

[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"; InfoBeforeFile:"infoBefore_en.txt"; InfoAfterFile: "infoAfter_en.txt"
Expand All @@ -27,7 +27,7 @@ CreateAppDir=no
OutputBaseFilename={#MyAppExeName}
Compression=lzma
SolidCompression=yes
AppCopyright=Copyright (C) 2018 Neill3d
AppCopyright=Copyright (C) 2019 Neill3d
WizardImageFile=Neill3d2.bmp
WizardImageStretch=no
WizardSmallImageFile=Neill3d_sm.bmp
Expand Down Expand Up @@ -60,7 +60,8 @@ Source: "..\bin\x64\plugins_2014\*.dll"; DestDir: "{code:MoBu_Path64|2014}\bin\x
;Source: "..\bin\x64\plugins_2014\GLSL\*"; DestDir: "{code:MoBu_Path64|2014}\bin\x64\plugins\GLSL\"; Flags: ignoreversion; Components: MotionBuilder2014
;Source: "..\bin\x64\plugins_2014\GLSL_CS\*"; DestDir: "{code:MoBu_Path64|2014}\bin\x64\plugins\GLSL_CS\"; Flags: ignoreversion; Components: MotionBuilder2014
Source: "..\PythonScripts\Startup\*"; DestDir: "{userdocs}\MB\2014-x64\config\PythonStartup\"; Flags: ignoreversion; Components: MotionBuilder2014
Source: "..\PythonScripts\Startup\MBFileRefAdvanced\*"; DestDir: "{userdocs}\MB\2014-x64\config\PythonStartup\MBFileRefAdvanced\"; Flags: ignoreversion; Components: MotionBuilder2014
Source: "..\PythonScripts\Startup_Qt4\*"; DestDir: "{userdocs}\MB\2014-x64\config\PythonStartup\"; Flags: ignoreversion; Components: MotionBuilder2014
Source: "..\PythonScripts\Startup_Qt4\MBFileRefAdvanced\*"; DestDir: "{userdocs}\MB\2014-x64\config\PythonStartup\MBFileRefAdvanced\"; Flags: ignoreversion; Components: MotionBuilder2014
Source: "..\PythonScripts\Actions\*"; DestDir: "{code:MoBu_Path64|2014}\bin\config\Scripts\Neill3d\"; Flags: ignoreversion; Components: MotionBuilder2014

; 2015
Expand All @@ -69,7 +70,8 @@ Source: "..\bin\x64\plugins_2015\*.dll"; DestDir: "{code:MoBu_Path64|2015}\bin\x
;Source: "..\bin\x64\plugins_2015\GLSL\*"; DestDir: "{code:MoBu_Path64|2015}\bin\x64\plugins\GLSL\"; Flags: ignoreversion; Components: MotionBuilder2015
;Source: "..\bin\x64\plugins_2015\GLSL_CS\*"; DestDir: "{code:MoBu_Path64|2015}\bin\x64\plugins\GLSL_CS\"; Flags: ignoreversion; Components: MotionBuilder2015
Source: "..\PythonScripts\Startup\*"; DestDir: "{userdocs}\MB\2015-x64\config\PythonStartup\"; Flags: ignoreversion; Components: MotionBuilder2015
Source: "..\PythonScripts\Startup\MBFileRefAdvanced\*"; DestDir: "{userdocs}\MB\2015-x64\config\PythonStartup\MBFileRefAdvanced\"; Flags: ignoreversion; Components: MotionBuilder2015
Source: "..\PythonScripts\Startup_Qt4\*"; DestDir: "{userdocs}\MB\2015-x64\config\PythonStartup\"; Flags: ignoreversion; Components: MotionBuilder2015
Source: "..\PythonScripts\Startup_Qt4\MBFileRefAdvanced\*"; DestDir: "{userdocs}\MB\2015-x64\config\PythonStartup\MBFileRefAdvanced\"; Flags: ignoreversion; Components: MotionBuilder2015
Source: "..\PythonScripts\Actions\*"; DestDir: "{code:MoBu_Path64|2015}\bin\config\Scripts\Neill3d\"; Flags: ignoreversion; Components: MotionBuilder2015

; 2016
Expand All @@ -78,27 +80,30 @@ Source: "..\bin\x64\plugins_2016\*.dll"; DestDir: "{code:MoBu_Path64|2016}\bin\x
;Source: "..\bin\x64\plugins_2016\GLSL\*"; DestDir: "{code:MoBu_Path64|2016}\bin\x64\plugins\GLSL\"; Flags: ignoreversion; Components: MotionBuilder2016
;Source: "..\bin\x64\plugins_2016\GLSL_CS\*"; DestDir: "{code:MoBu_Path64|2016}\bin\x64\plugins\GLSL_CS\"; Flags: ignoreversion; Components: MotionBuilder2016
Source: "..\PythonScripts\Startup\*"; DestDir: "{userdocs}\MB\2016-x64\config\PythonStartup\"; Flags: ignoreversion; Components: MotionBuilder2016
Source: "..\PythonScripts\Startup\MBFileRefAdvanced\*"; DestDir: "{userdocs}\MB\2016-x64\config\PythonStartup\MBFileRefAdvanced\"; Flags: ignoreversion; Components: MotionBuilder2016
Source: "..\PythonScripts\Startup_Qt4\*"; DestDir: "{userdocs}\MB\2016-x64\config\PythonStartup\"; Flags: ignoreversion; Components: MotionBuilder2016
Source: "..\PythonScripts\Startup_Qt4\MBFileRefAdvanced\*"; DestDir: "{userdocs}\MB\2016-x64\config\PythonStartup\MBFileRefAdvanced\"; Flags: ignoreversion; Components: MotionBuilder2016
Source: "..\PythonScripts\Actions\*"; DestDir: "{code:MoBu_Path64|2016}\bin\config\Scripts\Neill3d\"; Flags: ignoreversion; Components: MotionBuilder2016

; 2017

Source: "..\bin\x64\plugins_2017\*.dll"; DestDir: "{code:MoBu_Path64|2017}\bin\x64\plugins\"; Flags: ignoreversion; Components: MotionBuilder2017
Source: "..\bin\x64\plugins_2017\FBX\*.dll"; DestDir: "{code:MoBu_Path64|2017}\bin\x64\plugins\FBX\"; Flags: ignoreversion; Components: MotionBuilder2017
Source: "..\bin\x64\plugins_2017\GLSL\*"; DestDir: "{code:MoBu_Path64|2017}\bin\x64\plugins\GLSL\"; Flags: ignoreversion; Components: MotionBuilder2017
;Source: "..\bin\x64\plugins_2017\GLSL_CS\*"; DestDir: "{code:MoBu_Path64|2017}\bin\x64\plugins\GLSL_CS\"; Flags: ignoreversion; Components: MotionBuilder2017
Source: "..\bin\x64\plugins_2017\GLSL_CS\*"; DestDir: "{code:MoBu_Path64|2017}\bin\x64\plugins\GLSL_CS\"; Flags: ignoreversion; Components: MotionBuilder2017
Source: "..\PythonScripts\Startup\*"; DestDir: "{userdocs}\MB\2017-x64\config\PythonStartup\"; Flags: ignoreversion; Components: MotionBuilder2017
Source: "..\PythonScripts\Startup\MBFileRefAdvanced\*"; DestDir: "{userdocs}\MB\2017-x64\config\PythonStartup\MBFileRefAdvanced\"; Flags: ignoreversion; Components: MotionBuilder2017
Source: "..\PythonScripts\Startup_Qt4\*"; DestDir: "{userdocs}\MB\2017-x64\config\PythonStartup\"; Flags: ignoreversion; Components: MotionBuilder2017
Source: "..\PythonScripts\Startup_Qt4\MBFileRefAdvanced\*"; DestDir: "{userdocs}\MB\2017-x64\config\PythonStartup\MBFileRefAdvanced\"; Flags: ignoreversion; Components: MotionBuilder2017
Source: "..\PythonScripts\Actions\*"; DestDir: "{code:MoBu_Path64|2017}\bin\config\Scripts\Neill3d\"; Flags: ignoreversion; Components: MotionBuilder2017

; 2018

Source: "..\bin\x64\plugins_2018\*.dll"; DestDir: "{code:MoBu_Path64|2018}\bin\x64\plugins\"; Flags: ignoreversion; Components: MotionBuilder2018
Source: "..\bin\x64\plugins_2018\FBX\*.dll"; DestDir: "{code:MoBu_Path64|2018}\bin\x64\plugins\FBX\"; Flags: ignoreversion; Components: MotionBuilder2018
Source: "..\bin\x64\plugins_2018\GLSL\*"; DestDir: "{code:MoBu_Path64|2018}\bin\x64\plugins\GLSL\"; Flags: ignoreversion; Components: MotionBuilder2018
;Source: "..\bin\x64\plugins_2018\GLSL_CS\*"; DestDir: "{code:MoBu_Path64|2018}\bin\x64\plugins\GLSL_CS\"; Flags: ignoreversion; Components: MotionBuilder2018
Source: "..\bin\x64\plugins_2018\GLSL_CS\*"; DestDir: "{code:MoBu_Path64|2018}\bin\x64\plugins\GLSL_CS\"; Flags: ignoreversion; Components: MotionBuilder2018
Source: "..\PythonScripts\Startup\*"; DestDir: "{userdocs}\MB\2018-x64\config\PythonStartup\"; Flags: ignoreversion; Components: MotionBuilder2018
Source: "..\PythonScripts\Startup\MBFileRefAdvanced\*"; DestDir: "{userdocs}\MB\2018-x64\config\PythonStartup\MBFileRefAdvanced\"; Flags: ignoreversion; Components: MotionBuilder2018
Source: "..\PythonScripts\Startup_Qt4\*"; DestDir: "{userdocs}\MB\2018-x64\config\PythonStartup\"; Flags: ignoreversion; Components: MotionBuilder2018
Source: "..\PythonScripts\Startup_Qt4\MBFileRefAdvanced\*"; DestDir: "{userdocs}\MB\2018-x64\config\PythonStartup\MBFileRefAdvanced\"; Flags: ignoreversion; Components: MotionBuilder2018
Source: "..\PythonScripts\Actions\*"; DestDir: "{code:MoBu_Path64|2018}\bin\config\Scripts\Neill3d\"; Flags: ignoreversion; Components: MotionBuilder2018

; 2019
Expand All @@ -108,7 +113,8 @@ Source: "..\bin\x64\plugins_2019\FBX\*.dll"; DestDir: "{code:MoBu_Path64|2019}\b
Source: "..\bin\x64\plugins_2019\GLSL\*"; DestDir: "{code:MoBu_Path64|2019}\bin\x64\plugins\GLSL\"; Flags: ignoreversion; Components: MotionBuilder2019
Source: "..\bin\x64\plugins_2019\GLSL_CS\*"; DestDir: "{code:MoBu_Path64|2019}\bin\x64\plugins\GLSL_CS\"; Flags: ignoreversion; Components: MotionBuilder2019
Source: "..\PythonScripts\Startup\*"; DestDir: "{userdocs}\MB\2019-x64\config\PythonStartup\"; Flags: ignoreversion; Components: MotionBuilder2019
Source: "..\PythonScripts\Startup\MBFileRefAdvanced\*"; DestDir: "{userdocs}\MB\2019-x64\config\PythonStartup\MBFileRefAdvanced\"; Flags: ignoreversion; Components: MotionBuilder2019
Source: "..\PythonScripts\Startup_Qt5\*"; DestDir: "{userdocs}\MB\2019-x64\config\PythonStartup\"; Flags: ignoreversion; Components: MotionBuilder2019
Source: "..\PythonScripts\Startup_Qt5\MBFileRefAdvanced\*"; DestDir: "{userdocs}\MB\2019-x64\config\PythonStartup\MBFileRefAdvanced\"; Flags: ignoreversion; Components: MotionBuilder2019
Source: "..\PythonScripts\Actions\*"; DestDir: "{code:MoBu_Path64|2019}\bin\config\Scripts\Neill3d\"; Flags: ignoreversion; Components: MotionBuilder2019

; NOTE: Don't use "Flags: ignoreversion" on any shared system files
Expand Down
96 changes: 96 additions & 0 deletions bin/x64/plugins_2017/GLSL_CS/recomputeNormals.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@

/////////////////////////////////////////////////////////////////////////////////////////
//
// Licensed under the "New" BSD License.
// License page - https://github.com/Neill3d/MoBu/blob/master/LICENSE
//
// GitHub repository - https://github.com/Neill3d/MoBu
//
// Author Sergey Solokhin (Neill3d) 2014-2017
// e-mail to: s@neill3d.com
// www.neill3d.com
/////////////////////////////////////////////////////////////////////////////////////////

// recomputer normals in real-time (for a good quality deformations)

#version 430
#extension GL_NV_shader_atomic_float : enable

layout (local_size_x = 1024, local_size_y = 1) in;

uniform int numberOfTriangles;

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// TYPES AND DATA BUFFERS
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////

// INPUT from mobu mesh data
layout (std430, binding = 0) readonly buffer PositionBuffer
{
vec4 positions[];
} positionBuffer;

layout (std430, binding = 1) readonly buffer IndicesBuffer
{
int indices[];
} indicesBuffer;

// output
layout (std140, binding = 2) coherent buffer OutputNormals
{
vec4 normals[];
} outputNormals;


////////////////////////////////////////////////////////
//

uint get_invocation()
{
uint work_group = gl_GlobalInvocationID.y * (gl_NumWorkGroups.x * gl_WorkGroupSize.x) + gl_GlobalInvocationID.x;
return work_group;
}


//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// MAIN
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

void main()
{
// id in the array
uint flattened_id = get_invocation();

// ?! skip unused part of the array
if (flattened_id >= numberOfTriangles)
return;

int id1 = indicesBuffer.indices[flattened_id * 3];
int id2 = indicesBuffer.indices[flattened_id * 3 + 1];
int id3 = indicesBuffer.indices[flattened_id * 3 + 2];

vec4 pos1 = positionBuffer.positions[id1];
vec4 pos2 = positionBuffer.positions[id2];
vec4 pos3 = positionBuffer.positions[id3];

vec4 pos21 = pos2-pos1;
vec4 pos31 = pos3-pos1;

vec3 n = cross(pos21.xyz, pos31.xyz);
n = normalize(n);

barrier();

// accumulate vertex normal by connected face normal
atomicAdd(outputNormals.normals[id1].x, n.x);
atomicAdd(outputNormals.normals[id1].y, n.y);
atomicAdd(outputNormals.normals[id1].z, n.z);

atomicAdd(outputNormals.normals[id2].x, n.x);
atomicAdd(outputNormals.normals[id2].y, n.y);
atomicAdd(outputNormals.normals[id2].z, n.z);

atomicAdd(outputNormals.normals[id3].x, n.x);
atomicAdd(outputNormals.normals[id3].y, n.y);
atomicAdd(outputNormals.normals[id3].z, n.z);
}
76 changes: 76 additions & 0 deletions bin/x64/plugins_2017/GLSL_CS/recomputeNormalsNorm.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@

/////////////////////////////////////////////////////////////////////////////////////////
//
// Licensed under the "New" BSD License.
// License page - https://github.com/Neill3d/MoBu/blob/master/LICENSE
//
// GitHub repository - https://github.com/Neill3d/MoBu
//
// Author Sergey Solokhin (Neill3d) 2014-2017
// e-mail to: s@neill3d.com
// www.neill3d.com
/////////////////////////////////////////////////////////////////////////////////////////


// recomputer normals in real-time (for a good quality deformations)
// 3 - normalize accumulated normals and don't forget about duplicates

#version 430

layout (local_size_x = 1024, local_size_y = 1) in;

uniform int numberOfNormals;
uniform int duplicateStart;

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// TYPES AND DATA BUFFERS
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////

// inout
layout (std140, binding = 2) buffer OutputNormals
{
vec4 normals[];
} outputNormals;

layout (std430, binding = 3) buffer Duplicates
{
int indices[];
} duplicates;

////////////////////////////////////////////////////////
//

uint get_invocation()
{
uint work_group = gl_GlobalInvocationID.y * (gl_NumWorkGroups.x * gl_WorkGroupSize.x) + gl_GlobalInvocationID.x;
return work_group;
}


//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// MAIN
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

void main()
{
// id in the array
uint flattened_id = get_invocation();

// ?! skip unused part of the array
if (flattened_id >= numberOfNormals)
return;

vec4 nor;
if (flattened_id < duplicateStart)
{
nor = outputNormals.normals[flattened_id];
nor = normalize(nor);
}
else
{
int id = duplicates.indices[flattened_id - duplicateStart];
nor = outputNormals.normals[ id ];
}

outputNormals.normals[flattened_id] = nor;
}
59 changes: 59 additions & 0 deletions bin/x64/plugins_2017/GLSL_CS/recomputeNormalsZero.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@

/////////////////////////////////////////////////////////////////////////////////////////
//
// Licensed under the "New" BSD License.
// License page - https://github.com/Neill3d/MoBu/blob/master/LICENSE
//
// GitHub repository - https://github.com/Neill3d/MoBu
//
// Author Sergey Solokhin (Neill3d) 2014-2017
// e-mail to: s@neill3d.com
// www.neill3d.com
/////////////////////////////////////////////////////////////////////////////////////////


// recomputer normals in real-time (for a good quality deformations)
// 1 - zero vertex normals before we proceed with vertex-face accumulation

#version 430

layout (local_size_x = 1024, local_size_y = 1) in;

uniform int numberOfNormals;

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// TYPES AND DATA BUFFERS
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////

// output buffer
layout (std140, binding = 2) buffer OutputNormals
{
vec4 normals[];
} outputNormals;


////////////////////////////////////////////////////////
//

uint get_invocation()
{
uint work_group = gl_GlobalInvocationID.y * (gl_NumWorkGroups.x * gl_WorkGroupSize.x) + gl_GlobalInvocationID.x;
return work_group;
}


//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// MAIN
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

void main()
{
// id in the array
uint flattened_id = get_invocation();

// ?! skip unused part of the array
if (flattened_id >= numberOfNormals)
return;

outputNormals.normals[flattened_id] = vec4(0.0, 0.0, 0.0, 0.0);
}
Loading

0 comments on commit 9c227b4

Please sign in to comment.