Merge branch 'master' into blender2.8
This commit is contained in:
@@ -4,15 +4,6 @@ Application Data (bge.app)
|
||||
|
||||
Module to access application values that remain unchanged during runtime.
|
||||
|
||||
Submodules:
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
bpy.app.handlers.rst
|
||||
bpy.app.translations.rst
|
||||
|
||||
|
||||
.. module:: bge.app
|
||||
|
||||
.. data:: version
|
||||
@@ -56,4 +47,3 @@ Submodules:
|
||||
True if the BGE has been built with physics support.
|
||||
|
||||
:type: bool
|
||||
|
||||
|
||||
@@ -6,6 +6,13 @@ GPU functions (gpu)
|
||||
|
||||
This module provides access to materials GLSL shaders.
|
||||
|
||||
Submodules:
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
gpu.offscreen.rst
|
||||
|
||||
|
||||
Intro
|
||||
=====
|
||||
@@ -24,7 +31,6 @@ and in the game engine.
|
||||
Constants
|
||||
=========
|
||||
|
||||
|
||||
GLSL Data Type
|
||||
--------------
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
# 'bmesh_opdefines.c' in order to avoid having to add a lot of introspection
|
||||
# data access into the api.
|
||||
#
|
||||
# The script is stupid becase it makes assumptions about formatting...
|
||||
# The script is stupid because it makes assumptions about formatting...
|
||||
# that each arg has its own line, that comments above or directly after will be __doc__ etc...
|
||||
#
|
||||
# We may want to replace this script with something else one day but for now its good enough.
|
||||
|
||||
@@ -1731,19 +1731,9 @@ def write_rst_contents(basepath):
|
||||
fw(" :maxdepth: 1\n\n")
|
||||
|
||||
standalone_modules = (
|
||||
# mathutils
|
||||
"mathutils",
|
||||
"mathutils.geometry",
|
||||
"mathutils.bvhtree", "mathutils.kdtree",
|
||||
"mathutils.interpolate",
|
||||
"mathutils.noise",
|
||||
# misc
|
||||
"freestyle", "bgl", "blf",
|
||||
"gpu", "gpu.offscreen",
|
||||
"aud", "bpy_extras",
|
||||
"idprop.types",
|
||||
# bmesh, submodules are in own page
|
||||
"bmesh",
|
||||
# submodules are added in parent page
|
||||
"mathutils", "freestyle", "bgl", "blf", "gpu",
|
||||
"aud", "bpy_extras", "idprop.types", "bmesh",
|
||||
)
|
||||
|
||||
for mod in standalone_modules:
|
||||
|
||||
@@ -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); }
|
||||
|
||||
@@ -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) */
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
};
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user