Browse Source

Merge branch 'next' into neo

mozeal 12 years ago
parent
commit
89f050477d

+ 2 - 0
.gitignore

@@ -24,6 +24,8 @@ Thumbs.db
 /Device-Release
 /Device-Release
 /gameplay-internal
 /gameplay-internal
 /api/xml
 /api/xml
+/bin
+/external-deps
 
 
 /gameplay/Debug
 /gameplay/Debug
 /gameplay/DebugMem
 /gameplay/DebugMem

+ 29 - 27
samples/browser/res/common/default.theme

@@ -108,6 +108,11 @@ theme mainMenu
         }
         }
     }
     }
 
 
+	imageList focusImages : normalImages
+	{
+		color = #2A6779ff
+	}
+
     skin mainNormal
     skin mainNormal
     {
     {
         border
         border
@@ -121,23 +126,28 @@ theme mainMenu
         region = 1, 1, 74, 74
         region = 1, 1, 74, 74
         color = #4A8799ff
         color = #4A8799ff
     }
     }
-	
-	skin mainFocus : mainNormal
-	{
-		color = #ff0000ff
-	}
 
 
     skin mainActive : mainNormal
     skin mainActive : mainNormal
     {
     {
         color = #C3D9BFff
         color = #C3D9BFff
     }
     }
 
 
+	skin mainFocus : mainNormal
+	{
+		color = #2A6779ff
+	}
+
     skin formEntry : mainNormal
     skin formEntry : mainNormal
     {
     {
         region = 78, 1, 46, 46
         region = 78, 1, 46, 46
-        color = #25434Cff
+        color = #35535Cff
     }
     }
 
 
+	skin formFocus : formEntry
+	{
+        color = #15333Cff
+	}
+    
     skin underliner
     skin underliner
     {
     {
         border
         border
@@ -212,11 +222,6 @@ theme mainMenu
             fontSize = 25
             fontSize = 25
             textAlignment = ALIGN_BOTTOM_HCENTER
             textAlignment = ALIGN_BOTTOM_HCENTER
         }
         }
-
-        stateFocus
-        {
-            textColor = #00ff00ff
-        }
     }
     }
 
 
     style leftAlignedUnderlined : underlined
     style leftAlignedUnderlined : underlined
@@ -239,16 +244,17 @@ theme mainMenu
             fontSize = 18
             fontSize = 18
             textAlignment = ALIGN_VCENTER_HCENTER
             textAlignment = ALIGN_VCENTER_HCENTER
         }
         }
-
-		stateFocus
-		{
-			skin = mainFocus
-		}
 		
 		
         stateActive
         stateActive
         {
         {
             imageList = activeImages
             imageList = activeImages
         }
         }
+
+		stateFocus
+		{
+			skin = mainFocus
+			imageList = focusImages
+		}
 		
 		
 		stateDisabled
 		stateDisabled
 		{
 		{
@@ -263,6 +269,11 @@ theme mainMenu
             skin = formEntry
             skin = formEntry
             textAlignment = ALIGN_TOP_LEFT
             textAlignment = ALIGN_TOP_LEFT
         }
         }
+
+        stateFocus
+        {
+            skin = formFocus
+        }
     }
     }
 
 
     style buttonStyle : basic
     style buttonStyle : basic
@@ -278,11 +289,6 @@ theme mainMenu
             font = res/common/arial18.gpb
             font = res/common/arial18.gpb
             fontSize = 20
             fontSize = 20
         }
         }
-		
-		stateFocus
-		{
-			textColor = #00ff00ff
-		}
 
 
         stateActive
         stateActive
         {
         {
@@ -303,7 +309,8 @@ theme mainMenu
 		
 		
 		stateFocus
 		stateFocus
 		{
 		{
-			textColor = #00ff00ff
+			textColor = #aaa000ff
+			imageList = focusImages
 		}
 		}
 
 
         stateActive
         stateActive
@@ -321,11 +328,6 @@ theme mainMenu
             fontSize = 20
             fontSize = 20
             textAlignment = ALIGN_VCENTER_LEFT
             textAlignment = ALIGN_VCENTER_LEFT
         }
         }
-		
-		stateFocus
-		{
-			textColor = #00ff00ff
-		}
 
 
         stateActive
         stateActive
         {
         {

+ 18 - 2
tools/encoder/src/EncoderArguments.cpp

@@ -23,7 +23,8 @@ EncoderArguments::EncoderArguments(size_t argc, const char** argv) :
     _parseError(false),
     _parseError(false),
     _fontPreview(false),
     _fontPreview(false),
     _textOutput(false),
     _textOutput(false),
-    _optimizeAnimations(false)
+    _optimizeAnimations(false),
+    _animationGrouping(ANIMATIONGROUP_PROMPT)
 {
 {
     __instance = this;
     __instance = this;
 
 
@@ -160,6 +161,11 @@ const std::string EncoderArguments::getAnimationId(const std::string& nodeId) co
     return "";
     return "";
 }
 }
 
 
+EncoderArguments::AnimationGroupOption EncoderArguments::getAnimationGrouping() const
+{
+    return _animationGrouping;
+}
+
 const std::vector<EncoderArguments::HeightmapOption>& EncoderArguments::getHeightmapOptions() const
 const std::vector<EncoderArguments::HeightmapOption>& EncoderArguments::getHeightmapOptions() const
 {
 {
     return _heightmaps;
     return _heightmaps;
@@ -237,6 +243,8 @@ void EncoderArguments::printUsage() const
     LOG(1, "FBX file options:\n");
     LOG(1, "FBX file options:\n");
     LOG(1, "  -i <id>\tFilter by node ID.\n");
     LOG(1, "  -i <id>\tFilter by node ID.\n");
     LOG(1, "  -t\t\tWrite text/xml.\n");
     LOG(1, "  -t\t\tWrite text/xml.\n");
+    LOG(1, "  -g:auto\tAutomatically group animation channels into a new animation.\n");
+    LOG(1, "  -g:none\tDo not prompt to group animations.\n");
     LOG(1, "  -g <node id> <animation id>\n" \
     LOG(1, "  -g <node id> <animation id>\n" \
         "\t\tGroup all animation channels targeting the nodes into a new animation.\n");
         "\t\tGroup all animation channels targeting the nodes into a new animation.\n");
     LOG(1, "  -tb <node id>\n" \
     LOG(1, "  -tb <node id>\n" \
@@ -359,7 +367,15 @@ void EncoderArguments::readOption(const std::vector<std::string>& options, size_
     switch (str[1])
     switch (str[1])
     {
     {
     case 'g':
     case 'g':
-        if (str.compare("-groupAnimations") == 0 || str.compare("-g") == 0)
+        if (str.compare("-groupAnimations:auto") == 0 || str.compare("-g:auto") == 0)
+        {
+            _animationGrouping = ANIMATIONGROUP_AUTO;
+        }
+        else if (str.compare("-groupAnimations:off") == 0 || str.compare("-g:off") == 0)
+        {
+            _animationGrouping = ANIMATIONGROUP_OFF;
+        }
+        else if (str.compare("-groupAnimations") == 0 || str.compare("-g") == 0)
         {
         {
             // read two strings, make sure not to go out of bounds
             // read two strings, make sure not to go out of bounds
             if ((*index + 2) >= options.size())
             if ((*index + 2) >= options.size())

+ 10 - 0
tools/encoder/src/EncoderArguments.h

@@ -41,6 +41,13 @@ public:
         Vector3 worldSize;
         Vector3 worldSize;
     };
     };
 
 
+    enum AnimationGroupOption
+    {
+        ANIMATIONGROUP_PROMPT,
+        ANIMATIONGROUP_AUTO,
+        ANIMATIONGROUP_OFF
+    };
+    
     /**
     /**
      * Constructor.
      * Constructor.
      */
      */
@@ -94,6 +101,8 @@ public:
     bool containsGroupNodeId(const std::string& nodeId) const;
     bool containsGroupNodeId(const std::string& nodeId) const;
     const std::string getAnimationId(const std::string& nodeId) const;
     const std::string getAnimationId(const std::string& nodeId) const;
 
 
+    AnimationGroupOption getAnimationGrouping() const;
+
     const std::vector<HeightmapOption>& getHeightmapOptions() const;
     const std::vector<HeightmapOption>& getHeightmapOptions() const;
 
 
     /**
     /**
@@ -192,6 +201,7 @@ private:
     bool _fontPreview;
     bool _fontPreview;
     bool _textOutput;
     bool _textOutput;
     bool _optimizeAnimations;
     bool _optimizeAnimations;
+    AnimationGroupOption _animationGrouping;
 
 
     std::vector<std::string> _groupAnimationNodeId;
     std::vector<std::string> _groupAnimationNodeId;
     std::vector<std::string> _groupAnimationAnimationId;
     std::vector<std::string> _groupAnimationAnimationId;

+ 2 - 1
tools/encoder/src/FBXSceneEncoder.cpp

@@ -224,7 +224,8 @@ void FBXSceneEncoder::write(const std::string& filepath, const EncoderArguments&
     // Determine if animations should be grouped.
     // Determine if animations should be grouped.
     if (arguments.getGroupAnimationAnimationId().empty() && isGroupAnimationPossible(fbxScene))
     if (arguments.getGroupAnimationAnimationId().empty() && isGroupAnimationPossible(fbxScene))
     {
     {
-        if (promptUserGroupAnimations())
+        if ( arguments.getAnimationGrouping()==EncoderArguments::ANIMATIONGROUP_AUTO || 
+            (arguments.getAnimationGrouping()==EncoderArguments::ANIMATIONGROUP_PROMPT && promptUserGroupAnimations()))
         {
         {
             _autoGroupAnimations = true;
             _autoGroupAnimations = true;
         }
         }