Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'next' of https://github.com/blackberry/GamePlay into next

Conflicts:
	bin/win32/gameplay-encoder.exe
  • Loading branch information...
commit 2cfd50e2b11a612fa6bd9604191c9c68f8984b0b 2 parents 064dafd + c9a2e89
@sgrenier sgrenier authored
View
BIN  bin/win32/gameplay-encoder.exe
Binary file not shown
View
12 gameplay-encoder/README.md
@@ -31,11 +31,11 @@ XCode project "gameplay-encoder.xcodeproj" on MacOSX.
- Edit the project properties of "gameplay-encoder" for Debug
- Add Preprocessor Definition "USE_FBX" (C++/Preprocessor)
- Add the FBX SDK include directory to Additional Include Directories (C++/General)
- * Example: C:/Program Files/Autodesk/FBX/FbxSdk/2013.1/include
+ * Example: C:/Program Files/Autodesk/FBX/FbxSdk/2013.2/include
- Add the FBX lib directory to the Additional Library Directories (Linker/General)
- * Example: C:/Program Files/Autodesk/FBX/FbxSdk/2013.1/lib/vs2010/x86
-- Add "fbxsdk-2013.1-mdd.lib"(Release) and "wininet.lib" to the Additional Dependencies (Linker/Input)
- * Example: fbxsdk-2013.1-mdd.lib;wininet.lib
+ * Example: C:/Program Files/Autodesk/FBX/FbxSdk/2013.2/lib/vs2010/x86
+- Add "fbxsdk-2013.2-mdd.lib"(Release) to the Additional Dependencies (Linker/Input)
+ * Example: fbxsdk-2013.2-mdd.lib
- Build gameplay-encoder
### Building with FBX Support on Mac OS X using XCode 4.3.2+
@@ -43,9 +43,9 @@ XCode project "gameplay-encoder.xcodeproj" on MacOSX.
- Edit the project properties of target "gameplay-encoder".
- Add Preprocessor Macro "USE_FBX" to both Debug/Release sections. (Build Settings)
- Add the FBX include directory to Header Search Paths: (Build Settings)
- * Example: /Applications/Autodesk/FBXSDK20131/include
+ * Example: /Applications/Autodesk/FBXSDK20132/include
- Add the FBX library and dependency Library/Frameworks: (Build Phases -> Link Binary with Libraries)
- * Example: /Applications/Autodesk/FBXSDK20131/lib/gcc4/ub/libfbxsdk-2013.1-static.a (Add Other)
+ * Example: /Applications/Autodesk/FBXSDK20132/lib/gcc4/ub/libfbxsdk-2013.2-static.a (Add Other)
* Example: libiconv.dylib, Cocoa.framework, SystemConfiguration.framework
- Build gameplay-encoder
View
22 gameplay-encoder/gameplay-encoder.vcxproj
@@ -151,21 +151,20 @@
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>USE_FBX;WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;NO_BOOST;NO_ZAE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>C:/Program Files/Autodesk/FBX/FbxSdk/2013.1/include;../external-deps/freetype2/include;../external-deps/collada-dom/include;../external-deps/collada-dom/include/1.4;../external-deps/libpng/include;../external-deps/zlib/include</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;NO_BOOST;NO_ZAE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>../external-deps/freetype2/include;../external-deps/collada-dom/include;../external-deps/collada-dom/include/1.4;../external-deps/libpng/include;../external-deps/zlib/include</AdditionalIncludeDirectories>
<DisableLanguageExtensions>
</DisableLanguageExtensions>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
- <AdditionalLibraryDirectories>C:/Program Files/Autodesk/FBX/FbxSdk/2013.1/lib/vs2010/x86;../external-deps/freetype2/lib/win32;../external-deps/collada-dom/lib/win32;../external-deps/libpng/lib/win32;../external-deps/zlib/lib/win32</AdditionalLibraryDirectories>
- <AdditionalDependencies>fbxsdk-2013.1-mdd.lib;wininet.lib;freetype245.lib;libcollada14dom22-d.lib;libpng14.lib;zlib.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>../external-deps/freetype2/lib/win32;../external-deps/collada-dom/lib/win32;../external-deps/libpng/lib/win32;../external-deps/zlib/lib/win32</AdditionalLibraryDirectories>
+ <AdditionalDependencies>freetype245.lib;libcollada14dom22-d.lib;libpng14.lib;zlib.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreSpecificDefaultLibraries>MSVCRT</IgnoreSpecificDefaultLibraries>
</Link>
<PostBuildEvent>
- <Command>copy /Y "$(ProjectDir)..\bin\win32\*.dll" "$(TargetDir)"
-copy /Y "C:\Program Files\Autodesk\FBX\FbxSdk\2013.1\lib\vs2010\x86\fbxsdk-2013.1d.dll" "$(TargetDir)"</Command>
+ <Command>copy /Y "$(ProjectDir)..\bin\win32\*.dll" "$(TargetDir)"</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@@ -176,23 +175,22 @@ copy /Y "C:\Program Files\Autodesk\FBX\FbxSdk\2013.1\lib\vs2010\x86\fbxsdk-2013.
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
- <PreprocessorDefinitions>USE_FBX;WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;NO_BOOST;NO_ZAE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>C:/Program Files/Autodesk/FBX/FbxSdk/2013.1/include;../external-deps/freetype2/include;../external-deps/collada-dom/include;../external-deps/collada-dom/include/1.4;../external-deps/libpng/include;../external-deps/zlib/include</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;NO_BOOST;NO_ZAE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>../external-deps/freetype2/include;../external-deps/collada-dom/include;../external-deps/collada-dom/include/1.4;../external-deps/libpng/include;../external-deps/zlib/include</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
- <AdditionalDependencies>fbxsdk-2013.1-mdd.lib;wininet.lib;freetype245.lib;libcollada14dom22-d.lib;libpng14.lib;zlib.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <AdditionalLibraryDirectories>C:/Program Files/Autodesk/FBX/FbxSdk/2013.1/lib/vs2010/x86;../external-deps/freetype2/lib/win32;../external-deps/collada-dom/lib/win32;../external-deps/libpng/lib/win32;../external-deps/zlib/lib/win32</AdditionalLibraryDirectories>
+ <AdditionalDependencies>freetype245.lib;libcollada14dom22-d.lib;libpng14.lib;zlib.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>../external-deps/freetype2/lib/win32;../external-deps/collada-dom/lib/win32;../external-deps/libpng/lib/win32;../external-deps/zlib/lib/win32</AdditionalLibraryDirectories>
<IgnoreSpecificDefaultLibraries>
</IgnoreSpecificDefaultLibraries>
</Link>
<PostBuildEvent>
<Command>copy /Y "$(ProjectDir)..\bin\win32\*.dll" "$(TargetDir)"
-
-copy /Y "C:\Program Files\Autodesk\FBX\FbxSdk\2013.1\lib\vs2010\x86\fbxsdk-2013.1d.dll" "$(TargetDir)"</Command>
+</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
View
4 gameplay-encoder/gameplay-encoder.vcxproj.filters
@@ -255,10 +255,10 @@
<ClInclude Include="src\Curve.h">
<Filter>src</Filter>
</ClInclude>
- <ClInclude Include="src\Heightmap.h">
+ <ClInclude Include="src\Thread.h">
<Filter>src</Filter>
</ClInclude>
- <ClInclude Include="src\Thread.h">
+ <ClInclude Include="src\Heightmap.h">
<Filter>src</Filter>
</ClInclude>
</ItemGroup>
View
3  gameplay-encoder/gameplay-encoder.vcxproj.user
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <LocalDebuggerCommandArguments>-h "panel1 panel2 panel3 panel4 panel5 panel6 panel7 panel8 panel9 panel10 panel11 panel12 panel13 panel14 panel15 panel16" "C:\git\GamePlay\gameplay-internal\sample07-racer\res\heightmap.png" "C:\git\GamePlay\gameplay-internal\sample07-racer\res\scene.fbx" "C:\git\GamePlay\gameplay-internal\sample07-racer\res\scene.gpb"</LocalDebuggerCommandArguments>
+ <LocalDebuggerCommandArguments>
+ </LocalDebuggerCommandArguments>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
<LocalDebuggerEnvironment>PATH=%PATH%;../bin/win32;</LocalDebuggerEnvironment>
</PropertyGroup>
View
34 gameplay-encoder/src/FBXSceneEncoder.cpp
@@ -165,6 +165,14 @@ bool isGroupAnimationPossible(FbxScene* fbxScene);
bool isGroupAnimationPossible(FbxNode* fbxNode);
bool isGroupAnimationPossible(FbxMesh* fbxMesh);
+FbxAnimCurve* getCurve(FbxPropertyT<FbxDouble3>& prop, FbxAnimLayer* animLayer, const char* pChannel)
+{
+#if FBXSDK_VERSION_MAJOR == 2013 && FBXSDK_VERSION_MINOR == 1
+ return prop.GetCurve<FbxAnimCurve>(animLayer, pChannel);
+#else
+ return prop.GetCurve(animLayer, pChannel);
+#endif
+}
////////////////////////////////////
// Member Functions
@@ -311,55 +319,55 @@ void FBXSceneEncoder::loadAnimationChannels(FbxAnimLayer* animLayer, FbxNode* fb
float startTime = FLT_MAX, stopTime = -1.0f, frameRate = -FLT_MAX;
bool tx = false, ty = false, tz = false, rx = false, ry = false, rz = false, sx = false, sy = false, sz = false;
FbxAnimCurve* animCurve = NULL;
- animCurve = fbxNode->LclTranslation.GetCurve<FbxAnimCurve>(animLayer, FBXSDK_CURVENODE_COMPONENT_X);
+ animCurve = getCurve(fbxNode->LclTranslation, animLayer, FBXSDK_CURVENODE_COMPONENT_X);
if (animCurve)
{
tx = true;
findMinMaxTime(animCurve, &startTime, &stopTime, &frameRate);
}
- animCurve = fbxNode->LclTranslation.GetCurve<FbxAnimCurve>(animLayer, FBXSDK_CURVENODE_COMPONENT_Y);
+ animCurve = getCurve(fbxNode->LclTranslation, animLayer, FBXSDK_CURVENODE_COMPONENT_Y);
if (animCurve)
{
ty = true;
findMinMaxTime(animCurve, &startTime, &stopTime, &frameRate);
}
- animCurve = fbxNode->LclTranslation.GetCurve<FbxAnimCurve>(animLayer, FBXSDK_CURVENODE_COMPONENT_Z);
+ animCurve = getCurve(fbxNode->LclTranslation, animLayer, FBXSDK_CURVENODE_COMPONENT_Z);
if (animCurve)
{
tz = true;
findMinMaxTime(animCurve, &startTime, &stopTime, &frameRate);
}
- animCurve = fbxNode->LclRotation.GetCurve<FbxAnimCurve>(animLayer, FBXSDK_CURVENODE_COMPONENT_X);
+ animCurve = getCurve(fbxNode->LclRotation, animLayer, FBXSDK_CURVENODE_COMPONENT_X);
if (animCurve)
{
rx = true;
findMinMaxTime(animCurve, &startTime, &stopTime, &frameRate);
}
- animCurve = fbxNode->LclRotation.GetCurve<FbxAnimCurve>(animLayer, FBXSDK_CURVENODE_COMPONENT_Y);
+ animCurve = getCurve(fbxNode->LclRotation, animLayer, FBXSDK_CURVENODE_COMPONENT_Y);
if (animCurve)
{
ry = true;
findMinMaxTime(animCurve, &startTime, &stopTime, &frameRate);
}
- animCurve = fbxNode->LclRotation.GetCurve<FbxAnimCurve>(animLayer, FBXSDK_CURVENODE_COMPONENT_Z);
+ animCurve = getCurve(fbxNode->LclRotation, animLayer, FBXSDK_CURVENODE_COMPONENT_Z);
if (animCurve)
{
rz = true;
findMinMaxTime(animCurve, &startTime, &stopTime, &frameRate);
}
- animCurve = fbxNode->LclScaling.GetCurve<FbxAnimCurve>(animLayer, FBXSDK_CURVENODE_COMPONENT_X);
+ animCurve = getCurve(fbxNode->LclScaling, animLayer, FBXSDK_CURVENODE_COMPONENT_X);
if (animCurve)
{
sx = true;
findMinMaxTime(animCurve, &startTime, &stopTime, &frameRate);
}
- animCurve = fbxNode->LclScaling.GetCurve<FbxAnimCurve>(animLayer, FBXSDK_CURVENODE_COMPONENT_Y);
+ animCurve = getCurve(fbxNode->LclScaling, animLayer, FBXSDK_CURVENODE_COMPONENT_Y);
if (animCurve)
{
sy = true;
findMinMaxTime(animCurve, &startTime, &stopTime, &frameRate);
}
- animCurve = fbxNode->LclScaling.GetCurve<FbxAnimCurve>(animLayer, FBXSDK_CURVENODE_COMPONENT_Z);
+ animCurve = getCurve(fbxNode->LclScaling, animLayer, FBXSDK_CURVENODE_COMPONENT_Z);
if (animCurve)
{
sz = true;
@@ -583,14 +591,6 @@ void FBXSceneEncoder::transformNode(FbxNode* fbxNode, Node* node)
float m[16];
copyMatrix(matrix, m);
- int i = 0;
- for (int row = 0; row < 4; ++row)
- {
- for (int col = 0; col < 4; ++col)
- {
- m[i++] = (float)matrix.Get(row, col);
- }
- }
node->setTransformMatrix(m);
}
View
4 gameplay/src/Node.cpp
@@ -949,6 +949,10 @@ void Node::cloneInto(Node* node, NodeCloneContext &context) const
}
node->_world = _world;
node->_bounds = _bounds;
+ if (_tags)
+ {
+ node->_tags = new std::map<std::string, std::string>(_tags->begin(), _tags->end());
+ }
}
AudioSource* Node::getAudioSource() const
Please sign in to comment.
Something went wrong with that request. Please try again.