[Bf-committers] Changing mul_m4_m4m4 argument order
Hi, The argument order of the mul_m4_m4m4 C math function is inconsistent with the others. This has always been the case, but I only recently found this out, it explains quite a bit of confusion I've had in the past working with matrices. Python is not affected by this. For the details, see here: http://wiki.blender.org/index.php/Dev:Source/Mathematics/Math_Library#Matrix-Matrix_Multiplication It's easy to fix this in trunk, the main issue is for branches, just changing the order of arguments to mul_m4_m4m4 will not show up as conflicts in merges. A solution would be to change the function to a different name. Do you think this is needed, and does anyone have a good suggestion for a different name? I guess that would also cause some confusion, but hopefully much less. Thanks, Brecht. ___ Bf-committers mailing list Bf-committers@blender.org http://lists.blender.org/mailman/listinfo/bf-committers
Re: [Bf-committers] Changing mul_m4_m4m4 argument order
+1 for changing asap, can only think of uninspired names but dont think it matters much - 'mul_m4_m4m4_ok' ? On forcing conflicts... Think its much better to rename and force dev to think rather then silently work but in fact be doing the wrong order in branches, I was going to suggest to run this on branches too, but think its problematic since it would complicate things further with merge conflicts if the branch hadn't been updated in a while. Probably better to rename the function and have a script available to branch maintainers as you did for the initial arithb.c refactor. On Fri, Dec 16, 2011 at 1:51 AM, Brecht Van Lommel wrote: > Hi, > > The argument order of the mul_m4_m4m4 C math function is inconsistent > with the others. This has always been the case, but I only recently > found this out, it explains quite a bit of confusion I've had in the > past working with matrices. Python is not affected by this. > > For the details, see here: > http://wiki.blender.org/index.php/Dev:Source/Mathematics/Math_Library#Matrix-Matrix_Multiplication > > It's easy to fix this in trunk, the main issue is for branches, just > changing the order of arguments to mul_m4_m4m4 will not show up as > conflicts in merges. A solution would be to change the function to a > different name. Do you think this is needed, and does anyone have a > good suggestion for a different name? I guess that would also cause > some confusion, but hopefully much less. > > Thanks, > Brecht. > ___ > Bf-committers mailing list > Bf-committers@blender.org > http://lists.blender.org/mailman/listinfo/bf-committers -- - Campbell ___ Bf-committers mailing list Bf-committers@blender.org http://lists.blender.org/mailman/listinfo/bf-committers
Re: [Bf-committers] Changing mul_m4_m4m4 argument order
Hi, Argument order is indeed confusing. I've spend two hours debugging deep tracking stuff and then learned in which order i shall pass matrices in constraint which i used to check it tracking is correct. I can think about such quite safe for branches solution: - Create script which swaps arguments in mul_m*_m*m* functions and renames them to, say the save with suffix '_r' (from "reversed") or prefix "x" (like 64bit prefix for registers :) - Make changes in trunk and publish script - Give two weeks to everybody to merge changes and run that script for their own code - after this two weeks remove old mul functions are rename new function to old name Not very straight, but should be safe for everybody. Can think about ways which doesn't require temporary function, but think way with temporary functions is more safe. On Thu, Dec 15, 2011 at 8:51 PM, Brecht Van Lommel < brechtvanlom...@pandora.be> wrote: > Hi, > > The argument order of the mul_m4_m4m4 C math function is inconsistent > with the others. This has always been the case, but I only recently > found this out, it explains quite a bit of confusion I've had in the > past working with matrices. Python is not affected by this. > > For the details, see here: > > http://wiki.blender.org/index.php/Dev:Source/Mathematics/Math_Library#Matrix-Matrix_Multiplication > > It's easy to fix this in trunk, the main issue is for branches, just > changing the order of arguments to mul_m4_m4m4 will not show up as > conflicts in merges. A solution would be to change the function to a > different name. Do you think this is needed, and does anyone have a > good suggestion for a different name? I guess that would also cause > some confusion, but hopefully much less. > > Thanks, > Brecht. > ___ > Bf-committers mailing list > Bf-committers@blender.org > http://lists.blender.org/mailman/listinfo/bf-committers > -- With best regards, Sergey Sharybin ___ Bf-committers mailing list Bf-committers@blender.org http://lists.blender.org/mailman/listinfo/bf-committers
Re: [Bf-committers] Changing mul_m4_m4m4 argument order
I've committed the change now. We could indeed change the name back after a while, though two weeks seems too short. Brecht. On Thu, Dec 15, 2011 at 10:39 PM, Sergey Sharybin wrote: > Hi, > > Argument order is indeed confusing. I've spend two hours debugging deep > tracking stuff and then learned in which order i shall pass matrices in > constraint which i used to check it tracking is correct. > > I can think about such quite safe for branches solution: > - Create script which swaps arguments in mul_m*_m*m* functions and renames > them to, say the save with suffix '_r' (from "reversed") or prefix "x" > (like 64bit prefix for registers :) > - Make changes in trunk and publish script > - Give two weeks to everybody to merge changes and run that script for > their own code > - after this two weeks remove old mul functions are rename new function to > old name > > Not very straight, but should be safe for everybody. > > Can think about ways which doesn't require temporary function, but think > way with temporary functions is more safe. > > On Thu, Dec 15, 2011 at 8:51 PM, Brecht Van Lommel < > brechtvanlom...@pandora.be> wrote: > >> Hi, >> >> The argument order of the mul_m4_m4m4 C math function is inconsistent >> with the others. This has always been the case, but I only recently >> found this out, it explains quite a bit of confusion I've had in the >> past working with matrices. Python is not affected by this. >> >> For the details, see here: >> >> http://wiki.blender.org/index.php/Dev:Source/Mathematics/Math_Library#Matrix-Matrix_Multiplication >> >> It's easy to fix this in trunk, the main issue is for branches, just >> changing the order of arguments to mul_m4_m4m4 will not show up as >> conflicts in merges. A solution would be to change the function to a >> different name. Do you think this is needed, and does anyone have a >> good suggestion for a different name? I guess that would also cause >> some confusion, but hopefully much less. >> >> Thanks, >> Brecht. >> ___ >> Bf-committers mailing list >> Bf-committers@blender.org >> http://lists.blender.org/mailman/listinfo/bf-committers >> > > > > -- > With best regards, Sergey Sharybin > ___ > Bf-committers mailing list > Bf-committers@blender.org > http://lists.blender.org/mailman/listinfo/bf-committers ___ Bf-committers mailing list Bf-committers@blender.org http://lists.blender.org/mailman/listinfo/bf-committers