Merged changes in the trunk up to revision 47056.
Conflicts resolved: source/blender/bmesh/bmesh_class.h source/blender/bmesh/intern/bmesh_construct.c source/blender/editors/interface/resources.c source/blender/render/intern/source/convertblender.c
This commit is contained in:
@@ -574,7 +574,7 @@ static PyGetSetDef bpy_bmesh_getseters[] = {
|
||||
static PyGetSetDef bpy_bmvert_getseters[] = {
|
||||
/* generic */
|
||||
{(char *)"select", (getter)bpy_bm_elem_hflag_get, (setter)bpy_bm_elem_hflag_set, (char *)bpy_bm_elem_select_doc, (void *)BM_ELEM_SELECT},
|
||||
{(char *)"hide", (getter)bpy_bm_elem_hflag_get, (setter)bpy_bm_elem_hflag_set, (char *)bpy_bm_elem_hide_doc, (void *)BM_ELEM_SELECT},
|
||||
{(char *)"hide", (getter)bpy_bm_elem_hflag_get, (setter)bpy_bm_elem_hflag_set, (char *)bpy_bm_elem_hide_doc, (void *)BM_ELEM_HIDDEN},
|
||||
{(char *)"tag", (getter)bpy_bm_elem_hflag_get, (setter)bpy_bm_elem_hflag_set, (char *)bpy_bm_elem_tag_doc, (void *)BM_ELEM_TAG},
|
||||
{(char *)"index", (getter)bpy_bm_elem_index_get, (setter)bpy_bm_elem_index_set, (char *)bpy_bm_elem_index_doc, NULL},
|
||||
|
||||
@@ -597,7 +597,7 @@ static PyGetSetDef bpy_bmvert_getseters[] = {
|
||||
static PyGetSetDef bpy_bmedge_getseters[] = {
|
||||
/* generic */
|
||||
{(char *)"select", (getter)bpy_bm_elem_hflag_get, (setter)bpy_bm_elem_hflag_set, (char *)bpy_bm_elem_select_doc, (void *)BM_ELEM_SELECT},
|
||||
{(char *)"hide", (getter)bpy_bm_elem_hflag_get, (setter)bpy_bm_elem_hflag_set, (char *)bpy_bm_elem_hide_doc, (void *)BM_ELEM_SELECT},
|
||||
{(char *)"hide", (getter)bpy_bm_elem_hflag_get, (setter)bpy_bm_elem_hflag_set, (char *)bpy_bm_elem_hide_doc, (void *)BM_ELEM_HIDDEN},
|
||||
{(char *)"tag", (getter)bpy_bm_elem_hflag_get, (setter)bpy_bm_elem_hflag_set, (char *)bpy_bm_elem_tag_doc, (void *)BM_ELEM_TAG},
|
||||
{(char *)"index", (getter)bpy_bm_elem_index_get, (setter)bpy_bm_elem_index_set, (char *)bpy_bm_elem_index_doc, NULL},
|
||||
|
||||
@@ -622,7 +622,7 @@ static PyGetSetDef bpy_bmedge_getseters[] = {
|
||||
static PyGetSetDef bpy_bmface_getseters[] = {
|
||||
/* generic */
|
||||
{(char *)"select", (getter)bpy_bm_elem_hflag_get, (setter)bpy_bm_elem_hflag_set, (char *)bpy_bm_elem_select_doc, (void *)BM_ELEM_SELECT},
|
||||
{(char *)"hide", (getter)bpy_bm_elem_hflag_get, (setter)bpy_bm_elem_hflag_set, (char *)bpy_bm_elem_hide_doc, (void *)BM_ELEM_SELECT},
|
||||
{(char *)"hide", (getter)bpy_bm_elem_hflag_get, (setter)bpy_bm_elem_hflag_set, (char *)bpy_bm_elem_hide_doc, (void *)BM_ELEM_HIDDEN},
|
||||
{(char *)"tag", (getter)bpy_bm_elem_hflag_get, (setter)bpy_bm_elem_hflag_set, (char *)bpy_bm_elem_tag_doc, (void *)BM_ELEM_TAG},
|
||||
{(char *)"index", (getter)bpy_bm_elem_index_get, (setter)bpy_bm_elem_index_set, (char *)bpy_bm_elem_index_doc, NULL},
|
||||
|
||||
@@ -647,7 +647,7 @@ static PyGetSetDef bpy_bmloop_getseters[] = {
|
||||
/* generic */
|
||||
// flags are available but not used for loops.
|
||||
// {(char *)"select", (getter)bpy_bm_elem_hflag_get, (setter)bpy_bm_elem_hflag_set, (char *)bpy_bm_elem_select_doc, (void *)BM_ELEM_SELECT},
|
||||
// {(char *)"hide", (getter)bpy_bm_elem_hflag_get, (setter)bpy_bm_elem_hflag_set, (char *)bpy_bm_elem_hide_doc, (void *)BM_ELEM_SELECT},
|
||||
// {(char *)"hide", (getter)bpy_bm_elem_hflag_get, (setter)bpy_bm_elem_hflag_set, (char *)bpy_bm_elem_hide_doc, (void *)BM_ELEM_HIDDEN},
|
||||
{(char *)"tag", (getter)bpy_bm_elem_hflag_get, (setter)bpy_bm_elem_hflag_set, (char *)bpy_bm_elem_tag_doc, (void *)BM_ELEM_TAG},
|
||||
{(char *)"index", (getter)bpy_bm_elem_index_get, (setter)bpy_bm_elem_index_set, (char *)bpy_bm_elem_index_doc, NULL},
|
||||
|
||||
@@ -2065,7 +2065,7 @@ static PyObject *bpy_bmelemseq_index_update(BPy_BMElemSeq *self)
|
||||
int index = 0;
|
||||
const char htype = bm_iter_itype_htype_map[self->itype];
|
||||
|
||||
BM_ITER_BPY_BM_SEQ(ele, &iter, self) {
|
||||
BM_ITER_BPY_BM_SEQ (ele, &iter, self) {
|
||||
BM_elem_index_set(ele, index); /* set_dirty! */
|
||||
index++;
|
||||
}
|
||||
@@ -2278,7 +2278,7 @@ static Py_ssize_t bpy_bmelemseq_length(BPy_BMElemSeq *self)
|
||||
BMHeader *ele;
|
||||
Py_ssize_t tot = 0;
|
||||
|
||||
BM_ITER_BPY_BM_SEQ(ele, &iter, self) {
|
||||
BM_ITER_BPY_BM_SEQ (ele, &iter, self) {
|
||||
tot++;
|
||||
}
|
||||
return tot;
|
||||
@@ -2409,7 +2409,7 @@ static int bpy_bmelemseq_contains(BPy_BMElemSeq *self, PyObject *value)
|
||||
if (value_bm_ele->bm == self->bm) {
|
||||
BMElem *ele, *ele_test = value_bm_ele->ele;
|
||||
BMIter iter;
|
||||
BM_ITER_BPY_BM_SEQ(ele, &iter, self) {
|
||||
BM_ITER_BPY_BM_SEQ (ele, &iter, self) {
|
||||
if (ele == ele_test) {
|
||||
return 1;
|
||||
}
|
||||
@@ -3115,6 +3115,21 @@ PyObject *BPy_BMElem_CreatePyObject(BMesh *bm, BMHeader *ele)
|
||||
int bpy_bm_generic_valid_check(BPy_BMGeneric *self)
|
||||
{
|
||||
if (LIKELY(self->bm)) {
|
||||
|
||||
/* far too slow to enable by default but handy
|
||||
* to uncomment for debugging tricky errors,
|
||||
* note that this will throw error on entering a
|
||||
* function where the actual error will be caused by
|
||||
* the previous action. */
|
||||
#if 0
|
||||
if (BM_mesh_validate(self->bm) == FALSE) {
|
||||
PyErr_Format(PyExc_ReferenceError,
|
||||
"BMesh used by %.200s has become invalid",
|
||||
Py_TYPE(self)->tp_name);
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
else {
|
||||
@@ -3184,7 +3199,7 @@ void *BPy_BMElem_PySeq_As_Array(BMesh **r_bm, PyObject *seq, Py_ssize_t min, Py_
|
||||
}
|
||||
/* trick so we can ensure all items have the same mesh,
|
||||
* and allows us to pass the 'bm' as NULL. */
|
||||
else if (do_bm_check && (bm && bm != item->bm)) {
|
||||
else if (do_bm_check && (bm && bm != item->bm)) {
|
||||
PyErr_Format(PyExc_ValueError,
|
||||
"%s: %d %s is from another mesh",
|
||||
error_prefix, i, BPy_BMElem_StringFromHType(htype));
|
||||
|
||||
@@ -271,13 +271,16 @@ static PyObject *bpy_bmlayeritem_copy_from(BPy_BMLayerItem *self, BPy_BMLayerIte
|
||||
}
|
||||
|
||||
else if ((self->htype != value->htype) ||
|
||||
(self->type != value->type) ||
|
||||
(self->index != value->index))
|
||||
(self->type != value->type))
|
||||
{
|
||||
PyErr_SetString(PyExc_ValueError,
|
||||
"layer.copy_from(other): layer type mismatch");
|
||||
}
|
||||
|
||||
else if (self->index == value->index) {
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
||||
data = bpy_bm_customdata_get(self->bm, self->htype);
|
||||
|
||||
if ((bpy_bmlayeritem_get(self) == NULL) ||
|
||||
|
||||
@@ -226,7 +226,7 @@ static PyObject *blender_import(PyObject *UNUSED(self), PyObject *args, PyObject
|
||||
char *name;
|
||||
int found = 0;
|
||||
PyObject *globals = NULL, *locals = NULL, *fromlist = NULL;
|
||||
int level = -1; /* relative imports */
|
||||
int level = 0; /* relative imports */
|
||||
|
||||
PyObject *newmodule;
|
||||
//PyObject_Print(args, stderr, 0);
|
||||
|
||||
@@ -277,7 +277,7 @@ static PyObject *BPy_IDGroup_Map_GetItem(BPy_IDProperty *self, PyObject *item)
|
||||
IDProperty *idprop;
|
||||
const char *name;
|
||||
|
||||
if (self->prop->type != IDP_GROUP) {
|
||||
if (self->prop->type != IDP_GROUP) {
|
||||
PyErr_SetString(PyExc_TypeError, "unsubscriptable object");
|
||||
return NULL;
|
||||
}
|
||||
@@ -483,7 +483,7 @@ const char *BPy_IDProperty_Map_ValidateAndCreate(PyObject *name_obj, IDProperty
|
||||
|
||||
int BPy_Wrap_SetMapItem(IDProperty *prop, PyObject *key, PyObject *val)
|
||||
{
|
||||
if (prop->type != IDP_GROUP) {
|
||||
if (prop->type != IDP_GROUP) {
|
||||
PyErr_SetString(PyExc_TypeError, "unsubscriptable object");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -483,12 +483,15 @@ void PyC_SetHomePath(const char *py_path_bundle)
|
||||
\nThis may make python import function fail\n");
|
||||
#endif
|
||||
|
||||
|
||||
#if 0 /* disable for now [#31506] - campbell */
|
||||
#ifdef _WIN32
|
||||
/* cmake/MSVC debug build crashes without this, why only
|
||||
* in this case is unknown.. */
|
||||
{
|
||||
BLI_setenv("PYTHONPATH", py_path_bundle);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
{
|
||||
|
||||
@@ -122,7 +122,7 @@ static void bpy_pydriver_update_dict(const float evaltime)
|
||||
void BPY_driver_reset(void)
|
||||
{
|
||||
PyGILState_STATE gilstate;
|
||||
int use_gil = 1; /* !PYC_INTERPRETER_ACTIVE; */
|
||||
int use_gil = TRUE; /* !PYC_INTERPRETER_ACTIVE; */
|
||||
|
||||
if (use_gil)
|
||||
gilstate = PyGILState_Ensure();
|
||||
@@ -193,7 +193,7 @@ float BPY_driver_exec(ChannelDriver *driver, const float evaltime)
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
use_gil = 1; /* !PYC_INTERPRETER_ACTIVE; */
|
||||
use_gil = TRUE; /* !PYC_INTERPRETER_ACTIVE; */
|
||||
|
||||
if (use_gil)
|
||||
gilstate = PyGILState_Ensure();
|
||||
|
||||
@@ -178,7 +178,7 @@ void BPY_modules_update(bContext *C)
|
||||
|
||||
/* refreshes the main struct */
|
||||
BPY_update_rna_module();
|
||||
if(bpy_context_module)
|
||||
if (bpy_context_module)
|
||||
bpy_context_module->ptr.data = (void *)C;
|
||||
}
|
||||
|
||||
@@ -421,9 +421,9 @@ static int python_script_exec(bContext *C, const char *fn, struct Text *text,
|
||||
|
||||
fclose(fp);
|
||||
|
||||
pystring = MEM_mallocN(strlen(fn) + 32, "pystring");
|
||||
pystring = MEM_mallocN(strlen(fn) + 36, "pystring");
|
||||
pystring[0] = '\0';
|
||||
sprintf(pystring, "exec(open(r'%s').read())", fn);
|
||||
sprintf(pystring, "f=open(r'%s');exec(f.read());f.close()", fn);
|
||||
py_result = PyRun_String(pystring, Py_file_input, py_dict, py_dict);
|
||||
MEM_freeN(pystring);
|
||||
}
|
||||
@@ -660,7 +660,7 @@ int BPY_context_member_get(bContext *C, const char *member, bContextDataResult *
|
||||
PyObject *pyctx = (PyObject *)CTX_py_dict_get(C);
|
||||
PyObject *item = PyDict_GetItemString(pyctx, member);
|
||||
PointerRNA *ptr = NULL;
|
||||
int done = 0;
|
||||
int done = FALSE;
|
||||
|
||||
if (item == NULL) {
|
||||
/* pass */
|
||||
@@ -673,7 +673,7 @@ int BPY_context_member_get(bContext *C, const char *member, bContextDataResult *
|
||||
|
||||
//result->ptr = ((BPy_StructRNA *)item)->ptr;
|
||||
CTX_data_pointer_set(result, ptr->id.data, ptr->type, ptr->data);
|
||||
done = 1;
|
||||
done = TRUE;
|
||||
}
|
||||
else if (PySequence_Check(item)) {
|
||||
PyObject *seq_fast = PySequence_Fast(item, "bpy_context_get sequence conversion");
|
||||
@@ -703,7 +703,7 @@ int BPY_context_member_get(bContext *C, const char *member, bContextDataResult *
|
||||
}
|
||||
Py_DECREF(seq_fast);
|
||||
|
||||
done = 1;
|
||||
done = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -291,7 +291,8 @@ static void bpy_lib_exit_warn_idname(BPy_Library *self, const char *name_plural,
|
||||
PyErr_Fetch(&exc, &val, &tb);
|
||||
if (PyErr_WarnFormat(PyExc_UserWarning, 1,
|
||||
"load: '%s' does not contain %s[\"%s\"]",
|
||||
self->abspath, name_plural, idname)) {
|
||||
self->abspath, name_plural, idname))
|
||||
{
|
||||
/* Spurious errors can appear at shutdown */
|
||||
if (PyErr_ExceptionMatches(PyExc_Warning)) {
|
||||
PyErr_WriteUnraisable((PyObject *)self);
|
||||
@@ -306,7 +307,8 @@ static void bpy_lib_exit_warn_type(BPy_Library *self, PyObject *item)
|
||||
PyErr_Fetch(&exc, &val, &tb);
|
||||
if (PyErr_WarnFormat(PyExc_UserWarning, 1,
|
||||
"load: '%s' expected a string type, not a %.200s",
|
||||
self->abspath, Py_TYPE(item)->tp_name)) {
|
||||
self->abspath, Py_TYPE(item)->tp_name))
|
||||
{
|
||||
/* Spurious errors can appear at shutdown */
|
||||
if (PyErr_ExceptionMatches(PyExc_Warning)) {
|
||||
PyErr_WriteUnraisable((PyObject *)self);
|
||||
|
||||
@@ -389,7 +389,7 @@ static PyObject *pyop_getrna(PyObject *UNUSED(self), PyObject *value)
|
||||
return NULL;
|
||||
}
|
||||
ot = WM_operatortype_find(opname, TRUE);
|
||||
if (ot == NULL) {
|
||||
if (ot == NULL) {
|
||||
PyErr_Format(PyExc_KeyError, "_bpy.ops.get_rna(\"%s\") not found", opname);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -60,6 +60,7 @@ static EnumPropertyItem property_flag_items[] = {
|
||||
{PROP_HIDDEN, "HIDDEN", 0, "Hidden", ""},
|
||||
{PROP_SKIP_SAVE, "SKIP_SAVE", 0, "Skip Save", ""},
|
||||
{PROP_ANIMATABLE, "ANIMATABLE", 0, "Animatable", ""},
|
||||
{PROP_LIB_EXCEPTION, "LIBRARY_EDITABLE", 0, "Library Editable", ""},
|
||||
{0, NULL, 0, NULL, NULL}};
|
||||
|
||||
static EnumPropertyItem property_flag_enum_items[] = {
|
||||
@@ -67,6 +68,7 @@ static EnumPropertyItem property_flag_enum_items[] = {
|
||||
{PROP_SKIP_SAVE, "SKIP_SAVE", 0, "Skip Save", ""},
|
||||
{PROP_ANIMATABLE, "ANIMATABLE", 0, "Animatable", ""},
|
||||
{PROP_ENUM_FLAG, "ENUM_FLAG", 0, "Enum Flag", ""},
|
||||
{PROP_LIB_EXCEPTION, "LIBRARY_EDITABLE", 0, "Library Editable", ""},
|
||||
{0, NULL, 0, NULL, NULL}};
|
||||
|
||||
/* subtypes */
|
||||
@@ -385,7 +387,7 @@ PyDoc_STRVAR(BPy_BoolProperty_doc,
|
||||
"\n"
|
||||
BPY_PROPDEF_NAME_DOC
|
||||
BPY_PROPDEF_DESC_DOC
|
||||
" :arg options: Enumerator in ['HIDDEN', 'SKIP_SAVE', 'ANIMATABLE'].\n"
|
||||
" :arg options: Enumerator in ['HIDDEN', 'SKIP_SAVE', 'ANIMATABLE', 'LIBRARY_EDITABLE'].\n"
|
||||
" :type options: set\n"
|
||||
" :arg subtype: Enumerator in ['UNSIGNED', 'PERCENTAGE', 'FACTOR', 'ANGLE', 'TIME', 'DISTANCE', 'NONE'].\n"
|
||||
" :type subtype: string\n"
|
||||
@@ -434,6 +436,7 @@ static PyObject *BPy_BoolProperty(PyObject *self, PyObject *args, PyObject *kw)
|
||||
if (opts & PROP_HIDDEN) RNA_def_property_flag(prop, PROP_HIDDEN);
|
||||
if ((opts & PROP_ANIMATABLE) == 0) RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
||||
if (opts & PROP_SKIP_SAVE) RNA_def_property_flag(prop, PROP_SKIP_SAVE);
|
||||
if (opts & PROP_LIB_EXCEPTION) RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);
|
||||
}
|
||||
bpy_prop_callback_assign(prop, update_cb);
|
||||
RNA_def_property_duplicate_pointers(srna, prop);
|
||||
@@ -457,7 +460,7 @@ BPY_PROPDEF_NAME_DOC
|
||||
BPY_PROPDEF_DESC_DOC
|
||||
" :arg default: sequence of booleans the length of *size*.\n"
|
||||
" :type default: sequence\n"
|
||||
" :arg options: Enumerator in ['HIDDEN', 'SKIP_SAVE', 'ANIMATABLE'].\n"
|
||||
" :arg options: Enumerator in ['HIDDEN', 'SKIP_SAVE', 'ANIMATABLE', 'LIBRARY_EDITABLE'].\n"
|
||||
" :type options: set\n"
|
||||
" :arg subtype: Enumerator in ['COLOR', 'TRANSLATION', 'DIRECTION', "
|
||||
"'VELOCITY', 'ACCELERATION', 'MATRIX', 'EULER', 'QUATERNION', 'AXISANGLE', "
|
||||
@@ -524,6 +527,7 @@ static PyObject *BPy_BoolVectorProperty(PyObject *self, PyObject *args, PyObject
|
||||
if (opts & PROP_HIDDEN) RNA_def_property_flag(prop, PROP_HIDDEN);
|
||||
if ((opts & PROP_ANIMATABLE) == 0) RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
||||
if (opts & PROP_SKIP_SAVE) RNA_def_property_flag(prop, PROP_SKIP_SAVE);
|
||||
if (opts & PROP_LIB_EXCEPTION) RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);
|
||||
}
|
||||
bpy_prop_callback_assign(prop, update_cb);
|
||||
RNA_def_property_duplicate_pointers(srna, prop);
|
||||
@@ -547,7 +551,7 @@ PyDoc_STRVAR(BPy_IntProperty_doc,
|
||||
"\n"
|
||||
BPY_PROPDEF_NAME_DOC
|
||||
BPY_PROPDEF_DESC_DOC
|
||||
" :arg options: Enumerator in ['HIDDEN', 'SKIP_SAVE', 'ANIMATABLE'].\n"
|
||||
" :arg options: Enumerator in ['HIDDEN', 'SKIP_SAVE', 'ANIMATABLE', 'LIBRARY_EDITABLE'].\n"
|
||||
" :type options: set\n"
|
||||
" :arg subtype: Enumerator in ['UNSIGNED', 'PERCENTAGE', 'FACTOR', 'ANGLE', 'TIME', 'DISTANCE', 'NONE'].\n"
|
||||
" :type subtype: string\n"
|
||||
@@ -600,6 +604,7 @@ static PyObject *BPy_IntProperty(PyObject *self, PyObject *args, PyObject *kw)
|
||||
if (opts & PROP_HIDDEN) RNA_def_property_flag(prop, PROP_HIDDEN);
|
||||
if ((opts & PROP_ANIMATABLE) == 0) RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
||||
if (opts & PROP_SKIP_SAVE) RNA_def_property_flag(prop, PROP_SKIP_SAVE);
|
||||
if (opts & PROP_LIB_EXCEPTION) RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);
|
||||
}
|
||||
bpy_prop_callback_assign(prop, update_cb);
|
||||
RNA_def_property_duplicate_pointers(srna, prop);
|
||||
@@ -624,7 +629,7 @@ BPY_PROPDEF_NAME_DOC
|
||||
BPY_PROPDEF_DESC_DOC
|
||||
" :arg default: sequence of ints the length of *size*.\n"
|
||||
" :type default: sequence\n"
|
||||
" :arg options: Enumerator in ['HIDDEN', 'SKIP_SAVE', 'ANIMATABLE'].\n"
|
||||
" :arg options: Enumerator in ['HIDDEN', 'SKIP_SAVE', 'ANIMATABLE', 'LIBRARY_EDITABLE'].\n"
|
||||
" :type options: set\n"
|
||||
" :arg subtype: Enumerator in ['COLOR', 'TRANSLATION', 'DIRECTION', "
|
||||
"'VELOCITY', 'ACCELERATION', 'MATRIX', 'EULER', 'QUATERNION', 'AXISANGLE', "
|
||||
@@ -696,6 +701,7 @@ static PyObject *BPy_IntVectorProperty(PyObject *self, PyObject *args, PyObject
|
||||
if (opts & PROP_HIDDEN) RNA_def_property_flag(prop, PROP_HIDDEN);
|
||||
if ((opts & PROP_ANIMATABLE) == 0) RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
||||
if (opts & PROP_SKIP_SAVE) RNA_def_property_flag(prop, PROP_SKIP_SAVE);
|
||||
if (opts & PROP_LIB_EXCEPTION) RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);
|
||||
}
|
||||
bpy_prop_callback_assign(prop, update_cb);
|
||||
RNA_def_property_duplicate_pointers(srna, prop);
|
||||
@@ -721,7 +727,7 @@ PyDoc_STRVAR(BPy_FloatProperty_doc,
|
||||
"\n"
|
||||
BPY_PROPDEF_NAME_DOC
|
||||
BPY_PROPDEF_DESC_DOC
|
||||
" :arg options: Enumerator in ['HIDDEN', 'SKIP_SAVE', 'ANIMATABLE'].\n"
|
||||
" :arg options: Enumerator in ['HIDDEN', 'SKIP_SAVE', 'ANIMATABLE', 'LIBRARY_EDITABLE'].\n"
|
||||
" :type options: set\n"
|
||||
" :arg subtype: Enumerator in ['UNSIGNED', 'PERCENTAGE', 'FACTOR', 'ANGLE', 'TIME', 'DISTANCE', 'NONE'].\n"
|
||||
" :type subtype: string\n"
|
||||
@@ -784,6 +790,7 @@ static PyObject *BPy_FloatProperty(PyObject *self, PyObject *args, PyObject *kw)
|
||||
if (opts & PROP_HIDDEN) RNA_def_property_flag(prop, PROP_HIDDEN);
|
||||
if ((opts & PROP_ANIMATABLE) == 0) RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
||||
if (opts & PROP_SKIP_SAVE) RNA_def_property_flag(prop, PROP_SKIP_SAVE);
|
||||
if (opts & PROP_LIB_EXCEPTION) RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);
|
||||
}
|
||||
bpy_prop_callback_assign(prop, update_cb);
|
||||
RNA_def_property_duplicate_pointers(srna, prop);
|
||||
@@ -810,7 +817,7 @@ BPY_PROPDEF_NAME_DOC
|
||||
BPY_PROPDEF_DESC_DOC
|
||||
" :arg default: sequence of floats the length of *size*.\n"
|
||||
" :type default: sequence\n"
|
||||
" :arg options: Enumerator in ['HIDDEN', 'SKIP_SAVE', 'ANIMATABLE'].\n"
|
||||
" :arg options: Enumerator in ['HIDDEN', 'SKIP_SAVE', 'ANIMATABLE', 'LIBRARY_EDITABLE'].\n"
|
||||
" :type options: set\n"
|
||||
" :arg subtype: Enumerator in ['COLOR', 'TRANSLATION', 'DIRECTION', "
|
||||
"'VELOCITY', 'ACCELERATION', 'MATRIX', 'EULER', 'QUATERNION', 'AXISANGLE', 'XYZ', "
|
||||
@@ -890,6 +897,7 @@ static PyObject *BPy_FloatVectorProperty(PyObject *self, PyObject *args, PyObjec
|
||||
if (opts & PROP_HIDDEN) RNA_def_property_flag(prop, PROP_HIDDEN);
|
||||
if ((opts & PROP_ANIMATABLE) == 0) RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
||||
if (opts & PROP_SKIP_SAVE) RNA_def_property_flag(prop, PROP_SKIP_SAVE);
|
||||
if (opts & PROP_LIB_EXCEPTION) RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);
|
||||
}
|
||||
bpy_prop_callback_assign(prop, update_cb);
|
||||
RNA_def_property_duplicate_pointers(srna, prop);
|
||||
@@ -910,7 +918,7 @@ PyDoc_STRVAR(BPy_StringProperty_doc,
|
||||
"\n"
|
||||
BPY_PROPDEF_NAME_DOC
|
||||
BPY_PROPDEF_DESC_DOC
|
||||
" :arg options: Enumerator in ['HIDDEN', 'SKIP_SAVE', 'ANIMATABLE'].\n"
|
||||
" :arg options: Enumerator in ['HIDDEN', 'SKIP_SAVE', 'ANIMATABLE', 'LIBRARY_EDITABLE'].\n"
|
||||
" :type options: set\n"
|
||||
" :arg subtype: Enumerator in ['FILE_PATH', 'DIR_PATH', 'FILENAME', 'NONE'].\n"
|
||||
" :type subtype: string\n"
|
||||
@@ -960,6 +968,7 @@ static PyObject *BPy_StringProperty(PyObject *self, PyObject *args, PyObject *kw
|
||||
if (opts & PROP_HIDDEN) RNA_def_property_flag(prop, PROP_HIDDEN);
|
||||
if ((opts & PROP_ANIMATABLE) == 0) RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
||||
if (opts & PROP_SKIP_SAVE) RNA_def_property_flag(prop, PROP_SKIP_SAVE);
|
||||
if (opts & PROP_LIB_EXCEPTION) RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);
|
||||
}
|
||||
bpy_prop_callback_assign(prop, update_cb);
|
||||
RNA_def_property_duplicate_pointers(srna, prop);
|
||||
@@ -1210,7 +1219,7 @@ BPY_PROPDEF_DESC_DOC
|
||||
" is disabled otherwise a set which may only contain string identifiers\n"
|
||||
" used in *items*.\n"
|
||||
" :type default: string or set\n"
|
||||
" :arg options: Enumerator in ['HIDDEN', 'SKIP_SAVE', 'ANIMATABLE', 'ENUM_FLAG'].\n"
|
||||
" :arg options: Enumerator in ['HIDDEN', 'SKIP_SAVE', 'ANIMATABLE', 'ENUM_FLAG', 'LIBRARY_EDITABLE'].\n"
|
||||
" :type options: set\n"
|
||||
" :arg items: sequence of enum items formatted:\n"
|
||||
" [(identifier, name, description, number), ...] where the identifier is used\n"
|
||||
@@ -1312,6 +1321,7 @@ static PyObject *BPy_EnumProperty(PyObject *self, PyObject *args, PyObject *kw)
|
||||
if (opts & PROP_HIDDEN) RNA_def_property_flag(prop, PROP_HIDDEN);
|
||||
if ((opts & PROP_ANIMATABLE) == 0) RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
||||
if (opts & PROP_SKIP_SAVE) RNA_def_property_flag(prop, PROP_SKIP_SAVE);
|
||||
if (opts & PROP_LIB_EXCEPTION) RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);
|
||||
}
|
||||
bpy_prop_callback_assign(prop, update_cb);
|
||||
RNA_def_property_duplicate_pointers(srna, prop);
|
||||
@@ -1367,7 +1377,7 @@ PyDoc_STRVAR(BPy_PointerProperty_doc,
|
||||
" :type type: class\n"
|
||||
BPY_PROPDEF_NAME_DOC
|
||||
BPY_PROPDEF_DESC_DOC
|
||||
" :arg options: Enumerator in ['HIDDEN', 'SKIP_SAVE', 'ANIMATABLE'].\n"
|
||||
" :arg options: Enumerator in ['HIDDEN', 'SKIP_SAVE', 'ANIMATABLE', 'LIBRARY_EDITABLE'].\n"
|
||||
" :type options: set\n"
|
||||
BPY_PROPDEF_UPDATE_DOC
|
||||
);
|
||||
@@ -1413,6 +1423,7 @@ static PyObject *BPy_PointerProperty(PyObject *self, PyObject *args, PyObject *k
|
||||
if (opts & PROP_HIDDEN) RNA_def_property_flag(prop, PROP_HIDDEN);
|
||||
if ((opts & PROP_ANIMATABLE) == 0) RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
||||
if (opts & PROP_SKIP_SAVE) RNA_def_property_flag(prop, PROP_SKIP_SAVE);
|
||||
if (opts & PROP_LIB_EXCEPTION) RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);
|
||||
}
|
||||
bpy_prop_callback_assign(prop, update_cb);
|
||||
RNA_def_property_duplicate_pointers(srna, prop);
|
||||
@@ -1432,7 +1443,7 @@ PyDoc_STRVAR(BPy_CollectionProperty_doc,
|
||||
" :type type: class\n"
|
||||
BPY_PROPDEF_NAME_DOC
|
||||
BPY_PROPDEF_DESC_DOC
|
||||
" :arg options: Enumerator in ['HIDDEN', 'SKIP_SAVE', 'ANIMATABLE'].\n"
|
||||
" :arg options: Enumerator in ['HIDDEN', 'SKIP_SAVE', 'ANIMATABLE', 'LIBRARY_EDITABLE'].\n"
|
||||
" :type options: set\n"
|
||||
);
|
||||
static PyObject *BPy_CollectionProperty(PyObject *self, PyObject *args, PyObject *kw)
|
||||
@@ -1471,6 +1482,7 @@ static PyObject *BPy_CollectionProperty(PyObject *self, PyObject *args, PyObject
|
||||
if (opts & PROP_HIDDEN) RNA_def_property_flag(prop, PROP_HIDDEN);
|
||||
if ((opts & PROP_ANIMATABLE) == 0) RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
||||
if (opts & PROP_SKIP_SAVE) RNA_def_property_flag(prop, PROP_SKIP_SAVE);
|
||||
if (opts & PROP_LIB_EXCEPTION) RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);
|
||||
}
|
||||
RNA_def_property_duplicate_pointers(srna, prop);
|
||||
}
|
||||
|
||||
@@ -1702,7 +1702,7 @@ static int pyrna_py_to_prop(PointerRNA *ptr, PropertyRNA *prop, void *data, PyOb
|
||||
|
||||
/* this is really nasty!, so we can fake the operator having direct properties eg:
|
||||
* layout.prop(self, "filepath")
|
||||
* ... which infact should be
|
||||
* ... which in fact should be
|
||||
* layout.prop(self.properties, "filepath")
|
||||
*
|
||||
* we need to do this trick.
|
||||
@@ -6347,7 +6347,7 @@ PyObject *BPY_rna_module(void)
|
||||
|
||||
void BPY_update_rna_module(void)
|
||||
{
|
||||
if(rna_module_ptr) {
|
||||
if (rna_module_ptr) {
|
||||
#if 0
|
||||
RNA_main_pointer_create(G.main, rna_module_ptr);
|
||||
#else
|
||||
|
||||
@@ -723,10 +723,10 @@ static int Color_channel_hsv_set(ColorObject *self, PyObject *value, void *type)
|
||||
if (BaseMath_ReadCallback(self) == -1)
|
||||
return -1;
|
||||
|
||||
rgb_to_hsv(self->col[0], self->col[1], self->col[2], &(hsv[0]), &(hsv[1]), &(hsv[2]));
|
||||
rgb_to_hsv_v(self->col, hsv);
|
||||
CLAMP(f, 0.0f, 1.0f);
|
||||
hsv[i] = f;
|
||||
hsv_to_rgb(hsv[0], hsv[1], hsv[2], &(self->col[0]), &(self->col[1]), &(self->col[2]));
|
||||
hsv_to_rgb_v(hsv, self->col);
|
||||
|
||||
if (BaseMath_WriteCallback(self) == -1)
|
||||
return -1;
|
||||
@@ -764,7 +764,7 @@ static int Color_hsv_set(ColorObject *self, PyObject *value, void *UNUSED(closur
|
||||
CLAMP(hsv[1], 0.0f, 1.0f);
|
||||
CLAMP(hsv[2], 0.0f, 1.0f);
|
||||
|
||||
hsv_to_rgb(hsv[0], hsv[1], hsv[2], &(self->col[0]), &(self->col[1]), &(self->col[2]));
|
||||
hsv_to_rgb_v(hsv, self->col);
|
||||
|
||||
if (BaseMath_WriteCallback(self) == -1)
|
||||
return -1;
|
||||
|
||||
@@ -196,7 +196,8 @@ static PyObject *Quaternion_cross(QuaternionObject *self, PyObject *value)
|
||||
return NULL;
|
||||
|
||||
if (mathutils_array_parse(tquat, QUAT_SIZE, QUAT_SIZE, value,
|
||||
"Quaternion.cross(other), invalid 'other' arg") == -1) {
|
||||
"Quaternion.cross(other), invalid 'other' arg") == -1)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user