diff options
author | Nick Samarin <nicks1987@bigmir.net> | 2010-07-15 22:41:29 +0400 |
---|---|---|
committer | Nick Samarin <nicks1987@bigmir.net> | 2010-07-15 22:41:29 +0400 |
commit | 0fbca1dc19afaa034377d5aeed10fa8c25e2a102 (patch) | |
tree | 0cdfcd270bba96ae536f4b91c56da7e73c2d56d7 /source/blender | |
parent | 219e9022b9a2718abbe9bbd61514fcc1b8fa9b73 (diff) |
- added options to enable visualization for obstacle simulation and steering actuator
- added python attributes for parameters of steering actuator
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenlib/BLI_math_vector.h | 2 | ||||
-rw-r--r-- | source/blender/blenlib/intern/math_vector_inline.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_logic/logic_window.c | 4 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_actuator_types.h | 1 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_scene_types.h | 1 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_actuator.c | 5 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 4 |
7 files changed, 17 insertions, 2 deletions
diff --git a/source/blender/blenlib/BLI_math_vector.h b/source/blender/blenlib/BLI_math_vector.h index 02d5fb27dc9..e27b71f9301 100644 --- a/source/blender/blenlib/BLI_math_vector.h +++ b/source/blender/blenlib/BLI_math_vector.h @@ -121,7 +121,7 @@ void mid_v3_v3v3(float r[3], float a[3], float b[3]); MINLINE int is_zero_v3(float a[3]); MINLINE int is_one_v3(float a[3]); -MINLINE int equals_v3v3(float a[3], float b[3]); +MINLINE int equals_v3v3(const float a[3],const float b[3]); MINLINE int compare_v3v3(float a[3], float b[3], float limit); MINLINE int compare_len_v3v3(float a[3], float b[3], float limit); diff --git a/source/blender/blenlib/intern/math_vector_inline.c b/source/blender/blenlib/intern/math_vector_inline.c index fa8d1a30269..aa72be4fcc2 100644 --- a/source/blender/blenlib/intern/math_vector_inline.c +++ b/source/blender/blenlib/intern/math_vector_inline.c @@ -404,7 +404,7 @@ MINLINE int is_one_v3(float *v) return (v[0] == 1 && v[1] == 1 && v[2] == 1); } -MINLINE int equals_v3v3(float *v1, float *v2) +MINLINE int equals_v3v3(const float *v1,const float *v2) { return ((v1[0]==v2[0]) && (v1[1]==v2[1]) && (v1[2]==v2[2])); } diff --git a/source/blender/editors/space_logic/logic_window.c b/source/blender/editors/space_logic/logic_window.c index 8a011184f0d..22921f41ae9 100644 --- a/source/blender/editors/space_logic/logic_window.c +++ b/source/blender/editors/space_logic/logic_window.c @@ -4324,7 +4324,11 @@ static void draw_actuator_steering(uiLayout *layout, PointerRNA *ptr) row = uiLayoutRow(layout, 0); uiItemR(row, ptr, "selfterminated", 0, NULL, 0); if (RNA_enum_get(ptr, "mode")==ACT_STEERING_PATHFOLLOWING) + { uiItemR(row, ptr, "updateperiod", 0, NULL, 0); + row = uiLayoutRow(layout, 0); + } + uiItemR(row, ptr, "enablevisualization", 0, NULL, 0); } diff --git a/source/blender/makesdna/DNA_actuator_types.h b/source/blender/makesdna/DNA_actuator_types.h index 9d26632769b..f3e8dc93cfd 100644 --- a/source/blender/makesdna/DNA_actuator_types.h +++ b/source/blender/makesdna/DNA_actuator_types.h @@ -522,6 +522,7 @@ typedef struct FreeCamera { #define ACT_STEERING_PATHFOLLOWING 2 /* steeringactuator->flag */ #define ACT_STEERING_SELFTERMINATED 1 +#define ACT_STEERING_ENABLEVISUALIZATION 2 #endif diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index 2fa08c663c1..72044513300 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -516,6 +516,7 @@ typedef struct GameData { #define GAME_GLSL_NO_EXTRA_TEX (1 << 11) #define GAME_IGNORE_DEPRECATION_WARNINGS (1 << 12) #define GAME_ENABLE_ANIMATION_RECORD (1 << 13) +#define GAME_SHOW_OBSTACLE_SIMULATION (1 << 14) /* GameData.matmode */ #define GAME_MAT_TEXFACE 0 diff --git a/source/blender/makesrna/intern/rna_actuator.c b/source/blender/makesrna/intern/rna_actuator.c index b78eb766151..fdd017873e7 100644 --- a/source/blender/makesrna/intern/rna_actuator.c +++ b/source/blender/makesrna/intern/rna_actuator.c @@ -1926,6 +1926,11 @@ static void rna_def_steering_actuator(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Self terminated", "Terminate when target is reached"); RNA_def_property_update(prop, NC_LOGIC, NULL); + prop= RNA_def_property(srna, "enablevisualization", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_STEERING_ENABLEVISUALIZATION); + RNA_def_property_ui_text(prop, "Visualize", "Enable debug visualization"); + RNA_def_property_update(prop, NC_LOGIC, NULL); + prop= RNA_def_property(srna, "updateperiod", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "updateTime"); RNA_def_property_ui_range(prop, -1, 100000, 1, 1); diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 23b4596828c..3dc10530242 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -1862,6 +1862,10 @@ static void rna_def_scene_game_data(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Level height", "Max difference in heights of obstacles to enable their interaction"); RNA_def_property_update(prop, NC_SCENE, NULL); + prop= RNA_def_property(srna, "show_obstacle_simulation", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", GAME_SHOW_OBSTACLE_SIMULATION); + RNA_def_property_ui_text(prop, "Visualization", "Enable debug visualization for obstacle simulation"); + /* Recast Settings */ prop= RNA_def_property(srna, "recast_data", PROP_POINTER, PROP_NONE); RNA_def_property_flag(prop, PROP_NEVER_NULL); |