Blender
V3.3
|
#include <Python.h>
#include "MEM_guardedalloc.h"
#include "BLI_string.h"
#include "BLI_utildefines.h"
#include "idprop_py_ui_api.h"
#include "BKE_idprop.h"
#include "DNA_ID.h"
#include "RNA_access.h"
#include "RNA_enum_types.h"
#include "py_capi_utils.h"
#include "py_capi_rna.h"
#include "python_utildefines.h"
Go to the source code of this file.
Macros | |
#define | USE_STRING_COERCE |
Functions | |
UI Data Update | |
static bool | args_contain_key (PyObject *kwargs, const char *name) |
static bool | idprop_ui_data_update_base (IDPropertyUIData *ui_data, const char *rna_subtype, const char *description) |
static bool | idprop_ui_data_update_int_default (IDProperty *idprop, IDPropertyUIDataInt *ui_data, PyObject *default_value) |
static bool | idprop_ui_data_update_int (IDProperty *idprop, PyObject *args, PyObject *kwargs) |
static bool | idprop_ui_data_update_float_default (IDProperty *idprop, IDPropertyUIDataFloat *ui_data, PyObject *default_value) |
static bool | idprop_ui_data_update_float (IDProperty *idprop, PyObject *args, PyObject *kwargs) |
static bool | idprop_ui_data_update_string (IDProperty *idprop, PyObject *args, PyObject *kwargs) |
static bool | idprop_ui_data_update_id (IDProperty *idprop, PyObject *args, PyObject *kwargs) |
PyDoc_STRVAR (BPy_IDPropertyUIManager_update_doc, ".. method:: update( " "subtype=None, " "min=None, " "max=None, " "soft_min=None, " "soft_max=None, " "precision=None, " "step=None, " "default=None, " "description=None)\n" "\n" " Update the RNA information of the IDProperty used for interaction and\n" " display in the user interface. The required types for many of the keyword\n" " arguments depend on the type of the property.\n ") | |
static PyObject * | BPy_IDPropertyUIManager_update (BPy_IDPropertyUIManager *self, PyObject *args, PyObject *kwargs) |
UI Data As Dictionary | |
static void | idprop_ui_data_to_dict_int (IDProperty *property, PyObject *dict) |
static void | idprop_ui_data_to_dict_float (IDProperty *property, PyObject *dict) |
static void | idprop_ui_data_to_dict_string (IDProperty *property, PyObject *dict) |
PyDoc_STRVAR (BPy_IDPropertyUIManager_as_dict_doc, ".. method:: as_dict()\n" "\n" " Return a dictionary of the property's RNA UI data. The fields in the\n" " returned dictionary and their types will depend on the property's type.\n") | |
static PyObject * | BPy_IDIDPropertyUIManager_as_dict (BPy_IDPropertyUIManager *self) |
UI Data Clear | |
PyDoc_STRVAR (BPy_IDPropertyUIManager_clear_doc, ".. method:: clear()\n" "\n" " Remove the RNA UI data from this IDProperty.\n") | |
static PyObject * | BPy_IDPropertyUIManager_clear (BPy_IDPropertyUIManager *self) |
UI Data Copying | |
PyDoc_STRVAR (BPy_IDPropertyUIManager_update_from_doc, ".. method:: update_from(ui_manager_source)\n" "\n" " Copy UI data from an IDProperty in the source group to a property in this group.\n " " If the source property has no UI data, the target UI data will be reset if it exists.\n" "\n" " :raises TypeError: If the types of the two properties don't match.\n") | |
static PyObject * | BPy_IDPropertyUIManager_update_from (BPy_IDPropertyUIManager *self, PyObject *args) |
UI Data Manager Definition | |
static struct PyMethodDef | BPy_IDPropertyUIManager_methods [] |
PyTypeObject | BPy_IDPropertyUIManager_Type |
static PyObject * | BPy_IDPropertyUIManager_repr (BPy_IDPropertyUIManager *self) |
static Py_hash_t | BPy_IDPropertyUIManager_hash (BPy_IDPropertyUIManager *self) |
void | IDPropertyUIData_Init_Types () |
#define USE_STRING_COERCE |
Definition at line 23 of file idprop_py_ui_api.c.
|
static |
Definition at line 36 of file idprop_py_ui_api.c.
Referenced by idprop_ui_data_update_float(), and idprop_ui_data_update_int().
|
static |
Definition at line 515 of file idprop_py_ui_api.c.
References BLI_assert, BLI_assert_unreachable, IDPropertyUIData::description, IDP_ui_data_ensure(), IDP_ui_data_supported(), IDP_ui_data_type(), IDP_UI_DATA_TYPE_FLOAT, IDP_UI_DATA_TYPE_ID, IDP_UI_DATA_TYPE_INT, IDP_UI_DATA_TYPE_STRING, IDP_UI_DATA_TYPE_UNSUPPORTED, idprop_ui_data_to_dict_float(), idprop_ui_data_to_dict_int(), idprop_ui_data_to_dict_string(), NULL, RNA_enum_identifier(), rna_enum_property_subtype_items, and IDPropertyUIData::rna_subtype.
|
static |
Definition at line 571 of file idprop_py_ui_api.c.
References BLI_assert, BLI_assert_unreachable, IDP_ui_data_free(), IDP_ui_data_supported(), and NULL.
|
static |
Definition at line 656 of file idprop_py_ui_api.c.
References self.
|
static |
Definition at line 650 of file idprop_py_ui_api.c.
References self.
|
static |
Definition at line 392 of file idprop_py_ui_api.c.
References BLI_assert, BLI_assert_unreachable, IDP_ui_data_ensure(), IDP_ui_data_supported(), IDP_ui_data_type(), IDP_UI_DATA_TYPE_FLOAT, IDP_UI_DATA_TYPE_ID, IDP_UI_DATA_TYPE_INT, IDP_UI_DATA_TYPE_STRING, IDP_UI_DATA_TYPE_UNSUPPORTED, idprop_ui_data_update_float(), idprop_ui_data_update_id(), idprop_ui_data_update_int(), idprop_ui_data_update_string(), and NULL.
|
static |
Definition at line 603 of file idprop_py_ui_api.c.
|
static |
Definition at line 468 of file idprop_py_ui_api.c.
References IDPropertyUIDataFloat::default_array, IDPropertyUIDataFloat::default_array_len, IDPropertyUIDataFloat::default_value, IDP_ARRAY, IDPropertyUIDataFloat::max, IDPropertyUIDataFloat::min, IDPropertyUIDataFloat::precision, IDPropertyUIDataFloat::soft_max, IDPropertyUIDataFloat::soft_min, IDPropertyUIDataFloat::step, IDProperty::type, and IDProperty::ui_data.
Referenced by BPy_IDIDPropertyUIManager_as_dict().
|
static |
Definition at line 439 of file idprop_py_ui_api.c.
References IDPropertyUIDataInt::default_array, IDPropertyUIDataInt::default_array_len, IDPropertyUIDataInt::default_value, IDP_ARRAY, IDPropertyUIDataInt::max, IDPropertyUIDataInt::min, IDPropertyUIDataInt::soft_max, IDPropertyUIDataInt::soft_min, IDPropertyUIDataInt::step, IDProperty::type, and IDProperty::ui_data.
Referenced by BPy_IDIDPropertyUIManager_as_dict().
|
static |
Definition at line 499 of file idprop_py_ui_api.c.
References IDPropertyUIDataString::default_value, NULL, and IDProperty::ui_data.
Referenced by BPy_IDIDPropertyUIManager_as_dict().
|
static |
Definition at line 53 of file idprop_py_ui_api.c.
References BLI_strdup(), IDPropertyUIData::description, NULL, pyrna_enum_value_from_id(), rna_enum_property_subtype_items, and IDPropertyUIData::rna_subtype.
Referenced by idprop_ui_data_update_float(), idprop_ui_data_update_id(), idprop_ui_data_update_int(), and idprop_ui_data_update_string().
|
static |
Definition at line 228 of file idprop_py_ui_api.c.
References args_contain_key(), IDPropertyUIDataFloat::base, ELEM, float(), IDP_ui_data_free_unique_contents(), IDP_ui_data_type(), idprop_ui_data_update_base(), idprop_ui_data_update_float_default(), if(), max, MAX2, min, MIN2, NULL, and IDProperty::ui_data.
Referenced by BPy_IDPropertyUIManager_update().
|
static |
Definition at line 188 of file idprop_py_ui_api.c.
References IDPropertyUIDataFloat::default_array, IDPropertyUIDataFloat::default_array_len, IDPropertyUIDataFloat::default_value, IDP_ARRAY, len, MEM_freeN, MEM_malloc_arrayN, PyC_AsArray(), and IDProperty::type.
Referenced by idprop_ui_data_update_float().
|
static |
Definition at line 352 of file idprop_py_ui_api.c.
References IDPropertyUIDataID::base, IDP_ui_data_free_unique_contents(), IDP_ui_data_type(), idprop_ui_data_update_base(), if(), NULL, and IDProperty::ui_data.
Referenced by BPy_IDPropertyUIManager_update().
|
static |
Definition at line 114 of file idprop_py_ui_api.c.
References args_contain_key(), IDPropertyUIDataInt::base, ELEM, IDP_ui_data_free_unique_contents(), IDP_ui_data_type(), idprop_ui_data_update_base(), idprop_ui_data_update_int_default(), if(), max, MAX2, min, MIN2, NULL, and IDProperty::ui_data.
Referenced by BPy_IDPropertyUIManager_update().
|
static |
Definition at line 77 of file idprop_py_ui_api.c.
References IDPropertyUIDataInt::default_array, IDPropertyUIDataInt::default_array_len, IDPropertyUIDataInt::default_value, IDP_ARRAY, len, MEM_freeN, MEM_malloc_arrayN, PyC_AsArray(), and IDProperty::type.
Referenced by idprop_ui_data_update_int().
|
static |
Definition at line 314 of file idprop_py_ui_api.c.
References IDPropertyUIDataString::base, BLI_strdup(), IDP_ui_data_free_unique_contents(), IDP_ui_data_type(), idprop_ui_data_update_base(), if(), NULL, and IDProperty::ui_data.
Referenced by BPy_IDPropertyUIManager_update().
Definition at line 722 of file idprop_py_ui_api.c.
References BPy_IDPropertyUIManager_Type.
Referenced by BPy_init_modules(), and BPyInit_idprop_types().
PyDoc_STRVAR | ( | BPy_IDPropertyUIManager_as_dict_doc | , |
".. method:: as_dict()\n" "\n" " Return a dictionary of the property's RNA UI data. The fields in the\n" " returned dictionary and their types will depend on the property's type.\n" | |||
) |
PyDoc_STRVAR | ( | BPy_IDPropertyUIManager_clear_doc | , |
".. method:: clear()\n" "\n" " Remove the RNA UI data from this IDProperty.\n" | |||
) |
PyDoc_STRVAR | ( | BPy_IDPropertyUIManager_update_doc | , |
".. method:: update( " "subtype=None, " "min=None, " "max=None, " "soft_min=None, " "soft_max=None, " "precision=None, " "step=None, " "default=None, " "description=None)\n" "\n" " Update the RNA information of the IDProperty used for interaction and\n" " display in the user interface. The required types for many of the keyword\n" " arguments depend on the type of the property.\n " | |||
) |
PyDoc_STRVAR | ( | BPy_IDPropertyUIManager_update_from_doc | , |
".. method:: update_from(ui_manager_source)\n" "\n" " Copy UI data from an IDProperty in the source group to a property in this group.\n " " If the source property has no UI | data, | ||
the target UI data will be reset if it exists.\n" "\n" " :raises TypeError:If the types of the two properties don 't match.\n" | |||
) |
|
static |
Definition at line 603 of file idprop_py_ui_api.c.
PyTypeObject BPy_IDPropertyUIManager_Type |
Definition at line 661 of file idprop_py_ui_api.c.
Referenced by IDPropertyUIData_Init_Types(), and pyrna_struct_id_properties_ui().