diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-06-15 11:17:51 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-06-15 11:17:51 +0300 |
commit | 35ec72bcb8654fd5f7bac6b3d0ccb95db1134ec6 (patch) | |
tree | cb164b607c133b6a56967c07da616d2e08395d9e /source/blender | |
parent | f2d7a28a0984bfebda21c07e9508313f0d92610c (diff) | |
parent | 038b73bab1f6ed3aa2360e1f4946234110a5cf2c (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/rigidbody.c | 4 | ||||
-rw-r--r-- | source/blender/editors/space_text/text_format_pov.c | 25 | ||||
-rw-r--r-- | source/blender/editors/space_text/text_format_pov_ini.c | 8 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_app.c | 14 | ||||
-rw-r--r-- | source/blender/python/mathutils/mathutils.c | 35 |
5 files changed, 59 insertions, 27 deletions
diff --git a/source/blender/blenkernel/intern/rigidbody.c b/source/blender/blenkernel/intern/rigidbody.c index 34985380aeb..6056515af9a 100644 --- a/source/blender/blenkernel/intern/rigidbody.c +++ b/source/blender/blenkernel/intern/rigidbody.c @@ -1621,8 +1621,8 @@ void BKE_rigidbody_do_simulation(Scene *scene, float ctime) # pragma GCC diagnostic ignored "-Wunused-parameter" #endif -struct RigidBodyOb *BKE_rigidbody_copy_object(Object *ob) { return NULL; } -struct RigidBodyCon *BKE_rigidbody_copy_constraint(Object *ob) { return NULL; } +struct RigidBodyOb *BKE_rigidbody_copy_object(const Object *ob) { return NULL; } +struct RigidBodyCon *BKE_rigidbody_copy_constraint(const Object *ob) { return NULL; } void BKE_rigidbody_validate_sim_world(Scene *scene, RigidBodyWorld *rbw, bool rebuild) {} void BKE_rigidbody_calc_volume(Object *ob, float *r_vol) { if (r_vol) *r_vol = 0.0f; } void BKE_rigidbody_calc_center_of_mass(Object *ob, float r_center[3]) { zero_v3(r_center); } diff --git a/source/blender/editors/space_text/text_format_pov.c b/source/blender/editors/space_text/text_format_pov.c index eb6877d297d..0d19c503798 100644 --- a/source/blender/editors/space_text/text_format_pov.c +++ b/source/blender/editors/space_text/text_format_pov.c @@ -100,6 +100,7 @@ static int txtfmt_pov_find_reserved_keywords(const char *string) else if (STR_LITERAL_STARTSWITH(string, "adc_bailout", len)) i = len; else if (STR_LITERAL_STARTSWITH(string, "albedo", len)) i = len; else if (STR_LITERAL_STARTSWITH(string, "all_intersections", len)) i = len; + else if (STR_LITERAL_STARTSWITH(string, "translucency", len)) i = len; else if (STR_LITERAL_STARTSWITH(string, "all", len)) i = len; else if (STR_LITERAL_STARTSWITH(string, "alpha", len)) i = len; else if (STR_LITERAL_STARTSWITH(string, "altitude", len)) i = len; @@ -149,7 +150,6 @@ static int txtfmt_pov_find_reserved_keywords(const char *string) else if (STR_LITERAL_STARTSWITH(string, "falloff_angle", len)) i = len; else if (STR_LITERAL_STARTSWITH(string, "falloff", len)) i = len; else if (STR_LITERAL_STARTSWITH(string, "file_gamma", len)) i = len; - else if (STR_LITERAL_STARTSWITH(string, "finish", len)) i = len; else if (STR_LITERAL_STARTSWITH(string, "flatness", len)) i = len; else if (STR_LITERAL_STARTSWITH(string, "flip", len)) i = len; else if (STR_LITERAL_STARTSWITH(string, "focal_point", len)) i = len; @@ -372,6 +372,7 @@ static int txtfmt_pov_find_reserved_builtins(const char *string) else if (STR_LITERAL_STARTSWITH(string, "mesh", len)) i = len; else if (STR_LITERAL_STARTSWITH(string, "object", len)) i = len; else if (STR_LITERAL_STARTSWITH(string, "ovus", len)) i = len; + else if (STR_LITERAL_STARTSWITH(string, "lemon", len)) i = len; else if (STR_LITERAL_STARTSWITH(string, "parametric", len)) i = len; else if (STR_LITERAL_STARTSWITH(string, "plane", len)) i = len; else if (STR_LITERAL_STARTSWITH(string, "poly", len)) i = len; @@ -383,6 +384,7 @@ static int txtfmt_pov_find_reserved_builtins(const char *string) else if (STR_LITERAL_STARTSWITH(string, "rainbow", len)) i = len; else if (STR_LITERAL_STARTSWITH(string, "sky_sphere", len)) i = len; else if (STR_LITERAL_STARTSWITH(string, "smooth_triangle", len)) i = len; + else if (STR_LITERAL_STARTSWITH(string, "cubic_spline", len)) i = len; else if (STR_LITERAL_STARTSWITH(string, "sphere_sweep", len)) i = len; else if (STR_LITERAL_STARTSWITH(string, "sphere", len)) i = len; else if (STR_LITERAL_STARTSWITH(string, "spline", len)) i = len; @@ -463,7 +465,12 @@ static int txtfmt_pov_find_specialvar(const char *string) { int i, len; /* Modifiers */ - if (STR_LITERAL_STARTSWITH(string, "adaptive", len)) i = len; + if (STR_LITERAL_STARTSWITH(string, "interior_texture", len)) i = len; + else if (STR_LITERAL_STARTSWITH(string, "double_illuminate", len)) i = len; + else if (STR_LITERAL_STARTSWITH(string, "media_interaction", len)) i = len; + else if (STR_LITERAL_STARTSWITH(string, "media_attenuation", len)) i = len; + else if (STR_LITERAL_STARTSWITH(string, "projected_through", len)) i = len; + else if (STR_LITERAL_STARTSWITH(string, "noise_generator", len)) i = len; else if (STR_LITERAL_STARTSWITH(string, "agate_turb", len)) i = len; else if (STR_LITERAL_STARTSWITH(string, "bounded_by", len)) i = len; else if (STR_LITERAL_STARTSWITH(string, "brick_size", len)) i = len; @@ -481,7 +488,6 @@ static int txtfmt_pov_find_specialvar(const char *string) else if (STR_LITERAL_STARTSWITH(string, "cubic_wave", len)) i = len; else if (STR_LITERAL_STARTSWITH(string, "density_map", len)) i = len; else if (STR_LITERAL_STARTSWITH(string, "density", len)) i = len; - else if (STR_LITERAL_STARTSWITH(string, "double_illuminate", len)) i = len; else if (STR_LITERAL_STARTSWITH(string, "fade_color", len)) i = len; else if (STR_LITERAL_STARTSWITH(string, "fade_colour", len)) i = len; else if (STR_LITERAL_STARTSWITH(string, "fade_distance", len)) i = len; @@ -490,7 +496,7 @@ static int txtfmt_pov_find_specialvar(const char *string) else if (STR_LITERAL_STARTSWITH(string, "global_lights", len)) i = len; else if (STR_LITERAL_STARTSWITH(string, "hollow", len)) i = len; else if (STR_LITERAL_STARTSWITH(string, "image_map", len)) i = len; - else if (STR_LITERAL_STARTSWITH(string, "interior_texture", len)) i = len; + else if (STR_LITERAL_STARTSWITH(string, "adaptive", len)) i = len; else if (STR_LITERAL_STARTSWITH(string, "interior", len)) i = len; else if (STR_LITERAL_STARTSWITH(string, "interpolate", len)) i = len; else if (STR_LITERAL_STARTSWITH(string, "inverse", len)) i = len; @@ -501,8 +507,6 @@ static int txtfmt_pov_find_specialvar(const char *string) else if (STR_LITERAL_STARTSWITH(string, "material", len)) i = len; else if (STR_LITERAL_STARTSWITH(string, "matrix", len)) i = len; else if (STR_LITERAL_STARTSWITH(string, "media", len)) i = len; - else if (STR_LITERAL_STARTSWITH(string, "media_attenuation", len)) i = len; - else if (STR_LITERAL_STARTSWITH(string, "media_interaction", len)) i = len; else if (STR_LITERAL_STARTSWITH(string, "mm_per_unit", len)) i = len; else if (STR_LITERAL_STARTSWITH(string, "mortar", len)) i = len; else if (STR_LITERAL_STARTSWITH(string, "no_bump_scale", len)) i = len; @@ -510,7 +514,6 @@ static int txtfmt_pov_find_specialvar(const char *string) else if (STR_LITERAL_STARTSWITH(string, "no_radiosity", len)) i = len; else if (STR_LITERAL_STARTSWITH(string, "no_reflection", len)) i = len; else if (STR_LITERAL_STARTSWITH(string, "no_shadow", len)) i = len; - else if (STR_LITERAL_STARTSWITH(string, "noise_generator", len)) i = len; else if (STR_LITERAL_STARTSWITH(string, "normal_map", len)) i = len; else if (STR_LITERAL_STARTSWITH(string, "normal", len)) i = len; else if (STR_LITERAL_STARTSWITH(string, "octaves", len)) i = len; @@ -522,8 +525,8 @@ static int txtfmt_pov_find_specialvar(const char *string) else if (STR_LITERAL_STARTSWITH(string, "photons", len)) i = len; else if (STR_LITERAL_STARTSWITH(string, "pigment_map", len)) i = len; else if (STR_LITERAL_STARTSWITH(string, "pigment", len)) i = len; + else if (STR_LITERAL_STARTSWITH(string, "finish", len)) i = len; else if (STR_LITERAL_STARTSWITH(string, "poly_wave", len)) i = len; - else if (STR_LITERAL_STARTSWITH(string, "projected_through", len)) i = len; else if (STR_LITERAL_STARTSWITH(string, "quick_color", len)) i = len; else if (STR_LITERAL_STARTSWITH(string, "quick_colour", len)) i = len; else if (STR_LITERAL_STARTSWITH(string, "ramp_wave", len)) i = len; @@ -693,9 +696,9 @@ static void txtfmt_pov_format_line(SpaceText *st, TextLine *line, const bool do_ } /* Handle continuations */ else if (cont) { - /* Multi-line comments */ + /* C-Style comments */ if (cont & FMT_CONT_COMMENT_C) { - if (*str == ']' && *(str + 1) == ']') { + if (*str == '*' && *(str + 1) == '/') { *fmt = FMT_TYPE_COMMENT; fmt++; str++; *fmt = FMT_TYPE_COMMENT; cont = FMT_CONT_NOP; @@ -752,7 +755,7 @@ static void txtfmt_pov_format_line(SpaceText *st, TextLine *line, const bool do_ } } /* Punctuation */ - else if ((*str != '#') && text_check_delim(*str)) { + else if (text_check_delim(*str)) { *fmt = FMT_TYPE_SYMBOL; } /* Identifiers and other text (no previous ws. or delims. so text continues) */ diff --git a/source/blender/editors/space_text/text_format_pov_ini.c b/source/blender/editors/space_text/text_format_pov_ini.c index 5c20a1c5f00..719f4e3c036 100644 --- a/source/blender/editors/space_text/text_format_pov_ini.c +++ b/source/blender/editors/space_text/text_format_pov_ini.c @@ -104,7 +104,11 @@ static int txtfmt_ini_find_reserved(const char *string) * list is from... * http://www.povray.org/documentation/view/3.7.0/212/ */ - if (STR_LITERAL_STARTSWITH(string, "clock_delta", len)) i = len; + if (STR_LITERAL_STARTSWITH(string, "Antialias_Threshold", len)) i = len; + else if (STR_LITERAL_STARTSWITH(string, "Bounding_Method", len)) i = len; + else if (STR_LITERAL_STARTSWITH(string, "Antialias_Gamma", len)) i = len; + else if (STR_LITERAL_STARTSWITH(string, "Antialias_Depth", len)) i = len; + else if (STR_LITERAL_STARTSWITH(string, "clock_delta", len)) i = len; else if (STR_LITERAL_STARTSWITH(string, "clock_on", len)) i = len; else if (STR_LITERAL_STARTSWITH(string, "clock", len)) i = len; else if (STR_LITERAL_STARTSWITH(string, "final_clock", len)) i = len; @@ -134,6 +138,7 @@ static int txtfmt_ini_find_reserved(const char *string) else if (STR_LITERAL_STARTSWITH(string, "Create_Ini", len)) i = len; else if (STR_LITERAL_STARTSWITH(string, "Display_Gamma", len)) i = len; else if (STR_LITERAL_STARTSWITH(string, "Display", len)) i = len; + else if (STR_LITERAL_STARTSWITH(string, "Version", len)) i = len; else if (STR_LITERAL_STARTSWITH(string, "Pause_When_Done", len)) i = len; else if (STR_LITERAL_STARTSWITH(string, "Verbose", len)) i = len; else if (STR_LITERAL_STARTSWITH(string, "Preview_Start_Size", len)) i = len; @@ -183,7 +188,6 @@ static int txtfmt_ini_find_reserved(const char *string) else if (STR_LITERAL_STARTSWITH(string, "Split_Unions", len)) i = len; else if (STR_LITERAL_STARTSWITH(string, "Antialias", len)) i = len; else if (STR_LITERAL_STARTSWITH(string, "Sampling_Method", len)) i = len; - else if (STR_LITERAL_STARTSWITH(string, "Antialias_Threshold", len)) i = len; else if (STR_LITERAL_STARTSWITH(string, "Jitter_Amount", len)) i = len; else if (STR_LITERAL_STARTSWITH(string, "Jitter", len)) i = len; else if (STR_LITERAL_STARTSWITH(string, "Antialias_Depth", len)) i = len; diff --git a/source/blender/python/intern/bpy_app.c b/source/blender/python/intern/bpy_app.c index 47b4e840805..8b3464173d2 100644 --- a/source/blender/python/intern/bpy_app.c +++ b/source/blender/python/intern/bpy_app.c @@ -119,9 +119,21 @@ static PyStructSequence_Field app_info_fields[] = { {NULL}, }; +PyDoc_STRVAR(bpy_app_doc, +"This module contains application values that remain unchanged during runtime.\n" +"\n" +"Submodules:\n" +"\n" +".. toctree::\n" +" :maxdepth: 1\n" +"\n" +" bpy.app.handlers.rst\n" +" bpy.app.translations.rst\n" +); + static PyStructSequence_Desc app_info_desc = { (char *)"bpy.app", /* name */ - (char *)"This module contains application values that remain unchanged during runtime.", /* doc */ + bpy_app_doc, /* doc */ app_info_fields, /* fields */ ARRAY_SIZE(app_info_fields) - 1 }; diff --git a/source/blender/python/mathutils/mathutils.c b/source/blender/python/mathutils/mathutils.c index 5c505247a97..1afb1d7be90 100644 --- a/source/blender/python/mathutils/mathutils.c +++ b/source/blender/python/mathutils/mathutils.c @@ -1,4 +1,4 @@ -/* +/* * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or @@ -38,18 +38,31 @@ #endif PyDoc_STRVAR(M_Mathutils_doc, -"This module provides access to the math classes:\n" +"This module provides access to math operations.\n" +"\n" +".. note::\n" +"\n" +" Classes, methods and attributes that accept vectors also accept other numeric sequences,\n" +" such as tuples, lists." +"\n\n" +"Submodules:\n" +"\n" +".. toctree::\n" +" :maxdepth: 1\n" +"\n" +" mathutils.geometry.rst\n" +" mathutils.bvhtree.rst\n" +" mathutils.kdtree.rst\n" +" mathutils.interpolate.rst\n" +" mathutils.noise.rst\n" +"\n" +"The :mod:`mathutils` module provides the following classes:\n" "\n" "- :class:`Color`,\n" "- :class:`Euler`,\n" "- :class:`Matrix`,\n" "- :class:`Quaternion`,\n" "- :class:`Vector`,\n" -"\n" -".. note::\n" -"\n" -" Classes, methods and attributes that accept vectors also accept other numeric sequences,\n" -" such as tuples, lists." ); static int mathutils_array_parse_fast(float *array, int size, @@ -219,7 +232,7 @@ int mathutils_array_parse_alloc(float **array, int array_min, PyObject *value, c error_prefix, size, array_min); return -1; } - + *array = PyMem_Malloc(size * sizeof(float)); memcpy(*array, ((BaseMathObject *)value)->data, size * sizeof(float)); return size; @@ -422,7 +435,7 @@ static Mathutils_Callback *mathutils_callbacks[MATHUTILS_TOT_CB] = {NULL}; unsigned char Mathutils_RegisterCallback(Mathutils_Callback *cb) { unsigned char i; - + /* find the first free slot */ for (i = 0; mathutils_callbacks[i]; i++) { if (mathutils_callbacks[i] == cb) /* already registered? */ @@ -625,14 +638,14 @@ PyMODINIT_FUNC PyInit_mathutils(void) return NULL; mod = PyModule_Create(&M_Mathutils_module_def); - + /* each type has its own new() function */ PyModule_AddObject(mod, vector_Type.tp_name, (PyObject *)&vector_Type); PyModule_AddObject(mod, matrix_Type.tp_name, (PyObject *)&matrix_Type); PyModule_AddObject(mod, euler_Type.tp_name, (PyObject *)&euler_Type); PyModule_AddObject(mod, quaternion_Type.tp_name, (PyObject *)&quaternion_Type); PyModule_AddObject(mod, color_Type.tp_name, (PyObject *)&color_Type); - + /* submodule */ PyModule_AddObject(mod, "geometry", (submodule = PyInit_mathutils_geometry())); /* XXX, python doesnt do imports with this usefully yet |