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:
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/RNA_access.h13
-rw-r--r--source/blender/makesrna/RNA_define.h12
-rw-r--r--source/blender/makesrna/RNA_enum_types.h7
-rw-r--r--source/blender/makesrna/RNA_types.h18
-rw-r--r--source/blender/makesrna/SConscript5
-rw-r--r--source/blender/makesrna/intern/CMakeLists.txt48
-rw-r--r--source/blender/makesrna/intern/Makefile12
-rw-r--r--source/blender/makesrna/intern/SConscript18
-rw-r--r--source/blender/makesrna/intern/makesrna.c254
-rw-r--r--source/blender/makesrna/intern/rna_ID.c2
-rw-r--r--source/blender/makesrna/intern/rna_access.c275
-rw-r--r--source/blender/makesrna/intern/rna_action.c20
-rw-r--r--source/blender/makesrna/intern/rna_action_api.c9
-rw-r--r--source/blender/makesrna/intern/rna_animation.c23
-rw-r--r--source/blender/makesrna/intern/rna_animation_api.c89
-rw-r--r--source/blender/makesrna/intern/rna_armature.c24
-rw-r--r--source/blender/makesrna/intern/rna_boid.c103
-rw-r--r--source/blender/makesrna/intern/rna_brush.c22
-rw-r--r--source/blender/makesrna/intern/rna_cloth.c63
-rw-r--r--source/blender/makesrna/intern/rna_constraint.c21
-rw-r--r--source/blender/makesrna/intern/rna_curve.c221
-rw-r--r--source/blender/makesrna/intern/rna_define.c179
-rw-r--r--source/blender/makesrna/intern/rna_fcurve.c38
-rw-r--r--source/blender/makesrna/intern/rna_fluidsim.c20
-rw-r--r--source/blender/makesrna/intern/rna_gpencil.c252
-rw-r--r--source/blender/makesrna/intern/rna_group.c2
-rw-r--r--source/blender/makesrna/intern/rna_image_api.c2
-rw-r--r--source/blender/makesrna/intern/rna_internal.h6
-rw-r--r--source/blender/makesrna/intern/rna_internal_types.h18
-rw-r--r--source/blender/makesrna/intern/rna_key.c5
-rw-r--r--source/blender/makesrna/intern/rna_lattice.c14
-rw-r--r--source/blender/makesrna/intern/rna_main.c33
-rw-r--r--source/blender/makesrna/intern/rna_material.c342
-rw-r--r--source/blender/makesrna/intern/rna_material_api.c2
-rw-r--r--source/blender/makesrna/intern/rna_mesh.c188
-rw-r--r--source/blender/makesrna/intern/rna_mesh_api.c13
-rw-r--r--source/blender/makesrna/intern/rna_meta.c12
-rw-r--r--source/blender/makesrna/intern/rna_modifier.c441
-rw-r--r--source/blender/makesrna/intern/rna_nla.c26
-rw-r--r--source/blender/makesrna/intern/rna_nodetree.c154
-rw-r--r--source/blender/makesrna/intern/rna_nodetree_types.h5
-rw-r--r--source/blender/makesrna/intern/rna_object.c55
-rw-r--r--source/blender/makesrna/intern/rna_object_api.c8
-rw-r--r--source/blender/makesrna/intern/rna_object_force.c90
-rw-r--r--source/blender/makesrna/intern/rna_packedfile.c7
-rw-r--r--source/blender/makesrna/intern/rna_particle.c463
-rw-r--r--source/blender/makesrna/intern/rna_pose.c288
-rw-r--r--source/blender/makesrna/intern/rna_pose_api.c2
-rw-r--r--source/blender/makesrna/intern/rna_render.c62
-rw-r--r--source/blender/makesrna/intern/rna_rna.c4
-rw-r--r--source/blender/makesrna/intern/rna_scene.c152
-rw-r--r--source/blender/makesrna/intern/rna_scene_api.c50
-rw-r--r--source/blender/makesrna/intern/rna_sculpt_paint.c154
-rw-r--r--source/blender/makesrna/intern/rna_sequence.c13
-rw-r--r--source/blender/makesrna/intern/rna_smoke.c49
-rw-r--r--source/blender/makesrna/intern/rna_sound.c29
-rw-r--r--source/blender/makesrna/intern/rna_space.c243
-rw-r--r--source/blender/makesrna/intern/rna_test.c189
-rw-r--r--source/blender/makesrna/intern/rna_texture.c282
-rw-r--r--source/blender/makesrna/intern/rna_ui_api.c34
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c409
-rw-r--r--source/blender/makesrna/intern/rna_wm.c9
-rw-r--r--source/blender/makesrna/intern/rna_world.c2
63 files changed, 1545 insertions, 4060 deletions
diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h
index 05f39d73842..e08bc734242 100644
--- a/source/blender/makesrna/RNA_access.h
+++ b/source/blender/makesrna/RNA_access.h
@@ -213,11 +213,6 @@ extern StructRNA RNA_GameSoftBodySettings;
extern StructRNA RNA_GameStringProperty;
extern StructRNA RNA_GameTimerProperty;
extern StructRNA RNA_GlowSequence;
-extern StructRNA RNA_GreasePencil;
-extern StructRNA RNA_GPencilLayer;
-extern StructRNA RNA_GPencilFrame;
-extern StructRNA RNA_GPencilStroke;
-extern StructRNA RNA_GPencilStrokePoint;
extern StructRNA RNA_Group;
extern StructRNA RNA_Header;
extern StructRNA RNA_HemiLamp;
@@ -326,8 +321,6 @@ extern StructRNA RNA_ParticleTarget;
extern StructRNA RNA_PluginSequence;
extern StructRNA RNA_PluginTexture;
extern StructRNA RNA_PointCache;
-extern StructRNA RNA_PointDensity;
-extern StructRNA RNA_PointDensityTexture;
extern StructRNA RNA_PointerProperty;
extern StructRNA RNA_Pose;
extern StructRNA RNA_PoseChannel;
@@ -505,8 +498,6 @@ extern StructRNA RNA_VertexGroup;
extern StructRNA RNA_VertexGroupElement;
extern StructRNA RNA_VertexPaint;
extern StructRNA RNA_VoronoiTexture;
-extern StructRNA RNA_VoxelData;
-extern StructRNA RNA_VoxelDataTexture;
extern StructRNA RNA_WaveModifier;
extern StructRNA RNA_Window;
extern StructRNA RNA_WindowManager;
@@ -585,9 +576,7 @@ PropertySubType RNA_property_subtype(PropertyRNA *prop);
PropertyUnit RNA_property_unit(PropertyRNA *prop);
int RNA_property_flag(PropertyRNA *prop);
-int RNA_property_array_length(PointerRNA *ptr, PropertyRNA *prop);
-int RNA_property_multi_array_length(PointerRNA *ptr, PropertyRNA *prop, int dimension);
-int RNA_property_array_dimension(PointerRNA *ptr, PropertyRNA *prop, int length[]);
+int RNA_property_array_length(PropertyRNA *prop);
char RNA_property_array_item_char(PropertyRNA *prop, int index);
int RNA_property_string_maxlength(PropertyRNA *prop);
diff --git a/source/blender/makesrna/RNA_define.h b/source/blender/makesrna/RNA_define.h
index 42c5343dbff..33f5d7137b8 100644
--- a/source/blender/makesrna/RNA_define.h
+++ b/source/blender/makesrna/RNA_define.h
@@ -72,8 +72,6 @@ typedef void StructOrFunctionRNA;
PropertyRNA *RNA_def_boolean(StructOrFunctionRNA *cont, const char *identifier, int default_value, const char *ui_name, const char *ui_description);
PropertyRNA *RNA_def_boolean_array(StructOrFunctionRNA *cont, const char *identifier, int len, int *default_value, const char *ui_name, const char *ui_description);
-PropertyRNA *RNA_def_boolean_layer(StructOrFunctionRNA *cont, const char *identifier, int len, int *default_value, const char *ui_name, const char *ui_description);
-PropertyRNA *RNA_def_boolean_layer_member(StructOrFunctionRNA *cont, const char *identifier, int len, int *default_value, const char *ui_name, const char *ui_description);
PropertyRNA *RNA_def_boolean_vector(StructOrFunctionRNA *cont, const char *identifier, int len, int *default_value, const char *ui_name, const char *ui_description);
PropertyRNA *RNA_def_int(StructOrFunctionRNA *cont, const char *identifier, int default_value, int hardmin, int hardmax, const char *ui_name, const char *ui_description, int softmin, int softmax);
@@ -90,15 +88,11 @@ void RNA_def_enum_funcs(PropertyRNA *prop, EnumPropertyItemFunc itemfunc);
PropertyRNA *RNA_def_float(StructOrFunctionRNA *cont, const char *identifier, float default_value, float hardmin, float hardmax, const char *ui_name, const char *ui_description, float softmin, float softmax);
PropertyRNA *RNA_def_float_vector(StructOrFunctionRNA *cont, const char *identifier, int len, const float *default_value, float hardmin, float hardmax, const char *ui_name, const char *ui_description, float softmin, float softmax);
PropertyRNA *RNA_def_float_color(StructOrFunctionRNA *cont, const char *identifier, int len, const float *default_value, float hardmin, float hardmax, const char *ui_name, const char *ui_description, float softmin, float softmax);
-PropertyRNA *RNA_def_float_matrix(StructOrFunctionRNA *cont, const char *identifier, int rows, int columns, const float *default_value, float hardmin, float hardmax, const char *ui_name, const char *ui_description, float softmin, float softmax);
+PropertyRNA *RNA_def_float_matrix(StructOrFunctionRNA *cont, const char *identifier, int len, const float *default_value, float hardmin, float hardmax, const char *ui_name, const char *ui_description, float softmin, float softmax);
PropertyRNA *RNA_def_float_rotation(StructOrFunctionRNA *cont, const char *identifier, int len, const float *default_value,
float hardmin, float hardmax, const char *ui_name, const char *ui_description, float softmin, float softmax);
PropertyRNA *RNA_def_float_array(StructOrFunctionRNA *cont, const char *identifier, int len, const float *default_value,
float hardmin, float hardmax, const char *ui_name, const char *ui_description, float softmin, float softmax);
- /*
-PropertyRNA *RNA_def_float_dynamic_array(StructOrFunctionRNA *cont, const char *identifier, float hardmin, float hardmax,
- const char *ui_name, const char *ui_description, float softmin, float softmax, unsigned int dimension, unsigned short dim_size[]);
- */
PropertyRNA *RNA_def_float_percentage(StructOrFunctionRNA *cont, const char *identifier, float default_value, float hardmin, float hardmax,
const char *ui_name, const char *ui_description, float softmin, float softmax);
@@ -128,8 +122,7 @@ void RNA_def_property_collection_sdna(PropertyRNA *prop, const char *structname,
void RNA_def_property_flag(PropertyRNA *prop, int flag);
void RNA_def_property_clear_flag(PropertyRNA *prop, int flag);
-void RNA_def_property_array(PropertyRNA *prop, int length);
-void RNA_def_property_multi_array(PropertyRNA *prop, int dimension, int length[]);
+void RNA_def_property_array(PropertyRNA *prop, int arraylength);
void RNA_def_property_range(PropertyRNA *prop, double min, double max);
void RNA_def_property_enum_items(PropertyRNA *prop, const EnumPropertyItem *item);
@@ -153,7 +146,6 @@ void RNA_def_property_ui_icon(PropertyRNA *prop, int icon, int consecutive);
void RNA_def_property_update(PropertyRNA *prop, int noteflag, const char *updatefunc);
void RNA_def_property_editable_func(PropertyRNA *prop, const char *editable);
-void RNA_def_property_dynamic_array_funcs(PropertyRNA *prop, const char *getlength);
void RNA_def_property_boolean_funcs(PropertyRNA *prop, const char *get, const char *set);
void RNA_def_property_int_funcs(PropertyRNA *prop, const char *get, const char *set, const char *range);
void RNA_def_property_float_funcs(PropertyRNA *prop, const char *get, const char *set, const char *range);
diff --git a/source/blender/makesrna/RNA_enum_types.h b/source/blender/makesrna/RNA_enum_types.h
index ccf4b7a2db3..46d8c50caa6 100644
--- a/source/blender/makesrna/RNA_enum_types.h
+++ b/source/blender/makesrna/RNA_enum_types.h
@@ -38,12 +38,9 @@ extern EnumPropertyItem modifier_type_items[];
extern EnumPropertyItem constraint_type_items[];
extern EnumPropertyItem boidrule_type_items[];
-extern EnumPropertyItem beztriple_keyframe_type_items[];
extern EnumPropertyItem beztriple_handle_type_items[];
extern EnumPropertyItem beztriple_interpolation_mode_items[];
-extern EnumPropertyItem keyingset_path_grouping_items[];
-
extern EnumPropertyItem fmodifier_type_items[];
extern EnumPropertyItem nla_mode_extend_items[];
@@ -54,10 +51,6 @@ extern EnumPropertyItem event_type_items[];
extern EnumPropertyItem brush_sculpt_tool_items[];
-extern EnumPropertyItem unpack_method_items[];
-
-extern EnumPropertyItem object_type_items[];
-
#endif /* RNA_ENUM_TYPES */
diff --git a/source/blender/makesrna/RNA_types.h b/source/blender/makesrna/RNA_types.h
index 393281693e8..51c3645fb03 100644
--- a/source/blender/makesrna/RNA_types.h
+++ b/source/blender/makesrna/RNA_types.h
@@ -111,10 +111,6 @@ typedef enum PropertySubType {
/* pointers */
PROP_NEVER_NULL = 30,
-
- /* booleans */
- PROP_LAYER = 40,
- PROP_LAYER_MEMBER = 41
} PropertySubType;
typedef enum PropertyFlag {
@@ -149,6 +145,9 @@ typedef enum PropertyFlag {
/* pointers */
PROP_ID_REFCOUNT = 64,
+ /* arrays */
+ PROP_DYNAMIC_ARRAY = 32768,
+
/* internal flags */
PROP_BUILTIN = 128,
PROP_EXPORT = 256,
@@ -156,8 +155,7 @@ typedef enum PropertyFlag {
PROP_IDPROPERTY = 1024,
PROP_RAW_ACCESS = 8192,
PROP_RAW_ARRAY = 16384,
- PROP_FREE_POINTERS = 32768,
- PROP_DYNAMIC = 131072 /* for dynamic arrays and function retvals of string type */
+ PROP_FREE_POINTERS = 32768
} PropertyFlag;
typedef struct CollectionPropertyIterator {
@@ -180,11 +178,11 @@ typedef struct CollectionPointerLink {
} CollectionPointerLink;
typedef enum RawPropertyType {
- PROP_RAW_INT, // XXX - abused for types that are not set, eg. MFace.verts, needs fixing.
- PROP_RAW_SHORT,
PROP_RAW_CHAR,
- PROP_RAW_DOUBLE,
- PROP_RAW_FLOAT
+ PROP_RAW_SHORT,
+ PROP_RAW_INT,
+ PROP_RAW_FLOAT,
+ PROP_RAW_DOUBLE
} RawPropertyType;
typedef struct RawArray {
diff --git a/source/blender/makesrna/SConscript b/source/blender/makesrna/SConscript
index 845abf636e2..80abd4fda61 100644
--- a/source/blender/makesrna/SConscript
+++ b/source/blender/makesrna/SConscript
@@ -37,7 +37,4 @@ if env['WITH_BF_LCMS']:
if env['WITH_BF_GAMEENGINE']:
defs.append('GAMEBLENDER=1')
-if env['BF_UNIT_TEST']:
- defs.append('UNIT_TEST')
-
-env.BlenderLib ( 'bf_rna', objs, Split(incs), defines=defs, libtype=['core','player'], priority = [165,20] )
+env.BlenderLib ( 'bf_rna', objs, Split(incs), defines=defs, libtype=['core'], priority = [195] )
diff --git a/source/blender/makesrna/intern/CMakeLists.txt b/source/blender/makesrna/intern/CMakeLists.txt
index 709c5d017ec..152f4031b91 100644
--- a/source/blender/makesrna/intern/CMakeLists.txt
+++ b/source/blender/makesrna/intern/CMakeLists.txt
@@ -32,70 +32,58 @@ LIST(REMOVE_ITEM DEFSRC ${APISRC})
STRING(REGEX REPLACE "rna_([a-zA-Z0-9_-]*).c" "${CMAKE_CURRENT_BINARY_DIR}/rna_\\1_gen.c" GENSRC "${DEFSRC}")
SET(SRC
- makesrna.c
- rna_define.c
- ${DEFSRC}
- ${APISRC}
- ../../../../intern/guardedalloc/intern/mallocn.c
- ../../../../intern/guardedalloc/intern/mmap_win.c)
+ makesrna.c
+ rna_define.c
+ ${DEFSRC}
+ ${APISRC}
+ ../../../../intern/guardedalloc/intern/mallocn.c
+ ../../../../intern/guardedalloc/intern/mmap_win.c)
INCLUDE_DIRECTORIES(../../../../intern/guardedalloc .. ../../makesdna ../../blenkernel ../../blenlib ../../windowmanager ../../editors/include ../../imbuf ../../render/extern/include .)
FILE(GLOB INC_FILES ../*.h ../../makesdna/*.h)
IF(WITH_GAMEENGINE)
- ADD_DEFINITIONS(-DGAMEBLENDER)
+ ADD_DEFINITIONS(-DGAMEBLENDER)
ENDIF(WITH_GAMEENGINE)
IF(WITH_OPENEXR)
- ADD_DEFINITIONS(-DWITH_OPENEXR)
+ ADD_DEFINITIONS(-DWITH_OPENEXR)
ENDIF(WITH_OPENEXR)
IF(WITH_OPENJPEG)
- ADD_DEFINITIONS(-DWITH_OPENJPEG)
+ ADD_DEFINITIONS(-DWITH_OPENJPEG)
ENDIF(WITH_OPENJPEG)
IF(WITH_DDS)
- ADD_DEFINITIONS(-DWITH_DDS)
+ ADD_DEFINITIONS(-DWITH_DDS)
ENDIF(WITH_DDS)
IF(WITH_QUICKTIME)
- ADD_DEFINITIONS(-DWITH_QUICKTIME)
+ ADD_DEFINITIONS(-DWITH_QUICKTIME)
ENDIF(WITH_QUICKTIME)
IF(WITH_FFMPEG)
- SET(INC ${INC} ${FFMPEG_INC})
- ADD_DEFINITIONS(-DWITH_FFMPEG)
+ SET(INC ${INC} ${FFMPEG_INC})
+ ADD_DEFINITIONS(-DWITH_FFMPEG)
ENDIF(WITH_FFMPEG)
IF(NOT WITH_ELBEEM)
- ADD_DEFINITIONS(-DDISABLE_ELBEEM)
+ ADD_DEFINITIONS(-DDISABLE_ELBEEM)
ENDIF(NOT WITH_ELBEEM)
IF(WITH_FFTW3)
- ADD_DEFINITIONS(-DFFTW3=1)
+ ADD_DEFINITIONS(-DFFTW3=1)
ENDIF(WITH_FFTW3)
-IF(WITH_SDL)
- ADD_DEFINITIONS(-DWITH_SDL)
-ENDIF(WITH_SDL)
-
-IF(WITH_OPENAL)
- ADD_DEFINITIONS(-DWITH_OPENAL)
-ENDIF(WITH_OPENAL)
-
-IF(WITH_JACK)
- ADD_DEFINITIONS(-DWITH_JACK)
-ENDIF(WITH_JACK)
-
# Build makesrna executable
ADD_EXECUTABLE(makesrna ${SRC} ${INC_FILES})
TARGET_LINK_LIBRARIES(makesrna bf_dna)
# Output rna_*_gen.c
ADD_CUSTOM_COMMAND(
- OUTPUT ${GENSRC}
- COMMAND ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/makesrna ${CMAKE_CURRENT_BINARY_DIR}/
- DEPENDS makesrna
+ OUTPUT ${GENSRC}
+ COMMAND ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/makesrna ${CMAKE_CURRENT_BINARY_DIR}/
+ DEPENDS makesrna
)
# Build bf_rna
diff --git a/source/blender/makesrna/intern/Makefile b/source/blender/makesrna/intern/Makefile
index 4a4e41edd15..c7cc6e7a4bf 100644
--- a/source/blender/makesrna/intern/Makefile
+++ b/source/blender/makesrna/intern/Makefile
@@ -77,18 +77,6 @@ ifeq ($(WITH_QUICKTIME), true)
CPPFLAGS += -DWITH_QUICKTIME
endif
-ifeq ($(WITH_SDL),true)
- CPPFLAGS += -DWITH_SDL
-endif
-
-ifeq ($(WITH_JACK),true)
- CPPFLAGS += -DWITH_JACK
-endif
-
-ifeq ($(WITH_OPENAL),true)
- CPPFLAGS += -DWITH_OPENAL
-endif
-
ifeq ($(OS),windows)
# Windows needs these extra libs because of winstuff... It is not
# _really_ needed, but it is the easiest fix for now. If you have
diff --git a/source/blender/makesrna/intern/SConscript b/source/blender/makesrna/intern/SConscript
index 569f0547731..1a3687af51e 100644
--- a/source/blender/makesrna/intern/SConscript
+++ b/source/blender/makesrna/intern/SConscript
@@ -6,7 +6,7 @@ def normpath(path):
return os.path.abspath(os.path.normpath(path))
Import ('env')
-cflags = ['-Wall']
+cflags = '-Wall'
defines = []
root_build_dir=normpath(env['BF_BUILDDIR'])
@@ -62,18 +62,6 @@ if env['WITH_BF_GAMEENGINE']:
if env['WITH_BF_FFTW3']:
defs.append('FFTW3=1')
-if env['WITH_BF_SDL']:
- defs.append('WITH_SDL')
-
-if env['WITH_BF_OPENAL']:
- defs.append('WITH_OPENAL')
-
-if env['WITH_BF_JACK']:
- defs.append('WITH_JACK')
-
-if env['BF_UNIT_TEST']:
- defs.append('UNIT_TEST')
-
makesrna_tool.Append(CPPDEFINES=defs)
makesrna_tool.Append (CPPPATH = Split(incs))
@@ -99,10 +87,6 @@ if not (root_build_dir[0]==os.sep or root_build_dir[1]==':'):
makesrna_tool.Append (LIBPATH = libdir)
-makesrna_tool.Append( CFLAGS = env['CFLAGS'])
-makesrna_tool.Append( CCFLAGS = env['CCFLAGS'])
-makesrna_tool.Append( LINKFLAGS = env['PLATFORM_LINKFLAGS'])
-
if env['BF_PROFILE']:
makesrna_tool.Append (LINKFLAGS = env['BF_PROFILE_FLAGS'])
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c
index 0294107466a..baf820e7249 100644
--- a/source/blender/makesrna/intern/makesrna.c
+++ b/source/blender/makesrna/intern/makesrna.c
@@ -306,10 +306,11 @@ static void rna_int_print(FILE *f, int num)
static char *rna_def_property_get_func(FILE *f, StructRNA *srna, PropertyRNA *prop, PropertyDefRNA *dp, const char *manualfunc)
{
char *func;
+ int i;
if(prop->flag & PROP_IDPROPERTY)
return NULL;
-
+
if(!manualfunc) {
if(!dp->dnastructname || !dp->dnaname) {
fprintf(stderr, "rna_def_property_get_func: %s.%s has no valid dna info.\n", srna->identifier, prop->identifier);
@@ -372,11 +373,8 @@ static char *rna_def_property_get_func(FILE *f, StructRNA *srna, PropertyRNA *pr
break;
}
default:
- if(prop->arraydimension) {
- if(prop->flag & PROP_DYNAMIC)
- fprintf(f, "void %s(PointerRNA *ptr, %s values[])\n", func, rna_type_type(prop));
- else
- fprintf(f, "void %s(PointerRNA *ptr, %s values[%d])\n", func, rna_type_type(prop), prop->totarraylength);
+ if(prop->arraylength) {
+ fprintf(f, "void %s(PointerRNA *ptr, %s values[%d])\n", func, rna_type_type(prop), prop->arraylength);
fprintf(f, "{\n");
if(manualfunc) {
@@ -385,38 +383,27 @@ static char *rna_def_property_get_func(FILE *f, StructRNA *srna, PropertyRNA *pr
else {
rna_print_data_get(f, dp);
- if(prop->flag & PROP_DYNAMIC) {
- char *lenfunc= rna_alloc_function_name(srna->identifier, prop->identifier, "get_length");
- fprintf(f, " int i, arraylen[RNA_MAX_ARRAY_DIMENSION];\n");
- fprintf(f, " int len= %s(ptr, arraylen);\n\n", lenfunc);
- fprintf(f, " for(i=0; i<len; i++) {\n");
- MEM_freeN(lenfunc);
- }
- else {
- fprintf(f, " int i;\n\n");
- fprintf(f, " for(i=0; i<%d; i++) {\n", prop->totarraylength);
- }
-
- if(dp->dnaarraylength == 1) {
- if(prop->type == PROP_BOOLEAN && dp->booleanbit)
- fprintf(f, " values[i]= (%s(data->%s & (%d<<i)) != 0);\n", (dp->booleannegative)? "!": "", dp->dnaname, dp->booleanbit);
- else
- fprintf(f, " values[i]= (%s)%s((&data->%s)[i]);\n", rna_type_type(prop), (dp->booleannegative)? "!": "", dp->dnaname);
- }
- else {
- if(prop->type == PROP_BOOLEAN && dp->booleanbit) {
- fprintf(f, " values[i]= (%s(data->%s[i] & ", (dp->booleannegative)? "!": "", dp->dnaname);
- rna_int_print(f, dp->booleanbit);
- fprintf(f, ") != 0);\n");
+ for(i=0; i<prop->arraylength; i++) {
+ if(dp->dnaarraylength == 1) {
+ if(prop->type == PROP_BOOLEAN && dp->booleanbit)
+ fprintf(f, " values[%d]= (%s(data->%s & (%d<<%d)) != 0);\n", i, (dp->booleannegative)? "!": "", dp->dnaname, dp->booleanbit, i);
+ else
+ fprintf(f, " values[%d]= (%s)%s((&data->%s)[%d]);\n", i, rna_type_type(prop), (dp->booleannegative)? "!": "", dp->dnaname, i);
+ }
+ else {
+ if(prop->type == PROP_BOOLEAN && dp->booleanbit) {
+ fprintf(f, " values[%d]= (%s(data->%s[%d] & ", i, (dp->booleannegative)? "!": "", dp->dnaname, i);
+ rna_int_print(f, dp->booleanbit);
+ fprintf(f, ") != 0);\n");
+ }
+ else if(rna_color_quantize(prop, dp))
+ fprintf(f, " values[%d]= (%s)(data->%s[%d]*(1.0f/255.0f));\n", i, rna_type_type(prop), dp->dnaname, i);
+ else if(dp->dnatype)
+ fprintf(f, " values[%d]= (%s)%s(((%s*)data->%s)[%d]);\n", i, rna_type_type(prop), (dp->booleannegative)? "!": "", dp->dnatype, dp->dnaname, i);
+ else
+ fprintf(f, " values[%d]= (%s)%s((data->%s)[%d]);\n", i, rna_type_type(prop), (dp->booleannegative)? "!": "", dp->dnaname, i);
}
- else if(rna_color_quantize(prop, dp))
- fprintf(f, " values[i]= (%s)(data->%s[i]*(1.0f/255.0f));\n", rna_type_type(prop), dp->dnaname);
- else if(dp->dnatype)
- fprintf(f, " values[i]= (%s)%s(((%s*)data->%s)[i]);\n", rna_type_type(prop), (dp->booleannegative)? "!": "", dp->dnatype, dp->dnaname);
- else
- fprintf(f, " values[i]= (%s)%s((data->%s)[i]);\n", rna_type_type(prop), (dp->booleannegative)? "!": "", dp->dnaname);
}
- fprintf(f, " }\n");
}
fprintf(f, "}\n\n");
}
@@ -451,13 +438,13 @@ static char *rna_def_property_get_func(FILE *f, StructRNA *srna, PropertyRNA *pr
return func;
}
-static void rna_clamp_value(FILE *f, PropertyRNA *prop, int array)
+static void rna_clamp_value(FILE *f, PropertyRNA *prop, int array, int i)
{
if(prop->type == PROP_INT) {
IntPropertyRNA *iprop= (IntPropertyRNA*)prop;
if(iprop->hardmin != INT_MIN || iprop->hardmax != INT_MAX) {
- if(array) fprintf(f, "CLAMPIS(values[i], ");
+ if(array) fprintf(f, "CLAMPIS(values[%d], ", i);
else fprintf(f, "CLAMPIS(value, ");
rna_int_print(f, iprop->hardmin); fprintf(f, ", ");
rna_int_print(f, iprop->hardmax); fprintf(f, ");\n");
@@ -468,7 +455,7 @@ static void rna_clamp_value(FILE *f, PropertyRNA *prop, int array)
FloatPropertyRNA *fprop= (FloatPropertyRNA*)prop;
if(fprop->hardmin != -FLT_MAX || fprop->hardmax != FLT_MAX) {
- if(array) fprintf(f, "CLAMPIS(values[i], ");
+ if(array) fprintf(f, "CLAMPIS(values[%d], ", i);
else fprintf(f, "CLAMPIS(value, ");
rna_float_print(f, fprop->hardmin); fprintf(f, ", ");
rna_float_print(f, fprop->hardmax); fprintf(f, ");\n");
@@ -477,7 +464,7 @@ static void rna_clamp_value(FILE *f, PropertyRNA *prop, int array)
}
if(array)
- fprintf(f, "values[i];\n");
+ fprintf(f, "values[%d];\n", i);
else
fprintf(f, "value;\n");
}
@@ -485,6 +472,7 @@ static void rna_clamp_value(FILE *f, PropertyRNA *prop, int array)
static char *rna_def_property_set_func(FILE *f, StructRNA *srna, PropertyRNA *prop, PropertyDefRNA *dp, char *manualfunc)
{
char *func;
+ int i;
if(!(prop->flag & PROP_EDITABLE))
return NULL;
@@ -544,11 +532,8 @@ static char *rna_def_property_set_func(FILE *f, StructRNA *srna, PropertyRNA *pr
break;
}
default:
- if(prop->arraydimension) {
- if(prop->flag & PROP_DYNAMIC)
- fprintf(f, "void %s(PointerRNA *ptr, const %s values[])\n", func, rna_type_type(prop));
- else
- fprintf(f, "void %s(PointerRNA *ptr, const %s values[%d])\n", func, rna_type_type(prop), prop->totarraylength);
+ if(prop->arraylength) {
+ fprintf(f, "void %s(PointerRNA *ptr, const %s values[%d])\n", func, rna_type_type(prop), prop->arraylength);
fprintf(f, "{\n");
if(manualfunc) {
@@ -557,49 +542,38 @@ static char *rna_def_property_set_func(FILE *f, StructRNA *srna, PropertyRNA *pr
else {
rna_print_data_get(f, dp);
- if(prop->flag & PROP_DYNAMIC) {
- char *lenfunc= rna_alloc_function_name(srna->identifier, prop->identifier, "set_length");
- fprintf(f, " int i, arraylen[RNA_MAX_ARRAY_DIMENSION];\n");
- fprintf(f, " int len= %s(ptr, arraylen);\n\n", lenfunc);
- fprintf(f, " for(i=0; i<len; i++) {\n");
- MEM_freeN(lenfunc);
- }
- else {
- fprintf(f, " int i;\n\n");
- fprintf(f, " for(i=0; i<%d; i++) {\n", prop->totarraylength);
- }
-
- if(dp->dnaarraylength == 1) {
- if(prop->type == PROP_BOOLEAN && dp->booleanbit) {
- fprintf(f, " if(%svalues[i]) data->%s |= (%d<<i);\n", (dp->booleannegative)? "!": "", dp->dnaname, dp->booleanbit);
- fprintf(f, " else data->%s &= ~(%d<<i);\n", dp->dnaname, dp->booleanbit);
- }
- else {
- fprintf(f, " (&data->%s)[i]= %s", dp->dnaname, (dp->booleannegative)? "!": "");
- rna_clamp_value(f, prop, 1);
- }
- }
- else {
- if(prop->type == PROP_BOOLEAN && dp->booleanbit) {
- fprintf(f, " if(%svalues[i]) data->%s[i] |= ", (dp->booleannegative)? "!": "", dp->dnaname);
- rna_int_print(f, dp->booleanbit);
- fprintf(f, ";\n");
- fprintf(f, " else data->%s[i] &= ~", dp->dnaname);
- rna_int_print(f, dp->booleanbit);
- fprintf(f, ";\n");
- }
- else if(rna_color_quantize(prop, dp)) {
- fprintf(f, " data->%s[i]= FTOCHAR(values[i]);\n", dp->dnaname);
+ for(i=0; i<prop->arraylength; i++) {
+ if(dp->dnaarraylength == 1) {
+ if(prop->type == PROP_BOOLEAN && dp->booleanbit) {
+ fprintf(f, " if(%svalues[%d]) data->%s |= (%d<<%d);\n", (dp->booleannegative)? "!": "", i, dp->dnaname, dp->booleanbit, i);
+ fprintf(f, " else data->%s &= ~(%d<<%d);\n", dp->dnaname, dp->booleanbit, i);
+ }
+ else {
+ fprintf(f, " (&data->%s)[%d]= %s", dp->dnaname, i, (dp->booleannegative)? "!": "");
+ rna_clamp_value(f, prop, 1, i);
+ }
}
else {
- if(dp->dnatype)
- fprintf(f, " ((%s*)data->%s)[i]= %s", dp->dnatype, dp->dnaname, (dp->booleannegative)? "!": "");
- else
- fprintf(f, " (data->%s)[i]= %s", dp->dnaname, (dp->booleannegative)? "!": "");
- rna_clamp_value(f, prop, 1);
+ if(prop->type == PROP_BOOLEAN && dp->booleanbit) {
+ fprintf(f, " if(%svalues[%d]) data->%s[%d] |= ", (dp->booleannegative)? "!": "", i, dp->dnaname, i);
+ rna_int_print(f, dp->booleanbit);
+ fprintf(f, ";\n");
+ fprintf(f, " else data->%s[%d] &= ~", dp->dnaname, i);
+ rna_int_print(f, dp->booleanbit);
+ fprintf(f, ";\n");
+ }
+ else if(rna_color_quantize(prop, dp)) {
+ fprintf(f, " data->%s[%d]= FTOCHAR(values[%d]);\n", dp->dnaname, i, i);
+ }
+ else {
+ if(dp->dnatype)
+ fprintf(f, " ((%s*)data->%s)[%d]= %s", dp->dnatype, dp->dnaname, i, (dp->booleannegative)? "!": "");
+ else
+ fprintf(f, " (data->%s)[%d]= %s", dp->dnaname, i, (dp->booleannegative)? "!": "");
+ rna_clamp_value(f, prop, 1, i);
+ }
}
}
- fprintf(f, " }\n");
}
fprintf(f, "}\n\n");
}
@@ -628,7 +602,7 @@ static char *rna_def_property_set_func(FILE *f, StructRNA *srna, PropertyRNA *pr
}
else {
fprintf(f, " data->%s= %s", dp->dnaname, (dp->booleannegative)? "!": "");
- rna_clamp_value(f, prop, 0);
+ rna_clamp_value(f, prop, 0, 0);
}
}
fprintf(f, "}\n\n");
@@ -845,7 +819,7 @@ static void rna_def_property_funcs(FILE *f, StructRNA *srna, PropertyDefRNA *dp)
case PROP_BOOLEAN: {
BooleanPropertyRNA *bprop= (BooleanPropertyRNA*)prop;
- if(!prop->arraydimension) {
+ if(!prop->arraylength) {
if(!bprop->get && !bprop->set && !dp->booleanbit)
rna_set_raw_property(dp, prop);
@@ -861,7 +835,7 @@ static void rna_def_property_funcs(FILE *f, StructRNA *srna, PropertyDefRNA *dp)
case PROP_INT: {
IntPropertyRNA *iprop= (IntPropertyRNA*)prop;
- if(!prop->arraydimension) {
+ if(!prop->arraylength) {
if(!iprop->get && !iprop->set)
rna_set_raw_property(dp, prop);
@@ -880,7 +854,7 @@ static void rna_def_property_funcs(FILE *f, StructRNA *srna, PropertyDefRNA *dp)
case PROP_FLOAT: {
FloatPropertyRNA *fprop= (FloatPropertyRNA*)prop;
- if(!prop->arraydimension) {
+ if(!prop->arraylength) {
if(!fprop->get && !fprop->set)
rna_set_raw_property(dp, prop);
@@ -979,23 +953,23 @@ static void rna_def_property_funcs_header(FILE *f, StructRNA *srna, PropertyDefR
switch(prop->type) {
case PROP_BOOLEAN:
case PROP_INT: {
- if(!prop->arraydimension) {
+ if(!prop->arraylength) {
fprintf(f, "int %sget(PointerRNA *ptr);\n", func);
//fprintf(f, "void %sset(PointerRNA *ptr, int value);\n", func);
}
else {
- fprintf(f, "void %sget(PointerRNA *ptr, int values[%d]);\n", func, prop->totarraylength);
+ fprintf(f, "void %sget(PointerRNA *ptr, int values[%d]);\n", func, prop->arraylength);
//fprintf(f, "void %sset(PointerRNA *ptr, const int values[%d]);\n", func, prop->arraylength);
}
break;
}
case PROP_FLOAT: {
- if(!prop->arraydimension) {
+ if(!prop->arraylength) {
fprintf(f, "float %sget(PointerRNA *ptr);\n", func);
//fprintf(f, "void %sset(PointerRNA *ptr, float value);\n", func);
}
else {
- fprintf(f, "void %sget(PointerRNA *ptr, float values[%d]);\n", func, prop->totarraylength);
+ fprintf(f, "void %sget(PointerRNA *ptr, float values[%d]);\n", func, prop->arraylength);
//fprintf(f, "void %sset(PointerRNA *ptr, const float values[%d]);\n", func, prop->arraylength);
}
break;
@@ -1069,24 +1043,24 @@ static void rna_def_property_funcs_header_cpp(FILE *f, StructRNA *srna, Property
switch(prop->type) {
case PROP_BOOLEAN: {
- if(!prop->arraydimension)
+ if(!prop->arraylength)
fprintf(f, "\tbool %s(void);", prop->identifier);
else
- fprintf(f, "\tArray<int, %d> %s(void);", prop->totarraylength, prop->identifier);
+ fprintf(f, "\tArray<int, %d> %s(void);", prop->arraylength, prop->identifier);
break;
}
case PROP_INT: {
- if(!prop->arraydimension)
+ if(!prop->arraylength)
fprintf(f, "\tint %s(void);", prop->identifier);
else
- fprintf(f, "\tArray<int, %d> %s(void);", prop->totarraylength, prop->identifier);
+ fprintf(f, "\tArray<int, %d> %s(void);", prop->arraylength, prop->identifier);
break;
}
case PROP_FLOAT: {
- if(!prop->arraydimension)
+ if(!prop->arraylength)
fprintf(f, "\tfloat %s(void);", prop->identifier);
else
- fprintf(f, "\tArray<float, %d> %s(void);", prop->totarraylength, prop->identifier);
+ fprintf(f, "\tArray<float, %d> %s(void);", prop->arraylength, prop->identifier);
break;
}
case PROP_ENUM: {
@@ -1144,24 +1118,24 @@ static void rna_def_property_funcs_impl_cpp(FILE *f, StructRNA *srna, PropertyDe
switch(prop->type) {
case PROP_BOOLEAN: {
- if(!prop->arraydimension)
+ if(!prop->arraylength)
fprintf(f, "\tBOOLEAN_PROPERTY(%s, %s)", srna->identifier, prop->identifier);
else
- fprintf(f, "\tBOOLEAN_ARRAY_PROPERTY(%s, %d, %s)", srna->identifier, prop->totarraylength, prop->identifier);
+ fprintf(f, "\tBOOLEAN_ARRAY_PROPERTY(%s, %d, %s)", srna->identifier, prop->arraylength, prop->identifier);
break;
}
case PROP_INT: {
- if(!prop->arraydimension)
+ if(!prop->arraylength)
fprintf(f, "\tINT_PROPERTY(%s, %s)", srna->identifier, prop->identifier);
else
- fprintf(f, "\tINT_ARRAY_PROPERTY(%s, %d, %s)", srna->identifier, prop->totarraylength, prop->identifier);
+ fprintf(f, "\tINT_ARRAY_PROPERTY(%s, %d, %s)", srna->identifier, prop->arraylength, prop->identifier);
break;
}
case PROP_FLOAT: {
- if(!prop->arraydimension)
+ if(!prop->arraylength)
fprintf(f, "\tFLOAT_PROPERTY(%s, %s)", srna->identifier, prop->identifier);
else
- fprintf(f, "\tFLOAT_ARRAY_PROPERTY(%s, %d, %s)", srna->identifier, prop->totarraylength, prop->identifier);
+ fprintf(f, "\tFLOAT_ARRAY_PROPERTY(%s, %d, %s)", srna->identifier, prop->arraylength, prop->identifier);
break;
}
case PROP_ENUM: {
@@ -1224,20 +1198,14 @@ static void rna_def_function_funcs(FILE *f, StructDefRNA *dsrna, FunctionDefRNA
dparm= dfunc->cont.properties.first;
for(; dparm; dparm= dparm->next) {
- if(dparm->prop->arraydimension)
- ptrstr= "*";
- else if(dparm->prop==func->ret)
- ptrstr= ((dparm->prop->type == PROP_POINTER) && !(dparm->prop->flag & PROP_RNAPTR))? "*": "";
- else
- ptrstr= (dparm->prop->type == PROP_POINTER)? "*": "";
-
+ ptrstr= (dparm->prop->type == PROP_POINTER || dparm->prop->arraylength > 0)? "*" : "";
fprintf(f, "\t%s%s %s%s;\n", rna_type_struct(dparm->prop), rna_parameter_type_name(dparm->prop), ptrstr, dparm->prop->identifier);
}
fprintf(f, "\tchar *_data");
if(func->ret) fprintf(f, ", *_retdata");
fprintf(f, ";\n");
- if(func->ret && (func->ret->flag & PROP_DYNAMIC)) fprintf(f, "\tint _ret_array_length;\n");
+ if(func->ret && (func->ret->flag & PROP_DYNAMIC_ARRAY)) fprintf(f, "\tint _ret_array_length;\n");
fprintf(f, "\t\n");
/* assign self */
@@ -1252,7 +1220,7 @@ static void rna_def_function_funcs(FILE *f, StructDefRNA *dsrna, FunctionDefRNA
for(; dparm; dparm= dparm->next) {
if(dparm->prop==func->ret)
fprintf(f, "\t_retdata= _data;\n");
- else if(dparm->prop->arraydimension)
+ else if(dparm->prop->arraylength)
fprintf(f, "\t%s= ((%s%s*)_data);\n", dparm->prop->identifier, rna_type_struct(dparm->prop), rna_parameter_type_name(dparm->prop));
else if(dparm->prop->type == PROP_POINTER) {
if(dparm->prop->flag & PROP_RNAPTR)
@@ -1292,7 +1260,7 @@ static void rna_def_function_funcs(FILE *f, StructDefRNA *dsrna, FunctionDefRNA
fprintf(f, "reports");
}
- if(func->ret && (func->ret->flag & PROP_DYNAMIC)) {
+ if(func->ret && (func->ret->flag & PROP_DYNAMIC_ARRAY)) {
if(!first) fprintf(f, ", ");
first= 0;
fprintf(f, "&_ret_array_length");
@@ -1313,13 +1281,11 @@ static void rna_def_function_funcs(FILE *f, StructDefRNA *dsrna, FunctionDefRNA
if(func->ret) {
dparm= rna_find_parameter_def(func->ret);
- ptrstr= (((dparm->prop->type == PROP_POINTER) && !(dparm->prop->flag & PROP_RNAPTR)) || (dparm->prop->arraydimension))? "*": "";
+ ptrstr= dparm->prop->type == PROP_POINTER || dparm->prop->arraylength > 0 ? "*" : "";
fprintf(f, "\t*((%s%s%s*)_retdata)= %s;\n", rna_type_struct(dparm->prop), rna_parameter_type_name(dparm->prop), ptrstr, func->ret->identifier);
- if(func->ret && (func->ret->flag & PROP_DYNAMIC)) {
- fprintf(f, "\t_parms->func->ret->arraylength[0]= _ret_array_length;\n");
- fprintf(f, "\t_parms->func->ret->totarraylength= _ret_array_length;\n");
- fprintf(f, "\t_parms->func->ret->arraydimension= 1;\n");
+ if(func->ret && (func->ret->flag & PROP_DYNAMIC_ARRAY)) {
+ fprintf(f, "\t_parms->func->ret->arraylength= _ret_array_length;\n");
}
}
}
@@ -1433,8 +1399,6 @@ static const char *rna_property_subtypename(PropertyType type)
case PROP_XYZ: return "PROP_XYZ";
case PROP_RGB: return "PROP_RGB";
case PROP_NEVER_NULL: return "PROP_NEVER_NULL";
- case PROP_LAYER: return "PROP_LAYER";
- case PROP_LAYER_MEMBER: return "PROP_LAYER_MEMBER";
default: {
/* incase we dont have a type preset that includes the subtype */
if(RNA_SUBTYPE_UNIT(type)) {
@@ -1561,9 +1525,9 @@ static void rna_generate_static_parameter_prototypes(BlenderRNA *brna, StructRNA
/* return type */
for(dparm= dfunc->cont.properties.first; dparm; dparm= dparm->next) {
if(dparm->prop==func->ret) {
- if(dparm->prop->arraydimension)
- fprintf(f, "XXX no array return types yet"); /* XXX not supported */
- else if(dparm->prop->type == PROP_POINTER && !(dparm->prop->flag & PROP_RNAPTR))
+ if(dparm->prop->arraylength && !(dparm->prop->flag & PROP_DYNAMIC_ARRAY))
+ fprintf(f, "\"XXX array return types only allowed with PROP_DYNAMIC_ARRAY flag.\""); /* XXX not supported */
+ else if(dparm->prop->type == PROP_POINTER || (dparm->prop->flag & PROP_DYNAMIC_ARRAY))
fprintf(f, "%s%s *", rna_type_struct(dparm->prop), rna_parameter_type_name(dparm->prop));
else
fprintf(f, "%s%s ", rna_type_struct(dparm->prop), rna_parameter_type_name(dparm->prop));
@@ -1601,7 +1565,7 @@ static void rna_generate_static_parameter_prototypes(BlenderRNA *brna, StructRNA
}
/* dynamic array length paramter */
- if(func->ret && (func->ret->flag & PROP_DYNAMIC)) {
+ if(func->ret && (func->ret->flag & PROP_DYNAMIC_ARRAY)) {
if(!first) fprintf(f, ", ");
first= 0;
fprintf(f, "int *array_length");
@@ -1615,8 +1579,8 @@ static void rna_generate_static_parameter_prototypes(BlenderRNA *brna, StructRNA
if(!first) fprintf(f, ", ");
first= 0;
- if(dparm->prop->arraydimension)
- fprintf(f, "%s%s %s[%d]", rna_type_struct(dparm->prop), rna_parameter_type_name(dparm->prop), dparm->prop->identifier, dparm->prop->totarraylength);
+ if(dparm->prop->arraylength)
+ fprintf(f, "%s%s %s[%d]", rna_type_struct(dparm->prop), rna_parameter_type_name(dparm->prop), dparm->prop->identifier, dparm->prop->arraylength);
else if(dparm->prop->type == PROP_POINTER)
fprintf(f, "%s%s *%s", rna_type_struct(dparm->prop), rna_parameter_type_name(dparm->prop), dparm->prop->identifier);
else
@@ -1699,15 +1663,15 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
BooleanPropertyRNA *bprop= (BooleanPropertyRNA*)prop;
unsigned int i;
- if(prop->arraydimension && prop->totarraylength) {
- fprintf(f, "static int rna_%s%s_%s_default[%d] = {", srna->identifier, strnest, prop->identifier, prop->totarraylength);
+ if(prop->arraylength) {
+ fprintf(f, "static int rna_%s%s_%s_default[%d] = {", srna->identifier, strnest, prop->identifier, prop->arraylength);
- for(i=0; i<prop->totarraylength; i++) {
+ for(i=0; i<prop->arraylength; i++) {
if(bprop->defaultarray)
fprintf(f, "%d", bprop->defaultarray[i]);
else
fprintf(f, "%d", bprop->defaultvalue);
- if(i != prop->totarraylength-1)
+ if(i != prop->arraylength-1)
fprintf(f, ", ");
}
@@ -1719,15 +1683,15 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
IntPropertyRNA *iprop= (IntPropertyRNA*)prop;
unsigned int i;
- if(prop->arraydimension && prop->totarraylength) {
- fprintf(f, "static int rna_%s%s_%s_default[%d] = {", srna->identifier, strnest, prop->identifier, prop->totarraylength);
+ if(prop->arraylength) {
+ fprintf(f, "static int rna_%s%s_%s_default[%d] = {", srna->identifier, strnest, prop->identifier, prop->arraylength);
- for(i=0; i<prop->totarraylength; i++) {
+ for(i=0; i<prop->arraylength; i++) {
if(iprop->defaultarray)
fprintf(f, "%d", iprop->defaultarray[i]);
else
fprintf(f, "%d", iprop->defaultvalue);
- if(i != prop->totarraylength-1)
+ if(i != prop->arraylength-1)
fprintf(f, ", ");
}
@@ -1739,15 +1703,15 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
FloatPropertyRNA *fprop= (FloatPropertyRNA*)prop;
unsigned int i;
- if(prop->arraydimension && prop->totarraylength) {
- fprintf(f, "static float rna_%s%s_%s_default[%d] = {", srna->identifier, strnest, prop->identifier, prop->totarraylength);
+ if(prop->arraylength) {
+ fprintf(f, "static float rna_%s%s_%s_default[%d] = {", srna->identifier, strnest, prop->identifier, prop->arraylength);
- for(i=0; i<prop->totarraylength; i++) {
+ for(i=0; i<prop->arraylength; i++) {
if(fprop->defaultarray)
rna_float_print(f, fprop->defaultarray[i]);
else
rna_float_print(f, fprop->defaultvalue);
- if(i != prop->totarraylength-1)
+ if(i != prop->arraylength-1)
fprintf(f, ", ");
}
@@ -1771,7 +1735,7 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
rna_print_c_string(f, prop->name); fprintf(f, ",\n\t");
rna_print_c_string(f, prop->description); fprintf(f, ",\n\t");
fprintf(f, "%d,\n", prop->icon);
- fprintf(f, "\t%s, %s|%s, %s, %d, {%d, %d, %d}, %d,\n", rna_property_typename(prop->type), rna_property_subtypename(prop->subtype), rna_property_subtype_unit(prop->subtype), rna_function_string(prop->getlength), prop->arraydimension, prop->arraylength[0], prop->arraylength[1], prop->arraylength[2], prop->totarraylength);
+ fprintf(f, "\t%s, %s|%s, %d,\n", rna_property_typename(prop->type), rna_property_subtypename(prop->subtype), rna_property_subtype_unit(prop->subtype), prop->arraylength);
fprintf(f, "\t%s, %d, %s,\n", rna_function_string(prop->update), prop->noteflag, rna_function_string(prop->editable));
if(prop->flag & PROP_RAW_ACCESS) rna_set_raw_offset(f, srna, prop);
@@ -1782,7 +1746,7 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
case PROP_BOOLEAN: {
BooleanPropertyRNA *bprop= (BooleanPropertyRNA*)prop;
fprintf(f, "\t%s, %s, %s, %s, %d, ", rna_function_string(bprop->get), rna_function_string(bprop->set), rna_function_string(bprop->getarray), rna_function_string(bprop->setarray), bprop->defaultvalue);
- if(prop->arraydimension && prop->totarraylength) fprintf(f, "rna_%s%s_%s_default\n", srna->identifier, strnest, prop->identifier);
+ if(prop->arraylength) fprintf(f, "rna_%s%s_%s_default\n", srna->identifier, strnest, prop->identifier);
else fprintf(f, "NULL\n");
break;
}
@@ -1795,7 +1759,7 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
rna_int_print(f, iprop->hardmax); fprintf(f, ", ");
rna_int_print(f, iprop->step); fprintf(f, ", ");
rna_int_print(f, iprop->defaultvalue); fprintf(f, ", ");
- if(prop->arraydimension && prop->totarraylength) fprintf(f, "rna_%s%s_%s_default\n", srna->identifier, strnest, prop->identifier);
+ if(prop->arraylength) fprintf(f, "rna_%s%s_%s_default\n", srna->identifier, strnest, prop->identifier);
else fprintf(f, "NULL\n");
break;
}
@@ -1809,7 +1773,7 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
rna_float_print(f, fprop->step); fprintf(f, ", ");
rna_int_print(f, (int)fprop->precision); fprintf(f, ", ");
rna_float_print(f, fprop->defaultvalue); fprintf(f, ", ");
- if(prop->arraydimension && prop->totarraylength) fprintf(f, "rna_%s%s_%s_default\n", srna->identifier, strnest, prop->identifier);
+ if(prop->arraylength) fprintf(f, "rna_%s%s_%s_default\n", srna->identifier, strnest, prop->identifier);
else fprintf(f, "NULL\n");
break;
}
@@ -1990,7 +1954,7 @@ RNAProcessItem PROCESS_ITEMS[]= {
{"rna_ID.c", NULL, RNA_def_ID},
{"rna_texture.c", NULL, RNA_def_texture},
{"rna_action.c", "rna_action_api.c", RNA_def_action},
- {"rna_animation.c", "rna_animation_api.c", RNA_def_animation},
+ {"rna_animation.c", NULL, RNA_def_animation},
{"rna_actuator.c", NULL, RNA_def_actuator},
{"rna_armature.c", NULL, RNA_def_armature},
{"rna_boid.c", NULL, RNA_def_boid},
@@ -2004,7 +1968,6 @@ RNAProcessItem PROCESS_ITEMS[]= {
{"rna_curve.c", NULL, RNA_def_curve},
{"rna_fcurve.c", NULL, RNA_def_fcurve},
{"rna_fluidsim.c", NULL, RNA_def_fluidsim},
- {"rna_gpencil.c", NULL, RNA_def_gpencil},
{"rna_group.c", NULL, RNA_def_group},
{"rna_image.c", "rna_image_api.c", RNA_def_image},
{"rna_key.c", NULL, RNA_def_key},
@@ -2031,7 +1994,6 @@ RNAProcessItem PROCESS_ITEMS[]= {
{"rna_sequence.c", NULL, RNA_def_sequence},
{"rna_smoke.c", NULL, RNA_def_smoke},
{"rna_space.c", NULL, RNA_def_space},
- {"rna_test.c", NULL, RNA_def_test},
{"rna_text.c", NULL, RNA_def_text},
{"rna_timeline.c", NULL, RNA_def_timeline_marker},
{"rna_sound.c", NULL, RNA_def_sound},
diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c
index f5c6063e892..f6e0a2468c4 100644
--- a/source/blender/makesrna/intern/rna_ID.c
+++ b/source/blender/makesrna/intern/rna_ID.c
@@ -65,7 +65,6 @@ short RNA_type_to_ID_code(StructRNA *type)
if(RNA_struct_is_a(type, &RNA_Brush)) return ID_BR;
if(RNA_struct_is_a(type, &RNA_Camera)) return ID_CA;
if(RNA_struct_is_a(type, &RNA_Curve)) return ID_CU;
- if(RNA_struct_is_a(type, &RNA_GreasePencil)) return ID_GD;
if(RNA_struct_is_a(type, &RNA_Group)) return ID_GR;
if(RNA_struct_is_a(type, &RNA_Image)) return ID_IM;
if(RNA_struct_is_a(type, &RNA_Key)) return ID_KE;
@@ -98,7 +97,6 @@ StructRNA *ID_code_to_RNA_type(short idcode)
case ID_BR: return &RNA_Brush;
case ID_CA: return &RNA_Camera;
case ID_CU: return &RNA_Curve;
- case ID_GD: return &RNA_GreasePencil;
case ID_GR: return &RNA_Group;
case ID_IM: return &RNA_Image;
case ID_KE: return &RNA_Key;
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index e4bda24cf20..7b8edb6c341 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -209,41 +209,7 @@ static IDProperty *rna_idproperty_find(PointerRNA *ptr, const char *name)
return NULL;
}
-static int rna_ensure_property_array_length(PointerRNA *ptr, PropertyRNA *prop)
-{
- if(prop->magic == RNA_MAGIC) {
- int arraylen[RNA_MAX_ARRAY_DIMENSION];
- return (prop->getlength)? prop->getlength(ptr, arraylen): prop->totarraylength;
- }
- else {
- IDProperty *idprop= (IDProperty*)prop;
-
- if(idprop->type == IDP_ARRAY)
- return idprop->len;
- else
- return 0;
- }
-}
-
-static void rna_ensure_property_multi_array_length(PointerRNA *ptr, PropertyRNA *prop, int length[])
-{
- if(prop->magic == RNA_MAGIC) {
- if(prop->getlength)
- prop->getlength(ptr, length);
- else
- memcpy(length, prop->arraylength, prop->arraydimension*sizeof(int));
- }
- else {
- IDProperty *idprop= (IDProperty*)prop;
-
- if(idprop->type == IDP_ARRAY)
- length[0]= idprop->len;
- else
- length[0]= 0;
- }
-}
-
-static int rna_idproperty_verify_valid(PointerRNA *ptr, PropertyRNA *prop, IDProperty *idprop)
+static int rna_idproperty_verify_valid(PropertyRNA *prop, IDProperty *idprop)
{
/* this verifies if the idproperty actually matches the property
* description and otherwise removes it. this is to ensure that
@@ -256,7 +222,7 @@ static int rna_idproperty_verify_valid(PointerRNA *ptr, PropertyRNA *prop, IDPro
return 0;
break;
case IDP_ARRAY:
- if(rna_ensure_property_array_length(ptr, prop) != idprop->len)
+ if(prop->arraylength != idprop->len)
return 0;
if(idprop->subtype == IDP_FLOAT && prop->type != PROP_FLOAT)
@@ -317,7 +283,7 @@ IDProperty *rna_idproperty_check(PropertyRNA **prop, PointerRNA *ptr)
if((*prop)->flag & PROP_IDPROPERTY) {
IDProperty *idprop= rna_idproperty_find(ptr, (*prop)->identifier);
- if(idprop && !rna_idproperty_verify_valid(ptr, *prop, idprop)) {
+ if(idprop && !rna_idproperty_verify_valid(*prop, idprop)) {
IDProperty *group= RNA_struct_idproperties(ptr, 0);
IDP_RemFromGroup(group, idprop);
@@ -344,7 +310,7 @@ IDProperty *rna_idproperty_check(PropertyRNA **prop, PointerRNA *ptr)
}
}
-static PropertyRNA *rna_ensure_property(PropertyRNA *prop)
+PropertyRNA *rna_ensure_property(PropertyRNA *prop)
{
/* the quick version if we don't need the idproperty */
@@ -361,7 +327,7 @@ static PropertyRNA *rna_ensure_property(PropertyRNA *prop)
}
}
-static const char *rna_ensure_property_identifier(PropertyRNA *prop)
+const char *rna_ensure_property_identifier(PropertyRNA *prop)
{
if(prop->magic == RNA_MAGIC)
return prop->identifier;
@@ -369,7 +335,7 @@ static const char *rna_ensure_property_identifier(PropertyRNA *prop)
return ((IDProperty*)prop)->name;
}
-static const char *rna_ensure_property_name(PropertyRNA *prop)
+const char *rna_ensure_property_name(PropertyRNA *prop)
{
if(prop->magic == RNA_MAGIC)
return prop->name;
@@ -377,6 +343,20 @@ static const char *rna_ensure_property_name(PropertyRNA *prop)
return ((IDProperty*)prop)->name;
}
+int rna_ensure_property_array_length(PropertyRNA *prop)
+{
+ if(prop->magic == RNA_MAGIC)
+ return prop->arraylength;
+ else {
+ IDProperty *idprop= (IDProperty*)prop;
+
+ if(idprop->type == IDP_ARRAY)
+ return idprop->len;
+ else
+ return 0;
+ }
+}
+
/* Structs */
const char *RNA_struct_identifier(StructRNA *type)
@@ -569,30 +549,9 @@ int RNA_property_flag(PropertyRNA *prop)
return rna_ensure_property(prop)->flag;
}
-int RNA_property_array_length(PointerRNA *ptr, PropertyRNA *prop)
+int RNA_property_array_length(PropertyRNA *prop)
{
- return rna_ensure_property_array_length(ptr, prop);
-}
-
-/* used by BPY to make an array from the python object */
-int RNA_property_array_dimension(PointerRNA *ptr, PropertyRNA *prop, int length[])
-{
- PropertyRNA *rprop= rna_ensure_property(prop);
-
- if(length && rprop->arraydimension > 1)
- rna_ensure_property_multi_array_length(ptr, prop, length);
-
- return rprop->arraydimension;
-}
-
-/* Return the size of Nth dimension. */
-int RNA_property_multi_array_length(PointerRNA *ptr, PropertyRNA *prop, int dim)
-{
- int len[RNA_MAX_ARRAY_DIMENSION];
-
- rna_ensure_property_multi_array_length(ptr, prop, len);
-
- return len[dim];
+ return rna_ensure_property_array_length(prop);
}
char RNA_property_array_item_char(PropertyRNA *prop, int index)
@@ -895,40 +854,27 @@ void RNA_property_boolean_get_array(PointerRNA *ptr, PropertyRNA *prop, int *val
IDProperty *idprop;
if((idprop=rna_idproperty_check(&prop, ptr))) {
- if(prop->arraydimension == 0)
+ if(prop->arraylength == 0)
values[0]= RNA_property_boolean_get(ptr, prop);
else
memcpy(values, IDP_Array(idprop), sizeof(int)*idprop->len);
}
- else if(prop->arraydimension == 0)
+ else if(prop->arraylength == 0)
values[0]= RNA_property_boolean_get(ptr, prop);
else if(bprop->getarray)
bprop->getarray(ptr, values);
else if(bprop->defaultarray)
- memcpy(values, bprop->defaultarray, sizeof(int)*prop->totarraylength);
+ memcpy(values, bprop->defaultarray, sizeof(int)*prop->arraylength);
else
- memset(values, 0, sizeof(int)*prop->totarraylength);
+ memset(values, 0, sizeof(int)*prop->arraylength);
}
int RNA_property_boolean_get_index(PointerRNA *ptr, PropertyRNA *prop, int index)
{
- int tmp[RNA_MAX_ARRAY_LENGTH];
- int len= rna_ensure_property_array_length(ptr, prop);
-
- if(len <= RNA_MAX_ARRAY_LENGTH) {
- RNA_property_boolean_get_array(ptr, prop, tmp);
- return tmp[index];
- }
- else {
- int *tmparray, value;
+ int tmp[RNA_MAX_ARRAY];
- tmparray= MEM_callocN(sizeof(int)*len, "RNA_property_boolean_get_index");
- RNA_property_boolean_get_array(ptr, prop, tmparray);
- value= tmparray[index];
- MEM_freeN(tmparray);
-
- return value;
- }
+ RNA_property_boolean_get_array(ptr, prop, tmp);
+ return tmp[index];
}
void RNA_property_boolean_set_array(PointerRNA *ptr, PropertyRNA *prop, const int *values)
@@ -937,12 +883,12 @@ void RNA_property_boolean_set_array(PointerRNA *ptr, PropertyRNA *prop, const in
IDProperty *idprop;
if((idprop=rna_idproperty_check(&prop, ptr))) {
- if(prop->arraydimension == 0)
+ if(prop->arraylength == 0)
IDP_Int(idprop)= values[0];
else
memcpy(IDP_Array(idprop), values, sizeof(int)*idprop->len);
}
- else if(prop->arraydimension == 0)
+ else if(prop->arraylength == 0)
RNA_property_boolean_set(ptr, prop, values[0]);
else if(bprop->setarray)
bprop->setarray(ptr, values);
@@ -950,7 +896,7 @@ void RNA_property_boolean_set_array(PointerRNA *ptr, PropertyRNA *prop, const in
IDPropertyTemplate val = {0};
IDProperty *group;
- val.array.len= prop->totarraylength;
+ val.array.len= prop->arraylength;
val.array.type= IDP_INT;
group= RNA_struct_idproperties(ptr, 1);
@@ -964,23 +910,11 @@ void RNA_property_boolean_set_array(PointerRNA *ptr, PropertyRNA *prop, const in
void RNA_property_boolean_set_index(PointerRNA *ptr, PropertyRNA *prop, int index, int value)
{
- int tmp[RNA_MAX_ARRAY_LENGTH];
- int len= rna_ensure_property_array_length(ptr, prop);
-
- if(len <= RNA_MAX_ARRAY_LENGTH) {
- RNA_property_boolean_get_array(ptr, prop, tmp);
- tmp[index]= value;
- RNA_property_boolean_set_array(ptr, prop, tmp);
- }
- else {
- int *tmparray;
+ int tmp[RNA_MAX_ARRAY];
- tmparray= MEM_callocN(sizeof(int)*len, "RNA_property_boolean_get_index");
- RNA_property_boolean_get_array(ptr, prop, tmparray);
- tmparray[index]= value;
- RNA_property_boolean_set_array(ptr, prop, tmparray);
- MEM_freeN(tmparray);
- }
+ RNA_property_boolean_get_array(ptr, prop, tmp);
+ tmp[index]= value;
+ RNA_property_boolean_set_array(ptr, prop, tmp);
}
int RNA_property_int_get(PointerRNA *ptr, PropertyRNA *prop)
@@ -1023,40 +957,27 @@ void RNA_property_int_get_array(PointerRNA *ptr, PropertyRNA *prop, int *values)
IDProperty *idprop;
if((idprop=rna_idproperty_check(&prop, ptr))) {
- if(prop->arraydimension == 0)
+ if(prop->arraylength == 0)
values[0]= RNA_property_int_get(ptr, prop);
else
memcpy(values, IDP_Array(idprop), sizeof(int)*idprop->len);
}
- else if(prop->arraydimension == 0)
+ else if(prop->arraylength == 0)
values[0]= RNA_property_int_get(ptr, prop);
else if(iprop->getarray)
iprop->getarray(ptr, values);
else if(iprop->defaultarray)
- memcpy(values, iprop->defaultarray, sizeof(int)*prop->totarraylength);
+ memcpy(values, iprop->defaultarray, sizeof(int)*prop->arraylength);
else
- memset(values, 0, sizeof(int)*prop->totarraylength);
+ memset(values, 0, sizeof(int)*prop->arraylength);
}
int RNA_property_int_get_index(PointerRNA *ptr, PropertyRNA *prop, int index)
{
- int tmp[RNA_MAX_ARRAY_LENGTH];
- int len= rna_ensure_property_array_length(ptr, prop);
-
- if(len <= RNA_MAX_ARRAY_LENGTH) {
- RNA_property_int_get_array(ptr, prop, tmp);
- return tmp[index];
- }
- else {
- int *tmparray, value;
+ int tmp[RNA_MAX_ARRAY];
- tmparray= MEM_callocN(sizeof(int)*len, "RNA_property_int_get_index");
- RNA_property_int_get_array(ptr, prop, tmparray);
- value= tmparray[index];
- MEM_freeN(tmparray);
-
- return value;
- }
+ RNA_property_int_get_array(ptr, prop, tmp);
+ return tmp[index];
}
void RNA_property_int_set_array(PointerRNA *ptr, PropertyRNA *prop, const int *values)
@@ -1065,12 +986,12 @@ void RNA_property_int_set_array(PointerRNA *ptr, PropertyRNA *prop, const int *v
IDProperty *idprop;
if((idprop=rna_idproperty_check(&prop, ptr))) {
- if(prop->arraydimension == 0)
+ if(prop->arraylength == 0)
IDP_Int(idprop)= values[0];
else
memcpy(IDP_Array(idprop), values, sizeof(int)*idprop->len);\
}
- else if(prop->arraydimension == 0)
+ else if(prop->arraylength == 0)
RNA_property_int_set(ptr, prop, values[0]);
else if(iprop->setarray)
iprop->setarray(ptr, values);
@@ -1078,7 +999,7 @@ void RNA_property_int_set_array(PointerRNA *ptr, PropertyRNA *prop, const int *v
IDPropertyTemplate val = {0};
IDProperty *group;
- val.array.len= prop->totarraylength;
+ val.array.len= prop->arraylength;
val.array.type= IDP_INT;
group= RNA_struct_idproperties(ptr, 1);
@@ -1092,23 +1013,11 @@ void RNA_property_int_set_array(PointerRNA *ptr, PropertyRNA *prop, const int *v
void RNA_property_int_set_index(PointerRNA *ptr, PropertyRNA *prop, int index, int value)
{
- int tmp[RNA_MAX_ARRAY_LENGTH];
- int len= rna_ensure_property_array_length(ptr, prop);
-
- if(len <= RNA_MAX_ARRAY_LENGTH) {
- RNA_property_int_get_array(ptr, prop, tmp);
- tmp[index]= value;
- RNA_property_int_set_array(ptr, prop, tmp);
- }
- else {
- int *tmparray;
+ int tmp[RNA_MAX_ARRAY];
- tmparray= MEM_callocN(sizeof(int)*len, "RNA_property_int_get_index");
- RNA_property_int_get_array(ptr, prop, tmparray);
- tmparray[index]= value;
- RNA_property_int_set_array(ptr, prop, tmparray);
- MEM_freeN(tmparray);
- }
+ RNA_property_int_get_array(ptr, prop, tmp);
+ tmp[index]= value;
+ RNA_property_int_set_array(ptr, prop, tmp);
}
float RNA_property_float_get(PointerRNA *ptr, PropertyRNA *prop)
@@ -1161,7 +1070,7 @@ void RNA_property_float_get_array(PointerRNA *ptr, PropertyRNA *prop, float *val
int i;
if((idprop=rna_idproperty_check(&prop, ptr))) {
- if(prop->arraydimension == 0)
+ if(prop->arraylength == 0)
values[0]= RNA_property_float_get(ptr, prop);
else if(idprop->subtype == IDP_FLOAT) {
memcpy(values, IDP_Array(idprop), sizeof(float)*idprop->len);
@@ -1171,36 +1080,22 @@ void RNA_property_float_get_array(PointerRNA *ptr, PropertyRNA *prop, float *val
values[i]= (float)(((double*)IDP_Array(idprop))[i]);
}
}
- else if(prop->arraydimension == 0)
+ else if(prop->arraylength == 0)
values[0]= RNA_property_float_get(ptr, prop);
else if(fprop->getarray)
fprop->getarray(ptr, values);
else if(fprop->defaultarray)
- memcpy(values, fprop->defaultarray, sizeof(float)*prop->totarraylength);
+ memcpy(values, fprop->defaultarray, sizeof(float)*prop->arraylength);
else
- memset(values, 0, sizeof(float)*prop->totarraylength);
+ memset(values, 0, sizeof(float)*prop->arraylength);
}
float RNA_property_float_get_index(PointerRNA *ptr, PropertyRNA *prop, int index)
{
- float tmp[RNA_MAX_ARRAY_LENGTH];
- int len= rna_ensure_property_array_length(ptr, prop);
-
- if(len <= RNA_MAX_ARRAY_LENGTH) {
- RNA_property_float_get_array(ptr, prop, tmp);
- return tmp[index];
- }
- else {
- float *tmparray, value;
-
- tmparray= MEM_callocN(sizeof(float)*len, "RNA_property_float_get_index");
- RNA_property_float_get_array(ptr, prop, tmparray);
- value= tmparray[index];
- MEM_freeN(tmparray);
-
- return value;
- }
+ float tmp[RNA_MAX_ARRAY];
+ RNA_property_float_get_array(ptr, prop, tmp);
+ return tmp[index];
}
void RNA_property_float_set_array(PointerRNA *ptr, PropertyRNA *prop, const float *values)
@@ -1210,7 +1105,7 @@ void RNA_property_float_set_array(PointerRNA *ptr, PropertyRNA *prop, const floa
int i;
if((idprop=rna_idproperty_check(&prop, ptr))) {
- if(prop->arraydimension == 0)
+ if(prop->arraylength == 0)
IDP_Double(idprop)= values[0];
else if(idprop->subtype == IDP_FLOAT) {
memcpy(IDP_Array(idprop), values, sizeof(float)*idprop->len);
@@ -1220,7 +1115,7 @@ void RNA_property_float_set_array(PointerRNA *ptr, PropertyRNA *prop, const floa
((double*)IDP_Array(idprop))[i]= values[i];
}
}
- else if(prop->arraydimension == 0)
+ else if(prop->arraylength == 0)
RNA_property_float_set(ptr, prop, values[0]);
else if(fprop->setarray) {
fprop->setarray(ptr, values);
@@ -1229,7 +1124,7 @@ void RNA_property_float_set_array(PointerRNA *ptr, PropertyRNA *prop, const floa
IDPropertyTemplate val = {0};
IDProperty *group;
- val.array.len= prop->totarraylength;
+ val.array.len= prop->arraylength;
val.array.type= IDP_FLOAT;
group= RNA_struct_idproperties(ptr, 1);
@@ -1243,23 +1138,11 @@ void RNA_property_float_set_array(PointerRNA *ptr, PropertyRNA *prop, const floa
void RNA_property_float_set_index(PointerRNA *ptr, PropertyRNA *prop, int index, float value)
{
- float tmp[RNA_MAX_ARRAY_LENGTH];
- int len= rna_ensure_property_array_length(ptr, prop);
+ float tmp[RNA_MAX_ARRAY];
- if(len <= RNA_MAX_ARRAY_LENGTH) {
- RNA_property_float_get_array(ptr, prop, tmp);
- tmp[index]= value;
- RNA_property_float_set_array(ptr, prop, tmp);
- }
- else {
- float *tmparray;
-
- tmparray= MEM_callocN(sizeof(float)*len, "RNA_property_float_get_index");
- RNA_property_float_get_array(ptr, prop, tmparray);
- tmparray[index]= value;
- RNA_property_float_set_array(ptr, prop, tmparray);
- MEM_freeN(tmparray);
- }
+ RNA_property_float_get_array(ptr, prop, tmp);
+ tmp[index]= value;
+ RNA_property_float_set_array(ptr, prop, tmp);
}
void RNA_property_string_get(PointerRNA *ptr, PropertyRNA *prop, char *value)
@@ -1801,7 +1684,7 @@ static int rna_raw_access(ReportList *reports, PointerRNA *ptr, PropertyRNA *pro
}
/* check item array */
- itemlen= RNA_property_array_length(&itemptr, itemprop);
+ itemlen= RNA_property_array_length(itemprop);
/* try to access as raw array */
if(RNA_property_collection_raw_array(ptr, prop, itemprop, &out)) {
@@ -1853,7 +1736,7 @@ static int rna_raw_access(ReportList *reports, PointerRNA *ptr, PropertyRNA *pro
iprop= RNA_struct_find_property(&itemptr, propname);
if(iprop) {
- itemlen= RNA_property_array_length(&itemptr, iprop);
+ itemlen= RNA_property_array_length(iprop);
itemtype= RNA_property_type(iprop);
}
else {
@@ -2748,7 +2631,7 @@ int RNA_property_is_set(PointerRNA *ptr, const char *name)
return (rna_idproperty_find(ptr, name) != NULL);
}
else {
- // printf("RNA_property_is_set: %s.%s not found.\n", ptr->type->identifier, name);
+ printf("RNA_property_is_set: %s.%s not found.\n", ptr->type->identifier, name);
return 0;
}
}
@@ -2792,7 +2675,7 @@ char *RNA_pointer_as_string(PointerRNA *ptr)
char *RNA_property_as_string(bContext *C, PointerRNA *ptr, PropertyRNA *prop)
{
int type = RNA_property_type(prop);
- int len = RNA_property_array_length(ptr, prop);
+ int len = RNA_property_array_length(prop);
int i;
DynStr *dynstr= BLI_dynstr_new();
@@ -2981,15 +2864,15 @@ ParameterList *RNA_parameter_list_create(ParameterList *parms, PointerRNA *ptr,
if(!(parm->flag & PROP_REQUIRED)) {
switch(parm->type) {
case PROP_BOOLEAN:
- if(parm->arraydimension) memcpy(data, &((BooleanPropertyRNA*)parm)->defaultarray, size);
+ if(parm->arraylength) memcpy(data, &((BooleanPropertyRNA*)parm)->defaultarray, size);
else memcpy(data, &((BooleanPropertyRNA*)parm)->defaultvalue, size);
break;
case PROP_INT:
- if(parm->arraydimension) memcpy(data, &((IntPropertyRNA*)parm)->defaultarray, size);
+ if(parm->arraylength) memcpy(data, &((IntPropertyRNA*)parm)->defaultarray, size);
else memcpy(data, &((IntPropertyRNA*)parm)->defaultvalue, size);
break;
case PROP_FLOAT:
- if(parm->arraydimension) memcpy(data, &((FloatPropertyRNA*)parm)->defaultarray, size);
+ if(parm->arraylength) memcpy(data, &((FloatPropertyRNA*)parm)->defaultarray, size);
else memcpy(data, &((FloatPropertyRNA*)parm)->defaultvalue, size);
break;
case PROP_ENUM:
@@ -3020,13 +2903,15 @@ void RNA_parameter_list_free(ParameterList *parms)
parm= parms->func->cont.properties.first;
for(tot= 0; parm; parm= parm->next) {
- if(parm->type == PROP_COLLECTION)
+ if(parm->type == PROP_COLLECTION) {
BLI_freelistN((ListBase*)((char*)parms->data+tot));
- else if (parm->flag & PROP_DYNAMIC) {
+ }
+ else if(parm == parms->func->ret) {
/* for dynamic arrays and strings, data is a pointer to an array */
- char *array= *(char**)((char*)parms->data+tot);
- if(array)
- MEM_freeN(array);
+ char *ptr= *(char**)((char*)parms->data+tot);
+ if((parm->flag & PROP_DYNAMIC_ARRAY || parm->type == PROP_STRING) && ptr) {
+ MEM_freeN(ptr);
+ }
}
tot+= rna_parameter_size(parm);
@@ -3400,7 +3285,7 @@ int RNA_function_call_direct_va(bContext *C, ReportList *reports, PointerRNA *pt
type= RNA_property_type(parm);
ftype= format[ofs++];
- len= RNA_property_array_length(&funcptr, parm);
+ len= RNA_property_array_length(parm);
alen= rna_function_format_array_length(format, ofs, flen);
if (len!=alen) {
@@ -3465,7 +3350,7 @@ int RNA_function_call_direct_va(bContext *C, ReportList *reports, PointerRNA *pt
type= RNA_property_type(parm);
ftype= format[ofs++];
- len= RNA_property_array_length(&funcptr, parm);
+ len= RNA_property_array_length(parm);
alen= rna_function_format_array_length(format, ofs, flen);
if (len!=alen) {
diff --git a/source/blender/makesrna/intern/rna_action.c b/source/blender/makesrna/intern/rna_action.c
index 363cff0c01e..bc59e06a978 100644
--- a/source/blender/makesrna/intern/rna_action.c
+++ b/source/blender/makesrna/intern/rna_action.c
@@ -42,15 +42,15 @@ void rna_def_action_group(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
-
+
srna= RNA_def_struct(brna, "ActionGroup", NULL);
RNA_def_struct_sdna(srna, "bActionGroup");
RNA_def_struct_ui_text(srna, "Action Group", "Groups of F-Curves.");
-
+
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_ui_text(prop, "Name", "");
RNA_def_struct_name_property(srna, prop);
-
+
/* dna warns not to treat the Action Channel listbase in the Action Group struct like a
normal listbase. I'll leave this here but comment out, for Joshua to review. He can
probably shed some more light on why this is */
@@ -58,19 +58,19 @@ void rna_def_action_group(BlenderRNA *brna)
RNA_def_property_collection_sdna(prop, NULL, "channels", NULL);
RNA_def_property_struct_type(prop, "FCurve");
RNA_def_property_ui_text(prop, "Channels", "F-Curves in this group.");*/
-
+
prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", AGRP_SELECTED);
RNA_def_property_ui_text(prop, "Selected", "Action Group is selected.");
-
+
prop= RNA_def_property(srna, "locked", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", AGRP_PROTECTED);
RNA_def_property_ui_text(prop, "Locked", "Action Group is locked.");
-
+
prop= RNA_def_property(srna, "expanded", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", AGRP_EXPANDED);
RNA_def_property_ui_text(prop, "Expanded", "Action Group is expanded.");
-
+
prop= RNA_def_property(srna, "custom_color", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "customCol");
RNA_def_property_ui_text(prop, "Custom Color", "Index of custom color set.");
@@ -85,17 +85,17 @@ void rna_def_action(BlenderRNA *brna)
RNA_def_struct_sdna(srna, "bAction");
RNA_def_struct_ui_text(srna, "Action", "A collection of F-Curves for animation.");
RNA_def_struct_ui_icon(srna, ICON_ACTION);
-
+
prop= RNA_def_property(srna, "fcurves", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "curves", NULL);
RNA_def_property_struct_type(prop, "FCurve");
RNA_def_property_ui_text(prop, "F-Curves", "The individual F-Curves that make up the Action.");
-
+
prop= RNA_def_property(srna, "groups", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "groups", NULL);
RNA_def_property_struct_type(prop, "ActionGroup");
RNA_def_property_ui_text(prop, "Groups", "Convenient groupings of F-Curves.");
-
+
prop= RNA_def_property(srna, "pose_markers", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "markers", NULL);
RNA_def_property_struct_type(prop, "TimelineMarker");
diff --git a/source/blender/makesrna/intern/rna_action_api.c b/source/blender/makesrna/intern/rna_action_api.c
index 35c6c921104..11efa6d5f8a 100644
--- a/source/blender/makesrna/intern/rna_action_api.c
+++ b/source/blender/makesrna/intern/rna_action_api.c
@@ -1,6 +1,4 @@
/**
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -43,8 +41,6 @@
#include "DNA_anim_types.h"
#include "DNA_curve_types.h"
-/* TODO bring back once array return types are allowed */
-#if 0
/* return frame range of all curves (min, max) or (0, 1) if there are no keys */
int *rna_Action_get_frame_range(bAction *act, int *ret_length)
{
@@ -61,7 +57,6 @@ int *rna_Action_get_frame_range(bAction *act, int *ret_length)
return ret;
}
-#endif
#else
@@ -70,13 +65,11 @@ void RNA_api_action(StructRNA *srna)
FunctionRNA *func;
PropertyRNA *parm;
-#if 0
func= RNA_def_function(srna, "get_frame_range", "rna_Action_get_frame_range");
RNA_def_function_ui_description(func, "Get action frame range as a (min, max) tuple.");
parm= RNA_def_int_array(func, "frame_range", 1, NULL, 0, 0, "", "Action frame range.", 0, 0);
- RNA_def_property_flag(parm, PROP_DYNAMIC);
+ RNA_def_property_flag(parm, PROP_DYNAMIC_ARRAY);
RNA_def_function_return(func, parm);
-#endif
}
#endif
diff --git a/source/blender/makesrna/intern/rna_animation.c b/source/blender/makesrna/intern/rna_animation.c
index e4bea893992..e334e2b5e90 100644
--- a/source/blender/makesrna/intern/rna_animation.c
+++ b/source/blender/makesrna/intern/rna_animation.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
- * Contributor(s): Blender Foundation (2009), Joshua Leung
+ * Contributor(s): Blender Foundation (2008), Roland Hess
*
* ***** END GPL LICENSE BLOCK *****
*/
@@ -36,14 +36,6 @@
#include "MEM_guardedalloc.h"
-/* exported for use in API */
-EnumPropertyItem keyingset_path_grouping_items[] = {
- {KSP_GROUP_NAMED, "NAMED", 0, "Named Group", ""},
- {KSP_GROUP_NONE, "NONE", 0, "None", ""},
- {KSP_GROUP_KSNAME, "KEYINGSET", 0, "Keying Set Name", ""},
- {KSP_GROUP_TEMPLATE_ITEM, "TEMPLATE", 0, "Innermost Context-Item Name", ""},
- {0, NULL, 0, NULL, NULL}};
-
#ifdef RNA_RUNTIME
static int rna_AnimData_action_editable(PointerRNA *ptr)
@@ -98,6 +90,13 @@ void rna_def_keyingset_path(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
+ static EnumPropertyItem prop_mode_grouping_items[] = {
+ {KSP_GROUP_NAMED, "NAMED", 0, "Named Group", ""},
+ {KSP_GROUP_NONE, "NONE", 0, "None", ""},
+ {KSP_GROUP_KSNAME, "KEYINGSET", 0, "Keying Set Name", ""},
+ {KSP_GROUP_TEMPLATE_ITEM, "TEMPLATE", 0, "Innermost Context-Item Name", ""},
+ {0, NULL, 0, NULL, NULL}};
+
srna= RNA_def_struct(brna, "KeyingSetPath", NULL);
RNA_def_struct_sdna(srna, "KS_Path");
RNA_def_struct_ui_text(srna, "Keying Set Path", "Path to a setting for use in a Keying Set.");
@@ -113,7 +112,7 @@ void rna_def_keyingset_path(BlenderRNA *brna)
/* Grouping */
prop= RNA_def_property(srna, "grouping", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "groupmode");
- RNA_def_property_enum_items(prop, keyingset_path_grouping_items);
+ RNA_def_property_enum_items(prop, prop_mode_grouping_items);
RNA_def_property_ui_text(prop, "Grouping Method", "Method used to define which Group-name to use.");
/* Path + Array Index */
@@ -157,6 +156,7 @@ void rna_def_keyingset(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "flag", KEYINGSET_BUILTIN);
RNA_def_property_ui_text(prop, "Built-In", "Keying Set is a built-in to Blender.");
+ /* TODO: for now, this is editable, but do we really want this to happen? */
prop= RNA_def_property(srna, "absolute", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", KEYINGSET_ABSOLUTE);
RNA_def_property_ui_text(prop, "Absolute", "Keying Set defines specific paths/settings to be keyframed (i.e. is not reliant on context info)");
@@ -170,8 +170,7 @@ void rna_def_keyingset(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "keyingflag", INSERTKEY_MATRIX);
RNA_def_property_ui_text(prop, "Insert Keyframes - Visual", "Insert keyframes based on 'visual transforms'.");
- /* Keying Set API */
- RNA_api_keyingset(srna);
+
}
/* --- */
diff --git a/source/blender/makesrna/intern/rna_animation_api.c b/source/blender/makesrna/intern/rna_animation_api.c
deleted file mode 100644
index 7764c394e87..00000000000
--- a/source/blender/makesrna/intern/rna_animation_api.c
+++ /dev/null
@@ -1,89 +0,0 @@
-/**
- * $Id$
- *
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * The Original Code is Copyright (C) 2009 Blender Foundation.
- * All rights reserved.
- *
- *
- * Contributor(s): Joshua Leung
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-#include <stdlib.h>
-#include <stdio.h>
-
-#include "RNA_define.h"
-#include "RNA_enum_types.h"
-#include "RNA_types.h"
-
-#include "DNA_anim_types.h"
-#include "DNA_object_types.h"
-#include "DNA_scene_types.h"
-
-#ifdef RNA_RUNTIME
-
-#include "BKE_animsys.h"
-
-static void rna_KeyingSet_add_destination(KeyingSet *keyingset, ReportList *reports,
- ID *id, char rna_path[], int array_index, int entire_array,
- int grouping_method, char group_name[])
-{
- short flag = 0;
-
- /* validate flags */
- if (entire_array)
- flag |= KSP_FLAG_WHOLE_ARRAY;
-
- /* if data is valid, call the API function for this */
- if (keyingset) {
- BKE_keyingset_add_destination(keyingset, id, group_name, rna_path, array_index, flag, grouping_method);
- }
- else {
- BKE_report(reports, RPT_ERROR, "Keying Set Destination could not be added.");
- }
-}
-
-#else
-
-void RNA_api_keyingset(StructRNA *srna)
-{
- FunctionRNA *func;
- PropertyRNA *parm;
-
- /* Add Destination */
- func= RNA_def_function(srna, "add_destination", "rna_KeyingSet_add_destination");
- RNA_def_function_ui_description(func, "Add a new destination for the Keying Set.");
- RNA_def_function_flag(func, FUNC_USE_REPORTS);
- /* ID-block for target */
- parm= RNA_def_pointer(func, "target_id", "ID", "Target ID", "ID-Datablock for the destination.");
- RNA_def_property_flag(parm, PROP_REQUIRED);
- /* rna-path */
- parm= RNA_def_string(func, "rna_path", "", 256, "RNA-Path", "RNA-Path to destination property."); // xxx hopefully this is long enough
- RNA_def_property_flag(parm, PROP_REQUIRED);
- parm=RNA_def_int(func, "array_index", 0, 0, INT_MAX, "Array Index", "If applicable, the index ", 0, INT_MAX);
- /* flags */
- parm=RNA_def_boolean(func, "entire_array", 1, "Entire Array", "When an 'array/vector' type is chosen (Location, Rotation, Color, etc.), entire array is to be used.");
- /* grouping */
- parm=RNA_def_enum(func, "grouping_method", keyingset_path_grouping_items, KSP_GROUP_KSNAME, "Grouping Method", "Method used to define which Group-name to use.");
- parm=RNA_def_string(func, "group_name", "", 64, "Group Name", "Name of Action Group to assign destination to (only if grouping mode is to use this name).");
-}
-
-#endif
-
diff --git a/source/blender/makesrna/intern/rna_armature.c b/source/blender/makesrna/intern/rna_armature.c
index a2124b4067d..7bc09b052ee 100644
--- a/source/blender/makesrna/intern/rna_armature.c
+++ b/source/blender/makesrna/intern/rna_armature.c
@@ -48,17 +48,29 @@
static void rna_Armature_update_data(bContext *C, PointerRNA *ptr)
{
+ Main *bmain= CTX_data_main(C);
+ Scene *scene= CTX_data_scene(C);
ID *id= ptr->id.data;
+ Object *ob;
- DAG_id_flush_update(id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, id);
+ for(ob=bmain->object.first; ob; ob= ob->id.next) {
+ if(ob->data == id) {
+ /* XXX this will loop over all objects again (slow) */
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob);
+ }
+ }
}
static void rna_Armature_redraw_data(bContext *C, PointerRNA *ptr)
{
+ Main *bmain= CTX_data_main(C);
ID *id= ptr->id.data;
+ Object *ob;
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, id);
+ for(ob=bmain->object.first; ob; ob= ob->id.next)
+ if(ob->data == id)
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob);
}
static void rna_bone_layer_set(short *layer, const int *values)
@@ -325,7 +337,7 @@ static void rna_def_bone_common(StructRNA *srna, int editbone)
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
/* flags */
- prop= RNA_def_property(srna, "layer", PROP_BOOLEAN, PROP_LAYER_MEMBER);
+ prop= RNA_def_property(srna, "layer", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "layer", 1);
RNA_def_property_array(prop, 16);
if(editbone) RNA_def_property_boolean_funcs(prop, "rna_EditBone_layer_get", "rna_EditBone_layer_set");
@@ -600,7 +612,7 @@ void rna_def_armature(BlenderRNA *brna)
/* Boolean values */
/* layer */
- prop= RNA_def_property(srna, "layer", PROP_BOOLEAN, PROP_LAYER_MEMBER);
+ prop= RNA_def_property(srna, "layer", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "layer", 1);
RNA_def_property_array(prop, 16);
RNA_def_property_ui_text(prop, "Visible Layers", "Armature layer visibility.");
@@ -609,7 +621,7 @@ void rna_def_armature(BlenderRNA *brna)
RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);
/* layer protection */
- prop= RNA_def_property(srna, "layer_protection", PROP_BOOLEAN, PROP_LAYER);
+ prop= RNA_def_property(srna, "layer_protection", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "layer_protected", 1);
RNA_def_property_array(prop, 16);
RNA_def_property_ui_text(prop, "Layer Proxy Protection", "Protected layers in Proxy Instances are restored to Proxy settings on file reload and undo.");
diff --git a/source/blender/makesrna/intern/rna_boid.c b/source/blender/makesrna/intern/rna_boid.c
index 8002aa89313..0c5565e253a 100644
--- a/source/blender/makesrna/intern/rna_boid.c
+++ b/source/blender/makesrna/intern/rna_boid.c
@@ -41,7 +41,6 @@
#include "DNA_object_types.h"
#include "DNA_particle_types.h"
-#include "WM_api.h"
#include "WM_types.h"
EnumPropertyItem boidrule_type_items[] ={
@@ -83,15 +82,14 @@ static void rna_Boids_reset(bContext *C, PointerRNA *ptr)
psys->recalc = PSYS_RECALC_RESET;
- if(ob)
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ if(ob) {
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ }
}
else {
part = ptr->id.data;
psys_flush_particle_settings(scene, part, PSYS_RECALC_RESET);
}
-
- WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_DATA, NULL);
}
static void rna_Boids_reset_deps(bContext *C, PointerRNA *ptr)
{
@@ -104,16 +102,15 @@ static void rna_Boids_reset_deps(bContext *C, PointerRNA *ptr)
psys->recalc = PSYS_RECALC_RESET;
- if(ob)
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ if(ob) {
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ }
}
else {
part = ptr->id.data;
psys_flush_particle_settings(scene, part, PSYS_RECALC_RESET);
DAG_scene_sort(scene);
}
-
- WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_DATA, NULL);
}
static StructRNA* rna_BoidRule_refine(struct PointerRNA *ptr)
@@ -250,12 +247,12 @@ static void rna_def_boidrule_goal(BlenderRNA *brna)
RNA_def_property_pointer_sdna(prop, NULL, "ob");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Object", "Goal object.");
- RNA_def_property_update(prop, 0, "rna_Boids_reset_deps");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset_deps");
prop= RNA_def_property(srna, "predict", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "options", BRULE_GOAL_AVOID_PREDICT);
RNA_def_property_ui_text(prop, "Predict", "Predict target movement.");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
}
static void rna_def_boidrule_avoid(BlenderRNA *brna)
@@ -271,17 +268,17 @@ static void rna_def_boidrule_avoid(BlenderRNA *brna)
RNA_def_property_pointer_sdna(prop, NULL, "ob");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Object", "Object to avoid.");
- RNA_def_property_update(prop, 0, "rna_Boids_reset_deps");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset_deps");
prop= RNA_def_property(srna, "predict", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "options", BRULE_GOAL_AVOID_PREDICT);
RNA_def_property_ui_text(prop, "Predict", "Predict target movement.");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
prop= RNA_def_property(srna, "fear_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 100.0f);
RNA_def_property_ui_text(prop, "Fear factor", "Avoid object if danger from it is above this threshol.");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
}
static void rna_def_boidrule_avoid_collision(BlenderRNA *brna)
@@ -295,17 +292,17 @@ static void rna_def_boidrule_avoid_collision(BlenderRNA *brna)
prop= RNA_def_property(srna, "boids", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "options", BRULE_ACOLL_WITH_BOIDS);
RNA_def_property_ui_text(prop, "Boids", "Avoid collision with other boids.");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
prop= RNA_def_property(srna, "deflectors", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "options", BRULE_ACOLL_WITH_DEFLECTORS);
RNA_def_property_ui_text(prop, "Deflectors", "Avoid collision with deflector objects.");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
prop= RNA_def_property(srna, "look_ahead", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 100.0f);
RNA_def_property_ui_text(prop, "Look ahead", "Time to look ahead in seconds.");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
}
static void rna_def_boidrule_follow_leader(BlenderRNA *brna)
@@ -320,22 +317,22 @@ static void rna_def_boidrule_follow_leader(BlenderRNA *brna)
RNA_def_property_pointer_sdna(prop, NULL, "ob");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Object", "Follow this object instead of a boid.");
- RNA_def_property_update(prop, 0, "rna_Boids_reset_deps");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset_deps");
prop= RNA_def_property(srna, "distance", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 100.0f);
RNA_def_property_ui_text(prop, "Distance", "Distance behind leader to follow.");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
prop= RNA_def_property(srna, "queue_size", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 100.0f);
RNA_def_property_ui_text(prop, "Queue Size", "How many boids in a line.");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
prop= RNA_def_property(srna, "line", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "options", BRULE_LEADER_IN_LINE);
RNA_def_property_ui_text(prop, "Line", "Follow leader in a line.");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
}
static void rna_def_boidrule_average_speed(BlenderRNA *brna)
@@ -349,17 +346,17 @@ static void rna_def_boidrule_average_speed(BlenderRNA *brna)
prop= RNA_def_property(srna, "wander", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Wander", "How fast velocity's direction is randomized.");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
prop= RNA_def_property(srna, "level", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Level", "How much velocity's z-component is kept constant.");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
prop= RNA_def_property(srna, "speed", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Speed", "Percentage of maximum speed.");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
}
static void rna_def_boidrule_fight(BlenderRNA *brna)
@@ -373,12 +370,12 @@ static void rna_def_boidrule_fight(BlenderRNA *brna)
prop= RNA_def_property(srna, "distance", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 100.0f);
RNA_def_property_ui_text(prop, "Fight Distance", "Attack boids at max this distance.");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
prop= RNA_def_property(srna, "flee_distance", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 100.0f);
RNA_def_property_ui_text(prop, "Flee Distance", "Flee to this distance.");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
}
static void rna_def_boidrule(BlenderRNA *brna)
@@ -408,12 +405,12 @@ static void rna_def_boidrule(BlenderRNA *brna)
prop= RNA_def_property(srna, "in_air", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BOIDRULE_IN_AIR);
RNA_def_property_ui_text(prop, "In Air", "Use rule when boid is flying.");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
prop= RNA_def_property(srna, "on_land", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BOIDRULE_ON_LAND);
RNA_def_property_ui_text(prop, "On Land", "Use rule when boid is on land.");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
//prop= RNA_def_property(srna, "expanded", PROP_BOOLEAN, PROP_NONE);
//RNA_def_property_boolean_sdna(prop, NULL, "mode", eModifierMode_Expanded);
@@ -460,17 +457,17 @@ static void rna_def_boidstate(BlenderRNA *brna)
prop= RNA_def_property(srna, "rule_fuzziness", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_ui_text(prop, "Rule Fuzzines", "");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
prop= RNA_def_property(srna, "volume", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 100.0);
RNA_def_property_ui_text(prop, "Volume", "");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
prop= RNA_def_property(srna, "falloff", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 10.0);
RNA_def_property_ui_text(prop, "Falloff", "");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
}
static void rna_def_boid_settings(BlenderRNA *brna)
{
@@ -483,17 +480,17 @@ static void rna_def_boid_settings(BlenderRNA *brna)
prop= RNA_def_property(srna, "landing_smoothness", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 10.0);
RNA_def_property_ui_text(prop, "Landing Smoothness", "How smoothly the boids land.");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
prop= RNA_def_property(srna, "banking", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 2.0);
RNA_def_property_ui_text(prop, "Banking", "Amount of rotation around velocity vector on turns.");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
prop= RNA_def_property(srna, "height", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 2.0);
RNA_def_property_ui_text(prop, "Height", "Boid height relative to particle size.");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
/* states */
prop= RNA_def_property(srna, "states", PROP_COLLECTION, PROP_NONE);
@@ -513,99 +510,99 @@ static void rna_def_boid_settings(BlenderRNA *brna)
prop= RNA_def_property(srna, "health", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 100.0);
RNA_def_property_ui_text(prop, "Health", "Initial boid health when born.");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
prop= RNA_def_property(srna, "strength", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 100.0);
RNA_def_property_ui_text(prop, "Strength", "Maximum caused damage on attack per second.");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
prop= RNA_def_property(srna, "aggression", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 100.0);
RNA_def_property_ui_text(prop, "Aggression", "Boid will fight this times stronger enemy.");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
prop= RNA_def_property(srna, "accuracy", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_ui_text(prop, "Accuracy", "Accuracy of attack.");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
prop= RNA_def_property(srna, "range", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 100.0);
RNA_def_property_ui_text(prop, "Range", "The maximum distance from which a boid can attack.");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
/* physical properties */
prop= RNA_def_property(srna, "air_min_speed", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_ui_text(prop, "Min Air Speed", "Minimum speed in air (relative to maximum speed).");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
prop= RNA_def_property(srna, "air_max_speed", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 100.0);
RNA_def_property_ui_text(prop, "Max Air Speed", "Maximum speed in air.");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
prop= RNA_def_property(srna, "air_max_acc", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_ui_text(prop, "Max Air Acceleration", "Maximum acceleration in air (relative to maximum speed).");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
prop= RNA_def_property(srna, "air_max_ave", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_ui_text(prop, "Max Air Angular Velocity", "Maximum angular velocity in air (relative to 180 degrees).");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
prop= RNA_def_property(srna, "air_personal_space", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 10.0);
RNA_def_property_ui_text(prop, "Air Personal Space", "Radius of boids personal space in air (% of particle size).");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
prop= RNA_def_property(srna, "land_jump_speed", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 100.0);
RNA_def_property_ui_text(prop, "Jump Speed", "Maximum speed for jumping.");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
prop= RNA_def_property(srna, "land_max_speed", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 100.0);
RNA_def_property_ui_text(prop, "Max Land Speed", "Maximum speed on land.");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
prop= RNA_def_property(srna, "land_max_acc", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_ui_text(prop, "Max Land Acceleration", "Maximum acceleration on land (relative to maximum speed).");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
prop= RNA_def_property(srna, "land_max_ave", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_ui_text(prop, "Max Land Angular Velocity", "Maximum angular velocity on land (relative to 180 degrees).");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
prop= RNA_def_property(srna, "land_personal_space", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 10.0);
RNA_def_property_ui_text(prop, "Land Personal Space", "Radius of boids personal space on land (% of particle size).");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
prop= RNA_def_property(srna, "land_stick_force", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 1000.0);
RNA_def_property_ui_text(prop, "Land Stick Force", "How strong a force must be to start effecting a boid on land.");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
/* options */
prop= RNA_def_property(srna, "allow_flight", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "options", BOID_ALLOW_FLIGHT);
RNA_def_property_ui_text(prop, "Allow Flight", "Allow boids to move in air.");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
prop= RNA_def_property(srna, "allow_land", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "options", BOID_ALLOW_LAND);
RNA_def_property_ui_text(prop, "Allow Land", "Allow boids to move on land.");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
prop= RNA_def_property(srna, "allow_climb", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "options", BOID_ALLOW_CLIMB);
RNA_def_property_ui_text(prop, "Allow Climbing", "Allow boids to climb goal objects.");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
}
void RNA_def_boid(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c
index 448a2046855..03b5a44f52b 100644
--- a/source/blender/makesrna/intern/rna_brush.c
+++ b/source/blender/makesrna/intern/rna_brush.c
@@ -32,8 +32,6 @@
#include "DNA_brush_types.h"
#include "DNA_texture_types.h"
-#include "IMB_imbuf.h"
-
EnumPropertyItem brush_sculpt_tool_items[] = {
{SCULPT_TOOL_DRAW, "DRAW", 0, "Draw", ""},
{SCULPT_TOOL_SMOOTH, "SMOOTH", 0, "Smooth", ""},
@@ -95,14 +93,14 @@ void rna_def_brush(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem prop_blend_items[] = {
- {IMB_BLEND_MIX, "MIX", 0, "Mix", "Use mix blending mode while painting."},
- {IMB_BLEND_ADD, "ADD", 0, "Add", "Use add blending mode while painting."},
- {IMB_BLEND_SUB, "SUB", 0, "Subtract", "Use subtract blending mode while painting."},
- {IMB_BLEND_MUL, "MUL", 0, "Multiply", "Use multiply blending mode while painting."},
- {IMB_BLEND_LIGHTEN, "LIGHTEN", 0, "Lighten", "Use lighten blending mode while painting."},
- {IMB_BLEND_DARKEN, "DARKEN", 0, "Darken", "Use darken blending mode while painting."},
- {IMB_BLEND_ERASE_ALPHA, "ERASE_ALPHA", 0, "Erase Alpha", "Erase alpha while painting."},
- {IMB_BLEND_ADD_ALPHA, "ADD_ALPHA", 0, "Add Alpha", "Add alpha while painting."},
+ {BRUSH_BLEND_MIX, "MIX", 0, "Mix", "Use mix blending mode while painting."},
+ {BRUSH_BLEND_ADD, "ADD", 0, "Add", "Use add blending mode while painting."},
+ {BRUSH_BLEND_SUB, "SUB", 0, "Subtract", "Use subtract blending mode while painting."},
+ {BRUSH_BLEND_MUL, "MUL", 0, "Multiply", "Use multiply blending mode while painting."},
+ {BRUSH_BLEND_LIGHTEN, "LIGHTEN", 0, "Lighten", "Use lighten blending mode while painting."},
+ {BRUSH_BLEND_DARKEN, "DARKEN", 0, "Darken", "Use darken blending mode while painting."},
+ {BRUSH_BLEND_ERASE_ALPHA, "ERASE_ALPHA", 0, "Erase Alpha", "Erase alpha while painting."},
+ {BRUSH_BLEND_ADD_ALPHA, "ADD_ALPHA", 0, "Add Alpha", "Add alpha while painting."},
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "Brush", "ID");
@@ -166,22 +164,18 @@ void rna_def_brush(BlenderRNA *brna)
prop= RNA_def_property(srna, "strength_pressure", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_ALPHA_PRESSURE);
- RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0);
RNA_def_property_ui_text(prop, "Strength Pressure", "Enable tablet pressure sensitivity for strength.");
prop= RNA_def_property(srna, "size_pressure", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_SIZE_PRESSURE);
- RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0);
RNA_def_property_ui_text(prop, "Size Pressure", "Enable tablet pressure sensitivity for size.");
prop= RNA_def_property(srna, "falloff_pressure", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_RAD_PRESSURE);
- RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0);
RNA_def_property_ui_text(prop, "Falloff Pressure", "Enable tablet pressure sensitivity for falloff.");
prop= RNA_def_property(srna, "spacing_pressure", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_SPACING_PRESSURE);
- RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0);
RNA_def_property_ui_text(prop, "Spacing Pressure", "Enable tablet pressure sensitivity for spacing.");
prop= RNA_def_property(srna, "rake", PROP_BOOLEAN, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_cloth.c b/source/blender/makesrna/intern/rna_cloth.c
index 38086502d6f..9096bfc2844 100644
--- a/source/blender/makesrna/intern/rna_cloth.c
+++ b/source/blender/makesrna/intern/rna_cloth.c
@@ -37,7 +37,6 @@
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
-#include "WM_api.h"
#include "WM_types.h"
#ifdef RNA_RUNTIME
@@ -47,10 +46,10 @@
static void rna_cloth_update(bContext *C, PointerRNA *ptr)
{
- Object *ob= (Object*)ptr->id.data;
+ Scene *scene = CTX_data_scene(C);
+ Object *ob = ptr->id.data;
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
}
static void rna_ClothSettings_max_bend_set(struct PointerRNA *ptr, float value)
@@ -181,50 +180,50 @@ static void rna_def_cloth_sim_settings(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "mingoal");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Goal Minimum", "Goal minimum, vertex group weights are scaled to match this range.");
- RNA_def_property_update(prop, 0, "rna_cloth_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
prop= RNA_def_property(srna, "goal_max", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "maxgoal");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Goal Maximum", "Goal maximum, vertex group weights are scaled to match this range.");
- RNA_def_property_update(prop, 0, "rna_cloth_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
prop= RNA_def_property(srna, "goal_default", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "defgoal");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Goal Default", "Default Goal (vertex target position) value, when no Vertex Group used.");
- RNA_def_property_update(prop, 0, "rna_cloth_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
prop= RNA_def_property(srna, "goal_spring", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "goalspring");
RNA_def_property_range(prop, 0.0f, 0.999f);
RNA_def_property_ui_text(prop, "Goal Stiffness", "Goal (vertex target position) spring stiffness.");
- RNA_def_property_update(prop, 0, "rna_cloth_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
prop= RNA_def_property(srna, "goal_friction", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "goalfrict");
RNA_def_property_range(prop, 0.0f, 50.0f);
RNA_def_property_ui_text(prop, "Goal Damping", "Goal (vertex target position) friction.");
- RNA_def_property_update(prop, 0, "rna_cloth_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
/* mass */
prop= RNA_def_property(srna, "mass", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_text(prop, "Mass", "Mass of cloth material.");
- RNA_def_property_update(prop, 0, "rna_cloth_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
prop= RNA_def_property(srna, "mass_vertex_group", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_ClothSettings_mass_vgroup_get", "rna_ClothSettings_mass_vgroup_length", "rna_ClothSettings_mass_vgroup_set");
RNA_def_property_ui_text(prop, "Mass Vertex Group", "Vertex Group for pinning of vertices.");
- RNA_def_property_update(prop, 0, "rna_cloth_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
prop= RNA_def_property(srna, "gravity", PROP_FLOAT, PROP_ACCELERATION);
RNA_def_property_array(prop, 3);
RNA_def_property_range(prop, -100.0, 100.0);
RNA_def_property_float_funcs(prop, "rna_ClothSettings_gravity_get", "rna_ClothSettings_gravity_set", NULL);
RNA_def_property_ui_text(prop, "Gravity", "Gravity or external force vector.");
- RNA_def_property_update(prop, 0, "rna_cloth_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
/* various */
@@ -232,73 +231,73 @@ static void rna_def_cloth_sim_settings(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "Cvi");
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_text(prop, "Air Damping", "Air has normally some thickness which slows falling things down.");
- RNA_def_property_update(prop, 0, "rna_cloth_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
prop= RNA_def_property(srna, "pin_cloth", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", CLOTH_SIMSETTINGS_FLAG_GOAL);
RNA_def_property_ui_text(prop, "Pin Cloth", "Enable pinning of cloth vertices to other objects/positions.");
- RNA_def_property_update(prop, 0, "rna_cloth_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
prop= RNA_def_property(srna, "pin_stiffness", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "goalspring");
RNA_def_property_range(prop, 0.0f, 50.0);
RNA_def_property_ui_text(prop, "Pin Stiffness", "Pin (vertex target position) spring stiffness.");
- RNA_def_property_update(prop, 0, "rna_cloth_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
prop= RNA_def_property(srna, "quality", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "stepsPerFrame");
RNA_def_property_range(prop, 4, 80);
RNA_def_property_ui_text(prop, "Quality", "Quality of the simulation in steps per frame. (higher is better quality but slower)");
- RNA_def_property_update(prop, 0, "rna_cloth_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
/* springs */
prop= RNA_def_property(srna, "stiffness_scaling", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", CLOTH_SIMSETTINGS_FLAG_SCALING);
RNA_def_property_ui_text(prop, "Stiffness Scaling", "If enabled, stiffness can be scaled along a weight painted vertex group.");
- RNA_def_property_update(prop, 0, "rna_cloth_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
prop= RNA_def_property(srna, "spring_damping", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "Cdis");
RNA_def_property_range(prop, 0.0f, 50.0f);
RNA_def_property_ui_text(prop, "Spring Damping", "Damping of cloth velocity. (higher = more smooth, less jiggling)");
- RNA_def_property_update(prop, 0, "rna_cloth_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
prop= RNA_def_property(srna, "structural_stiffness", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "structural");
RNA_def_property_range(prop, 1.0f, 10000.0f);
RNA_def_property_ui_text(prop, "Structural Stiffness", "Overall stiffness of structure.");
- RNA_def_property_update(prop, 0, "rna_cloth_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
prop= RNA_def_property(srna, "structural_stiffness_max", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "max_struct");
RNA_def_property_range(prop, 0.0f, 10000.0f);
RNA_def_property_float_funcs(prop, NULL, "rna_ClothSettings_max_struct_set", NULL);
RNA_def_property_ui_text(prop, "Structural Stiffness Maximum", "Maximum structural stiffness value.");
- RNA_def_property_update(prop, 0, "rna_cloth_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
prop= RNA_def_property(srna, "structural_stiffness_vertex_group", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_ClothSettings_struct_vgroup_get", "rna_ClothSettings_struct_vgroup_length", "rna_ClothSettings_struct_vgroup_set");
RNA_def_property_ui_text(prop, "Structural Stiffness Vertex Group", "Vertex group for fine control over structural stiffness.");
- RNA_def_property_update(prop, 0, "rna_cloth_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
prop= RNA_def_property(srna, "bending_stiffness", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "bending");
RNA_def_property_range(prop, 0.0f, 10000.0f);
RNA_def_property_ui_text(prop, "Bending Stiffness", "Wrinkle coefficient. (higher = less smaller but more big wrinkles)");
- RNA_def_property_update(prop, 0, "rna_cloth_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
prop= RNA_def_property(srna, "bending_stiffness_max", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "max_bend");
RNA_def_property_range(prop, 0.0f, 10000.0f);
RNA_def_property_float_funcs(prop, NULL, "rna_ClothSettings_max_bend_set", NULL);
RNA_def_property_ui_text(prop, "Bending Stiffness Maximum", "Maximum bending stiffness value.");
- RNA_def_property_update(prop, 0, "rna_cloth_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
prop= RNA_def_property(srna, "bending_vertex_group", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_ClothSettings_bend_vgroup_get", "rna_ClothSettings_bend_vgroup_length", "rna_ClothSettings_bend_vgroup_set");
RNA_def_property_ui_text(prop, "Bending Stiffness Vertex Group", "Vertex group for fine control over bending stiffness.");
- RNA_def_property_update(prop, 0, "rna_cloth_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
/* unused */
@@ -359,48 +358,48 @@ static void rna_def_cloth_collision_settings(BlenderRNA *brna)
prop= RNA_def_property(srna, "enable_collision", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", CLOTH_COLLSETTINGS_FLAG_ENABLED);
RNA_def_property_ui_text(prop, "Enable Collision", "Enable collisions with other objects.");
- RNA_def_property_update(prop, 0, "rna_cloth_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
prop= RNA_def_property(srna, "min_distance", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "epsilon");
RNA_def_property_range(prop, 0.001f, 1.0f);
RNA_def_property_ui_text(prop, "Minimum Distance", "Minimum distance between collision objects before collision response takes in.");
- RNA_def_property_update(prop, 0, "rna_cloth_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
prop= RNA_def_property(srna, "friction", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 80.0f);
RNA_def_property_ui_text(prop, "Friction", "Friction force if a collision happened. (higher = less movement)");
- RNA_def_property_update(prop, 0, "rna_cloth_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
prop= RNA_def_property(srna, "collision_quality", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "loop_count");
RNA_def_property_range(prop, 1, 20);
RNA_def_property_ui_text(prop, "Collision Quality", "How many collision iterations should be done. (higher is better quality but slower)");
- RNA_def_property_update(prop, 0, "rna_cloth_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
/* self collision */
prop= RNA_def_property(srna, "enable_self_collision", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", CLOTH_COLLSETTINGS_FLAG_SELF);
RNA_def_property_ui_text(prop, "Enable Self Collision", "Enable self collisions.");
- RNA_def_property_update(prop, 0, "rna_cloth_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
prop= RNA_def_property(srna, "self_min_distance", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "selfepsilon");
RNA_def_property_range(prop, 0.5f, 1.0f);
RNA_def_property_ui_text(prop, "Self Minimum Distance", "0.5 means no distance at all, 1.0 is maximum distance.");
- RNA_def_property_update(prop, 0, "rna_cloth_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
prop= RNA_def_property(srna, "self_friction", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 80.0f);
RNA_def_property_ui_text(prop, "Self Friction", "Friction/damping with self contact.");
- RNA_def_property_update(prop, 0, "rna_cloth_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
prop= RNA_def_property(srna, "self_collision_quality", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "self_loop_count");
RNA_def_property_range(prop, 1, 10);
RNA_def_property_ui_text(prop, "Self Collision Quality", "How many self collision iterations should be done. (higher is better quality but slower)");
- RNA_def_property_update(prop, 0, "rna_cloth_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
}
void RNA_def_cloth(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_constraint.c b/source/blender/makesrna/intern/rna_constraint.c
index 83f3042d8ee..a8dc0454cef 100644
--- a/source/blender/makesrna/intern/rna_constraint.c
+++ b/source/blender/makesrna/intern/rna_constraint.c
@@ -160,14 +160,15 @@ static char *rna_Constraint_path(PointerRNA *ptr)
static void rna_Constraint_update(bContext *C, PointerRNA *ptr)
{
+ Scene *scene= CTX_data_scene(C);
Object *ob= ptr->id.data;
if(ob->pose) update_pose_constraint_flags(ob->pose);
object_test_constraints(ob);
- if(ob->type==OB_ARMATURE) DAG_id_flush_update(&ob->id, OB_RECALC_DATA|OB_RECALC_OB);
- else DAG_id_flush_update(&ob->id, OB_RECALC_OB);
+ if(ob->type==OB_ARMATURE) DAG_object_flush_update(scene, ob, OB_RECALC_DATA|OB_RECALC_OB);
+ else DAG_object_flush_update(scene, ob, OB_RECALC_OB);
}
static void rna_Constraint_dependency_update(bContext *C, PointerRNA *ptr)
@@ -871,15 +872,9 @@ static void rna_def_constraint_follow_path(BlenderRNA *brna)
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
prop= RNA_def_property(srna, "offset", PROP_INT, PROP_TIME);
- RNA_def_property_range(prop, MINAFRAME, MAXFRAME);
+ RNA_def_property_range(prop, -300000.0, 300000.f);
RNA_def_property_ui_text(prop, "Offset", "Offset from the position corresponding to the time frame.");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
-
- prop= RNA_def_property(srna, "offset_percentage", PROP_FLOAT, PROP_PERCENTAGE);
- RNA_def_property_float_sdna(prop, NULL, "offset"); // XXX we might be better with another var or some hackery?
- RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Offset Percentage", "Percentage value defining target position along length of bone.");
- RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "forward", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "trackflag");
@@ -894,15 +889,9 @@ static void rna_def_constraint_follow_path(BlenderRNA *brna)
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "curve_follow", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "followflag", FOLLOWPATH_FOLLOW);
+ RNA_def_property_boolean_sdna(prop, NULL, "followflag", 1);
RNA_def_property_ui_text(prop, "Follow Curve", "Object will follow the heading and banking of the curve.");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
-
- // TODO: do we need to do some special trickery to get offset sane for this?
- prop= RNA_def_property(srna, "fixed_position", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "followflag", FOLLOWPATH_STATIC);
- RNA_def_property_ui_text(prop, "Fixed Position", "Object will stay locked to a single point somewhere along the length of the curve regardless of time.");
- RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
}
static void rna_def_constraint_stretch_to(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c
index 91628bab376..1dd3d0e63c5 100644
--- a/source/blender/makesrna/intern/rna_curve.c
+++ b/source/blender/makesrna/intern/rna_curve.c
@@ -35,8 +35,6 @@
#include "BKE_font.h"
-#include "WM_types.h"
-
EnumPropertyItem beztriple_handle_type_items[] = {
{HD_FREE, "FREE", 0, "Free", ""},
{HD_AUTO, "AUTO", 0, "Auto", ""},
@@ -50,11 +48,6 @@ EnumPropertyItem beztriple_interpolation_mode_items[] = {
{BEZT_IPO_LIN, "LINEAR", 0, "Linear", ""},
{BEZT_IPO_BEZ, "BEZIER", 0, "Bezier", ""},
{0, NULL, 0, NULL, NULL}};
-
-EnumPropertyItem beztriple_keyframe_type_items[] = {
- {BEZT_KEYTYPE_KEYFRAME, "KEYFRAME", 0, "Keyframe", ""},
- {BEZT_KEYTYPE_BREAKDOWN, "BREAKDOWN", 0, "Breakdown", ""},
- {0, NULL, 0, NULL, NULL}};
#ifdef RNA_RUNTIME
@@ -65,6 +58,7 @@ EnumPropertyItem beztriple_keyframe_type_items[] = {
#include "BKE_main.h"
#include "WM_api.h"
+#include "WM_types.h"
StructRNA *rna_Curve_refine(PointerRNA *ptr)
{
@@ -76,22 +70,6 @@ StructRNA *rna_Curve_refine(PointerRNA *ptr)
else return &RNA_Curve;
}
-
-static PointerRNA rna_Curve_active_nurb_get(PointerRNA *ptr)
-{
- Curve *cu= (Curve*)ptr->data;
- Nurb *nu= NULL;
-
- if(cu->editnurb)
- nu = BLI_findlink(cu->editnurb, cu->actnu);
-
- if(nu)
- return rna_pointer_inherit_refine(ptr, &RNA_Nurb, nu);
-
- return rna_pointer_inherit_refine(ptr, NULL, NULL);
-}
-
-
static void rna_BezTriple_handle1_get(PointerRNA *ptr, float *values)
{
BezTriple *bt= (BezTriple*)ptr->data;
@@ -159,53 +137,12 @@ static void rna_Curve_material_index_range(PointerRNA *ptr, int *min, int *max)
*max= cu->totcol-1;
}
-static void rna_Curve_active_textbox_index_range(PointerRNA *ptr, int *min, int *max)
-{
- Curve *cu= (Curve*)ptr->id.data;
- *min= 0;
- *max= cu->totbox-1;
-}
-
-
-static void rna_Curve_2d_set(PointerRNA *ptr, int value)
-{
- Curve *cu= (Curve*)ptr->id.data;
- Nurb *nu= cu->editnurb ? cu->editnurb->first : cu->nurb.first;
-
- if(value) {
- cu->flag &= ~CU_3D;
- for( ; nu; nu= nu->next) {
- nu->flag |= CU_2D;
- test2DNurb(nu);
-
- /* since the handles are moved they need to be auto-located again */
- if(nu->type == CU_BEZIER)
- calchandlesNurb(nu);
- }
- }
- else {
- cu->flag |= CU_3D;
- for( ; nu; nu= nu->next) {
- nu->flag &= ~CU_2D;
- }
- }
-}
-
-
-
static int rna_Nurb_length(PointerRNA *ptr)
{
Nurb *nu= (Nurb*)ptr->data;
return nu->pntsv>0 ? nu->pntsu*nu->pntsv : nu->pntsu;
}
-static void rna_Nurb_type_set(PointerRNA *ptr, int value)
-{
- Nurb *nu= (Nurb*)ptr->data;
- nu->type = value;
- // XXX - TODO change datatypes
-}
-
static void rna_BPoint_array_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
Nurb *nu= (Nurb*)ptr->data;
@@ -214,44 +151,20 @@ static void rna_BPoint_array_begin(CollectionPropertyIterator *iter, PointerRNA
static void rna_Curve_update_data(bContext *C, PointerRNA *ptr)
{
- ID *id= ptr->id.data;
-
- DAG_id_flush_update(id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, id);
-}
-
-static void rna_Nurb_update_handle_data(bContext *C, PointerRNA *ptr)
-{
- Nurb *nu= (Nurb*)ptr->data;
-
- if(nu->type == CU_BEZIER)
- calchandlesNurb(nu);
-
- rna_Curve_update_data(C, ptr);
-}
-
-static void rna_Nurb_update_knot_u(bContext *C, PointerRNA *ptr)
-{
- Nurb *nu= (Nurb*)ptr->data;
-
- clamp_nurb_order_u(nu);
- makeknots(nu, 1);
-
- rna_Curve_update_data(C, ptr);
-}
-
-static void rna_Nurb_update_knot_v(bContext *C, PointerRNA *ptr)
-{
- Nurb *nu= (Nurb*)ptr->data;
-
- clamp_nurb_order_v(nu);
- makeknots(nu, 2);
-
- rna_Curve_update_data(C, ptr);
+ Main *bmain= CTX_data_main(C);
+ Scene *scene= CTX_data_scene(C);
+ Curve *cu= ptr->id.data;
+ Object *ob;
+
+ for(ob=bmain->object.first; ob; ob= ob->id.next) {
+ if(ob->data == cu) {
+ /* XXX this will loop over all objects again (slow) */
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob);
+ }
+ }
}
-
-
#else
static void rna_def_bpoint(BlenderRNA *brna)
@@ -293,7 +206,7 @@ static void rna_def_bpoint(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Weight", "Softbody goal weight");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "radius", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "bevel_radius", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "radius");
/*RNA_def_property_range(prop, 0.0f, 1.0f);*/
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
@@ -346,15 +259,10 @@ static void rna_def_beztriple(BlenderRNA *brna)
prop= RNA_def_property(srna, "interpolation", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "ipo");
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_enum_items(prop, beztriple_interpolation_mode_items);
RNA_def_property_ui_text(prop, "Interpolation", "(For F-Curves Only) Interpolation to use for segment of curve starting from current BezTriple.");
- //RNA_def_property_update(prop, 0, "rna_Curve_update_data"); // this should be an F-Curve update call instead...
-
- prop= RNA_def_property(srna, "keyframe_type", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "hide");
- RNA_def_property_enum_items(prop, beztriple_keyframe_type_items);
- RNA_def_property_ui_text(prop, "Keyframe Type", "(For F-Curves only) The type of keyframe this control point defines.");
- //RNA_def_property_update(prop, 0, "rna_Curve_update_data"); // this should be an F-Curve update call instead...
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
/* Vector values */
prop= RNA_def_property(srna, "handle1", PROP_FLOAT, PROP_TRANSLATION);
@@ -387,7 +295,7 @@ static void rna_def_beztriple(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Weight", "Softbody goal weight");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "radius", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "bevel_radius", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "radius");
/*RNA_def_property_range(prop, 0.0f, 1.0f);*/
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
@@ -407,22 +315,22 @@ static void rna_def_path(BlenderRNA *brna, StructRNA *srna)
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
/* flags */
- prop= RNA_def_property(srna, "use_path", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "path", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_PATH);
RNA_def_property_ui_text(prop, "Path", "Enable the curve to become a translation path.");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "use_path_follow", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "follow", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_FOLLOW);
RNA_def_property_ui_text(prop, "Follow", "Make curve path children to rotate along the path.");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "use_stretch", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "stretch", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_STRETCH);
RNA_def_property_ui_text(prop, "Stretch", "Option for curve-deform: makes deformed child to stretch along entire path.");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "use_time_offset", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "offset_path_distance", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_OFFS_PATHDIST);
RNA_def_property_ui_text(prop, "Offset Path Distance", "Children will use TimeOffs value as path distance offset.");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
@@ -493,13 +401,13 @@ static void rna_def_font(BlenderRNA *brna, StructRNA *srna)
RNA_def_property_ui_text(prop, "Shear", "Italic angle of the characters");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "offset_x", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "x_offset", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "xof");
RNA_def_property_range(prop, -50.0f, 50.0f);
RNA_def_property_ui_text(prop, "X Offset", "Horizontal offset from the object center");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "offset_y", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "y_offset", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "yof");
RNA_def_property_range(prop, -50.0f, 50.0f);
RNA_def_property_ui_text(prop, "Y Offset", "Vertical offset from the object center");
@@ -508,29 +416,25 @@ static void rna_def_font(BlenderRNA *brna, StructRNA *srna)
prop= RNA_def_property(srna, "ul_position", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ulpos");
RNA_def_property_range(prop, -0.2f, 0.8f);
- RNA_def_property_ui_text(prop, "Underline Position", "Vertical position of underline");
+ RNA_def_property_ui_text(prop, "Underline position", "Vertical position of underline");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "ul_height", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ulheight");
RNA_def_property_range(prop, -0.2f, 0.8f);
- RNA_def_property_ui_text(prop, "Underline Thickness", "");
+ RNA_def_property_ui_text(prop, "Underline thickness", "");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "textboxes", PROP_COLLECTION, PROP_NONE);
- RNA_def_property_collection_sdna(prop, NULL, "tb", "totbox");
- RNA_def_property_struct_type(prop, "TextBox");
- RNA_def_property_ui_text(prop, "Textboxes", "");
-
prop= RNA_def_property(srna, "active_textbox", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "actbox");
+ RNA_def_property_range(prop, 0, 100);
RNA_def_property_ui_text(prop, "The active text box", "");
- RNA_def_property_int_funcs(prop, NULL, NULL, "rna_Curve_active_textbox_index_range");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
/* strings */
prop= RNA_def_property(srna, "family", PROP_STRING, PROP_NONE);
RNA_def_property_string_maxlength(prop, 21);
- RNA_def_property_ui_text(prop, "Object Font", "Use Blender Objects as font characters. Give font objects a common name followed by the character it represents, eg. familya, familyb etc, and turn on Verts Duplication");
+ RNA_def_property_ui_text(prop, "Family", "Blender uses font from selfmade objects.");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "str", PROP_STRING, PROP_NONE);
@@ -551,7 +455,12 @@ static void rna_def_font(BlenderRNA *brna, StructRNA *srna)
RNA_def_property_pointer_sdna(prop, NULL, "vfont");
RNA_def_property_ui_text(prop, "Font", "");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
-
+
+ prop= RNA_def_property(srna, "textbox", PROP_POINTER, PROP_NONE);
+ RNA_def_property_pointer_sdna(prop, NULL, "tb");
+ RNA_def_property_ui_text(prop, "Textbox", "");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
+
prop= RNA_def_property(srna, "edit_format", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "curinfo");
RNA_def_property_ui_text(prop, "Edit Format", "Editing settings character formatting.");
@@ -676,26 +585,10 @@ static void rna_def_curve(BlenderRNA *brna)
RNA_def_property_pointer_sdna(prop, NULL, "key");
RNA_def_property_ui_text(prop, "Shape Keys", "");
- prop= RNA_def_property(srna, "splines", PROP_COLLECTION, PROP_NONE);
+ prop= RNA_def_property(srna, "curves", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "nurb", NULL);
RNA_def_property_struct_type(prop, "Nurb");
- RNA_def_property_ui_text(prop, "Splines", "Collection of splines in this curve data object.");
-
- prop= RNA_def_property(srna, "active_spline", PROP_POINTER, PROP_NONE);
- RNA_def_property_struct_type(prop, "Nurb");
- RNA_def_property_pointer_funcs(prop, "rna_Curve_active_nurb_get", NULL, NULL);
- RNA_def_property_ui_text(prop, "Active Spline", "The active editmode spline");
-
-
- prop= RNA_def_property(srna, "draw_handles", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_negative_sdna(prop, NULL, "drawflag", CU_HIDE_HANDLES);
- RNA_def_property_ui_text(prop, "Draw Handles", "Display bezier handles in editmode.");
- RNA_def_property_update(prop, NC_GEOM|ND_DATA, NULL);
-
- prop= RNA_def_property(srna, "draw_normals", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_negative_sdna(prop, NULL, "drawflag", CU_HIDE_NORMALS);
- RNA_def_property_ui_text(prop, "Draw Normals", "Display 3D curve normals in editmode.");
- RNA_def_property_update(prop, NC_GEOM|ND_DATA, NULL);
+ RNA_def_property_ui_text(prop, "Curves", "Collection of curves in this curve data object.");
rna_def_path(brna, srna);
@@ -769,7 +662,6 @@ static void rna_def_curve(BlenderRNA *brna)
/* Flags */
prop= RNA_def_property(srna, "curve_2d", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", CU_3D);
- RNA_def_property_boolean_funcs(prop, NULL, "rna_Curve_2d_set");
RNA_def_property_ui_text(prop, "2D Curve", "Define curve in two dimensions only. Note that fill only works when this is enabled.");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
@@ -783,11 +675,6 @@ static void rna_def_curve(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Back", "Draw filled back for extruded/beveled curves.");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "use_twist_correction", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_NO_TWIST);
- RNA_def_property_ui_text(prop, "Minimal Twist", "Correct for twisting.");
- RNA_def_property_update(prop, 0, "rna_Curve_update_data");
-
prop= RNA_def_property(srna, "retopo", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_RETOPO);
RNA_def_property_ui_text(prop, "Retopo", "Turn on the re-topology tool.");
@@ -796,14 +683,6 @@ static void rna_def_curve(BlenderRNA *brna)
static void rna_def_curve_nurb(BlenderRNA *brna)
{
- static EnumPropertyItem curve_type_items[] = {
- {CU_POLY, "POLY", 0, "Poly", ""},
- {CU_BEZIER, "BEZIER", 0, "Bezier", ""},
- {CU_BSPLINE, "BSPLINE", 0, "BSpline", ""},
- {CU_CARDINAL, "CARDINAL", 0, "Cardinal", ""},
- {CU_NURBS, "NURBS", 0, "Ease", ""},
- {0, NULL, 0, NULL, NULL}};
-
static EnumPropertyItem spline_interpolation_items[] = {
{BEZT_IPO_CONST, "LINEAR", 0, "Linear", ""},
{BEZT_IPO_LIN, "CARDINAL", 0, "Cardinal", ""},
@@ -815,18 +694,18 @@ static void rna_def_curve_nurb(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "Nurb", NULL);
- RNA_def_struct_ui_text(srna, "Spline", "Element of a curve, either Nurbs, Bezier or Polyline or a character with text objects.");
+ RNA_def_struct_ui_text(srna, "Nurb", "Element of a curve, either Nurb, Bezier or Polyline or a character with text objects.");
prop= RNA_def_property(srna, "points", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "bp", NULL);
RNA_def_property_struct_type(prop, "CurvePoint");
RNA_def_property_collection_funcs(prop, "rna_BPoint_array_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", "rna_Nurb_length", 0, 0, 0, 0);
- RNA_def_property_ui_text(prop, "Points", "Collection of points that make up this poly or nurbs spline.");
+ RNA_def_property_ui_text(prop, "Points", "Collection of points for Poly and Nurbs curves.");
prop= RNA_def_property(srna, "bezier_points", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "BezierCurvePoint");
RNA_def_property_collection_sdna(prop, NULL, "bezt", "pntsu");
- RNA_def_property_ui_text(prop, "Bezier Points", "Collection of points for bezier curves only.");
+ RNA_def_property_ui_text(prop, "Bezier Points", "Collection of points bezier curves only.");
prop= RNA_def_property(srna, "tilt_interpolation", PROP_ENUM, PROP_NONE);
@@ -841,12 +720,6 @@ static void rna_def_curve_nurb(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Radius Interpolation", "The type of radius interpolation for Bezier curves.");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- // XXX - switching type probably needs comprehensive recalc of data like in 2.4x
- prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_items(prop, curve_type_items);
- RNA_def_property_enum_funcs(prop, NULL, "rna_Nurb_type_set", NULL);
- RNA_def_property_ui_text(prop, "Type", "The interpolation type for this curve element.");
- RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "point_count_u", PROP_INT, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* editing this needs knot recalc*/
@@ -864,14 +737,14 @@ static void rna_def_curve_nurb(BlenderRNA *brna)
prop= RNA_def_property(srna, "order_u", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "orderu");
RNA_def_property_range(prop, 2, 6);
- RNA_def_property_ui_text(prop, "Order U", "Nurbs order in the U direction (For splines and surfaces), Higher values let points influence a greater area");
- RNA_def_property_update(prop, 0, "rna_Nurb_update_knot_u");
+ RNA_def_property_ui_text(prop, "Order U", "Nurbs order in the U direction (For curves and surfaces), Higher values let points influence a greater area");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "order_v", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "orderv");
RNA_def_property_range(prop, 2, 6);
RNA_def_property_ui_text(prop, "Order V", "Nurbs order in the V direction (For surfaces only), Higher values let points influence a greater area");
- RNA_def_property_update(prop, 0, "rna_Nurb_update_knot_v");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "resolution_u", PROP_INT, PROP_NONE);
@@ -889,7 +762,7 @@ static void rna_def_curve_nurb(BlenderRNA *brna)
prop= RNA_def_property(srna, "cyclic_u", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flagu", CU_CYCLIC);
RNA_def_property_ui_text(prop, "Cyclic U", "Make this curve or surface a closed loop in the U direction.");
- RNA_def_property_update(prop, 0, "rna_Nurb_update_handle_data"); /* only needed for cyclic_u because cyclic_v cant do bezier */
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "cyclic_v", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flagv", CU_CYCLIC);
@@ -901,22 +774,22 @@ static void rna_def_curve_nurb(BlenderRNA *brna)
prop= RNA_def_property(srna, "endpoint_u", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flagu", 2);
RNA_def_property_ui_text(prop, "Endpoint U", "Make this nurbs curve or surface meet the endpoints in the U direction (Cyclic U must be disabled).");
- RNA_def_property_update(prop, 0, "rna_Nurb_update_knot_u");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "endpoint_v", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flagv", 2);
RNA_def_property_ui_text(prop, "Endpoint V", "Make this nurbs surface meet the endpoints in the V direction (Cyclic V must be disabled).");
- RNA_def_property_update(prop, 0, "rna_Nurb_update_knot_v");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "bezier_u", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flagu", 4);
RNA_def_property_ui_text(prop, "Bezier U", "Make this nurbs curve or surface act like a bezier spline in the U direction (Order U must be 3 or 4, Cyclic U must be disabled).");
- RNA_def_property_update(prop, 0, "rna_Nurb_update_knot_u");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "bezier_v", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flagv", 4);
RNA_def_property_ui_text(prop, "Bezier V", "Make this nurbs surface act like a bezier spline in the V direction (Order V must be 3 or 4, Cyclic V must be disabled).");
- RNA_def_property_update(prop, 0, "rna_Nurb_update_knot_v");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "smooth", PROP_BOOLEAN, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c
index 8d05cbde74c..f22fd594d8d 100644
--- a/source/blender/makesrna/intern/rna_define.c
+++ b/source/blender/makesrna/intern/rna_define.c
@@ -1001,18 +1001,18 @@ void RNA_def_property_clear_flag(PropertyRNA *prop, int flag)
prop->flag &= ~flag;
}
-void RNA_def_property_array(PropertyRNA *prop, int length)
+void RNA_def_property_array(PropertyRNA *prop, int arraylength)
{
StructRNA *srna= DefRNA.laststruct;
- if(length<0) {
+ if(arraylength<0) {
fprintf(stderr, "RNA_def_property_array: %s.%s, array length must be zero of greater.\n", srna->identifier, prop->identifier);
DefRNA.error= 1;
return;
}
- if(length>RNA_MAX_ARRAY_LENGTH) {
- fprintf(stderr, "RNA_def_property_array: %s.%s, array length must be smaller than %d.\n", srna->identifier, prop->identifier, RNA_MAX_ARRAY_LENGTH);
+ if(arraylength>RNA_MAX_ARRAY) {
+ fprintf(stderr, "RNA_def_property_array: %s.%s, array length must be smaller than %d.\n", srna->identifier, prop->identifier, RNA_MAX_ARRAY);
DefRNA.error= 1;
return;
}
@@ -1021,9 +1021,7 @@ void RNA_def_property_array(PropertyRNA *prop, int length)
case PROP_BOOLEAN:
case PROP_INT:
case PROP_FLOAT:
- prop->arraylength[0]= length;
- prop->totarraylength= length;
- prop->arraydimension= 1;
+ prop->arraylength= arraylength;
break;
default:
fprintf(stderr, "RNA_def_property_array: %s.%s, only boolean/int/float can be array.\n", srna->identifier, prop->identifier);
@@ -1032,44 +1030,6 @@ void RNA_def_property_array(PropertyRNA *prop, int length)
}
}
-void RNA_def_property_multi_array(PropertyRNA *prop, int dimension, int length[])
-{
- StructRNA *srna= DefRNA.laststruct;
- int i;
-
- if (dimension < 1 || dimension > RNA_MAX_ARRAY_DIMENSION) {
- fprintf(stderr, "RNA_def_property_multi_array: %s.%s, array dimension must be between 1 and %d.\n", srna->identifier, prop->identifier, RNA_MAX_ARRAY_DIMENSION);
- DefRNA.error= 1;
- return;
- }
-
- switch(prop->type) {
- case PROP_BOOLEAN:
- case PROP_INT:
- case PROP_FLOAT:
- break;
- default:
- fprintf(stderr, "RNA_def_property_multi_array: %s.%s, only boolean/int/float can be array.\n", srna->identifier, prop->identifier);
- DefRNA.error= 1;
- break;
- }
-
- prop->arraydimension= dimension;
- prop->totarraylength= 0;
-
- if(length) {
- memcpy(prop->arraylength, length, sizeof(int)*dimension);
-
- prop->totarraylength= length[0];
- for(i=1; i<dimension; i++)
- prop->totarraylength *= length[i];
- }
- else
- memset(prop->arraylength, 0, sizeof(prop->arraylength));
-
- /* TODO make sure arraylength values are sane */
-}
-
void RNA_def_property_ui_text(PropertyRNA *prop, const char *name, const char *description)
{
prop->name= name;
@@ -1213,14 +1173,8 @@ void RNA_def_property_enum_items(PropertyRNA *prop, const EnumPropertyItem *item
defaultfound= 1;
}
- if(!defaultfound) {
- for(i=0; item[i].identifier; i++) {
- if(item[i].identifier[0]) {
- eprop->defaultvalue= item[i].value;
- break;
- }
- }
- }
+ if(!defaultfound)
+ eprop->defaultvalue= item[0].value;
break;
}
@@ -1440,15 +1394,10 @@ static PropertyDefRNA *rna_def_property_sdna(PropertyRNA *prop, const char *stru
}
}
- if(smember.arraylength > 1) {
- prop->arraylength[0]= smember.arraylength;
- prop->totarraylength= smember.arraylength;
- prop->arraydimension= 1;
- }
- else {
- prop->arraydimension= 0;
- prop->totarraylength= 0;
- }
+ if(smember.arraylength > 1)
+ prop->arraylength= smember.arraylength;
+ else
+ prop->arraylength= 0;
dp->dnastructname= structname;
dp->dnastructfromname= ds->dnafromname;
@@ -1568,10 +1517,8 @@ void RNA_def_property_enum_sdna(PropertyRNA *prop, const char *structname, const
}
if((dp=rna_def_property_sdna(prop, structname, propname))) {
- if(prop->arraydimension) {
- prop->arraydimension= 0;
- prop->totarraylength= 0;
-
+ if(prop->arraylength) {
+ prop->arraylength= 0;
if(!DefRNA.silent) {
fprintf(stderr, "RNA_def_property_enum_sdna: %s.%s, array not supported for enum type.\n", structname, propname);
DefRNA.error= 1;
@@ -1610,10 +1557,9 @@ void RNA_def_property_string_sdna(PropertyRNA *prop, const char *structname, con
}
if((dp=rna_def_property_sdna(prop, structname, propname))) {
- if(prop->arraydimension) {
- sprop->maxlength= prop->totarraylength;
- prop->arraydimension= 0;
- prop->totarraylength= 0;
+ if(prop->arraylength) {
+ sprop->maxlength= prop->arraylength;
+ prop->arraylength= 0;
}
}
}
@@ -1635,10 +1581,8 @@ void RNA_def_property_pointer_sdna(PropertyRNA *prop, const char *structname, co
}
if((dp=rna_def_property_sdna(prop, structname, propname))) {
- if(prop->arraydimension) {
- prop->arraydimension= 0;
- prop->totarraylength= 0;
-
+ if(prop->arraylength) {
+ prop->arraylength= 0;
if(!DefRNA.silent) {
fprintf(stderr, "RNA_def_property_pointer_sdna: %s.%s, array not supported for pointer type.\n", structname, propname);
DefRNA.error= 1;
@@ -1665,9 +1609,8 @@ void RNA_def_property_collection_sdna(PropertyRNA *prop, const char *structname,
}
if((dp=rna_def_property_sdna(prop, structname, propname))) {
- if(prop->arraydimension && !lengthpropname) {
- prop->arraydimension= 0;
- prop->totarraylength= 0;
+ if(prop->arraylength && !lengthpropname) {
+ prop->arraylength= 0;
if(!DefRNA.silent) {
fprintf(stderr, "RNA_def_property_collection_sdna: %s.%s, array of collections not supported.\n", structname, propname);
@@ -1691,9 +1634,8 @@ void RNA_def_property_collection_sdna(PropertyRNA *prop, const char *structname,
if(lengthpropname[0] == 0 || rna_find_sdna_member(DefRNA.sdna, structname, lengthpropname, &smember)) {
if(lengthpropname[0] == 0) {
- dp->dnalengthfixed= prop->totarraylength;
- prop->arraydimension= 0;
- prop->totarraylength= 0;
+ dp->dnalengthfixed= prop->arraylength;
+ prop->arraylength= 0;
}
else {
dp->dnalengthstructname= structname;
@@ -1740,22 +1682,6 @@ void RNA_def_property_update(PropertyRNA *prop, int noteflag, const char *func)
prop->update= (UpdateFunc)func;
}
-void RNA_def_property_dynamic_array_funcs(PropertyRNA *prop, const char *getlength)
-{
- if(!DefRNA.preprocess) {
- fprintf(stderr, "RNA_def_property_*_funcs: only during preprocessing.\n");
- return;
- }
-
- if (!(prop->flag & PROP_DYNAMIC)) {
- fprintf(stderr, "RNA_def_property_dynamic_array_funcs: property is a not dynamic array.\n");
- DefRNA.error= 1;
- return;
- }
-
- if(getlength) prop->getlength= (PropArrayLengthGetFunc)getlength;
-}
-
void RNA_def_property_boolean_funcs(PropertyRNA *prop, const char *get, const char *set)
{
StructRNA *srna= DefRNA.laststruct;
@@ -1769,7 +1695,7 @@ void RNA_def_property_boolean_funcs(PropertyRNA *prop, const char *get, const ch
case PROP_BOOLEAN: {
BooleanPropertyRNA *bprop= (BooleanPropertyRNA*)prop;
- if(prop->arraydimension) {
+ if(prop->arraylength) {
if(get) bprop->getarray= (PropBooleanArrayGetFunc)get;
if(set) bprop->setarray= (PropBooleanArraySetFunc)set;
}
@@ -1799,7 +1725,7 @@ void RNA_def_property_int_funcs(PropertyRNA *prop, const char *get, const char *
case PROP_INT: {
IntPropertyRNA *iprop= (IntPropertyRNA*)prop;
- if(prop->arraydimension) {
+ if(prop->arraylength) {
if(get) iprop->getarray= (PropIntArrayGetFunc)get;
if(set) iprop->setarray= (PropIntArraySetFunc)set;
}
@@ -1830,7 +1756,7 @@ void RNA_def_property_float_funcs(PropertyRNA *prop, const char *get, const char
case PROP_FLOAT: {
FloatPropertyRNA *fprop= (FloatPropertyRNA*)prop;
- if(prop->arraydimension) {
+ if(prop->arraylength) {
if(get) fprop->getarray= (PropFloatArrayGetFunc)get;
if(set) fprop->setarray= (PropFloatArraySetFunc)set;
}
@@ -1982,34 +1908,6 @@ PropertyRNA *RNA_def_boolean_array(StructOrFunctionRNA *cont_, const char *ident
return prop;
}
-PropertyRNA *RNA_def_boolean_layer(StructOrFunctionRNA *cont_, const char *identifier, int len, int *default_value,
- const char *ui_name, const char *ui_description)
-{
- ContainerRNA *cont= cont_;
- PropertyRNA *prop;
-
- prop= RNA_def_property(cont, identifier, PROP_BOOLEAN, PROP_LAYER);
- if(len != 0) RNA_def_property_array(prop, len);
- if(default_value) RNA_def_property_boolean_array_default(prop, default_value);
- RNA_def_property_ui_text(prop, ui_name, ui_description);
-
- return prop;
-}
-
-PropertyRNA *RNA_def_boolean_layer_member(StructOrFunctionRNA *cont_, const char *identifier, int len, int *default_value,
- const char *ui_name, const char *ui_description)
-{
- ContainerRNA *cont= cont_;
- PropertyRNA *prop;
-
- prop= RNA_def_property(cont, identifier, PROP_BOOLEAN, PROP_LAYER_MEMBER);
- if(len != 0) RNA_def_property_array(prop, len);
- if(default_value) RNA_def_property_boolean_array_default(prop, default_value);
- RNA_def_property_ui_text(prop, ui_name, ui_description);
-
- return prop;
-}
-
PropertyRNA *RNA_def_boolean_vector(StructOrFunctionRNA *cont_, const char *identifier, int len, int *default_value,
const char *ui_name, const char *ui_description)
{
@@ -2181,15 +2079,14 @@ PropertyRNA *RNA_def_float_color(StructOrFunctionRNA *cont_, const char *identif
}
-PropertyRNA *RNA_def_float_matrix(StructOrFunctionRNA *cont_, const char *identifier, int rows, int columns, const float *default_value,
+PropertyRNA *RNA_def_float_matrix(StructOrFunctionRNA *cont_, const char *identifier, int len, const float *default_value,
float hardmin, float hardmax, const char *ui_name, const char *ui_description, float softmin, float softmax)
{
ContainerRNA *cont= cont_;
PropertyRNA *prop;
- int length[2]= {rows, columns};
prop= RNA_def_property(cont, identifier, PROP_FLOAT, PROP_MATRIX);
- RNA_def_property_multi_array(prop, 2, length);
+ if(len != 0) RNA_def_property_array(prop, len);
if(default_value) RNA_def_property_float_array_default(prop, default_value);
if(hardmin != hardmax) RNA_def_property_range(prop, hardmin, hardmax);
RNA_def_property_ui_text(prop, ui_name, ui_description);
@@ -2386,12 +2283,11 @@ void RNA_def_function_ui_description(FunctionRNA *func, const char *description)
int rna_parameter_size(PropertyRNA *parm)
{
PropertyType ptype= parm->type;
- int len= parm->totarraylength; /* only supports fixed length at the moment */
+ int len= parm->arraylength;
- if(len > 0) {
- if (parm->flag & PROP_DYNAMIC)
- return sizeof(void *);
+ if (parm->flag & PROP_DYNAMIC_ARRAY) return sizeof(void*);
+ if(len > 0) {
switch (ptype) {
case PROP_BOOLEAN:
case PROP_INT:
@@ -2536,8 +2432,8 @@ void RNA_def_property_duplicate_pointers(PropertyRNA *prop)
BooleanPropertyRNA *bprop= (BooleanPropertyRNA*)prop;
if(bprop->defaultarray) {
- iarray= MEM_callocN(sizeof(int)*prop->totarraylength, "RNA_def_property_store");
- memcpy(iarray, bprop->defaultarray, sizeof(int)*prop->totarraylength);
+ iarray= MEM_callocN(sizeof(int)*prop->arraylength, "RNA_def_property_store");
+ memcpy(iarray, bprop->defaultarray, sizeof(int)*prop->arraylength);
bprop->defaultarray= iarray;
}
break;
@@ -2546,8 +2442,8 @@ void RNA_def_property_duplicate_pointers(PropertyRNA *prop)
IntPropertyRNA *iprop= (IntPropertyRNA*)prop;
if(iprop->defaultarray) {
- iarray= MEM_callocN(sizeof(int)*prop->totarraylength, "RNA_def_property_store");
- memcpy(iarray, iprop->defaultarray, sizeof(int)*prop->totarraylength);
+ iarray= MEM_callocN(sizeof(int)*prop->arraylength, "RNA_def_property_store");
+ memcpy(iarray, iprop->defaultarray, sizeof(int)*prop->arraylength);
iprop->defaultarray= iarray;
}
break;
@@ -2572,8 +2468,8 @@ void RNA_def_property_duplicate_pointers(PropertyRNA *prop)
FloatPropertyRNA *fprop= (FloatPropertyRNA*)prop;
if(fprop->defaultarray) {
- farray= MEM_callocN(sizeof(float)*prop->totarraylength, "RNA_def_property_store");
- memcpy(farray, fprop->defaultarray, sizeof(float)*prop->totarraylength);
+ farray= MEM_callocN(sizeof(float)*prop->arraylength, "RNA_def_property_store");
+ memcpy(farray, fprop->defaultarray, sizeof(float)*prop->arraylength);
fprop->defaultarray= farray;
}
break;
@@ -2617,14 +2513,13 @@ void RNA_def_property_free_pointers(PropertyRNA *prop)
}
case PROP_ENUM: {
EnumPropertyRNA *eprop= (EnumPropertyRNA*)prop;
+ if(eprop->item) MEM_freeN((void*)eprop->item);
for(a=0; a<eprop->totitem; a++) {
if(eprop->item[a].identifier) MEM_freeN((void*)eprop->item[a].identifier);
if(eprop->item[a].name) MEM_freeN((void*)eprop->item[a].name);
if(eprop->item[a].description) MEM_freeN((void*)eprop->item[a].description);
}
-
- if(eprop->item) MEM_freeN((void*)eprop->item);
break;
}
case PROP_STRING: {
diff --git a/source/blender/makesrna/intern/rna_fcurve.c b/source/blender/makesrna/intern/rna_fcurve.c
index bafe83f1812..fa6eea5f8a9 100644
--- a/source/blender/makesrna/intern/rna_fcurve.c
+++ b/source/blender/makesrna/intern/rna_fcurve.c
@@ -34,8 +34,6 @@
#include "MEM_guardedalloc.h"
-#include "WM_types.h"
-
EnumPropertyItem fmodifier_type_items[] = {
{FMODIFIER_TYPE_NULL, "NULL", 0, "Invalid", ""},
{FMODIFIER_TYPE_GENERATOR, "GENERATOR", 0, "Generator", ""},
@@ -170,20 +168,17 @@ static void rna_def_fmodifier_generator(BlenderRNA *brna)
prop= RNA_def_property(srna, "additive", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", FCM_GENERATOR_ADDITIVE);
RNA_def_property_ui_text(prop, "Additive", "Values generated by this modifier are applied on top of the existing values instead of overwriting them.");
- RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
// XXX this has a special validation func
prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_mode_items);
RNA_def_property_ui_text(prop, "Mode", "Type of generator to use.");
- RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
/* order of the polynomial */
// XXX this has a special validation func
prop= RNA_def_property(srna, "poly_order", PROP_INT, PROP_NONE);
RNA_def_property_ui_text(prop, "Polynomial Order", "The highest power of 'x' for this polynomial. (number of coefficients - 1)");
- RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
/* coefficients array */
// FIXME: this is quite difficult to try to wrap
@@ -215,31 +210,25 @@ static void rna_def_fmodifier_function_generator(BlenderRNA *brna)
/* coefficients */
prop= RNA_def_property(srna, "amplitude", PROP_FLOAT, PROP_NONE);
RNA_def_property_ui_text(prop, "Amplitude", "Scale factor determining the maximum/minimum values.");
- RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
prop= RNA_def_property(srna, "phase_multiplier", PROP_FLOAT, PROP_NONE);
RNA_def_property_ui_text(prop, "Phase Multiplier", "Scale factor determining the 'speed' of the function.");
- RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
prop= RNA_def_property(srna, "phase_offset", PROP_FLOAT, PROP_NONE);
RNA_def_property_ui_text(prop, "Phase Offset", "Constant factor to offset time by for function.");
- RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
prop= RNA_def_property(srna, "value_offset", PROP_FLOAT, PROP_NONE);
RNA_def_property_ui_text(prop, "Value Offset", "Constant factor to offset values by.");
- RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
/* flags */
prop= RNA_def_property(srna, "additive", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", FCM_GENERATOR_ADDITIVE);
RNA_def_property_ui_text(prop, "Additive", "Values generated by this modifier are applied on top of the existing values instead of overwriting them.");
- RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
prop= RNA_def_property(srna, "function_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "type");
RNA_def_property_enum_items(prop, prop_type_items);
RNA_def_property_ui_text(prop, "Type", "Type of built-in function to use.");
- RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
}
/* --------- */
@@ -260,18 +249,15 @@ static void rna_def_fmodifier_envelope_ctrl(BlenderRNA *brna)
prop= RNA_def_property(srna, "minimum", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "min");
RNA_def_property_ui_text(prop, "Minimum Value", "Lower bound of envelope at this control-point.");
- RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
prop= RNA_def_property(srna, "maximum", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "max");
RNA_def_property_ui_text(prop, "Maximum Value", "Upper bound of envelope at this control-point.");
- RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
/* Frame */
prop= RNA_def_property(srna, "frame", PROP_FLOAT, PROP_TIME);
RNA_def_property_float_sdna(prop, NULL, "time");
RNA_def_property_ui_text(prop, "Frame", "Frame this control-point occurs on.");
- RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
// TODO:
// - selection flags (not implemented in UI yet though)
@@ -296,17 +282,14 @@ static void rna_def_fmodifier_envelope(BlenderRNA *brna)
prop= RNA_def_property(srna, "reference_value", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "midval");
RNA_def_property_ui_text(prop, "Reference Value", "Value that envelope's influence is centered around / based on.");
- RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
prop= RNA_def_property(srna, "default_minimum", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "min");
RNA_def_property_ui_text(prop, "Default Minimum", "Lower distance from Reference Value for 1:1 default influence.");
- RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
prop= RNA_def_property(srna, "default_maximum", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "max");
RNA_def_property_ui_text(prop, "Default Maximum", "Upper distance from Reference Value for 1:1 default influence.");
- RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
}
/* --------- */
@@ -331,21 +314,18 @@ static void rna_def_fmodifier_cycles(BlenderRNA *brna)
prop= RNA_def_property(srna, "before_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_type_items);
RNA_def_property_ui_text(prop, "Before Mode", "Cycling mode to use before first keyframe.");
- RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
prop= RNA_def_property(srna, "before_cycles", PROP_FLOAT, PROP_NONE);
RNA_def_property_ui_text(prop, "Before Cycles", "Maximum number of cycles to allow before first keyframe. (0 = infinite)");
- RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
+
/* after */
prop= RNA_def_property(srna, "after_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_type_items);
RNA_def_property_ui_text(prop, "After Mode", "Cycling mode to use after last keyframe.");
- RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
prop= RNA_def_property(srna, "after_cycles", PROP_FLOAT, PROP_NONE);
RNA_def_property_ui_text(prop, "After Cycles", "Maximum number of cycles to allow after last keyframe. (0 = infinite)");
- RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
}
/* --------- */
@@ -374,42 +354,34 @@ static void rna_def_fmodifier_limits(BlenderRNA *brna)
prop= RNA_def_property(srna, "use_minimum_x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", FCM_LIMIT_XMIN);
RNA_def_property_ui_text(prop, "Minimum X", "Use the minimum X value.");
- RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
prop= RNA_def_property(srna, "use_minimum_y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", FCM_LIMIT_YMIN);
RNA_def_property_ui_text(prop, "Minimum Y", "Use the minimum Y value.");
- RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
prop= RNA_def_property(srna, "use_maximum_x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", FCM_LIMIT_XMAX);
RNA_def_property_ui_text(prop, "Maximum X", "Use the maximum X value.");
- RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
prop= RNA_def_property(srna, "use_maximum_y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", FCM_LIMIT_YMAX);
RNA_def_property_ui_text(prop, "Maximum Y", "Use the maximum Y value.");
- RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
prop= RNA_def_property(srna, "minimum_x", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "rect.xmin");
RNA_def_property_ui_text(prop, "Minimum X", "Lowest X value to allow.");
- RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
prop= RNA_def_property(srna, "minimum_y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "rect.ymin");
RNA_def_property_ui_text(prop, "Minimum Y", "Lowest Y value to allow.");
- RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
prop= RNA_def_property(srna, "maximum_x", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "rect.xmax");
RNA_def_property_ui_text(prop, "Maximum X", "Highest X value to allow.");
- RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
prop= RNA_def_property(srna, "maximum_y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "rect.ymax");
RNA_def_property_ui_text(prop, "Maximum Y", "Highest Y value to allow.");
- RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
}
/* --------- */
@@ -433,27 +405,22 @@ static void rna_def_fmodifier_noise(BlenderRNA *brna)
prop= RNA_def_property(srna, "modification", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_modification_items);
RNA_def_property_ui_text(prop, "Modification", "Method of modifying the existing F-Curve.");
- RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
prop= RNA_def_property(srna, "size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "size");
RNA_def_property_ui_text(prop, "Size", "Scaling (in time) of the noise");
- RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
prop= RNA_def_property(srna, "strength", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "strength");
RNA_def_property_ui_text(prop, "Strength", "Amplitude of the noise - the amount that it modifies the underlying curve");
- RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
prop= RNA_def_property(srna, "phase", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "phase");
RNA_def_property_ui_text(prop, "Phase", "A random seed for the noise effect");
- RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
prop= RNA_def_property(srna, "depth", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "depth");
RNA_def_property_ui_text(prop, "Depth", "Amount of fine level detail present in the noise");
- RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
}
@@ -492,20 +459,17 @@ void rna_def_fmodifier(BlenderRNA *brna)
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", FMODIFIER_FLAG_MUTED);
RNA_def_property_ui_text(prop, "Muted", "F-Curve Modifier will not be evaluated.");
- RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_PROP, NULL);
// XXX this is really an internal flag, but it may be useful for some tools to be able to access this...
prop= RNA_def_property(srna, "disabled", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", FMODIFIER_FLAG_DISABLED);
RNA_def_property_ui_text(prop, "Disabled", "F-Curve Modifier has invalid settings and will not be evaluated.");
- RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_PROP, NULL);
// TODO: setting this to true must ensure that all others in stack are turned off too...
prop= RNA_def_property(srna, "active", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", FMODIFIER_FLAG_ACTIVE);
RNA_def_property_ui_text(prop, "Active", "F-Curve Modifier is the one being edited ");
- RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_PROP, NULL);
}
/* *********************** */
diff --git a/source/blender/makesrna/intern/rna_fluidsim.c b/source/blender/makesrna/intern/rna_fluidsim.c
index a62002365c9..936e1700ed7 100644
--- a/source/blender/makesrna/intern/rna_fluidsim.c
+++ b/source/blender/makesrna/intern/rna_fluidsim.c
@@ -72,17 +72,10 @@ static StructRNA* rna_FluidSettings_refine(struct PointerRNA *ptr)
}
}
-static void rna_fluid_update(bContext *C, PointerRNA *ptr)
-{
- Object *ob= ptr->id.data;
-
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
-}
-
static void rna_FluidSettings_update_type(bContext *C, PointerRNA *ptr)
{
Main *bmain= CTX_data_main(C);
+ Scene *scene= CTX_data_scene(C);
Object *ob= (Object*)ptr->id.data;
FluidsimModifierData *fluidmd;
ParticleSystemModifierData *psmd;
@@ -131,7 +124,8 @@ static void rna_FluidSettings_update_type(bContext *C, PointerRNA *ptr)
}
}
- rna_fluid_update(C, ptr);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob);
}
static void rna_DomainFluidSettings_memory_estimate_get(PointerRNA *ptr, char *value)
@@ -168,7 +162,7 @@ static void rna_def_fluidsim_slip(StructRNA *srna)
RNA_def_property_enum_items(prop, slip_items);
RNA_def_property_ui_text(prop, "Slip Type", "");
- prop= RNA_def_property(srna, "partial_slip_factor", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "partial_slip_amount", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "partSlipValue");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Partial Slip Amount", "Amount of mixing between no- and free-slip, 0 is no slip and 1 is free slip.");
@@ -222,7 +216,7 @@ static void rna_def_fluidsim_domain(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "guiDisplayMode");
RNA_def_property_enum_items(prop, quality_items);
RNA_def_property_ui_text(prop, "Viewport Display Mode", "How to display the mesh in the viewport.");
- RNA_def_property_update(prop, 0, "rna_fluid_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
prop= RNA_def_property(srna, "render_display_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "renderDisplayMode");
@@ -237,7 +231,7 @@ static void rna_def_fluidsim_domain(BlenderRNA *brna)
RNA_def_property_string_maxlength(prop, 240);
RNA_def_property_string_sdna(prop, NULL, "surfdataPath");
RNA_def_property_ui_text(prop, "Path", "Directory (and/or filename prefix) to store baked fluid simulation files in.");
- RNA_def_property_update(prop, 0, "rna_fluid_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
prop= RNA_def_property(srna, "memory_estimate", PROP_STRING, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
@@ -437,7 +431,7 @@ static void rna_def_fluidsim_particle(BlenderRNA *brna)
RNA_def_property_string_maxlength(prop, 240);
RNA_def_property_string_sdna(prop, NULL, "surfdataPath");
RNA_def_property_ui_text(prop, "Path", "Directory (and/or filename prefix) to store and load particles from.");
- RNA_def_property_update(prop, 0, "rna_fluid_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
}
static void rna_def_fluidsim_control(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_gpencil.c b/source/blender/makesrna/intern/rna_gpencil.c
deleted file mode 100644
index 72e77e93607..00000000000
--- a/source/blender/makesrna/intern/rna_gpencil.c
+++ /dev/null
@@ -1,252 +0,0 @@
-/**
- * $Id$
- *
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * Contributor(s): Blender Foundation (2009), Joshua Leung
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-#include <stdlib.h>
-
-#include "RNA_define.h"
-#include "RNA_types.h"
-#include "RNA_enum_types.h"
-
-#include "rna_internal.h"
-
-#include "DNA_gpencil_types.h"
-#include "DNA_scene_types.h"
-
-#include "MEM_guardedalloc.h"
-
-#ifdef RNA_RUNTIME
-
-static int rna_GPencilLayer_active_frame_editable(PointerRNA *ptr)
-{
- bGPDlayer *gpl= (bGPDlayer *)ptr->data;
-
- /* surely there must be other criteria too... */
- if (gpl->flag & GP_LAYER_LOCKED)
- return 0;
- else
- return 1;
-}
-
-void rna_GPencilLayer_active_set(PointerRNA *ptr, int value)
-{
- bGPdata *gpd= ptr->id.data;
- bGPDlayer *gpl= ptr->data;
-
- /* disabled all other layers anyway */
- if (GS(gpd->id.name) == ID_GD) {
- bGPDlayer *gl;
-
- for (gl= gpd->layers.first; gl; gl= gl->next)
- gl->flag &= ~GP_LAYER_ACTIVE;
- }
-
- /* if enabling value, make it active */
- if (value)
- gpl->flag |= GP_LAYER_ACTIVE;
-}
-
-#else
-
-void rna_def_gpencil_stroke_point(BlenderRNA *brna)
-{
- StructRNA *srna;
- PropertyRNA *prop;
-
- srna= RNA_def_struct(brna, "GPencilStrokePoint", NULL);
- RNA_def_struct_sdna(srna, "bGPDspoint");
- RNA_def_struct_ui_text(srna, "Grease Pencil Stroke Point", "Data point for freehand stroke curve.");
-
- prop= RNA_def_property(srna, "coordinates", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "x");
- RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "Coordinates", "");
-
- prop= RNA_def_property(srna, "pressure", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "pressure");
- RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Pressure", "Pressure of tablet at point when drawing it.");
-}
-
-void rna_def_gpencil_stroke(BlenderRNA *brna)
-{
- StructRNA *srna;
- PropertyRNA *prop;
-
- srna= RNA_def_struct(brna, "GPencilStroke", NULL);
- RNA_def_struct_sdna(srna, "bGPDstroke");
- RNA_def_struct_ui_text(srna, "Grease Pencil Stroke", "Freehand curve defining part of a sketch.");
-
- /* Points */
- prop= RNA_def_property(srna, "points", PROP_COLLECTION, PROP_NONE);
- RNA_def_property_collection_sdna(prop, NULL, "points", "totpoints");
- RNA_def_property_struct_type(prop, "GPencilStrokePoint");
- RNA_def_property_ui_text(prop, "Stroke Points", "Stroke data points");
-
- /* Flags - Readonly type-info really... */
- // TODO...
-}
-
-void rna_def_gpencil_frame(BlenderRNA *brna)
-{
- StructRNA *srna;
- PropertyRNA *prop;
-
- srna= RNA_def_struct(brna, "GPencilFrame", NULL);
- RNA_def_struct_sdna(srna, "bGPDframe");
- RNA_def_struct_ui_text(srna, "Grease Pencil Frame", "Collection of related sketches on a particular frame");
-
- /* Strokes */
- prop= RNA_def_property(srna, "strokes", PROP_COLLECTION, PROP_NONE);
- RNA_def_property_collection_sdna(prop, NULL, "strokes", NULL);
- RNA_def_property_struct_type(prop, "GPencilStroke");
- RNA_def_property_ui_text(prop, "Strokes", "Freehand curves defining the sketch on this frame.");
-
- /* Frame Number */
- prop= RNA_def_property(srna, "frame_number", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "framenum");
- RNA_def_property_range(prop, MINFRAME, MAXFRAME); // XXX note: this cannot occur on the same frame as another sketch
- RNA_def_property_ui_text(prop, "Frame Number", "The frame on which this sketch appears.");
-
- /* Flags */
- prop= RNA_def_property(srna, "paint_lock", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_FRAME_PAINT); // XXX should it be editable?
- RNA_def_property_ui_text(prop, "Paint Lock", "Frame is being edited (painted on).");
-
- prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_FRAME_SELECT);
- RNA_def_property_ui_text(prop, "Selected", "Frame is selected for editing in the DopeSheet.");
-}
-
-void rna_def_gpencil_layer(BlenderRNA *brna)
-{
- StructRNA *srna;
- PropertyRNA *prop;
-
- srna= RNA_def_struct(brna, "GPencilLayer", NULL);
- RNA_def_struct_sdna(srna, "bGPDlayer");
- RNA_def_struct_ui_text(srna, "Grease Pencil Layer", "Collection of related sketches");
-
- /* Name */
- prop= RNA_def_property(srna, "info", PROP_STRING, PROP_NONE);
- RNA_def_property_ui_text(prop, "Info", "Description of layer");
- RNA_def_struct_name_property(srna, prop);
-
- /* Frames */
- prop= RNA_def_property(srna, "frames", PROP_COLLECTION, PROP_NONE);
- RNA_def_property_collection_sdna(prop, NULL, "frames", NULL);
- RNA_def_property_struct_type(prop, "GPencilFrame");
- RNA_def_property_ui_text(prop, "Frames", "Sketches for this layer on different frames.");
-
- /* Active Frame */
- prop= RNA_def_property(srna, "active_frame", PROP_POINTER, PROP_NONE);
- RNA_def_property_pointer_sdna(prop, NULL, "actframe");
- RNA_def_property_ui_text(prop, "Active Frame", "Frame currently being displayed for this layer.");
- RNA_def_property_editable_func(prop, "rna_GPencilLayer_active_frame_editable");
-
- /* Drawing Color */
- prop= RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR);
- RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "Color", "Color that all sketches in this layer are drawn with.");
-
- prop= RNA_def_property(srna, "opacity", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "color[3]");
- RNA_def_property_range(prop, 0.3, 1.0f);
- RNA_def_property_ui_text(prop, "Opacity", "Visibility of strokes.");
-
- /* Line Thickness */
- prop= RNA_def_property(srna, "line_thickness", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "thickness");
- RNA_def_property_range(prop, 1, 10);
- RNA_def_property_ui_text(prop, "Thickness", "Thickness of strokes (in pixels).");
-
- /* Onion-Skinning */
- prop= RNA_def_property(srna, "use_onion_skinning", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_LAYER_ONIONSKIN);
- RNA_def_property_ui_text(prop, "Use Onion Skinning", "Ghost frames on either side of frame.");
-
- prop= RNA_def_property(srna, "max_ghost_range", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "gstep");
- RNA_def_property_range(prop, 0, 120);
- RNA_def_property_ui_text(prop, "Max Ghost Range", "Maximum number of frames on either side of the active frame to show. (0 = just show the 'first' available sketch on either side)");
-
- /* Flags */
- prop= RNA_def_property(srna, "hide", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_LAYER_HIDE);
- RNA_def_property_ui_text(prop, "Hide", "Layer doesn't get drawn.");
-
- prop= RNA_def_property(srna, "locked", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_LAYER_LOCKED);
- RNA_def_property_ui_text(prop, "Locked", "Layer is protected from further editing and/or frame changes.");
-
- prop= RNA_def_property(srna, "active", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_LAYER_ACTIVE);
- RNA_def_property_boolean_funcs(prop, NULL, "rna_GPencilLayer_active_set");
- RNA_def_property_ui_text(prop, "Active", "Layer is 'active' layer being edited.");
-
- prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_LAYER_SELECT);
- RNA_def_property_ui_text(prop, "Selected", "Layer is selected for editing in the DopeSheet.");
-
- // XXX keep this option?
- prop= RNA_def_property(srna, "show_points", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_LAYER_DRAWDEBUG);
- RNA_def_property_ui_text(prop, "Show Points", "Draw the points which make up the strokes (for debugging purposes).");
-
-}
-
-void rna_def_gpencil_data(BlenderRNA *brna)
-{
- StructRNA *srna;
- PropertyRNA *prop;
-
- srna= RNA_def_struct(brna, "GreasePencil", "ID");
- RNA_def_struct_sdna(srna, "bGPdata");
- RNA_def_struct_ui_text(srna, "Grease Pencil", "Freehand annotation sketchbook.");
- RNA_def_struct_ui_icon(srna, ICON_GREASEPENCIL);
-
- /* Layers */
- prop= RNA_def_property(srna, "layers", PROP_COLLECTION, PROP_NONE);
- RNA_def_property_collection_sdna(prop, NULL, "layers", NULL);
- RNA_def_property_struct_type(prop, "GPencilLayer");
- RNA_def_property_ui_text(prop, "Layers", "Similar to layers in Photoshop.");
-
- /* Flags */
- prop= RNA_def_property(srna, "view_space_draw", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_DATA_VIEWALIGN);
- RNA_def_property_ui_text(prop, "Stick to View", "Newly drawn strokes get added in view space (i.e. sketches stick to data when view is manipulated).");
-}
-
-/* --- */
-
-void RNA_def_gpencil(BlenderRNA *brna)
-{
- rna_def_gpencil_data(brna);
-
- rna_def_gpencil_layer(brna);
- rna_def_gpencil_frame(brna);
- rna_def_gpencil_stroke(brna);
- rna_def_gpencil_stroke_point(brna);
-}
-
-#endif
diff --git a/source/blender/makesrna/intern/rna_group.c b/source/blender/makesrna/intern/rna_group.c
index 31bc6ccc74b..18c04fbfb50 100644
--- a/source/blender/makesrna/intern/rna_group.c
+++ b/source/blender/makesrna/intern/rna_group.c
@@ -63,7 +63,7 @@ void RNA_def_group(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Objects", "A collection of this groups objects.");
RNA_def_property_collection_funcs(prop, 0, 0, 0, "rna_Group_objects_get", 0, 0, 0, 0, 0);
- prop= RNA_def_property(srna, "layer", PROP_BOOLEAN, PROP_LAYER);
+ prop= RNA_def_property(srna, "layer", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "layer", 1);
RNA_def_property_array(prop, 20);
RNA_def_property_ui_text(prop, "Dupli Layers", "Layers visible when this groups is instanced as a dupli.");
diff --git a/source/blender/makesrna/intern/rna_image_api.c b/source/blender/makesrna/intern/rna_image_api.c
index 31033031f4d..fee379cd285 100644
--- a/source/blender/makesrna/intern/rna_image_api.c
+++ b/source/blender/makesrna/intern/rna_image_api.c
@@ -1,5 +1,5 @@
/**
- * $Id$
+ *
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
diff --git a/source/blender/makesrna/intern/rna_internal.h b/source/blender/makesrna/intern/rna_internal.h
index c33a59cde3c..af94f0ccc6f 100644
--- a/source/blender/makesrna/intern/rna_internal.h
+++ b/source/blender/makesrna/intern/rna_internal.h
@@ -130,7 +130,6 @@ void RNA_def_curve(struct BlenderRNA *brna);
void RNA_def_fluidsim(struct BlenderRNA *brna);
void RNA_def_fcurve(struct BlenderRNA *brna);
void RNA_def_gameproperty(struct BlenderRNA *brna);
-void RNA_def_gpencil(struct BlenderRNA *brna);
void RNA_def_group(struct BlenderRNA *brna);
void RNA_def_image(struct BlenderRNA *brna);
void RNA_def_key(struct BlenderRNA *brna);
@@ -157,7 +156,6 @@ void RNA_def_sensor(struct BlenderRNA *brna);
void RNA_def_sequence(struct BlenderRNA *brna);
void RNA_def_smoke(struct BlenderRNA *brna);
void RNA_def_space(struct BlenderRNA *brna);
-void RNA_def_test(struct BlenderRNA *brna);
void RNA_def_text(struct BlenderRNA *brna);
void RNA_def_texture(struct BlenderRNA *brna);
void RNA_def_timeline_marker(struct BlenderRNA *brna);
@@ -196,18 +194,16 @@ void rna_object_vcollayer_name_set(struct PointerRNA *ptr, const char *value, ch
void rna_Object_update(struct bContext *C, struct PointerRNA *ptr);
void rna_Object_update_data(struct bContext *C, struct PointerRNA *ptr);
-void rna_Mesh_update_draw(struct bContext *C, struct PointerRNA *ptr);
/* API functions */
void RNA_api_action(StructRNA *srna);
void RNA_api_image(struct StructRNA *srna);
-void RNA_api_keyingset(struct StructRNA *srna);
void RNA_api_main(struct StructRNA *srna);
void RNA_api_material(StructRNA *srna);
void RNA_api_mesh(struct StructRNA *srna);
void RNA_api_object(struct StructRNA *srna);
-void RNA_api_scene(struct StructRNA *srna);
+void RNA_api_scene(struct StructRNA *srna);
void RNA_api_ui_layout(struct StructRNA *srna);
void RNA_api_wm(struct StructRNA *srna);
diff --git a/source/blender/makesrna/intern/rna_internal_types.h b/source/blender/makesrna/intern/rna_internal_types.h
index 645bc50ed89..12bd876ce52 100644
--- a/source/blender/makesrna/intern/rna_internal_types.h
+++ b/source/blender/makesrna/intern/rna_internal_types.h
@@ -39,13 +39,7 @@ struct bContext;
struct IDProperty;
struct GHash;
-#ifdef UNIT_TEST
-#define RNA_MAX_ARRAY_LENGTH 64
-#else
-#define RNA_MAX_ARRAY_LENGTH 32
-#endif
-
-#define RNA_MAX_ARRAY_DIMENSION 3
+#define RNA_MAX_ARRAY 32
/* Function Callbacks */
@@ -55,7 +49,6 @@ typedef struct IDProperty* (*IDPropertiesFunc)(struct PointerRNA *ptr, int creat
typedef struct StructRNA *(*StructRefineFunc)(struct PointerRNA *ptr);
typedef char *(*StructPathFunc)(struct PointerRNA *ptr);
-typedef int (*PropArrayLengthGetFunc)(struct PointerRNA *ptr, int length[RNA_MAX_ARRAY_DIMENSION]);
typedef int (*PropBooleanGetFunc)(struct PointerRNA *ptr);
typedef void (*PropBooleanSetFunc)(struct PointerRNA *ptr, int value);
typedef void (*PropBooleanArrayGetFunc)(struct PointerRNA *ptr, int *values);
@@ -136,13 +129,8 @@ struct PropertyRNA {
PropertyType type;
/* subtype, 'interpretation' of the property */
PropertySubType subtype;
- /* if non-NULL, overrides arraylength. Must not return 0? */
- PropArrayLengthGetFunc getlength;
- /* dimension of array */
- unsigned int arraydimension;
- /* array lengths lengths for all dimensions (when arraydimension > 0) */
- unsigned int arraylength[RNA_MAX_ARRAY_DIMENSION];
- unsigned int totarraylength;
+ /* if an array this is > 0, specifying the length */
+ unsigned int arraylength;
/* callback for updates on change */
UpdateFunc update;
diff --git a/source/blender/makesrna/intern/rna_key.c b/source/blender/makesrna/intern/rna_key.c
index fbe339fe7f3..88047cda12b 100644
--- a/source/blender/makesrna/intern/rna_key.c
+++ b/source/blender/makesrna/intern/rna_key.c
@@ -260,13 +260,14 @@ static PointerRNA rna_ShapeKey_data_get(CollectionPropertyIterator *iter)
static void rna_Key_update_data(bContext *C, PointerRNA *ptr)
{
Main *bmain= CTX_data_main(C);
+ Scene *scene= CTX_data_scene(C);
Key *key= ptr->id.data;
Object *ob;
for(ob=bmain->object.first; ob; ob= ob->id.next) {
if(ob_get_key(ob) == key) {
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob);
}
}
}
diff --git a/source/blender/makesrna/intern/rna_lattice.c b/source/blender/makesrna/intern/rna_lattice.c
index 1f7eee4d2d8..b53a0589ba6 100644
--- a/source/blender/makesrna/intern/rna_lattice.c
+++ b/source/blender/makesrna/intern/rna_lattice.c
@@ -89,10 +89,18 @@ static void rna_Lattice_points_begin(CollectionPropertyIterator *iter, PointerRN
static void rna_Lattice_update_data(bContext *C, PointerRNA *ptr)
{
- ID *id= ptr->id.data;
+ Main *bmain= CTX_data_main(C);
+ Scene *scene= CTX_data_scene(C);
+ Lattice *lt= ptr->id.data;
+ Object *ob;
- DAG_id_flush_update(id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, id);
+ for(ob=bmain->object.first; ob; ob= ob->id.next) {
+ if(ob->data == lt) {
+ /* XXX this will loop over all objects again (slow) */
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob);
+ }
+ }
}
static void rna_Lattice_update_size(bContext *C, PointerRNA *ptr)
diff --git a/source/blender/makesrna/intern/rna_main.c b/source/blender/makesrna/intern/rna_main.c
index 344135acaff..4a24027f7e9 100644
--- a/source/blender/makesrna/intern/rna_main.c
+++ b/source/blender/makesrna/intern/rna_main.c
@@ -207,30 +207,12 @@ static void rna_Main_particle_begin(CollectionPropertyIterator *iter, PointerRNA
rna_iterator_listbase_begin(iter, &bmain->particle, NULL);
}
-static void rna_Main_gpencil_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
-{
- Main *bmain= (Main*)ptr->data;
- rna_iterator_listbase_begin(iter, &bmain->gpencil, NULL);
-}
-
static void rna_Main_wm_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
Main *bmain= (Main*)ptr->data;
rna_iterator_listbase_begin(iter, &bmain->wm, NULL);
}
-#ifdef UNIT_TEST
-
-static PointerRNA rna_Test_test_get(PointerRNA *ptr)
-{
- PointerRNA ret= *ptr;
- ret.type= &RNA_Test;
-
- return ret;
-}
-
-#endif
-
#else
void RNA_def_main(BlenderRNA *brna)
@@ -258,14 +240,13 @@ void RNA_def_main(BlenderRNA *brna)
{"brushes", "Brush", "rna_Main_brush_begin", "Brushes", "Brush datablocks.", NULL, NULL},
{"worlds", "World", "rna_Main_world_begin", "Worlds", "World datablocks.", NULL, NULL},
{"groups", "Group", "rna_Main_group_begin", "Groups", "Group datablocks.", NULL, NULL},
- {"keys", "Key", "rna_Main_key_begin", "Keys", "Key datablocks.", NULL, NULL},
+ {"keys", "ID", "rna_Main_key_begin", "Keys", "Key datablocks.", NULL, NULL},
{"scripts", "ID", "rna_Main_script_begin", "Scripts", "Script datablocks.", NULL, NULL},
{"texts", "Text", "rna_Main_text_begin", "Texts", "Text datablocks.", NULL, NULL},
{"sounds", "ID", "rna_Main_sound_begin", "Sounds", "Sound datablocks.", NULL, NULL},
{"armatures", "Armature", "rna_Main_armature_begin", "Armatures", "Armature datablocks.", NULL, NULL},
{"actions", "Action", "rna_Main_action_begin", "Actions", "Action datablocks.", NULL, NULL},
{"particles", "ParticleSettings", "rna_Main_particle_begin", "Particles", "Particle datablocks.", NULL, NULL},
- {"gpencil", "GreasePencil", "rna_Main_gpencil_begin", "Grease Pencil", "Grease Pencil datablocks.", NULL, NULL},
{NULL, NULL, NULL, NULL, NULL, NULL, NULL}};
int i;
@@ -288,18 +269,6 @@ void RNA_def_main(BlenderRNA *brna)
}
RNA_api_main(srna);
-
-#ifdef UNIT_TEST
-
- RNA_define_verify_sdna(0);
-
- prop= RNA_def_property(srna, "test", PROP_POINTER, PROP_NONE);
- RNA_def_property_struct_type(prop, "Test");
- RNA_def_property_pointer_funcs(prop, "rna_Test_test_get", NULL, NULL);
-
- RNA_define_verify_sdna(1);
-
-#endif
}
#endif
diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c
index 44098e96547..93d6b0283bd 100644
--- a/source/blender/makesrna/intern/rna_material.c
+++ b/source/blender/makesrna/intern/rna_material.c
@@ -35,20 +35,6 @@
#include "WM_types.h"
-static EnumPropertyItem prop_texture_coordinates_items[] = {
-{TEXCO_GLOB, "GLOBAL", 0, "Global", "Uses global coordinates for the texture coordinates."},
-{TEXCO_OBJECT, "OBJECT", 0, "Object", "Uses linked object's coordinates for texture coordinates."},
-{TEXCO_UV, "UV", 0, "UV", "Uses UV coordinates for texture coordinates."},
-{TEXCO_ORCO, "ORCO", 0, "Generated", "Uses the original undeformed coordinates of the object."},
-{TEXCO_STRAND, "STRAND", 0, "Strand", "Uses normalized strand texture coordinate (1D)."},
-{TEXCO_STICKY, "STICKY", 0, "Sticky", "Uses mesh's sticky coordinates for the texture coordinates."},
-{TEXCO_WINDOW, "WINDOW", 0, "Window", "Uses screen coordinates as texture coordinates."},
-{TEXCO_NORM, "NORMAL", 0, "Normal", "Uses normal vector as texture coordinates."},
-{TEXCO_REFL, "REFLECTION", 0, "Reflection", "Uses reflection vector as texture coordinates."},
-{TEXCO_STRESS, "STRESS", 0, "Stress", "Uses the difference of edge lengths compared to original coordinates of the mesh."},
-{TEXCO_TANGENT, "TANGENT", 0, "Tangent", "Uses the optional tangent vector as texture coordinates."},
-{0, NULL, 0, NULL, NULL}};
-
#ifdef RNA_RUNTIME
#include "MEM_guardedalloc.h"
@@ -221,42 +207,6 @@ void rna_Material_use_nodes_set(PointerRNA *ptr, int value)
ED_node_shader_default(ma);
}
-static EnumPropertyItem *rna_Material_texture_coordinates_itemf(bContext *C, PointerRNA *ptr, int *free)
-{
- Material *ma= (Material*)ptr->id.data;
- EnumPropertyItem *item= NULL;
- int totitem= 0;
-
- if(C==NULL) {
- return prop_texture_coordinates_items;
- }
-
- RNA_enum_items_add_value(&item, &totitem, prop_texture_coordinates_items, TEXCO_GLOB);
- RNA_enum_items_add_value(&item, &totitem, prop_texture_coordinates_items, TEXCO_OBJECT);
- RNA_enum_items_add_value(&item, &totitem, prop_texture_coordinates_items, TEXCO_ORCO);
-
- if(ma->material_type == MA_TYPE_VOLUME) {
-
- }
- else if (ELEM3(ma->material_type, MA_TYPE_SURFACE, MA_TYPE_HALO, MA_TYPE_WIRE)) {
- RNA_enum_items_add_value(&item, &totitem, prop_texture_coordinates_items, TEXCO_UV);
- RNA_enum_items_add_value(&item, &totitem, prop_texture_coordinates_items, TEXCO_STRAND);
- RNA_enum_items_add_value(&item, &totitem, prop_texture_coordinates_items, TEXCO_STICKY);
- RNA_enum_items_add_value(&item, &totitem, prop_texture_coordinates_items, TEXCO_WINDOW);
- RNA_enum_items_add_value(&item, &totitem, prop_texture_coordinates_items, TEXCO_NORM);
- RNA_enum_items_add_value(&item, &totitem, prop_texture_coordinates_items, TEXCO_REFL);
- RNA_enum_items_add_value(&item, &totitem, prop_texture_coordinates_items, TEXCO_STRESS);
- RNA_enum_items_add_value(&item, &totitem, prop_texture_coordinates_items, TEXCO_TANGENT);
- }
-
- RNA_enum_item_end(&item, &totitem);
-
- *free= 1;
-
- return item;
-}
-
-
#else
static void rna_def_material_mtex(BlenderRNA *brna)
@@ -264,6 +214,21 @@ static void rna_def_material_mtex(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
+ static EnumPropertyItem prop_texture_coordinates_items[] = {
+ {TEXCO_GLOB, "GLOBAL", 0, "Global", "Uses global coordinates for the texture coordinates."},
+ {TEXCO_OBJECT, "OBJECT", 0, "Object", "Uses linked object's coordinates for texture coordinates."},
+ {TEXCO_UV, "UV", 0, "UV", "Uses UV coordinates for texture coordinates."},
+ {TEXCO_ORCO, "ORCO", 0, "Generated", "Uses the original undeformed coordinates of the object."},
+ {TEXCO_STRAND, "STRAND", 0, "Strand", "Uses normalized strand texture coordinate (1D)."},
+ {TEXCO_STICKY, "STICKY", 0, "Sticky", "Uses mesh's sticky coordinates for the texture coordinates."},
+ {TEXCO_WINDOW, "WINDOW", 0, "Window", "Uses screen coordinates as texture coordinates."},
+ {TEXCO_NORM, "NORMAL", 0, "Normal", "Uses normal vector as texture coordinates."},
+ {TEXCO_REFL, "REFLECTION", 0, "Reflection", "Uses reflection vector as texture coordinates."},
+ {TEXCO_STRESS, "STRESS", 0, "Stress", "Uses the difference of edge lengths compared to original coordinates of the mesh."},
+ {TEXCO_TANGENT, "TANGENT", 0, "Tangent", "Uses the optional tangent vector as texture coordinates."},
+
+ {0, NULL, 0, NULL, NULL}};
+
static EnumPropertyItem prop_mapping_items[] = {
{MTEX_FLAT, "FLAT", 0, "Flat", "Maps X and Y coordinates directly."},
{MTEX_CUBE, "CUBE", 0, "Cube", "Maps using the normal vector."},
@@ -306,10 +271,9 @@ static void rna_def_material_mtex(BlenderRNA *brna)
prop= RNA_def_property(srna, "texture_coordinates", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "texco");
RNA_def_property_enum_items(prop, prop_texture_coordinates_items);
- RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_Material_texture_coordinates_itemf");
RNA_def_property_ui_text(prop, "Texture Coordinates", "");
RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
+
prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "object");
RNA_def_property_struct_type(prop, "Object");
@@ -515,75 +479,6 @@ static void rna_def_material_mtex(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Ambient Factor", "Amount texture affects ambient.");
RNA_def_property_update(prop, NC_TEXTURE, NULL);
- /* volume material */
- prop= RNA_def_property(srna, "map_coloremission", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_EMISSION_COL);
- RNA_def_property_ui_text(prop, "Emission Color", "Causes the texture to affect the colour of emission");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop= RNA_def_property(srna, "map_colorabsorption", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_ABSORPTION_COL);
- RNA_def_property_ui_text(prop, "Absorption Color", "Causes the texture to affect the result colour after absorption");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop= RNA_def_property(srna, "map_density", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_DENSITY);
- RNA_def_property_ui_text(prop, "Density", "Causes the texture to affect the volume's density");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop= RNA_def_property(srna, "map_emission", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_EMISSION);
- RNA_def_property_ui_text(prop, "Emission", "Causes the texture to affect the volume's emission");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop= RNA_def_property(srna, "map_absorption", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_ABSORPTION);
- RNA_def_property_ui_text(prop, "Absorption", "Causes the texture to affect the volume's absorption");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop= RNA_def_property(srna, "map_scattering", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_SCATTERING);
- RNA_def_property_ui_text(prop, "Scattering", "Causes the texture to affect the volume's scattering");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop= RNA_def_property(srna, "coloremission_factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "colfac");
- RNA_def_property_ui_range(prop, 0, 1, 10, 3);
- RNA_def_property_ui_text(prop, "Emission Color Factor", "Amount texture affects emission color.");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop= RNA_def_property(srna, "colorabsorption_factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "colfac");
- RNA_def_property_ui_range(prop, 0, 1, 10, 3);
- RNA_def_property_ui_text(prop, "Absorpion Color Factor", "Amount texture affects diffuse color.");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop= RNA_def_property(srna, "density_factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "varfac");
- RNA_def_property_ui_range(prop, 0, 1, 10, 3);
- RNA_def_property_ui_text(prop, "Density Factor", "Amount texture affects density.");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop= RNA_def_property(srna, "emission_factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "varfac");
- RNA_def_property_ui_range(prop, 0, 1, 10, 3);
- RNA_def_property_ui_text(prop, "Emission Factor", "Amount texture affects emission.");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop= RNA_def_property(srna, "absorption_factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "varfac");
- RNA_def_property_ui_range(prop, 0, 1, 10, 3);
- RNA_def_property_ui_text(prop, "Absorption Factor", "Amount texture affects absorption.");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop= RNA_def_property(srna, "scattering_factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "varfac");
- RNA_def_property_ui_range(prop, 0, 1, 10, 3);
- RNA_def_property_ui_text(prop, "Scattering Factor", "Amount texture affects scattering.");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- /* end volume material */
-
prop= RNA_def_property(srna, "enabled", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_MaterialTextureSlot_enabled_get", "rna_MaterialTextureSlot_enabled_set");
RNA_def_property_ui_text(prop, "Enabled", "Enable this material texture slot.");
@@ -616,8 +511,6 @@ static void rna_def_material_colors(StructRNA *srna)
{MA_RAMP_SAT, "SATURATION", 0, "Saturation", ""},
{MA_RAMP_VAL, "VALUE", 0, "Value", ""},
{MA_RAMP_COLOR, "COLOR", 0, "Color", ""},
- {MA_RAMP_SOFT, "SOFT LIGHT", 0, "Soft Light", ""},
- {MA_RAMP_LINEAR, "LINEAR LIGHT", 0, "Linear Light", ""},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem prop_ramp_input_items[] = {
@@ -723,10 +616,10 @@ static void rna_def_material_diffuse(StructRNA *srna)
RNA_def_property_ui_text(prop, "Diffuse Shader Model", "");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
- prop= RNA_def_property(srna, "diffuse_intensity", PROP_FLOAT, PROP_PERCENTAGE);
+ prop= RNA_def_property(srna, "diffuse_reflection", PROP_FLOAT, PROP_PERCENTAGE);
RNA_def_property_float_sdna(prop, NULL, "ref");
RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Diffuse Intensity", "Amount of diffuse reflection.");
+ RNA_def_property_ui_text(prop, "Diffuse Reflection", "Amount of diffuse reflection.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING_DRAW, NULL);
prop= RNA_def_property(srna, "roughness", PROP_FLOAT, PROP_NONE);
@@ -784,10 +677,10 @@ static void rna_def_material_raymirror(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Enabled", "Enable raytraced reflections.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
- prop= RNA_def_property(srna, "reflect_factor", PROP_FLOAT, PROP_PERCENTAGE);
+ prop= RNA_def_property(srna, "reflect", PROP_FLOAT, PROP_PERCENTAGE);
RNA_def_property_float_sdna(prop, NULL, "ray_mirror");
RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Reflectivity", "Sets the amount mirror reflection for raytrace.");
+ RNA_def_property_ui_text(prop, "Reflect", "Sets the amount mirror reflection for raytrace.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "fresnel", PROP_FLOAT, PROP_NONE);
@@ -802,10 +695,10 @@ static void rna_def_material_raymirror(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Fresnel Factor", "Blending factor for Fresnel.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
- prop= RNA_def_property(srna, "gloss_factor", PROP_FLOAT, PROP_PERCENTAGE);
+ prop= RNA_def_property(srna, "gloss", PROP_FLOAT, PROP_PERCENTAGE);
RNA_def_property_float_sdna(prop, NULL, "gloss_mir");
RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Gloss Amount", "The shininess of the reflection. Values < 1.0 give diffuse, blurry reflections.");
+ RNA_def_property_ui_text(prop, "Gloss", "The shininess of the reflection. Values < 1.0 give diffuse, blurry reflections.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "gloss_anisotropic", PROP_FLOAT, PROP_PERCENTAGE);
@@ -873,10 +766,10 @@ static void rna_def_material_raytra(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Fresnel Factor", "Blending factor for Fresnel.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
- prop= RNA_def_property(srna, "gloss_factor", PROP_FLOAT, PROP_PERCENTAGE);
+ prop= RNA_def_property(srna, "gloss", PROP_FLOAT, PROP_PERCENTAGE);
RNA_def_property_float_sdna(prop, NULL, "gloss_tra");
RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Gloss Amount", "The clarity of the refraction. Values < 1.0 give diffuse, blurry refractions.");
+ RNA_def_property_ui_text(prop, "Gloss", "The clarity of the refraction. Values < 1.0 give diffuse, blurry refractions.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "gloss_samples", PROP_INT, PROP_NONE);
@@ -916,159 +809,6 @@ static void rna_def_material_raytra(BlenderRNA *brna)
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
}
-static void rna_def_material_volume(BlenderRNA *brna)
-{
- StructRNA *srna;
- PropertyRNA *prop;
-
- static EnumPropertyItem prop_scattering_items[] = {
- {MA_VOL_SHADE_NONE, "NONE", 0, "None", ""},
- {MA_VOL_SHADE_SINGLE, "SINGLE_SCATTERING", 0, "Single Scattering", ""},
- {MA_VOL_SHADE_MULTIPLE, "MULTIPLE_SCATTERING", 0, "Multiple Scattering", ""},
- {MA_VOL_SHADE_SINGLEPLUSMULTIPLE, "SINGLE_PLUS_MULTIPLE_SCATTERING", 0, "Single + Multiple Scattering", ""},
- {0, NULL, 0, NULL, NULL}};
-
- static EnumPropertyItem prop_stepsize_items[] = {
- {MA_VOL_STEP_RANDOMIZED, "RANDOMIZED", 0, "Randomized", ""},
- {MA_VOL_STEP_CONSTANT, "CONSTANT", 0, "Constant", ""},
- //{MA_VOL_STEP_ADAPTIVE, "ADAPTIVE", 0, "Adaptive", ""},
- {0, NULL, 0, NULL, NULL}};
-
- static EnumPropertyItem prop_phasefunction_items[] = {
- {MA_VOL_PH_ISOTROPIC, "ISOTROPIC", 0, "Isotropic", ""},
- {MA_VOL_PH_MIEHAZY, "MIE_HAZY", 0, "Mie Hazy", ""},
- {MA_VOL_PH_MIEMURKY, "MIE_MURKY", 0, "Mie Murky", ""},
- {MA_VOL_PH_RAYLEIGH, "RAYLEIGH", 0, "Rayleigh", ""},
- {MA_VOL_PH_HG, "HENYEY-GREENSTEIN", 0, "Henyey-Greenstein", ""},
- {MA_VOL_PH_SCHLICK, "SCHLICK", 0, "Schlick", ""},
- {0, NULL, 0, NULL, NULL}};
-
- srna= RNA_def_struct(brna, "MaterialVolume", NULL);
- RNA_def_struct_sdna(srna, "VolumeSettings");
- RNA_def_struct_nested(brna, srna, "Material");
- RNA_def_struct_ui_text(srna, "Material Volume", "Volume rendering settings for a Material datablock.");
-
- prop= RNA_def_property(srna, "step_calculation", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "stepsize_type");
- RNA_def_property_enum_items(prop, prop_stepsize_items);
- RNA_def_property_ui_text(prop, "Step Calculation", "Method of calculating the steps through the volume");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
-
- prop= RNA_def_property(srna, "step_size", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "stepsize");
- RNA_def_property_range(prop, 0.0f, FLT_MAX);
- RNA_def_property_ui_range(prop, 0.0f, 1.0f, 1, 3);
- RNA_def_property_ui_text(prop, "Step Size", "Distance between subsequent volume depth samples.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
-
- prop= RNA_def_property(srna, "shading_step_size", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "shade_stepsize");
- RNA_def_property_range(prop, 0.0f, FLT_MAX);
- RNA_def_property_ui_range(prop, 0.0f, 1.0f, 1, 3);
- RNA_def_property_ui_text(prop, "Shading Step Size", "Distance between subsequent volume shading samples.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
-
- prop= RNA_def_property(srna, "scattering_mode", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "shade_type");
- RNA_def_property_enum_items(prop, prop_scattering_items);
- RNA_def_property_ui_text(prop, "Scattering Mode", "Method of shading, attenuating, and scattering light through the volume");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
-
- prop= RNA_def_property(srna, "light_cache", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "shadeflag", MA_VOL_PRECACHESHADING); /* use bitflags */
- RNA_def_property_ui_text(prop, "Light Cache", "Pre-calculate the shading information into a voxel grid, speeds up shading at slightly less accuracy");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
-
- prop= RNA_def_property(srna, "cache_resolution", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "precache_resolution");
- RNA_def_property_range(prop, 0, 1024);
- RNA_def_property_ui_text(prop, "Resolution", "Resolution of the voxel grid, low resolutions are faster, high resolutions use more memory.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
-
- prop= RNA_def_property(srna, "ms_diffusion", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "ms_diff");
- RNA_def_property_range(prop, 0.0f, FLT_MAX);
- RNA_def_property_ui_text(prop, "Diffusion", "Diffusion factor, the strength of the blurring effect");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
-
- prop= RNA_def_property(srna, "ms_spread", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "ms_steps");
- RNA_def_property_range(prop, 0, 1024);
- RNA_def_property_ui_text(prop, "Spread", "Simulation steps, the effective distance over which the light is diffused");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
-
- prop= RNA_def_property(srna, "ms_intensity", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "ms_intensity");
- RNA_def_property_range(prop, 0.0f, FLT_MAX);
- RNA_def_property_ui_text(prop, "Intensity", "Multiplier for multiple scattered light energy");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
-
- prop= RNA_def_property(srna, "depth_cutoff", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "depth_cutoff");
- RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Depth Cutoff", "Stop ray marching early if transmission drops below this luminance - higher values give speedups in dense volumes at the expense of accuracy.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
-
- prop= RNA_def_property(srna, "density", PROP_FLOAT, PROP_PERCENTAGE);
- RNA_def_property_float_sdna(prop, NULL, "density");
- RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Density", "The base density of the volume");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
-
- prop= RNA_def_property(srna, "density_scale", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "density_scale");
- RNA_def_property_range(prop, 0.0f, FLT_MAX);
- RNA_def_property_ui_range(prop, 0.0f, 10.0f, 1, 3);
- RNA_def_property_ui_text(prop, "Density Scale", "Multiplier for the material's density");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
-
- prop= RNA_def_property(srna, "absorption", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "absorption");
- RNA_def_property_range(prop, 0.0f, FLT_MAX);
- RNA_def_property_ui_range(prop, 0.0f, 10.0f, 1, 3);
- RNA_def_property_ui_text(prop, "Absorption", "Amount of light that gets absorbed by the volume - higher values mean light travels less distance");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
-
- prop= RNA_def_property(srna, "absorption_color", PROP_FLOAT, PROP_COLOR);
- RNA_def_property_float_sdna(prop, NULL, "absorption_col");
- RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "Absorption Color", "");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING_DRAW, NULL);
-
- prop= RNA_def_property(srna, "scattering", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "scattering");
- RNA_def_property_range(prop, 0.0f, FLT_MAX);
- RNA_def_property_ui_range(prop, 0.0f, 10.0f, 1 ,3);
- RNA_def_property_ui_text(prop, "Scattering", "Amount of light that gets scattered by the volume - values > 1.0 are non-physical");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
-
- prop= RNA_def_property(srna, "emission", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "emission");
- RNA_def_property_range(prop, 0.0f, FLT_MAX);
- RNA_def_property_ui_range(prop, 0.0f, 10.0f, 1, 3);
- RNA_def_property_ui_text(prop, "Emission", "Amount of light that gets emitted by the volume");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
-
- prop= RNA_def_property(srna, "emission_color", PROP_FLOAT, PROP_COLOR);
- RNA_def_property_float_sdna(prop, NULL, "emission_col");
- RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "Emission Color", "");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING_DRAW, NULL);
-
- prop= RNA_def_property(srna, "phase_function", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "phasefunc_type");
- RNA_def_property_enum_items(prop, prop_phasefunction_items);
- RNA_def_property_ui_text(prop, "Phase Function", "Isotropic/Anisotropic scattering");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
-
- prop= RNA_def_property(srna, "asymmetry", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "phasefunc_g");
- RNA_def_property_range(prop, -1.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Asymmetry", "Continuum between forward scattering and back scattering");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
-}
-
-
static void rna_def_material_halo(BlenderRNA *brna)
{
StructRNA *srna;
@@ -1171,14 +911,14 @@ static void rna_def_material_halo(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Star", "Renders halo as a star.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
- prop= RNA_def_property(srna, "texture", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "use_texture", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_HALOTEX);
- RNA_def_property_ui_text(prop, "Texture", "Gives halo a texture.");
+ RNA_def_property_ui_text(prop, "Use Texture", "Gives halo a texture.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
- prop= RNA_def_property(srna, "vertex_normal", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "use_vertex_normal", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_HALOPUNO);
- RNA_def_property_ui_text(prop, "Vertex Normal", "Uses the vertex normal to specify the dimension of the halo.");
+ RNA_def_property_ui_text(prop, "Use Vertex Normal", "Uses the vertex normal to specify the dimension of the halo.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "xalpha", PROP_BOOLEAN, PROP_NONE);
@@ -1285,10 +1025,10 @@ void rna_def_material_specularity(StructRNA *srna)
RNA_def_property_ui_text(prop, "Specular Shader Model", "");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
- prop= RNA_def_property(srna, "specular_intensity", PROP_FLOAT, PROP_PERCENTAGE);
+ prop= RNA_def_property(srna, "specular_reflection", PROP_FLOAT, PROP_PERCENTAGE);
RNA_def_property_float_sdna(prop, NULL, "spec");
RNA_def_property_range(prop, 0, 1);
- RNA_def_property_ui_text(prop, "Specular Intensity", "");
+ RNA_def_property_ui_text(prop, "Specularity Intensity", "");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
/* NOTE: "har", "param", etc are used for multiple purposes depending on
@@ -1358,16 +1098,16 @@ void rna_def_material_strand(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Blender Units", "Use Blender units for widths instead of pixels.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
- prop= RNA_def_property(srna, "root_size", PROP_FLOAT, PROP_UNSIGNED);
+ prop= RNA_def_property(srna, "start_size", PROP_FLOAT, PROP_UNSIGNED);
RNA_def_property_float_sdna(prop, NULL, "strand_sta");
RNA_def_property_float_funcs(prop, NULL, NULL, "rna_MaterialStrand_start_size_range");
- RNA_def_property_ui_text(prop, "Root Size", "Start size of strands in pixels Blender units.");
+ RNA_def_property_ui_text(prop, "Start Size", "Start size of strands in pixels Blender units.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
- prop= RNA_def_property(srna, "tip_size", PROP_FLOAT, PROP_UNSIGNED);
+ prop= RNA_def_property(srna, "end_size", PROP_FLOAT, PROP_UNSIGNED);
RNA_def_property_float_sdna(prop, NULL, "strand_end");
RNA_def_property_float_funcs(prop, NULL, NULL, "rna_MaterialStrand_end_size_range");
- RNA_def_property_ui_text(prop, "Tip Size", "Start size of strands in pixels or Blender units.");
+ RNA_def_property_ui_text(prop, "End Size", "Start size of strands in pixels or Blender units.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "min_size", PROP_FLOAT, PROP_UNSIGNED);
@@ -1442,7 +1182,7 @@ void RNA_def_material(BlenderRNA *brna)
static EnumPropertyItem prop_type_items[] = {
{MA_TYPE_SURFACE, "SURFACE", 0, "Surface", "Render object as a surface."},
{MA_TYPE_WIRE, "WIRE", 0, "Wire", "Render the edges of faces as wires (not supported in ray tracing)."},
- {MA_TYPE_VOLUME, "VOLUME", 0, "Volume", "Render object as a volume."},
+ // {MA_TYPE_VOLUME, "VOLUME", 0, "Volume", "Render object as a volume."},
{MA_TYPE_HALO, "HALO", 0, "Halo", "Render object as halo particles."},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem transparency_items[] = {
@@ -1589,9 +1329,9 @@ void RNA_def_material(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Exclude Mist", "Excludes this material from mist effects (in world settings)");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
- prop= RNA_def_property(srna, "receive_transparent_shadows", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "transparent_shadows", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_SHADOW_TRA);
- RNA_def_property_ui_text(prop, "Receive Transparent Shadows", "Allow this object to receive transparent shadows casted through other objects");
+ RNA_def_property_ui_text(prop, "Transparent Shadows", "Allow this object to receive transparent shadows casted through other objects");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "ray_shadow_bias", PROP_BOOLEAN, PROP_NONE);
@@ -1625,11 +1365,6 @@ void RNA_def_material(BlenderRNA *brna)
RNA_def_property_pointer_funcs(prop, "rna_Material_transp_get", NULL, NULL);
RNA_def_property_ui_text(prop, "Raytrace Transparency", "Raytraced reflection settings for the material.");
- prop= RNA_def_property(srna, "volume", PROP_POINTER, PROP_NEVER_NULL);
- RNA_def_property_pointer_sdna(prop, NULL, "vol");
- RNA_def_property_struct_type(prop, "MaterialVolume");
- RNA_def_property_ui_text(prop, "Volume", "Volume settings for the material.");
-
prop= RNA_def_property(srna, "halo", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "MaterialHalo");
RNA_def_property_pointer_funcs(prop, "rna_Material_halo_get", NULL, NULL);
@@ -1673,7 +1408,6 @@ void RNA_def_material(BlenderRNA *brna)
/* nested structs */
rna_def_material_raymirror(brna);
rna_def_material_raytra(brna);
- rna_def_material_volume(brna);
rna_def_material_halo(brna);
rna_def_material_sss(brna);
rna_def_material_mtex(brna);
@@ -1698,13 +1432,11 @@ void rna_def_mtex_common(StructRNA *srna, const char *begin, const char *activeg
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_pointer_funcs(prop, activeget, activeset, NULL);
RNA_def_property_ui_text(prop, "Active Texture", "Active texture slot being displayed.");
- RNA_def_property_update(prop, NC_TEXTURE|ND_SHADING_DRAW, NULL);
prop= RNA_def_property(srna, "active_texture_index", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "texact");
RNA_def_property_range(prop, 0, MAX_MTEX-1);
RNA_def_property_ui_text(prop, "Active Texture Index", "Index of active texture slot.");
- RNA_def_property_update(prop, NC_TEXTURE|ND_SHADING_DRAW, NULL);
}
#endif
diff --git a/source/blender/makesrna/intern/rna_material_api.c b/source/blender/makesrna/intern/rna_material_api.c
index e5dded2e53c..aa28b6b923c 100644
--- a/source/blender/makesrna/intern/rna_material_api.c
+++ b/source/blender/makesrna/intern/rna_material_api.c
@@ -1,5 +1,5 @@
/**
- * $Id$
+ *
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c
index f1a46b199b4..a8c9e799e91 100644
--- a/source/blender/makesrna/intern/rna_mesh.c
+++ b/source/blender/makesrna/intern/rna_mesh.c
@@ -55,24 +55,18 @@
static void rna_Mesh_update_data(bContext *C, PointerRNA *ptr)
{
+ Main *bmain= CTX_data_main(C);
+ Scene *scene= CTX_data_scene(C);
ID *id= ptr->id.data;
+ Object *ob;
- DAG_id_flush_update(id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, id);
-}
-
-static void rna_Mesh_update_select(bContext *C, PointerRNA *ptr)
-{
- ID *id= ptr->id.data;
-
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, id);
-}
-
-void rna_Mesh_update_draw(bContext *C, PointerRNA *ptr)
-{
- ID *id= ptr->id.data;
-
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, id);
+ for(ob=bmain->object.first; ob; ob= ob->id.next) {
+ if(ob->data == id) {
+ /* XXX this will loop over all objects again (slow) */
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob);
+ }
+ }
}
static void rna_MeshVertex_normal_get(PointerRNA *ptr, float *value)
@@ -407,48 +401,6 @@ static void rna_MeshTextureFace_uv4_set(PointerRNA *ptr, const float *values)
mtface->uv[3][1]= values[1];
}
-static int rna_CustomDataData_numverts(PointerRNA *ptr, int type)
-{
- Mesh *me= (Mesh*)ptr->id.data;
- CustomData *fdata= rna_mesh_fdata(me);
- CustomDataLayer *cdl;
- int a;
- size_t b;
-
- for(cdl=fdata->layers, a=0; a<fdata->totlayer; cdl++, a++) {
- if(cdl->type == type) {
- b= ((char*)ptr->data - ((char*)cdl->data))/CustomData_sizeof(type);
- if(b >= 0 && b < me->totface)
- return (me->mface[b].v4? 4: 3);
- }
- }
-
- return 0;
-}
-
-static int rna_MeshTextureFace_uv_get_length(PointerRNA *ptr, int length[RNA_MAX_ARRAY_DIMENSION])
-{
- length[0]= rna_CustomDataData_numverts(ptr, CD_MTFACE);
- length[1]= 2;
- return length[0]*length[1];
-}
-
-static void rna_MeshTextureFace_uv_get(PointerRNA *ptr, float *values)
-{
- MTFace *mtface= (MTFace*)ptr->data;
- int totvert= rna_CustomDataData_numverts(ptr, CD_MTFACE);
-
- memcpy(values, mtface->uv, totvert * 2 * sizeof(float));
-}
-
-static void rna_MeshTextureFace_uv_set(PointerRNA *ptr, const float *values)
-{
- MTFace *mtface= (MTFace*)ptr->data;
- int totvert= rna_CustomDataData_numverts(ptr, CD_MTFACE);
-
- memcpy(mtface->uv, values, totvert * 2 * sizeof(float));
-}
-
static void rna_MeshTextureFaceLayer_data_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
Mesh *me= (Mesh*)ptr->id.data;
@@ -711,30 +663,6 @@ static void rna_TextureFace_image_set(PointerRNA *ptr, PointerRNA value)
tf->tpage= (struct Image*)id;
}
-static int rna_MeshFace_verts_get_length(PointerRNA *ptr, int length[RNA_MAX_ARRAY_DIMENSION])
-{
- MFace *face= (MFace*)ptr->data;
-
- if(face)
- length[0]= (face->v4)? 4: 3;
- else
- length[0]= 4; // XXX rna_raw_access wants the length of a dummy face. this needs fixing. - Campbell
-
- return length[0];
-}
-
-static void rna_MeshFace_verts_get(PointerRNA *ptr, int *values)
-{
- MFace *face= (MFace*)ptr->data;
- memcpy(values, &face->v1, (face->v4 ? 4 : 3) * sizeof(int));
-}
-
-static void rna_MeshFace_verts_set(PointerRNA *ptr, const int *values)
-{
- MFace *face= (MFace*)ptr->data;
- memcpy(&face->v1, values, (face->v4 ? 4 : 3) * sizeof(int));
-}
-
/* path construction */
static char *rna_VertexGroupElement_path(PointerRNA *ptr)
@@ -860,12 +788,10 @@ static void rna_def_mvert_group(BlenderRNA *brna)
RNA_def_property_int_sdna(prop, NULL, "def_nr");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Group Index", "");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "weight", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Weight", "Vertex Weight");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
}
static void rna_def_mvert(BlenderRNA *brna)
@@ -881,7 +807,6 @@ static void rna_def_mvert(BlenderRNA *brna)
prop= RNA_def_property(srna, "co", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_ui_text(prop, "Location", "");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "normal", PROP_FLOAT, PROP_DIRECTION);
RNA_def_property_float_sdna(prop, NULL, "no");
@@ -892,17 +817,14 @@ static void rna_def_mvert(BlenderRNA *brna)
prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SELECT);
RNA_def_property_ui_text(prop, "Selected", "");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_select");
prop= RNA_def_property(srna, "hidden", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ME_HIDE);
RNA_def_property_ui_text(prop, "Hidden", "");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_select");
prop= RNA_def_property(srna, "bevel_weight", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_funcs(prop, "rna_MeshVertex_bevel_weight_get", "rna_MeshVertex_bevel_weight_set", NULL);
RNA_def_property_ui_text(prop, "Bevel Weight", "Weight used by the Bevel modifier 'Only Vertices' option");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "groups", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_funcs(prop, "rna_MeshVertex_groups_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", 0, 0, 0, 0, 0);
@@ -930,32 +852,26 @@ static void rna_def_medge(BlenderRNA *brna)
prop= RNA_def_property(srna, "crease", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_funcs(prop, "rna_MEdge_crease_get", "rna_MEdge_crease_set", NULL);
RNA_def_property_ui_text(prop, "Crease", "Weight used by the Subsurf modifier for creasing");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "bevel_weight", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_funcs(prop, "rna_MEdge_bevel_weight_get", "rna_MEdge_bevel_weight_set", NULL);
RNA_def_property_ui_text(prop, "Bevel Weight", "Weight used by the Bevel modifier");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SELECT);
RNA_def_property_ui_text(prop, "Selected", "");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_select");
prop= RNA_def_property(srna, "hidden", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ME_HIDE);
RNA_def_property_ui_text(prop, "Hidden", "");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_select");
prop= RNA_def_property(srna, "seam", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ME_SEAM);
RNA_def_property_ui_text(prop, "Seam", "Seam edge for UV unwrapping");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_select");
prop= RNA_def_property(srna, "sharp", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ME_SHARP);
RNA_def_property_ui_text(prop, "Sharp", "Sharp edge for the EdgeSplit modifier");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "loose", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ME_LOOSEEDGE);
@@ -979,7 +895,6 @@ static void rna_def_mface(BlenderRNA *brna)
RNA_def_struct_path_func(srna, "rna_MeshFace_path");
RNA_def_struct_ui_icon(srna, ICON_FACESEL);
- // XXX allows creating invalid meshes
prop= RNA_def_property(srna, "verts", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "v1");
RNA_def_property_array(prop, 4);
@@ -989,28 +904,25 @@ static void rna_def_mface(BlenderRNA *brna)
RNA_def_property_int_funcs(prop, "rna_MeshFace_verts_get", "rna_MeshFace_verts_set", NULL);
*/
RNA_def_property_ui_text(prop, "Vertices", "Vertex indices");
+ // XXX allows creating invalid meshes
prop= RNA_def_property(srna, "material_index", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "mat_nr");
RNA_def_property_ui_text(prop, "Material Index", "");
RNA_def_property_int_funcs(prop, NULL, NULL, "rna_MeshFace_material_index_range");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ME_FACE_SEL);
RNA_def_property_ui_text(prop, "Selected", "");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_select");
prop= RNA_def_property(srna, "hidden", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ME_HIDE);
RNA_def_property_ui_text(prop, "Hidden", "");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_select");
prop= RNA_def_property(srna, "smooth", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ME_SMOOTH);
RNA_def_property_ui_text(prop, "Smooth", "");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
-
+
prop= RNA_def_property(srna, "normal", PROP_FLOAT, PROP_DIRECTION);
RNA_def_property_array(prop, 3);
RNA_def_property_range(prop, -1.0f, 1.0f);
@@ -1029,30 +941,25 @@ static void rna_def_mtface(BlenderRNA *brna)
{TF_ALPHA, "ALPHA", 0, "Alpha", "Render polygon transparent, depending on alpha channel of the texture"},
{TF_CLIP, "CLIPALPHA", 0, "Clip Alpha", "Use the images alpha values clipped with no blending (binary alpha)"},
{0, NULL, 0, NULL, NULL}};
- int uv_dim[]= {4, 2};
srna= RNA_def_struct(brna, "MeshTextureFaceLayer", NULL);
RNA_def_struct_ui_text(srna, "Mesh Texture Face Layer", "Layer of texture faces in a Mesh datablock.");
RNA_def_struct_sdna(srna, "CustomDataLayer");
RNA_def_struct_path_func(srna, "rna_MeshTextureFaceLayer_path");
- RNA_def_struct_ui_icon(srna, ICON_GROUP_UVS);
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_struct_name_property(srna, prop);
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_MeshTextureFaceLayer_name_set");
RNA_def_property_ui_text(prop, "Name", "");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "active", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_MeshTextureFaceLayer_active_get", "rna_MeshTextureFaceLayer_active_set");
RNA_def_property_ui_text(prop, "Active", "Sets the layer as active for display and editing");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "active_render", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "active_rnd", 0);
RNA_def_property_boolean_funcs(prop, "rna_MeshTextureFaceLayer_active_render_get", "rna_MeshTextureFaceLayer_active_render_set");
RNA_def_property_ui_text(prop, "Active Render", "Sets the layer as active for rendering");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "data", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "MeshTextureFace");
@@ -1070,117 +977,88 @@ static void rna_def_mtface(BlenderRNA *brna)
RNA_def_property_pointer_funcs(prop, NULL, "rna_TextureFace_image_set", NULL);
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Image", "");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "tex", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", TF_TEX);
RNA_def_property_ui_text(prop, "Tex", "Render face with texture");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "light", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", TF_LIGHT);
RNA_def_property_ui_text(prop, "Light", "Use light for face");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "invisible", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", TF_INVISIBLE);
RNA_def_property_ui_text(prop, "Invisible", "Make face invisible");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "collision", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", TF_DYNAMIC);
RNA_def_property_ui_text(prop, "Collision", "Use face for collision and ray-sensor detection");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "shared", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", TF_SHAREDCOL);
RNA_def_property_ui_text(prop, "Shared", "Blend vertex colors across face when vertices are shared");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "twoside", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", TF_TWOSIDE);
RNA_def_property_ui_text(prop, "Twoside", "Render face twosided");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "object_color", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", TF_OBCOL);
RNA_def_property_ui_text(prop, "Object Color", "Use ObColor instead of vertex colors");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "halo", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", TF_BILLBOARD);
RNA_def_property_ui_text(prop, "Halo", "Screen aligned billboard");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "billboard", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", TF_BILLBOARD2);
RNA_def_property_ui_text(prop, "Billboard", "Billboard with Z-axis constraint");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "shadow", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", TF_SHADOW);
RNA_def_property_ui_text(prop, "Shadow", "Face is used for shadow");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "text", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", TF_BMFONT);
RNA_def_property_ui_text(prop, "Text", "Enable bitmap text on face");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "alpha_sort", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", TF_ALPHASORT);
RNA_def_property_ui_text(prop, "Alpha Sort", "Enable sorting of faces for correct alpha drawing (slow, use Clip Alpha instead when possible)");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "transp", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, transp_items);
RNA_def_property_ui_text(prop, "Transparency", "Transparency blending mode");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "uv_selected", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", TF_SEL1);
RNA_def_property_array(prop, 4);
RNA_def_property_ui_text(prop, "UV Selected", "");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_select");
prop= RNA_def_property(srna, "uv_pinned", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "unwrap", TF_PIN1);
RNA_def_property_array(prop, 4);
RNA_def_property_ui_text(prop, "UV Pinned", "");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_select");
prop= RNA_def_property(srna, "uv1", PROP_FLOAT, PROP_XYZ);
RNA_def_property_array(prop, 2);
RNA_def_property_float_funcs(prop, "rna_MeshTextureFace_uv1_get", "rna_MeshTextureFace_uv1_set", NULL);
RNA_def_property_ui_text(prop, "UV 1", "");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "uv2", PROP_FLOAT, PROP_XYZ);
RNA_def_property_array(prop, 2);
RNA_def_property_float_funcs(prop, "rna_MeshTextureFace_uv2_get", "rna_MeshTextureFace_uv2_set", NULL);
RNA_def_property_ui_text(prop, "UV 2", "");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "uv3", PROP_FLOAT, PROP_XYZ);
RNA_def_property_array(prop, 2);
RNA_def_property_float_funcs(prop, "rna_MeshTextureFace_uv3_get", "rna_MeshTextureFace_uv3_set", NULL);
RNA_def_property_ui_text(prop, "UV 3", "");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "uv4", PROP_FLOAT, PROP_XYZ);
RNA_def_property_array(prop, 2);
RNA_def_property_float_funcs(prop, "rna_MeshTextureFace_uv4_get", "rna_MeshTextureFace_uv4_set", NULL);
RNA_def_property_ui_text(prop, "UV 4", "");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
-
- prop= RNA_def_property(srna, "uv", PROP_FLOAT, PROP_NONE);
- RNA_def_property_multi_array(prop, 2, uv_dim);
- RNA_def_property_flag(prop, PROP_DYNAMIC);
- RNA_def_property_dynamic_array_funcs(prop, "rna_MeshTextureFace_uv_get_length");
- RNA_def_property_float_funcs(prop, "rna_MeshTextureFace_uv_get", "rna_MeshTextureFace_uv_set", NULL);
- RNA_def_property_ui_text(prop, "UV", "");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
}
static void rna_def_msticky(BlenderRNA *brna)
@@ -1195,7 +1073,6 @@ static void rna_def_msticky(BlenderRNA *brna)
prop= RNA_def_property(srna, "co", PROP_FLOAT, PROP_XYZ);
RNA_def_property_ui_text(prop, "Location", "Sticky texture coordinate location.");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
}
static void rna_def_mcol(BlenderRNA *brna)
@@ -1207,24 +1084,20 @@ static void rna_def_mcol(BlenderRNA *brna)
RNA_def_struct_ui_text(srna, "Mesh Vertex Color Layer", "Layer of vertex colors in a Mesh datablock.");
RNA_def_struct_sdna(srna, "CustomDataLayer");
RNA_def_struct_path_func(srna, "rna_MeshColorLayer_path");
- RNA_def_struct_ui_icon(srna, ICON_GROUP_VCOL);
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_struct_name_property(srna, prop);
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_MeshColorLayer_name_set");
RNA_def_property_ui_text(prop, "Name", "");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "active", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_MeshColorLayer_active_get", "rna_MeshColorLayer_active_set");
RNA_def_property_ui_text(prop, "Active", "Sets the layer as active for display and editing");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "active_render", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "active_rnd", 0);
RNA_def_property_boolean_funcs(prop, "rna_MeshColorLayer_active_render_get", "rna_MeshColorLayer_active_render_set");
RNA_def_property_ui_text(prop, "Active Render", "Sets the layer as active for rendering");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "data", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "MeshColor");
@@ -1241,28 +1114,24 @@ static void rna_def_mcol(BlenderRNA *brna)
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_float_funcs(prop, "rna_MeshColor_color1_get", "rna_MeshColor_color1_set", NULL);
RNA_def_property_ui_text(prop, "Color 1", "");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "color2", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_float_funcs(prop, "rna_MeshColor_color2_get", "rna_MeshColor_color2_set", NULL);
RNA_def_property_ui_text(prop, "Color 2", "");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "color3", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_float_funcs(prop, "rna_MeshColor_color3_get", "rna_MeshColor_color3_set", NULL);
RNA_def_property_ui_text(prop, "Color 3", "");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "color4", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_float_funcs(prop, "rna_MeshColor_color4_get", "rna_MeshColor_color4_set", NULL);
RNA_def_property_ui_text(prop, "Color 4", "");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
}
static void rna_def_mproperties(BlenderRNA *brna)
@@ -1279,7 +1148,6 @@ static void rna_def_mproperties(BlenderRNA *brna)
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_struct_name_property(srna, prop);
RNA_def_property_ui_text(prop, "Name", "");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "data", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "MeshFloatProperty");
@@ -1294,7 +1162,6 @@ static void rna_def_mproperties(BlenderRNA *brna)
prop= RNA_def_property(srna, "value", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "f");
RNA_def_property_ui_text(prop, "Value", "");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
/* Int */
srna= RNA_def_struct(brna, "MeshIntPropertyLayer", NULL);
@@ -1305,7 +1172,6 @@ static void rna_def_mproperties(BlenderRNA *brna)
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_struct_name_property(srna, prop);
RNA_def_property_ui_text(prop, "Name", "");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "data", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "MeshIntProperty");
@@ -1320,7 +1186,6 @@ static void rna_def_mproperties(BlenderRNA *brna)
prop= RNA_def_property(srna, "value", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "i");
RNA_def_property_ui_text(prop, "Value", "");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
/* String */
srna= RNA_def_struct(brna, "MeshStringPropertyLayer", NULL);
@@ -1331,7 +1196,6 @@ static void rna_def_mproperties(BlenderRNA *brna)
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_struct_name_property(srna, prop);
RNA_def_property_ui_text(prop, "Name", "");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "data", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "MeshStringProperty");
@@ -1346,7 +1210,6 @@ static void rna_def_mproperties(BlenderRNA *brna)
prop= RNA_def_property(srna, "value", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "s");
RNA_def_property_ui_text(prop, "Value", "");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
}
void rna_def_texmat_common(StructRNA *srna, const char *texspace_editable)
@@ -1362,20 +1225,17 @@ void rna_def_texmat_common(StructRNA *srna, const char *texspace_editable)
RNA_def_property_float_sdna(prop, NULL, "loc");
RNA_def_property_ui_text(prop, "Texure Space Location", "Texture space location.");
RNA_def_property_editable_func(prop, texspace_editable);
- RNA_def_property_update(prop, 0, "rna_Mesh_update_draw");
prop= RNA_def_property(srna, "texspace_size", PROP_FLOAT, PROP_XYZ);
RNA_def_property_float_sdna(prop, NULL, "size");
RNA_def_property_ui_text(prop, "Texture Space Size", "Texture space size.");
RNA_def_property_editable_func(prop, texspace_editable);
- RNA_def_property_update(prop, 0, "rna_Mesh_update_draw");
/* not supported yet
prop= RNA_def_property(srna, "texspace_rot", PROP_FLOAT, PROP_EULER);
RNA_def_property_float(prop, NULL, "rot");
RNA_def_property_ui_text(prop, "Texture Space Rotation", "Texture space rotation");
- RNA_def_property_editable_func(prop, texspace_editable);
- RNA_def_property_update(prop, 0, "rna_Mesh_update_draw");*/
+ RNA_def_property_editable_func(prop, texspace_editable);*/
/* materials */
prop= RNA_def_property(srna, "materials", PROP_COLLECTION, PROP_NONE);
@@ -1503,58 +1363,58 @@ static void rna_def_mesh(BlenderRNA *brna)
prop= RNA_def_property(srna, "draw_edges", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAWEDGES);
RNA_def_property_ui_text(prop, "Draw Edges", "Displays selected edges using hilights in the 3d view and UV editor");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_draw");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "draw_faces", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAWFACES);
RNA_def_property_ui_text(prop, "Draw Faces", "Displays all faces as shades in the 3d view and UV editor");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_draw");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "draw_normals", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAWNORMALS);
RNA_def_property_ui_text(prop, "Draw Normals", "Displays face normals as lines");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_draw");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "draw_vertex_normals", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAW_VNORMALS);
RNA_def_property_ui_text(prop, "Draw Vertex Normals", "Displays vertex normals as lines");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_draw");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "draw_creases", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAWCREASES);
RNA_def_property_ui_text(prop, "Draw Creases", "Displays creases created for subsurf weighting");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_draw");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "draw_bevel_weights", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAWBWEIGHTS);
RNA_def_property_ui_text(prop, "Draw Bevel Weights", "Displays weights created for the Bevel modifier");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_draw");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "draw_seams", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAWSEAMS);
RNA_def_property_ui_text(prop, "Draw Seams", "Displays UV unwrapping seams");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_draw");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "draw_sharp", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAWSHARP);
RNA_def_property_ui_text(prop, "Draw Sharp", "Displays sharp edges, used with the EdgeSplit modifier");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_draw");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "draw_edge_lenght", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAW_EDGELEN);
RNA_def_property_ui_text(prop, "Edge Length", "Displays selected edge lengths");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_draw");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "draw_edge_angle", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAW_EDGEANG);
RNA_def_property_ui_text(prop, "Edge Angles", "Displays the angles in the selected edges in degrees");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_draw");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "draw_face_area", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAW_FACEAREA);
RNA_def_property_ui_text(prop, "Face Area", "Displays the area of selected faces");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_draw");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
rna_def_texmat_common(srna, "rna_Mesh_texspace_editable");
diff --git a/source/blender/makesrna/intern/rna_mesh_api.c b/source/blender/makesrna/intern/rna_mesh_api.c
index 6e37014a771..1db2f155d14 100644
--- a/source/blender/makesrna/intern/rna_mesh_api.c
+++ b/source/blender/makesrna/intern/rna_mesh_api.c
@@ -109,13 +109,20 @@ static void rna_Mesh_calc_edges(Mesh *mesh)
static void rna_Mesh_update(Mesh *mesh, bContext *C)
{
+ Main *bmain= CTX_data_main(C);
+ Object *ob;
+
if(mesh->totface && mesh->totedge == 0)
rna_Mesh_calc_edges(mesh);
mesh_calc_normals(mesh->mvert, mesh->totvert, mesh->mface, mesh->totface, NULL);
- DAG_id_flush_update(&mesh->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, mesh);
+ for(ob=bmain->object.first; ob; ob=ob->id.next) {
+ if(ob->data == mesh) {
+ ob->recalc |= OB_RECALC_DATA;
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob);
+ }
+ }
}
static void rna_Mesh_transform(Mesh *me, float *mat)
@@ -286,7 +293,7 @@ void RNA_api_mesh(StructRNA *srna)
func= RNA_def_function(srna, "transform", "rna_Mesh_transform");
RNA_def_function_ui_description(func, "Transform mesh vertices by a matrix.");
- parm= RNA_def_float_matrix(func, "matrix", 4, 4, NULL, 0.0f, 0.0f, "", "Matrix.", 0.0f, 0.0f);
+ parm= RNA_def_float_matrix(func, "matrix", 16, NULL, 0.0f, 0.0f, "", "Matrix.", 0.0f, 0.0f);
RNA_def_property_flag(parm, PROP_REQUIRED);
func= RNA_def_function(srna, "add_geometry", "rna_Mesh_add_geometry");
diff --git a/source/blender/makesrna/intern/rna_meta.c b/source/blender/makesrna/intern/rna_meta.c
index f3160a7bb18..7b14a7a4712 100644
--- a/source/blender/makesrna/intern/rna_meta.c
+++ b/source/blender/makesrna/intern/rna_meta.c
@@ -57,12 +57,14 @@ static void rna_MetaBall_update_data(bContext *C, PointerRNA *ptr)
MetaBall *mb= ptr->id.data;
Object *ob;
- for(ob=bmain->object.first; ob; ob= ob->id.next)
- if(ob->data == mb)
+ for(ob=bmain->object.first; ob; ob= ob->id.next) {
+ if(ob->data == mb) {
copy_mball_properties(scene, ob);
-
- DAG_id_flush_update(&mb->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, mb);
+ /* XXX this will loop over all objects again (slow) */
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob);
+ }
+ }
}
#else
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index 28223d2f80b..837158b9ec8 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -40,46 +40,43 @@
#include "BKE_bmesh.h" /* For BevelModifierData */
#include "BKE_smoke.h" /* For smokeModifier_free & smokeModifier_createType */
-#include "WM_api.h"
#include "WM_types.h"
EnumPropertyItem modifier_type_items[] ={
- {0, "", 0, "Generate", ""},
+ {eModifierType_Armature, "ARMATURE", ICON_MOD_ARMATURE, "Armature", ""},
{eModifierType_Array, "ARRAY", ICON_MOD_ARRAY, "Array", ""},
{eModifierType_Bevel, "BEVEL", ICON_MOD_BEVEL, "Bevel", ""},
{eModifierType_Boolean, "BOOLEAN", ICON_MOD_BOOLEAN, "Boolean", ""},
{eModifierType_Build, "BUILD", ICON_MOD_BUILD, "Build", ""},
- {eModifierType_Decimate, "DECIMATE", ICON_MOD_DECIM, "Decimate", ""},
- {eModifierType_EdgeSplit, "EDGE_SPLIT", ICON_MOD_EDGESPLIT, "Edge Split", ""},
- {eModifierType_Mask, "MASK", ICON_MOD_MASK, "Mask", ""},
- {eModifierType_Mirror, "MIRROR", ICON_MOD_MIRROR, "Mirror", ""},
- {eModifierType_Multires, "MULTIRES", ICON_MOD_MULTIRES, "Multiresolution", ""},
- {eModifierType_Subsurf, "SUBSURF", ICON_MOD_SUBSURF, "Subdivision Surface", ""},
- {eModifierType_UVProject, "UV_PROJECT", ICON_MOD_UVPROJECT, "UV Project", ""},
- {0, "", 0, "Deform", ""},
- {eModifierType_Armature, "ARMATURE", ICON_MOD_ARMATURE, "Armature", ""},
{eModifierType_Cast, "CAST", ICON_MOD_CAST, "Cast", ""},
+ {eModifierType_Cloth, "CLOTH", ICON_MOD_CLOTH, "Cloth", ""},
+ {eModifierType_Collision, "COLLISION", ICON_MOD_PHYSICS, "Collision", ""},
{eModifierType_Curve, "CURVE", ICON_MOD_CURVE, "Curve", ""},
+ {eModifierType_Decimate, "DECIMATE", ICON_MOD_DECIM, "Decimate", ""},
{eModifierType_Displace, "DISPLACE", ICON_MOD_DISPLACE, "Displace", ""},
+ {eModifierType_EdgeSplit, "EDGE_SPLIT", ICON_MOD_EDGESPLIT, "Edge Split", ""},
+ {eModifierType_Explode, "EXPLODE", ICON_MOD_EXPLODE, "Explode", ""},
+ {eModifierType_Fluidsim, "FLUID_SIMULATION", ICON_MOD_FLUIDSIM, "Fluid Simulation", ""},
{eModifierType_Hook, "HOOK", ICON_HOOK, "Hook", ""},
{eModifierType_Lattice, "LATTICE", ICON_MOD_LATTICE, "Lattice", ""},
+ {eModifierType_Mask, "MASK", ICON_MOD_MASK, "Mask", ""},
{eModifierType_MeshDeform, "MESH_DEFORM", ICON_MOD_MESHDEFORM, "Mesh Deform", ""},
+ {eModifierType_Mirror, "MIRROR", ICON_MOD_MIRROR, "Mirror", ""},
+ {eModifierType_Multires, "MULTIRES", ICON_MOD_MULTIRES, "Multiresolution", ""},
+ {eModifierType_ParticleInstance, "PARTICLE_INSTANCE", ICON_MOD_PARTICLES, "Particle Instance", ""},
+ {eModifierType_ParticleSystem, "PARTICLE_SYSTEM", ICON_MOD_PARTICLES, "Particle System", ""},
{eModifierType_Shrinkwrap, "SHRINKWRAP", ICON_MOD_SHRINKWRAP, "Shrinkwrap", ""},
{eModifierType_SimpleDeform, "SIMPLE_DEFORM", ICON_MOD_SIMPLEDEFORM, "Simple Deform", ""},
+ {eModifierType_Smoke, "SMOKE", 0, "Smoke", ""},
{eModifierType_Smooth, "SMOOTH", ICON_MOD_SMOOTH, "Smooth", ""},
- {eModifierType_Wave, "WAVE", ICON_MOD_WAVE, "Wave", ""},
- {0, "", 0, "Physics", ""},
- {eModifierType_Cloth, "CLOTH", ICON_MOD_CLOTH, "Cloth", ""},
- {eModifierType_Collision, "COLLISION", ICON_MOD_PHYSICS, "Collision", ""},
- {eModifierType_Explode, "EXPLODE", ICON_MOD_EXPLODE, "Explode", ""},
- {eModifierType_Fluidsim, "FLUID_SIMULATION", ICON_MOD_FLUIDSIM, "Fluid Simulation", ""},
- {eModifierType_ParticleInstance, "PARTICLE_INSTANCE", ICON_MOD_PARTICLES, "Particle Instance", ""},
- {eModifierType_ParticleSystem, "PARTICLE_SYSTEM", ICON_MOD_PARTICLES, "Particle System", ""},
- {eModifierType_Smoke, "SMOKE", ICON_MOD_SMOKE, "Smoke", ""},
{eModifierType_Softbody, "SOFT_BODY", ICON_MOD_SOFT, "Soft Body", ""},
+ {eModifierType_Subsurf, "SUBSURF", ICON_MOD_SUBSURF, "Subdivision Surface", ""},
{eModifierType_Surface, "SURFACE", ICON_MOD_PHYSICS, "Surface", ""},
+ {eModifierType_UVProject, "UV_PROJECT", ICON_MOD_UVPROJECT, "UV Project", ""},
+ {eModifierType_Wave, "WAVE", ICON_MOD_WAVE, "Wave", ""},
{0, NULL, 0, NULL, NULL}};
+
#ifdef RNA_RUNTIME
#include "BKE_context.h"
@@ -89,7 +86,7 @@ EnumPropertyItem modifier_type_items[] ={
static void rna_UVProject_projectors_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
UVProjectModifierData *uvp= (UVProjectModifierData*)ptr->data;
- rna_iterator_array_begin(iter, (void*)uvp->projectors, sizeof(Object*), uvp->num_projectors, 0, NULL);
+ rna_iterator_array_begin(iter, (void*)uvp->projectors, sizeof(Object*), 10, 0, NULL);
}
static StructRNA* rna_Modifier_refine(struct PointerRNA *ptr)
@@ -171,8 +168,7 @@ static char *rna_Modifier_path(PointerRNA *ptr)
static void rna_Modifier_update(bContext *C, PointerRNA *ptr)
{
- DAG_id_flush_update(ptr->id.data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ptr->id.data);
+ DAG_object_flush_update(CTX_data_scene(C), ptr->id.data, OB_RECALC_DATA);
}
static void rna_Modifier_dependency_update(bContext *C, PointerRNA *ptr)
@@ -185,15 +181,13 @@ static void rna_Smoke_set_type(bContext *C, PointerRNA *ptr)
{
SmokeModifierData *smd= (SmokeModifierData *)ptr->data;
Object *ob= (Object*)ptr->id.data;
-
- // nothing changed
- if((smd->type & MOD_SMOKE_TYPE_DOMAIN) && smd->domain)
- return;
smokeModifier_free(smd); // XXX TODO: completely free all 3 pointers
smokeModifier_createType(smd); // create regarding of selected type
+ // particle_system_slot_add_exec(C, NULL);
+ // particle_system_slot_remove_exec(C, NULL);
- if(smd->type & MOD_SMOKE_TYPE_DOMAIN)
+ if(smd->type == MOD_SMOKE_TYPE_DOMAIN)
ob->dt = OB_WIRE;
// update dependancy since a domain - other type switch could have happened
@@ -402,34 +396,6 @@ static PointerRNA rna_CollisionModifier_settings_get(PointerRNA *ptr)
return rna_pointer_inherit_refine(ptr, &RNA_CollisionSettings, ob->pd);
}
-static PointerRNA rna_UVProjector_object_get(PointerRNA *ptr)
-{
- Object **ob= (Object**)ptr->data;
- return rna_pointer_inherit_refine(ptr, &RNA_Object, *ob);
-}
-
-static void rna_UVProjector_object_set(PointerRNA *ptr, PointerRNA value)
-{
- Object **ob= (Object**)ptr->data;
-
- if(*ob)
- id_us_min((ID*)*ob);
- if(value.data)
- id_us_plus((ID*)value.data);
-
- *ob= value.data;
-}
-
-static void rna_UVProjectModifier_num_projectors_set(PointerRNA *ptr, int value)
-{
- UVProjectModifierData *md= (UVProjectModifierData*)ptr->data;
- int a;
-
- md->num_projectors= CLAMPIS(value, 1, MOD_UVPROJECT_MAX);
- for(a=md->num_projectors; a<MOD_UVPROJECT_MAX; a++)
- md->projectors[a]= NULL;
-}
-
#else
static void rna_def_property_subdivision_common(StructRNA *srna, const char type[])
@@ -443,7 +409,7 @@ static void rna_def_property_subdivision_common(StructRNA *srna, const char type
RNA_def_property_enum_sdna(prop, NULL, type);
RNA_def_property_enum_items(prop, prop_subdivision_type_items);
RNA_def_property_ui_text(prop, "Subdivision Type", "Selects type of subdivision algorithm.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
}
static void rna_def_modifier_subsurf(BlenderRNA *brna)
@@ -463,7 +429,7 @@ static void rna_def_modifier_subsurf(BlenderRNA *brna)
RNA_def_property_range(prop, 1, 6);
RNA_def_property_ui_range(prop, 1, 6, 1, 0);
RNA_def_property_ui_text(prop, "Levels", "Number of subdivisions to perform.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "render_levels", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "renderLevels");
@@ -474,12 +440,12 @@ static void rna_def_modifier_subsurf(BlenderRNA *brna)
prop= RNA_def_property(srna, "optimal_draw", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", eSubsurfModifierFlag_ControlEdges);
RNA_def_property_ui_text(prop, "Optimal Draw", "Skip drawing/rendering of interior subdivided edges");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "subsurf_uv", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", eSubsurfModifierFlag_SubsurfUv);
RNA_def_property_ui_text(prop, "Subsurf UV", "Use subsurf to subdivide UVs.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
}
static void rna_def_modifier_multires(BlenderRNA *brna)
@@ -498,7 +464,7 @@ static void rna_def_modifier_multires(BlenderRNA *brna)
RNA_def_property_int_sdna(prop, NULL, "lvl");
RNA_def_property_ui_text(prop, "Level", "");
RNA_def_property_int_funcs(prop, NULL, NULL, "rna_MultiresModifier_level_range");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
}
static void rna_def_modifier_lattice(BlenderRNA *brna)
@@ -515,13 +481,13 @@ static void rna_def_modifier_lattice(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Object", "Lattice object to deform with.");
RNA_def_property_pointer_funcs(prop, NULL, "rna_LatticeModifier_object_set", NULL);
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_dependency_update");
prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "name");
RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name.");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_LatticeModifier_vgroup_set");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
}
static void rna_def_modifier_curve(BlenderRNA *brna)
@@ -547,19 +513,19 @@ static void rna_def_modifier_curve(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Object", "Curve object to deform with.");
RNA_def_property_pointer_funcs(prop, NULL, "rna_CurveModifier_object_set", NULL);
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_dependency_update");
prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "name");
RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name.");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_CurveModifier_vgroup_set");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "deform_axis", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "defaxis");
RNA_def_property_enum_items(prop, prop_deform_axis_items);
RNA_def_property_ui_text(prop, "Deform Axis", "The axis that the curve deforms along.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
}
static void rna_def_modifier_build(BlenderRNA *brna)
@@ -575,21 +541,21 @@ static void rna_def_modifier_build(BlenderRNA *brna)
prop= RNA_def_property(srna, "start", PROP_FLOAT, PROP_TIME);
RNA_def_property_range(prop, MINAFRAMEF, MAXFRAMEF);
RNA_def_property_ui_text(prop, "Start", "Specify the start frame of the effect.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "length", PROP_FLOAT, PROP_TIME);
RNA_def_property_range(prop, 1, MAXFRAMEF);
RNA_def_property_ui_text(prop, "Length", "Specify the total time the build effect requires");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "randomize", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_ui_text(prop, "Randomize", "Randomize the faces or edges during build.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "seed", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 1, MAXFRAMEF);
RNA_def_property_ui_text(prop, "Seed", "Specify the seed for random if used.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
}
static void rna_def_modifier_mirror(BlenderRNA *brna)
@@ -605,50 +571,50 @@ static void rna_def_modifier_mirror(BlenderRNA *brna)
prop= RNA_def_property(srna, "x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_MIR_AXIS_X);
RNA_def_property_ui_text(prop, "X", "Enable X axis mirror.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_MIR_AXIS_Y);
RNA_def_property_ui_text(prop, "Y", "Enable Y axis mirror.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_MIR_AXIS_Z);
RNA_def_property_ui_text(prop, "Z", "Enable Z axis mirror.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "clip", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_MIR_CLIPPING);
RNA_def_property_ui_text(prop, "Clip", "Prevents vertices from going through the mirror during transform.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "mirror_vertex_groups", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_MIR_VGROUP);
RNA_def_property_ui_text(prop, "Mirror Vertex Groups", "Mirror vertex groups (e.g. .R->.L).");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "mirror_u", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_MIR_MIRROR_U);
RNA_def_property_ui_text(prop, "Mirror U", "Mirror the U texture coordinate around the 0.5 point.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "mirror_v", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_MIR_MIRROR_V);
RNA_def_property_ui_text(prop, "Mirror V", "Mirror the V texture coordinate around the 0.5 point.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "merge_limit", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "tolerance");
RNA_def_property_range(prop, 0, FLT_MAX);
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Merge Limit", "Distance from axis within which mirrored vertices are merged.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "mirror_object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "mirror_ob");
RNA_def_property_ui_text(prop, "Mirror Object", "Object to use as mirror.");
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_dependency_update");
}
static void rna_def_modifier_decimate(BlenderRNA *brna)
@@ -665,7 +631,7 @@ static void rna_def_modifier_decimate(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "percent");
RNA_def_property_range(prop, 0, 1);
RNA_def_property_ui_text(prop, "Ratio", "Defines the ratio of triangles to reduce to.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "face_count", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "faceCount");
@@ -693,135 +659,135 @@ static void rna_def_modifier_wave(BlenderRNA *brna)
prop= RNA_def_property(srna, "x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_WAVE_X);
RNA_def_property_ui_text(prop, "X", "X axis motion.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_WAVE_Y);
RNA_def_property_ui_text(prop, "Y", "Y axis motion.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "cyclic", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_WAVE_CYCL);
RNA_def_property_ui_text(prop, "Cyclic", "Cyclic wave effect.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "normals", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_WAVE_NORM);
RNA_def_property_ui_text(prop, "Normals", "Dispace along normals.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "x_normal", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_WAVE_NORM_X);
RNA_def_property_ui_text(prop, "X Normal", "Enable displacement along the X normal");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "y_normal", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_WAVE_NORM_Y);
RNA_def_property_ui_text(prop, "Y Normal", "Enable displacement along the Y normal");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "z_normal", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_WAVE_NORM_Z);
RNA_def_property_ui_text(prop, "Z Normal", "Enable displacement along the Z normal");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "time_offset", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "timeoffs");
RNA_def_property_range(prop, MINAFRAMEF, MAXFRAMEF);
RNA_def_property_ui_text(prop, "Time Offset", "Either the starting frame (for positive speed) or ending frame (for negative speed.)");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "lifetime", PROP_FLOAT, PROP_TIME);
RNA_def_property_range(prop, MINAFRAMEF, MAXFRAMEF);
RNA_def_property_ui_text(prop, "Lifetime", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "damping_time", PROP_FLOAT, PROP_TIME);
RNA_def_property_float_sdna(prop, NULL, "damp");
RNA_def_property_range(prop, MINAFRAMEF, MAXFRAMEF);
RNA_def_property_ui_text(prop, "Damping Time", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "falloff_radius", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "falloff");
RNA_def_property_range(prop, 0, FLT_MAX);
RNA_def_property_ui_range(prop, 0, 100, 100, 2);
RNA_def_property_ui_text(prop, "Falloff Radius", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "start_position_x", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "startx");
RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
RNA_def_property_ui_range(prop, -100, 100, 100, 2);
RNA_def_property_ui_text(prop, "Start Position X", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "start_position_y", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "starty");
RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
RNA_def_property_ui_range(prop, -100, 100, 100, 2);
RNA_def_property_ui_text(prop, "Start Position Y", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "start_position_object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "objectcenter");
RNA_def_property_ui_text(prop, "Start Position Object", "");
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_dependency_update");
prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "defgrp_name");
RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name for modulating the wave.");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_WaveModifier_vgroup_set");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "texture", PROP_POINTER, PROP_NONE);
RNA_def_property_ui_text(prop, "Texture", "Texture for modulating the wave.");
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "texture_coordinates", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "texmapping");
RNA_def_property_enum_items(prop, prop_texture_coordinates_items);
RNA_def_property_ui_text(prop, "Texture Coordinates", "Texture coordinates used for modulating input.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "uv_layer", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "uvlayer_name");
RNA_def_property_ui_text(prop, "UV Layer", "UV layer name.");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_WaveModifier_uvlayer_set");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "texture_coordinates_object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "map_object");
RNA_def_property_ui_text(prop, "Texture Coordinates Object", "");
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_dependency_update");
prop= RNA_def_property(srna, "speed", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
RNA_def_property_ui_range(prop, -1, 1, 10, 2);
RNA_def_property_ui_text(prop, "Speed", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "height", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
RNA_def_property_ui_range(prop, -2, 2, 10, 2);
RNA_def_property_ui_text(prop, "Height", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "width", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0, FLT_MAX);
RNA_def_property_ui_range(prop, 0, 5, 10, 2);
RNA_def_property_ui_text(prop, "Width", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "narrowness", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "narrow");
RNA_def_property_range(prop, 0, FLT_MAX);
RNA_def_property_ui_range(prop, 0, 10, 10, 2);
RNA_def_property_ui_text(prop, "Narrowness", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
}
static void rna_def_modifier_armature(BlenderRNA *brna)
@@ -838,43 +804,43 @@ static void rna_def_modifier_armature(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Object", "Armature object to deform with.");
RNA_def_property_pointer_funcs(prop, NULL, "rna_ArmatureModifier_object_set", NULL);
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_dependency_update");
prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "defgrp_name");
RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name.");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_ArmatureModifier_vgroup_set");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "invert", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "deformflag", ARM_DEF_INVERT_VGROUP);
RNA_def_property_ui_text(prop, "Invert", "Invert vertex group influence.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "use_vertex_groups", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "deformflag", ARM_DEF_VGROUP);
RNA_def_property_ui_text(prop, "Use Vertex Groups", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "use_bone_envelopes", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "deformflag", ARM_DEF_ENVELOPE);
RNA_def_property_ui_text(prop, "Use Bone Envelopes", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "quaternion", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "deformflag", ARM_DEF_QUATERNION);
RNA_def_property_ui_text(prop, "Quaternion", "Deform rotation interpolation with quaternions.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "b_bone_rest", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "deformflag", ARM_DEF_B_BONE_REST);
RNA_def_property_ui_text(prop, "B-Bone Rest", "Make B-Bones deform already in rest position");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "multi_modifier", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "multi", 0);
RNA_def_property_ui_text(prop, "Multi Modifier", "Use same input as previous modifier, and mix results using overall vgroup");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
}
static void rna_def_modifier_hook(BlenderRNA *brna)
@@ -891,28 +857,23 @@ static void rna_def_modifier_hook(BlenderRNA *brna)
RNA_def_property_range(prop, 0, FLT_MAX);
RNA_def_property_ui_range(prop, 0, 100, 100, 2);
RNA_def_property_ui_text(prop, "Falloff", "If not zero, the distance from the hook where influence ends.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "force", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0, 1);
RNA_def_property_ui_text(prop, "Force", "Relative force of the hook.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
RNA_def_property_ui_text(prop, "Object", "Parent Object for hook, also recalculates and clears offset");
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
-
- prop= RNA_def_property(srna, "subtarget", PROP_STRING, PROP_NONE);
- RNA_def_property_string_sdna(prop, NULL, "subtarget");
- RNA_def_property_ui_text(prop, "Sub-Target", "Name of Parent Bone for hook (if applicable), also recalculates and clears offset");
- RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_dependency_update");
prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "name");
RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name.");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_HookModifier_vgroup_set");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
}
static void rna_def_modifier_softbody(BlenderRNA *brna)
@@ -956,12 +917,12 @@ static void rna_def_modifier_boolean(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Object", "Mesh object to use for boolean operation.");
RNA_def_property_pointer_funcs(prop, NULL, "rna_BooleanModifier_object_set", NULL);
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_dependency_update");
prop= RNA_def_property(srna, "operation", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_operation_items);
RNA_def_property_ui_text(prop, "Operation", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
}
static void rna_def_modifier_array(BlenderRNA *brna)
@@ -984,90 +945,90 @@ static void rna_def_modifier_array(BlenderRNA *brna)
prop= RNA_def_property(srna, "fit_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_fit_type_items);
RNA_def_property_ui_text(prop, "Fit Type", "Array length calculation method.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "count", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 1, INT_MAX);
RNA_def_property_ui_range(prop, 1, 1000, 1, 0);
RNA_def_property_ui_text(prop, "Count", "Number of duplicates to make.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "length", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_range(prop, 0, INT_MAX);
RNA_def_property_ui_range(prop, 0, 10000, 10, 2);
RNA_def_property_ui_text(prop, "Length", "Length to fit array within.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "curve", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "curve_ob");
RNA_def_property_ui_text(prop, "Curve", "Curve object to fit array length to.");
RNA_def_property_pointer_funcs(prop, NULL, "rna_ArrayModifier_curve_set", NULL);
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_dependency_update");
/* Offset parameters */
prop= RNA_def_property(srna, "constant_offset", PROP_BOOLEAN, PROP_TRANSLATION);
RNA_def_property_boolean_sdna(prop, NULL, "offset_type", MOD_ARR_OFF_CONST);
RNA_def_property_ui_text(prop, "Constant Offset", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "constant_offset_displacement", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "offset");
RNA_def_property_ui_text(prop, "Constant Offset Displacement", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "relative_offset", PROP_BOOLEAN, PROP_TRANSLATION);
RNA_def_property_boolean_sdna(prop, NULL, "offset_type", MOD_ARR_OFF_RELATIVE);
RNA_def_property_ui_text(prop, "Relative Offset", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "relative_offset_displacement", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "scale");
RNA_def_property_ui_text(prop, "Relative Offset Displacement", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
/* Vertex merging parameters */
prop= RNA_def_property(srna, "merge_adjacent_vertices", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_ARR_MERGE);
RNA_def_property_ui_text(prop, "Merge Vertices", "Merge vertices in adjacent duplicates.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "merge_end_vertices", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_ARR_MERGEFINAL);
RNA_def_property_ui_text(prop, "Merge Vertices", "Merge vertices in first and last duplicates.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "merge_distance", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "merge_dist");
RNA_def_property_range(prop, 0, FLT_MAX);
RNA_def_property_ui_range(prop, 0, 1, 1, 4);
RNA_def_property_ui_text(prop, "Merge Distance", "Limit below which to merge vertices.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
/* Offset object */
prop= RNA_def_property(srna, "add_offset_object", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "offset_type", MOD_ARR_OFF_OBJ);
RNA_def_property_ui_text(prop, "Add Offset Object", "Add an object transformation to the total offset.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "offset_object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "offset_ob");
RNA_def_property_ui_text(prop, "Offset Object", "");
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_dependency_update");
/* Caps */
prop= RNA_def_property(srna, "start_cap", PROP_POINTER, PROP_NONE);
RNA_def_property_ui_text(prop, "Start Cap", "Mesh object to use as a start cap.");
RNA_def_property_pointer_funcs(prop, NULL, "rna_ArrayModifier_start_cap_set", NULL);
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "end_cap", PROP_POINTER, PROP_NONE);
RNA_def_property_ui_text(prop, "End Cap", "Mesh object to use as an end cap.");
RNA_def_property_pointer_funcs(prop, NULL, "rna_ArrayModifier_end_cap_set", NULL);
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_dependency_update");
}
static void rna_def_modifier_edgesplit(BlenderRNA *brna)
@@ -1084,17 +1045,17 @@ static void rna_def_modifier_edgesplit(BlenderRNA *brna)
RNA_def_property_range(prop, 0, 180);
RNA_def_property_ui_range(prop, 0, 180, 100, 2);
RNA_def_property_ui_text(prop, "Split Angle", "Angle above which to split edges.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "use_edge_angle", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_EDGESPLIT_FROMANGLE);
RNA_def_property_ui_text(prop, "Use Edge Angle", "Split edges with high angle between faces.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "use_sharp", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_EDGESPLIT_FROMFLAG);
RNA_def_property_ui_text(prop, "Use Sharp Edges", "Split edges that are marked as sharp.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
}
static void rna_def_modifier_displace(BlenderRNA *brna)
@@ -1126,47 +1087,47 @@ static void rna_def_modifier_displace(BlenderRNA *brna)
RNA_def_property_string_sdna(prop, NULL, "defgrp_name");
RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name.");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_DisplaceModifier_vgroup_set");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "texture", PROP_POINTER, PROP_NONE);
RNA_def_property_ui_text(prop, "Texture", "");
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "midlevel", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0, 1);
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Midlevel", "Material value that gives no displacement.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "strength", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
RNA_def_property_ui_range(prop, -100, 100, 10, 2);
RNA_def_property_ui_text(prop, "Strength", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "direction", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_direction_items);
RNA_def_property_ui_text(prop, "Direction", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "texture_coordinates", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "texmapping");
RNA_def_property_enum_items(prop, prop_texture_coordinates_items);
RNA_def_property_ui_text(prop, "Texture Coordinates", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "uv_layer", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "uvlayer_name");
RNA_def_property_ui_text(prop, "UV Layer", "UV layer name.");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_DisplaceModifier_uvlayer_set");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "texture_coordinate_object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "map_object");
RNA_def_property_ui_text(prop, "Texture Coordinate Object", "");
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_dependency_update");
}
static void rna_def_modifier_uvproject(BlenderRNA *brna)
@@ -1175,7 +1136,7 @@ static void rna_def_modifier_uvproject(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "UVProjectModifier", "Modifier");
- RNA_def_struct_ui_text(srna, "UV Project Modifier", "UV projection modifier to sets UVs from a projector.");
+ RNA_def_struct_ui_text(srna, "UVProject Modifier", "UV projection modifier to sets UVs from a projector.");
RNA_def_struct_sdna(srna, "UVProjectModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_UVPROJECT);
@@ -1183,51 +1144,36 @@ static void rna_def_modifier_uvproject(BlenderRNA *brna)
RNA_def_property_string_sdna(prop, NULL, "uvlayer_name");
RNA_def_property_ui_text(prop, "UV Layer", "UV layer name.");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_UVProjectModifier_uvlayer_set");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
-
- prop= RNA_def_property(srna, "num_projectors", PROP_INT, PROP_NONE);
- RNA_def_property_ui_text(prop, "Number of Projectors", "Number of projectors to use.");
- RNA_def_property_int_funcs(prop, NULL, "rna_UVProjectModifier_num_projectors_set", NULL);
- RNA_def_property_range(prop, 1, MOD_UVPROJECT_MAX);
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "projectors", PROP_COLLECTION, PROP_NONE);
- RNA_def_property_struct_type(prop, "UVProjector");
- RNA_def_property_collection_funcs(prop, "rna_UVProject_projectors_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", 0, 0, 0, 0, 0);
+ RNA_def_property_struct_type(prop, "Object");
+ RNA_def_property_collection_funcs(prop, "rna_UVProject_projectors_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_dereference_get", 0, 0, 0, 0, 0);
RNA_def_property_ui_text(prop, "Projectors", "");
prop= RNA_def_property(srna, "image", PROP_POINTER, PROP_NONE);
RNA_def_property_ui_text(prop, "Image", "");
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "horizontal_aspect_ratio", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "aspectx");
RNA_def_property_range(prop, 1, FLT_MAX);
RNA_def_property_ui_range(prop, 1, 1000, 100, 2);
RNA_def_property_ui_text(prop, "Horizontal Aspect Ratio", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "vertical_aspect_ratio", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "aspecty");
RNA_def_property_range(prop, 1, FLT_MAX);
RNA_def_property_ui_range(prop, 1, 1000, 100, 2);
RNA_def_property_ui_text(prop, "Vertical Aspect Ratio", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "override_image", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_UVPROJECT_OVERRIDEIMAGE);
RNA_def_property_ui_text(prop, "Override Image", "Override faces' current images with the given image.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
-
- srna= RNA_def_struct(brna, "UVProjector", NULL);
- RNA_def_struct_ui_text(srna, "UVProjector", "UV projector used by the UV project modifier.");
-
- prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
- RNA_def_property_struct_type(prop, "Object");
- RNA_def_property_pointer_funcs(prop, "rna_UVProjector_object_get", "rna_UVProjector_object_set", NULL);
- RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Object", "Object to use as projector transform.");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
}
static void rna_def_modifier_smooth(BlenderRNA *brna)
@@ -1243,35 +1189,35 @@ static void rna_def_modifier_smooth(BlenderRNA *brna)
prop= RNA_def_property(srna, "x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_SMOOTH_X);
RNA_def_property_ui_text(prop, "X", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_SMOOTH_Y);
RNA_def_property_ui_text(prop, "Y", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_SMOOTH_Z);
RNA_def_property_ui_text(prop, "Z", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "fac");
RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
RNA_def_property_ui_range(prop, -10, 10, 0.5, 2);
RNA_def_property_ui_text(prop, "Factor", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "repeat", PROP_INT, PROP_NONE);
RNA_def_property_ui_range(prop, 0, 30, 1, 0);
RNA_def_property_ui_text(prop, "Repeat", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "defgrp_name");
RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name.");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_SmoothModifier_vgroup_set");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
}
static void rna_def_modifier_cast(BlenderRNA *brna)
@@ -1294,63 +1240,63 @@ static void rna_def_modifier_cast(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "type");
RNA_def_property_enum_items(prop, prop_cast_type_items);
RNA_def_property_ui_text(prop, "Cast Type", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
RNA_def_property_ui_text(prop, "Object", "Control object: if available, its location determines the center of the effect");
RNA_def_property_pointer_funcs(prop, NULL, "rna_CastModifier_object_set", NULL);
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_dependency_update");
prop= RNA_def_property(srna, "x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_CAST_X);
RNA_def_property_ui_text(prop, "X", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_CAST_Y);
RNA_def_property_ui_text(prop, "Y", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_CAST_Z);
RNA_def_property_ui_text(prop, "Z", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "from_radius", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_CAST_SIZE_FROM_RADIUS);
RNA_def_property_ui_text(prop, "From Radius", "Use radius as size of projection shape (0 = auto)");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "use_transform", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_CAST_USE_OB_TRANSFORM);
RNA_def_property_ui_text(prop, "Use transform", "Use object transform to control projection shape");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "fac");
RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
RNA_def_property_ui_range(prop, -10, 10, 5, 2);
RNA_def_property_ui_text(prop, "Factor", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "radius", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_range(prop, 0, FLT_MAX);
RNA_def_property_ui_range(prop, 0, 100, 10, 2);
RNA_def_property_ui_text(prop, "Radius", "Only deform vertices within this distance from the center of the effect (leave as 0 for infinite.)");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "size", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0, FLT_MAX);
RNA_def_property_ui_range(prop, 0, 100, 10, 2);
RNA_def_property_ui_text(prop, "Size", "Size of projection shape (leave as 0 for auto.)");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "defgrp_name");
RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name.");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_CastModifier_vgroup_set");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
}
static void rna_def_modifier_meshdeform(BlenderRNA *brna)
@@ -1367,29 +1313,29 @@ static void rna_def_modifier_meshdeform(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Object", "Mesh object to deform with.");
RNA_def_property_pointer_funcs(prop, NULL, "rna_MeshDeformModifier_object_set", NULL);
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_dependency_update");
prop= RNA_def_property(srna, "invert", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_MDEF_INVERT_VGROUP);
RNA_def_property_ui_text(prop, "Invert", "Invert vertex group influence.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "defgrp_name");
RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name.");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_MeshDeformModifier_vgroup_set");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "precision", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "gridsize");
RNA_def_property_range(prop, 2, 10);
RNA_def_property_ui_text(prop, "Precision", "The grid size for binding.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "dynamic", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_MDEF_DYNAMIC_BIND);
RNA_def_property_ui_text(prop, "Dynamic", "Recompute binding dynamically on top of other deformers (slower and more memory consuming.)");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
}
@@ -1424,71 +1370,71 @@ static void rna_def_modifier_particleinstance(BlenderRNA *brna)
RNA_def_property_pointer_sdna(prop, NULL, "ob");
RNA_def_property_ui_text(prop, "Object", "Object that has the particle system.");
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_dependency_update");
prop= RNA_def_property(srna, "particle_system_number", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "psys");
RNA_def_property_range(prop, 1, 10);
RNA_def_property_ui_text(prop, "Particle System Number", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "axis", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "axis");
RNA_def_property_enum_items(prop, particleinstance_axis);
RNA_def_property_ui_text(prop, "Axis", "Pole axis for rotation");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "normal", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", eParticleInstanceFlag_Parents);
RNA_def_property_ui_text(prop, "Normal", "Create instances from normal particles.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "children", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", eParticleInstanceFlag_Children);
RNA_def_property_ui_text(prop, "Children", "Create instances from child particles.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "path", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", eParticleInstanceFlag_Path);
RNA_def_property_ui_text(prop, "Path", "Create instances along particle paths.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "unborn", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", eParticleInstanceFlag_Unborn);
RNA_def_property_ui_text(prop, "Unborn", "Show instances when particles are unborn.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "alive", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", eParticleInstanceFlag_Alive);
RNA_def_property_ui_text(prop, "Alive", "Show instances when particles are alive.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "dead", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", eParticleInstanceFlag_Dead);
RNA_def_property_ui_text(prop, "Dead", "Show instances when particles are dead.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "keep_shape", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", eParticleInstanceFlag_KeepShape);
RNA_def_property_ui_text(prop, "Keep Shape", "Don't stretch the object.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "size", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", eParticleInstanceFlag_UseSize);
RNA_def_property_ui_text(prop, "Size", "Use particle size to scale the instances.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "position", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "position");
RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_ui_text(prop, "Position", "Position along path.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "random_position", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "random_position");
RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_ui_text(prop, "Random Position", "Randomize position along path.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
}
static void rna_def_modifier_explode(BlenderRNA *brna)
@@ -1508,27 +1454,27 @@ static void rna_def_modifier_explode(BlenderRNA *brna)
prop= RNA_def_property(srna, "protect", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0, 1);
RNA_def_property_ui_text(prop, "Protect", "Clean vertex group edges");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "split_edges", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", eExplodeFlag_EdgeSplit);
RNA_def_property_ui_text(prop, "Split Edges", "Split face edges for nicer shrapnel.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "unborn", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", eExplodeFlag_Unborn);
RNA_def_property_ui_text(prop, "Unborn", "Show mesh when particles are unborn.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "alive", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", eExplodeFlag_Alive);
RNA_def_property_ui_text(prop, "Alive", "Show mesh when particles are alive.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "dead", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", eExplodeFlag_Dead);
RNA_def_property_ui_text(prop, "Dead", "Show mesh when particles are dead.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
}
static void rna_def_modifier_cloth(BlenderRNA *brna)
@@ -1568,7 +1514,6 @@ static void rna_def_modifier_smoke(BlenderRNA *brna)
srna= RNA_def_struct(brna, "SmokeModifier", "Modifier");
RNA_def_struct_ui_text(srna, "Smoke Modifier", "Smoke simulation modifier.");
RNA_def_struct_sdna(srna, "SmokeModifierData");
- RNA_def_struct_ui_icon(srna, ICON_MOD_SMOKE);
prop= RNA_def_property(srna, "domain_settings", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "domain");
@@ -1586,7 +1531,7 @@ static void rna_def_modifier_smoke(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "type");
RNA_def_property_enum_items(prop, prop_smoke_type_items);
RNA_def_property_ui_text(prop, "Type", "");
- RNA_def_property_update(prop, 0, "rna_Smoke_set_type");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_set_type");
}
static void rna_def_modifier_collision(BlenderRNA *brna)
@@ -1608,7 +1553,7 @@ static void rna_def_modifier_collision(BlenderRNA *brna)
RNA_def_property_int_sdna(prop, NULL, "absorption");
RNA_def_property_ui_range(prop, 0, 100, 1, 2);
RNA_def_property_ui_text(prop, "Absorption %", "How much of effector force gets lost during collision with this object (in percent).");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
}
static void rna_def_modifier_bevel(BlenderRNA *brna)
@@ -1637,31 +1582,31 @@ static void rna_def_modifier_bevel(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "value");
RNA_def_property_range(prop, 0, 0.5);
RNA_def_property_ui_text(prop, "Width", "Bevel value/amount.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "only_vertices", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", BME_BEVEL_VERT);
RNA_def_property_ui_text(prop, "Only Vertices", "Bevel verts/corners, not edges.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "limit_method", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "lim_flags");
RNA_def_property_enum_items(prop, prop_limit_method_items);
RNA_def_property_ui_text(prop, "Limit Method", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "edge_weight_method", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "e_flags");
RNA_def_property_enum_items(prop, prop_edge_weight_method_items);
RNA_def_property_ui_text(prop, "Edge Weight Method", "What edge weight to use for weighting a vertex.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "angle", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "bevel_angle");
RNA_def_property_range(prop, 0, 180);
RNA_def_property_ui_range(prop, 0, 180, 100, 2);
RNA_def_property_ui_text(prop, "Angle", "Angle above which to bevel edges.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
}
static void rna_def_modifier_shrinkwrap(BlenderRNA *brna)
@@ -1684,80 +1629,80 @@ static void rna_def_modifier_shrinkwrap(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "shrinkType");
RNA_def_property_enum_items(prop, prop_mode_items);
RNA_def_property_ui_text(prop, "Mode", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
RNA_def_property_ui_text(prop, "Target", "Mesh target to shrink to.");
RNA_def_property_pointer_funcs(prop, NULL, "rna_ShrinkwrapModifier_target_set", NULL);
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_dependency_update");
prop= RNA_def_property(srna, "auxiliary_target", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "auxTarget");
RNA_def_property_ui_text(prop, "Auxiliary Target", "Additional mesh target to shrink to.");
RNA_def_property_pointer_funcs(prop, NULL, "rna_ShrinkwrapModifier_auxiliary_target_set", NULL);
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_dependency_update");
prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "vgroup_name");
RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name.");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_ShrinkwrapModifier_vgroup_set");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "offset", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "keepDist");
RNA_def_property_range(prop, 0, FLT_MAX);
RNA_def_property_ui_range(prop, 0, 100, 1, 2);
RNA_def_property_ui_text(prop, "Offset", "Distance to keep from the target.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "projAxis", MOD_SHRINKWRAP_PROJECT_OVER_X_AXIS);
RNA_def_property_ui_text(prop, "X", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "projAxis", MOD_SHRINKWRAP_PROJECT_OVER_Y_AXIS);
RNA_def_property_ui_text(prop, "Y", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "projAxis", MOD_SHRINKWRAP_PROJECT_OVER_Z_AXIS);
RNA_def_property_ui_text(prop, "Z", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "subsurf_levels", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "subsurfLevels");
RNA_def_property_range(prop, 0, 6);
RNA_def_property_ui_range(prop, 0, 6, 1, 0);
RNA_def_property_ui_text(prop, "Subsurf Levels", "Number of subdivisions that must be performed before extracting vertices' positions and normals.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "negative", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "shrinkOpts", MOD_SHRINKWRAP_PROJECT_ALLOW_NEG_DIR);
RNA_def_property_ui_text(prop, "Negative", "Allow vertices to move in the negative direction of axis.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "positive", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "shrinkOpts", MOD_SHRINKWRAP_PROJECT_ALLOW_POS_DIR);
RNA_def_property_ui_text(prop, "Positive", "Allow vertices to move in the positive direction of axis.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "cull_front_faces", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "shrinkOpts", MOD_SHRINKWRAP_CULL_TARGET_FRONTFACE);
RNA_def_property_ui_text(prop, "Cull Front Faces", "Stop vertices from projecting to a front face on the target.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "cull_back_faces", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "shrinkOpts", MOD_SHRINKWRAP_CULL_TARGET_BACKFACE);
RNA_def_property_ui_text(prop, "Cull Back Faces", "Stop vertices from projecting to a back face on the target.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "keep_above_surface", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "shrinkOpts", MOD_SHRINKWRAP_KEEP_ABOVE_SURFACE);
RNA_def_property_ui_text(prop, "Keep Above Surface", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
}
static void rna_def_modifier_fluidsim(BlenderRNA *brna)
@@ -1793,25 +1738,25 @@ static void rna_def_modifier_mask(BlenderRNA *brna)
prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_mode_items);
RNA_def_property_ui_text(prop, "Mode", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "armature", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "ob_arm");
RNA_def_property_ui_text(prop, "Armature", "Armature to use as source of bones to mask.");
RNA_def_property_pointer_funcs(prop, NULL, "rna_MaskModifier_armature_set", NULL);
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_dependency_update");
prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "vgroup");
RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name.");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_MaskModifier_vgroup_set");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "inverse", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_MASK_INV);
RNA_def_property_ui_text(prop, "Inverse", "Use vertices that are not part of region defined.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
}
static void rna_def_modifier_simpledeform(BlenderRNA *brna)
@@ -1834,29 +1779,29 @@ static void rna_def_modifier_simpledeform(BlenderRNA *brna)
prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_mode_items);
RNA_def_property_ui_text(prop, "Mode", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "vgroup_name");
RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name.");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_SimpleDeformModifier_vgroup_set");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "origin", PROP_POINTER, PROP_NONE);
RNA_def_property_ui_text(prop, "Origin", "Origin of modifier space coordinates.");
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_dependency_update");
prop= RNA_def_property(srna, "relative", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "originOpts", MOD_SIMPLEDEFORM_ORIGIN_LOCAL);
RNA_def_property_ui_text(prop, "Relative", "Sets the origin of deform space to be relative to the object.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
RNA_def_property_ui_range(prop, -10, 10, 0.5, 2);
RNA_def_property_ui_text(prop, "Factor", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "limits", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "limit");
@@ -1864,17 +1809,17 @@ static void rna_def_modifier_simpledeform(BlenderRNA *brna)
RNA_def_property_range(prop, 0, 1);
RNA_def_property_ui_range(prop, 0, 1, 5, 2);
RNA_def_property_ui_text(prop, "Limits", "Lower/Upper limits for deform.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "lock_x_axis", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "axis", MOD_SIMPLEDEFORM_LOCK_AXIS_X);
RNA_def_property_ui_text(prop, "Lock X Axis", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "lock_y_axis", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "axis", MOD_SIMPLEDEFORM_LOCK_AXIS_Y);
RNA_def_property_ui_text(prop, "Lock Y Axis", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
}
static void rna_def_modifier_surface(BlenderRNA *brna)
@@ -1914,7 +1859,7 @@ void RNA_def_modifier(BlenderRNA *brna)
prop= RNA_def_property(srna, "realtime", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", eModifierMode_Realtime);
RNA_def_property_ui_text(prop, "Realtime", "Realtime display of a modifier.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
RNA_def_property_ui_icon(prop, ICON_RESTRICT_VIEW_OFF, 0);
prop= RNA_def_property(srna, "render", PROP_BOOLEAN, PROP_NONE);
@@ -1925,13 +1870,13 @@ void RNA_def_modifier(BlenderRNA *brna)
prop= RNA_def_property(srna, "editmode", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", eModifierMode_Editmode);
RNA_def_property_ui_text(prop, "Editmode", "Use modifier while in the edit mode.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
RNA_def_property_ui_icon(prop, ICON_EDITMODE_HLT, 0);
prop= RNA_def_property(srna, "on_cage", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", eModifierMode_OnCage);
RNA_def_property_ui_text(prop, "On Cage", "Enable direct editing of modifier control cage.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "expanded", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", eModifierMode_Expanded);
diff --git a/source/blender/makesrna/intern/rna_nla.c b/source/blender/makesrna/intern/rna_nla.c
index 690a198f12c..98c72b7ee74 100644
--- a/source/blender/makesrna/intern/rna_nla.c
+++ b/source/blender/makesrna/intern/rna_nla.c
@@ -61,30 +61,6 @@ void rna_NlaStrip_name_set(PointerRNA *ptr, const char *value)
}
}
-static char *rna_NlaStrip_path(PointerRNA *ptr)
-{
- NlaStrip *strip= (NlaStrip *)ptr->data;
- AnimData *adt= BKE_animdata_from_id(ptr->id.data);
-
- /* if we're attached to AnimData, try to resolve path back to AnimData */
- if (adt) {
- NlaTrack *nlt;
- NlaStrip *nls;
-
- for (nlt= adt->nla_tracks.first; nlt; nlt= nlt->next) {
- for (nls = nlt->strips.first; nls; nls = nls->next) {
- if (nls == strip) {
- // XXX but if we animate like this, the control will never work...
- return BLI_sprintfN("animation_data.nla_tracks[\"%s\"].strips[\"%s\"]", nlt->name, strip->name);
- }
- }
- }
- }
-
- /* no path */
- return "";
-}
-
static void rna_NlaStrip_start_frame_set(PointerRNA *ptr, float value)
{
@@ -295,7 +271,6 @@ void rna_def_nlastrip(BlenderRNA *brna)
/* struct definition */
srna= RNA_def_struct(brna, "NlaStrip", NULL);
RNA_def_struct_ui_text(srna, "NLA Strip", "A container referencing an existing Action.");
- RNA_def_struct_path_func(srna, "rna_NlaStrip_path");
RNA_def_struct_ui_icon(srna, ICON_NLA); // XXX
/* name property */
@@ -350,7 +325,6 @@ void rna_def_nlastrip(BlenderRNA *brna)
/* Action */
prop= RNA_def_property(srna, "action", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "act");
- RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Action", "Action referenced by this strip.");
/* Action extents */
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index 3fd358a1c16..23e79831292 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -57,15 +57,6 @@ StructRNA *rna_Node_refine(struct PointerRNA *ptr)
}
}
-static char *rna_Node_path(PointerRNA *ptr)
-{
- bNodeTree *ntree= (bNodeTree*)ptr->id.data;
- bNode *node= (bNode*)ptr->data;
- int index = BLI_findindex(&ntree->nodes, node);
-
- return BLI_sprintfN("nodes[%d]", index);
-}
-
#else
#define MaxNodes 1000
@@ -396,7 +387,6 @@ static void def_cmp_alpha_over(StructRNA *srna)
prop = RNA_def_property(srna, "premul", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "x");
- RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Premul", "Mix Factor");
}
@@ -420,46 +410,38 @@ static void def_cmp_blur(StructRNA *srna)
prop = RNA_def_property(srna, "sizex", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "sizex");
- RNA_def_property_range(prop, 0, 256);
RNA_def_property_ui_text(prop, "Size X", "");
prop = RNA_def_property(srna, "sizey", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "sizey");
- RNA_def_property_range(prop, 1, 256);
RNA_def_property_ui_text(prop, "Size Y", "");
prop = RNA_def_property(srna, "samples", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "samples");
- RNA_def_property_range(prop, 1, 256);
RNA_def_property_ui_text(prop, "Samples", "");
prop = RNA_def_property(srna, "max_speed", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "maxspeed");
- RNA_def_property_range(prop, 1, 1024);
RNA_def_property_ui_text(prop, "Max Speed", "");
prop = RNA_def_property(srna, "min_speed", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "minspeed");
- RNA_def_property_range(prop, 1, 1024);
RNA_def_property_ui_text(prop, "Min Speed", "");
-
+
prop = RNA_def_property(srna, "relative", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "relative", 1);
RNA_def_property_ui_text(prop, "Relative", "");
prop = RNA_def_property(srna, "factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "fac");
- RNA_def_property_range(prop, 0.0f, 2.0f);
RNA_def_property_ui_text(prop, "Factor", "");
prop = RNA_def_property(srna, "factor_x", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "percentx");
- RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Relative Size X", "");
prop = RNA_def_property(srna, "factor_y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "percenty");
- RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Relative Size Y", "");
prop = RNA_def_property(srna, "filter_type", PROP_ENUM, PROP_NONE);
@@ -515,12 +497,10 @@ static void def_cmp_map_value(StructRNA *srna)
prop = RNA_def_property(srna, "offset", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "loc");
- RNA_def_property_range(prop, -1000.0f, 1000.0f);
RNA_def_property_ui_text(prop, "Offset", "");
prop = RNA_def_property(srna, "size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "size");
- RNA_def_property_range(prop, -1000.0f, 1000.0f);
RNA_def_property_ui_text(prop, "Size", "");
prop = RNA_def_property(srna, "use_min", PROP_BOOLEAN, PROP_NONE);
@@ -533,12 +513,10 @@ static void def_cmp_map_value(StructRNA *srna)
prop = RNA_def_property(srna, "min", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "min");
- RNA_def_property_range(prop, -1000.0f, 1000.0f);
RNA_def_property_ui_text(prop, "Minimum", "");
prop = RNA_def_property(srna, "max", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "max");
- RNA_def_property_range(prop, -1000.0f, 1000.0f);
RNA_def_property_ui_text(prop, "Maximum", "");
}
@@ -593,17 +571,14 @@ static void def_cmp_image(StructRNA *srna)
prop = RNA_def_property(srna, "frames", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "frames");
- RNA_def_property_range(prop, 1, MAXFRAMEF);
RNA_def_property_ui_text(prop, "Frames", "Number of images used in animation");
prop = RNA_def_property(srna, "start", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "sfra");
- RNA_def_property_range(prop, 1, MAXFRAMEF);
RNA_def_property_ui_text(prop, "Start Frame", "");
prop = RNA_def_property(srna, "offset", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "offset");
- RNA_def_property_range(prop, -MAXFRAMEF, MAXFRAMEF);
RNA_def_property_ui_text(prop, "Offset", "Offsets the number of the frame to use in the animation");
prop = RNA_def_property(srna, "cyclic", PROP_BOOLEAN, PROP_NONE);
@@ -620,7 +595,6 @@ static void def_cmp_image(StructRNA *srna)
prop = RNA_def_property(srna, "layer", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "layer");
- RNA_def_property_range(prop, 0, 10000);
RNA_def_property_ui_text(prop, "Layer", "");
/* } */
@@ -709,12 +683,10 @@ static void def_cmp_output_file(StructRNA *srna)
prop = RNA_def_property(srna, "start", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "sfra");
- RNA_def_property_range(prop, 1, MAXFRAMEF);
RNA_def_property_ui_text(prop, "Start Frame", "");
prop = RNA_def_property(srna, "end", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "efra");
- RNA_def_property_range(prop, 1, MAXFRAMEF);
RNA_def_property_ui_text(prop, "End Frame", "");
}
@@ -747,63 +719,39 @@ static void def_cmp_scale(StructRNA *srna)
static void def_cmp_diff_matte(StructRNA *srna)
{
PropertyRNA *prop;
-
- RNA_def_struct_sdna_from(srna, "NodeChroma", "storage");
-
- /* TODO: nicer wrapping for tolerances */
- prop = RNA_def_property(srna, "tolerance", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "t1");
- RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Tolerance", "Color distances below this threshold are keyed.");
+ static EnumPropertyItem color_space_items[] = {
+ {1, "RGB", 0, "RGB", ""},
+ {2, "HSV", 0, "HSV", ""},
+ {3, "YUV", 0, "YUV", ""},
+ {4, "YCC", 0, "YCbCr", ""},
+ {0, NULL, 0, NULL, NULL}
+ };
- prop = RNA_def_property(srna, "falloff", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "t2");
- RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Falloff", "Color distances below this additional threshold are partially keyed.");
-}
-
-static void def_cmp_color_matte(StructRNA *srna)
-{
- PropertyRNA *prop;
+ prop = RNA_def_property(srna, "color_space", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "custom1");
+ RNA_def_property_enum_items(prop, color_space_items);
+ RNA_def_property_ui_text(prop, "Color Space", "");
RNA_def_struct_sdna_from(srna, "NodeChroma", "storage");
/* TODO: nicer wrapping for tolerances */
- prop = RNA_def_property(srna, "h", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "tolerance1", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "t1");
- RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "H", "Hue tolerance for colors to be considered a keying color");
+ RNA_def_property_ui_text(prop, "Channel 1 Tolerance", "");
- prop = RNA_def_property(srna, "s", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "tolerance2", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "t2");
- RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "S", "Saturation Tolerance for the color");
+ RNA_def_property_ui_text(prop, "Channel 2 Tolerance", "");
- prop = RNA_def_property(srna, "v", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "tolerance3", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "t3");
- RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "V", "Value Tolerance for the color");
-}
-
-static void def_cmp_distance_matte(StructRNA *srna)
-{
- PropertyRNA *prop;
-
- RNA_def_struct_sdna_from(srna, "NodeChroma", "storage");
-
- /* TODO: nicer wrapping for tolerances */
-
- prop = RNA_def_property(srna, "tolerance", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "t1");
- RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Tolerance", "Color distances below this threshold are keyed.");
+ RNA_def_property_ui_text(prop, "Channel 3 Tolerance", "");
prop = RNA_def_property(srna, "falloff", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "t2");
- RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Falloff", "Color distances below this additional threshold are partially keyed.");
+ RNA_def_property_float_sdna(prop, NULL, "fstrength");
+ RNA_def_property_ui_text(prop, "Falloff", "");
}
static void def_cmp_color_spill(StructRNA *srna)
@@ -826,11 +774,10 @@ static void def_cmp_color_spill(StructRNA *srna)
prop = RNA_def_property(srna, "factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "t1");
- RNA_def_property_range(prop, 0.0f, 0.5f);
RNA_def_property_ui_text(prop, "Amount", "How much the selected channel is affected by");
}
-static void def_cmp_chroma_matte(StructRNA *srna)
+static void def_cmp_chroma(StructRNA *srna)
{
PropertyRNA *prop;
@@ -838,27 +785,22 @@ static void def_cmp_chroma_matte(StructRNA *srna)
prop = RNA_def_property(srna, "acceptance", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "t1");
- RNA_def_property_range(prop, 1.0f, 80.0f);
RNA_def_property_ui_text(prop, "Acceptance", "Tolerance for a color to be considered a keying color");
prop = RNA_def_property(srna, "cutoff", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "t2");
- RNA_def_property_range(prop, 0.0f, 30.0f);
RNA_def_property_ui_text(prop, "Cutoff", "Tolerance below which colors will be considered as exact matches");
prop = RNA_def_property(srna, "lift", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "fsize");
- RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Lift", "Alpha lift");
prop = RNA_def_property(srna, "gain", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "fstrength");
- RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Gain", "Alpha gain");
prop = RNA_def_property(srna, "shadow_adjust", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "t3");
- RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Shadow Adjust", "Adjusts the brightness of any shadows captured");
/* TODO:
@@ -893,12 +835,10 @@ static void def_cmp_channel_matte(StructRNA *srna)
prop = RNA_def_property(srna, "high", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "t1");
- RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "High", "Values higher than this setting are 100% opaque");
prop = RNA_def_property(srna, "low", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "t2");
- RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Low", "Values lower than this setting are 100% keyed");
/* TODO:
@@ -940,9 +880,8 @@ static void def_cmp_splitviewer(StructRNA *srna)
RNA_def_property_ui_text(prop, "Axis", "");
/* TODO: percentage */
- prop = RNA_def_property(srna, "factor", PROP_FLOAT, PROP_PERCENTAGE);
+ prop = RNA_def_property(srna, "factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "custom1");
- RNA_def_property_range(prop, 0.0f, 100.0f);
RNA_def_property_ui_text(prop, "Factor", "");
}
@@ -952,7 +891,6 @@ static void def_cmp_id_mask(StructRNA *srna)
prop = RNA_def_property(srna, "index", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "custom1");
- RNA_def_property_range(prop, 0, 10000);
RNA_def_property_ui_text(prop, "Index", "Pass index number to convert to alpha");
}
@@ -961,9 +899,8 @@ static void def_cmp_map_uv(StructRNA *srna)
PropertyRNA *prop;
/* TODO: percentage */
- prop = RNA_def_property(srna, "alpha", PROP_INT, PROP_PERCENTAGE);
+ prop = RNA_def_property(srna, "alpha", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "custom1");
- RNA_def_property_range(prop, 0, 100);
RNA_def_property_ui_text(prop, "Alpha", "");
}
@@ -992,7 +929,6 @@ static void def_cmp_defocus(StructRNA *srna)
/* TODO: angle in degrees */
prop = RNA_def_property(srna, "angle", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "rotation");
- RNA_def_property_range(prop, 0, 90);
RNA_def_property_ui_text(prop, "Angle", "Bokeh shape rotation offset in degrees");
prop = RNA_def_property(srna, "gamma_correction", PROP_BOOLEAN, PROP_NONE);
@@ -1002,17 +938,14 @@ static void def_cmp_defocus(StructRNA *srna)
/* TODO */
prop = RNA_def_property(srna, "f_stop", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "fstop");
- RNA_def_property_range(prop, 0.0f, 128.0f);
RNA_def_property_ui_text(prop, "fStop", "Amount of focal blur, 128=infinity=perfect focus, half the value doubles the blur radius");
prop = RNA_def_property(srna, "max_blur", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "maxblur");
- RNA_def_property_range(prop, 0.0f, 10000.0f);
RNA_def_property_ui_text(prop, "Max Blur", "blur limit, maximum CoC radius, 0=no limit");
prop = RNA_def_property(srna, "threshold", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "bthresh");
- RNA_def_property_range(prop, 0.0f, 100.0f);
RNA_def_property_ui_text(prop, "Threshold", "CoC radius threshold, prevents background bleed on in-focus midground, 0=off");
prop = RNA_def_property(srna, "preview", PROP_BOOLEAN, PROP_NONE);
@@ -1021,7 +954,6 @@ static void def_cmp_defocus(StructRNA *srna)
prop = RNA_def_property(srna, "samples", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "samples");
- RNA_def_property_range(prop, 16, 256);
RNA_def_property_ui_text(prop, "Samples", "Number of samples (16=grainy, higher=less noise)");
prop = RNA_def_property(srna, "use_zbuffer", PROP_BOOLEAN, PROP_NONE);
@@ -1030,7 +962,6 @@ static void def_cmp_defocus(StructRNA *srna)
prop = RNA_def_property(srna, "z_scale", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "scale");
- RNA_def_property_range(prop, 0.0f, 1000.0f);
RNA_def_property_ui_text(prop, "Z-Scale", "Scales the Z input when not using a zbuffer, controls maximum blur designated by the color white or input value 1");
}
@@ -1042,12 +973,10 @@ static void def_cmp_luma_matte(StructRNA *srna)
prop = RNA_def_property(srna, "high", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "t1");
- RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "High", "Values higher than this setting are 100% opaque");
prop = RNA_def_property(srna, "low", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "t2");
- RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Low", "Values lower than this setting are 100% keyed");
/* TODO: keep low less than high */
@@ -1079,22 +1008,18 @@ static void def_cmp_crop(StructRNA *srna)
prop = RNA_def_property(srna, "x1", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "x1");
- RNA_def_property_range(prop, 0, 10000);
RNA_def_property_ui_text(prop, "X1", "");
prop = RNA_def_property(srna, "x2", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "x2");
- RNA_def_property_range(prop, 0, 10000);
RNA_def_property_ui_text(prop, "X2", "");
prop = RNA_def_property(srna, "y1", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "y1");
- RNA_def_property_range(prop, 0, 10000);
RNA_def_property_ui_text(prop, "Y1", "");
prop = RNA_def_property(srna, "y2", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "y2");
- RNA_def_property_range(prop, 0, 10000);
RNA_def_property_ui_text(prop, "Y2", "");
}
@@ -1106,7 +1031,6 @@ static void def_cmp_dblur(StructRNA *srna)
prop = RNA_def_property(srna, "iterations", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "iter");
- RNA_def_property_range(prop, 1, 128);
RNA_def_property_ui_text(prop, "Iterations", "");
prop = RNA_def_property(srna, "wrap", PROP_BOOLEAN, PROP_NONE);
@@ -1115,32 +1039,26 @@ static void def_cmp_dblur(StructRNA *srna)
prop = RNA_def_property(srna, "center_x", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "center_x");
- RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Center X", "");
prop = RNA_def_property(srna, "center_y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "center_y");
- RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Center Y", "");
prop = RNA_def_property(srna, "distance", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "distance");
- RNA_def_property_range(prop, -1.0f, 1.0f);
RNA_def_property_ui_text(prop, "Distance", "");
prop = RNA_def_property(srna, "angle", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "angle");
- RNA_def_property_range(prop, 0.0f, 360.0f);
RNA_def_property_ui_text(prop, "Angle", "");
prop = RNA_def_property(srna, "spin", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "spin");
- RNA_def_property_range(prop, -360.0f, 360.0f);
RNA_def_property_ui_text(prop, "Spin", "");
prop = RNA_def_property(srna, "zoom", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "zoom");
- RNA_def_property_range(prop, 0.0f, 100.0f);
RNA_def_property_ui_text(prop, "Zoom", "");
}
@@ -1152,18 +1070,16 @@ static void def_cmp_bilateral_blur(StructRNA *srna)
prop = RNA_def_property(srna, "iterations", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "iter");
- RNA_def_property_range(prop, 1, 128);
RNA_def_property_ui_text(prop, "Iterations", "");
prop = RNA_def_property(srna, "sigma_color", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "sigma_color");
- RNA_def_property_range(prop, 0.01f, 3.0f);
RNA_def_property_ui_text(prop, "Color Sigma", "");
prop = RNA_def_property(srna, "sigma_space", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "sigma_space");
- RNA_def_property_range(prop, 0.01f, 30.0f);
- RNA_def_property_ui_text(prop, "Space Sigma", "");
+ RNA_def_property_ui_text(prop, "Space Sigma", "");
+
}
static void def_cmp_premul_key(StructRNA *srna)
@@ -1216,37 +1132,30 @@ static void def_cmp_glare(StructRNA *srna)
prop = RNA_def_property(srna, "iterations", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "iter");
- RNA_def_property_range(prop, 2, 5);
RNA_def_property_ui_text(prop, "Iterations", "");
prop = RNA_def_property(srna, "color_modulation", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "colmod");
- RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Color Modulation", "");
prop = RNA_def_property(srna, "mix", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "mix");
- RNA_def_property_range(prop, -1.0f, 1.0f);
RNA_def_property_ui_text(prop, "Mix", "-1 is original image only, 0 is exact 50/50 mix, 1 is processed image only");
prop = RNA_def_property(srna, "threshold", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "threshold");
- RNA_def_property_range(prop, 0.0f, 1000.0f);
RNA_def_property_ui_text(prop, "Threshold", "The glare filter will only be applied to pixels brighter than this value");
prop = RNA_def_property(srna, "streaks", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "angle");
- RNA_def_property_range(prop, 2, 16);
RNA_def_property_ui_text(prop, "Streaks", "Total number of streaks");
prop = RNA_def_property(srna, "angle_offset", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "angle_ofs");
- RNA_def_property_range(prop, 0.0f, 180.0f);
RNA_def_property_ui_text(prop, "Angle Offset", "Streak angle offset in degrees");
prop = RNA_def_property(srna, "fade", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "fade");
- RNA_def_property_range(prop, 0.75f, 1.0f);
RNA_def_property_ui_text(prop, "Fade", "Streak fade-out factor");
prop = RNA_def_property(srna, "rotate_45", PROP_BOOLEAN, PROP_NONE);
@@ -1255,7 +1164,6 @@ static void def_cmp_glare(StructRNA *srna)
prop = RNA_def_property(srna, "size", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "size");
- RNA_def_property_range(prop, 6, 9);
RNA_def_property_ui_text(prop, "Size", "Glow/glare size (not actual size; relative to initial size of bright area of pixels)");
/* TODO */
@@ -1282,39 +1190,32 @@ static void def_cmp_tonemap(StructRNA *srna)
prop = RNA_def_property(srna, "key", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "key");
- RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Key", "The value the average luminance is mapped to");
prop = RNA_def_property(srna, "offset", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "offset");
- RNA_def_property_range(prop, 0.001f, 10.0f);
RNA_def_property_ui_text(prop, "Offset", "Normally always 1, but can be used as an extra control to alter the brightness curve");
prop = RNA_def_property(srna, "gamma", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "gamma");
- RNA_def_property_range(prop, 0.001f, 3.0f);
RNA_def_property_ui_text(prop, "Gamma", "If not used, set to 1");
/* TODO: } else { */
prop = RNA_def_property(srna, "intensity", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "f");
- RNA_def_property_range(prop, -8.0f, 8.0f);
RNA_def_property_ui_text(prop, "Intensity", "If less than zero, darkens image; otherwise, makes it brighter");
prop = RNA_def_property(srna, "contrast", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "m");
- RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Contrast", "Set to 0 to use estimate from input image");
prop = RNA_def_property(srna, "adaptation", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "a");
- RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Adaptation", "If 0, global; if 1, based on pixel intensity");
prop = RNA_def_property(srna, "correction", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "c");
- RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Color Correction", "If 0, same for all channels; if 1, each independent");
}
@@ -1370,22 +1271,18 @@ static void def_tex_bricks(StructRNA *srna)
prop = RNA_def_property(srna, "offset", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "custom3");
- RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Offset Amount", "");
prop = RNA_def_property(srna, "offset_frequency", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "custom1");
- RNA_def_property_range(prop, 2, 99);
RNA_def_property_ui_text(prop, "Offset Frequency", "Offset every N rows");
prop = RNA_def_property(srna, "squash", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "custom4");
- RNA_def_property_range(prop, 0.0f, 99.0f);
RNA_def_property_ui_text(prop, "Squash Amount", "");
prop = RNA_def_property(srna, "squash_frequency", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "custom2");
- RNA_def_property_range(prop, 2, 99);
RNA_def_property_ui_text(prop, "Squash Frequency", "Squash every N rows");
}
@@ -1456,7 +1353,6 @@ static void rna_def_node(BlenderRNA *brna)
RNA_def_struct_ui_text(srna, "Node", "Node in a node tree.");
RNA_def_struct_sdna(srna, "bNode");
RNA_def_struct_refine_func(srna, "rna_Node_refine");
- RNA_def_struct_path_func(srna, "rna_Node_path");
prop = RNA_def_property(srna, "location", PROP_FLOAT, PROP_XYZ);
RNA_def_property_float_sdna(prop, NULL, "locx");
diff --git a/source/blender/makesrna/intern/rna_nodetree_types.h b/source/blender/makesrna/intern/rna_nodetree_types.h
index be4f131a6d6..47a7be163b1 100644
--- a/source/blender/makesrna/intern/rna_nodetree_types.h
+++ b/source/blender/makesrna/intern/rna_nodetree_types.h
@@ -82,7 +82,7 @@ DefNode( CompositorNode, CMP_NODE_SEPYUVA, 0, "SEPYU
DefNode( CompositorNode, CMP_NODE_COMBYUVA, 0, "COMBYUVA", CombYUVA, "Combine YUVA", "" )
DefNode( CompositorNode, CMP_NODE_DIFF_MATTE, def_cmp_diff_matte, "DIFF_MATTE", DiffMatte, "Difference Key", "" )
DefNode( CompositorNode, CMP_NODE_COLOR_SPILL, def_cmp_color_spill, "COLOR_SPILL", ColorSpill, "Color Spill", "" )
-DefNode( CompositorNode, CMP_NODE_CHROMA_MATTE, def_cmp_chroma_matte, "CHROMA_MATTE", ChromaMatte, "Chroma Key", "" )
+DefNode( CompositorNode, CMP_NODE_CHROMA, def_cmp_chroma, "CHROMA", Chroma, "Chroma Key", "" )
DefNode( CompositorNode, CMP_NODE_CHANNEL_MATTE, def_cmp_channel_matte, "CHANNEL_MATTE", ChannelMatte, "Channel Key", "" )
DefNode( CompositorNode, CMP_NODE_FLIP, def_cmp_flip, "FLIP", Flip, "Flip", "" )
DefNode( CompositorNode, CMP_NODE_SPLITVIEWER, def_cmp_splitviewer, "SPLITVIEWER", SplitViewer, "Split Viewer", "" )
@@ -104,9 +104,6 @@ DefNode( CompositorNode, CMP_NODE_PREMULKEY, def_cmp_premul_key, "PREMU
DefNode( CompositorNode, CMP_NODE_GLARE, def_cmp_glare, "GLARE", Glare, "Glare", "" )
DefNode( CompositorNode, CMP_NODE_TONEMAP, def_cmp_tonemap, "TONEMAP", Tonemap, "Tonemap", "" )
DefNode( CompositorNode, CMP_NODE_LENSDIST, def_cmp_lensdist, "LENSDIST", Lensdist, "Lensdist", "" )
-DefNode( CompositorNode, CMP_NODE_VIEW_LEVELS, 0, "LEVELS", Levels, "Levels", "" )
-DefNode( CompositorNode, CMP_NODE_COLOR_MATTE, def_cmp_color_matte, "COLOR_MATTE", ColorMatte, "Color Matte", "" )
-DefNode( CompositorNode, CMP_NODE_DIST_MATTE, def_cmp_distance_matte, "DISTANCE_MATTE", DistanceMatte, "Distance Matte", "" )
DefNode( TextureNode, TEX_NODE_OUTPUT, def_tex_output, "OUTPUT", Output, "Output", "" )
DefNode( TextureNode, TEX_NODE_CHECKER, 0, "CHECKER", Checker, "Checker", "" )
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index 8525cf69f64..0b77390095e 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -39,9 +39,9 @@
#include "DNA_property_types.h"
#include "DNA_scene_types.h"
-#include "WM_api.h"
#include "WM_types.h"
+
EnumPropertyItem object_mode_items[] = {
{OB_MODE_OBJECT, "OBJECT", ICON_OBJECT_DATAMODE, "Object", ""},
{OB_MODE_EDIT, "EDIT", ICON_EDITMODE_HLT, "Edit", ""},
@@ -64,22 +64,6 @@ static EnumPropertyItem parent_type_items[] = {
{PARBONE, "BONE", 0, "Bone", ""},
{0, NULL, 0, NULL, NULL}};
-EnumPropertyItem object_type_items[] = {
- {OB_MESH, "MESH", 0, "Mesh", ""},
- {OB_CURVE, "CURVE", 0, "Curve", ""},
- {OB_SURF, "SURFACE", 0, "Surface", ""},
- {OB_MBALL, "META", 0, "Meta", ""},
- {OB_FONT, "TEXT", 0, "Text", ""},
- {0, "", 0, NULL, NULL},
- {OB_ARMATURE, "ARMATURE", 0, "Armature", ""},
- {OB_LATTICE, "LATTICE", 0, "Lattice", ""},
- {OB_EMPTY, "EMPTY", 0, "Empty", ""},
- {0, "", 0, NULL, NULL},
- {OB_CAMERA, "CAMERA", 0, "Camera", ""},
- {OB_LAMP, "LAMP", 0, "Lamp", ""},
- {0, NULL, 0, NULL, NULL}
-};
-
#ifdef RNA_RUNTIME
#include "DNA_key_types.h"
@@ -100,7 +84,7 @@ EnumPropertyItem object_type_items[] = {
void rna_Object_update(bContext *C, PointerRNA *ptr)
{
- DAG_id_flush_update(ptr->id.data, OB_RECALC_OB);
+ DAG_object_flush_update(CTX_data_scene(C), ptr->id.data, OB_RECALC_OB);
}
void rna_Object_matrix_update(bContext *C, PointerRNA *ptr)
@@ -111,13 +95,12 @@ void rna_Object_matrix_update(bContext *C, PointerRNA *ptr)
void rna_Object_update_data(bContext *C, PointerRNA *ptr)
{
- DAG_id_flush_update(ptr->id.data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ptr->id.data);
+ DAG_object_flush_update(CTX_data_scene(C), ptr->id.data, OB_RECALC_DATA);
}
static void rna_Object_dependency_update(bContext *C, PointerRNA *ptr)
{
- DAG_id_flush_update(ptr->id.data, OB_RECALC_OB);
+ DAG_object_flush_update(CTX_data_scene(C), ptr->id.data, OB_RECALC_OB);
DAG_scene_sort(CTX_data_scene(C));
}
@@ -807,8 +790,8 @@ static void rna_def_object_game_settings(BlenderRNA *brna)
{OB_BOUND_SPHERE, "SPHERE", 0, "Sphere", ""},
{OB_BOUND_CYLINDER, "CYLINDER", 0, "Cylinder", ""},
{OB_BOUND_CONE, "CONE", 0, "Cone", ""},
- {OB_BOUND_POLYT, "CONVEX_HULL", 0, "Convex Hull", ""},
- {OB_BOUND_POLYH, "TRIANGLE_MESH", 0, "Triangle Mesh", ""},
+ {OB_BOUND_POLYH, "CONVEX_HULL", 0, "Convex Hull", ""},
+ {OB_BOUND_POLYT, "TRIANGLE_MESH", 0, "Triangle Mesh", ""},
//{OB_DYN_MESH, "DYNAMIC_MESH", 0, "Dynamic Mesh", ""},
{0, NULL, 0, NULL, NULL}};
@@ -1062,8 +1045,6 @@ static void rna_def_object(BlenderRNA *brna)
{OB_DUPLIGROUP, "GROUP", 0, "Group", "Enable group instancing."},
{0, NULL, 0, NULL, NULL}};
- int matrix_dimsize[]= {4, 4};
-
srna= RNA_def_struct(brna, "Object", "ID");
RNA_def_struct_ui_text(srna, "Object", "Object datablock defining an object in a scene..");
RNA_def_struct_clear_flag(srna, STRUCT_ID_REFCOUNT);
@@ -1075,7 +1056,7 @@ static void rna_def_object(BlenderRNA *brna)
RNA_def_property_editable_func(prop, "rna_Object_data_editable");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Data", "Object data.");
- RNA_def_property_update(prop, 0, "rna_Object_update_data");
+ RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_update_data");
prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "type");
@@ -1089,7 +1070,7 @@ static void rna_def_object(BlenderRNA *brna)
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Mode", "Object interaction mode.");
- prop= RNA_def_property(srna, "layers", PROP_BOOLEAN, PROP_LAYER_MEMBER);
+ prop= RNA_def_property(srna, "layers", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "lay", 1);
RNA_def_property_array(prop, 20);
RNA_def_property_ui_text(prop, "Layers", "Layers the object is on.");
@@ -1174,8 +1155,7 @@ static void rna_def_object(BlenderRNA *brna)
RNA_def_property_int_sdna(prop, NULL, "actcol");
RNA_def_property_int_funcs(prop, "rna_Object_active_material_index_get", "rna_Object_active_material_index_set", "rna_Object_active_material_index_range");
RNA_def_property_ui_text(prop, "Active Material Index", "Index of active material slot.");
- RNA_def_property_update(prop, NC_OBJECT|ND_SHADING, NULL);
-
+
/* transform */
prop= RNA_def_property(srna, "location", PROP_FLOAT, PROP_TRANSLATION);
@@ -1226,7 +1206,7 @@ static void rna_def_object(BlenderRNA *brna)
/* matrix */
prop= RNA_def_property(srna, "matrix", PROP_FLOAT, PROP_MATRIX);
RNA_def_property_float_sdna(prop, NULL, "obmat");
- RNA_def_property_multi_array(prop, 2, matrix_dimsize);
+ RNA_def_property_array(prop, 16);
RNA_def_property_ui_text(prop, "Matrix", "Transformation matrix.");
RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_matrix_update");
@@ -1257,13 +1237,13 @@ static void rna_def_object(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "VertexGroup");
RNA_def_property_pointer_funcs(prop, "rna_Object_active_vertex_group_get", "rna_Object_active_vertex_group_set", NULL);
RNA_def_property_ui_text(prop, "Active Vertex Group", "Vertex groups of the object.");
- RNA_def_property_update(prop, 0, "rna_Object_update_data");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
prop= RNA_def_property(srna, "active_vertex_group_index", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "actdef");
RNA_def_property_int_funcs(prop, "rna_Object_active_vertex_group_index_get", "rna_Object_active_vertex_group_index_set", "rna_Object_active_vertex_group_index_range");
RNA_def_property_ui_text(prop, "Active Vertex Group Index", "Active index in vertex group array.");
- RNA_def_property_update(prop, 0, "rna_Object_update_data");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
/* empty */
@@ -1505,13 +1485,6 @@ static void rna_def_object(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "X-Ray", "Makes the object draw in front of others.");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
- /* Grease Pencil */
- prop= RNA_def_property(srna, "grease_pencil", PROP_POINTER, PROP_NONE);
- RNA_def_property_pointer_sdna(prop, NULL, "gpd");
- RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_struct_type(prop, "GreasePencil");
- RNA_def_property_ui_text(prop, "Grease Pencil Data", "Grease Pencil datablock");
-
/* pose */
prop= RNA_def_property(srna, "pose_library", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "poselib");
@@ -1530,7 +1503,7 @@ static void rna_def_object(BlenderRNA *brna)
RNA_def_property_boolean_funcs(prop, NULL, "rna_Object_shape_key_lock_set");
RNA_def_property_ui_text(prop, "Shape Key Lock", "Always show the current Shape for this Object.");
RNA_def_property_ui_icon(prop, ICON_UNPINNED, 1);
- RNA_def_property_update(prop, 0, "rna_Object_update_data");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
prop= RNA_def_property(srna, "active_shape_key", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "ShapeKey");
@@ -1541,7 +1514,7 @@ static void rna_def_object(BlenderRNA *brna)
RNA_def_property_int_sdna(prop, NULL, "shapenr");
RNA_def_property_int_funcs(prop, "rna_Object_active_shape_key_index_get", "rna_Object_active_shape_key_index_set", "rna_Object_active_shape_key_index_range");
RNA_def_property_ui_text(prop, "Active Shape Key Index", "Current shape key index.");
- RNA_def_property_update(prop, 0, "rna_Object_update_data");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
RNA_api_object(srna);
}
diff --git a/source/blender/makesrna/intern/rna_object_api.c b/source/blender/makesrna/intern/rna_object_api.c
index 968aa971f73..3c79c1cbc21 100644
--- a/source/blender/makesrna/intern/rna_object_api.c
+++ b/source/blender/makesrna/intern/rna_object_api.c
@@ -282,18 +282,18 @@ static void rna_Object_convert_to_triface(Object *ob, bContext *C, ReportList *r
if (!ob_editing)
free_editMesh(me->edit_mesh);
- DAG_id_flush_update(ob, OB_RECALC_DATA);
+ DAG_object_flush_update(sce, ob, OB_RECALC_DATA);
}
static bDeformGroup *rna_Object_add_vertex_group(Object *ob, char *group_name)
{
- return ED_vgroup_add_name(ob, group_name);
+ return add_defgroup_name(ob, group_name);
}
static void rna_Object_add_vertex_to_group(Object *ob, int vertex_index, bDeformGroup *def, float weight, int assignmode)
{
/* creates dverts if needed */
- ED_vgroup_vert_add(ob, def, vertex_index, weight, assignmode);
+ add_vert_to_defgroup(ob, def, vertex_index, weight, assignmode);
}
/* copied from old API Object.makeDisplayList (Object.c) */
@@ -307,7 +307,7 @@ static void rna_Object_make_display_list(Object *ob, bContext *C)
BKE_text_to_curve(sce, ob, CU_LEFT);
}
- DAG_id_flush_update(ob, OB_RECALC_DATA);
+ DAG_object_flush_update(sce, ob, OB_RECALC_DATA);
}
static Object *rna_Object_find_armature(Object *ob)
diff --git a/source/blender/makesrna/intern/rna_object_force.c b/source/blender/makesrna/intern/rna_object_force.c
index 3dfbfcccacf..932bef9969d 100644
--- a/source/blender/makesrna/intern/rna_object_force.c
+++ b/source/blender/makesrna/intern/rna_object_force.c
@@ -54,6 +54,7 @@
static void rna_Cache_change(bContext *C, PointerRNA *ptr)
{
+ Scene *scene = CTX_data_scene(C);
Object *ob = CTX_data_active_object(C);
PointCache *cache = (PointCache*)ptr->data;
PTCacheID *pid = NULL;
@@ -66,7 +67,7 @@ static void rna_Cache_change(bContext *C, PointerRNA *ptr)
BKE_ptcache_ids_from_object(&pidlist, ob);
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
for(pid=pidlist.first; pid; pid=pid->next) {
if(pid->cache==cache)
@@ -104,6 +105,7 @@ static void rna_Cache_toggle_disk_cache(bContext *C, PointerRNA *ptr)
static void rna_Cache_idname_change(bContext *C, PointerRNA *ptr)
{
+ Scene *scene = CTX_data_scene(C);
Object *ob = CTX_data_active_object(C);
PointCache *cache = (PointCache*)ptr->data;
PTCacheID *pid = NULL, *pid2= NULL;
@@ -131,7 +133,7 @@ static void rna_Cache_idname_change(bContext *C, PointerRNA *ptr)
cache->flag &= ~(PTCACHE_OUTDATED|PTCACHE_FRAMES_SKIPPED);
BKE_ptcache_load_external(pid);
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
}
else {
for(pid=pidlist.first; pid; pid=pid->next) {
@@ -360,6 +362,7 @@ static void rna_SoftBodySettings_goal_vgroup_set(PointerRNA *ptr, const char *va
static void rna_FieldSettings_update(bContext *C, PointerRNA *ptr)
{
+ Scene *scene= CTX_data_scene(C);
Object *ob= (Object*)ptr->id.data;
if(ob->pd->forcefield != PFIELD_TEXTURE && ob->pd->tex) {
@@ -367,7 +370,7 @@ static void rna_FieldSettings_update(bContext *C, PointerRNA *ptr)
ob->pd->tex= 0;
}
- DAG_id_flush_update(&ob->id, OB_RECALC_OB);
+ DAG_object_flush_update(scene, ob, OB_RECALC_OB);
WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
}
@@ -410,9 +413,9 @@ static void rna_FieldSettings_dependency_update(bContext *C, PointerRNA *ptr)
DAG_scene_sort(scene);
if(ob->type == OB_CURVE && ob->pd->forcefield == PFIELD_GUIDE)
- DAG_id_flush_update(&ob->id, OB_RECALC);
+ DAG_object_flush_update(scene, ob, OB_RECALC);
else
- DAG_id_flush_update(&ob->id, OB_RECALC_OB);
+ DAG_object_flush_update(scene, ob, OB_RECALC_OB);
WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
}
@@ -434,20 +437,13 @@ static void rna_CollisionSettings_dependency_update(bContext *C, PointerRNA *ptr
static void rna_CollisionSettings_update(bContext *C, PointerRNA *ptr)
{
+ Scene *scene= CTX_data_scene(C);
Object *ob= (Object*)ptr->id.data;
- DAG_id_flush_update(&ob->id, OB_RECALC);
+ DAG_object_flush_update(scene, ob, OB_RECALC);
WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
}
-static void rna_softbody_update(bContext *C, PointerRNA *ptr)
-{
- Object *ob= (Object*)ptr->id.data;
-
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
-}
-
#else
static void rna_def_pointcache(BlenderRNA *brna)
@@ -900,25 +896,25 @@ static void rna_def_softbody(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "mediafrict");
RNA_def_property_range(prop, 0.0f, 50.0f);
RNA_def_property_ui_text(prop, "Friction", "General media friction for point movements");
- RNA_def_property_update(prop, 0, "rna_softbody_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
prop= RNA_def_property(srna, "mass", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "nodemass");
RNA_def_property_range(prop, 0.0f, 50000.0f);
RNA_def_property_ui_text(prop, "Mass", "");
- RNA_def_property_update(prop, 0, "rna_softbody_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
prop= RNA_def_property(srna, "gravity", PROP_FLOAT, PROP_ACCELERATION);
RNA_def_property_float_sdna(prop, NULL, "grav");
RNA_def_property_range(prop, -10.0f, 10.0f);
RNA_def_property_ui_text(prop, "Gravitation", "Apply gravitation to point movement");
- RNA_def_property_update(prop, 0, "rna_softbody_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
prop= RNA_def_property(srna, "speed", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "physics_speed");
RNA_def_property_range(prop, 0.01f, 100.0f);
RNA_def_property_ui_text(prop, "Speed", "Tweak timing for physics to control frequency and speed");
- RNA_def_property_update(prop, 0, "rna_softbody_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
/* Goal */
@@ -931,31 +927,31 @@ static void rna_def_softbody(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "mingoal");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Goal Minimum", "Goal minimum, vertex group weights are scaled to match this range.");
- RNA_def_property_update(prop, 0, "rna_softbody_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
prop= RNA_def_property(srna, "goal_max", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "maxgoal");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Goal Maximum", "Goal maximum, vertex group weights are scaled to match this range.");
- RNA_def_property_update(prop, 0, "rna_softbody_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
prop= RNA_def_property(srna, "goal_default", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "defgoal");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Goal Default", "Default Goal (vertex target position) value, when no Vertex Group used.");
- RNA_def_property_update(prop, 0, "rna_softbody_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
prop= RNA_def_property(srna, "goal_spring", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "goalspring");
RNA_def_property_range(prop, 0.0f, 0.999f);
RNA_def_property_ui_text(prop, "Goal Stiffness", "Goal (vertex target position) spring stiffness.");
- RNA_def_property_update(prop, 0, "rna_softbody_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
prop= RNA_def_property(srna, "goal_friction", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "goalfrict");
RNA_def_property_range(prop, 0.0f, 50.0f);
RNA_def_property_ui_text(prop, "Goal Damping", "Goal (vertex target position) friction.");
- RNA_def_property_update(prop, 0, "rna_softbody_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
/* Edge Spring Settings */
@@ -963,43 +959,43 @@ static void rna_def_softbody(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "inspring");
RNA_def_property_range(prop, 0.0f, 0.999f);
RNA_def_property_ui_text(prop, "Pull", "Edge spring stiffness when longer than rest length");
- RNA_def_property_update(prop, 0, "rna_softbody_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
prop= RNA_def_property(srna, "push", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "inpush");
RNA_def_property_range(prop, 0.0f, 0.999f);
RNA_def_property_ui_text(prop, "Push", "Edge spring stiffness when shorter than rest length");
- RNA_def_property_update(prop, 0, "rna_softbody_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
prop= RNA_def_property(srna, "damp", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "infrict");
RNA_def_property_range(prop, 0.0f, 50.0f);
RNA_def_property_ui_text(prop, "Damp", "Edge spring friction");
- RNA_def_property_update(prop, 0, "rna_softbody_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
prop= RNA_def_property(srna, "spring_length", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "springpreload");
RNA_def_property_range(prop, 0.0f, 200.0f);
RNA_def_property_ui_text(prop, "SL", "Alter spring length to shrink/blow up (unit %) 0 to disable");
- RNA_def_property_update(prop, 0, "rna_softbody_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
prop= RNA_def_property(srna, "aero", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "aeroedge");
RNA_def_property_range(prop, 0.0f, 30000.0f);
RNA_def_property_ui_text(prop, "Aero", "Make edges 'sail'");
- RNA_def_property_update(prop, 0, "rna_softbody_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
prop= RNA_def_property(srna, "plastic", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "plastic");
RNA_def_property_range(prop, 0.0f, 100.0f);
RNA_def_property_ui_text(prop, "Plastic", "Permanent deform");
- RNA_def_property_update(prop, 0, "rna_softbody_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
prop= RNA_def_property(srna, "bending", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "secondspring");
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_text(prop, "Bending", "Bending Stiffness");
- RNA_def_property_update(prop, 0, "rna_softbody_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
prop= RNA_def_property(srna, "shear", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "shearstiff");
@@ -1012,25 +1008,25 @@ static void rna_def_softbody(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "sbc_mode");
RNA_def_property_enum_items(prop, collision_type_items);
RNA_def_property_ui_text(prop, "Collision Type", "Choose Collision Type");
- RNA_def_property_update(prop, 0, "rna_softbody_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
prop= RNA_def_property(srna, "ball_size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "colball");
RNA_def_property_range(prop, -10.0f, 10.0f);
RNA_def_property_ui_text(prop, "Ball Size", "Absolute ball size or factor if not manual adjusted");
- RNA_def_property_update(prop, 0, "rna_softbody_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
prop= RNA_def_property(srna, "ball_stiff", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ballstiff");
RNA_def_property_range(prop, 0.001f, 100.0f);
RNA_def_property_ui_text(prop, "Ball Size", "Ball inflating presure");
- RNA_def_property_update(prop, 0, "rna_softbody_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
prop= RNA_def_property(srna, "ball_damp", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "balldamp");
RNA_def_property_range(prop, 0.001f, 1.0f);
RNA_def_property_ui_text(prop, "Ball Size", "Blending to inelastic collision");
- RNA_def_property_update(prop, 0, "rna_softbody_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
/* Solver */
@@ -1038,36 +1034,36 @@ static void rna_def_softbody(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "rklimit");
RNA_def_property_range(prop, 0.001f, 10.0f);
RNA_def_property_ui_text(prop, "Error Limit", "The Runge-Kutta ODE solver error limit, low value gives more precision, high values speed");
- RNA_def_property_update(prop, 0, "rna_softbody_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
prop= RNA_def_property(srna, "minstep", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "minloops");
RNA_def_property_range(prop, 0, 30000);
RNA_def_property_ui_text(prop, "Min Step", "Minimal # solver steps/frame");
- RNA_def_property_update(prop, 0, "rna_softbody_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
prop= RNA_def_property(srna, "maxstep", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "maxloops");
RNA_def_property_range(prop, 0, 30000);
RNA_def_property_ui_text(prop, "Max Step", "Maximal # solver steps/frame");
- RNA_def_property_update(prop, 0, "rna_softbody_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
prop= RNA_def_property(srna, "choke", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "choke");
RNA_def_property_range(prop, 0, 100);
RNA_def_property_ui_text(prop, "Choke", "'Viscosity' inside collision target");
- RNA_def_property_update(prop, 0, "rna_softbody_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
prop= RNA_def_property(srna, "fuzzy", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "fuzzyness");
RNA_def_property_range(prop, 1, 100);
RNA_def_property_ui_text(prop, "Fuzzy", "Fuzzyness while on collision, high values make collsion handling faster but less stable");
- RNA_def_property_update(prop, 0, "rna_softbody_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
prop= RNA_def_property(srna, "auto_step", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "solverflags", SBSO_OLDERR);
RNA_def_property_ui_text(prop, "V", "Use velocities for automagic step sizes");
- RNA_def_property_update(prop, 0, "rna_softbody_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
prop= RNA_def_property(srna, "diagnose", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "solverflags", SBSO_MONITOR);
@@ -1078,37 +1074,37 @@ static void rna_def_softbody(BlenderRNA *brna)
prop= RNA_def_property(srna, "use_goal", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_SoftBodySettings_use_goal_get", "rna_SoftBodySettings_use_goal_set");
RNA_def_property_ui_text(prop, "Use Goal", "Define forces for vertices to stick to animated position.");
- RNA_def_property_update(prop, 0, "rna_softbody_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
prop= RNA_def_property(srna, "use_edges", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_SoftBodySettings_use_edges_get", "rna_SoftBodySettings_use_edges_set");
RNA_def_property_ui_text(prop, "Use Edges", "Use Edges as springs");
- RNA_def_property_update(prop, 0, "rna_softbody_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
prop= RNA_def_property(srna, "stiff_quads", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_SoftBodySettings_stiff_quads_get", "rna_SoftBodySettings_stiff_quads_set");
RNA_def_property_ui_text(prop, "Stiff Quads", "Adds diagonal springs on 4-gons.");
- RNA_def_property_update(prop, 0, "rna_softbody_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
prop= RNA_def_property(srna, "edge_collision", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_SoftBodySettings_edge_collision_get", "rna_SoftBodySettings_edge_collision_set");
RNA_def_property_ui_text(prop, "Edge Collision", "Edges collide too.");
- RNA_def_property_update(prop, 0, "rna_softbody_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
prop= RNA_def_property(srna, "face_collision", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_SoftBodySettings_face_collision_get", "rna_SoftBodySettings_face_collision_set");
RNA_def_property_ui_text(prop, "Face Collision", "Faces collide too, SLOOOOOW warning.");
- RNA_def_property_update(prop, 0, "rna_softbody_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
prop= RNA_def_property(srna, "new_aero", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_SoftBodySettings_new_aero_get", "rna_SoftBodySettings_new_aero_set");
RNA_def_property_ui_text(prop, "N", "New aero(uses angle and length).");
- RNA_def_property_update(prop, 0, "rna_softbody_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
prop= RNA_def_property(srna, "self_collision", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_SoftBodySettings_self_collision_get", "rna_SoftBodySettings_self_collision_set");
RNA_def_property_ui_text(prop, "Self Collision", "Enable naive vertex ball self collision.");
- RNA_def_property_update(prop, 0, "rna_softbody_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
}
void RNA_def_object_force(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_packedfile.c b/source/blender/makesrna/intern/rna_packedfile.c
index 85918bce05b..6b9a708f555 100644
--- a/source/blender/makesrna/intern/rna_packedfile.c
+++ b/source/blender/makesrna/intern/rna_packedfile.c
@@ -31,13 +31,6 @@
#include "DNA_packedFile_types.h"
-EnumPropertyItem unpack_method_items[] = {
- {PF_USE_LOCAL, "USE_LOCAL", 0, "Use Local File", ""},
- {PF_WRITE_LOCAL, "WRITE_LOCAL", 0, "Write Local File (overwrite existing)", ""},
- {PF_USE_ORIGINAL, "USE_ORIGINAL", 0, "Use Original File", ""},
- {PF_WRITE_ORIGINAL, "WRITE_ORIGINAL", 0, "Write Original File (overwrite existing)", ""},
- {0, NULL, 0, NULL, NULL}};
-
#ifdef RNA_RUNTIME
#else
diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c
index 719e6f43eed..e0dbc232e06 100644
--- a/source/blender/makesrna/intern/rna_particle.c
+++ b/source/blender/makesrna/intern/rna_particle.c
@@ -98,7 +98,6 @@ EnumPropertyItem part_hair_ren_as_items[] = {
#include "BKE_context.h"
#include "BKE_depsgraph.h"
#include "BKE_particle.h"
-#include "BKE_pointcache.h"
#include "BLI_arithb.h"
@@ -114,14 +113,12 @@ static void rna_Particle_redo(bContext *C, PointerRNA *ptr)
psys->recalc = PSYS_RECALC_REDO;
if(ob)
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
}
else {
part = ptr->id.data;
psys_flush_particle_settings(scene, part, PSYS_RECALC_REDO);
}
-
- WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_DATA, NULL);
}
static void rna_Particle_reset(bContext *C, PointerRNA *ptr)
@@ -136,15 +133,13 @@ static void rna_Particle_reset(bContext *C, PointerRNA *ptr)
psys->recalc = PSYS_RECALC_RESET;
if(ob) {
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
}
}
else {
part = ptr->id.data;
psys_flush_particle_settings(scene, part, PSYS_RECALC_RESET);
}
-
- WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_DATA, NULL);
}
static void rna_Particle_target_reset(bContext *C, PointerRNA *ptr)
@@ -176,23 +171,22 @@ static void rna_Particle_target_reset(bContext *C, PointerRNA *ptr)
psys->recalc = PSYS_RECALC_RESET;
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
DAG_scene_sort(scene);
}
-
- WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_DATA, NULL);
}
static void rna_Particle_target_redo(bContext *C, PointerRNA *ptr)
{
+ Scene *scene = CTX_data_scene(C);
+
if(ptr->type==&RNA_ParticleTarget) {
Object *ob = (Object*)ptr->id.data;
ParticleSystem *psys = psys_get_current(ob);
psys->recalc = PSYS_RECALC_REDO;
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_DATA, NULL);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
}
}
@@ -208,15 +202,13 @@ static void rna_Particle_change_type(bContext *C, PointerRNA *ptr)
psys->recalc = PSYS_RECALC_RESET|PSYS_RECALC_TYPE;
if(ob) {
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
}
}
else {
part = ptr->id.data;
psys_flush_particle_settings(scene, part, PSYS_RECALC_RESET|PSYS_RECALC_TYPE);
}
-
- WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_DATA, NULL);
}
static void rna_Particle_change_physics(bContext *C, PointerRNA *ptr)
@@ -224,7 +216,6 @@ static void rna_Particle_change_physics(bContext *C, PointerRNA *ptr)
Scene *scene = CTX_data_scene(C);
ParticleSettings *part = ptr->id.data;
psys_flush_particle_settings(scene, part, PSYS_RECALC_RESET|PSYS_RECALC_PHYS);
- WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_DATA, NULL);
}
static void rna_Particle_redo_child(bContext *C, PointerRNA *ptr)
@@ -239,15 +230,13 @@ static void rna_Particle_redo_child(bContext *C, PointerRNA *ptr)
psys->recalc = PSYS_RECALC_CHILD;
if(ob)
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
}
else {
part = ptr->id.data;
psys_flush_particle_settings(scene, part, PSYS_RECALC_CHILD);
}
-
- WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_DATA, NULL);
}
static PointerRNA rna_particle_settings_get(PointerRNA *ptr)
{
@@ -447,30 +436,7 @@ static void rna_ParticleTarget_name_get(PointerRNA *ptr, char *str)
else
strcpy(str, "Invalid target!");
}
-static int rna_ParticleSystem_multiple_caches_get(PointerRNA *ptr)
-{
- ParticleSystem *psys= (ParticleSystem*)ptr->data;
-
- return (psys->ptcaches.first != psys->ptcaches.last);
-}
-static int rna_ParticleSystem_editable_get(PointerRNA *ptr)
-{
- ParticleSystem *psys= (ParticleSystem*)ptr->data;
-
- if(psys->part && psys->part->type==PART_HAIR)
- return (psys->flag & PSYS_HAIR_DONE);
- else
- return (psys->pointcache->flag & PTCACHE_BAKED);
-}
-static int rna_ParticleSystem_edited_get(PointerRNA *ptr)
-{
- ParticleSystem *psys= (ParticleSystem*)ptr->data;
- if(psys->part && psys->part->type==PART_HAIR)
- return (psys->edit && psys->edit->edited);
- else
- return (psys->pointcache->edit && psys->pointcache->edit->edited);
-}
EnumPropertyItem from_items[] = {
{PART_FROM_VERT, "VERT", 0, "Vertexes", ""},
{PART_FROM_FACE, "FACE", 0, "Faces", ""},
@@ -643,6 +609,12 @@ static void rna_def_particle(BlenderRNA *brna)
RNA_def_struct_sdna(srna, "ParticleData");
RNA_def_struct_ui_text(srna, "Particle", "Particle in a particle system.");
+ prop= RNA_def_property(srna, "stick_object", PROP_POINTER, PROP_NONE);
+ RNA_def_property_pointer_sdna(prop, NULL, "stick_ob");
+ RNA_def_property_struct_type(prop, "Object");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Stick Object", "Object that particle sticks to when dead");
+
/* Particle State & Previous State */
prop= RNA_def_property(srna, "location", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "state.co");
@@ -687,6 +659,24 @@ static void rna_def_particle(BlenderRNA *brna)
RNA_def_property_collection_sdna(prop, NULL, "keys", "totkey");
RNA_def_property_struct_type(prop, "ParticleKey");
RNA_def_property_ui_text(prop, "Keyed States", "");
+
+ /* Random variables */
+
+ prop= RNA_def_property(srna, "random_rotation", PROP_FLOAT, PROP_QUATERNION);
+ RNA_def_property_float_sdna(prop, NULL, "r_rot");
+// RNA_def_property_range(prop, lowerLimitf, upperLimitf);
+ RNA_def_property_ui_text(prop, "Random Rotation", "");
+
+ prop= RNA_def_property(srna, "random_a_velocity", PROP_FLOAT, PROP_VELOCITY);
+ RNA_def_property_float_sdna(prop, NULL, "r_ave");
+// RNA_def_property_range(prop, lowerLimitf, upperLimitf);
+ RNA_def_property_ui_text(prop, "Random Angular Velocity", "");
+
+ prop= RNA_def_property(srna, "random_velocity", PROP_FLOAT, PROP_VELOCITY);
+ RNA_def_property_float_sdna(prop, NULL, "r_ve");
+// RNA_def_property_range(prop, lowerLimitf, upperLimitf);
+ RNA_def_property_ui_text(prop, "Random Velocity", "");
+
//
// float fuv[4], foffset; /* coordinates on face/edge number "num" and depth along*/
// /* face normal for volume emission */
@@ -709,12 +699,18 @@ static void rna_def_particle(BlenderRNA *brna)
// RNA_def_property_range(prop, lowerLimitf, upperLimitf);
RNA_def_property_ui_text(prop, "Size", "");
+ prop= RNA_def_property(srna, "size_multiplier", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "sizemul");
+// RNA_def_property_range(prop, lowerLimitf, upperLimitf);
+ RNA_def_property_ui_text(prop, "Size Multiplier", "");
+
//
// int num; /* index to vert/edge/face */
// int num_dmcache; /* index to derived mesh data (face) to avoid slow lookups */
// int pad;
//
// int totkey;
+// int bpi; /* softbody body point start index */
/* flag */
prop= RNA_def_property(srna, "unexist", PROP_BOOLEAN, PROP_NONE);
@@ -725,10 +721,31 @@ static void rna_def_particle(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "flag", PARS_NO_DISP);
RNA_def_property_ui_text(prop, "no_disp", "");
+ prop= RNA_def_property(srna, "sticky", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", PARS_STICKY);
+ RNA_def_property_ui_text(prop, "sticky", "");
+
+ prop= RNA_def_property(srna, "transform", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", PARS_TRANSFORM);
+ RNA_def_property_ui_text(prop, "transform", "");
+
+ prop= RNA_def_property(srna, "hide", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", PARS_HIDE);
+ RNA_def_property_ui_text(prop, "hide", "");
+
+ prop= RNA_def_property(srna, "tag", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", PARS_TAG);
+ RNA_def_property_ui_text(prop, "tag", "");
+
prop= RNA_def_property(srna, "rekey", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PARS_REKEY);
RNA_def_property_ui_text(prop, "rekey", "");
+ prop= RNA_def_property(srna, "edit_recalc", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", PARS_EDIT_RECALC);
+ RNA_def_property_ui_text(prop, "edit_recalc", "");
+
+
prop= RNA_def_property(srna, "alive_state", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "alive");
RNA_def_property_enum_items(prop, alive_items);
@@ -868,19 +885,19 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_REACT_STA_END);
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_ui_text(prop, "Start/End", "Give birth to unreacted particles eventually.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "react_multiple", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_REACT_MULTIPLE);
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_ui_text(prop, "Multi React", "React multiple times.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "loop", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_LOOP);
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_ui_text(prop, "Loop", "Loop particle lives.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
/* TODO: used somewhere? */
prop= RNA_def_property(srna, "hair_geometry", PROP_BOOLEAN, PROP_NONE);
@@ -890,88 +907,94 @@ static void rna_def_particle_settings(BlenderRNA *brna)
prop= RNA_def_property(srna, "unborn", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_UNBORN);
RNA_def_property_ui_text(prop, "Unborn", "Show particles before they are emitted.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
prop= RNA_def_property(srna, "died", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_DIED);
RNA_def_property_ui_text(prop, "Died", "Show particles after they have died");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
prop= RNA_def_property(srna, "trand", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_TRAND);
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_ui_text(prop, "Random", "Emit in random order of elements");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "even_distribution", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_EDISTR);
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_ui_text(prop, "Even Distribution", "Use even distribution from faces based on face areas or edge lengths.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
-
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+
+ prop= RNA_def_property(srna, "sticky", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_STICKY);
+ RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
+ RNA_def_property_ui_text(prop, "Sticky", "Particles stick to collided objects if they die in the collision.");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+
prop= RNA_def_property(srna, "die_on_collision", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_DIE_ON_COL);
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_ui_text(prop, "Die on hit", "Particles die when they collide with a deflector object.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "size_deflect", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_SIZE_DEFL);
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_ui_text(prop, "Size Deflect", "Use particle's size in deflection.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "rotation_dynamic", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_ROT_DYN);
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_ui_text(prop, "Dynamic", "Sets rotation to dynamic/constant");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "sizemass", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_SIZEMASS);
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_ui_text(prop, "Mass from Size", "Multiply mass with particle size.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "boids_2d", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_BOIDS_2D);
RNA_def_property_ui_text(prop, "Boids 2D", "Constrain boids to a surface");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "branching", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_BRANCHING);
RNA_def_property_ui_text(prop, "Branching", "Branch child paths from each other.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "animate_branching", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_ANIM_BRANCHING);
RNA_def_property_ui_text(prop, "Animated", "Animate branching");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "symmetric_branching", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_SYMM_BRANCHING);
RNA_def_property_ui_text(prop, "Symmetric", "Start and end points are the same.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "hair_bspline", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_HAIR_BSPLINE);
RNA_def_property_ui_text(prop, "B-Spline", "Interpolate hair using B-Splines.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
prop= RNA_def_property(srna, "grid_invert", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_GRID_INVERT);
RNA_def_property_ui_text(prop, "Invert", "Invert what is considered object and what is not.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "child_effector", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_CHILD_EFFECT);
RNA_def_property_ui_text(prop, "Children", "Apply effectors to children.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
prop= RNA_def_property(srna, "child_seams", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_CHILD_SEAMS);
RNA_def_property_ui_text(prop, "Use seams", "Use seams to determine parents");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
/* TODO: used somewhere? */
prop= RNA_def_property(srna, "child_render", PROP_BOOLEAN, PROP_NONE);
@@ -981,19 +1004,19 @@ static void rna_def_particle_settings(BlenderRNA *brna)
prop= RNA_def_property(srna, "child_guide", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_CHILD_GUIDE);
RNA_def_property_ui_text(prop, "child_guide", "");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
prop= RNA_def_property(srna, "self_effect", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_SELF_EFFECT);
RNA_def_property_ui_text(prop, "Self Effect", "Particle effectors effect themselves.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, type_items);
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_ui_text(prop, "Type", "");
- RNA_def_property_update(prop, 0, "rna_Particle_change_type");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_change_type");
prop= RNA_def_property(srna, "emit_from", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "from");
@@ -1001,14 +1024,14 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_Particle_from_itemf");
RNA_def_property_ui_text(prop, "Emit From", "Where to emit particles from");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "distribution", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "distr");
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_enum_items(prop, dist_items);
RNA_def_property_ui_text(prop, "Distribution", "How to distribute particles on selected element");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
/* physics modes */
prop= RNA_def_property(srna, "physics_type", PROP_ENUM, PROP_NONE);
@@ -1016,130 +1039,130 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_enum_items(prop, phys_type_items);
RNA_def_property_ui_text(prop, "Physics Type", "Particle physics type");
- RNA_def_property_update(prop, 0, "rna_Particle_change_physics");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_change_physics");
prop= RNA_def_property(srna, "rotation_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "rotmode");
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_enum_items(prop, rot_mode_items);
RNA_def_property_ui_text(prop, "Rotation", "Particles initial rotation");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "angular_velocity_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "avemode");
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_enum_items(prop, ave_mode_items);
RNA_def_property_ui_text(prop, "Angular Velocity Mode", "Particle angular velocity mode.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "react_event", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "reactevent");
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_enum_items(prop, react_event_items);
RNA_def_property_ui_text(prop, "React On", "The event of target particles to react on.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
/*draw flag*/
prop= RNA_def_property(srna, "velocity", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_VEL);
RNA_def_property_ui_text(prop, "Velocity", "Show particle velocity");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
prop= RNA_def_property(srna, "show_size", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_SIZE);
RNA_def_property_ui_text(prop, "Size", "Show particle size");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
prop= RNA_def_property(srna, "emitter", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_EMITTER);
RNA_def_property_ui_text(prop, "Emitter", "Render emitter Object also.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
prop= RNA_def_property(srna, "draw_health", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_HEALTH);
RNA_def_property_ui_text(prop, "Health", "Draw boid health");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
prop= RNA_def_property(srna, "abs_path_time", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_ABS_PATH_TIME);
RNA_def_property_ui_text(prop, "Absolute Path Time", "Path timing is in absolute frames");
- RNA_def_property_update(prop, 0, "rna_Particle_abspathtime_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_abspathtime_update");
prop= RNA_def_property(srna, "billboard_lock", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_BB_LOCK);
RNA_def_property_ui_text(prop, "Lock Billboard", "Lock the billboards align axis");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
prop= RNA_def_property(srna, "parent", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_PARENT);
RNA_def_property_ui_text(prop, "Parents", "Render parent particles.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
prop= RNA_def_property(srna, "num", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_NUM);
RNA_def_property_ui_text(prop, "Number", "Show particle number");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
prop= RNA_def_property(srna, "rand_group", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_RAND_GR);
RNA_def_property_ui_text(prop, "Pick Random", "Pick objects from group randomly");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
prop= RNA_def_property(srna, "render_adaptive", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_REN_ADAPT);
RNA_def_property_ui_text(prop, "Adaptive render", "Draw steps of the particle path");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
prop= RNA_def_property(srna, "velocity_length", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_VEL_LENGTH);
RNA_def_property_ui_text(prop, "Speed", "Multiply line length by particle speed");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
prop= RNA_def_property(srna, "material_color", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_MAT_COL);
RNA_def_property_ui_text(prop, "Material Color", "Draw particles using material's diffuse color.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
prop= RNA_def_property(srna, "whole_group", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_WHOLE_GR);
RNA_def_property_ui_text(prop, "Whole Group", "Use whole group at once.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
prop= RNA_def_property(srna, "render_strand", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_REN_STRAND);
RNA_def_property_ui_text(prop, "Strand render", "Use the strand primitive for rendering");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
prop= RNA_def_property(srna, "draw_as", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "draw_as");
RNA_def_property_enum_items(prop, part_draw_as_items);
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_Particle_draw_as_itemf");
RNA_def_property_ui_text(prop, "Particle Drawing", "How particles are drawn in viewport");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
prop= RNA_def_property(srna, "ren_as", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "ren_as");
RNA_def_property_enum_items(prop, part_ren_as_items);
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_Particle_ren_as_itemf");
RNA_def_property_ui_text(prop, "Particle Rendering", "How particles are rendered");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
prop= RNA_def_property(srna, "draw_size", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 0, 10);
RNA_def_property_ui_text(prop, "Draw Size", "Size of particles on viewport in pixels (0=default)");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
prop= RNA_def_property(srna, "child_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "childtype");
RNA_def_property_enum_items(prop, child_type_items);
RNA_def_property_ui_text(prop, "Children From", "Create child particles");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "draw_step", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 0, 7);
RNA_def_property_ui_range(prop, 0, 10, 1, 0);
RNA_def_property_ui_text(prop, "Steps", "How many steps paths are drawn with (power of 2)");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
prop= RNA_def_property(srna, "render_step", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "ren_step");
@@ -1150,7 +1173,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
prop= RNA_def_property(srna, "hair_step", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 2, 50);
RNA_def_property_ui_text(prop, "Segments", "Number of hair segments");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
//TODO: not found in UI, readonly?
@@ -1173,13 +1196,13 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_int_sdna(prop, NULL, "disp");
RNA_def_property_range(prop, 0, 100);
RNA_def_property_ui_text(prop, "Display", "Percentage of particles to display in 3d view");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "material", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "omat");
RNA_def_property_range(prop, 1, 16);
RNA_def_property_ui_text(prop, "Material", "Specify material used for the particles");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
//TODO: is this read only/internal?
@@ -1191,24 +1214,24 @@ static void rna_def_particle_settings(BlenderRNA *brna)
prop= RNA_def_property(srna, "integrator", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, integrator_type_items);
RNA_def_property_ui_text(prop, "Integration", "Select physics integrator type");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "kink", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, kink_type_items);
RNA_def_property_ui_text(prop, "Kink", "Type of periodic offset on the path");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "kink_axis", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, kink_axis_items);
RNA_def_property_ui_text(prop, "Axis", "Which axis to use for offset");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
/* billboards */
prop= RNA_def_property(srna, "billboard_align", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "bb_align");
RNA_def_property_enum_items(prop, bb_align_items);
RNA_def_property_ui_text(prop, "Align to", "In respect to what the billboards are aligned");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
prop= RNA_def_property(srna, "billboard_uv_split", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "bb_uv_split");
@@ -1230,13 +1253,13 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "bb_tilt");
RNA_def_property_range(prop, -1.0f, 1.0f);
RNA_def_property_ui_text(prop, "Tilt", "Tilt of the billboards");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
prop= RNA_def_property(srna, "billboard_random_tilt", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "bb_rand_tilt");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Random Tilt", "Random tilt of the billboards");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
prop= RNA_def_property(srna, "billboard_offset", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "bb_offset");
@@ -1244,7 +1267,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_range(prop, -100.0f, 100.0f);
RNA_def_property_ui_range(prop, -1.0, 1.0, 0.1, 3);
RNA_def_property_ui_text(prop, "Billboard Offset", "");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
/* simplification */
prop= RNA_def_property(srna, "enable_simplify", PROP_BOOLEAN, PROP_NONE);
@@ -1279,7 +1302,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_float_funcs(prop, NULL, "rna_PartSettings_start_set", NULL);
RNA_def_property_ui_text(prop, "Start", "Frame # to start emitting particles.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "end", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, MINAFRAMEF, MAXFRAMEF);
@@ -1287,37 +1310,37 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_float_funcs(prop, NULL, "rna_PartSettings_end_set", NULL);
RNA_def_property_ui_text(prop, "End", "Frame # to stop emitting particles.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "lifetime", PROP_FLOAT, PROP_TIME);
RNA_def_property_range(prop, 1.0f, MAXFRAMEF);
RNA_def_property_ui_text(prop, "Lifetime", "Specify the life span of the particles");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "random_lifetime", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "randlife");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Random", "Give the particle life a random variation.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "time_tweak", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "timetweak");
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_text(prop, "Tweak", "A multiplier for physics timestep (1.0 means one frame = 1/25 seconds)");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "jitter_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_float_sdna(prop, NULL, "jitfac");
RNA_def_property_range(prop, 0.0f, 2.0f);
RNA_def_property_ui_text(prop, "Amount", "Amount of jitter applied to the sampling.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "effect_hair", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "eff_hair");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Stiffnes", "Hair stiffness for effectors");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
prop= RNA_def_property(srna, "amount", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "totpart");
@@ -1328,14 +1351,14 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_range(prop, 0, 10000000);
RNA_def_property_ui_range(prop, 0, 100000, 1, 0);
RNA_def_property_ui_text(prop, "Amount", "Total number of particles.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "userjit", PROP_INT, PROP_UNSIGNED);//TODO: can we get a better name for userjit?
RNA_def_property_int_sdna(prop, NULL, "userjit");
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_range(prop, 0, 1000);
RNA_def_property_ui_text(prop, "P/F", "Emission locations / face (0 = automatic).");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "grid_resolution", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "grid_res");
@@ -1343,102 +1366,102 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_range(prop, 1, 46); /* ~100k particles in a cube */
RNA_def_property_ui_range(prop, 1, 215, 1, 0); /* ~10M particles in a cube */
RNA_def_property_ui_text(prop, "Resolution", "The resolution of the particle grid.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
/* initial velocity factors */
prop= RNA_def_property(srna, "normal_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "normfac");//optional if prop names are the same
RNA_def_property_range(prop, -200.0f, 200.0f);
RNA_def_property_ui_text(prop, "Normal", "Let the surface normal give the particle a starting speed.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "object_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "obfac");
RNA_def_property_range(prop, -200.0f, 200.0f);
RNA_def_property_ui_range(prop, -1.0f, 1.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Object", "Let the object give the particle a starting speed");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "random_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "randfac");//optional if prop names are the same
RNA_def_property_range(prop, 0.0f, 200.0f);
RNA_def_property_ui_text(prop, "Random", "Give the starting speed a random variation.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "particle_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "partfac");
RNA_def_property_range(prop, -200.0f, 200.0f);
RNA_def_property_ui_range(prop, -1.0f, 1.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Particle", "Let the target particle give the particle a starting speed.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "tangent_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "tanfac");
RNA_def_property_range(prop, -200.0f, 200.0f);
RNA_def_property_ui_text(prop, "Tangent", "Let the surface tangent give the particle a starting speed.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "tangent_phase", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "tanphase");
RNA_def_property_range(prop, -1.0f, 1.0f);
RNA_def_property_ui_text(prop, "Rot", "Rotate the surface tangent.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "reactor_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "reactfac");
RNA_def_property_range(prop, -10.0f, 10.0f);
RNA_def_property_ui_text(prop, "Reactor", "Let the vector away from the target particles location give the particle a starting speed.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "angular_velocity_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "avefac");
RNA_def_property_range(prop, -200.0f, 200.0f);
RNA_def_property_ui_text(prop, "Angular Velocity", "Angular velocity amount");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "phase_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "phasefac");
RNA_def_property_range(prop, -1.0f, 1.0f);
RNA_def_property_ui_text(prop, "Phase", "Initial rotation phase");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "random_rotation_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "randrotfac");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Random Rotation", "Randomize rotation");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "random_phase_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "randphasefac");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Random Phase", "Randomize rotation phase");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
/* physical properties */
prop= RNA_def_property(srna, "mass", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.001f, 100000.0f);
RNA_def_property_ui_range(prop, 0.01f, 100.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Mass", "Specify the mass of the particles");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "particle_size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "size");
RNA_def_property_range(prop, 0.001f, 100000.0f);
RNA_def_property_ui_range(prop, 0.01f, 100.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Size", "The size of the particles");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "random_size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "randsize");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Random Size", "Give the particle size a random variation");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "reaction_shape", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "reactshape");
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_text(prop, "Shape", "Power of reaction strength dependence on distance to target.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
/* global physical properties */
@@ -1447,38 +1470,38 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_array(prop, 3);
RNA_def_property_range(prop, -200.0f, 200.0f);
RNA_def_property_ui_text(prop, "Acceleration", "Constant acceleration");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "gravity", PROP_FLOAT, PROP_ACCELERATION);
RNA_def_property_float_sdna(prop, NULL, "acc[2]");
RNA_def_property_range(prop, -200.0f, 200.0f);
RNA_def_property_ui_text(prop, "Gravity", "Constant acceleration in global Z axis direction");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "drag_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "dragfac");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Drag", "Specify the amount of air-drag.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "brownian_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "brownfac");
RNA_def_property_range(prop, 0.0f, 200.0f);
RNA_def_property_ui_text(prop, "Brownian", "Specify the amount of brownian motion");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "damp_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "dampfac");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Damp", "Specify the amount of damping");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
/* random length */
prop= RNA_def_property(srna, "random_length", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "randlength");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Random Length", "Give path length a random variation.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
/* children */
prop= RNA_def_property(srna, "child_nbr", PROP_INT, PROP_NONE);
@@ -1486,7 +1509,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_range(prop, 0, 100000);
RNA_def_property_ui_range(prop, 0, 1000, 1, 0);
RNA_def_property_ui_text(prop, "Children Per Parent", "Amount of children/parent");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "rendered_child_nbr", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "ren_child_nbr");
@@ -1498,45 +1521,45 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "parents");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Virtual Parents", "Relative amount of virtual parents.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "child_size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "childsize");
RNA_def_property_range(prop, 0.001f, 100000.0f);
RNA_def_property_ui_range(prop, 0.01f, 100.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Child Size", "A multiplier for the child particle size.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "child_random_size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "childrandsize");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Random Child Size", "Random variation to the size of the child particles.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "child_radius", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "childrad");
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_text(prop, "Child Radius", "Radius of children around parent.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "child_roundness", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "childflat");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Child Roundness", "Roundness of children around parent.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
/* clumping */
prop= RNA_def_property(srna, "clump_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "clumpfac");
RNA_def_property_range(prop, -1.0f, 1.0f);
RNA_def_property_ui_text(prop, "Clump", "Amount of clumping");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "clumppow", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "clumppow");
RNA_def_property_range(prop, -0.999f, 0.999f);
RNA_def_property_ui_text(prop, "Shape", "Shape of clumping");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
/* kink */
@@ -1545,19 +1568,19 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_range(prop, -100000.0f, 100000.0f);
RNA_def_property_ui_range(prop, -10.0f, 10.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Amplitude", "The amplitude of the offset.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "kink_frequency", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "kink_freq");
RNA_def_property_range(prop, -100000.0f, 100000.0f);
RNA_def_property_ui_range(prop, -10.0f, 10.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Frequency", "The frequency of the offset (1/total length)");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "kink_shape", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, -0.999f, 0.999f);
RNA_def_property_ui_text(prop, "Shape", "Adjust the offset to the beginning/end");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
/* rough */
@@ -1565,64 +1588,64 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_range(prop, 0.0f, 100000.0f);
RNA_def_property_ui_range(prop, 0.0f, 10.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Rough1", "Amount of location dependent rough.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "rough1_size", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.01f, 100000.0f);
RNA_def_property_ui_range(prop, 0.01f, 10.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Size1", "Size of location dependent rough.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "rough2", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "rough2");
RNA_def_property_range(prop, 0.0f, 100000.0f);
RNA_def_property_ui_range(prop, 0.0f, 10.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Rough2", "Amount of random rough.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "rough2_size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "rough2_size");
RNA_def_property_range(prop, 0.01f, 100000.0f);
RNA_def_property_ui_range(prop, 0.01f, 10.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Size2", "Size of random rough.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "rough2_thres", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "rough2_thres");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Threshold", "Amount of particles left untouched by random rough.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "rough_endpoint", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "rough_end");
RNA_def_property_range(prop, 0.0f, 100000.0f);
RNA_def_property_ui_range(prop, 0.0f, 10.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Rough Endpoint", "Amount of end point rough.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "rough_end_shape", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_text(prop, "Shape", "Shape of end point rough");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "child_length", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "clength");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Length", "Length of child paths");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "child_length_thres", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "clength_thres");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Threshold", "Amount of particles left untouched by child path length.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
/* branching */
prop= RNA_def_property(srna, "branch_threshold", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "branch_thres");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Threshold", "Threshold of branching.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
/* drawing stuff */
prop= RNA_def_property(srna, "line_length_tail", PROP_FLOAT, PROP_NONE);
@@ -1630,33 +1653,33 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_range(prop, 0.0f, 100000.0f);
RNA_def_property_ui_range(prop, 0.0f, 10.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Back", "Length of the line's tail");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
prop= RNA_def_property(srna, "line_length_head", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_funcs(prop, "rna_PartSetting_linelenhead_get", "rna_PartSetting_linelenhead_set", NULL);
RNA_def_property_range(prop, 0.0f, 100000.0f);
RNA_def_property_ui_range(prop, 0.0f, 10.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Head", "Length of the line's head");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
prop= RNA_def_property(srna, "path_start", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "path_start");
RNA_def_property_float_funcs(prop, NULL, NULL, "rna_PartSetting_pathstartend_range");
RNA_def_property_ui_text(prop, "Path Start", "Starting time of drawn path.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
prop= RNA_def_property(srna, "path_end", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "path_end");
RNA_def_property_float_funcs(prop, NULL, NULL, "rna_PartSetting_pathstartend_range");
RNA_def_property_ui_text(prop, "Path End", "End time of drawn path.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
prop= RNA_def_property(srna, "trail_count", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "trail_count");
RNA_def_property_range(prop, 1, 100000);
RNA_def_property_ui_range(prop, 1, 100, 1, 0);
RNA_def_property_ui_text(prop, "Trail Count", "Number of trail particles.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
/* keyed particles */
prop= RNA_def_property(srna, "keyed_loops", PROP_INT, PROP_NONE);
@@ -1664,7 +1687,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_range(prop, 1.0f, 10000.0f);
RNA_def_property_ui_range(prop, 1.0f, 100.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Loop count", "Number of times the keys are looped.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
/* boids */
prop= RNA_def_property(srna, "boids", PROP_POINTER, PROP_NONE);
@@ -1679,21 +1702,21 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "Group");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Dupli Group", "Show Objects in this Group in place of particles");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
prop= RNA_def_property(srna, "dupli_object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "dup_ob");
RNA_def_property_struct_type(prop, "Object");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Dupli Object", "Show this Object in place of particles.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
prop= RNA_def_property(srna, "billboard_object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "bb_ob");
RNA_def_property_struct_type(prop, "Object");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Billboard Object", "Billboards face this object (default is active camera)");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
/* effectors */
prop= RNA_def_property(srna, "effector_group", PROP_POINTER, PROP_NONE);
@@ -1701,77 +1724,77 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "Group");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Effector Group", "Limit effectors to this Group.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "eweight_all", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "effector_weight[0]");
RNA_def_property_range(prop, -200.0f, 200.0f);
RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "All", "All effector's weight.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "eweight_spherical", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "effector_weight[1]");
RNA_def_property_range(prop, -200.0f, 200.0f);
RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Spherical", "Spherical effector weight.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "eweight_vortex", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "effector_weight[2]");
RNA_def_property_range(prop, -200.0f, 200.0f);
RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Vortex", "Vortex effector weight.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "eweight_magnetic", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "effector_weight[3]");
RNA_def_property_range(prop, -200.0f, 200.0f);
RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Magnetic", "Magnetic effector weight.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "eweight_wind", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "effector_weight[4]");
RNA_def_property_range(prop, -200.0f, 200.0f);
RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Wind", "Wind effector weight.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "eweight_curveguide", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "effector_weight[5]");
RNA_def_property_range(prop, -200.0f, 200.0f);
RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Curve Guide", "Curve guide effector weight.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "eweight_texture", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "effector_weight[6]");
RNA_def_property_range(prop, -200.0f, 200.0f);
RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
- RNA_def_property_ui_text(prop, "Texture", "Texture effector weight.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_ui_text(prop, "Magnetic", "Texture effector weight.");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "eweight_harmonic", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "effector_weight[7]");
RNA_def_property_range(prop, -200.0f, 200.0f);
RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Harmonic", "Harmonic effector weight.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "eweight_charge", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "effector_weight[8]");
RNA_def_property_range(prop, -200.0f, 200.0f);
RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Charge", "Charge effector weight.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "eweight_lennardjones", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "effector_weight[9]");
RNA_def_property_range(prop, -200.0f, 200.0f);
RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Lennard-Jones", "Lennard-Jones effector weight.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
/* animation here? */
rna_def_animdata_common(srna);
@@ -1806,25 +1829,25 @@ static void rna_def_particle_target(BlenderRNA *brna)
RNA_def_property_pointer_sdna(prop, NULL, "ob");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Target Object", "The object that has the target particle system (empty if same object).");
- RNA_def_property_update(prop, 0, "rna_Particle_target_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_target_reset");
prop= RNA_def_property(srna, "system", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "psys");
RNA_def_property_range(prop, 1, INT_MAX);
RNA_def_property_ui_text(prop, "Target Particle System", "The index of particle system on the target object.");
- RNA_def_property_update(prop, 0, "rna_Particle_target_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_target_reset");
prop= RNA_def_property(srna, "time", PROP_FLOAT, PROP_TIME);
RNA_def_property_float_sdna(prop, NULL, "time");
RNA_def_property_range(prop, 0.0, 30000.0f); //TODO: replace 30000 with MAXFRAMEF when available in 2.5
RNA_def_property_ui_text(prop, "Time", "");
- RNA_def_property_update(prop, 0, "rna_Particle_target_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_target_redo");
prop= RNA_def_property(srna, "duration", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "duration");
RNA_def_property_range(prop, 0.0, 30000.0f); //TODO: replace 30000 with MAXFRAMEF when available in 2.5
RNA_def_property_ui_text(prop, "Duration", "");
- RNA_def_property_update(prop, 0, "rna_Particle_target_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_target_redo");
prop= RNA_def_property(srna, "valid", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PTARGET_VALID);
@@ -1835,7 +1858,7 @@ static void rna_def_particle_target(BlenderRNA *brna)
RNA_def_property_enum_items(prop, mode_items);
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_ui_text(prop, "Mode", "");
- RNA_def_property_update(prop, 0, "rna_Particle_target_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_target_reset");
}
static void rna_def_particle_system(BlenderRNA *brna)
@@ -1859,7 +1882,7 @@ static void rna_def_particle_system(BlenderRNA *brna)
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_pointer_funcs(prop, "rna_particle_settings_get", "rna_particle_settings_set", NULL);
RNA_def_property_ui_text(prop, "Settings", "Particle system settings.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "particles", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "particles", "totpart");
@@ -1873,7 +1896,7 @@ static void rna_def_particle_system(BlenderRNA *brna)
prop= RNA_def_property(srna, "seed", PROP_INT, PROP_UNSIGNED);
RNA_def_property_ui_text(prop, "Seed", "Offset in the random number table, to get a different randomized result.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
/* hair */
prop= RNA_def_property(srna, "softbody", PROP_POINTER, PROP_NONE);
@@ -1884,30 +1907,30 @@ static void rna_def_particle_system(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "softflag", OB_SB_ENABLE);
RNA_def_property_ui_text(prop, "Use Soft Body", "Enable use of soft body for hair physics simulation.");
- prop= RNA_def_property(srna, "global_hair", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", PSYS_GLOBAL_HAIR);
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Global Hair", "Hair keys are in global coordinate space");
+ prop= RNA_def_property(srna, "editable", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", PSYS_EDITED);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* various checks needed */
+ RNA_def_property_ui_text(prop, "Editable", "For hair particle systems, finalize the hair to enable editing.");
/* reactor */
prop= RNA_def_property(srna, "reactor_target_object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "target_ob");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Reactor Target Object", "For reactor systems, the object that has the target particle system (empty if same object).");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "reactor_target_particle_system", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "target_psys");
RNA_def_property_range(prop, 1, INT_MAX);
RNA_def_property_ui_text(prop, "Reactor Target Particle System", "For reactor systems, index of particle system on the target object.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
/* keyed */
prop= RNA_def_property(srna, "keyed_timing", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PSYS_KEYED_TIMING);
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_ui_text(prop, "Keyed timing", "Use key times");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
prop= RNA_def_property(srna, "targets", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "ParticleTarget");
@@ -1943,122 +1966,122 @@ static void rna_def_particle_system(BlenderRNA *brna)
prop= RNA_def_property(srna, "vertex_group_density", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "vgroup[0]");
RNA_def_property_ui_text(prop, "Vertex Group Density", "Vertex group to control density.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "vertex_group_density_negate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "vg_neg", (1 << PSYS_VG_DENSITY));
RNA_def_property_ui_text(prop, "Vertex Group Density Negate", "Negate the effect of the density vertex group.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "vertex_group_velocity", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "vgroup[1]");
RNA_def_property_ui_text(prop, "Vertex Group Velocity", "Vertex group to control velocity.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "vertex_group_velocity_negate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "vg_neg", (1 << PSYS_VG_VEL));
RNA_def_property_ui_text(prop, "Vertex Group Velocity Negate", "Negate the effect of the velocity vertex group.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "vertex_group_length", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "vgroup[2]");
RNA_def_property_ui_text(prop, "Vertex Group Length", "Vertex group to control length.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
prop= RNA_def_property(srna, "vertex_group_length_negate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "vg_neg", (1 << PSYS_VG_LENGTH));
RNA_def_property_ui_text(prop, "Vertex Group Length Negate", "Negate the effect of the length vertex group.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
prop= RNA_def_property(srna, "vertex_group_clump", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "vgroup[3]");
RNA_def_property_ui_text(prop, "Vertex Group Clump", "Vertex group to control clump.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "vertex_group_clump_negate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "vg_neg", (1 << PSYS_VG_CLUMP));
RNA_def_property_ui_text(prop, "Vertex Group Clump Negate", "Negate the effect of the clump vertex group.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "vertex_group_kink", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "vgroup[4]");
RNA_def_property_ui_text(prop, "Vertex Group Kink", "Vertex group to control kink.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "vertex_group_kink_negate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "vg_neg", (1 << PSYS_VG_KINK));
RNA_def_property_ui_text(prop, "Vertex Group Kink Negate", "Negate the effect of the kink vertex group.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "vertex_group_roughness1", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "vgroup[5]");
RNA_def_property_ui_text(prop, "Vertex Group Roughness 1", "Vertex group to control roughness 1.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "vertex_group_roughness1_negate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "vg_neg", (1 << PSYS_VG_ROUGH1));
RNA_def_property_ui_text(prop, "Vertex Group Roughness 1 Negate", "Negate the effect of the roughness 1 vertex group.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "vertex_group_roughness2", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "vgroup[6]");
RNA_def_property_ui_text(prop, "Vertex Group Roughness 2", "Vertex group to control roughness 2.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "vertex_group_roughness2_negate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "vg_neg", (1 << PSYS_VG_ROUGH2));
RNA_def_property_ui_text(prop, "Vertex Group Roughness 2 Negate", "Negate the effect of the roughness 2 vertex group.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "vertex_group_roughness_end", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "vgroup[7]");
RNA_def_property_ui_text(prop, "Vertex Group Roughness End", "Vertex group to control roughness end.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "vertex_group_roughness_end_negate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "vg_neg", (1 << PSYS_VG_ROUGHE));
RNA_def_property_ui_text(prop, "Vertex Group Roughness End Negate", "Negate the effect of the roughness end vertex group.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "vertex_group_size", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "vgroup[8]");
RNA_def_property_ui_text(prop, "Vertex Group Size", "Vertex group to control size.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "vertex_group_size_negate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "vg_neg", (1 << PSYS_VG_SIZE));
RNA_def_property_ui_text(prop, "Vertex Group Size Negate", "Negate the effect of the size vertex group.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "vertex_group_tangent", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "vgroup[9]");
RNA_def_property_ui_text(prop, "Vertex Group Tangent", "Vertex group to control tangent.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "vertex_group_tangent_negate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "vg_neg", (1 << PSYS_VG_TAN));
RNA_def_property_ui_text(prop, "Vertex Group Tangent Negate", "Negate the effect of the tangent vertex group.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "vertex_group_rotation", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "vgroup[10]");
RNA_def_property_ui_text(prop, "Vertex Group Rotation", "Vertex group to control rotation.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "vertex_group_rotation_negate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "vg_neg", (1 << PSYS_VG_ROT));
RNA_def_property_ui_text(prop, "Vertex Group Rotation Negate", "Negate the effect of the rotation vertex group.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "vertex_group_field", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "vgroup[11]");
RNA_def_property_ui_text(prop, "Vertex Group Field", "Vertex group to control field.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "vertex_group_field_negate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "vg_neg", (1 << PSYS_VG_EFFECTOR));
RNA_def_property_ui_text(prop, "Vertex Group Field Negate", "Negate the effect of the field vertex group.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
/* pointcache */
prop= RNA_def_property(srna, "point_cache", PROP_POINTER, PROP_NEVER_NULL);
@@ -2066,28 +2089,12 @@ static void rna_def_particle_system(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "PointCache");
RNA_def_property_ui_text(prop, "Point Cache", "");
- prop= RNA_def_property(srna, "multiple_caches", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_funcs(prop, "rna_ParticleSystem_multiple_caches_get", NULL);
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Multiple Caches", "Particle system has multiple point caches");
-
/* offset ob */
prop= RNA_def_property(srna, "parent", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "parent");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Parent", "Use this object's coordinate system instead of global coordinate system.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
-
- /* hair or cache editing */
- prop= RNA_def_property(srna, "editable", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_funcs(prop, "rna_ParticleSystem_editable_get", NULL);
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Editable", "Particle system can be edited in particle mode");
-
- prop= RNA_def_property(srna, "edited", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_funcs(prop, "rna_ParticleSystem_edited_get", NULL);
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Edited", "Particle system has been edited in particle mode");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
}
void RNA_def_particle(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_pose.c b/source/blender/makesrna/intern/rna_pose.c
index 0ee5f7e2663..9e4af513062 100644
--- a/source/blender/makesrna/intern/rna_pose.c
+++ b/source/blender/makesrna/intern/rna_pose.c
@@ -55,7 +55,7 @@ static void rna_Pose_update(bContext *C, PointerRNA *ptr)
{
// XXX when to use this? ob->pose->flag |= (POSE_LOCKED|POSE_DO_UNLOCK);
- DAG_id_flush_update(ptr->id.data, OB_RECALC_DATA);
+ DAG_object_flush_update(CTX_data_scene(C), ptr->id.data, OB_RECALC_DATA);
}
static char *rna_PoseChannel_path(PointerRNA *ptr)
@@ -124,73 +124,12 @@ static void rna_PoseChannel_euler_rotation_set(PointerRNA *ptr, const float *val
{
bPoseChannel *pchan= ptr->data;
- if(pchan->rotmode == PCHAN_ROT_QUAT) /* default XYZ eulers when using quats... */
+ if(pchan->rotmode == PCHAN_ROT_QUAT)
EulToQuat((float*)value, pchan->quat);
else
VECCOPY(pchan->eul, value);
}
-static void rna_PoseChannel_rotation_mode_set(PointerRNA *ptr, int value)
-{
- bPoseChannel *pchan= ptr->data;
-
- /* check if any change - if so, need to convert data */
- // TODO: this needs to be generalised at some point to work for objects too...
- if (value > 0) { /* to euler */
- if (pchan->rotmode == PCHAN_ROT_AXISANGLE) {
- /* axis-angle to euler */
- float m[3][3];
-
- /* convert to 3x3 matrix, then to euler
- * - axis angle is stored in quats
- */
- VecRotToMat3(&pchan->quat[1], pchan->quat[0], m);
- Mat3ToEulO(m, pchan->eul, value);
- }
- else if (pchan->rotmode == PCHAN_ROT_QUAT) {
- /* quat to euler */
- QuatToEulO(pchan->quat, pchan->eul, value);
- }
- /* else { no conversion needed } */
- }
- else if (value == PCHAN_ROT_QUAT) { /* to quat */
- if (pchan->rotmode == PCHAN_ROT_AXISANGLE) {
- /* axis angle to quat */
- float q[4];
-
- /* copy to temp var first, since quats and axis-angle are stored in same place */
- QuatCopy(q, pchan->quat);
- AxisAngleToQuat(q, &pchan->quat[1], pchan->quat[0]);
- }
- else if (pchan->rotmode > 0) {
- /* euler to quat */
- EulOToQuat(pchan->eul, pchan->rotmode, pchan->quat);
- }
- /* else { no conversion needed } */
- }
- else { /* to axis-angle */
- if (pchan->rotmode > 0) {
- /* euler to axis angle */
- float q[4];
-
- /* convert to temp quat, then to axis angle (since stored in same var) */
- EulOToQuat(pchan->eul, pchan->rotmode, q);
- QuatToAxisAngle(q, &pchan->quat[1], &pchan->quat[0]);
- }
- else if (pchan->rotmode == PCHAN_ROT_QUAT) {
- /* quat to axis angle */
- float q[4];
-
- /* copy to temp var first, since quats and axis-angle are stored in same place */
- QuatCopy(q, pchan->quat);
- QuatToAxisAngle(q, &pchan->quat[1], &pchan->quat[0]);
- }
- }
-
- /* finally, set the new rotation type */
- pchan->rotmode= value;
-}
-
static void rna_PoseChannel_name_set(PointerRNA *ptr, const char *value)
{
Object *ob= (Object*)ptr->id.data;
@@ -212,72 +151,12 @@ static int rna_PoseChannel_has_ik_get(PointerRNA *ptr)
return ED_pose_channel_in_IK_chain(ob, pchan);
}
-static PointerRNA rna_PoseChannel_bone_group_get(PointerRNA *ptr)
-{
- Object *ob= (Object*)ptr->id.data;
- bPose *pose= (ob) ? ob->pose : NULL;
- bPoseChannel *pchan= (bPoseChannel*)ptr->data;
- bActionGroup *grp;
-
- if (pose)
- grp= BLI_findlink(&pose->agroups, pchan->agrp_index-1);
- else
- grp= NULL;
-
- return rna_pointer_inherit_refine(ptr, &RNA_BoneGroup, grp);
-}
-
-static void rna_PoseChannel_bone_group_set(PointerRNA *ptr, PointerRNA value)
-{
- Object *ob= (Object*)ptr->id.data;
- bPose *pose= (ob) ? ob->pose : NULL;
- bPoseChannel *pchan= (bPoseChannel*)ptr->data;
-
- if (pose)
- pchan->agrp_index= BLI_findindex(&pose->agroups, value.data) + 1;
- else
- pchan->agrp_index= 0;
-}
-
-static int rna_PoseChannel_bone_group_index_get(PointerRNA *ptr)
-{
- bPoseChannel *pchan= (bPoseChannel*)ptr->data;
- return MAX2(pchan->agrp_index-1, 0);
-}
-
-static void rna_PoseChannel_bone_group_index_set(PointerRNA *ptr, int value)
-{
- bPoseChannel *pchan= (bPoseChannel*)ptr->data;
- pchan->agrp_index= value+1;
-}
-
-static void rna_PoseChannel_bone_group_index_range(PointerRNA *ptr, int *min, int *max)
-{
- Object *ob= (Object*)ptr->id.data;
- bPose *pose= (ob) ? ob->pose : NULL;
-
- *min= 0;
-
- if (pose) {
- *max= BLI_countlist(&pose->agroups)-1;
- *max= MAX2(0, *max);
- }
- else
- *max= 0;
-}
-
static PointerRNA rna_Pose_active_bone_group_get(PointerRNA *ptr)
{
bPose *pose= (bPose*)ptr->data;
return rna_pointer_inherit_refine(ptr, &RNA_BoneGroup, BLI_findlink(&pose->agroups, pose->active_group-1));
}
-static void rna_Pose_active_bone_group_set(PointerRNA *ptr, PointerRNA value)
-{
- bPose *pose= (bPose*)ptr->data;
- pose->active_group= BLI_findindex(&pose->agroups, value.data) + 1;
-}
-
static int rna_Pose_active_bone_group_index_get(PointerRNA *ptr)
{
bPose *pose= (bPose*)ptr->data;
@@ -386,7 +265,6 @@ static void rna_def_bone_group(BlenderRNA *brna)
srna= RNA_def_struct(brna, "BoneGroup", NULL);
RNA_def_struct_sdna(srna, "bActionGroup");
RNA_def_struct_ui_text(srna, "Bone Group", "Groups of Pose Channels (Bones).");
- RNA_def_struct_ui_icon(srna, ICON_GROUP_BONE);
/* name */
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
@@ -415,13 +293,7 @@ static void rna_def_pose_channel(BlenderRNA *brna)
{
static EnumPropertyItem prop_rotmode_items[] = {
{PCHAN_ROT_QUAT, "QUATERNION", 0, "Quaternion (WXYZ)", "No Gimbal Lock (default)"},
- {PCHAN_ROT_XYZ, "XYZ", 0, "XYZ Euler", "XYZ Rotation Order. Prone to Gimbal Lock"},
- {PCHAN_ROT_XZY, "XZY", 0, "XZY Euler", "XZY Rotation Order. Prone to Gimbal Lock"},
- {PCHAN_ROT_YXZ, "YXZ", 0, "YXZ Euler", "YXZ Rotation Order. Prone to Gimbal Lock"},
- {PCHAN_ROT_YZX, "YZX", 0, "YZX Euler", "YZX Rotation Order. Prone to Gimbal Lock"},
- {PCHAN_ROT_ZXY, "ZXY", 0, "ZXY Euler", "ZXY Rotation Order. Prone to Gimbal Lock"},
- {PCHAN_ROT_ZYX, "ZYX", 0, "ZYX Euler", "ZYX Rotation Order. Prone to Gimbal Lock"},
- //{PCHAN_ROT_AXISANGLE, "AXIS_ANGLE", 0, "Axis Angle", "Axis Angle (W+XYZ). Defines a rotation around some axis defined by 3D-Vector."},
+ {PCHAN_ROT_EUL, "EULER", 0, "Euler (XYZ)", "Prone to Gimbal Lock"},
{0, NULL, 0, NULL, NULL}};
StructRNA *srna;
@@ -432,23 +304,60 @@ static void rna_def_pose_channel(BlenderRNA *brna)
RNA_def_struct_ui_text(srna, "Pose Channel", "Channel defining pose data for a bone in a Pose.");
RNA_def_struct_path_func(srna, "rna_PoseChannel_path");
RNA_def_struct_idproperties_func(srna, "rna_PoseChannel_idproperties");
-
- /* Bone Constraints */
+
prop= RNA_def_property(srna, "constraints", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "Constraint");
RNA_def_property_ui_text(prop, "Constraints", "Constraints that act on this PoseChannel.");
- /* Name + Selection Status */
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_PoseChannel_name_set");
RNA_def_property_ui_text(prop, "Name", "");
RNA_def_struct_name_property(srna, prop);
+
+ prop= RNA_def_property(srna, "has_ik", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_funcs(prop, "rna_PoseChannel_has_ik_get", NULL);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Has IK", "Is part of an IK chain.");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
+
+ prop= RNA_def_property(srna, "ik_dof_x", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "ikflag", BONE_IK_NO_XDOF);
+ RNA_def_property_ui_text(prop, "IK X DoF", "Allow movement around the X axis.");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
+
+ prop= RNA_def_property(srna, "ik_dof_y", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "ikflag", BONE_IK_NO_YDOF);
+ RNA_def_property_ui_text(prop, "IK Y DoF", "Allow movement around the Y axis.");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
+
+ prop= RNA_def_property(srna, "ik_dof_z", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "ikflag", BONE_IK_NO_ZDOF);
+ RNA_def_property_ui_text(prop, "IK Z DoF", "Allow movement around the Z axis.");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
+
+ prop= RNA_def_property(srna, "ik_limit_x", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "ikflag", BONE_IK_XLIMIT);
+ RNA_def_property_ui_text(prop, "IK X Limit", "Limit movement around the X axis.");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
+
+ prop= RNA_def_property(srna, "ik_limit_y", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "ikflag", BONE_IK_YLIMIT);
+ RNA_def_property_ui_text(prop, "IK Y Limit", "Limit movement around the Y axis.");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
+
+ prop= RNA_def_property(srna, "ik_limit_z", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "ikflag", BONE_IK_ZLIMIT);
+ RNA_def_property_ui_text(prop, "IK Z Limit", "Limit movement around the Z axis.");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "selectflag", BONE_SELECTED);
RNA_def_property_ui_text(prop, "Selected", "");
+
+ prop= RNA_def_property(srna, "bone_group_index", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "agrp_index");
+ RNA_def_property_ui_text(prop, "Bone Group Index", "Bone Group this pose channel belongs to (0=no group).");
- /* Baked Bone Path cache data s*/
prop= RNA_def_property(srna, "path_start_frame", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "pathsf");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
@@ -460,8 +369,7 @@ static void rna_def_pose_channel(BlenderRNA *brna)
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Bone Paths Calculation End Frame", "End frame of range of frames to use for Bone Path calculations.");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
-
- /* Relationships to other bones */
+
prop= RNA_def_property(srna, "bone", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "Bone");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
@@ -476,35 +384,33 @@ static void rna_def_pose_channel(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "PoseChannel");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Child", "Child of this pose channel.");
-
- /* Transformation settings */
+
prop= RNA_def_property(srna, "location", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "loc");
RNA_def_property_ui_text(prop, "Location", "");
- RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Pose_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
prop= RNA_def_property(srna, "scale", PROP_FLOAT, PROP_XYZ);
RNA_def_property_float_sdna(prop, NULL, "size");
RNA_def_property_ui_text(prop, "Scale", "");
- RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Pose_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
prop= RNA_def_property(srna, "rotation", PROP_FLOAT, PROP_QUATERNION);
RNA_def_property_float_sdna(prop, NULL, "quat");
RNA_def_property_ui_text(prop, "Rotation", "Rotation in Quaternions.");
- RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Pose_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
prop= RNA_def_property(srna, "euler_rotation", PROP_FLOAT, PROP_EULER);
RNA_def_property_float_sdna(prop, NULL, "eul");
RNA_def_property_float_funcs(prop, "rna_PoseChannel_euler_rotation_get", "rna_PoseChannel_euler_rotation_set", NULL);
RNA_def_property_ui_text(prop, "Rotation (Euler)", "Rotation in Eulers.");
- RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Pose_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
prop= RNA_def_property(srna, "rotation_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "rotmode");
RNA_def_property_enum_items(prop, prop_rotmode_items);
- RNA_def_property_enum_funcs(prop, NULL, "rna_PoseChannel_rotation_mode_set", NULL);
RNA_def_property_ui_text(prop, "Rotation Mode", "");
- RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
/* These three matrix properties await an implementation of the PROP_MATRIX subtype, which currently doesn't exist. */
prop= RNA_def_property(srna, "channel_matrix", PROP_FLOAT, PROP_MATRIX);
@@ -527,7 +433,6 @@ static void rna_def_pose_channel(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Constraint Inverse Matrix", "4x4 matrix, defines transform from final position to unconstrained position.");
*/
- /* Head/Tail Coordinates (in Pose Space) - Automatically calculated... */
prop= RNA_def_property(srna, "pose_head", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Pose Head Position", "Location of head of the channel's bone.");
@@ -535,145 +440,85 @@ static void rna_def_pose_channel(BlenderRNA *brna)
prop= RNA_def_property(srna, "pose_tail", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Pose Tail Position", "Location of tail of the channel's bone.");
-
- /* IK Settings */
- prop= RNA_def_property(srna, "has_ik", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_funcs(prop, "rna_PoseChannel_has_ik_get", NULL);
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Has IK", "Is part of an IK chain.");
- RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
- prop= RNA_def_property(srna, "ik_dof_x", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_negative_sdna(prop, NULL, "ikflag", BONE_IK_NO_XDOF);
- RNA_def_property_ui_text(prop, "IK X DoF", "Allow movement around the X axis.");
- RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
-
- prop= RNA_def_property(srna, "ik_dof_y", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_negative_sdna(prop, NULL, "ikflag", BONE_IK_NO_YDOF);
- RNA_def_property_ui_text(prop, "IK Y DoF", "Allow movement around the Y axis.");
- RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
-
- prop= RNA_def_property(srna, "ik_dof_z", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_negative_sdna(prop, NULL, "ikflag", BONE_IK_NO_ZDOF);
- RNA_def_property_ui_text(prop, "IK Z DoF", "Allow movement around the Z axis.");
- RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
-
- prop= RNA_def_property(srna, "ik_limit_x", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "ikflag", BONE_IK_XLIMIT);
- RNA_def_property_ui_text(prop, "IK X Limit", "Limit movement around the X axis.");
- RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
-
- prop= RNA_def_property(srna, "ik_limit_y", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "ikflag", BONE_IK_YLIMIT);
- RNA_def_property_ui_text(prop, "IK Y Limit", "Limit movement around the Y axis.");
- RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
-
- prop= RNA_def_property(srna, "ik_limit_z", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "ikflag", BONE_IK_ZLIMIT);
- RNA_def_property_ui_text(prop, "IK Z Limit", "Limit movement around the Z axis.");
- RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
-
prop= RNA_def_property(srna, "ik_min_x", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "limitmin[0]");
RNA_def_property_range(prop, -180.0f, 0.0f);
RNA_def_property_ui_text(prop, "IK X Minimum", "Minimum angles for IK Limit");
- RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
prop= RNA_def_property(srna, "ik_max_x", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "limitmax[0]");
RNA_def_property_range(prop, 0.0f, 180.0f);
RNA_def_property_ui_text(prop, "IK X Maximum", "Maximum angles for IK Limit");
- RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
prop= RNA_def_property(srna, "ik_min_y", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "limitmin[1]");
RNA_def_property_range(prop, -180.0f, 0.0f);
RNA_def_property_ui_text(prop, "IK Y Minimum", "Minimum angles for IK Limit");
- RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
prop= RNA_def_property(srna, "ik_max_y", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "limitmax[1]");
RNA_def_property_range(prop, 0.0f, 180.0f);
RNA_def_property_ui_text(prop, "IK Y Maximum", "Maximum angles for IK Limit");
- RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
prop= RNA_def_property(srna, "ik_min_z", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "limitmin[2]");
RNA_def_property_range(prop, -180.0f, 0.0f);
RNA_def_property_ui_text(prop, "IK Z Minimum", "Minimum angles for IK Limit");
- RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
prop= RNA_def_property(srna, "ik_max_z", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "limitmax[2]");
RNA_def_property_range(prop, 0.0f, 180.0f);
RNA_def_property_ui_text(prop, "IK Z Maximum", "Maximum angles for IK Limit");
- RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
prop= RNA_def_property(srna, "ik_stiffness_x", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "stiffness[0]");
RNA_def_property_range(prop, 0.0f, 0.99f);
RNA_def_property_ui_text(prop, "IK X Stiffness", "IK stiffness around the X axis.");
- RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
prop= RNA_def_property(srna, "ik_stiffness_y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "stiffness[1]");
RNA_def_property_range(prop, 0.0f, 0.99f);
RNA_def_property_ui_text(prop, "IK Y Stiffness", "IK stiffness around the Y axis.");
- RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
prop= RNA_def_property(srna, "ik_stiffness_z", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "stiffness[2]");
RNA_def_property_range(prop, 0.0f, 0.99f);
RNA_def_property_ui_text(prop, "IK Z Stiffness", "IK stiffness around the Z axis.");
- RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
prop= RNA_def_property(srna, "ik_stretch", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ikstretch");
RNA_def_property_range(prop, 0.0f,1.0f);
RNA_def_property_ui_text(prop, "IK Stretch", "Allow scaling of the bone for IK.");
- RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
-
- /* custom bone shapes */
- prop= RNA_def_property(srna, "custom_shape", PROP_POINTER, PROP_NONE);
- RNA_def_property_pointer_sdna(prop, NULL, "custom");
- RNA_def_property_struct_type(prop, "Object");
- RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
+
+ prop= RNA_def_property(srna, "custom", PROP_POINTER, PROP_NONE);
RNA_def_property_ui_text(prop, "Custom Object", "Object that defines custom draw type for this bone.");
- RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
-
- /* bone groups */
- prop= RNA_def_property(srna, "bone_group_index", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "agrp_index");
- RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_int_funcs(prop, "rna_PoseChannel_bone_group_index_get", "rna_PoseChannel_bone_group_index_set", "rna_PoseChannel_bone_group_index_range");
- RNA_def_property_ui_text(prop, "Bone Group Index", "Bone Group this pose channel belongs to (0=no group).");
- RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
-
- prop= RNA_def_property(srna, "bone_group", PROP_POINTER, PROP_NONE);
- RNA_def_property_struct_type(prop, "BoneGroup");
- RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_pointer_funcs(prop, "rna_PoseChannel_bone_group_get", "rna_PoseChannel_bone_group_set", NULL);
- RNA_def_property_ui_text(prop, "Bone Group", "Bone Group this pose channel belongs to");
- RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
-
- /* transform locks */
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
+
prop= RNA_def_property(srna, "lock_location", PROP_BOOLEAN, PROP_XYZ);
RNA_def_property_boolean_sdna(prop, NULL, "protectflag", OB_LOCK_LOCX);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Lock Location", "Lock editing of location in the interface.");
- RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
prop= RNA_def_property(srna, "lock_rotation", PROP_BOOLEAN, PROP_XYZ);
RNA_def_property_boolean_sdna(prop, NULL, "protectflag", OB_LOCK_ROTX);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Lock Rotation", "Lock editing of rotation in the interface.");
- RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
prop= RNA_def_property(srna, "lock_scale", PROP_BOOLEAN, PROP_XYZ);
RNA_def_property_boolean_sdna(prop, NULL, "protectflag", OB_LOCK_SCALEX);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Lock Scale", "Lock editing of scale in the interface.");
- RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
}
static void rna_def_pose(BlenderRNA *brna)
@@ -700,9 +545,8 @@ static void rna_def_pose(BlenderRNA *brna)
prop= RNA_def_property(srna, "active_bone_group", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "BoneGroup");
- RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_pointer_funcs(prop, "rna_Pose_active_bone_group_get", "rna_Pose_active_bone_group_set", NULL);
- RNA_def_property_ui_text(prop, "Active Bone Group", "Active bone group for this pose.");
+ RNA_def_property_ui_text(prop, "Active Bone Group", "Bone groups of the pose.");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
prop= RNA_def_property(srna, "active_bone_group_index", PROP_INT, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_pose_api.c b/source/blender/makesrna/intern/rna_pose_api.c
index 40bb131b3f9..42bb52d8544 100644
--- a/source/blender/makesrna/intern/rna_pose_api.c
+++ b/source/blender/makesrna/intern/rna_pose_api.c
@@ -1,6 +1,4 @@
/**
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/makesrna/intern/rna_render.c b/source/blender/makesrna/intern/rna_render.c
index a67831715a2..9137e596da1 100644
--- a/source/blender/makesrna/intern/rna_render.c
+++ b/source/blender/makesrna/intern/rna_render.c
@@ -170,52 +170,41 @@ static void rna_RenderLayer_passes_begin(CollectionPropertyIterator *iter, Point
rna_iterator_listbase_begin(iter, &rl->passes, NULL);
}
-static int rna_RenderLayer_rect_get_length(PointerRNA *ptr, int length[RNA_MAX_ARRAY_DIMENSION])
+static float rna_RenderValue_value_get(PointerRNA *ptr)
{
- RenderLayer *rl= (RenderLayer*)ptr->data;
-
- length[0]= rl->rectx*rl->recty;
- length[1]= 4;
-
- return length[0]*length[1];
+ return *(float*)ptr->data;
}
-static void rna_RenderLayer_rect_get(PointerRNA *ptr, float *values)
+static void rna_RenderValue_value_set(PointerRNA *ptr, float value)
{
- RenderLayer *rl= (RenderLayer*)ptr->data;
- memcpy(values, rl->rectf, sizeof(float)*rl->rectx*rl->recty*4);
+ *(float*)ptr->data= value;
}
-static void rna_RenderLayer_rect_set(PointerRNA *ptr, const float *values)
+static void rna_RenderLayer_rect_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
RenderLayer *rl= (RenderLayer*)ptr->data;
- memcpy(rl->rectf, values, sizeof(float)*rl->rectx*rl->recty*4);
+ rna_iterator_array_begin(iter, (void*)rl->rectf, sizeof(float), rl->rectx*rl->recty*4, 0, NULL);
}
-static int rna_RenderPass_rect_get_length(PointerRNA *ptr, int length[RNA_MAX_ARRAY_DIMENSION])
+static int rna_RenderLayer_rect_length(PointerRNA *ptr)
{
- RenderPass *rpass= (RenderPass*)ptr->data;
-
- length[0]= rpass->rectx*rpass->recty;
- length[1]= rpass->channels;
-
- return length[0]*length[1];
+ RenderLayer *rl= (RenderLayer*)ptr->data;
+ return rl->rectx*rl->recty*4;
}
-static void rna_RenderPass_rect_get(PointerRNA *ptr, float *values)
+static void rna_RenderPass_rect_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
RenderPass *rpass= (RenderPass*)ptr->data;
- printf("rect get\n");
- memcpy(values, rpass->rect, sizeof(float)*rpass->rectx*rpass->recty*rpass->channels);
+ rna_iterator_array_begin(iter, (void*)rpass->rect, sizeof(float), rpass->rectx*rpass->recty*rpass->channels, 0, NULL);
}
-static void rna_RenderPass_rect_set(PointerRNA *ptr, const float *values)
+static int rna_RenderPass_rect_length(PointerRNA *ptr)
{
RenderPass *rpass= (RenderPass*)ptr->data;
- printf("rect set\n");
- memcpy(rpass->rect, values, sizeof(float)*rpass->rectx*rpass->recty*rpass->channels);
+ return rpass->rectx*rpass->recty*rpass->channels;
}
+
#else // RNA_RUNTIME
static void rna_def_render_engine(BlenderRNA *brna)
@@ -335,11 +324,16 @@ static void rna_def_render_layer(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "RenderPass");
RNA_def_property_collection_funcs(prop, "rna_RenderLayer_passes_begin", "rna_iterator_listbase_next", "rna_iterator_listbase_end", "rna_iterator_listbase_get", 0, 0, 0, 0, 0);
- prop= RNA_def_property(srna, "rect", PROP_FLOAT, PROP_NONE);
- RNA_def_property_flag(prop, PROP_DYNAMIC);
- RNA_def_property_multi_array(prop, 2, NULL);
- RNA_def_property_dynamic_array_funcs(prop, "rna_RenderLayer_rect_get_length");
- RNA_def_property_float_funcs(prop, "rna_RenderLayer_rect_get", "rna_RenderLayer_rect_set", NULL);
+ prop= RNA_def_property(srna, "rect", PROP_COLLECTION, PROP_NONE);
+ RNA_def_property_struct_type(prop, "RenderValue");
+ RNA_def_property_collection_funcs(prop, "rna_RenderLayer_rect_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", "rna_RenderLayer_rect_length", 0, 0, 0, 0);
+
+ /* value */
+ srna= RNA_def_struct(brna, "RenderValue", NULL);
+ RNA_def_struct_ui_text(srna, "Render Value", "");
+
+ prop= RNA_def_property(srna, "value", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_funcs(prop, "rna_RenderValue_value_get", "rna_RenderValue_value_set", NULL);
RNA_define_verify_sdna(1);
}
@@ -389,11 +383,9 @@ static void rna_def_render_pass(BlenderRNA *brna)
RNA_def_property_enum_items(prop, pass_type_items);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- prop= RNA_def_property(srna, "rect", PROP_FLOAT, PROP_NONE);
- RNA_def_property_flag(prop, PROP_DYNAMIC);
- RNA_def_property_multi_array(prop, 2, NULL);
- RNA_def_property_dynamic_array_funcs(prop, "rna_RenderPass_rect_get_length");
- RNA_def_property_float_funcs(prop, "rna_RenderPass_rect_get", "rna_RenderPass_rect_set", NULL);
+ prop= RNA_def_property(srna, "rect", PROP_COLLECTION, PROP_NONE);
+ RNA_def_property_struct_type(prop, "RenderValue");
+ RNA_def_property_collection_funcs(prop, "rna_RenderPass_rect_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", "rna_RenderPass_rect_length", 0, 0, 0, 0);
RNA_define_verify_sdna(1);
}
diff --git a/source/blender/makesrna/intern/rna_rna.c b/source/blender/makesrna/intern/rna_rna.c
index 8df6398f1f4..57ed5ccef39 100644
--- a/source/blender/makesrna/intern/rna_rna.c
+++ b/source/blender/makesrna/intern/rna_rna.c
@@ -430,7 +430,7 @@ static int rna_Property_array_length_get(PointerRNA *ptr)
{
PropertyRNA *prop= (PropertyRNA*)ptr->data;
rna_idproperty_check(&prop, ptr);
- return prop->totarraylength;
+ return prop->arraylength;
}
static int rna_Property_registered_get(PointerRNA *ptr)
@@ -798,8 +798,6 @@ static void rna_def_property(BlenderRNA *brna)
{PROP_XYZ, "XYZ", 0, "XYZ", ""},
{PROP_RGB, "RGB", 0, "RGB", ""},
{PROP_NEVER_NULL, "NEVER_NULL", 0, "Never Null", ""},
- {PROP_LAYER, "LAYER", 0, "Layer", ""},
- {PROP_LAYER_MEMBER, "LAYER_MEMBERSHIP", 0, "Layer Membership", ""},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem unit_items[] = {
{PROP_UNIT_NONE, "NONE", 0, "None", ""},
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 965796c6d5b..60071efb0a8 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -32,9 +32,6 @@
#include "DNA_scene_types.h"
#include "DNA_userdef_types.h"
-/* Include for Bake Options */
-#include "RE_pipeline.h"
-
#ifdef WITH_FFMPEG
#include "BKE_writeffmpeg.h"
#include <libavcodec/avcodec.h>
@@ -65,7 +62,6 @@ EnumPropertyItem prop_mode_items[] ={
#include "BLI_threads.h"
-#include "ED_info.h"
#include "ED_node.h"
#include "RE_pipeline.h"
@@ -363,6 +359,12 @@ static void rna_SceneRenderLayer_layer_set(PointerRNA *ptr, const int *values)
rl->lay= layer_set(rl->lay, values);
}
+static void rna_SceneRenderLayer_zmask_layer_set(PointerRNA *ptr, const int *values)
+{
+ SceneRenderLayer *rl= (SceneRenderLayer*)ptr->data;
+ rl->lay_zmask= layer_set(rl->lay_zmask, values);
+}
+
static void rna_SceneRenderLayer_pass_update(bContext *C, PointerRNA *ptr)
{
Scene *scene= (Scene*)ptr->id.data;
@@ -388,10 +390,10 @@ static void rna_def_tool_settings(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem uv_select_mode_items[] = {
- {UV_SELECT_VERTEX, "VERTEX", ICON_UV_VERTEXSEL, "Vertex", "Vertex selection mode."},
- {UV_SELECT_EDGE, "EDGE", ICON_UV_EDGESEL, "Edge", "Edge selection mode."},
- {UV_SELECT_FACE, "FACE", ICON_UV_FACESEL, "Face", "Face selection mode."},
- {UV_SELECT_ISLAND, "ISLAND", ICON_UV_ISLANDSEL, "Island", "Island selection mode."},
+ {UV_SELECT_VERTEX, "VERTEX", ICON_VERTEXSEL, "Vertex", "Vertex selection mode."},
+ {UV_SELECT_EDGE, "EDGE", ICON_EDGESEL, "Edge", "Edge selection mode."},
+ {UV_SELECT_FACE, "FACE", ICON_FACESEL, "Face", "Face selection mode."},
+ {UV_SELECT_ISLAND, "ISLAND", ICON_LINKEDSEL, "Island", "Island selection mode."},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem mesh_select_mode_items[] = {
@@ -415,7 +417,7 @@ static void rna_def_tool_settings(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem auto_key_items[] = {
- {AUTOKEY_MODE_NORMAL, "ADD_REPLACE_KEYS", 0, "Add & Replace", ""},
+ {AUTOKEY_MODE_NORMAL, "ADD_REPLACE_KEYS", 0, "Add/Replace", ""},
{AUTOKEY_MODE_EDITKEYS, "REPLACE_KEYS", 0, "Replace", ""},
{0, NULL, 0, NULL, NULL}};
@@ -452,13 +454,6 @@ static void rna_def_tool_settings(BlenderRNA *brna)
RNA_def_property_enum_items(prop, prop_mode_items);
RNA_def_property_ui_text(prop, "Proportional Editing Falloff", "Falloff type for proportional editing mode.");
- prop= RNA_def_property(srna, "normal_size", PROP_FLOAT, PROP_DISTANCE);
- RNA_def_property_float_sdna(prop, NULL, "normalsize");
- RNA_def_property_ui_text(prop, "Normal Size", "Display size for normals in the 3D view.");
- RNA_def_property_range(prop, 0.00001, 1000.0);
- RNA_def_property_ui_range(prop, 0.01, 10.0, 0.1, 2);
- RNA_def_property_update(prop, NC_GEOM|ND_DATA, NULL);
-
prop= RNA_def_property(srna, "automerge_editing", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "automerge", 0);
RNA_def_property_ui_text(prop, "AutoMerge Editing", "Automatically merge vertices moved to the same location.");
@@ -591,7 +586,7 @@ void rna_def_render_layer_common(StructRNA *srna, int scene)
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
/* layers */
- prop= RNA_def_property(srna, "visible_layers", PROP_BOOLEAN, PROP_LAYER_MEMBER);
+ prop= RNA_def_property(srna, "visible_layers", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "lay", 1);
RNA_def_property_array(prop, 20);
RNA_def_property_ui_text(prop, "Visible Layers", "Scene layers included in this render layer.");
@@ -600,10 +595,12 @@ void rna_def_render_layer_common(StructRNA *srna, int scene)
if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- prop= RNA_def_property(srna, "zmask_layers", PROP_BOOLEAN, PROP_LAYER);
+ prop= RNA_def_property(srna, "zmask_layers", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "lay_zmask", 1);
RNA_def_property_array(prop, 20);
RNA_def_property_ui_text(prop, "Zmask Layers", "Zmask scene layers.");
+ if(scene) RNA_def_property_boolean_funcs(prop, NULL, "rna_SceneRenderLayer_zmask_layer_set");
+ else RNA_def_property_boolean_funcs(prop, NULL, "rna_RenderLayer_zmask_layer_set");
if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
@@ -1112,30 +1109,6 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
{R_OUTPUT_WINDOW, "WINDOW", 0, "New Window", "Images are rendered in new Window"},
{0, NULL, 0, NULL, NULL}};
- /* Bake */
- static EnumPropertyItem bake_mode_items[] ={
- {RE_BAKE_ALL, "FULL", 0, "Full Render", ""},
- {RE_BAKE_AO, "AO", 0, "Ambient Occlusion", ""},
- {RE_BAKE_SHADOW, "SHADOW", 0, "Shadow", ""},
- {RE_BAKE_NORMALS, "NORMALS", 0, "Normals", ""},
- {RE_BAKE_TEXTURE, "TEXTURE", 0, "Textures", ""},
- {RE_BAKE_DISPLACEMENT, "DISPLACEMENT", 0, "Displacement", ""},
- {0, NULL, 0, NULL, NULL}};
-
- static EnumPropertyItem bake_normal_space_items[] ={
- {R_BAKE_SPACE_CAMERA, "CAMERA", 0, "Camera", ""},
- {R_BAKE_SPACE_WORLD, "WORLD", 0, "World", ""},
- {R_BAKE_SPACE_OBJECT, "OBJECT", 0, "Object", ""},
- {R_BAKE_SPACE_TANGENT, "TANGENT", 0, "Tangent", ""},
- {0, NULL, 0, NULL, NULL}};
-
- static EnumPropertyItem bake_aa_items[] ={
- {5, "AA_5", 0, "5", ""},
- {8, "AA_8", 0, "8", ""},
- {11, "AA_11", 0, "11", ""},
- {16, "AA_16", 0, "16", ""},
- {0, NULL, 0, NULL, NULL}};
-
static EnumPropertyItem octree_resolution_items[] = {
{64, "OCTREE_RES_64", 0, "64", ""},
{128, "OCTREE_RES_128", 0, "128", ""},
@@ -1167,30 +1140,30 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
{0, "STAMP_FONT_LARGE", 0, "Large", ""},
{4, "STAMP_FONT_EXTRALARGE", 0, "Extra Large", ""},
{0, NULL, 0, NULL, NULL}};
-
+
+
static EnumPropertyItem image_type_items[] = {
- {0, "", 0, "Image", NULL},
{R_PNG, "PNG", 0, "PNG", ""},
{R_JPEG90, "JPEG", 0, "JPEG", ""},
#ifdef WITH_OPENJPEG
{R_JP2, "JPEG2000", 0, "JPEG 2000", ""},
#endif
+ {R_TIFF, "TIFF", 0, "TIFF", ""}, // XXX only with G.have_libtiff
{R_BMP, "BMP", 0, "BMP", ""},
{R_TARGA, "TARGA", 0, "Targa", ""},
{R_RAWTGA, "RAWTARGA", 0, "Targa Raw", ""},
//{R_DDS, "DDS", 0, "DDS", ""}, // XXX not yet implemented
{R_HAMX, "HAMX", 0, "HamX", ""},
{R_IRIS, "IRIS", 0, "Iris", ""},
- {0, "", 0, " ", NULL},
+ {0, "", 0, NULL, NULL},
#ifdef WITH_OPENEXR
{R_OPENEXR, "OPENEXR", 0, "OpenEXR", ""},
{R_MULTILAYER, "MULTILAYER", 0, "MultiLayer", ""},
#endif
- {R_TIFF, "TIFF", 0, "TIFF", ""}, // XXX only with G.have_libtiff
{R_RADHDR, "RADHDR", 0, "Radiance HDR", ""},
{R_CINEON, "CINEON", 0, "Cineon", ""},
{R_DPX, "DPX", 0, "DPX", ""},
- {0, "", 0, "Movie", NULL},
+ {0, "", 0, NULL, NULL},
{R_AVIRAW, "AVIRAW", 0, "AVI Raw", ""},
{R_AVIJPEG, "AVIJPEG", 0, "AVI JPEG", ""},
#ifdef _WIN32
@@ -1213,6 +1186,7 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
#endif
{R_FFMPEG, "FFMPEG", 0, "FFMpeg", ""},
#endif
+ {0, "", 0, NULL, NULL},
{R_FRAMESERVER, "FRAMESERVER", 0, "Frame Server", ""},
{0, NULL, 0, NULL, NULL}};
@@ -1620,10 +1594,10 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Edge", "Create a toon outline around the edges of geometry");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "edge_threshold", PROP_INT, PROP_NONE);
+ prop= RNA_def_property(srna, "edge_intensity", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "edgeint");
RNA_def_property_range(prop, 0, 255);
- RNA_def_property_ui_text(prop, "Edge Threshold", "Threshold for drawing outlines on geometry edges");
+ RNA_def_property_ui_text(prop, "Edge Intensity", "Threshold for drawing outlines on geometry edges");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "edge_color", PROP_FLOAT, PROP_COLOR);
@@ -1649,7 +1623,7 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Motion Blur", "Use multi-sampled 3D scene motion blur (uses number of anti-aliasing samples).");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "use_border", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "border", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_BORDER);
RNA_def_property_ui_text(prop, "Border", "Render a user-defined border region, within the frame size.");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
@@ -1659,14 +1633,14 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Crop to Border", "Crop the rendered frame to the defined border size.");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "use_placeholder", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "placeholders", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_TOUCH);
RNA_def_property_ui_text(prop, "Placeholders", "Create empty placeholder files while rendering frames (similar to Unix 'touch').");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "use_overwrite", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_negative_sdna(prop, NULL, "mode", R_NO_OVERWRITE);
- RNA_def_property_ui_text(prop, "Overwrite", "Overwrite existing files while rendering.");
+ prop= RNA_def_property(srna, "no_overwrite", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "mode", R_NO_OVERWRITE);
+ RNA_def_property_ui_text(prop, "No Overwrite", "Skip and don't overwrite existing files while rendering");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "use_compositing", PROP_BOOLEAN, PROP_NONE);
@@ -1732,57 +1706,6 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Output Path", "Directory/name to save animations, # characters defines the position and length of frame numbers.");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- /* Bake */
-
- prop= RNA_def_property(srna, "bake_type", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_bitflag_sdna(prop, NULL, "bake_mode");
- RNA_def_property_enum_items(prop, bake_mode_items);
- RNA_def_property_ui_text(prop, "Bake Mode", "");
-
- prop= RNA_def_property(srna, "bake_normal_space", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_bitflag_sdna(prop, NULL, "bake_normal_space");
- RNA_def_property_enum_items(prop, bake_normal_space_items);
- RNA_def_property_ui_text(prop, "Normal Space", "Choose normal space for baking");
-
- prop= RNA_def_property(srna, "bake_aa_mode", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_bitflag_sdna(prop, NULL, "bake_osa");
- RNA_def_property_enum_items(prop, bake_aa_items);
- RNA_def_property_ui_text(prop, "Anti-Aliasing Level", "");
-
- prop= RNA_def_property(srna, "bake_active", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "bake_flag", R_BAKE_TO_ACTIVE);
- RNA_def_property_ui_text(prop, "Selected to Active", "Bake shading on the surface of selected objects to the active object");
-
- prop= RNA_def_property(srna, "bake_normalized", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "bake_flag", R_BAKE_NORMALIZE);
- RNA_def_property_ui_text(prop, "Normalized", "");
- //"Bake ambient occlusion normalized, without taking into acount material settings"
- //"Normalized displacement value to fit the 'Dist' range"
- // XXX: Need 1 tooltip here...
-
- prop= RNA_def_property(srna, "bake_clear", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "bake_flag", R_BAKE_CLEAR);
- RNA_def_property_ui_text(prop, "Clear", "Clear Images before baking");
-
- prop= RNA_def_property(srna, "bake_enable_aa", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "bake_flag", R_BAKE_OSA);
- RNA_def_property_ui_text(prop, "Anti-Aliasing", "Enables Anti-aliasing");
-
- prop= RNA_def_property(srna, "bake_margin", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "bake_filter");
- RNA_def_property_range(prop, 0, 32);
- RNA_def_property_ui_text(prop, "Margin", "Amount of pixels to extend the baked result with, as post process filter");
-
- prop= RNA_def_property(srna, "bake_distance", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "bake_maxdist");
- RNA_def_property_range(prop, 0.0, 1000.0);
- RNA_def_property_ui_text(prop, "Distance", "Maximum distance from active object to other object (in blender units");
-
- prop= RNA_def_property(srna, "bake_bias", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "bake_biasdist");
- RNA_def_property_range(prop, 0.0, 1000.0);
- RNA_def_property_ui_text(prop, "Bias", "Bias towards faces further away from the object (in blender units)");
-
/* stamp */
prop= RNA_def_property(srna, "stamp_time", PROP_BOOLEAN, PROP_NONE);
@@ -1900,7 +1823,6 @@ void RNA_def_scene(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
- FunctionRNA *func;
/* Struct definition */
srna= RNA_def_struct(brna, "Scene", "ID");
@@ -1932,7 +1854,7 @@ void RNA_def_scene(BlenderRNA *brna)
RNA_def_property_collection_funcs(prop, 0, 0, 0, "rna_Scene_objects_get", 0, 0, 0, 0, 0);
/* Layers */
- prop= RNA_def_property(srna, "visible_layers", PROP_BOOLEAN, PROP_LAYER_MEMBER);
+ prop= RNA_def_property(srna, "visible_layers", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "lay", 1);
RNA_def_property_array(prop, 20);
RNA_def_property_ui_text(prop, "Visible Layers", "Layers visible when rendering the scene.");
@@ -2060,27 +1982,13 @@ void RNA_def_scene(BlenderRNA *brna)
RNA_def_property_pointer_sdna(prop, NULL, "gm");
RNA_def_property_struct_type(prop, "SceneGameData");
RNA_def_property_ui_text(prop, "Game Data", "");
-
- /* Statistics */
- func= RNA_def_function(srna, "statistics", "ED_info_stats_string");
- prop= RNA_def_string(func, "statistics", "", 0, "Statistics", "");
- RNA_def_function_return(func, prop);
- /* Grease Pencil */
- prop= RNA_def_property(srna, "grease_pencil", PROP_POINTER, PROP_NONE);
- RNA_def_property_pointer_sdna(prop, NULL, "gpd");
- RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_struct_type(prop, "GreasePencil");
- RNA_def_property_ui_text(prop, "Grease Pencil Data", "Grease Pencil datablock");
-
- /* Nestled Data */
rna_def_tool_settings(brna);
rna_def_unit_settings(brna);
rna_def_scene_render_data(brna);
rna_def_scene_game_data(brna);
rna_def_scene_render_layer(brna);
-
- /* Scene API */
+
RNA_api_scene(srna);
}
diff --git a/source/blender/makesrna/intern/rna_scene_api.c b/source/blender/makesrna/intern/rna_scene_api.c
index fa21257be29..076fe38ed2f 100644
--- a/source/blender/makesrna/intern/rna_scene_api.c
+++ b/source/blender/makesrna/intern/rna_scene_api.c
@@ -1,5 +1,5 @@
/**
- * $Id$
+ * $Id: rna_object_api.c 21115 2009-06-23 19:17:59Z kazanbas $
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
@@ -21,7 +21,7 @@
* All rights reserved.
*
*
- * Contributor(s): Arystanbek Dyussenov, Joshua Leung
+ * Contributor(s): Blender Foundation
*
* ***** END GPL LICENSE BLOCK *****
*/
@@ -30,16 +30,13 @@
#include <stdio.h>
#include "RNA_define.h"
-#include "RNA_enum_types.h"
#include "RNA_types.h"
-#include "DNA_anim_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#ifdef RNA_RUNTIME
-#include "BKE_animsys.h"
#include "BKE_scene.h"
#include "BKE_depsgraph.h"
@@ -84,33 +81,6 @@ static void rna_Scene_set_frame(Scene *sce, bContext *C, int frame)
WM_event_add_notifier(C, NC_SCENE|ND_FRAME, sce);
}
-static KeyingSet *rna_Scene_add_keying_set(Scene *sce, ReportList *reports,
- char name[], int absolute, int insertkey_needed, int insertkey_visual)
-{
- KeyingSet *ks= NULL;
- short flag=0, keyingflag=0;
-
- /* validate flags */
- if (absolute)
- flag |= KEYINGSET_ABSOLUTE;
- if (insertkey_needed)
- keyingflag |= INSERTKEY_NEEDED;
- if (insertkey_visual)
- keyingflag |= INSERTKEY_MATRIX;
-
- /* call the API func, and set the active keyingset index */
- ks= BKE_keyingset_add(&sce->keyingsets, name, flag, keyingflag);
-
- if (ks) {
- sce->active_keyingset= BLI_countlist(&sce->keyingsets);
- return ks;
- }
- else {
- BKE_report(reports, RPT_ERROR, "Keying Set could not be added.");
- return NULL;
- }
-}
-
#else
void RNA_api_scene(StructRNA *srna)
@@ -135,21 +105,7 @@ void RNA_api_scene(StructRNA *srna)
RNA_def_function_ui_description(func, "Set scene frame updating all objects immediately.");
parm= RNA_def_int(func, "frame", 0, MINAFRAME, MAXFRAME, "", "Frame number to set.", MINAFRAME, MAXFRAME);
RNA_def_property_flag(parm, PROP_REQUIRED);
-
- /* Add Keying Set */
- func= RNA_def_function(srna, "add_keying_set", "rna_Scene_add_keying_set");
- RNA_def_function_ui_description(func, "Add a new Keying Set to Scene.");
- RNA_def_function_flag(func, FUNC_USE_REPORTS);
- /* returns the new KeyingSet */
- parm= RNA_def_pointer(func, "keyingset", "KeyingSet", "", "Newly created Keying Set.");
- RNA_def_function_return(func, parm);
- /* name */
- RNA_def_string(func, "name", "KeyingSet", 64, "Name", "Name of Keying Set");
- /* flags */
- RNA_def_boolean(func, "absolute", 1, "Absolute", "Keying Set defines specific paths/settings to be keyframed (i.e. is not reliant on context info)");
- /* keying flags */
- RNA_def_boolean(func, "insertkey_needed", 0, "Insert Keyframes - Only Needed", "Only insert keyframes where they're needed in the relevant F-Curves.");
- RNA_def_boolean(func, "insertkey_visual", 0, "Insert Keyframes - Visual", "Insert keyframes based on 'visual transforms'.");
}
#endif
+
diff --git a/source/blender/makesrna/intern/rna_sculpt_paint.c b/source/blender/makesrna/intern/rna_sculpt_paint.c
index ab4b27cea7b..c2c906e38f2 100644
--- a/source/blender/makesrna/intern/rna_sculpt_paint.c
+++ b/source/blender/makesrna/intern/rna_sculpt_paint.c
@@ -33,34 +33,8 @@
#include "BKE_paint.h"
-#include "WM_types.h"
-
-static EnumPropertyItem particle_edit_hair_brush_items[] = {
- {PE_BRUSH_NONE, "NONE", 0, "None", "Don't use any brush."},
- {PE_BRUSH_COMB, "COMB", 0, "Comb", "Comb hairs."},
- {PE_BRUSH_SMOOTH, "SMOOTH", 0, "Smooth", "Smooth hairs."},
- {PE_BRUSH_ADD, "ADD", 0, "Add", "Add hairs."},
- {PE_BRUSH_LENGTH, "LENGTH", 0, "Length", "Make hairs longer or shorter."},
- {PE_BRUSH_PUFF, "PUFF", 0, "Puff", "Make hairs stand up."},
- {PE_BRUSH_CUT, "CUT", 0, "Cut", "Cut hairs."},
- {0, NULL, 0, NULL, NULL}};
-
#ifdef RNA_RUNTIME
-#include "BKE_context.h"
-#include "BKE_pointcache.h"
-#include "BKE_particle.h"
-#include "BKE_depsgraph.h"
-
-#include "ED_particle.h"
-
-static EnumPropertyItem particle_edit_cache_brush_items[] = {
- {PE_BRUSH_NONE, "NONE", 0, "None", "Don't use any brush."},
- {PE_BRUSH_COMB, "COMB", 0, "Comb", "Comb paths."},
- {PE_BRUSH_SMOOTH, "SMOOTH", 0, "Smooth", "Smooth paths."},
- {PE_BRUSH_LENGTH, "LENGTH", 0, "Length", "Make paths longer or shorter."},
- {0, NULL, 0, NULL, NULL}};
-
static PointerRNA rna_ParticleEdit_brush_get(PointerRNA *ptr)
{
ParticleEditSettings *pset= (ParticleEditSettings*)ptr->data;
@@ -100,62 +74,6 @@ static void rna_Paint_active_brush_set(PointerRNA *ptr, PointerRNA value)
paint_brush_set(ptr->data, value.data);
}
-static void rna_ParticleEdit_redo(bContext *C, PointerRNA *ptr)
-{
- PTCacheEdit *edit = PE_get_current(CTX_data_scene(C), CTX_data_active_object(C));
-
- if(!edit)
- return;
-
- psys_free_path_cache(edit->psys, edit);
-}
-
-static void rna_ParticleEdit_update(bContext *C, PointerRNA *ptr)
-{
- Object *ob = CTX_data_active_object(C);
-
- if(ob) DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
-}
-
-static EnumPropertyItem *rna_ParticleEdit_tool_itemf(bContext *C, PointerRNA *ptr, int *free)
-{
- if(C==NULL) {
- EnumPropertyItem *item= NULL;
- int totitem= 0;
-
- /* needed for doc generation */
- RNA_enum_items_add(&item, &totitem, particle_edit_hair_brush_items);
- RNA_enum_item_end(&item, &totitem);
-
- *free= 1;
-
- return item;
- }
- else {
- Scene *scene= CTX_data_scene(C);
- PTCacheEdit *edit = PE_get_current(scene, CTX_data_active_object(C));
-
- if(edit && edit->psys)
- return particle_edit_hair_brush_items;
-
- return particle_edit_cache_brush_items;
- }
-}
-
-static int rna_ParticleEdit_editable_get(PointerRNA *ptr)
-{
- ParticleEditSettings *pset= (ParticleEditSettings*)ptr->data;
-
- return (pset->object && PE_get_current(pset->scene, pset->object));
-}
-static int rna_ParticleEdit_hair_get(PointerRNA *ptr)
-{
- ParticleEditSettings *pset= (ParticleEditSettings*)ptr->data;
-
- PTCacheEdit *edit = PE_get_current(pset->scene, pset->object);
-
- return (edit && edit->psys);
-}
#else
static void rna_def_paint(BlenderRNA *brna)
@@ -348,6 +266,17 @@ static void rna_def_particle_edit(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
+ static EnumPropertyItem tool_items[] = {
+ {PE_BRUSH_NONE, "NONE", 0, "None", "Don't use any brush."},
+ {PE_BRUSH_COMB, "COMB", 0, "Comb", "Comb hairs."},
+ {PE_BRUSH_SMOOTH, "SMOOTH", 0, "Smooth", "Smooth hairs."},
+ {PE_BRUSH_WEIGHT, "WEIGHT", 0, "Weight", "Assign weight to hairs."},
+ {PE_BRUSH_ADD, "ADD", 0, "Add", "Add hairs."},
+ {PE_BRUSH_LENGTH, "LENGTH", 0, "Length", "Make hairs longer or shorter."},
+ {PE_BRUSH_PUFF, "PUFF", 0, "Puff", "Make hairs stand up."},
+ {PE_BRUSH_CUT, "CUT", 0, "Cut", "Cut hairs."},
+ {0, NULL, 0, NULL, NULL}};
+
static EnumPropertyItem select_mode_items[] = {
{SCE_SELECT_PATH, "PATH", ICON_EDGESEL, "Path", ""}, // XXX icon
{SCE_SELECT_POINT, "POINT", ICON_VERTEXSEL, "Point", ""}, // XXX icon
@@ -364,14 +293,6 @@ static void rna_def_particle_edit(BlenderRNA *brna)
{1, "SHRINK", 0, "Shrink", "Make hairs shorter."},
{0, NULL, 0, NULL, NULL}};
- static EnumPropertyItem edit_type_items[]= {
- {PE_TYPE_PARTICLES, "PARTICLES", 0, "Particles", ""},
- {PE_TYPE_SOFTBODY, "SOFT_BODY", 0, "Soft body", ""},
- {PE_TYPE_CLOTH, "CLOTH", 0, "Cloth", ""},
- {0, NULL, 0, NULL, NULL}
- };
-
-
/* edit */
srna= RNA_def_struct(brna, "ParticleEdit", NULL);
@@ -380,15 +301,13 @@ static void rna_def_particle_edit(BlenderRNA *brna)
prop= RNA_def_property(srna, "tool", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "brushtype");
- RNA_def_property_enum_items(prop, particle_edit_hair_brush_items);
- RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_ParticleEdit_tool_itemf");
+ RNA_def_property_enum_items(prop, tool_items);
RNA_def_property_ui_text(prop, "Tool", "");
prop= RNA_def_property(srna, "selection_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "selectmode");
RNA_def_property_enum_items(prop, select_mode_items);
RNA_def_property_ui_text(prop, "Selection Mode", "Particle select and display mode.");
- RNA_def_property_update(prop, NC_OBJECT, "rna_ParticleEdit_update");
prop= RNA_def_property(srna, "keep_lengths", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PE_KEEP_LENGTHS);
@@ -407,19 +326,13 @@ static void rna_def_particle_edit(BlenderRNA *brna)
RNA_def_property_ui_range(prop, 0.0f, 10.0f, 10, 3);
RNA_def_property_ui_text(prop, "Emitter Distance", "Distance to keep particles away from the emitter.");
- prop= RNA_def_property(srna, "fade_time", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", PE_FADE_TIME);
- RNA_def_property_ui_text(prop, "Fade Time", "Fade paths and keys further away from current frame.");
- RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_ParticleEdit_update");
+ prop= RNA_def_property(srna, "show_time", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", PE_SHOW_TIME);
+ RNA_def_property_ui_text(prop, "Show Time", "Show time values of the baked keys.");
- prop= RNA_def_property(srna, "auto_velocity", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", PE_AUTO_VELOCITY);
- RNA_def_property_ui_text(prop, "Auto Velocity", "Calculate point velocities automatically.");
-
- prop= RNA_def_property(srna, "draw_particles", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", PE_DRAW_PART);
- RNA_def_property_ui_text(prop, "Draw Particles", "Draw actual particles.");
- RNA_def_property_update(prop, NC_OBJECT, NULL);
+ prop= RNA_def_property(srna, "show_children", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", PE_SHOW_CHILD);
+ RNA_def_property_ui_text(prop, "Show Children", "Show child particles.");
prop= RNA_def_property(srna, "mirror_x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PE_X_MIRROR);
@@ -440,37 +353,6 @@ static void rna_def_particle_edit(BlenderRNA *brna)
RNA_def_property_pointer_funcs(prop, "rna_ParticleEdit_brush_get", NULL, NULL);
RNA_def_property_ui_text(prop, "Brush", "");
- prop= RNA_def_property(srna, "draw_step", PROP_INT, PROP_NONE);
- RNA_def_property_range(prop, 2, 10);
- RNA_def_property_ui_text(prop, "Steps", "How many steps to draw the path with.");
- RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_ParticleEdit_redo");
-
- prop= RNA_def_property(srna, "fade_frames", PROP_INT, PROP_NONE);
- RNA_def_property_range(prop, 2, 100);
- RNA_def_property_ui_text(prop, "Frames", "How many frames to fade.");
- RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_ParticleEdit_update");
-
- prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "edittype");
- RNA_def_property_enum_items(prop, edit_type_items);
- RNA_def_property_ui_text(prop, "Type", "");
- RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_ParticleEdit_redo");
-
- prop= RNA_def_property(srna, "editable", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_funcs(prop, "rna_ParticleEdit_editable_get", NULL);
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Editable", "A valid edit mode exists");
-
- prop= RNA_def_property(srna, "hair", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_funcs(prop, "rna_ParticleEdit_hair_get", NULL);
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Hair", "Editing hair");
-
- prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Object", "The edited object");
-
-
/* brush */
srna= RNA_def_struct(brna, "ParticleBrush", NULL);
diff --git a/source/blender/makesrna/intern/rna_sequence.c b/source/blender/makesrna/intern/rna_sequence.c
index 9f016f73694..470909f4eff 100644
--- a/source/blender/makesrna/intern/rna_sequence.c
+++ b/source/blender/makesrna/intern/rna_sequence.c
@@ -221,16 +221,6 @@ static StructRNA* rna_Sequence_refine(struct PointerRNA *ptr)
}
}
-static char *rna_Sequence_path(PointerRNA *ptr)
-{
- Sequence *seq= (Sequence*)ptr->data;
-
- /* sequencer data comes from scene...
- * TODO: would be nice to make SequenceEditor data a datablock of its own (for shorter paths)
- */
- return BLI_sprintfN("sequence_editor.sequences[\"%s\"]", seq->name+2);
-}
-
static PointerRNA rna_SequenceEdtior_meta_stack_get(CollectionPropertyIterator *iter)
{
ListBaseIterator *internal= iter->internal;
@@ -370,7 +360,7 @@ static void rna_def_sequence(BlenderRNA *brna)
{SEQ_META, "META", 0, "Meta", ""},
{SEQ_SCENE, "SCENE", 0, "Scene", ""},
{SEQ_MOVIE, "MOVIE", 0, "Movie", ""},
- {SEQ_SOUND, "SOUND", 0, "Sound", ""},
+ {SEQ_SOUND, "_SOUND", 0, "Sound", ""},
{SEQ_EFFECT, "REPLACE", 0, "Replace", ""},
{SEQ_CROSS, "CROSS", 0, "Cross", ""},
{SEQ_ADD, "ADD", 0, "Add", ""},
@@ -403,7 +393,6 @@ static void rna_def_sequence(BlenderRNA *brna)
srna = RNA_def_struct(brna, "Sequence", NULL);
RNA_def_struct_ui_text(srna, "Sequence", "Sequence strip in the sequence editor.");
RNA_def_struct_refine_func(srna, "rna_Sequence_refine");
- RNA_def_struct_path_func(srna, "rna_Sequence_path");
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_Sequence_name_get", "rna_Sequence_name_length", "rna_Sequence_name_set");
diff --git a/source/blender/makesrna/intern/rna_smoke.c b/source/blender/makesrna/intern/rna_smoke.c
index 943129c7169..6f1babb495a 100644
--- a/source/blender/makesrna/intern/rna_smoke.c
+++ b/source/blender/makesrna/intern/rna_smoke.c
@@ -51,7 +51,7 @@
static void rna_Smoke_update(bContext *C, PointerRNA *ptr)
{
- DAG_id_flush_update(ptr->id.data, OB_RECALC_DATA);
+ DAG_object_flush_update(CTX_data_scene(C), ptr->id.data, OB_RECALC_DATA);
}
static void rna_Smoke_dependency_update(bContext *C, PointerRNA *ptr)
@@ -78,6 +78,13 @@ static void rna_Smoke_reset_dependancy(bContext *C, PointerRNA *ptr)
rna_Smoke_dependency_update(C, ptr);
}
+static void rna_Smoke_redraw(bContext *C, PointerRNA *ptr)
+{
+ SmokeDomainSettings *settings = (SmokeDomainSettings*)ptr->data;
+
+ settings->flags |= MOD_SMOKE_VIEW_REDRAWNICE;
+}
+
static char *rna_SmokeDomainSettings_path(PointerRNA *ptr)
{
SmokeDomainSettings *settings = (SmokeDomainSettings*)ptr->data;
@@ -129,6 +136,13 @@ static void rna_def_smoke_domain_settings(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Max Res", "Maximal resolution used in the fluid domain.");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
+ prop= RNA_def_property(srna, "color", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "omega");
+ RNA_def_property_range(prop, 0.02, 1.0);
+ RNA_def_property_ui_range(prop, 0.02, 1.0, 0.02, 2);
+ RNA_def_property_ui_text(prop, "Color", "Smoke color (0 = black, 1 = white).");
+ RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Smoke_redraw");
+
prop= RNA_def_property(srna, "amplify", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "amplify");
RNA_def_property_range(prop, 1, 10);
@@ -142,9 +156,9 @@ static void rna_def_smoke_domain_settings(BlenderRNA *brna)
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
prop= RNA_def_property(srna, "viewhighres", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "viewsettings", MOD_SMOKE_VIEW_SHOWBIG);
+ RNA_def_property_boolean_sdna(prop, NULL, "viewsettings", MOD_SMOKE_VIEW_USEBIG);
RNA_def_property_ui_text(prop, "Show High Resolution", "Show high resolution (using amplification).");
- RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_redraw");
prop= RNA_def_property(srna, "noise_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "noise");
@@ -152,6 +166,13 @@ static void rna_def_smoke_domain_settings(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Noise Method", "Noise method which is used for creating the high resolution");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
+ prop= RNA_def_property(srna, "visibility", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "visibility");
+ RNA_def_property_range(prop, 1, 15);
+ RNA_def_property_ui_range(prop, 1, 15, 1, 0);
+ RNA_def_property_ui_text(prop, "Display", "How much of the resolution should be shown during preview (every 2nd, 3rd, etc).");
+ RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Smoke_redraw");
+
prop= RNA_def_property(srna, "alpha", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "alpha");
RNA_def_property_range(prop, -5.0, 5.0);
@@ -199,25 +220,17 @@ static void rna_def_smoke_domain_settings(BlenderRNA *brna)
RNA_def_property_range(prop, 1.0, 100.0);
RNA_def_property_ui_range(prop, 1.0, 1000.0, 1, 0);
RNA_def_property_ui_text(prop, "Dissolve Speed", "Dissolve Speed");
- RNA_def_property_update(prop, 0, NULL);
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, NULL);
prop= RNA_def_property(srna, "dissolve_smoke", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_SMOKE_DISSOLVE);
RNA_def_property_ui_text(prop, "Dissolve Smoke", "Enable smoke to disappear over time.");
- RNA_def_property_update(prop, 0, NULL);
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, NULL);
prop= RNA_def_property(srna, "dissolve_smoke_log", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_SMOKE_DISSOLVE_LOG);
RNA_def_property_ui_text(prop, "Logarithmic dissolve", "Using 1/x ");
- RNA_def_property_update(prop, 0, NULL);
-
- prop= RNA_def_property(srna, "point_cache_low", PROP_POINTER, PROP_NEVER_NULL);
- RNA_def_property_pointer_sdna(prop, NULL, "point_cache[0]");
- RNA_def_property_ui_text(prop, "Point Cache", "");
-
- prop= RNA_def_property(srna, "point_cache_high", PROP_POINTER, PROP_NEVER_NULL);
- RNA_def_property_pointer_sdna(prop, NULL, "point_cache[1]");
- RNA_def_property_ui_text(prop, "Point Cache", "");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, NULL);
}
static void rna_def_smoke_flow_settings(BlenderRNA *brna)
@@ -235,26 +248,26 @@ static void rna_def_smoke_flow_settings(BlenderRNA *brna)
RNA_def_property_range(prop, 0.001, 1);
RNA_def_property_ui_range(prop, 0.001, 1.0, 1.0, 4);
RNA_def_property_ui_text(prop, "Density", "");
- RNA_def_property_update(prop, 0, NULL); // NC_OBJECT|ND_MODIFIER
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, NULL);
prop= RNA_def_property(srna, "temperature", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "temp");
RNA_def_property_range(prop, -10, 10);
RNA_def_property_ui_range(prop, -10, 10, 1, 1);
RNA_def_property_ui_text(prop, "Temp. Diff.", "Temperature difference to ambientt temperature.");
- RNA_def_property_update(prop, 0, NULL);
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, NULL);
prop= RNA_def_property(srna, "psys", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "psys");
RNA_def_property_struct_type(prop, "ParticleSystem");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Particle Systems", "Particle systems emitted from the object.");
- RNA_def_property_update(prop, 0, "rna_Smoke_reset_dependancy");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset_dependancy");
prop= RNA_def_property(srna, "outflow", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "type", MOD_SMOKE_FLOW_TYPE_OUTFLOW);
RNA_def_property_ui_text(prop, "Outflow", "Deletes smoke from simulation");
- RNA_def_property_update(prop, 0, NULL);
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, NULL);
}
static void rna_def_smoke_coll_settings(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_sound.c b/source/blender/makesrna/intern/rna_sound.c
index 38e4d850c68..a029ef85544 100644
--- a/source/blender/makesrna/intern/rna_sound.c
+++ b/source/blender/makesrna/intern/rna_sound.c
@@ -34,29 +34,6 @@
#ifdef RNA_RUNTIME
-#include "BKE_sound.h"
-#include "BKE_context.h"
-
-static void rna_Sound_filename_update(bContext *C, PointerRNA *ptr)
-{
- sound_load(CTX_data_main(C), (bSound*)ptr->data);
-}
-
-static int rna_Sound_caching_get(PointerRNA *ptr)
-{
- bSound *sound = (bSound*)(ptr->data);
- return sound->cache != NULL;
-}
-
-static void rna_Sound_caching_set(PointerRNA *ptr, const int value)
-{
- bSound *sound = (bSound*)(ptr->data);
- if(value)
- sound_cache(sound, 0);
- else
- sound_delete_cache(sound);
-}
-
#else
static void rna_def_sound(BlenderRNA *brna)
@@ -74,16 +51,10 @@ static void rna_def_sound(BlenderRNA *brna)
prop= RNA_def_property(srna, "filename", PROP_STRING, PROP_FILEPATH);
RNA_def_property_string_sdna(prop, NULL, "name");
RNA_def_property_ui_text(prop, "Filename", "Sound sample file used by this Sound datablock.");
- RNA_def_property_update(prop, 0, "rna_Sound_filename_update");
prop= RNA_def_property(srna, "packed_file", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "packedfile");
RNA_def_property_ui_text(prop, "Packed File", "");
-
- prop= RNA_def_property(srna, "caching", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_funcs(prop, "rna_Sound_caching_get", "rna_Sound_caching_set");
- RNA_def_property_ui_text(prop, "Caching", "The sound file is decoded and loaded into RAM.");
- RNA_def_property_update(prop, 0, "rna_Sound_filename_update");
}
void RNA_def_sound(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 542f6e2aeda..be0707390c4 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -151,7 +151,7 @@ static void rna_SpaceImageEditor_paint_update(bContext *C, PointerRNA *ptr)
Scene *scene= CTX_data_scene(C);
if(scene)
- paint_init(&scene->toolsettings->imapaint.paint, PAINT_CURSOR_TEXTURE_PAINT);
+ paint_init(&scene->toolsettings->imapaint.paint, "Brush");
}
static int rna_SpaceImageEditor_show_render_get(PointerRNA *ptr)
@@ -375,68 +375,65 @@ static void rna_def_space_image_uv(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "sticky");
RNA_def_property_enum_items(prop, sticky_mode_items);
RNA_def_property_ui_text(prop, "Sticky Selection Mode", "Automatically select also UVs sharing the same vertex as the ones being selected.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
+ RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
/* drawing */
prop= RNA_def_property(srna, "edge_draw_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "dt_uv");
RNA_def_property_enum_items(prop, dt_uv_items);
RNA_def_property_ui_text(prop, "Edge Draw Type", "Draw type for drawing UV edges.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
+ RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
prop= RNA_def_property(srna, "draw_smooth_edges", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_SMOOTH_UV);
RNA_def_property_ui_text(prop, "Draw Smooth Edges", "Draw UV edges anti-aliased.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
+ RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
prop= RNA_def_property(srna, "draw_stretch", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_DRAW_STRETCH);
RNA_def_property_ui_text(prop, "Draw Stretch", "Draw faces colored according to the difference in shape between UVs and their 3D coordinates (blue for low distortion, red for high distortion).");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
+ RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
prop= RNA_def_property(srna, "draw_stretch_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "dt_uvstretch");
RNA_def_property_enum_items(prop, dt_uvstretch_items);
RNA_def_property_ui_text(prop, "Draw Stretch Type", "Type of stretch to draw.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
+ RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
prop= RNA_def_property(srna, "draw_modified_edges", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_DRAWSHADOW);
RNA_def_property_ui_text(prop, "Draw Modified Edges", "Draw edges after modifiers are applied.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
+ RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
prop= RNA_def_property(srna, "draw_other_objects", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_DRAW_OTHER);
RNA_def_property_ui_text(prop, "Draw Other Objects", "Draw other selected objects that share the same image.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
+ RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
prop= RNA_def_property(srna, "normalized_coordinates", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_COORDFLOATS);
RNA_def_property_ui_text(prop, "Normalized Coordinates", "Display UV coordinates from 0.0 to 1.0 rather than in pixels.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
+ RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
/* todo: move edge and face drawing options here from G.f */
prop= RNA_def_property(srna, "snap_to_pixels", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_PIXELSNAP);
RNA_def_property_ui_text(prop, "Snap to Pixels", "Snap UVs to pixel locations while editing.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
prop= RNA_def_property(srna, "constrain_to_image_bounds", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_CLIP_UV);
RNA_def_property_ui_text(prop, "Constrain to Image Bounds", "Constraint to stay within the image bounds while editing.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
prop= RNA_def_property(srna, "live_unwrap", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_LIVE_UNWRAP);
RNA_def_property_ui_text(prop, "Live Unwrap", "Continuously unwrap the selected UV island while transforming pinned vertices.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
prop= RNA_def_property(srna, "pivot", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "around");
RNA_def_property_enum_items(prop, pivot_items);
RNA_def_property_ui_text(prop, "Pivot", "Rotation/Scaling Pivot.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
+ RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
}
static void rna_def_space_outliner(BlenderRNA *brna)
@@ -467,12 +464,12 @@ static void rna_def_space_outliner(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "outlinevis");
RNA_def_property_enum_items(prop, display_mode_items);
RNA_def_property_ui_text(prop, "Display Mode", "Type of information to display");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_OUTLINER, NULL);
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "show_restriction_columns", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SO_HIDE_RESTRICTCOLS);
RNA_def_property_ui_text(prop, "Show Restriction Columns", "Show colum");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_OUTLINER, NULL);
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
}
@@ -489,34 +486,35 @@ static void rna_def_background_image(BlenderRNA *brna)
RNA_def_property_pointer_sdna(prop, NULL, "ima");
RNA_def_property_ui_text(prop, "Image", "Image displayed and edited in this space.");
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, NULL);
prop= RNA_def_property(srna, "image_user", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "iuser");
RNA_def_property_ui_text(prop, "Image User", "Parameters defining which layer, pass and frame of the image is displayed.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
- prop= RNA_def_property(srna, "offset_x", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "x_offset", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "xof");
RNA_def_property_ui_text(prop, "X Offset", "Offsets image horizontally from the view center");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
- prop= RNA_def_property(srna, "offset_y", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "y_offset", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "yof");
RNA_def_property_ui_text(prop, "Y Offset", "Offsets image vertically from the view center");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "size");
RNA_def_property_ui_text(prop, "Size", "Scaling factor for the background image.");
RNA_def_property_range(prop, 0.0, FLT_MAX);
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "transparency", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "blend");
RNA_def_property_ui_text(prop, "Transparency", "Amount to blend the image against the background color.");
RNA_def_property_range(prop, 0.0, 1.0);
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
+
}
static void rna_def_space_3dview(BlenderRNA *brna)
@@ -555,12 +553,10 @@ static void rna_def_space_3dview(BlenderRNA *brna)
prop= RNA_def_property(srna, "camera", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "camera");
RNA_def_property_ui_text(prop, "Camera", "Active camera used in this view (when unlocked from the scene's active camera).");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
prop= RNA_def_property(srna, "lock_object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "ob_centre");
RNA_def_property_ui_text(prop, "Lock Object", "3D View center is locked to this object's position");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
prop= RNA_def_property(srna, "background_image", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "bgpic");
@@ -570,142 +566,136 @@ static void rna_def_space_3dview(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "drawtype");
RNA_def_property_enum_items(prop, viewport_shading_items);
RNA_def_property_ui_text(prop, "Viewport Shading", "Method to display/shade objects in the 3D View.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
prop= RNA_def_property(srna, "localview", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "localview", 0);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Local View", "Display an isolated sub-set of objects, apart from the scene visibility.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
prop= RNA_def_property(srna, "lens", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "lens");
RNA_def_property_ui_text(prop, "Lens", "Lens angle (mm) in perspective view.");
RNA_def_property_range(prop, 1.0f, 250.0f);
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "clip_start", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "near");
RNA_def_property_range(prop, 0.0f, FLT_MAX);
RNA_def_property_ui_text(prop, "Clip Start", "3D View near clipping distance.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "clip_end", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "far");
RNA_def_property_range(prop, 1.0f, FLT_MAX);
RNA_def_property_ui_text(prop, "Clip End", "3D View far clipping distance.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "grid_spacing", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "grid");
RNA_def_property_ui_text(prop, "Grid Spacing", "The distance between 3D View grid lines.");
RNA_def_property_range(prop, 0.0f, FLT_MAX);
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "grid_lines", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "gridlines");
RNA_def_property_ui_text(prop, "Grid Lines", "The number of grid lines to display in perspective view.");
RNA_def_property_range(prop, 0, 1024);
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "grid_subdivisions", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "gridsubdiv");
RNA_def_property_ui_text(prop, "Grid Subdivisions", "The number of subdivisions between grid lines.");
RNA_def_property_range(prop, 1, 1024);
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "display_floor", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gridflag", V3D_SHOW_FLOOR);
RNA_def_property_ui_text(prop, "Display Grid Floor", "Show the ground plane grid in perspective view.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "display_x_axis", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gridflag", V3D_SHOW_X);
RNA_def_property_ui_text(prop, "Display X Axis", "Show the X axis line in perspective view.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "display_y_axis", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gridflag", V3D_SHOW_Y);
RNA_def_property_ui_text(prop, "Display Y Axis", "Show the Y axis line in perspective view.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "display_z_axis", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gridflag", V3D_SHOW_Z);
RNA_def_property_ui_text(prop, "Display Z Axis", "Show the Z axis line in perspective view.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "outline_selected", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", V3D_SELECT_OUTLINE);
RNA_def_property_ui_text(prop, "Outline Selected", "Show an outline highlight around selected objects in non-wireframe views.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "all_object_centers", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", V3D_DRAW_CENTERS);
RNA_def_property_ui_text(prop, "All Object Centers", "Show the object center dot for all (selected and unselected) objects.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "relationship_lines", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", V3D_HIDE_HELPLINES);
RNA_def_property_ui_text(prop, "Relationship Lines", "Show dashed lines indicating parent or constraint relationships.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "textured_solid", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag2", V3D_SOLID_TEX);
RNA_def_property_ui_text(prop, "Textured Solid", "Display face-assigned textures in solid view");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "display_background_image", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, NULL, "rna_View3D_display_background_image_set");
RNA_def_property_boolean_sdna(prop, NULL, "flag", V3D_DISPBGPIC);
RNA_def_property_ui_text(prop, "Display Background Image", "Display a reference image behind objects in the 3D View");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "pivot_point", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "around");
RNA_def_property_enum_items(prop, pivot_items);
RNA_def_property_ui_text(prop, "Pivot Point", "Pivot center for rotation/scaling.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
prop= RNA_def_property(srna, "manipulator", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "twflag", V3D_USE_MANIPULATOR);
RNA_def_property_ui_text(prop, "Manipulator", "Use a 3D manipulator widget for controlling transforms.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+ RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, NULL);
prop= RNA_def_property(srna, "manipulator_translate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "twtype", V3D_MANIP_TRANSLATE);
RNA_def_property_ui_text(prop, "Manipulator Translate", "Use the manipulator for movement transformations.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+ RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, NULL);
prop= RNA_def_property(srna, "manipulator_rotate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "twtype", V3D_MANIP_ROTATE);
RNA_def_property_ui_text(prop, "Manipulator Rotate", "Use the manipulator for rotation transformations.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+ RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, NULL);
prop= RNA_def_property(srna, "manipulator_scale", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "twtype", V3D_MANIP_SCALE);
RNA_def_property_ui_text(prop, "Manipulator Scale", "Use the manipulator for scale transformations.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+ RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, NULL);
prop= RNA_def_property(srna, "transform_orientation", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "twmode");
RNA_def_property_enum_items(prop, transform_orientation_items);
RNA_def_property_ui_text(prop, "Transform Orientation", "The alignment of manipulator handles.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+ RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, NULL);
prop= RNA_def_property(srna, "lock_rotation", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, "RegionView3D", "viewlock", RV3D_LOCKED);
RNA_def_property_ui_text(prop, "Lock", "Lock View Rotation");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
prop= RNA_def_property(srna, "box_preview", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, "RegionView3D", "viewlock", RV3D_BOXVIEW);
RNA_def_property_ui_text(prop, "Box", "");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
prop= RNA_def_property(srna, "box_clip", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, "RegionView3D", "viewlock", RV3D_BOXCLIP);
RNA_def_property_ui_text(prop, "Clip", "");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
}
static void rna_def_space_buttons(BlenderRNA *brna)
@@ -740,19 +730,19 @@ static void rna_def_space_buttons(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "mainb");
RNA_def_property_enum_items(prop, buttons_context_items);
RNA_def_property_ui_text(prop, "Context", "Type of active data to display and edit.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_PROPERTIES, NULL);
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "align", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "align");
RNA_def_property_enum_items(prop, align_items);
RNA_def_property_enum_funcs(prop, NULL, "rna_SpaceProperties_align_set", NULL);
RNA_def_property_ui_text(prop, "Align", "Arrangement of the panels.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_PROPERTIES, NULL);
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "brush_texture", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SB_BRUSH_TEX);
RNA_def_property_ui_text(prop, "Brush Texture", "Show brush textures.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_PROPERTIES, NULL);
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
/* pinned data */
prop= RNA_def_property(srna, "pin_id", PROP_POINTER, PROP_NONE);
@@ -760,7 +750,6 @@ static void rna_def_space_buttons(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "ID");
RNA_def_property_pointer_funcs(prop, NULL, NULL, "rna_SpaceProperties_pin_id_typef");
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_PROPERTIES, NULL);
}
static void rna_def_space_image(BlenderRNA *brna)
@@ -777,35 +766,35 @@ static void rna_def_space_image(BlenderRNA *brna)
RNA_def_property_pointer_funcs(prop, NULL, "rna_SpaceImageEditor_image_set", NULL);
RNA_def_property_ui_text(prop, "Image", "Image displayed and edited in this space.");
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
+ RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
prop= RNA_def_property(srna, "image_user", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "iuser");
RNA_def_property_ui_text(prop, "Image User", "Parameters defining which layer, pass and frame of the image is displayed.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
+ RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
prop= RNA_def_property(srna, "curves", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "cumap");
RNA_def_property_ui_text(prop, "Curves", "Color curve mapping to use for displaying the image.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
+ RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
prop= RNA_def_property(srna, "image_pin", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "pin", 0);
RNA_def_property_ui_text(prop, "Image Pin", "Display current image regardless of object selection.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
+ RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
/* image draw */
prop= RNA_def_property(srna, "draw_repeated", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_DRAW_TILE);
RNA_def_property_ui_text(prop, "Draw Repeated", "Draw the image repeated outside of the main view.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
+ RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
prop= RNA_def_property(srna, "draw_channels", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
RNA_def_property_enum_items(prop, dc_all_items);
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_SpaceImageEditor_draw_channels_itemf");
RNA_def_property_ui_text(prop, "Draw Channels", "Channels of the image to draw.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
+ RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
/* uv */
prop= RNA_def_property(srna, "uv_editor", PROP_POINTER, PROP_NEVER_NULL);
@@ -818,7 +807,7 @@ static void rna_def_space_image(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_DRAWTOOL);
RNA_def_property_ui_text(prop, "Image Painting", "Enable image painting mode.");
RNA_def_property_ui_icon(prop, ICON_TPAINT_HLT, 0);
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, "rna_SpaceImageEditor_paint_update");
+ RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, "rna_SpaceImageEditor_paint_update");
/* grease pencil */
prop= RNA_def_property(srna, "grease_pencil", PROP_POINTER, PROP_NONE);
@@ -877,69 +866,64 @@ static void rna_def_space_sequencer(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "mainb");
RNA_def_property_enum_items(prop, display_mode_items);
RNA_def_property_ui_text(prop, "Display Mode", "The view mode to use for displaying sequencer output.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
+ RNA_def_property_update(prop, ND_SEQUENCER|NC_WINDOW, NULL);
/* flag's */
prop= RNA_def_property(srna, "draw_frames", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_DRAWFRAMES);
RNA_def_property_ui_text(prop, "Draw Frames", "Draw frames rather then seconds.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
+ RNA_def_property_update(prop, ND_SEQUENCER|NC_WINDOW, NULL);
prop= RNA_def_property(srna, "transform_markers", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_MARKER_TRANS);
RNA_def_property_ui_text(prop, "Transform Markers", "Transform markers as well as strips.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
prop= RNA_def_property(srna, "seperate_color_preview", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_DRAW_COLOR_SEPERATED);
RNA_def_property_ui_text(prop, "Seperate Colors", "Seperate color channels in preview.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
+ RNA_def_property_update(prop, ND_SEQUENCER|NC_WINDOW, NULL);
prop= RNA_def_property(srna, "draw_safe_margin", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_DRAW_SAFE_MARGINS);
RNA_def_property_ui_text(prop, "Safe Margin", "Draw title safe margins in preview.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
+ RNA_def_property_update(prop, ND_SEQUENCER|NC_WINDOW, NULL);
prop= RNA_def_property(srna, "use_grease_pencil", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_DRAW_GPENCIL);
RNA_def_property_ui_text(prop, "Use Grease Pencil", "Display and edit the grease pencil freehand annotations overlay.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
+ RNA_def_property_update(prop, ND_SEQUENCER|NC_WINDOW, NULL);
/* grease pencil */
prop= RNA_def_property(srna, "grease_pencil", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "gpd");
RNA_def_property_struct_type(prop, "UnknownType");
RNA_def_property_ui_text(prop, "Grease Pencil", "Grease pencil data for this space.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
prop= RNA_def_property(srna, "display_channel", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "chanshown");
RNA_def_property_ui_text(prop, "Display Channel", "The channel number shown in the image preview. 0 is the result of all strips combined.");
RNA_def_property_range(prop, 0, 32); // MAXSEQ --- todo, move from BKE_sequence.h
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
+ RNA_def_property_update(prop, ND_SEQUENCER|NC_WINDOW, NULL);
prop= RNA_def_property(srna, "draw_overexposed", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "zebra");
RNA_def_property_ui_text(prop, "Show Overexposed", "Show overexposed areas with zebra stripes.");
RNA_def_property_range(prop, 0, 110);
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
+ RNA_def_property_update(prop, ND_SEQUENCER|NC_WINDOW, NULL);
/* not sure we need rna access to these but adding anyway */
- prop= RNA_def_property(srna, "offset_x", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "x_offset", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "xof");
RNA_def_property_ui_text(prop, "X Offset", "Offsets image horizontally from the view center");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
- prop= RNA_def_property(srna, "offset_y", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "y_offset", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "yof");
RNA_def_property_ui_text(prop, "Y Offset", "Offsets image horizontally from the view center");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
prop= RNA_def_property(srna, "zoom", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "zoom");
RNA_def_property_ui_text(prop, "Zoom", "Display zoom level");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
}
static void rna_def_space_text(BlenderRNA *brna)
@@ -956,68 +940,63 @@ static void rna_def_space_text(BlenderRNA *brna)
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Text", "Text displayed and edited in this space.");
RNA_def_property_pointer_funcs(prop, NULL, "rna_SpaceTextEditor_text_set", NULL);
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
+ RNA_def_property_update(prop, NC_TEXT|ND_DISPLAY, NULL);
/* display */
prop= RNA_def_property(srna, "syntax_highlight", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "showsyntax", 0);
RNA_def_property_ui_text(prop, "Syntax Highlight", "Syntax highlight for scripting.");
RNA_def_property_ui_icon(prop, ICON_SYNTAX_OFF, 1);
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
+ RNA_def_property_update(prop, NC_TEXT|ND_DISPLAY, NULL);
prop= RNA_def_property(srna, "word_wrap", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "wordwrap", 0);
RNA_def_property_boolean_funcs(prop, NULL, "rna_SpaceTextEditor_word_wrap_set");
RNA_def_property_ui_text(prop, "Word Wrap", "Wrap words if there is not enough horizontal space.");
RNA_def_property_ui_icon(prop, ICON_WORDWRAP_OFF, 1);
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
+ RNA_def_property_update(prop, NC_TEXT|ND_DISPLAY, NULL);
prop= RNA_def_property(srna, "line_numbers", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "showlinenrs", 0);
RNA_def_property_ui_text(prop, "Line Numbers", "Show line numbers next to the text.");
RNA_def_property_ui_icon(prop, ICON_LINENUMBERS_OFF, 1);
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
+ RNA_def_property_update(prop, NC_TEXT|ND_DISPLAY, NULL);
prop= RNA_def_property(srna, "overwrite", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_ui_text(prop, "Overwrite", "Overwrite characters when typing rather than inserting them.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
+ RNA_def_property_update(prop, NC_TEXT|ND_DISPLAY, NULL);
prop= RNA_def_property(srna, "live_edit", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_ui_text(prop, "Live Edit", "Run python while editing.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
prop= RNA_def_property(srna, "tab_width", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "tabnumber");
RNA_def_property_range(prop, 2, 8);
RNA_def_property_ui_text(prop, "Tab Width", "Number of spaces to display tabs with.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
+ RNA_def_property_update(prop, NC_TEXT|ND_DISPLAY, NULL);
prop= RNA_def_property(srna, "font_size", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "lheight");
RNA_def_property_range(prop, 8, 32);
RNA_def_property_ui_text(prop, "Font Size", "Font size to use for displaying the text.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
+ RNA_def_property_update(prop, NC_TEXT|ND_DISPLAY, NULL);
/* find */
prop= RNA_def_property(srna, "find_all", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", ST_FIND_ALL);
RNA_def_property_ui_text(prop, "Find All", "Search in all text datablocks, instead of only the active one.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
prop= RNA_def_property(srna, "find_wrap", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", ST_FIND_WRAP);
RNA_def_property_ui_text(prop, "Find Wrap", "Search again from the start of the file when reaching the end.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
prop= RNA_def_property(srna, "find_text", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "findstr");
RNA_def_property_ui_text(prop, "Find Text", "Text to search for with the find tool.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
prop= RNA_def_property(srna, "replace_text", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "replacestr");
RNA_def_property_ui_text(prop, "Replace Text", "Text to replace selected text with using the replace tool.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
}
static void rna_def_space_dopesheet(BlenderRNA *brna)
@@ -1042,30 +1021,25 @@ static void rna_def_space_dopesheet(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "mode");
RNA_def_property_enum_items(prop, mode_items);
RNA_def_property_ui_text(prop, "Mode", "Editing context being displayed.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_DOPESHEET, NULL);
/* display */
prop= RNA_def_property(srna, "show_seconds", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SACTION_DRAWTIME);
RNA_def_property_clear_flag(prop, PROP_EDITABLE); // XXX for now, only set with operator
RNA_def_property_ui_text(prop, "Show Seconds", "Show timing in seconds not frames.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_DOPESHEET, NULL);
prop= RNA_def_property(srna, "show_cframe_indicator", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SACTION_NODRAWCFRANUM);
RNA_def_property_ui_text(prop, "Show Frame Number Indicator", "Show frame number beside the current frame indicator line.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_DOPESHEET, NULL);
prop= RNA_def_property(srna, "show_sliders", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SACTION_SLIDERS);
RNA_def_property_ui_text(prop, "Show Sliders", "Show sliders beside F-Curve channels.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_DOPESHEET, NULL);
/* editing */
prop= RNA_def_property(srna, "automerge_keyframes", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SACTION_NOTRANSKEYCULL);
RNA_def_property_ui_text(prop, "AutoMerge Keyframes", "Show handles of Bezier control points.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_DOPESHEET, NULL);
// TODO... autosnap, dopesheet?
}
@@ -1090,40 +1064,29 @@ static void rna_def_space_graph(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "mode");
RNA_def_property_enum_items(prop, mode_items);
RNA_def_property_ui_text(prop, "Mode", "Editing context being displayed.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
/* display */
prop= RNA_def_property(srna, "show_seconds", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SIPO_DRAWTIME);
RNA_def_property_clear_flag(prop, PROP_EDITABLE); // XXX for now, only set with operator
RNA_def_property_ui_text(prop, "Show Seconds", "Show timing in seconds not frames.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
prop= RNA_def_property(srna, "show_cframe_indicator", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SIPO_NODRAWCFRANUM);
RNA_def_property_ui_text(prop, "Show Frame Number Indicator", "Show frame number beside the current frame indicator line.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
-
- prop= RNA_def_property(srna, "show_sliders", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", SIPO_SLIDERS);
- RNA_def_property_ui_text(prop, "Show Sliders", "Show sliders beside F-Curve channels.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
prop= RNA_def_property(srna, "show_handles", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SIPO_NOHANDLES);
RNA_def_property_ui_text(prop, "Show Handles", "Show handles of Bezier control points.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
prop= RNA_def_property(srna, "only_selected_curves_handles", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SIPO_SELCUVERTSONLY);
RNA_def_property_ui_text(prop, "Only Selected Curve Keyframes", "Only keyframes of selected F-Curves are visible and editable.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
/* editing */
prop= RNA_def_property(srna, "automerge_keyframes", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SIPO_NOTRANSKEYCULL);
RNA_def_property_ui_text(prop, "AutoMerge Keyframes", "Show handles of Bezier control points.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
// TODO... autosnap, dopesheet?
}
@@ -1142,17 +1105,14 @@ static void rna_def_space_nla(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "flag", SNLA_DRAWTIME);
RNA_def_property_clear_flag(prop, PROP_EDITABLE); // XXX for now, only set with operator
RNA_def_property_ui_text(prop, "Show Seconds", "Show timing in seconds not frames.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NLA, NULL);
prop= RNA_def_property(srna, "show_cframe_indicator", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SNLA_NODRAWCFRANUM);
RNA_def_property_ui_text(prop, "Show Frame Number Indicator", "Show frame number beside the current frame indicator line.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NLA, NULL);
prop= RNA_def_property(srna, "show_strip_curves", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SNLA_NOSTRIPCURVES);
RNA_def_property_ui_text(prop, "Show Control Curves", "Show influence curves on strips.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NLA, NULL);
/* editing */
// TODO... autosnap, dopesheet?
@@ -1172,44 +1132,43 @@ static void rna_def_space_time(BlenderRNA *brna)
prop= RNA_def_property(srna, "play_top_left", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "redraws", TIME_REGION);
RNA_def_property_ui_text(prop, "Top-Left 3D Window", "");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, "rna_SpaceTime_redraw_update");
+ RNA_def_property_update(prop, 0, "rna_SpaceTime_redraw_update");
prop= RNA_def_property(srna, "play_all_3d", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "redraws", TIME_ALL_3D_WIN);
RNA_def_property_ui_text(prop, "All 3D Windows", "");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, "rna_SpaceTime_redraw_update");
+ RNA_def_property_update(prop, 0, "rna_SpaceTime_redraw_update");
prop= RNA_def_property(srna, "play_anim", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "redraws", TIME_ALL_ANIM_WIN);
RNA_def_property_ui_text(prop, "Animation Windows", "");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, "rna_SpaceTime_redraw_update");
+ RNA_def_property_update(prop, 0, "rna_SpaceTime_redraw_update");
prop= RNA_def_property(srna, "play_buttons", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "redraws", TIME_ALL_BUTS_WIN);
RNA_def_property_ui_text(prop, "Properties Windows", "");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, "rna_SpaceTime_redraw_update");
+ RNA_def_property_update(prop, 0, "rna_SpaceTime_redraw_update");
prop= RNA_def_property(srna, "play_image", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "redraws", TIME_ALL_IMAGE_WIN);
RNA_def_property_ui_text(prop, "Image Windows", "");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, "rna_SpaceTime_redraw_update");
+ RNA_def_property_update(prop, 0, "rna_SpaceTime_redraw_update");
prop= RNA_def_property(srna, "play_sequencer", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "redraws", TIME_SEQ);
RNA_def_property_ui_text(prop, "Sequencer Windows", "");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, "rna_SpaceTime_redraw_update");
+ RNA_def_property_update(prop, 0, "rna_SpaceTime_redraw_update");
/* Other options */
prop= RNA_def_property(srna, "continue_physics", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "redraws", TIME_CONTINUE_PHYSICS);
RNA_def_property_ui_text(prop, "Continue Physics", "During playblack, continue physics simulations regardless of the frame number");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, NULL);
prop= RNA_def_property(srna, "only_selected", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", TIME_ONLYACTSEL);
RNA_def_property_ui_text(prop, "Only Selected channels", "Show keyframes only from active/selected channels.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, NULL);
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
}
static void rna_def_console_line(BlenderRNA *brna)
@@ -1219,17 +1178,15 @@ static void rna_def_console_line(BlenderRNA *brna)
srna = RNA_def_struct(brna, "ConsoleLine", NULL);
RNA_def_struct_ui_text(srna, "Console Input", "Input line for the interactive console.");
- // XXX using non-inited "prop", uh? RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CONSOLE, NULL);
prop= RNA_def_property(srna, "line", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_ConsoleLine_line_get", "rna_ConsoleLine_line_length", "rna_ConsoleLine_line_set");
RNA_def_property_ui_text(prop, "Line", "Text in the line.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CONSOLE, NULL);
prop= RNA_def_property(srna, "current_character", PROP_INT, PROP_NONE); /* copied from text editor */
RNA_def_property_int_sdna(prop, NULL, "cursor");
RNA_def_property_int_funcs(prop, NULL, NULL, "rna_ConsoleLine_cursor_index_range");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CONSOLE, NULL);
+
}
static EnumPropertyItem console_type_items[] = {
@@ -1251,39 +1208,39 @@ static void rna_def_space_console(BlenderRNA *brna)
RNA_def_property_int_sdna(prop, NULL, "lheight");
RNA_def_property_range(prop, 8, 32);
RNA_def_property_ui_text(prop, "Font Size", "Font size to use for displaying the text.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CONSOLE, NULL);
+ RNA_def_property_update(prop, NC_CONSOLE | ND_CONSOLE, NULL);
prop= RNA_def_property(srna, "console_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "type");
RNA_def_property_enum_items(prop, console_type_items);
RNA_def_property_ui_text(prop, "Type", "Console type.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CONSOLE, NULL);
+ RNA_def_property_update(prop, NC_CONSOLE | ND_CONSOLE, NULL);
/* reporting display */
prop= RNA_def_property(srna, "show_report_debug", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "rpt_mask", CONSOLE_RPT_DEBUG);
RNA_def_property_ui_text(prop, "Show Debug", "Display debug reporting info.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CONSOLE_REPORT, NULL);
+ RNA_def_property_update(prop, NC_CONSOLE | ND_CONSOLE_REPORT, NULL);
prop= RNA_def_property(srna, "show_report_info", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "rpt_mask", CONSOLE_RPT_INFO);
RNA_def_property_ui_text(prop, "Show Info", "Display general information.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CONSOLE_REPORT, NULL);
+ RNA_def_property_update(prop, NC_CONSOLE | ND_CONSOLE_REPORT, NULL);
prop= RNA_def_property(srna, "show_report_operator", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "rpt_mask", CONSOLE_RPT_OP);
RNA_def_property_ui_text(prop, "Show Operator", "Display the operator log.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CONSOLE_REPORT, NULL);
+ RNA_def_property_update(prop, NC_CONSOLE | ND_CONSOLE_REPORT, NULL);
prop= RNA_def_property(srna, "show_report_warn", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "rpt_mask", CONSOLE_RPT_WARN);
RNA_def_property_ui_text(prop, "Show Warn", "Display warnings.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CONSOLE_REPORT, NULL);
+ RNA_def_property_update(prop, NC_CONSOLE | ND_CONSOLE_REPORT, NULL);
prop= RNA_def_property(srna, "show_report_error", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "rpt_mask", CONSOLE_RPT_ERR);
RNA_def_property_ui_text(prop, "Show Error", "Display error text.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CONSOLE_REPORT, NULL);
+ RNA_def_property_update(prop, NC_CONSOLE | ND_CONSOLE_REPORT, NULL);
@@ -1331,82 +1288,82 @@ static void rna_def_fileselect_params(BlenderRNA *brna)
prop= RNA_def_property(srna, "directory", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "dir");
RNA_def_property_ui_text(prop, "Directory", "Directory displayed in the file browser.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL);
+ RNA_def_property_update(prop, NC_FILE | ND_PARAMS, NULL);
prop= RNA_def_property(srna, "file", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "file");
RNA_def_property_ui_text(prop, "File Name", "Active file in the file browser.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL);
+ RNA_def_property_update(prop, NC_FILE | ND_PARAMS, NULL);
prop= RNA_def_property(srna, "display", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "display");
RNA_def_property_enum_items(prop, file_display_items);
RNA_def_property_ui_text(prop, "Display Mode", "Display mode for the file list");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL);
+ RNA_def_property_update(prop, NC_FILE | ND_PARAMS, NULL);
prop= RNA_def_property(srna, "do_filter", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", FILE_FILTER);
RNA_def_property_ui_text(prop, "Filter Files", "Enable filtering of files.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
+ RNA_def_property_update(prop, NC_FILE | ND_FILELIST, NULL);
prop= RNA_def_property(srna, "hide_dot", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", FILE_HIDE_DOT);
RNA_def_property_ui_text(prop, "Hide Dot Files", "Hide hidden dot files.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_LIST , NULL);
+ RNA_def_property_update(prop, NC_FILE | ND_FILELIST , NULL);
prop= RNA_def_property(srna, "sort", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "sort");
RNA_def_property_enum_items(prop, file_sort_items);
RNA_def_property_ui_text(prop, "Sort", "");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL);
+ RNA_def_property_update(prop, NC_FILE | ND_PARAMS, NULL);
prop= RNA_def_property(srna, "filter_image", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "filter", IMAGEFILE);
RNA_def_property_ui_text(prop, "Filter Images", "Show image files.");
RNA_def_property_ui_icon(prop, ICON_FILE_IMAGE, 0);
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
+ RNA_def_property_update(prop, NC_FILE | ND_FILELIST, NULL);
prop= RNA_def_property(srna, "filter_blender", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "filter", BLENDERFILE);
RNA_def_property_ui_text(prop, "Filter Blender", "Show .blend files.");
RNA_def_property_ui_icon(prop, ICON_FILE_BLEND, 0);
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
+ RNA_def_property_update(prop, NC_FILE | ND_FILELIST, NULL);
prop= RNA_def_property(srna, "filter_movie", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "filter", MOVIEFILE);
RNA_def_property_ui_text(prop, "Filter Movies", "Show movie files.");
RNA_def_property_ui_icon(prop, ICON_FILE_MOVIE, 0);
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
+ RNA_def_property_update(prop, NC_FILE | ND_FILELIST, NULL);
prop= RNA_def_property(srna, "filter_script", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "filter", PYSCRIPTFILE);
RNA_def_property_ui_text(prop, "Filter Script", "Show script files.");
RNA_def_property_ui_icon(prop, ICON_FILE_SCRIPT, 0);
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
+ RNA_def_property_update(prop, NC_FILE | ND_FILELIST, NULL);
prop= RNA_def_property(srna, "filter_font", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "filter", FTFONTFILE);
RNA_def_property_ui_text(prop, "Filter Fonts", "Show font files.");
RNA_def_property_ui_icon(prop, ICON_FILE_FONT, 0);
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
+ RNA_def_property_update(prop, NC_FILE | ND_FILELIST, NULL);
prop= RNA_def_property(srna, "filter_sound", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "filter", SOUNDFILE);
RNA_def_property_ui_text(prop, "Filter Sound", "Show sound files.");
RNA_def_property_ui_icon(prop, ICON_FILE_SOUND, 0);
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
+ RNA_def_property_update(prop, NC_FILE | ND_FILELIST, NULL);
prop= RNA_def_property(srna, "filter_text", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "filter", TEXTFILE);
RNA_def_property_ui_text(prop, "Filter Text", "Show text files.");
RNA_def_property_ui_icon(prop, ICON_FILE_BLANK, 0);
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
+ RNA_def_property_update(prop, NC_FILE | ND_FILELIST, NULL);
prop= RNA_def_property(srna, "filter_folder", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "filter", FOLDERFILE);
RNA_def_property_ui_text(prop, "Filter Folder", "Show folders.");
RNA_def_property_ui_icon(prop, ICON_FILE_FOLDER, 0);
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
+ RNA_def_property_update(prop, NC_FILE | ND_FILELIST, NULL);
}
@@ -1452,7 +1409,7 @@ static void rna_def_space_node(BlenderRNA *brna)
static EnumPropertyItem tree_type_items[] = {
{NTREE_SHADER, "MATERIAL", ICON_MATERIAL, "Material", "Material nodes."},
{NTREE_TEXTURE, "TEXTURE", ICON_TEXTURE, "Texture", "Texture nodes."},
- {NTREE_COMPOSIT, "COMPOSITING", ICON_RENDERLAYERS, "Compositing", "Compositing nodes."},
+ {NTREE_COMPOSIT, "COMPOSITING", ICON_RENDER_RESULT, "Compositing", "Compositing nodes."},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem texture_type_items[] = {
@@ -1469,13 +1426,13 @@ static void rna_def_space_node(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "treetype");
RNA_def_property_enum_items(prop, tree_type_items);
RNA_def_property_ui_text(prop, "Tree Type", "Node tree type to display and edit.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NODE, NULL);
+ RNA_def_property_update(prop, NC_NODE, NULL);
prop= RNA_def_property(srna, "texture_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "texfrom");
RNA_def_property_enum_items(prop, texture_type_items);
RNA_def_property_ui_text(prop, "Texture Type", "Type of data to take texture from.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NODE, NULL);
+ RNA_def_property_update(prop, NC_NODE, NULL);
prop= RNA_def_property(srna, "id", PROP_POINTER, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
@@ -1493,7 +1450,7 @@ static void rna_def_space_node(BlenderRNA *brna)
prop= RNA_def_property(srna, "backdrop", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SNODE_BACKDRAW);
RNA_def_property_ui_text(prop, "Backdrop", "Use active Viewer Node output as backdrop for compositing nodes.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NODE, NULL);
+ RNA_def_property_update(prop, NC_NODE, NULL);
}
static void rna_def_space_logic(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_test.c b/source/blender/makesrna/intern/rna_test.c
deleted file mode 100644
index 48f2fef4765..00000000000
--- a/source/blender/makesrna/intern/rna_test.c
+++ /dev/null
@@ -1,189 +0,0 @@
-/**
- * $Id$
- *
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * Contributor(s): Arystanbek Dyussenov
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-/* Defines a structure with properties used for array manipulation tests in BPY. */
-
-#include <stdlib.h>
-#include <string.h>
-
-#include "RNA_define.h"
-#include "RNA_types.h"
-
-#include "rna_internal.h"
-
-#define ARRAY_SIZE 3
-#define DYNAMIC_ARRAY_SIZE 64
-#define MULTI_ARRAY_DIM [3][4][5]
-#define MULTI_ARRAY_TOTDIM 3
-#define MULTI_ARRAY_LENGTH 3, 4, 5
-#define MULTI_ARRAY_SIZE(type) (sizeof(type MULTI_ARRAY_DIM) / sizeof(type))
-#define DYNAMIC_MULTI_ARRAY_DIM [3][4][5]
-#define DYNAMIC_MULTI_ARRAY_SIZE(type) (sizeof(type DYNAMIC_MULTI_ARRAY_DIM) / sizeof(type))
-
-#ifdef RNA_RUNTIME
-
-#ifdef UNIT_TEST
-
-#define DEF_VARS(type, prefix) \
- static type prefix ## arr[ARRAY_SIZE]; \
- static type prefix ## darr[DYNAMIC_ARRAY_SIZE]; \
- static int prefix ## darr_len= ARRAY_SIZE; \
- static type prefix ## marr MULTI_ARRAY_DIM; \
- static type prefix ## dmarr DYNAMIC_MULTI_ARRAY_DIM; \
- static int prefix ## dmarr_len= sizeof(prefix ## dmarr);
-
-#define DEF_GET_SET(type, arr) \
- void rna_Test_ ## arr ## _get(PointerRNA *ptr, type *values) \
- { \
- memcpy(values, arr, sizeof(arr)); \
- } \
- \
- void rna_Test_ ## arr ## _set(PointerRNA *ptr, const type *values) \
- { \
- memcpy(arr, values, sizeof(arr)); \
- }
-
-#define DEF_GET_SET_LEN(arr, max) \
- static int rna_Test_ ## arr ## _get_length(PointerRNA *ptr) \
- { \
- return arr ## _len; \
- }/* \
- \
- static int rna_Test_ ## arr ## _set_length(PointerRNA *ptr, int length) \
- { \
- if (length > max) \
- return 0; \
- \
- arr ## _len= length; \
- \
- return 1; \
- } \
- */
-
-DEF_VARS(float, f)
-DEF_VARS(int, i)
-DEF_VARS(int, b)
-
-DEF_GET_SET(float, farr)
-DEF_GET_SET(int, iarr)
-DEF_GET_SET(int, barr)
-
-DEF_GET_SET(float, fmarr)
-DEF_GET_SET(int, imarr)
-DEF_GET_SET(int, bmarr)
-
-DEF_GET_SET(float, fdarr)
-DEF_GET_SET_LEN(fdarr, DYNAMIC_ARRAY_SIZE)
-DEF_GET_SET(int, idarr)
-DEF_GET_SET_LEN(idarr, DYNAMIC_ARRAY_SIZE)
-DEF_GET_SET(int, bdarr)
-DEF_GET_SET_LEN(bdarr, DYNAMIC_ARRAY_SIZE)
-
-DEF_GET_SET(float, fdmarr)
-DEF_GET_SET_LEN(fdmarr, DYNAMIC_MULTI_ARRAY_SIZE(float))
-DEF_GET_SET(int, idmarr)
-DEF_GET_SET_LEN(idmarr, DYNAMIC_MULTI_ARRAY_SIZE(int))
-DEF_GET_SET(int, bdmarr)
-DEF_GET_SET_LEN(bdmarr, DYNAMIC_MULTI_ARRAY_SIZE(int))
-
-#endif
-
-#else
-
-void RNA_def_test(BlenderRNA *brna)
-{
-#ifdef UNIT_TEST
- StructRNA *srna;
- PropertyRNA *prop;
- int dimsize[]= {MULTI_ARRAY_LENGTH};
-
- srna= RNA_def_struct(brna, "Test", NULL);
- RNA_def_struct_sdna(srna, "Test");
-
- prop= RNA_def_float_array(srna, "farr", ARRAY_SIZE, NULL, 0.0f, 0.0f, "farr", "float array", 0.0f, 0.0f);
- RNA_def_property_float_funcs(prop, "rna_Test_farr_get", "rna_Test_farr_set", NULL);
-
- prop= RNA_def_int_array(srna, "iarr", ARRAY_SIZE, NULL, 0, 0, "iarr", "int array", 0, 0);
- RNA_def_property_int_funcs(prop, "rna_Test_iarr_get", "rna_Test_iarr_set", NULL);
-
- prop= RNA_def_boolean_array(srna, "barr", ARRAY_SIZE, NULL, "barr", "boolean array");
- RNA_def_property_boolean_funcs(prop, "rna_Test_barr_get", "rna_Test_barr_set");
-
- /* dynamic arrays */
-
- prop= RNA_def_float_array(srna, "fdarr", DYNAMIC_ARRAY_SIZE, NULL, 0.0f, 0.0f, "fdarr", "dynamic float array", 0.0f, 0.0f);
- RNA_def_property_flag(prop, PROP_DYNAMIC);
- RNA_def_property_dynamic_array_funcs(prop, "rna_Test_fdarr_get_length");
- RNA_def_property_float_funcs(prop, "rna_Test_fdarr_get", "rna_Test_fdarr_set", NULL);
-
- prop= RNA_def_int_array(srna, "idarr", DYNAMIC_ARRAY_SIZE, NULL, 0, 0, "idarr", "int array", 0, 0);
- RNA_def_property_flag(prop, PROP_DYNAMIC);
- RNA_def_property_dynamic_array_funcs(prop, "rna_Test_idarr_get_length");
- RNA_def_property_int_funcs(prop, "rna_Test_idarr_get", "rna_Test_idarr_set", NULL);
-
- prop= RNA_def_boolean_array(srna, "bdarr", DYNAMIC_ARRAY_SIZE, NULL, "bdarr", "boolean array");
- RNA_def_property_flag(prop, PROP_DYNAMIC);
- RNA_def_property_dynamic_array_funcs(prop, "rna_Test_bdarr_get_length");
- RNA_def_property_boolean_funcs(prop, "rna_Test_bdarr_get", "rna_Test_bdarr_set");
-
- /* multidimensional arrays */
-
- prop= RNA_def_property(srna, "fmarr", PROP_FLOAT, PROP_NONE);
- RNA_def_property_multi_array(prop, MULTI_ARRAY_TOTDIM, dimsize);
- RNA_def_property_float_funcs(prop, "rna_Test_fmarr_get", "rna_Test_fmarr_set", NULL);
-
- prop= RNA_def_property(srna, "imarr", PROP_INT, PROP_NONE);
- RNA_def_property_multi_array(prop, MULTI_ARRAY_TOTDIM, dimsize);
- RNA_def_property_int_funcs(prop, "rna_Test_imarr_get", "rna_Test_imarr_set", NULL);
-
- prop= RNA_def_property(srna, "bmarr", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_multi_array(prop, MULTI_ARRAY_TOTDIM, dimsize);
- RNA_def_property_boolean_funcs(prop, "rna_Test_bmarr_get", "rna_Test_bmarr_set");
-
- /* dynamic multidimensional arrays */
-
- prop= RNA_def_property(srna, "fdmarr", PROP_FLOAT, PROP_NONE);
- RNA_def_property_multi_array(prop, MULTI_ARRAY_TOTDIM, dimsize);
- RNA_def_property_flag(prop, PROP_DYNAMIC);
- RNA_def_property_dynamic_array_funcs(prop, "rna_Test_fdmarr_get_length");
- RNA_def_property_float_funcs(prop, "rna_Test_fdmarr_get", "rna_Test_fdmarr_set", NULL);
-
- prop= RNA_def_property(srna, "idmarr", PROP_INT, PROP_NONE);
- RNA_def_property_multi_array(prop, MULTI_ARRAY_TOTDIM, dimsize);
- RNA_def_property_flag(prop, PROP_DYNAMIC);
- RNA_def_property_dynamic_array_funcs(prop, "rna_Test_idmarr_get_length");
- RNA_def_property_int_funcs(prop, "rna_Test_idmarr_get", "rna_Test_idmarr_set", NULL);
-
- prop= RNA_def_property(srna, "bdmarr", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_multi_array(prop, MULTI_ARRAY_TOTDIM, dimsize);
- RNA_def_property_flag(prop, PROP_DYNAMIC);
- RNA_def_property_dynamic_array_funcs(prop, "rna_Test_bdmarr_get_length");
- RNA_def_property_boolean_funcs(prop, "rna_Test_bdmarr_get", "rna_Test_bdmarr_set");
-
-#endif
-}
-
-#endif /* RNA_RUNTIME */
-
-
diff --git a/source/blender/makesrna/intern/rna_texture.c b/source/blender/makesrna/intern/rna_texture.c
index f6835f3e7b5..b7403ab1178 100644
--- a/source/blender/makesrna/intern/rna_texture.c
+++ b/source/blender/makesrna/intern/rna_texture.c
@@ -86,32 +86,11 @@ StructRNA *rna_Texture_refine(struct PointerRNA *ptr)
return &RNA_VoronoiTexture;
case TEX_DISTNOISE:
return &RNA_DistortedNoiseTexture;
- case TEX_POINTDENSITY:
- return &RNA_PointDensityTexture;
- case TEX_VOXELDATA:
- return &RNA_VoxelDataTexture;
default:
return &RNA_Texture;
}
}
-static void rna_Texture_type_set(PointerRNA *ptr, int value)
-{
- Tex *tex= (Tex*)ptr->data;
-
- if (value == TEX_VOXELDATA) {
- if (tex->vd == NULL) {
- tex->vd = BKE_add_voxeldata();
- }
- } else if (value == TEX_POINTDENSITY) {
- if (tex->pd == NULL) {
- tex->pd = BKE_add_pointdensity();
- }
- }
-
- tex->type = value;
-}
-
static int rna_TextureSlot_name_length(PointerRNA *ptr)
{
MTex *mtex= ptr->data;
@@ -163,7 +142,7 @@ static EnumPropertyItem *rna_TextureSlot_output_node_itemf(bContext *C, PointerR
EnumPropertyItem *item= NULL;
int totitem= 0;
- if(tex && C) { /* Note, tex/mtex/ntree can be invalid of C is NULL, TODO - can this give valid results when C is NULL? */
+ if(tex) {
bNodeTree *ntree= tex->nodetree;
if(ntree) {
EnumPropertyItem tmp= {0, "", 0, "", ""};
@@ -374,8 +353,6 @@ static void rna_def_mtex(BlenderRNA *brna)
{MTEX_BLEND_SAT, "SATURATION", 0, "Saturation", ""},
{MTEX_BLEND_VAL, "VALUE", 0, "Value", ""},
{MTEX_BLEND_COLOR, "COLOR", 0, "Color", ""},
- {MTEX_SOFT_LIGHT, "SOFT LIGHT", 0, "Soft Light", ""},
- {MTEX_LIN_LIGHT , "LINEAR LIGHT", 0, "Linear Light", ""},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem prop_map_mode_items[] = {
@@ -1295,7 +1272,7 @@ static void rna_def_texture_distorted_noise(BlenderRNA *brna)
RNA_def_struct_ui_text(srna, "Distorted Noise", "Procedural distorted noise texture.");
RNA_def_struct_sdna(srna, "Tex");
- prop= RNA_def_property(srna, "distortion", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "distortion_amount", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "dist_amount");
RNA_def_property_range(prop, 0, 10);
RNA_def_property_ui_text(prop, "Distortion Amount", "");
@@ -1309,13 +1286,13 @@ static void rna_def_texture_distorted_noise(BlenderRNA *brna)
RNA_def_property_update(prop, NC_TEXTURE, NULL);
prop= RNA_def_property(srna, "noise_basis", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "noisebasis2");
+ RNA_def_property_enum_sdna(prop, NULL, "noisebasis");
RNA_def_property_enum_items(prop, prop_noise_basis_items);
RNA_def_property_ui_text(prop, "Noise Basis", "Sets the noise basis used for turbulence");
RNA_def_property_update(prop, NC_TEXTURE, NULL);
prop= RNA_def_property(srna, "noise_distortion", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "noisebasis");
+ RNA_def_property_enum_sdna(prop, NULL, "noisebasis2");
RNA_def_property_enum_items(prop, prop_noise_basis_items);
RNA_def_property_ui_text(prop, "Noise Distortion", "Sets the noise basis for the distortion");
RNA_def_property_update(prop, NC_TEXTURE, NULL);
@@ -1327,252 +1304,6 @@ static void rna_def_texture_distorted_noise(BlenderRNA *brna)
RNA_def_property_update(prop, NC_TEXTURE, NULL);
}
-static void rna_def_texture_pointdensity(BlenderRNA *brna)
-{
- StructRNA *srna;
- PropertyRNA *prop;
-
- static EnumPropertyItem point_source_items[] = {
- {TEX_PD_PSYS, "PARTICLE_SYSTEM", 0, "Particle System", "Generate point density from a particle system"},
- {TEX_PD_OBJECT, "OBJECT", 0, "Object Vertices", "Generate point density from an object's vertices"},
- //{TEX_PD_FILE, "FILE", 0 , "File", ""},
- {0, NULL, 0, NULL, NULL}};
-
- static EnumPropertyItem particle_cache_items[] = {
- {TEX_PD_OBJECTLOC, "OBJECT_LOCATION", 0, "Emit Object Location", ""},
- {TEX_PD_OBJECTSPACE, "OBJECT_SPACE", 0, "Emit Object Space", ""},
- {TEX_PD_WORLDSPACE, "WORLD_SPACE", 0 , "Global Space", ""},
- {0, NULL, 0, NULL, NULL}};
-
- static EnumPropertyItem vertice_cache_items[] = {
- {TEX_PD_OBJECTLOC, "OBJECT_LOCATION", 0, "Object Location", ""},
- {TEX_PD_OBJECTSPACE, "OBJECT_SPACE", 0, "Object Space", ""},
- {TEX_PD_WORLDSPACE, "WORLD_SPACE", 0 , "Global Space", ""},
- {0, NULL, 0, NULL, NULL}};
-
- static EnumPropertyItem falloff_items[] = {
- {TEX_PD_FALLOFF_STD, "STANDARD", 0, "Standard", ""},
- {TEX_PD_FALLOFF_SMOOTH, "SMOOTH", 0, "Smooth", ""},
- {TEX_PD_FALLOFF_SOFT, "SOFT", 0, "Soft", ""},
- {TEX_PD_FALLOFF_CONSTANT, "CONSTANT", 0, "Constant", "Density is constant within lookup radius"},
- {TEX_PD_FALLOFF_ROOT, "ROOT", 0, "Root", ""},
- {0, NULL, 0, NULL, NULL}};
-
- static EnumPropertyItem color_source_items[] = {
- {TEX_PD_COLOR_CONSTANT, "CONSTANT", 0, "Constant", ""},
- {TEX_PD_COLOR_PARTAGE, "PARTICLE_AGE", 0, "Particle Age", "Lifetime mapped as 0.0 - 1.0 intensity"},
- {TEX_PD_COLOR_PARTSPEED, "PARTICLE_SPEED", 0, "Particle Speed", "Particle speed (absolute magnitude of velocity) mapped as 0.0-1.0 intensity"},
- {TEX_PD_COLOR_PARTVEL, "PARTICLE_VELOCITY", 0, "Particle Velocity", "XYZ velocity mapped to RGB colors"},
- {0, NULL, 0, NULL, NULL}};
-
- static EnumPropertyItem turbulence_influence_items[] = {
- {TEX_PD_NOISE_STATIC, "STATIC", 0, "Static", "Noise patterns will remain unchanged, faster and suitable for stills"},
- {TEX_PD_NOISE_VEL, "PARTICLE_VELOCITY", 0, "Particle Velocity", "Turbulent noise driven by particle velocity"},
- {TEX_PD_NOISE_AGE, "PARTICLE_AGE", 0, "Particle Age", "Turbulent noise driven by the particle's age between birth and death"},
- {TEX_PD_NOISE_TIME, "GLOBAL_TIME", 0, "Global Time", "Turbulent noise driven by the global current frame"},
- {0, NULL, 0, NULL, NULL}};
-
- srna= RNA_def_struct(brna, "PointDensity", NULL);
- RNA_def_struct_sdna(srna, "PointDensity");
- RNA_def_struct_ui_text(srna, "PointDensity", "Point density settings.");
-
- prop= RNA_def_property(srna, "point_source", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "source");
- RNA_def_property_enum_items(prop, point_source_items);
- RNA_def_property_ui_text(prop, "Point Source", "Point data to use as renderable point density");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
- RNA_def_property_pointer_sdna(prop, NULL, "object");
- RNA_def_property_ui_text(prop, "Object", "Object to take point data from");
- RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop= RNA_def_property(srna, "particle_system", PROP_POINTER, PROP_NONE);
- RNA_def_property_pointer_sdna(prop, NULL, "psys");
- RNA_def_property_ui_text(prop, "Particle System", "Particle System to render as points");
- RNA_def_property_struct_type(prop, "ParticleSystem");
- RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop= RNA_def_property(srna, "particle_cache", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "psys_cache_space");
- RNA_def_property_enum_items(prop, particle_cache_items);
- RNA_def_property_ui_text(prop, "Particle Cache", "Co-ordinate system to cache particles in");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop= RNA_def_property(srna, "vertices_cache", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "ob_cache_space");
- RNA_def_property_enum_items(prop, vertice_cache_items);
- RNA_def_property_ui_text(prop, "Vertices Cache", "Co-ordinate system to cache vertices in");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop= RNA_def_property(srna, "radius", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "radius");
- RNA_def_property_range(prop, 0.01, FLT_MAX);
- RNA_def_property_ui_text(prop, "Radius", "Radius from the shaded sample to look for points within");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop= RNA_def_property(srna, "falloff", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "falloff_type");
- RNA_def_property_enum_items(prop, falloff_items);
- RNA_def_property_ui_text(prop, "Falloff", "Method of attenuating density by distance from the point");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop= RNA_def_property(srna, "falloff_softness", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "falloff_softness");
- RNA_def_property_range(prop, 0.01, FLT_MAX);
- RNA_def_property_ui_text(prop, "Softness", "Softness of the 'soft' falloff option");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop= RNA_def_property(srna, "color_source", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "color_source");
- RNA_def_property_enum_items(prop, color_source_items);
- RNA_def_property_ui_text(prop, "Color Source", "Data to derive color results from");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop= RNA_def_property(srna, "speed_scale", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "speed_scale");
- RNA_def_property_range(prop, 0.001, 100.0);
- RNA_def_property_ui_text(prop, "Scale", "Multipler to bring particle speed within an acceptable range");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop= RNA_def_property(srna, "color_ramp", PROP_POINTER, PROP_NEVER_NULL);
- RNA_def_property_pointer_sdna(prop, NULL, "coba");
- RNA_def_property_struct_type(prop, "ColorRamp");
- RNA_def_property_ui_text(prop, "Color Ramp", "");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- /* Turbulence */
- prop= RNA_def_property(srna, "turbulence", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", TEX_PD_TURBULENCE);
- RNA_def_property_ui_text(prop, "Turbulence", "Add directed noise to the density at render-time");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop= RNA_def_property(srna, "turbulence_size", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "noise_size");
- RNA_def_property_range(prop, 0.01, FLT_MAX);
- RNA_def_property_ui_text(prop, "Size", "Scale of the added turbulent noise");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop= RNA_def_property(srna, "turbulence_strength", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "noise_fac");
- RNA_def_property_range(prop, 0.01, FLT_MAX);
- RNA_def_property_ui_text(prop, "Strength", "");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop= RNA_def_property(srna, "turbulence_depth", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "noise_depth");
- RNA_def_property_range(prop, 0, INT_MAX);
- RNA_def_property_ui_text(prop, "Depth", "Level of detail in the added turbulent noise");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop= RNA_def_property(srna, "turbulence_influence", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "noise_influence");
- RNA_def_property_enum_items(prop, turbulence_influence_items);
- RNA_def_property_ui_text(prop, "Turbulence Influence", "Method for driving added turbulent noise");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop= RNA_def_property(srna, "noise_basis", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "noise_basis");
- RNA_def_property_enum_items(prop, prop_noise_basis_items);
- RNA_def_property_ui_text(prop, "Noise Basis", "Noise formula used for tubulence");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
-
- srna= RNA_def_struct(brna, "PointDensityTexture", "Texture");
- RNA_def_struct_sdna(srna, "Tex");
- RNA_def_struct_ui_text(srna, "Point Density", "Settings for the Point Density texture");
-
- prop= RNA_def_property(srna, "pointdensity", PROP_POINTER, PROP_NONE);
- RNA_def_property_pointer_sdna(prop, NULL, "pd");
- RNA_def_property_struct_type(prop, "PointDensity");
- RNA_def_property_ui_text(prop, "Point Density", "The point density settings associated with this texture");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-}
-
-static void rna_def_texture_voxeldata(BlenderRNA *brna)
-{
- StructRNA *srna;
- PropertyRNA *prop;
-
- static EnumPropertyItem interpolation_type_items[] = {
- {TEX_VD_NEARESTNEIGHBOR, "NEREASTNEIGHBOR", 0, "Nearest Neighbor", "No interpolation, fast but blocky and low quality."},
- {TEX_VD_LINEAR, "TRILINEAR", 0, "Linear", "Good smoothness and speed"},
- {TEX_VD_QUADRATIC, "QUADRATIC", 0, "Quadratic", "Mid-range quality and speed"},
- {TEX_VD_TRICUBIC_CATROM, "TRICUBIC_CATROM", 0, "Cubic Catmull-Rom", "High quality interpolation, but slower"},
- {TEX_VD_TRICUBIC_BSPLINE, "TRICUBIC_BSPLINE", 0, "Cubic B-Spline", "Smoothed high quality interpolation, but slower"},
- {0, NULL, 0, NULL, NULL}};
-
- static EnumPropertyItem file_format_items[] = {
- {TEX_VD_BLENDERVOXEL, "BLENDER_VOXEL", 0, "Blender Voxel", "Default binary voxel file format"},
- {TEX_VD_RAW_8BIT, "RAW_8BIT", 0, "8 bit RAW", "8 bit greyscale binary data"},
- //{TEX_VD_RAW_16BIT, "RAW_16BIT", 0, "16 bit RAW", ""},
- {TEX_VD_IMAGE_SEQUENCE, "IMAGE_SEQUENCE", 0, "Image Sequence", "Generate voxels from a sequence of image slices"},
- {TEX_VD_SMOKE, "SMOKE", 0, "Smoke", "Render voxels from a Blender smoke simulation"},
- {0, NULL, 0, NULL, NULL}};
-
- srna= RNA_def_struct(brna, "VoxelData", NULL);
- RNA_def_struct_sdna(srna, "VoxelData");
- RNA_def_struct_ui_text(srna, "VoxelData", "Voxel data settings.");
-
- prop= RNA_def_property(srna, "interpolation", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "interp_type");
- RNA_def_property_enum_items(prop, interpolation_type_items);
- RNA_def_property_ui_text(prop, "Interpolation", "Method to interpolate/smooth values between voxel cells");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop= RNA_def_property(srna, "intensity", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "int_multiplier");
- RNA_def_property_range(prop, 0.01, FLT_MAX);
- RNA_def_property_ui_text(prop, "Intensity", "Multiplier for intensity values");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop= RNA_def_property(srna, "file_format", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "file_format");
- RNA_def_property_enum_items(prop, file_format_items);
- RNA_def_property_ui_text(prop, "File Format", "Format of the source data set to render ");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop= RNA_def_property(srna, "source_path", PROP_STRING, PROP_FILEPATH);
- RNA_def_property_string_sdna(prop, NULL, "source_path");
- RNA_def_property_ui_text(prop, "Source Path", "The external source data file to use");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop= RNA_def_property(srna, "resolution", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "resol");
- RNA_def_property_ui_text(prop, "Resolution", "Resolution of the voxel grid.");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop= RNA_def_property(srna, "still", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", TEX_VD_STILL);
- RNA_def_property_ui_text(prop, "Still Frame Only", "Always render a still frame from the voxel data sequence");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop= RNA_def_property(srna, "still_frame_number", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "still_frame");
- RNA_def_property_range(prop, 0, INT_MAX);
- RNA_def_property_ui_text(prop, "Still Frame Number", "The frame number to always use");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop= RNA_def_property(srna, "domain_object", PROP_POINTER, PROP_NONE);
- RNA_def_property_pointer_sdna(prop, NULL, "object");
- RNA_def_property_ui_text(prop, "Domain Object", "Object used as the smoke simulation domain");
- RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
-
- srna= RNA_def_struct(brna, "VoxelDataTexture", "Texture");
- RNA_def_struct_sdna(srna, "Tex");
- RNA_def_struct_ui_text(srna, "Voxel Data", "Settings for the Voxel Data texture");
-
- prop= RNA_def_property(srna, "voxeldata", PROP_POINTER, PROP_NONE);
- RNA_def_property_pointer_sdna(prop, NULL, "vd");
- RNA_def_property_struct_type(prop, "VoxelData");
- RNA_def_property_ui_text(prop, "Voxel Data", "The voxel data associated with this texture");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-}
-
static void rna_def_texture(BlenderRNA *brna)
{
StructRNA *srna;
@@ -1593,8 +1324,6 @@ static void rna_def_texture(BlenderRNA *brna)
{TEX_MUSGRAVE, "MUSGRAVE", ICON_TEXTURE, "Musgrave", ""},
{TEX_VORONOI, "VORONOI", ICON_TEXTURE, "Voronoi", ""},
{TEX_DISTNOISE, "DISTORTED_NOISE", ICON_TEXTURE, "Distorted Noise", ""},
- {TEX_POINTDENSITY, "POINT_DENSITY", ICON_TEXTURE, "Point Density", ""},
- {TEX_VOXELDATA, "VOXEL_DATA", ICON_TEXTURE, "Voxel Data", ""},
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "Texture", "ID");
@@ -1607,7 +1336,6 @@ static void rna_def_texture(BlenderRNA *brna)
//RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_enum_sdna(prop, NULL, "type");
RNA_def_property_enum_items(prop, prop_type_items);
- RNA_def_property_enum_funcs(prop, NULL, "rna_Texture_type_set", NULL);
RNA_def_property_ui_text(prop, "Type", "");
RNA_def_property_update(prop, NC_TEXTURE, NULL);
@@ -1671,8 +1399,6 @@ static void rna_def_texture(BlenderRNA *brna)
rna_def_texture_musgrave(brna);
rna_def_texture_voronoi(brna);
rna_def_texture_distorted_noise(brna);
- rna_def_texture_pointdensity(brna);
- rna_def_texture_voxeldata(brna);
/* XXX add more types here .. */
}
diff --git a/source/blender/makesrna/intern/rna_ui_api.c b/source/blender/makesrna/intern/rna_ui_api.c
index 40d25a2a30a..82694098e69 100644
--- a/source/blender/makesrna/intern/rna_ui_api.c
+++ b/source/blender/makesrna/intern/rna_ui_api.c
@@ -1,5 +1,5 @@
/**
- * $Id$
+ * $Id:
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
@@ -37,23 +37,6 @@
#ifdef RNA_RUNTIME
-static void rna_uiItemR(uiLayout *layout, char *name, int icon, PointerRNA *ptr, char *propname, int expand, int slider, int toggle)
-{
- int flag= 0;
-
- flag |= (slider)? UI_ITEM_R_SLIDER: 0;
- flag |= (expand)? UI_ITEM_R_EXPAND: 0;
- flag |= (toggle)? UI_ITEM_R_TOGGLE: 0;
-
- uiItemR(layout, name, icon, ptr, propname, flag);
-}
-
-static PointerRNA rna_uiItemO(uiLayout *layout, char *name, int icon, char *opname, int properties)
-{
- int flag= (properties)? UI_ITEM_O_RETURN_PROPS: 0;
- return uiItemFullO(layout, name, icon, opname, NULL, uiLayoutGetOperatorContext(layout), flag);
-}
-
#else
#define DEF_ICON(name) {name, #name, 0, #name, ""},
@@ -139,7 +122,7 @@ void RNA_api_ui_layout(StructRNA *srna)
RNA_def_float(func, "percentage", 0.0f, 0.0f, 1.0f, "Percentage", "Percentage of width to split at.", 0.0f, 1.0f);
/* items */
- func= RNA_def_function(srna, "itemR", "rna_uiItemR");
+ func= RNA_def_function(srna, "itemR", "uiItemR");
api_ui_item_common(func);
api_ui_item_rna_common(func);
RNA_def_boolean(func, "expand", 0, "", "Expand button to show more detail.");
@@ -167,12 +150,8 @@ void RNA_api_ui_layout(StructRNA *srna)
parm= RNA_def_string(func, "search_property", "", 0, "", "Identifier of search collection property.");
RNA_def_property_flag(parm, PROP_REQUIRED);
- func= RNA_def_function(srna, "itemO", "rna_uiItemO");
+ func= RNA_def_function(srna, "itemO", "uiItemO");
api_ui_item_op_common(func);
- parm= RNA_def_boolean(func, "properties", 0, "Properties", "Return operator properties to fill in manually.");
- parm= RNA_def_pointer(func, "return_properties", "OperatorProperties", "", "Operator properties to fill in, return when 'properties' is set to true.");
- RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR);
- RNA_def_function_return(func, parm);
func= RNA_def_function(srna, "item_enumO", "uiItemEnumO_string");
api_ui_item_op_common(func);
@@ -247,7 +226,6 @@ void RNA_api_ui_layout(StructRNA *srna)
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
api_ui_item_rna_common(func);
RNA_def_string(func, "new", "", 0, "", "Operator identifier to create a new ID block.");
- RNA_def_string(func, "open", "", 0, "", "Operator identifier to open a file for creating a new ID block.");
RNA_def_string(func, "unlink", "", 0, "", "Operator identifier to unlink the ID block.");
func= RNA_def_function(srna, "template_modifier", "uiTemplateModifier");
@@ -312,6 +290,12 @@ void RNA_api_ui_layout(StructRNA *srna)
func= RNA_def_function(srna, "template_header_3D", "uiTemplateHeader3D");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
+ func= RNA_def_function(srna, "view3d_select_metaballmenu", "uiTemplate_view3d_select_metaballmenu");
+ RNA_def_function_flag(func, FUNC_USE_CONTEXT);
+ func= RNA_def_function(srna, "view3d_select_armaturemenu", "uiTemplate_view3d_select_armaturemenu");
+ RNA_def_function_flag(func, FUNC_USE_CONTEXT);
+ func= RNA_def_function(srna, "view3d_select_posemenu", "uiTemplate_view3d_select_posemenu");
+ RNA_def_function_flag(func, FUNC_USE_CONTEXT);
func= RNA_def_function(srna, "view3d_select_faceselmenu", "uiTemplate_view3d_select_faceselmenu");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index ffc3f1696fc..d1245528100 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -33,7 +33,6 @@
#include "DNA_space_types.h"
#include "DNA_userdef_types.h"
-#include "WM_api.h"
#include "WM_types.h"
#include "BKE_utildefines.h"
@@ -42,12 +41,7 @@
#ifdef RNA_RUNTIME
-static void rna_userdef_update(bContext *C, PointerRNA *ptr)
-{
- WM_event_add_notifier(C, NC_WINDOW, NULL);
-}
-
-static void rna_userdef_lmb_select_set(PointerRNA *ptr,int value)
+static void rna_userdef_lmb_select_set(struct PointerRNA *ptr,int value)
{
UserDef *userdef = (UserDef*)ptr->data;
@@ -59,12 +53,12 @@ static void rna_userdef_lmb_select_set(PointerRNA *ptr,int value)
userdef->flag &= ~USER_LMOUSESELECT;
}
-static void rna_userdef_rmb_select_set(PointerRNA *ptr,int value)
+static void rna_userdef_rmb_select_set(struct PointerRNA *ptr,int value)
{
rna_userdef_lmb_select_set(ptr, !value);
}
-static void rna_userdef_emulate_set(PointerRNA *ptr,int value)
+static void rna_userdef_emulate_set(struct PointerRNA *ptr,int value)
{
UserDef *userdef = (UserDef*)ptr->data;
@@ -74,7 +68,7 @@ static void rna_userdef_emulate_set(PointerRNA *ptr,int value)
userdef->flag ^= USER_TWOBUTTONMOUSE;
}
-static int rna_userdef_autokeymode_get(PointerRNA *ptr)
+static int rna_userdef_autokeymode_get(struct PointerRNA *ptr)
{
UserDef *userdef = (UserDef*)ptr->data;
short retval = userdef->autokey_mode;
@@ -85,7 +79,7 @@ static int rna_userdef_autokeymode_get(PointerRNA *ptr)
return retval;
}
-static void rna_userdef_autokeymode_set(PointerRNA *ptr,int value)
+static void rna_userdef_autokeymode_set(struct PointerRNA *ptr,int value)
{
UserDef *userdef = (UserDef*)ptr->data;
@@ -148,38 +142,38 @@ static void rna_def_userdef_theme_ui_font_style(BlenderRNA *brna)
prop= RNA_def_property(srna, "points", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 6, 48);
RNA_def_property_ui_text(prop, "Points", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "font_kerning_style", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "kerning");
RNA_def_property_enum_items(prop, font_kerning_style);
RNA_def_property_ui_text(prop, "Kerning Style", "Which style to use for font kerning.");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "shadow", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 0, 5);
RNA_def_property_ui_text(prop, "Shadow Size", "Shadow size in pixels (0, 3 and 5 supported)");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "shadx", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, -10, 10);
RNA_def_property_ui_text(prop, "Shadow X Offset", "Shadow offset in pixels");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "shady", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, -10, 10);
RNA_def_property_ui_text(prop, "Shadow Y Offset", "Shadow offset in pixels");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "shadowalpha", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Shadow Alpha", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "shadowcolor", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Shadow Brightness", "Shadow color in grey value");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
}
static void rna_def_userdef_theme_ui_style(BlenderRNA *brna)
@@ -201,25 +195,25 @@ static void rna_def_userdef_theme_ui_style(BlenderRNA *brna)
RNA_def_property_pointer_sdna(prop, NULL, "paneltitle");
RNA_def_property_struct_type(prop, "ThemeFontStyle");
RNA_def_property_ui_text(prop, "Panel Font", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "grouplabel", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "grouplabel");
RNA_def_property_struct_type(prop, "ThemeFontStyle");
RNA_def_property_ui_text(prop, "Group Label Font", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "widgetlabel", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "widgetlabel");
RNA_def_property_struct_type(prop, "ThemeFontStyle");
RNA_def_property_ui_text(prop, "Widget Label Font", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "widget", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "widget");
RNA_def_property_struct_type(prop, "ThemeFontStyle");
RNA_def_property_ui_text(prop, "Widget Font", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
}
@@ -235,47 +229,47 @@ static void rna_def_userdef_theme_ui_wcol(BlenderRNA *brna)
prop= RNA_def_property(srna, "outline", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Outline", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "inner", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 4);
RNA_def_property_ui_text(prop, "Inner", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "inner_sel", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 4);
RNA_def_property_ui_text(prop, "Inner Selected", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "item", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 4);
RNA_def_property_ui_text(prop, "Item", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "text", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Text", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "text_sel", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Text Selected", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "shaded", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "shaded", 1);
RNA_def_property_ui_text(prop, "Shaded", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "shadetop", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, -100, 100);
RNA_def_property_ui_text(prop, "Shade Top", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "shadedown", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, -100, 100);
RNA_def_property_ui_text(prop, "Shade Down", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
}
static void rna_def_userdef_theme_ui_wcol_state(BlenderRNA *brna)
@@ -290,36 +284,36 @@ static void rna_def_userdef_theme_ui_wcol_state(BlenderRNA *brna)
prop= RNA_def_property(srna, "inner_anim", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Animated", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "inner_anim_sel", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Animated Selected", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "inner_key", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Keyframe", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "inner_key_sel", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Keyframe Selected", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "inner_driven", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Driven", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "inner_driven_sel", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Driven Selected", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "blend", PROP_FLOAT, PROP_PERCENTAGE);
RNA_def_property_ui_text(prop, "Blend", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
}
static void rna_def_userdef_theme_ui(BlenderRNA *brna)
@@ -338,102 +332,102 @@ static void rna_def_userdef_theme_ui(BlenderRNA *brna)
RNA_def_property_pointer_sdna(prop, NULL, "wcol_regular");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "Regular Widget Colors", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "wcol_tool", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_tool");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "Tool Widget Colors", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "wcol_radio", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_radio");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "Radio Widget Colors", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "wcol_text", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_text");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "Text Widget Colors", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "wcol_option", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_option");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "Option Widget Colors", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "wcol_toggle", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_toggle");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "Toggle Widget Colors", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "wcol_num", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_num");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "Number Widget Colors", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "wcol_numslider", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_numslider");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "Slider Widget Colors", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "wcol_box", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_box");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "Box Backdrop Colors", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "wcol_menu", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_menu");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "Menu Widget Colors", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "wcol_pulldown", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_pulldown");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "Pulldown Widget Colors", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "wcol_menu_back", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_menu_back");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "Menu Backdrop Colors", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "wcol_menu_item", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_menu_item");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "Menu Item Colors", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "wcol_scroll", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_scroll");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "Scroll Widget Colors", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "wcol_list_item", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_list_item");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "List Item Colors", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "wcol_state", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_state");
RNA_def_property_struct_type(prop, "ThemeWidgetStateColors");
RNA_def_property_ui_text(prop, "State Colors", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "icon_file", PROP_STRING, PROP_FILEPATH);
RNA_def_property_string_sdna(prop, NULL, "iconfile");
RNA_def_property_ui_text(prop, "Icon File", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
}
static void rna_def_userdef_theme_spaces_main(StructRNA *srna, int spacetype)
@@ -444,60 +438,60 @@ static void rna_def_userdef_theme_spaces_main(StructRNA *srna, int spacetype)
prop= RNA_def_property(srna, "back", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Window Back", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "title", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Window Title", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "text", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Window Text", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "text_hi", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Window Text Highlight", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
/* header */
prop= RNA_def_property(srna, "header", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Header", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "header_text", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Header Text", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "header_text_hi", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Header Text Highlight", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
/* buttons */
if(! ELEM(spacetype, SPACE_BUTS, SPACE_OUTLINER)) {
prop= RNA_def_property(srna, "button", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Button Back", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "button_title", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Button Title", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "button_text", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Button Text", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "button_text_hi", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Button Text Highlight", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
}
/* list/channels */
@@ -505,22 +499,22 @@ static void rna_def_userdef_theme_spaces_main(StructRNA *srna, int spacetype)
prop= RNA_def_property(srna, "list", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "List Back", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "list_title", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "List Title", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "list_text", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "List Text", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "list_text_hi", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "List Text Highlight", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
}
}
@@ -531,17 +525,17 @@ static void rna_def_userdef_theme_spaces_vertex(StructRNA *srna)
prop= RNA_def_property(srna, "vertex", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Vertex", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "vertex_select", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Vertex Select", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "vertex_size", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 1, 10);
RNA_def_property_ui_text(prop, "Vertex Size", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
}
static void rna_def_userdef_theme_spaces_edge(StructRNA *srna)
@@ -551,22 +545,22 @@ static void rna_def_userdef_theme_spaces_edge(StructRNA *srna)
prop= RNA_def_property(srna, "edge_select", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "edge Select", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "edge_seam", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Edge Seam", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "edge_sharp", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Edge Sharp", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "edge_facesel", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Edge UV Face Select", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
}
static void rna_def_userdef_theme_spaces_face(StructRNA *srna)
@@ -576,22 +570,22 @@ static void rna_def_userdef_theme_spaces_face(StructRNA *srna)
prop= RNA_def_property(srna, "face", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 4);
RNA_def_property_ui_text(prop, "Face", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "face_select", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 4);
RNA_def_property_ui_text(prop, "Face Selected", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "face_dot", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Face Dot Selected", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "facedot_size", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 1, 10);
RNA_def_property_ui_text(prop, "Face Dot Size", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
}
static void rna_def_userdef_theme_space_view3d(BlenderRNA *brna)
@@ -610,51 +604,51 @@ static void rna_def_userdef_theme_space_view3d(BlenderRNA *brna)
prop= RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Grid", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "panel", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 4);
RNA_def_property_ui_text(prop, "Panel", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "wire", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Wire", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "lamp", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 4);
RNA_def_property_ui_text(prop, "Lamp", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "object_selected", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "select");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Object Selected", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "object_active", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "active");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Active Object", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "object_grouped", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "group");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Object Grouped", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "object_grouped_active", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "group_active");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Object Grouped Active", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "transform", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Transform", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
rna_def_userdef_theme_spaces_vertex(srna);
rna_def_userdef_theme_spaces_edge(srna);
@@ -663,28 +657,28 @@ static void rna_def_userdef_theme_space_view3d(BlenderRNA *brna)
prop= RNA_def_property(srna, "editmesh_active", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 4);
RNA_def_property_ui_text(prop, "Active Vert/Edge/Face", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "normal", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Normal", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "bone_solid", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Bone Solid", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "bone_pose", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Bone Pose", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "current_frame", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "cframe");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Current Frame", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
}
static void rna_def_userdef_theme_space_graph(BlenderRNA *brna)
@@ -703,24 +697,24 @@ static void rna_def_userdef_theme_space_graph(BlenderRNA *brna)
prop= RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Grid", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "panel", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Panel", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "window_sliders", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "shade1");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Window Sliders", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "channels_region", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "shade2");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Channels Region", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
rna_def_userdef_theme_spaces_vertex(srna);
@@ -728,46 +722,46 @@ static void rna_def_userdef_theme_space_graph(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "cframe");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Current Frame", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "handle_vertex", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Handle Vertex", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "handle_vertex_select", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Handle Vertex Select", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "handle_vertex_size", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 0, 255);
RNA_def_property_ui_text(prop, "Handle Vertex Size", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "channel_group", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "group");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Channel Group", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "active_channels_group", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "group_active");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Active Channel Group", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "dopesheet_channel", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "ds_channel");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "DopeSheet Channel", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "dopesheet_subchannel", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "ds_subchannel");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "DopeSheet Sub-Channel", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
}
static void rna_def_userdef_theme_space_file(BlenderRNA *brna)
@@ -787,37 +781,37 @@ static void rna_def_userdef_theme_space_file(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "hilite");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Selected File", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "tiles", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "panel");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Tiles", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "scrollbar", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "shade1");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Scrollbar", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "scroll_handle", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "shade2");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Scroll Handle", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "active_file", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "active");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Active File", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "active_file_text", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "grid");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Active File Text", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
}
static void rna_def_userdef_theme_space_outliner(BlenderRNA *brna)
@@ -877,55 +871,55 @@ static void rna_def_userdef_theme_space_text(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "grid");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Line Numbers Background", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "scroll_bar", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "shade1");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Scroll Bar", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "selected_text", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "shade2");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Selected Text", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "cursor", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "hilite");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Cursor", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "syntax_builtin", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "syntaxb");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Syntax Builtin", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "syntax_special", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "syntaxv");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Syntax Special", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "syntax_comment", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "syntaxc");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Syntax Comment", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "syntax_string", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "syntaxl");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Syntax String", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "syntax_numbers", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "syntaxn");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Syntax Numbers", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
}
static void rna_def_userdef_theme_space_node(BlenderRNA *brna)
@@ -945,49 +939,49 @@ static void rna_def_userdef_theme_space_node(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "wire");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Wires", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "wire_select", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "edge_select");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Wire Select", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "selected_text", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "shade2");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Selected Text", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "node_backdrop", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "syntaxl");
RNA_def_property_array(prop, 4);
RNA_def_property_ui_text(prop, "Node Backdrop", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "in_out_node", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "syntaxn");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "In/Out Node", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "converter_node", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "syntaxv");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Converter Node", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "operator_node", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "syntaxb");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Operator Node", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "group_node", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "syntaxc");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Group Node", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
}
static void rna_def_userdef_theme_space_logic(BlenderRNA *brna)
@@ -1006,7 +1000,7 @@ static void rna_def_userdef_theme_space_logic(BlenderRNA *brna)
prop= RNA_def_property(srna, "panel", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Panel", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
}
@@ -1026,7 +1020,7 @@ static void rna_def_userdef_theme_space_buts(BlenderRNA *brna)
prop= RNA_def_property(srna, "panel", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Panel", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
}
static void rna_def_userdef_theme_space_time(BlenderRNA *brna)
@@ -1045,13 +1039,13 @@ static void rna_def_userdef_theme_space_time(BlenderRNA *brna)
prop= RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Grid", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "current_frame", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "cframe");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Current Frame", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
}
static void rna_def_userdef_theme_space_sound(BlenderRNA *brna)
@@ -1070,19 +1064,19 @@ static void rna_def_userdef_theme_space_sound(BlenderRNA *brna)
prop= RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Grid", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "window_sliders", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "shade1");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Window Sliders", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "current_frame", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "cframe");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Current Frame", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
}
static void rna_def_userdef_theme_space_image(BlenderRNA *brna)
@@ -1103,7 +1097,7 @@ static void rna_def_userdef_theme_space_image(BlenderRNA *brna)
prop= RNA_def_property(srna, "editmesh_active", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 4);
RNA_def_property_ui_text(prop, "Active Vert/Edge/Face", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
}
static void rna_def_userdef_theme_space_seq(BlenderRNA *brna)
@@ -1120,79 +1114,79 @@ static void rna_def_userdef_theme_space_seq(BlenderRNA *brna)
prop= RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Grid", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "window_sliders", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "shade1");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Window Sliders", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "movie_strip", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "movie");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Movie Strip", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "image_strip", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "image");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Image Strip", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "scene_strip", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "scene");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Scene Strip", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "audio_strip", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "audio");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Audio Strip", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "effect_strip", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "effect");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Effect Strip", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "plugin_strip", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "plugin");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Plugin Strip", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "transition_strip", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "transition");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Transition Strip", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "meta_strip", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "meta");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Meta Strip", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "current_frame", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "cframe");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Current Frame", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "keyframe", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "vertex_select");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Keyframe", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "draw_action", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "bone_pose");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Draw Action", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
}
static void rna_def_userdef_theme_space_action(BlenderRNA *brna)
@@ -1211,73 +1205,73 @@ static void rna_def_userdef_theme_space_action(BlenderRNA *brna)
prop= RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Grid", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "value_sliders", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "face");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Value Sliders", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "view_sliders", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "shade1");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "View Sliders", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "channels", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "shade2");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Channels", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "channels_selected", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "hilite");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Channels Selected", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "channel_group", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "group");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Channel Group", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "active_channels_group", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "group_active");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Active Channel Group", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "long_key", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "strip");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Long Key", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "long_key_selected", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "strip_select");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Long Key Selected", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "current_frame", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "cframe");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Current Frame", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "dopesheet_channel", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "ds_channel");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "DopeSheet Channel", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "dopesheet_subchannel", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "ds_subchannel");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "DopeSheet Sub-Channel", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
}
static void rna_def_userdef_theme_space_nla(BlenderRNA *brna)
@@ -1296,43 +1290,43 @@ static void rna_def_userdef_theme_space_nla(BlenderRNA *brna)
prop= RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Grid", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "view_sliders", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "shade1");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "View Sliders", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "bars", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "shade2");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Bars", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "bars_selected", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "hilite");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Bars Selected", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "strips", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "strip");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "strips", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "strips_selected", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "strip_select");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Strips Selected", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "current_frame", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "cframe");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Current Frame", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
}
static void rna_def_userdef_theme_colorset(BlenderRNA *brna)
@@ -1348,23 +1342,23 @@ static void rna_def_userdef_theme_colorset(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "solid");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Normal", "Color used for the surface of bones.");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "selected", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "select");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Selected", "Color used for selected bones.");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "active", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Active", "Color used for active bones.");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "colored_constraints", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", TH_WIRECOLOR_CONSTCOLS);
RNA_def_property_ui_text(prop, "Colored Constraints", "Allow the use of colors indicating constraints/keyed status.");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
}
static void rna_def_userdef_themes(BlenderRNA *brna)
@@ -1553,27 +1547,27 @@ static void rna_def_userdef_view(BlenderRNA *brna)
prop= RNA_def_property(srna, "display_object_info", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_DRAWVIEWINFO);
RNA_def_property_ui_text(prop, "Display Object Info", "Display objects name and frame number in 3d view.");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "global_scene", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_SCENEGLOBAL);
RNA_def_property_ui_text(prop, "Global Scene", "Forces the current Scene to be displayed in all Screens.");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "use_large_cursors", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "curssize", 0);
RNA_def_property_ui_text(prop, "Large Cursors", "Use large mouse cursors when available.");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "show_view_name", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_SHOW_VIEWPORTNAME);
RNA_def_property_ui_text(prop, "Show View Name", "Show the name of the view's direction in each 3D View.");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "show_playback_fps", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_SHOW_FPS);
RNA_def_property_ui_text(prop, "Show Playback FPS", "Show the frames per second screen refresh rate, while animation is played back.");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
/* menus */
prop= RNA_def_property(srna, "open_mouse_over", PROP_BOOLEAN, PROP_NONE);
@@ -1668,19 +1662,16 @@ static void rna_def_userdef_view(BlenderRNA *brna)
prop= RNA_def_property(srna, "show_mini_axis", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_SHOW_ROTVIEWICON);
RNA_def_property_ui_text(prop, "Show Mini Axis", "Show a small rotating 3D axis in the bottom left corner of the 3D View.");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "mini_axis_size", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "rvisize");
RNA_def_property_range(prop, 10, 64);
RNA_def_property_ui_text(prop, "Mini Axis Size", "The axis icon's size.");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "mini_axis_brightness", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "rvibright");
RNA_def_property_range(prop, 0, 10);
RNA_def_property_ui_text(prop, "Mini Axis Brightness", "The brightness of the icon.");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
/* middle mouse button */
prop= RNA_def_property(srna, "middle_mouse_rotate", PROP_BOOLEAN, PROP_NONE);
@@ -1714,19 +1705,16 @@ static void rna_def_userdef_view(BlenderRNA *brna)
prop= RNA_def_property(srna, "use_manipulator", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "tw_flag", 1);
RNA_def_property_ui_text(prop, "Manipulator", "Use 3d transform manipulator.");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "manipulator_size", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "tw_size");
RNA_def_property_range(prop, 2, 40);
RNA_def_property_ui_text(prop, "Manipulator Size", "Diameter of widget, in 10 pixel units.");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "manipulator_handle_size", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "tw_handlesize");
RNA_def_property_range(prop, 2, 40);
RNA_def_property_ui_text(prop, "Manipulator Handle Size", "Size of widget handles as percentage of widget radius.");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "manipulator_hotspot", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "tw_hotspot");
@@ -1737,7 +1725,6 @@ static void rna_def_userdef_view(BlenderRNA *brna)
RNA_def_property_int_sdna(prop, NULL, "obcenter_dia");
RNA_def_property_range(prop, 4, 10);
RNA_def_property_ui_text(prop, "Object Center Size", "Diameter in Pixels for Object/Lamp center display.");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "ndof_pan_speed", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "ndof_pan");
@@ -1870,51 +1857,47 @@ static void rna_def_userdef_edit(BlenderRNA *brna)
prop= RNA_def_property(srna, "duplicate_mesh", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_MESH);
- RNA_def_property_ui_text(prop, "Duplicate Mesh", "Causes mesh data to be duplicated with the object.");
+ RNA_def_property_ui_text(prop, "Duplicate Mesh", "Causes mesh data to be duplicated with Shift+D.");
prop= RNA_def_property(srna, "duplicate_surface", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_SURF);
- RNA_def_property_ui_text(prop, "Duplicate Surface", "Causes surface data to be duplicated with the object.");
+ RNA_def_property_ui_text(prop, "Duplicate Surface", "Causes surface data to be duplicated with Shift+D.");
prop= RNA_def_property(srna, "duplicate_curve", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_CURVE);
- RNA_def_property_ui_text(prop, "Duplicate Curve", "Causes curve data to be duplicated with the object.");
+ RNA_def_property_ui_text(prop, "Duplicate Curve", "Causes curve data to be duplicated with Shift+D.");
prop= RNA_def_property(srna, "duplicate_text", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_FONT);
- RNA_def_property_ui_text(prop, "Duplicate Text", "Causes text data to be duplicated with the object.");
+ RNA_def_property_ui_text(prop, "Duplicate Text", "Causes text data to be duplicated with Shift+D.");
prop= RNA_def_property(srna, "duplicate_metaball", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_MBALL);
- RNA_def_property_ui_text(prop, "Duplicate Metaball", "Causes metaball data to be duplicated with the object.");
+ RNA_def_property_ui_text(prop, "Duplicate Metaball", "Causes metaball data to be duplicated with Shift+D.");
prop= RNA_def_property(srna, "duplicate_armature", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_ARM);
- RNA_def_property_ui_text(prop, "Duplicate Armature", "Causes armature data to be duplicated with the object.");
+ RNA_def_property_ui_text(prop, "Duplicate Armature", "Causes armature data to be duplicated with Shift+D.");
prop= RNA_def_property(srna, "duplicate_lamp", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_LAMP);
- RNA_def_property_ui_text(prop, "Duplicate Lamp", "Causes lamp data to be duplicated with the object.");
+ RNA_def_property_ui_text(prop, "Duplicate Lamp", "Causes lamp data to be duplicated with Shift+D.");
prop= RNA_def_property(srna, "duplicate_material", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_MAT);
- RNA_def_property_ui_text(prop, "Duplicate Material", "Causes material data to be duplicated with the object.");
+ RNA_def_property_ui_text(prop, "Duplicate Material", "Causes material data to be duplicated with Shift+D.");
prop= RNA_def_property(srna, "duplicate_texture", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_TEX);
- RNA_def_property_ui_text(prop, "Duplicate Texture", "Causes texture data to be duplicated with the object.");
+ RNA_def_property_ui_text(prop, "Duplicate Texture", "Causes texture data to be duplicated with Shift+D.");
prop= RNA_def_property(srna, "duplicate_ipo", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_IPO);
- RNA_def_property_ui_text(prop, "Duplicate Ipo", "Causes ipo data to be duplicated with the object.");
+ RNA_def_property_ui_text(prop, "Duplicate Ipo", "Causes ipo data to be duplicated with Shift+D.");
prop= RNA_def_property(srna, "duplicate_action", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_ACT);
- RNA_def_property_ui_text(prop, "Duplicate Action", "Causes actions to be duplicated with the object.");
-
- prop= RNA_def_property(srna, "duplicate_particle", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_PSYS);
- RNA_def_property_ui_text(prop, "Duplicate Particle", "Causes particle systems to be duplicated with the object.");
+ RNA_def_property_ui_text(prop, "Duplicate Action", "Causes actions to be duplicated with Shift+D.");
}
static void rna_def_userdef_language(BlenderRNA *brna)
@@ -1957,13 +1940,13 @@ static void rna_def_userdef_language(BlenderRNA *brna)
prop= RNA_def_property(srna, "international_fonts", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "transopts", USER_DOTRANSLATE);
RNA_def_property_ui_text(prop, "International Fonts", "Use international fonts.");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "dpi", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "dpi");
RNA_def_property_range(prop, 48, 128);
RNA_def_property_ui_text(prop, "DPI", "Font size and resolution for display.");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "scrollback", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "scrollback");
@@ -1975,27 +1958,27 @@ static void rna_def_userdef_language(BlenderRNA *brna)
prop= RNA_def_property(srna, "language", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, language_items);
RNA_def_property_ui_text(prop, "Language", "Language use for translation.");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "translate_tooltips", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "transopts", USER_TR_TOOLTIPS);
RNA_def_property_ui_text(prop, "Translate Tooltips", "Translate Tooltips.");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "translate_buttons", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "transopts", USER_TR_BUTTONS);
RNA_def_property_ui_text(prop, "Translate Buttons", "Translate button labels.");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "translate_toolbox", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "transopts", USER_TR_MENUS);
RNA_def_property_ui_text(prop, "Translate Toolbox", "Translate toolbox menu.");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "use_textured_fonts", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "transopts", USER_USETEXTUREFONT);
RNA_def_property_ui_text(prop, "Textured Fonts", "Use textures for drawing international fonts.");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
}
static void rna_def_userdef_system(BlenderRNA *brna)
@@ -2027,15 +2010,9 @@ static void rna_def_userdef_system(BlenderRNA *brna)
static EnumPropertyItem audio_device_items[] = {
{0, "AUDIO_DEVICE_NULL", 0, "No Audio", "Null device - there will be no audio output."},
-#ifdef WITH_SDL
{1, "AUDIO_DEVICE_SDL", 0, "SDL", "SDL device - simple direct media layer, recommended for sequencer usage."},
-#endif
-#ifdef WITH_OPENAL
{2, "AUDIO_DEVICE_OPENAL", 0, "OpenAL", "OpenAL device - supports 3D audio, recommended for game engine usage."},
-#endif
-#ifdef WITH_JACK
{3, "AUDIO_DEVICE_JACK", 0, "Jack", "Jack device - open source pro audio, recommended for pro audio users."},
-#endif
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem audio_rate_items[] = {
@@ -2222,10 +2199,6 @@ static void rna_def_userdef_filepaths(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_FILECOMPRESS);
RNA_def_property_ui_text(prop, "Compress File", "Enable file compression when saving .blend files.");
- prop= RNA_def_property(srna, "load_ui", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", USER_FILENOUI);
- RNA_def_property_ui_text(prop, "Load UI", "Load user interface setup when loading .blend files.");
-
prop= RNA_def_property(srna, "fonts_directory", PROP_STRING, PROP_DIRPATH);
RNA_def_property_string_sdna(prop, NULL, "fontdir");
RNA_def_property_ui_text(prop, "Fonts Directory", "The default directory to search for loading fonts.");
diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c
index af3ac4a0a82..eaed0100386 100644
--- a/source/blender/makesrna/intern/rna_wm.c
+++ b/source/blender/makesrna/intern/rna_wm.c
@@ -377,22 +377,22 @@ static void rna_def_event(BlenderRNA *brna)
prop= RNA_def_property(srna, "shift", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "shift", 1);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Shift", "True when the Shift key is held.");
+ RNA_def_property_ui_text(prop, "Shift", "True when the shift key is held.");
prop= RNA_def_property(srna, "ctrl", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "ctrl", 1);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Ctrl", "True when the Ctrl key is held.");
+ RNA_def_property_ui_text(prop, "Ctrl", "True when the shift key is held.");
prop= RNA_def_property(srna, "alt", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "alt", 1);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Alt", "True when the Alt/Option key is held.");
+ RNA_def_property_ui_text(prop, "Alt", "True when the shift key is held.");
prop= RNA_def_property(srna, "oskey", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "oskey", 1);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "OS Key", "True when the Cmd key is held.");
+ RNA_def_property_ui_text(prop, "OS Key", "True when the shift key is held.");
}
static void rna_def_window(BlenderRNA *brna)
@@ -419,7 +419,6 @@ static void rna_def_windowmanager(BlenderRNA *brna)
srna= RNA_def_struct(brna, "WindowManager", "ID");
RNA_def_struct_ui_text(srna, "Window Manager", "Window manager datablock defining open windows and other user interface data.");
- RNA_def_struct_clear_flag(srna, STRUCT_ID_REFCOUNT);
RNA_def_struct_sdna(srna, "wmWindowManager");
prop= RNA_def_property(srna, "operators", PROP_COLLECTION, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_world.c b/source/blender/makesrna/intern/rna_world.c
index 0ed5016ccd2..525a4446932 100644
--- a/source/blender/makesrna/intern/rna_world.c
+++ b/source/blender/makesrna/intern/rna_world.c
@@ -324,14 +324,12 @@ static void rna_def_world_mist(BlenderRNA *brna)
RNA_def_property_range(prop, 0, FLT_MAX);
RNA_def_property_ui_range(prop, 0, 10000, 10, 2);
RNA_def_property_ui_text(prop, "Start", "Starting distance of the mist, measured from the camera");
- RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
prop= RNA_def_property(srna, "depth", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "mistdist");
RNA_def_property_range(prop, 0, FLT_MAX);
RNA_def_property_ui_range(prop, 0, 10000, 10, 2);
RNA_def_property_ui_text(prop, "Depth", "The distance over which the mist effect fades in");
- RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
prop= RNA_def_property(srna, "height", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "misthi");