col = layout.column()
row = col.row()
if md.external:
- row.operator("object.multires_pack_external", text="Pack External")
+ row.operator("object.multires_external_pack", text="Pack External")
row.label()
row = col.row()
- row.prop(md, "filename", text="")
+ row.prop(md, "filepath", text="")
else:
- row.operator("object.multires_save_external", text="Save External...")
+ row.operator("object.multires_external_save", text="Save External...")
row.label()
+ def NAVMESH(self, layout, ob, md, wide_ui):
+ layout.label(text="Rasterization:")
+ split = layout.split()
+
+ col = split.column()
+ col.prop(md, "cellsize")
+ if wide_ui:
+ col = split.column()
+ col.prop(md, "cellheight")
+
+ layout.separator()
+
+ layout.label(text="Agent:")
+ split = layout.split()
+ col = split.column()
+ row = col.row()
+ row.prop(md, "agentheight")
+ row = col.row()
+ row.prop(md, "agentradius")
+ if wide_ui:
+ col = split.column()
+ row = col.row()
+ row.prop(md, "agentmaxslope")
+ row = col.row()
+ row.prop(md, "agentmaxclimb")
+
+ layout.separator()
+
+ layout.label(text="Region:")
+ split = layout.split()
+ col = split.column()
+ col.prop(md, "regionminsize")
+ if wide_ui:
+ col = split.column()
+ col.prop(md, "regionmergesize")
+
+ layout.separator()
+
+ layout.label(text="Polygonization:")
+ split = layout.split()
+ col = split.column()
+ row = col.row()
+ row.prop(md, "edgemaxlen")
+ row = col.row()
+ row.prop(md, "edgemaxerror")
+ if wide_ui:
+ col = split.column()
+ row = col.row()
+ row.prop(md, "vertsperpoly")
+
+ layout.separator()
+
+ layout.label(text="Detail Mesh:")
+ split = layout.split()
+ col = split.column()
+ col.prop(md, "detailsampledist")
+ if wide_ui:
+ col = split.column()
+ col.prop(md, "detailsamplemaxerror")
+
+
def PARTICLE_INSTANCE(self, layout, ob, md, wide_ui):
layout.prop(md, "object")
layout.prop(md, "particle_system_number", text="Particle System")
ob->anisotropicFriction[2] = 1.0f;
ob->gameflag= OB_PROP|OB_COLLISION;
ob->margin = 0.0;
+ ob->init_state=1;
+ ob->state=1;
/* ob->pad3 == Contact Processing Threshold */
ob->m_contactProcessingThreshold = 1.;
+ ob->obstacleRad = 1.;
/* NT fluid sim defaults */
ob->fluidsimFlag = 0;
}
}
}
+
+ /* initialise scene active layer */
+ for (scene= main->scene.first; scene; scene=scene->id.next) {
+ int i;
+ for(i=0; i<20; i++) {
+ if(scene->lay & (1<<i)) {
+ scene->layact= 1<<i;
+ break;
+ }
+ }
+ }
+
+ for(tex= main->tex.first; tex; tex= tex->id.next) {
+ /* if youre picky, this isn't correct until we do a version bump
+ * since you could set saturation to be 0.0*/
+ if(tex->saturation==0.0f)
+ tex->saturation= 1.0f;
+ }
+ //set defaults for recast data
+ {
+ Scene *sce;
+ for(sce = main->scene.first; sce; sce = sce->id.next)
+ {
+ if(sce->unit.scale_length == 0.0f)
+ sce->unit.scale_length= 1.0f;
+ if(sce->gm.recastData.cellsize == 0.0f)
+ sce->gm.recastData.cellsize = 0.3f;
+ if(sce->gm.recastData.cellheight == 0.0f)
+ sce->gm.recastData.cellheight = 0.2f;
+ if(sce->gm.recastData.agentmaxslope == 0.0f)
+ sce->gm.recastData.agentmaxslope = M_PI/4;
+ if(sce->gm.recastData.agentmaxclimb == 0.0f)
+ sce->gm.recastData.agentmaxclimb = 0.9f;
+ if(sce->gm.recastData.agentheight == 0.0f)
+ sce->gm.recastData.agentheight = 2.0f;
+ if(sce->gm.recastData.agentradius == 0.0f)
+ sce->gm.recastData.agentradius = 0.6f;
+ if(sce->gm.recastData.edgemaxlen == 0.0f)
+ sce->gm.recastData.edgemaxlen = 12.0f;
+ if(sce->gm.recastData.edgemaxerror == 0.0f)
+ sce->gm.recastData.edgemaxerror = 1.3f;
+ if(sce->gm.recastData.regionminsize == 0.0f)
+ sce->gm.recastData.regionminsize = 50.f;
+ if(sce->gm.recastData.regionmergesize == 0.0f)
+ sce->gm.recastData.regionmergesize = 20.f;
+ if(sce->gm.recastData.vertsperpoly<3)
+ sce->gm.recastData.vertsperpoly = 6;
+ if(sce->gm.recastData.detailsampledist == 0.0f)
+ sce->gm.recastData.detailsampledist = 6.0f;
+ if(sce->gm.recastData.detailsamplemaxerror == 0.0f)
+ sce->gm.recastData.detailsamplemaxerror = 1.0f;
+ }
+ }
}
--
/* WATCH IT!!!: pointers from libdata have not been converted yet here! */
/* WATCH IT 2!: Userdef struct init has to be in editors/interface/resources.c! */
RNA_def_property_pointer_sdna(prop, NULL, "bsoft");
RNA_def_property_ui_text(prop, "Soft Body Settings", "Settings for Bullet soft body simulation");
+ prop= RNA_def_property(srna, "create_obstacle", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "gameflag", OB_HASOBSTACLE);
+ RNA_def_property_ui_text(prop, "Create obstacle", "Create representation for obstacle simulation");
+
+ prop= RNA_def_property(srna, "obstacle_radius", PROP_FLOAT, PROP_NONE|PROP_UNIT_LENGTH);
+ RNA_def_property_float_sdna(prop, NULL, "obstacleRad");
+ RNA_def_property_range(prop, 0.0, 1000.0);
+ RNA_def_property_ui_text(prop, "Obstacle Radius", "Radius of object representation in obstacle simulation");
+
/* state */
- prop= RNA_def_property(srna, "state", PROP_BOOLEAN, PROP_LAYER_MEMBER);
+ prop= RNA_def_property(srna, "visible_state", PROP_BOOLEAN, PROP_LAYER_MEMBER);
RNA_def_property_boolean_sdna(prop, NULL, "state", 1);
RNA_def_property_array(prop, OB_MAX_STATES);
RNA_def_property_ui_text(prop, "State", "State determining which controllers are displayed");
#include "DNA_group_types.h"
#include "DNA_modifier_types.h"
+ #include "DNA_particle_types.h"
#include "DNA_scene_types.h"
#include "DNA_userdef_types.h"
+#include "BLI_math.h"
/* Include for Bake Options */
#include "RE_pipeline.h"
class btCollisionShape;
class KX_BlenderSceneConverter;
struct KX_ClientObjectInfo;
+class KX_ObstacleSimulation;
+ #ifdef WITH_CXX_GUARDEDALLOC
+ #include "MEM_guardedalloc.h"
+ #endif
+
/* for ID freeing */
#define IS_TAGGED(_id) ((_id) && (((ID *)_id)->flag & LIB_DOIT))