Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDalai Felinto <dfelinto@gmail.com>2016-12-23 17:36:16 +0300
committerDalai Felinto <dfelinto@gmail.com>2016-12-23 17:36:16 +0300
commit605263177b8eea24c1449e4dbf0138175ec3dddf (patch)
treeea297c777bcfae7c647ca88c48b8df3f8f3bd843 /source/blender/blenkernel
parent76c4f0ec6c61bdc33ae908849f632771a1f997c0 (diff)
parentb47c912f4be877bf5511117864dfc2a5b30c0dca (diff)
Merge remote-tracking branch 'origin/master' into blender2.8
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/BKE_effect.h16
-rw-r--r--source/blender/blenkernel/BKE_gpencil.h2
-rw-r--r--source/blender/blenkernel/intern/effect.c16
3 files changed, 25 insertions, 9 deletions
diff --git a/source/blender/blenkernel/BKE_effect.h b/source/blender/blenkernel/BKE_effect.h
index 90fe3601372..0645bc1e00e 100644
--- a/source/blender/blenkernel/BKE_effect.h
+++ b/source/blender/blenkernel/BKE_effect.h
@@ -166,6 +166,7 @@ typedef struct SimDebugElement {
float color[3];
float v1[3], v2[3];
+ char str[64];
} SimDebugElement;
typedef enum eSimDebugElement_Type {
@@ -173,6 +174,7 @@ typedef enum eSimDebugElement_Type {
SIM_DEBUG_ELEM_CIRCLE,
SIM_DEBUG_ELEM_LINE,
SIM_DEBUG_ELEM_VECTOR,
+ SIM_DEBUG_ELEM_STRING,
} eSimDebugElement_Type;
typedef struct SimDebugData {
@@ -185,26 +187,30 @@ void BKE_sim_debug_data_set_enabled(bool enable);
bool BKE_sim_debug_data_get_enabled(void);
void BKE_sim_debug_data_free(void);
-void BKE_sim_debug_data_add_element(int type, const float v1[3], const float v2[3],
+void BKE_sim_debug_data_add_element(int type, const float v1[3], const float v2[3], const char *str,
float r, float g, float b, const char *category, unsigned int hash);
void BKE_sim_debug_data_remove_element(unsigned int hash);
#define BKE_sim_debug_data_add_dot(p, r, g, b, category, ...) { \
const float v2[3] = { 0.0f, 0.0f, 0.0f }; \
- BKE_sim_debug_data_add_element(SIM_DEBUG_ELEM_DOT, p, v2, r, g, b, category, SIM_DEBUG_HASH(__VA_ARGS__)); \
+ BKE_sim_debug_data_add_element(SIM_DEBUG_ELEM_DOT, p, v2, NULL, r, g, b, category, SIM_DEBUG_HASH(__VA_ARGS__)); \
}
#define BKE_sim_debug_data_add_circle(p, radius, r, g, b, category, ...) { \
const float v2[3] = { radius, 0.0f, 0.0f }; \
- BKE_sim_debug_data_add_element(SIM_DEBUG_ELEM_CIRCLE, p, v2, r, g, b, category, SIM_DEBUG_HASH(__VA_ARGS__)); \
+ BKE_sim_debug_data_add_element(SIM_DEBUG_ELEM_CIRCLE, p, v2, NULL, r, g, b, category, SIM_DEBUG_HASH(__VA_ARGS__)); \
}
#define BKE_sim_debug_data_add_line(p1, p2, r, g, b, category, ...) { \
- BKE_sim_debug_data_add_element(SIM_DEBUG_ELEM_LINE, p1, p2, r, g, b, category, SIM_DEBUG_HASH(__VA_ARGS__)); \
+ BKE_sim_debug_data_add_element(SIM_DEBUG_ELEM_LINE, p1, p2, NULL, r, g, b, category, SIM_DEBUG_HASH(__VA_ARGS__)); \
}
#define BKE_sim_debug_data_add_vector(p, d, r, g, b, category, ...) { \
- BKE_sim_debug_data_add_element(SIM_DEBUG_ELEM_VECTOR, p, d, r, g, b, category, SIM_DEBUG_HASH(__VA_ARGS__)); \
+ BKE_sim_debug_data_add_element(SIM_DEBUG_ELEM_VECTOR, p, d, NULL, r, g, b, category, SIM_DEBUG_HASH(__VA_ARGS__)); \
+}
+
+#define BKE_sim_debug_data_add_string(p, str, r, g, b, category, ...) { \
+ BKE_sim_debug_data_add_element(SIM_DEBUG_ELEM_STRING, p, NULL, str, r, g, b, category, SIM_DEBUG_HASH(__VA_ARGS__)); \
}
#define BKE_sim_debug_data_remove(...) \
diff --git a/source/blender/blenkernel/BKE_gpencil.h b/source/blender/blenkernel/BKE_gpencil.h
index ab8b83f8271..3378f4acc60 100644
--- a/source/blender/blenkernel/BKE_gpencil.h
+++ b/source/blender/blenkernel/BKE_gpencil.h
@@ -104,7 +104,7 @@ void BKE_gpencil_layer_delete(struct bGPdata *gpd, struct bGPDlayer *gpl);
struct bGPDbrush *BKE_gpencil_brush_getactive(struct ToolSettings *ts);
void BKE_gpencil_brush_setactive(struct ToolSettings *ts, struct bGPDbrush *active);
-void BKE_gpencil_brush_delete(struct ToolSettings *ts, struct bGPDbrush *palette);
+void BKE_gpencil_brush_delete(struct ToolSettings *ts, struct bGPDbrush *brush);
struct bGPDpalette *BKE_gpencil_palette_getactive(struct bGPdata *gpd);
void BKE_gpencil_palette_setactive(struct bGPdata *gpd, struct bGPDpalette *active);
diff --git a/source/blender/blenkernel/intern/effect.c b/source/blender/blenkernel/intern/effect.c
index 95d78436cb9..33125ceeb02 100644
--- a/source/blender/blenkernel/intern/effect.c
+++ b/source/blender/blenkernel/intern/effect.c
@@ -991,7 +991,7 @@ static void debug_data_insert(SimDebugData *debug_data, SimDebugElement *elem)
BLI_ghash_insert(debug_data->gh, elem, elem);
}
-void BKE_sim_debug_data_add_element(int type, const float v1[3], const float v2[3], float r, float g, float b, const char *category, unsigned int hash)
+void BKE_sim_debug_data_add_element(int type, const float v1[3], const float v2[3], const char *str, float r, float g, float b, const char *category, unsigned int hash)
{
unsigned int category_hash = BLI_ghashutil_strhash_p(category);
SimDebugElement *elem;
@@ -1010,8 +1010,18 @@ void BKE_sim_debug_data_add_element(int type, const float v1[3], const float v2[
elem->color[0] = r;
elem->color[1] = g;
elem->color[2] = b;
- copy_v3_v3(elem->v1, v1);
- copy_v3_v3(elem->v2, v2);
+ if (v1)
+ copy_v3_v3(elem->v1, v1);
+ else
+ zero_v3(elem->v1);
+ if (v2)
+ copy_v3_v3(elem->v2, v2);
+ else
+ zero_v3(elem->v2);
+ if (str)
+ BLI_strncpy(elem->str, str, sizeof(elem->str));
+ else
+ elem->str[0] = '\0';
debug_data_insert(_sim_debug_data, elem);
}