[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [30165] branches/soc-2010-nicks: Added operator for generating navigation mesh for selected blender objects
Nick Samarin
nicks1987 at bigmir.net
Sat Jul 10 00:16:52 CEST 2010
Revision: 30165
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=30165
Author: nicks
Date: 2010-07-10 00:16:52 +0200 (Sat, 10 Jul 2010)
Log Message:
-----------
Added operator for generating navigation mesh for selected blender objects
Modified Paths:
--------------
branches/soc-2010-nicks/projectfiles_vc9/blender/editors/ED_editors.vcproj
branches/soc-2010-nicks/projectfiles_vc9/blender/modifiers/modifiers.vcproj
branches/soc-2010-nicks/release/scripts/ui/properties_scene.py
branches/soc-2010-nicks/source/blender/blenkernel/BKE_context.h
branches/soc-2010-nicks/source/blender/blenkernel/intern/scene.c
branches/soc-2010-nicks/source/blender/blenloader/intern/readfile.c
branches/soc-2010-nicks/source/blender/editors/include/ED_object.h
branches/soc-2010-nicks/source/blender/editors/object/object_intern.h
branches/soc-2010-nicks/source/blender/editors/object/object_ops.c
branches/soc-2010-nicks/source/blender/makesdna/DNA_scene_types.h
branches/soc-2010-nicks/source/blender/makesrna/intern/rna_scene.c
branches/soc-2010-nicks/source/blender/modifiers/intern/MOD_navmesh.cpp
Added Paths:
-----------
branches/soc-2010-nicks/source/blender/editors/object/object_navmesh.cpp
Modified: branches/soc-2010-nicks/projectfiles_vc9/blender/editors/ED_editors.vcproj
===================================================================
--- branches/soc-2010-nicks/projectfiles_vc9/blender/editors/ED_editors.vcproj 2010-07-09 22:14:34 UTC (rev 30164)
+++ branches/soc-2010-nicks/projectfiles_vc9/blender/editors/ED_editors.vcproj 2010-07-09 22:16:52 UTC (rev 30165)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
- Version="9,00"
+ Version="9.00"
Name="ED_editors"
ProjectGUID="{FB88301F-F725-401B-ACD7-D2ABBF333B71}"
RootNamespace="BL_editors"
@@ -119,7 +119,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="..\..\..\..\lib\windows\QTDevWin\CIncludes;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\python\include\python2.6;..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\ghost\include;..\..\..\..\build\msvc_9\intern\elbeem\include;..\..\..\..\build\msvc_9\intern\opennl\include;..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\build\msvc_9\intern\blenkey\include;..\..\..\..\build\msvc_9\intern\decimation\include;..\..\..\..\build\msvc_9\intern\memutil\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\smoke\include;..\..\..\..\build\msvc_9\intern\soundsystem\include;..\..\..\source\blender;..\..\..\source\blender\img;..\..\..\source\blender\verify;..\..\..\source\blender\ftfont;..\..\..\source\blender\misc;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\python;..\..\..\source\blender\editors\include;..\..\..\source\blender\editors\interface;..\..\..\source\blender\renderui;..\..\..\source\blender\blenloader;..\..\..\source\blender\quicktime;..\..\..\source\blender\blenkernel;..\..\..\source\blender\blenfont;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\nodes;..\..\..\source\blender\windowmanager;..\..\..\source\blender\blenpluginapi;..\..\..\source\blender\renderconverter;..\..\..\source\blender\readstreamglue;..\..\..\source\blender\render\extern\include;..\..\..\source\blender\radiosity\extern\include;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\network;..\..\..\source\gameengine\soundsystem\snd_openal;..\..\..\..\build\msvc_9\extern\verse\include;..\..\..\..\lib\windows\pthreads\include;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\blender\gpu;..\..\..\intern\audaspace\intern;..\..\..\source\blender\ikplugin;..\..\..\..\lib\windows\openal\include;..\..\..\..\lib\windows\jack\include"
+ AdditionalIncludeDirectories="..\..\..\..\lib\windows\QTDevWin\CIncludes;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\python\include\python2.6;..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\ghost\include;..\..\..\..\build\msvc_9\intern\elbeem\include;..\..\..\..\build\msvc_9\intern\opennl\include;..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\build\msvc_9\intern\blenkey\include;..\..\..\..\build\msvc_9\intern\decimation\include;..\..\..\..\build\msvc_9\intern\memutil\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\smoke\include;..\..\..\..\build\msvc_9\intern\soundsystem\include;..\..\..\source\blender;..\..\..\source\blender\img;..\..\..\source\blender\verify;..\..\..\source\blender\ftfont;..\..\..\source\blender\misc;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\python;..\..\..\source\blender\editors\include;..\..\..\source\blender\editors\interface;..\..\..\source\blender\renderui;..\..\..\source\blender\blenloader;..\..\..\source\blender\quicktime;..\..\..\source\blender\blenkernel;..\..\..\source\blender\blenfont;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\nodes;..\..\..\source\blender\windowmanager;..\..\..\source\blender\blenpluginapi;..\..\..\source\blender\renderconverter;..\..\..\source\blender\readstreamglue;..\..\..\source\blender\render\extern\include;..\..\..\source\blender\radiosity\extern\include;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\network;..\..\..\source\gameengine\soundsystem\snd_openal;..\..\..\..\build\msvc_9\extern\verse\include;..\..\..\..\lib\windows\pthreads\include;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\blender\gpu;..\..\..\intern\audaspace\intern;..\..\..\source\blender\ikplugin;..\..\..\..\lib\windows\openal\include;..\..\..\..\lib\windows\jack\include;..\..\..\..\build\msvc_9\extern\recastnavigation\Recast\Include"
PreprocessorDefinitions="_DEBUG;WIN32;_LIB;_CONSOLE;GAMEBLENDER=1;WITH_QUICKTIME;INTERNATIONAL;WITH_BF_INTERNATIONAL;WITH_FREETYPE2;WITH_OPENEXR;WITH_DDS;WITH_BULLET = 1;WITH_FFMPEG;WITH_SDL;WITH_OPENAL;WITH_JACK"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
@@ -1116,6 +1116,10 @@
>
</File>
<File
+ RelativePath="..\..\..\source\blender\editors\object\object_navmesh.cpp"
+ >
+ </File>
+ <File
RelativePath="..\..\..\source\blender\editors\object\object_ops.c"
>
</File>
Modified: branches/soc-2010-nicks/projectfiles_vc9/blender/modifiers/modifiers.vcproj
===================================================================
--- branches/soc-2010-nicks/projectfiles_vc9/blender/modifiers/modifiers.vcproj 2010-07-09 22:14:34 UTC (rev 30164)
+++ branches/soc-2010-nicks/projectfiles_vc9/blender/modifiers/modifiers.vcproj 2010-07-09 22:16:52 UTC (rev 30165)
@@ -182,7 +182,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="..\..\..\..\lib\windows\zlib\include;..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\decimation\include;..\..\..\..\build\msvc_9\intern\elbeem\include;..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\blenkernel\intern;..\..\..\source\blender\makesdna;..\..\..\source\blender\modifiers;..\..\..\source\blender\render\extern\include;..\..\..\..\build\msvc_9\extern\recastnavigation\Recast\Include"
+ AdditionalIncludeDirectories="..\..\..\..\lib\windows\zlib\include;..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\decimation\include;..\..\..\..\build\msvc_9\intern\elbeem\include;..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\blenkernel\intern;..\..\..\source\blender\makesdna;..\..\..\source\blender\editors\include;..\..\..\source\blender\gpu;..\..\..\source\blender\modifiers;..\..\..\source\blender\render\extern\include;..\..\..\..\build\msvc_9\extern\recastnavigation\Recast\Include"
PreprocessorDefinitions="_DEBUG;WIN32;_LIB;WITH_LZO;WITH_LZMA"
MinimalRebuild="false"
BasicRuntimeChecks="3"
Modified: branches/soc-2010-nicks/release/scripts/ui/properties_scene.py
===================================================================
--- branches/soc-2010-nicks/release/scripts/ui/properties_scene.py 2010-07-09 22:14:34 UTC (rev 30164)
+++ branches/soc-2010-nicks/release/scripts/ui/properties_scene.py 2010-07-09 22:16:52 UTC (rev 30165)
@@ -335,7 +335,79 @@
wm.add_fileselect(self)
return {'RUNNING_MODAL'}
+class SCENE_PT_navmesh(SceneButtonsPanel):
+ bl_label = "Navmesh"
+ bl_default_closed = True
+ COMPAT_ENGINES = {'BLENDER_RENDER'}
+ def draw(self, context):
+ layout = self.layout
+
+ rd = context.scene.game_data.recast_data
+ wide_ui = context.region.width > narrowui
+
+ layout.operator("object.create_navmesh", text='Build navigation mesh')
+
+ layout.label(text="Rasterization:")
+ split = layout.split()
+
+ col = split.column()
+ col.prop(rd, "cellsize")
+ if wide_ui:
+ col = split.column()
+ col.prop(rd, "cellheight")
+
+ layout.separator()
+
+ layout.label(text="Agent:")
+ split = layout.split()
+ col = split.column()
+ row = col.row()
+ row.prop(rd, "agentheight")
+ row = col.row()
+ row.prop(rd, "agentradius")
+ if wide_ui:
+ col = split.column()
+ row = col.row()
+ row.prop(rd, "agentmaxslope")
+ row = col.row()
+ row.prop(rd, "agentmaxclimb")
+
+ layout.separator()
+
+ layout.label(text="Region:")
+ split = layout.split()
+ col = split.column()
+ col.prop(rd, "regionminsize")
+ if wide_ui:
+ col = split.column()
+ col.prop(rd, "regionmergesize")
+
+ layout.separator()
+
+ layout.label(text="Polygonization:")
+ split = layout.split()
+ col = split.column()
+ row = col.row()
+ row.prop(rd, "edgemaxlen")
+ row = col.row()
+ row.prop(rd, "edgemaxerror")
+ if wide_ui:
+ col = split.column()
+ row = col.row()
+ row.prop(rd, "vertsperpoly")
+
+ layout.separator()
+
+ layout.label(text="Detail Mesh:")
+ split = layout.split()
+ col = split.column()
+ col.prop(rd, "detailsampledist")
+ if wide_ui:
+ col = split.column()
+ col.prop(rd, "detailsamplemaxerror")
+
+
classes = [
SCENE_PT_scene,
SCENE_PT_unit,
@@ -343,6 +415,7 @@
SCENE_PT_keying_set_paths,
SCENE_PT_physics,
SCENE_PT_simplify,
+ SCENE_PT_navmesh,
SCENE_PT_custom_props,
Modified: branches/soc-2010-nicks/source/blender/blenkernel/BKE_context.h
===================================================================
--- branches/soc-2010-nicks/source/blender/blenkernel/BKE_context.h 2010-07-09 22:14:34 UTC (rev 30164)
+++ branches/soc-2010-nicks/source/blender/blenkernel/BKE_context.h 2010-07-09 22:16:52 UTC (rev 30165)
@@ -204,8 +204,9 @@
ListBase ctx_data_list; \
CollectionPointerLink *ctx_link; \
CTX_data_##member(C, &ctx_data_list); \
- for(ctx_link=ctx_data_list.first; ctx_link; ctx_link=ctx_link->next) { \
- Type instance= ctx_link->ptr.data;
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list