Re: [Bf-committers] [Bf-blender-cvs] SVN commit: /data/svn/bf-blender [42871] trunk/blender/source/blender/ blenkernel/BKE_customdata.h: include BLO_sys_types in customdata header rather than stdint d

2011-12-26 Thread Campbell Barton
+1 for more generic headers, this was on my todo,
http://wiki.blender.org/index.php/User:Ideasman42#Code_Refactoring -
second point :)

the file is in fact in 3 places if you count superlu_sys_types.h

On Mon, Dec 26, 2011 at 6:54 PM, Sergey Sharybin  wrote:
> Hi,
>
> I'd say it's not actually nice solution. The best solution i might think
> about is:
>
> Use some kind of portable stdint.h placed in extern/ so ffmpeg, carve (and
> probably other libraries) might use it. This file would also be used by
> MEM_sys_types.h (didn't check it deeper, probably this file could be just
> eliminated). In blender sources define common header file (like in blenlib)
> which would be used for stuff like this (to avoid including extern/ stuff
> directly and make it possible to extend this include file with other
> types/macros and so on).
>
> On Mon, Dec 26, 2011 at 3:27 AM, Campbell Barton wrote:
>
>> Revision: 42871
>>
>> http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=42871
>> Author:   campbellbarton
>> Date:     2011-12-25 21:27:23 + (Sun, 25 Dec 2011)
>> Log Message:
>> ---
>> include BLO_sys_types in customdata header rather than stdint directly.
>>
>> Modified Paths:
>> --
>>    trunk/blender/source/blender/blenkernel/BKE_customdata.h
>>
>> Modified: trunk/blender/source/blender/blenkernel/BKE_customdata.h
>> ===
>> --- trunk/blender/source/blender/blenkernel/BKE_customdata.h    2011-12-25
>> 19:42:26 UTC (rev 42870)
>> +++ trunk/blender/source/blender/blenkernel/BKE_customdata.h    2011-12-25
>> 21:27:23 UTC (rev 42871)
>> @@ -34,14 +34,12 @@
>>  #ifndef BKE_CUSTOMDATA_H
>>  #define BKE_CUSTOMDATA_H
>>
>> -#if defined(__APPLE__) && (__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)
>> -#include 
>> -#endif
>> -
>>  #ifdef __cplusplus
>>  extern "C" {
>>  #endif
>>
>> +#include "../blenloader/BLO_sys_types.h" /* XXX, should have a more
>> generic include for this */
>> +
>>  struct ID;
>>  struct CustomData;
>>  struct CustomDataLayer;
>>
>> ___
>> Bf-blender-cvs mailing list
>> bf-blender-...@blender.org
>> http://lists.blender.org/mailman/listinfo/bf-blender-cvs
>>
>
>
>
> --
> With best regards, Sergey Sharybin
> ___
> 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


[Bf-committers] scons build error

2011-12-26 Thread Yousef Hurfoush

hi
tried to build with scons msvcsp1 on windows 7 x64 with svn r42884
i get this error:

source\blender\blenfont\intern\blf_lang.c(194) : error C2039: 'debug' : is not

 member of 'Global'

source\blender\blenkernel\BKE_global.h(50) : see declaration of 'Global



makesrna.c

sCcons: *** [Z:\Development\blender\build\win64-trunk\source\blender\blenfont\i

tern\blf_lang.obj] Error 2

ompiling ==> 'rna_action.c'

rna_action.c

scons: building terminated because of errors.


Regards
Yousef Harfoush
ba...@msn.com

  
___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] scons build error

2011-12-26 Thread Thomas Dinges
Fixed in SVN. :)

Am 27.12.2011 02:16, schrieb Yousef Hurfoush:
> hi
> tried to build with scons msvcsp1 on windows 7 x64 with svn r42884
> i get this error:
>
> source\blender\blenfont\intern\blf_lang.c(194) : error C2039: 'debug' : is not
>
>   member of 'Global'
>
>  source\blender\blenkernel\BKE_global.h(50) : see declaration of 
> 'Global
>
>
>
> makesrna.c
>
> sCcons: *** 
> [Z:\Development\blender\build\win64-trunk\source\blender\blenfont\i
>
> tern\blf_lang.obj] Error 2
>
> ompiling ==>  'rna_action.c'
>
> rna_action.c
>
> scons: building terminated because of errors.
>
>
> Regards
> Yousef Harfoush
> ba...@msn.com
>
>   
> ___
> Bf-committers mailing list
> Bf-committers@blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers


-- 
Thomas Dinges
Blender Developer, Artist and Musician

www.dingto.org

___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Change Representation and Initialisation of Matrices to Conform with Standard Notation

2011-12-26 Thread Campbell Barton
To follow up on this topic, Andrews patch has been committed, and I've
added a 'col' attribute for scripts that still need column access
still,

2.61: mat[2] = 1, 2, 3
2.62: mat.col[2] = 1, 2, 3

See:

http://wiki.blender.org/index.php/User:TrumanBlending/Matrix_Indexing#Cheat_Sheet

Scripts in trunk are all be up to date, some addons still need updating,

On Mon, Dec 19, 2011 at 11:28 AM, Morten Mikkelsen  wrote:
> I am sorry I am a little late to the party but just thought I'd air my
> opinion.
>
> So since the order was fixed in blender's C code we now have what in math
> sense is a clear
> column major order ie. read from right to left. Thus translation for
> instance is the 4. column of a matrix
> and the vectors we transform are column vectors. In C terminology the
> translation is of course not the fourth
> column but the fourth row. The C terminology of course relates to the
> memory layout of a doubly indexed array (in C).
>
> Given that python is a high level language and memory layout is not exposed
> for a double indexed array (not a python programmer :)? it would imo make
> the most sense to use the mathematical interpretation of what a column is
> and then when a user asks for say the fourth column he'd get entries (in
> memory) 12, 13, 14 and 15 which is our translation/offset.
>
> I think adhering to the mathematical interpretation is more useful from
> python level than C memory layout of a doubly indexed array.
>
> This is my opinion.
>
> Cheers,
>
> Morten.
>
>
>
>
> On Sun, Dec 18, 2011 at 4:07 PM, Campbell Barton wrote:
>
>> Discussed this with Andrew and Benoit further, From their feedback I
>> gather row-major is the convention with math libs, so I propose to go
>> ahead with this within the next 2 weeks.
>>
>>
>> Rationale & general comments (re-iterating whats been said somewhat)...
>>
>> - Either way can be rationalized - depending on how strongly you want
>> to draw between python `mathutils` and OpenGL (or CG convention in
>> general), its a valid point but python devs are not coding OpenGL
>> typically.
>>
>> - Docs that discuss this issue for C/C++ apis I think don't really
>> apply IMHO, (panda3d doc for example). since the internal layout and
>> what is passed to OpenGL/DirectX need to be consistent in those cases.
>>
>> - Row major fits in with numpy - a popular python math module which
>> has some overlap with mathutils and some script devs are already using
>> with blender.
>>
>> - Will add a better __str__ function for matrix types which isn't so
>> confusing (this was needed anyway).
>>
>>
>>
>> Regarding the change,
>>
>> - Will update existing scripts in SVN
>>
>> - Will add docs describing the difference between mathutils & opengl
>> ordering.
>>
>> --
>> - Campbell
>>
>>
>> On Thu, Dec 15, 2011 at 10:15 PM, Andrew Hale 
>> wrote:
>> > Hi all,
>> >
>> > With the controlled chaos of the release (and what a release!) dying
>> down,
>> > I felt I should write again to more succinctly express the issue as I see
>> > it:
>> >
>> > The issue here is not how we index arrays internally (i.e. in C) as this
>> > has concerns around the layout in memory etc. The issue is that once we
>> > expose this data to the user via Python, we currently break the extremely
>> > well established mathematical convention of indexing the row first. This
>> is
>> > where my concern lies. Since we translate from C to a Python matrix
>> > already, it is a relatively simple change to maintain the mathematical
>> > convention of row first indexing.
>> >
>> > I do not know of another major mathematical package which indexes by
>> column
>> > first; Mathematica, GNU Octave, MatLab, Fortran and Numpy all use row
>> first
>> > indexing. It is also the case that Fortran, GNU Octave and MatLab use
>> > column major storage for their matrices but maintain the mathematical
>> > convention of row first indexing.
>> >
>> > Thanks again,
>> > Andrew
>> >
>> > On Sat, Dec 10, 2011 at 9:05 AM, Campbell Barton > >wrote:
>> >
>> >> Changes to the __repr__ function should evaluate, since this is common
>> >> practice,
>> >> see: http://docs.python.org/py3k/library/functions.html#repr
>> >>
>> >> currently mathutils and bpy do this where possible, eg.
>> >>
>> >> >>> Euler()
>> >> Euler((0.0, 0.0, 0.0), 'XYZ')
>> >>
>> >> >>> bpy.context.object
>> >> bpy.data.objects['Armature']
>> >>
>> >> # note how str does _not_ always do this, though for mathutils we only
>> >> have repr at the moment.
>> >> >>> print(bpy.context.object)
>> >> ''
>> >>
>> >>
>> >> If we want a better way to represent mathutils data, I'd prefer to use
>> >> __str__, or add a method that returns a pretty formatted matrix.
>> >>
>> >> Another reason this would be nice is repr on floats gives hard to read
>> >> results sometimes, a custom printing function can give aligned columns
>> >> without too many decimal places, same goes for vectors and other
>> >> types.
>> >> eg:
>> >>
>> >> Matrix(((1.0, 3.142857074737549, 0.0, 0.0),
>> >>        (0.0,