[Bf-committers] C++ in Blenders Kernel lib (Nav mesh)

2011-09-17 Thread Campbell Barton
Recent navmesh commit adds C++ into blenkernel -
source/blender/blenkernel/intern/navmesh_conversion.cpp

Until now we didn't have C++ in core libs, so not sure if this is
acceptable? - or what we should do now its in.

The file is only 450 LOC and doesn't use C++ classes or functionality
which is tricky to convert, the main thing holding it back from going
to C is Recast.h which has initializers inline with structs.

While I'm not up on C++, to me there seems to be 2 options.
1) Make Recast.h C compatible, convert navmesh_conversion.cpp to C code.
2) move navmesh_conversion.cpp into its own lib and have a C API (for
such a small file this is overkill but at least means no mixing
C/C++).

#2 is most straightforward, we can have intern/navmesh and arrange
much the same was as ghost.

Any comments?, anyone want to put their hands up to do this? :)

... or do we just not bother and have C++ in blenkernel?

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


Re: [Bf-committers] C++ in Blenders Kernel lib (Nav mesh)

2011-09-17 Thread Sergey I. Sharybin
Hi,

I'm not also fan of having C++ in kernel.

Not sure if this navmesh_conversion can be  can be easily moved to 
intern/ -- it uses DNA_meshdata_types and DerivedMesh structures. Was 
thinking about C-API for recast library, soblender kernel can easily use it.

There's at leats one more file which confuses me -- MOD_navmesh.cpp. 
Think it's better to make it C too.

I can try to get rid of this C++ today-tomorrow.

Campbell Barton wrote:
> Recent navmesh commit adds C++ into blenkernel - 
> source/blender/blenkernel/intern/navmesh_conversion.cpp
>
> Until now we didn't have C++ in core libs, so not sure if this is acceptable? 
> - or what we should do now its in.
>
> The file is only 450 LOC and doesn't use C++ classes or functionality which 
> is tricky to convert, the main thing holding it back from going to C is 
> Recast.h which has initializers inline with structs.
>
> While I'm not up on C++, to me there seems to be 2 options.
> 1) Make Recast.h C compatible, convert navmesh_conversion.cpp to C code.
> 2) move navmesh_conversion.cpp into its own lib and have a C API (for such a 
> small file this is overkill but at least means no mixing C/C++).
>
> #2 is most straightforward, we can have intern/navmesh and arrange much the 
> same was as ghost.
>
> Any comments?, anyone want to put their hands up to do this? :)
>
> ... or do we just not bother and have C++ in blenkernel?
>


-- 
With best regards, Sergey I. Sharybin

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


[Bf-committers] Console Scroll Down (issue 5036048)

2011-09-17 Thread blend . factory
Reviewers: bf-codereview_blender.org, bf-committers_blender.org,

Description:
Problem:
If one scrolls console up, and starts to type, input line isn't visible
untill one scrolls console manually dowb.

This patch solves the problem and returns console input line on keyboard
press or paste.

Please review this at http://codereview.appspot.com/5036048/

Affected files:
   source/blender/editors/interface/view2d_ops.c
   source/blender/editors/space_console/console_intern.h
   source/blender/editors/space_console/console_ops.c


Index: source/blender/editors/interface/view2d_ops.c
===
--- source/blender/editors/interface/view2d_ops.c   (revision 40290)
+++ source/blender/editors/interface/view2d_ops.c   (working copy)
@@ -423,6 +423,11 @@
ARegion *ar= CTX_wm_region(C);
RNA_int_set(op->ptr, "deltay", ar->v2d.mask.ymin - 
ar->v2d.mask.ymax);
}
+
+   if(RNA_boolean_get(op->ptr, "bottom")) {
+   ARegion *ar= CTX_wm_region(C);
+   RNA_int_set(op->ptr, "deltay", -ar->v2d.tot.ymax);
+   }

/* apply movement, then we're done */
view_pan_apply(op);
@@ -445,6 +450,7 @@
RNA_def_int(ot->srna, "deltax", 0, INT_MIN, INT_MAX, "Delta X", "",  
INT_MIN, INT_MAX);
RNA_def_int(ot->srna, "deltay", 0, INT_MIN, INT_MAX, "Delta Y", "",  
INT_MIN, INT_MAX);
RNA_def_boolean(ot->srna, "page", 0, "Page", "Scroll down one page.");
+   RNA_def_boolean(ot->srna, "bottom", 0, "Bottom", "Scroll down to the  
bottom");
  }


@@ -474,6 +480,12 @@
RNA_int_set(op->ptr, "deltay", ar->v2d.mask.ymax - 
ar->v2d.mask.ymin);
}

+   //Scroll region to top. Currently unused but prepared for some future 
use
+   if(RNA_boolean_get(op->ptr, "top")) {
+   ARegion *ar= CTX_wm_region(C);
+   RNA_int_set(op->ptr, "deltay", ar->v2d.tot.ymax);
+   }
+   
/* apply movement, then we're done */
view_pan_apply(op);
view_pan_exit(op);
@@ -495,6 +507,8 @@
RNA_def_int(ot->srna, "deltax", 0, INT_MIN, INT_MAX, "Delta X", "",  
INT_MIN, INT_MAX);
RNA_def_int(ot->srna, "deltay", 0, INT_MIN, INT_MAX, "Delta Y", "",  
INT_MIN, INT_MAX);
RNA_def_boolean(ot->srna, "page", 0, "Page", "Scroll up one page.");
+   //Scroll region to top. Currently unused but prepared for some future 
use
+   RNA_def_boolean(ot->srna, "top", 0, "Top", "Scroll up to the top");
  }

  /* * */
Index: source/blender/editors/space_console/console_intern.h
===
--- source/blender/editors/space_console/console_intern.h   (revision 40290)
+++ source/blender/editors/space_console/console_intern.h   (working copy)
@@ -54,6 +54,7 @@

  int console_report_mask(SpaceConsole *sc);

+void console_scroll_bottom(struct bContext *C);

  void CONSOLE_OT_move(struct wmOperatorType *ot);
  void CONSOLE_OT_delete(struct wmOperatorType *ot);
Index: source/blender/editors/space_console/console_ops.c
===
--- source/blender/editors/space_console/console_ops.c  (revision 40290)
+++ source/blender/editors/space_console/console_ops.c  (working copy)
@@ -285,6 +285,15 @@
{NEXT_WORD, "NEXT_WORD", 0, "Next Word", ""},
{0, NULL, 0, NULL, NULL}};

+void console_scroll_bottom(bContext *C){
+   PointerRNA ptr;
+
+   WM_operator_properties_create(&ptr, "VIEW2D_OT_scroll_down");
+   RNA_boolean_set(&ptr, "bottom", 1);
+   WM_operator_name_call(C, "VIEW2D_OT_scroll_down", 
WM_OP_EXEC_DEFAULT,  
&ptr);
+   WM_operator_properties_free(&ptr);
+}
+
  static int move_exec(bContext *C, wmOperator *op)
  {
ConsoleLine *ci= console_history_verify(C);
@@ -342,6 +351,8 @@
ED_area_tag_redraw(CTX_wm_area(C));
}

+   console_scroll_bottom(C);
+   
return OPERATOR_FINISHED;
  }

@@ -392,6 +403,8 @@
console_textview_update_rect(sc, ar);
ED_area_tag_redraw(CTX_wm_area(C));

+   console_scroll_bottom(C);
+   
return OPERATOR_FINISHED;
  }

@@ -479,6 +492,8 @@
console_textview_update_rect(sc, ar);
ED_area_tag_redraw(CTX_wm_area(C));

+   console_scroll_bottom(C);
+
return OPERATOR_FINISHED;
  }

@@ -588,6 +603,8 @@
/* could be wrapped so update scroll rect */
console_textview_update_rect(sc, ar);
ED_area_tag_redraw(CTX_wm_area(C));
+   
+   console_scroll_bottom(C);

return OPERATOR_FINISHED;
  }
@@ -682,6 +699,8 @@
}

ED_area_tag_redraw(CTX_wm_area(C));
+
+   console_scroll_bottom(C);

return OPERATOR_FINISHED;
  }
@@ -824,6 +843,8 @@

console_textview_update

Re: [Bf-committers] [Bf-blender-cvs] SVN commit: /data/svn/bf-blender [40298] branches/cycles: Cycles: svn merge -r39870:r40266 https://svn.blender.org/svnroot/bf-blender/trunk/ blender

2011-09-17 Thread Thomas Dinges
Hi Brecht,
thanks for your work!

I get an cmake error after update, maybe a missing file.

CMake Error at build_files/cmake/macros.cmake:126 (add_library):

Cannot find source file:

shader/nodes/node_shader_attribute.c


Best regards,
Thomas

Am 17.09.2011 15:28, schrieb Brecht Van Lommel:
> Revision: 40298
>
> http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=40298
> Author:   blendix
> Date: 2011-09-17 13:28:40 + (Sat, 17 Sep 2011)
> Log Message:
> ---
> Cycles: svn merge -r39870:r40266 
> https://svn.blender.org/svnroot/bf-blender/trunk/blender
>
> Merging the node changes required a lot of conflict resolution, fixed the
> issues I could find but if you want stability you might want to wait a bit
> before updating.
>
> Revision Links:
> --
>  
> http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=39870
>  
> http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=40266

-- 
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


[Bf-committers] Bmesh compile with Scons broken

2011-09-17 Thread Sanne
Hi,

when compiling Bmesh branch r40294 with Scons I get (first error):

source/blender/editors/object/object_navmesh.cpp: In function ‘void 
createVertsTrisData(bContext*, LinkNode*, int&, float*&, int&, int*&)’:
source/blender/editors/object/object_navmesh.cpp:97: error: ‘struct 
DerivedMesh’ has no member named ‘getFaceArray’

I have disabled gameengine and player in my user-config.py. Isn't navmesh 
stuff supposed to be disabled then as well?

Thanks,
Sanne

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


Re: [Bf-committers] [Bf-blender-cvs] SVN commit: /data/svn/bf-blender [40308] branches/soc-2011-garlic: i18n: replace gnu unifont with droid sans font

2011-09-17 Thread Dalai Felinto
Hi Sergey,
I'm glad to see the Droid font there. I just updated the win garlic builds
with the new font :) [1]

Guillermo (gez) told me that you found your way to combine different tffs.
It seems, however, that the final one does not have at least the Latin
subset.

Some of the missing glyphs: ñ (you can see this in the "Español" (Spanish)
option in the UI). ç (missing in the Française option).
They are other missing characters visible from the Language selection ui as
well.

Note: if you want to try a quick hack to edit an existent UI file to replace
a text with a latin character you need to add this to the top of the
script:
# -*- coding: latin-1 -*-

Note 2: once we are done with this change would be nice to get rid of bfont
(i.e. to use DroidSans as the Font Object font).
Note 3: ideally we should use the DroidSansMono for the TextEditor, what do
you think? I remember trying it but the character spacing were all messed up
when code syntax was on (I think we have hardcoded values there).

Cheers,
Dalai

[1] - www.graphicall.org/dfelinto

2011/9/17 Sergey Sharybin 

> Revision: 40308
>
> http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=40308
> Author:   nazgul
> Date: 2011-09-17 20:50:22 + (Sat, 17 Sep 2011)
> Log Message:
> ---
> i18n: replace gnu unifont with droid sans font
>
> - Static variables can be initialized with constants only.
> - Removed bunifont.ttf.c from datafiles -- it's not actually a
>  data file. Unicode font loading stuff is not in blenkernel/font.c
> - Allocate as much memory for unzipped data as it's needed.
>  Default read chunk is 512Kb.
> - Fixed regression (or just a typo) in setting utf locale.
> - Default locale set to en_US:en works fine now.
> - Commented put Nepali language in user preferences -- it's
>  not supported by current droid font and imo it's better to
>  have nice font for languages we actually have translation for
>  rather than allowing to choose more languages in user preferences.
>
> Modified Paths:
> --
>branches/soc-2011-garlic/source/blender/blenfont/intern/blf_lang.c
>branches/soc-2011-garlic/source/blender/blenkernel/BKE_font.h
>branches/soc-2011-garlic/source/blender/blenkernel/CMakeLists.txt
>branches/soc-2011-garlic/source/blender/blenkernel/SConscript
>branches/soc-2011-garlic/source/blender/blenkernel/intern/font.c
>branches/soc-2011-garlic/source/blender/blenlib/BLI_fileops.h
>branches/soc-2011-garlic/source/blender/blenlib/intern/fileops.c
>branches/soc-2011-garlic/source/blender/editors/datafiles/CMakeLists.txt
>
>  branches/soc-2011-garlic/source/blender/editors/interface/interface_style.c
>branches/soc-2011-garlic/source/blender/makesrna/intern/rna_userdef.c
>
>  branches/soc-2011-garlic/source/blender/windowmanager/intern/wm_init_exit.c
>
> Added Paths:
> ---
>branches/soc-2011-garlic/release/bin/.blender/fonts/droidsans.ttf.gz
>
> Removed Paths:
> -
>branches/soc-2011-garlic/release/bin/.blender/fonts/unifont.ttf.gz
>branches/soc-2011-garlic/source/blender/editors/datafiles/bunifont.ttf.c
>
> Added: branches/soc-2011-garlic/release/bin/.blender/fonts/droidsans.ttf.gz
> ===
> --- branches/soc-2011-garlic/release/bin/.blender/fonts/droidsans.ttf.gz
>  (rev 0)
> +++ branches/soc-2011-garlic/release/bin/.blender/fonts/droidsans.ttf.gz
>  2011-09-17 20:50:22 UTC (rev 40308)
> @@ -0,0 +1,12441 @@
> + \x8B  '\xEAtN  DroidSansFallback.ttf \xEC\x9D
> +`\U\x95\xF8\xDF{y-E* \x88 %괝\xC2  t\xD4QF a\x80Q\x82 \x88 $j\x80  \x82
> $jq\xA6 \xB1jѪU\xABV\xADZ\xB5jкV\xB7j\xDD\xED\xEEv\xD7\xEEn\x85\xBAV-
> \xDC\xEA\xD6ݪU\xAB
> Z\xD2\xFF\xEF\x9C\xF7nss\xFB&I\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