Changeset 861


Ignore:
Timestamp:
May 8, 2013, 11:52:38 PM (12 years ago)
Author:
s10k
Message:

xmlTools: v0.8e, fixed a bug reported by EdT:

mono xmlTools.exe updatechainvalues -filename:OBANheli_body_center.xml -newvalue:"20 10 30" -element:Translation -parelement:OBANKeyFrame

I get the error: Object reference not set to an instance of an object

also fixed a bit the documentation o updatechainvalues command

Location:
xmlTools/trunk/posUpdate
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • xmlTools/trunk/posUpdate/ParametersParser.cs

    r750 r861  
    5151            [Parameter(Required = true, Description = "The new first value of the chain. All the chain will be updated based on this value")] string newValue,
    5252            [Parameter(Description = "Value which have some kind of relation with -newVal \n Together with -newVal updates all the values based on the" +
    53                 "-newVal and another position specified on -valRelation parameter (basically starts with (newVal-valRelation) ) Is especially useful when" +
     53                "-newvalue and another position specified on -valrelation parameter (basically starts with (newvalue-valrelation) ) Is especially useful when" +
    5454                "updating multiple related chains (on different files), like multiple objects from one position to another. Don't use with -filename, because" +
    55                 "it will only update one file. \nExample: xmlTools.exe -newVal \"1 1 1\" -valRelation \"4 4 4\" -valElement Translation -valParentElement" +
     55                "it will only update one file. \nExample: xmlTools.exe updatechainvalues -filename:OBANheli_body_center.xml -newvalue:\"1 1 1\" -valrelation:\"4 4 4\" -element:Translation -parelement:" +
    5656                "OBANKeyFrame")] string valRelation,
    57             [Parameter(Description = "Only update specific positions. Positions starts with 0, separted multiple positions with space. Example: valPositions=0 1 4")] [MoreThan(-1)]  string valPositions
     57            [Parameter(Description = "Only update specific positions. Positions starts with 0, separted multiple positions with space. Example: valpositions=\"0 1 4\"")] [MoreThan(-1)]  string valPositions
    5858            )
    5959        {
  • xmlTools/trunk/posUpdate/Program.cs

    r750 r861  
    1111    class Program
    1212    {
    13         public static readonly string toolsVersion = "0.8d";
     13        public static readonly string toolsVersion = "0.8e";
    1414        private static appErrors lastError = appErrors.NO_ERROR;
    1515
  • xmlTools/trunk/posUpdate/XmlTools.cs

    r742 r861  
    230230            Util.getAllSpecificElements(xdoc.DocumentElement, ref myElements, this.posElement, this.posParentElement); //Returns all after "Oni" element
    231231
    232             if (valuePositions == "")
     232            if (valuePositions == null)
    233233            {
    234234                newXmlLastPos = new XmlNumberValue(newValue);
     
    239239            }
    240240
    241             if (valuePositions != "")
     241            if (valuePositions != null)
    242242            {
    243243                checkValidSpecificPositions(valuePositions, newValue, myElements[0].InnerText);
     
    258258                    else
    259259                    { // first time just assign to last value
    260                         if (valueRelation != "")
     260                        if (valueRelation != null)
    261261                        {
    262262                            newXmlLastPos = XmlNumberValue.difference(newXmlLastPos, XmlNumberValue.difference(new XmlNumberValue(valueRelation), xmlCurrValue));
  • xmlTools/trunk/posUpdate/xmlTools.csproj.user

    r750 r861  
    22<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    33  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
    4     <StartArguments>versions</StartArguments>
     4    <StartArguments>updatechainvalues -filename:OBANheli_body_center.xml -newvalue:"20 10 30" -element:Translation -parelement:OBANKeyFrameversions</StartArguments>
     5    <StartWorkingDirectory>C:\games\Oni\AE\Tools</StartWorkingDirectory>
    56  </PropertyGroup>
    67  <PropertyGroup>
     
    1516  </PropertyGroup>
    1617  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
    17     <StartArguments>replacealsl -element:FirstLevel -value:0 -nobackups -filename:"C:\Users\home\Documents\Visual Studio 2012\Projects\posUpdate\posUpdate\bin\Debug\%2a.xml"</StartArguments>
     18    <StartArguments>updatechainvalues -filename:OBANheli_body_center.xml -newvalue:"20 10 30" -element:Translation -parelement:OBANKeyFrame</StartArguments>
     19    <StartWorkingDirectory>C:\games\Oni\AE\Tools</StartWorkingDirectory>
    1820  </PropertyGroup>
    1921</Project>
Note: See TracChangeset for help on using the changeset viewer.