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:
authorJoseph Eagar <joeedh@gmail.com>2010-03-09 07:32:40 +0300
committerJoseph Eagar <joeedh@gmail.com>2010-03-09 07:32:40 +0300
commit71003b9bcc88ecf6138c3debb9abba4637c8e61a (patch)
tree7f85d40231311a36a72f731a7c07b8dbd6fff577 /source/blender/makesrna/intern
parentea540496c8281dcba899fb6b29c1bcfbb53a0482 (diff)
parent790d6ca256e6b572826b2bf214c6fd6c8a623969 (diff)
merge with trunk at r27259 and commit of a patch by anthony jones to fix msvc (though further work may be needed because changes made by the merge
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r--source/blender/makesrna/intern/CMakeLists.txt12
-rw-r--r--source/blender/makesrna/intern/Makefile2
-rw-r--r--source/blender/makesrna/intern/SConscript6
-rw-r--r--source/blender/makesrna/intern/makesrna.c261
-rw-r--r--source/blender/makesrna/intern/rna_ID.c63
-rw-r--r--source/blender/makesrna/intern/rna_access.c275
-rw-r--r--source/blender/makesrna/intern/rna_action.c144
-rw-r--r--source/blender/makesrna/intern/rna_action_api.c21
-rw-r--r--source/blender/makesrna/intern/rna_actuator.c1173
-rw-r--r--source/blender/makesrna/intern/rna_animation.c53
-rw-r--r--source/blender/makesrna/intern/rna_animation_api.c10
-rw-r--r--source/blender/makesrna/intern/rna_animviz.c60
-rw-r--r--source/blender/makesrna/intern/rna_armature.c229
-rw-r--r--source/blender/makesrna/intern/rna_armature_api.c2
-rw-r--r--source/blender/makesrna/intern/rna_boid.c126
-rw-r--r--source/blender/makesrna/intern/rna_brush.c154
-rw-r--r--source/blender/makesrna/intern/rna_camera.c76
-rw-r--r--source/blender/makesrna/intern/rna_cloth.c64
-rw-r--r--source/blender/makesrna/intern/rna_color.c26
-rw-r--r--source/blender/makesrna/intern/rna_constraint.c395
-rw-r--r--source/blender/makesrna/intern/rna_context.c4
-rw-r--r--source/blender/makesrna/intern/rna_controller.c32
-rw-r--r--source/blender/makesrna/intern/rna_curve.c163
-rw-r--r--source/blender/makesrna/intern/rna_define.c41
-rw-r--r--source/blender/makesrna/intern/rna_fcurve.c334
-rw-r--r--source/blender/makesrna/intern/rna_fcurve_api.c2
-rw-r--r--source/blender/makesrna/intern/rna_fluidsim.c130
-rw-r--r--source/blender/makesrna/intern/rna_gpencil.c62
-rw-r--r--source/blender/makesrna/intern/rna_group.c12
-rw-r--r--source/blender/makesrna/intern/rna_image.c79
-rw-r--r--source/blender/makesrna/intern/rna_image_api.c74
-rw-r--r--source/blender/makesrna/intern/rna_internal.h3
-rw-r--r--source/blender/makesrna/intern/rna_internal_types.h2
-rw-r--r--source/blender/makesrna/intern/rna_key.c36
-rw-r--r--source/blender/makesrna/intern/rna_lamp.c244
-rw-r--r--source/blender/makesrna/intern/rna_lattice.c18
-rw-r--r--source/blender/makesrna/intern/rna_main.c6
-rw-r--r--source/blender/makesrna/intern/rna_main_api.c210
-rw-r--r--source/blender/makesrna/intern/rna_material.c394
-rw-r--r--source/blender/makesrna/intern/rna_material_api.c36
-rw-r--r--source/blender/makesrna/intern/rna_mesh.c122
-rw-r--r--source/blender/makesrna/intern/rna_mesh_api.c2
-rw-r--r--source/blender/makesrna/intern/rna_meta.c40
-rw-r--r--source/blender/makesrna/intern/rna_modifier.c327
-rw-r--r--source/blender/makesrna/intern/rna_nla.c123
-rw-r--r--source/blender/makesrna/intern/rna_nodetree.c186
-rw-r--r--source/blender/makesrna/intern/rna_nodetree_types.h4
-rw-r--r--source/blender/makesrna/intern/rna_object.c350
-rw-r--r--source/blender/makesrna/intern/rna_object_api.c20
-rw-r--r--source/blender/makesrna/intern/rna_object_force.c110
-rw-r--r--source/blender/makesrna/intern/rna_packedfile.c6
-rw-r--r--source/blender/makesrna/intern/rna_particle.c315
-rw-r--r--source/blender/makesrna/intern/rna_pose.c226
-rw-r--r--source/blender/makesrna/intern/rna_pose_api.c2
-rw-r--r--source/blender/makesrna/intern/rna_property.c26
-rw-r--r--source/blender/makesrna/intern/rna_render.c8
-rw-r--r--source/blender/makesrna/intern/rna_rna.c199
-rw-r--r--source/blender/makesrna/intern/rna_scene.c888
-rw-r--r--source/blender/makesrna/intern/rna_scene_api.c7
-rw-r--r--source/blender/makesrna/intern/rna_screen.c34
-rw-r--r--source/blender/makesrna/intern/rna_sculpt_paint.c137
-rw-r--r--source/blender/makesrna/intern/rna_sensor.c153
-rw-r--r--source/blender/makesrna/intern/rna_sequencer.c228
-rw-r--r--source/blender/makesrna/intern/rna_smoke.c54
-rw-r--r--source/blender/makesrna/intern/rna_sound.c8
-rw-r--r--source/blender/makesrna/intern/rna_space.c618
-rw-r--r--source/blender/makesrna/intern/rna_test.c2
-rw-r--r--source/blender/makesrna/intern/rna_text.c48
-rw-r--r--source/blender/makesrna/intern/rna_text_api.c2
-rw-r--r--source/blender/makesrna/intern/rna_texture.c170
-rw-r--r--source/blender/makesrna/intern/rna_timeline.c22
-rw-r--r--source/blender/makesrna/intern/rna_ui.c38
-rw-r--r--source/blender/makesrna/intern/rna_ui_api.c16
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c681
-rw-r--r--source/blender/makesrna/intern/rna_vfont.c4
-rw-r--r--source/blender/makesrna/intern/rna_wm.c211
-rw-r--r--source/blender/makesrna/intern/rna_wm_api.c84
-rw-r--r--source/blender/makesrna/intern/rna_world.c248
78 files changed, 6833 insertions, 3920 deletions
diff --git a/source/blender/makesrna/intern/CMakeLists.txt b/source/blender/makesrna/intern/CMakeLists.txt
index 113dfc51138..58931165638 100644
--- a/source/blender/makesrna/intern/CMakeLists.txt
+++ b/source/blender/makesrna/intern/CMakeLists.txt
@@ -13,7 +13,7 @@
#
# 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.
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# The Original Code is Copyright (C) 2006, Blender Foundation
# All rights reserved.
@@ -39,9 +39,13 @@ SET(SRC
../../../../intern/guardedalloc/intern/mallocn.c
../../../../intern/guardedalloc/intern/mmap_win.c)
-INCLUDE_DIRECTORIES(../../../../intern/guardedalloc .. ../../makesdna ../../blenkernel ../../blenlib ../../ikplugin ../../windowmanager ../../editors/include ../../imbuf ../../render/extern/include .)
+INCLUDE_DIRECTORIES(../../../../intern/guardedalloc .. ../../makesdna ../../blenkernel ../../blenlib ../../ikplugin ../../windowmanager ../../editors/include ../../gpu ../../imbuf ../../render/extern/include .)
FILE(GLOB INC_FILES ../*.h ../../makesdna/*.h)
+IF(NOT WITH_PYTHON)
+ ADD_DEFINITIONS(-DDISABLE_PYTHON)
+ENDIF(NOT WITH_PYTHON)
+
IF(WIN32)
SET(INC ${INC} ${PTHREADS_INC})
ENDIF(WIN32)
@@ -63,7 +67,7 @@ IF(WITH_DDS)
ENDIF(WITH_DDS)
IF(WITH_QUICKTIME)
- SET(INC "${INC} ../../quicktime")
+ SET(INC ${INC} ../../quicktime)
ADD_DEFINITIONS(-DWITH_QUICKTIME)
ENDIF(WITH_QUICKTIME)
@@ -97,6 +101,7 @@ ADD_EXECUTABLE(makesrna ${SRC} ${INC_FILES})
TARGET_LINK_LIBRARIES(makesrna bf_dna)
# Output rna_*_gen.c
+# note (linux only): with crashes try add this after COMMAND: valgrind --leak-check=full --track-origins=yes
ADD_CUSTOM_COMMAND(
OUTPUT ${GENSRC}
COMMAND ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/makesrna ${CMAKE_CURRENT_BINARY_DIR}/
@@ -108,4 +113,3 @@ SET(SRC rna_access.c ${GENSRC})
BLENDERLIB(bf_rna "${SRC}" "${INC}")
MESSAGE(STATUS "Configuring makesrna")
-
diff --git a/source/blender/makesrna/intern/Makefile b/source/blender/makesrna/intern/Makefile
index 81bc584e460..5afe55bb319 100644
--- a/source/blender/makesrna/intern/Makefile
+++ b/source/blender/makesrna/intern/Makefile
@@ -53,7 +53,7 @@ CPPFLAGS += -I../../ikplugin
CPPFLAGS += -I../../makesdna
CPPFLAGS += -I../../windowmanager
CPPFLAGS += -I../../editors/include
-CPPFLAGS += -I../../bmesh
+CPPFLAGS += -I../../gpu
CPPFLAGS += -I../../render/extern/include
CPPFLAGS += -I..
CPPFLAGS += -I.
diff --git a/source/blender/makesrna/intern/SConscript b/source/blender/makesrna/intern/SConscript
index c0a9089ab29..d757f6293a0 100644
--- a/source/blender/makesrna/intern/SConscript
+++ b/source/blender/makesrna/intern/SConscript
@@ -75,6 +75,8 @@ if env['WITH_BF_JACK']:
if env['BF_UNIT_TEST']:
defs.append('UNIT_TEST')
+if not env['WITH_BF_PYTHON']:
+ defs.append('DISABLE_PYTHON')
if env['OURPLATFORM'] == 'linux2':
cflags='-pthread'
@@ -126,9 +128,9 @@ if not (root_build_dir[0]==os.sep or root_build_dir[1]==':'):
targetpath = '#' + targetpath
if env['OURPLATFORM'] == 'linux2' and root_build_dir[0]==os.sep:
- makesrna = makesrna_tool.Program (target = targetpath, source = source_files, LIBS=['bf_guardedalloc', 'bf_dna'])
+ makesrna = makesrna_tool.Program (target = targetpath, source = source_files, LIBS=['bf_guardedalloc', 'bf_dna', 'bf_blenlib'])
else:
- makesrna = makesrna_tool.Program (target = targetpath, source = source_files, LIBS=['bf_guardedalloc', 'bf_dna'])
+ makesrna = makesrna_tool.Program (target = targetpath, source = source_files, LIBS=['bf_guardedalloc', 'bf_dna', 'bf_blenlib'])
rna_dict = rna.Dictionary()
rna.Depends (generated_files, makesrna)
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c
index a03903eb652..15d5658160d 100644
--- a/source/blender/makesrna/intern/makesrna.c
+++ b/source/blender/makesrna/intern/makesrna.c
@@ -15,7 +15,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor(s): Blender Foundation (2008).
*
@@ -44,6 +44,87 @@
#endif
#endif
+/* Replace if different */
+#define TMP_EXT ".tmp"
+
+static int replace_if_different(char *tmpfile)
+{
+
+#define REN_IF_DIFF \
+ remove(orgfile); \
+ if(rename(tmpfile, orgfile) != 0) { \
+ fprintf(stderr, "%s:%d, rename error: \"%s\" -> \"%s\"\n", __FILE__, __LINE__, tmpfile, orgfile); \
+ return -1; \
+ } \
+ remove(tmpfile); \
+ return 1; \
+/* end REN_IF_DIFF */
+
+
+ FILE *fp_new, *fp_org;
+ int len_new, len_org;
+ char *arr_new, *arr_org;
+ int cmp;
+
+ char orgfile[4096];
+
+ strcpy(orgfile, tmpfile);
+ orgfile[strlen(orgfile) - strlen(TMP_EXT)] = '\0'; /* strip '.tmp' */
+
+ fp_org= fopen(orgfile, "rb");
+
+ if(fp_org==NULL) {
+ REN_IF_DIFF;
+ }
+
+ fp_new= fopen(tmpfile, "rb");
+
+ if(fp_new==NULL) {
+ /* shouldn't happen, just to be safe */
+ fprintf(stderr, "%s:%d, open error: \"%s\"\n", __FILE__, __LINE__, tmpfile);
+ return -1;
+ }
+
+ fseek(fp_new, 0L, SEEK_END); len_new = ftell(fp_new); fseek(fp_new, 0L, SEEK_SET);
+ fseek(fp_org, 0L, SEEK_END); len_org = ftell(fp_org); fseek(fp_org, 0L, SEEK_SET);
+
+
+ if(len_new != len_org) {
+ fclose(fp_new);
+ fclose(fp_org);
+ REN_IF_DIFF;
+ }
+
+ /* now compare the files... */
+ arr_new= MEM_mallocN(sizeof(char)*len_new, "rna_cmp_file_new");
+ arr_org= MEM_mallocN(sizeof(char)*len_org, "rna_cmp_file_org");
+
+ if(fread(arr_new, sizeof(char), len_new, fp_new) != len_new)
+ fprintf(stderr, "%s:%d, error reading file %s for comparison.\n", __FILE__, __LINE__, tmpfile);
+ if(fread(arr_org, sizeof(char), len_org, fp_org) != len_org)
+ fprintf(stderr, "%s:%d, error reading file %s for comparison.\n", __FILE__, __LINE__, orgfile);
+
+ fclose(fp_new);
+ fclose(fp_org);
+
+ cmp= memcmp(arr_new, arr_org, len_new);
+
+ MEM_freeN(arr_new);
+ MEM_freeN(arr_org);
+
+ if(cmp) {
+ REN_IF_DIFF;
+ }
+ else {
+ remove(tmpfile);
+ return 0;
+ }
+
+#undef REN_IF_DIFF
+}
+
+
+
/* Sorting */
static int cmp_struct(const void *a, const void *b)
@@ -1211,13 +1292,14 @@ static void rna_def_function_funcs(FILE *f, StructDefRNA *dsrna, FunctionDefRNA
StructRNA *srna;
FunctionRNA *func;
PropertyDefRNA *dparm;
- char *funcname, *ptrstr;
- int first;
+ PropertyType type;
+ char *funcname, *ptrstr, *valstr;
+ int flag, pout, cptr, first;
srna= dsrna->srna;
func= dfunc->func;
- if(func->flag & FUNC_REGISTER)
+ if(!dfunc->call)
return;
funcname= rna_alloc_function_name(srna->identifier, func->identifier, "call");
@@ -1228,25 +1310,39 @@ static void rna_def_function_funcs(FILE *f, StructDefRNA *dsrna, FunctionDefRNA
/* variable definitions */
if((func->flag & FUNC_NO_SELF)==0) {
+ if(func->flag & FUNC_USE_SELF_ID)
+ fprintf(f, "\tstruct ID *_selfid;\n");
+
if(dsrna->dnaname) fprintf(f, "\tstruct %s *_self;\n", dsrna->dnaname);
else fprintf(f, "\tstruct %s *_self;\n", srna->identifier);
}
dparm= dfunc->cont.properties.first;
for(; dparm; dparm= dparm->next) {
- if(dparm->prop->arraydimension)
+ type = dparm->prop->type;
+ flag = dparm->prop->flag;
+ pout = (flag & PROP_OUTPUT);
+ cptr = ((type == PROP_POINTER) && !(flag & PROP_RNAPTR));
+
+ if(dparm->prop==func->c_ret)
+ ptrstr= cptr || dparm->prop->arraydimension ? "*" : "";
+ /* XXX only arrays and strings are allowed to be dynamic, is this checked anywhere? */
+ else if (cptr || (flag & PROP_DYNAMIC))
+ ptrstr= pout ? "**" : "*";
+ /* fixed size arrays and RNA pointers are pre-allocated on the ParameterList stack, pass a pointer to it */
+ else if (type == PROP_POINTER || dparm->prop->arraydimension)
ptrstr= "*";
- else if(dparm->prop==func->c_ret)
- ptrstr= ((dparm->prop->type == PROP_POINTER) && !(dparm->prop->flag & PROP_RNAPTR))? "*": "";
- else if ((dparm->prop->flag & PROP_RETURN)) {
- if ((dparm->prop->flag & PROP_THICK_WRAP) && (dparm->prop->type == PROP_STRING))
- ptrstr= "";
- else
- ptrstr= ((dparm->prop->type == PROP_POINTER) && !(dparm->prop->flag & PROP_RNAPTR))? "**": "*";
- } else
- ptrstr= (dparm->prop->type == PROP_POINTER)? "*": "";
+ /* PROP_THICK_WRAP strings are pre-allocated on the ParameterList stack, but type name for string props is already char*, so leave empty */
+ else if (type == PROP_STRING && (flag & PROP_THICK_WRAP))
+ ptrstr= "";
+ else
+ ptrstr= pout ? "*" : "";
fprintf(f, "\t%s%s %s%s;\n", rna_type_struct(dparm->prop), rna_parameter_type_name(dparm->prop), ptrstr, dparm->prop->identifier);
+
+ /* for dynamic parameters we pass an additional int for the length of the parameter */
+ if (flag & PROP_DYNAMIC)
+ fprintf(f, "\tint %s%s_len;\n", pout ? "*" : "", dparm->prop->identifier);
}
fprintf(f, "\tchar *_data");
@@ -1256,6 +1352,9 @@ static void rna_def_function_funcs(FILE *f, StructDefRNA *dsrna, FunctionDefRNA
/* assign self */
if((func->flag & FUNC_NO_SELF)==0) {
+ if(func->flag & FUNC_USE_SELF_ID)
+ fprintf(f, "\t_selfid= (struct ID*)_ptr->id.data;\n");
+
if(dsrna->dnaname) fprintf(f, "\t_self= (struct %s *)_ptr->data;\n", dsrna->dnaname);
else fprintf(f, "\t_self= (struct %s *)_ptr->data;\n", srna->identifier);
}
@@ -1264,30 +1363,45 @@ static void rna_def_function_funcs(FILE *f, StructDefRNA *dsrna, FunctionDefRNA
dparm= dfunc->cont.properties.first;
for(; dparm; dparm= dparm->next) {
- if ((dparm->prop->flag & PROP_RETURN))
- ptrstr= "";
- else
- ptrstr= "*";
+ type = dparm->prop->type;
+ flag = dparm->prop->flag;
+ pout = (flag & PROP_OUTPUT);
+ cptr = ((type == PROP_POINTER) && !(flag & PROP_RNAPTR));
if(dparm->prop==func->c_ret)
fprintf(f, "\t_retdata= _data;\n");
- else if(dparm->prop->arraydimension)
- 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)
- fprintf(f, "\t%s= ((%s%s*)_data);\n", dparm->prop->identifier, rna_type_struct(dparm->prop), rna_parameter_type_name(dparm->prop));
- else
- fprintf(f, "\t%s= %s((%s%s**)_data);\n", dparm->prop->identifier, ptrstr, rna_type_struct(dparm->prop), rna_parameter_type_name(dparm->prop));
- }
- else {
- if ((dparm->prop->flag & PROP_THICK_WRAP) && (dparm->prop->type == PROP_STRING))
- fprintf(f, "\t%s= %s((%s%s)_data);\n", dparm->prop->identifier, ptrstr, rna_type_struct(dparm->prop), rna_parameter_type_name(dparm->prop));
- else
- fprintf(f, "\t%s= %s((%s%s*)_data);\n", dparm->prop->identifier, ptrstr, rna_type_struct(dparm->prop), rna_parameter_type_name(dparm->prop));
+ else {
+ if (cptr || (flag & PROP_DYNAMIC)) {
+ ptrstr= "**";
+ valstr= "*";
+ }
+ else if (type == PROP_POINTER || dparm->prop->arraydimension) {
+ ptrstr= "*";
+ valstr= "";
+ }
+ else if (type == PROP_STRING && (flag & PROP_THICK_WRAP)) {
+ ptrstr= "";
+ valstr= "";
+ }
+ else {
+ ptrstr= "*";
+ valstr= "*";
+ }
+
+ fprintf(f, "\t%s= ", dparm->prop->identifier);
+
+ if (!pout)
+ fprintf(f, "%s", valstr);
+
+ fprintf(f, "((%s%s%s)_data);\n", rna_type_struct(dparm->prop), rna_parameter_type_name(dparm->prop), ptrstr);
+
+ /* this must be kept in sync with RNA_parameter_length_get_data, we could just call the function directly, but this is faster */
+ if (flag & PROP_DYNAMIC)
+ fprintf(f, "\t%s_len= %s((int *)(_data+%d));\n", dparm->prop->identifier, pout ? "" : "*", rna_parameter_size(dparm->prop));
}
if(dparm->next)
- fprintf(f, "\t_data+= %d;\n", rna_parameter_size(dparm->prop));
+ fprintf(f, "\t_data+= %d;\n", rna_parameter_size_alloc(dparm->prop));
}
if(dfunc->call) {
@@ -1299,6 +1413,9 @@ static void rna_def_function_funcs(FILE *f, StructDefRNA *dsrna, FunctionDefRNA
first= 1;
if((func->flag & FUNC_NO_SELF)==0) {
+ if(func->flag & FUNC_USE_SELF_ID)
+ fprintf(f, "_selfid, ");
+
fprintf(f, "_self");
first= 0;
}
@@ -1324,6 +1441,9 @@ static void rna_def_function_funcs(FILE *f, StructDefRNA *dsrna, FunctionDefRNA
first= 0;
fprintf(f, "%s", dparm->prop->identifier);
+
+ if (dparm->prop->flag & PROP_DYNAMIC)
+ fprintf(f, ", %s_len", dparm->prop->identifier);
}
fprintf(f, ");\n");
@@ -1427,6 +1547,7 @@ static const char *rna_property_subtypename(PropertyType type)
switch(type) {
case PROP_NONE: return "PROP_NONE";
case PROP_FILEPATH: return "PROP_FILEPATH";
+ case PROP_FILENAME: return "PROP_FILENAME";
case PROP_DIRPATH: return "PROP_DIRPATH";
case PROP_UNSIGNED: return "PROP_UNSIGNED";
case PROP_PERCENTAGE: return "PROP_PERCENTAGE";
@@ -1565,7 +1686,8 @@ static void rna_generate_static_parameter_prototypes(BlenderRNA *brna, StructRNA
FunctionRNA *func;
PropertyDefRNA *dparm;
StructDefRNA *dsrna;
- int first;
+ PropertyType type;
+ int flag, pout, cptr, first;
char *ptrstr;
dsrna= rna_find_struct_def(srna);
@@ -1596,6 +1718,9 @@ static void rna_generate_static_parameter_prototypes(BlenderRNA *brna, StructRNA
/* self, context and reports parameters */
if((func->flag & FUNC_NO_SELF)==0) {
+ if(func->flag & FUNC_USE_SELF_ID)
+ fprintf(f, "struct ID *_selfid, ");
+
if(dsrna->dnaname) fprintf(f, "struct %s *_self", dsrna->dnaname);
else fprintf(f, "struct %s *_self", srna->identifier);
first= 0;
@@ -1615,25 +1740,33 @@ static void rna_generate_static_parameter_prototypes(BlenderRNA *brna, StructRNA
/* defined parameters */
for(dparm= dfunc->cont.properties.first; dparm; dparm= dparm->next) {
+ type = dparm->prop->type;
+ flag = dparm->prop->flag;
+ pout = (flag & PROP_OUTPUT);
+ cptr = ((type == PROP_POINTER) && !(flag & PROP_RNAPTR));
+
if(dparm->prop==func->c_ret)
continue;
- if(!first) fprintf(f, ", ");
- first= 0;
-
- if((dparm->prop->type == PROP_STRING && dparm->prop->flag & PROP_THICK_WRAP))
- ptrstr= "";
- else if(dparm->prop->flag & PROP_RETURN)
+ if (cptr || (flag & PROP_DYNAMIC))
+ ptrstr= pout ? "**" : "*";
+ else if (type == PROP_POINTER || dparm->prop->arraydimension)
ptrstr= "*";
- else
+ else if (type == PROP_STRING && (flag & PROP_THICK_WRAP))
ptrstr= "";
+ else
+ ptrstr= pout ? "*" : "";
- if(dparm->prop->arraydimension)
+ if(!first) fprintf(f, ", ");
+ first= 0;
+
+ if(!(flag & PROP_DYNAMIC) && 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);
- else if(dparm->prop->type == PROP_POINTER)
- fprintf(f, "%s%s *%s%s", rna_type_struct(dparm->prop), rna_parameter_type_name(dparm->prop), (dparm->prop->flag & PROP_RNAPTR) ? "" : ptrstr, dparm->prop->identifier);
else
fprintf(f, "%s%s %s%s", rna_type_struct(dparm->prop), rna_parameter_type_name(dparm->prop), ptrstr, dparm->prop->identifier);
+
+ if (flag & PROP_DYNAMIC)
+ fprintf(f, ", int %s%s_len", pout ? "*" : "", dparm->prop->identifier);
}
fprintf(f, ");\n");
@@ -1643,16 +1776,19 @@ static void rna_generate_static_function_prototypes(BlenderRNA *brna, StructRNA
{
FunctionRNA *func;
FunctionDefRNA *dfunc;
-
- fprintf(f, "/* Repeated prototypes to detect errors */\n\n");
+ int first= 1;
for(func= srna->functions.first; func; func= func->cont.next) {
- if(func->flag & FUNC_REGISTER)
- continue;
-
dfunc= rna_find_function_def(func);
- if(dfunc->call)
+
+ if(dfunc->call) {
+ if(first) {
+ fprintf(f, "/* Repeated prototypes to detect errors */\n\n");
+ first= 0;
+ }
+
rna_generate_static_parameter_prototypes(brna, srna, dfunc, f);
+ }
}
fprintf(f, "\n");
@@ -2340,10 +2476,10 @@ static void rna_generate_header_cpp(BlenderRNA *brna, FILE *f)
fprintf(f, "}\n\n#endif /* __RNA_BLENDER_CPP_H__ */\n\n");
}
-static void make_bad_file(char *file)
+static void make_bad_file(char *file, int line)
{
FILE *fp= fopen(file, "w");
- fprintf(fp, "ERROR! Cannot make correct RNA file, STUPID!\n");
+ fprintf(fp, "#error \"Error! can't make correct RNA file from %s:%d, STUPID!\"\n", __FILE__, line);
fclose(fp);
}
@@ -2373,12 +2509,12 @@ static int rna_preprocess(char *outfile)
/* create RNA_blender_cpp.h */
strcpy(deffile, outfile);
- strcat(deffile, "RNA_blender_cpp.h");
+ strcat(deffile, "RNA_blender_cpp.h" TMP_EXT);
status= (DefRNA.error != 0);
if(status) {
- make_bad_file(deffile);
+ make_bad_file(deffile, __LINE__);
}
else {
file = fopen(deffile, "w");
@@ -2390,11 +2526,12 @@ static int rna_preprocess(char *outfile)
else {
rna_generate_header_cpp(brna, file);
fclose(file);
-
status= (DefRNA.error != 0);
}
}
+ replace_if_different(deffile);
+
rna_sort(brna);
/* create rna_gen_*.c files */
@@ -2402,10 +2539,10 @@ static int rna_preprocess(char *outfile)
strcpy(deffile, outfile);
strcat(deffile, PROCESS_ITEMS[i].filename);
deffile[strlen(deffile)-2] = '\0';
- strcat(deffile, "_gen.c");
+ strcat(deffile, "_gen.c" TMP_EXT);
if(status) {
- make_bad_file(deffile);
+ make_bad_file(deffile, __LINE__);
}
else {
file = fopen(deffile, "w");
@@ -2417,18 +2554,19 @@ static int rna_preprocess(char *outfile)
else {
rna_generate(brna, file, PROCESS_ITEMS[i].filename, PROCESS_ITEMS[i].api_filename);
fclose(file);
-
status= (DefRNA.error != 0);
}
}
+
+ replace_if_different(deffile);
}
/* create RNA_blender.h */
strcpy(deffile, outfile);
- strcat(deffile, "RNA_blender.h");
+ strcat(deffile, "RNA_blender.h" TMP_EXT);
if(status) {
- make_bad_file(deffile);
+ make_bad_file(deffile, __LINE__);
}
else {
file = fopen(deffile, "w");
@@ -2440,11 +2578,12 @@ static int rna_preprocess(char *outfile)
else {
rna_generate_header(brna, file);
fclose(file);
-
status= (DefRNA.error != 0);
}
}
+ replace_if_different(deffile);
+
/* free RNA */
RNA_define_free(brna);
RNA_free(brna);
@@ -2452,7 +2591,7 @@ static int rna_preprocess(char *outfile)
return status;
}
-static void mem_error_cb(char *errorStr)
+static void mem_error_cb(const char *errorStr)
{
fprintf(stderr, "%s", errorStr);
fflush(stderr);
diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c
index ac354366c25..c47bd74b1fb 100644
--- a/source/blender/makesrna/intern/rna_ID.c
+++ b/source/blender/makesrna/intern/rna_ID.c
@@ -15,7 +15,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor(s): Blender Foundation (2008).
*
@@ -246,40 +246,6 @@ ID *rna_ID_copy(ID *id)
return NULL;
}
-static int rna_IDPropertyGroup_name_length(PointerRNA *ptr)
-{
- IDProperty *group=(IDProperty*)ptr->id.data;
- IDProperty *idprop;
- idprop= IDP_GetPropertyFromGroup(group, "name");
-
- if(idprop && idprop->type == IDP_STRING)
- return strlen(idprop->data.pointer);
- else
- return 0;
-}
-
-static void rna_IDPropertyGroup_name_get(PointerRNA *ptr, char *str)
-{
- IDProperty *group=(IDProperty*)ptr->id.data;
- IDProperty *idprop;
- idprop= IDP_GetPropertyFromGroup(group, "name");
-
- if(idprop && idprop->type == IDP_STRING)
- strcpy(str, idprop->data.pointer);
- else
- str[0]= '\0';
-}
-
-void rna_IDPropertyGroup_name_set(PointerRNA *ptr, const char *value)
-{
- IDProperty *group=(IDProperty*)ptr->id.data;
- IDProperty *idprop;
- IDPropertyTemplate val = {0};
- val.str= (char *)value;
- idprop = IDP_New(IDP_STRING, val, "name");
- IDP_ReplaceInGroup(group, idprop);
-}
-
#else
static void rna_def_ID_properties(BlenderRNA *brna)
@@ -290,7 +256,7 @@ static void rna_def_ID_properties(BlenderRNA *brna)
/* this is struct is used for holding the virtual
* PropertyRNA's for ID properties */
srna= RNA_def_struct(brna, "IDProperty", NULL);
- RNA_def_struct_ui_text(srna, "ID Property", "Property that stores arbitrary, user defined properties.");
+ RNA_def_struct_ui_text(srna, "ID Property", "Property that stores arbitrary, user defined properties");
/* IDP_STRING */
prop= RNA_def_property(srna, "string", PROP_STRING, PROP_NONE);
@@ -335,7 +301,7 @@ static void rna_def_ID_properties(BlenderRNA *brna)
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_flag(prop, PROP_EXPORT|PROP_IDPROPERTY);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Name", "Unique name used in the code and scripting.");
+ RNA_def_property_ui_text(prop, "Name", "Unique name used in the code and scripting");
RNA_def_struct_name_property(srna, prop);
#endif
@@ -345,7 +311,7 @@ static void rna_def_ID_properties(BlenderRNA *brna)
* with native RNA properties. the builtin_properties will take
* care of the properties here */
srna= RNA_def_struct(brna, "IDPropertyGroup", NULL);
- RNA_def_struct_ui_text(srna, "ID Property Group", "Group of ID properties.");
+ RNA_def_struct_ui_text(srna, "ID Property Group", "Group of ID properties");
RNA_def_struct_idproperties_func(srna, "rna_IDPropertyGroup_idproperties");
RNA_def_struct_register_funcs(srna, "rna_IDPropertyGroup_register", "rna_IDPropertyGroup_unregister");
RNA_def_struct_refine_func(srna, "rna_IDPropertyGroup_refine");
@@ -356,8 +322,7 @@ static void rna_def_ID_properties(BlenderRNA *brna)
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_flag(prop, PROP_EXPORT|PROP_IDPROPERTY);
//RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Name", "Unique name used in the code and scripting.");
- RNA_def_property_string_funcs(prop, "rna_IDPropertyGroup_name_get", "rna_IDPropertyGroup_name_length", "rna_IDPropertyGroup_name_set");
+ RNA_def_property_ui_text(prop, "Name", "Unique name used in the code and scripting");
RNA_def_struct_name_property(srna, prop);
}
@@ -368,13 +333,13 @@ static void rna_def_ID(BlenderRNA *brna)
PropertyRNA *prop, *parm;
srna= RNA_def_struct(brna, "ID", NULL);
- RNA_def_struct_ui_text(srna, "ID", "Base type for datablocks, defining a unique name, linking from other libraries and garbage collection.");
+ RNA_def_struct_ui_text(srna, "ID", "Base type for datablocks, defining a unique name, linking from other libraries and garbage collection");
RNA_def_struct_flag(srna, STRUCT_ID|STRUCT_ID_REFCOUNT);
RNA_def_struct_refine_func(srna, "rna_ID_refine");
RNA_def_struct_idproperties_func(srna, "rna_ID_idproperties");
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
- RNA_def_property_ui_text(prop, "Name", "Unique datablock ID name.");
+ RNA_def_property_ui_text(prop, "Name", "Unique datablock ID name");
RNA_def_property_string_funcs(prop, "rna_ID_name_get", "rna_ID_name_length", "rna_ID_name_set");
RNA_def_property_string_maxlength(prop, sizeof(((ID*)NULL)->name)-2);
RNA_def_property_editable_func(prop, "rna_ID_name_editable");
@@ -384,7 +349,7 @@ static void rna_def_ID(BlenderRNA *brna)
prop= RNA_def_property(srna, "users", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "us");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Users", "Number of times this datablock is referenced.");
+ RNA_def_property_ui_text(prop, "Users", "Number of times this datablock is referenced");
prop= RNA_def_property(srna, "fake_user", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", LIB_FAKEUSER);
@@ -394,12 +359,12 @@ static void rna_def_ID(BlenderRNA *brna)
prop= RNA_def_property(srna, "tag", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", LIB_DOIT);
RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);
- RNA_def_property_ui_text(prop, "Tag", "Tools can use this to tag data, (initial state is undefined).");
+ RNA_def_property_ui_text(prop, "Tag", "Tools can use this to tag data, (initial state is undefined)");
prop= RNA_def_property(srna, "library", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "lib");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Library", "Library file the datablock is linked from.");
+ RNA_def_property_ui_text(prop, "Library", "Library file the datablock is linked from");
/* functions */
func= RNA_def_function(srna, "copy", "rna_ID_copy");
@@ -423,13 +388,13 @@ static void rna_def_library(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "Library", "ID");
- RNA_def_struct_ui_text(srna, "Library", "External .blend file from which data is linked.");
+ RNA_def_struct_ui_text(srna, "Library", "External .blend file from which data is linked");
RNA_def_struct_ui_icon(srna, ICON_LIBRARY_DATA_DIRECT);
prop= RNA_def_property(srna, "filename", PROP_STRING, PROP_FILEPATH);
RNA_def_property_string_sdna(prop, NULL, "name");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Filename", "Path to the library .blend file.");
+ RNA_def_property_ui_text(prop, "Filename", "Path to the library .blend file");
}
void RNA_def_ID(BlenderRNA *brna)
{
@@ -437,11 +402,11 @@ void RNA_def_ID(BlenderRNA *brna)
/* built-in unknown type */
srna= RNA_def_struct(brna, "UnknownType", NULL);
- RNA_def_struct_ui_text(srna, "Unknown Type", "Stub RNA type used for pointers to unknown or internal data.");
+ RNA_def_struct_ui_text(srna, "Unknown Type", "Stub RNA type used for pointers to unknown or internal data");
/* built-in any type */
srna= RNA_def_struct(brna, "AnyType", NULL);
- RNA_def_struct_ui_text(srna, "Any Type", "RNA type used for pointers to any possible data.");
+ RNA_def_struct_ui_text(srna, "Any Type", "RNA type used for pointers to any possible data");
rna_def_ID(brna);
rna_def_ID_properties(brna);
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index 6932d775da7..4cc5ca6f9df 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -15,7 +15,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor(s): Blender Foundation (2008).
*
@@ -36,6 +36,7 @@
#include "BLI_dynstr.h"
#include "BLI_ghash.h"
+#include "BKE_animsys.h"
#include "BKE_context.h"
#include "BKE_idprop.h"
#include "BKE_main.h"
@@ -191,6 +192,30 @@ PointerRNA rna_pointer_inherit_refine(PointerRNA *ptr, StructRNA *type, void *da
return result;
}
+/**/
+void RNA_pointer_recast(PointerRNA *ptr, PointerRNA *r_ptr)
+{
+#if 0 // works but this case if covered by more general code below.
+ if(RNA_struct_is_ID(ptr->type)) {
+ /* simple case */
+ RNA_id_pointer_create(ptr->id.data, r_ptr);
+ }
+ else
+#endif
+ {
+ StructRNA *base;
+ PointerRNA t_ptr;
+ *r_ptr= *ptr; /* initialize as the same incase cant recast */
+
+ for(base=ptr->type->base; base; base=base->base) {
+ t_ptr= rna_pointer_inherit_refine(ptr, base, ptr->data);
+ if(t_ptr.type && t_ptr.type != ptr->type) {
+ *r_ptr= t_ptr;
+ }
+ }
+ }
+}
+
/* ID Properties */
/* return a UI local ID prop definition for this prop */
@@ -549,6 +574,19 @@ const struct ListBase *RNA_struct_defined_properties(StructRNA *srna)
FunctionRNA *RNA_struct_find_function(PointerRNA *ptr, const char *identifier)
{
+#if 1
+ FunctionRNA *func;
+ StructRNA *type;
+ for(type= ptr->type; type; type= type->base) {
+ for(func= type->functions.first; func; func= func->cont.next) {
+ if(strcmp(func->identifier, identifier)==0)
+ return func;
+ }
+ }
+ return NULL;
+
+ /* funcitonal but slow */
+#else
PointerRNA tptr;
PropertyRNA *iterprop;
FunctionRNA *func;
@@ -567,6 +605,7 @@ FunctionRNA *RNA_struct_find_function(PointerRNA *ptr, const char *identifier)
RNA_PROP_END;
return func;
+#endif
}
const struct ListBase *RNA_struct_defined_functions(StructRNA *srna)
@@ -884,6 +923,44 @@ void RNA_property_float_ui_range(PointerRNA *ptr, PropertyRNA *prop, float *soft
*precision= (float)fprop->precision;
}
+int RNA_property_float_clamp(PointerRNA *ptr, PropertyRNA *prop, float *value)
+{
+ float min, max;
+
+ RNA_property_float_range(ptr, prop, &min, &max);
+
+ if(*value < min) {
+ *value= min;
+ return -1;
+ }
+ else if(*value > max) {
+ *value= max;
+ return 1;
+ }
+ else {
+ return 0;
+ }
+}
+
+int RNA_property_int_clamp(PointerRNA *ptr, PropertyRNA *prop, int *value)
+{
+ int min, max;
+
+ RNA_property_int_range(ptr, prop, &min, &max);
+
+ if(*value < min) {
+ *value= min;
+ return -1;
+ }
+ else if(*value > max) {
+ *value= max;
+ return 1;
+ }
+ else {
+ return 0;
+ }
+}
+
/* this is the max length including \0 terminator */
int RNA_property_string_maxlength(PropertyRNA *prop)
{
@@ -918,15 +995,25 @@ EnumPropertyItem DummyRNA_NULL_items[] = {
{0, NULL, 0, NULL, NULL}
};
+/* Reuse for dynamic types with default value */
+EnumPropertyItem DummyRNA_DEFAULT_items[] = {
+ {0, "DEFAULT", 0, "Default", ""},
+ {0, NULL, 0, NULL, NULL}
+};
+
void RNA_property_enum_items(bContext *C, PointerRNA *ptr, PropertyRNA *prop, EnumPropertyItem **item, int *totitem, int *free)
{
EnumPropertyRNA *eprop= (EnumPropertyRNA*)rna_ensure_property(prop);
*free= 0;
- if(eprop->itemf && C) {
+ if(eprop->itemf && (C != NULL || (prop->flag & PROP_ENUM_NO_CONTEXT))) {
int tot= 0;
- *item= eprop->itemf(C, ptr, free);
+
+ if (prop->flag & PROP_ENUM_NO_CONTEXT)
+ *item= eprop->itemf(NULL, ptr, free);
+ else
+ *item= eprop->itemf(C, ptr, free);
if(totitem) {
if(*item) {
@@ -1048,21 +1135,21 @@ int RNA_property_ui_icon(PropertyRNA *prop)
int RNA_property_editable(PointerRNA *ptr, PropertyRNA *prop)
{
- ID *id;
+ ID *id= ptr->id.data;
int flag;
prop= rna_ensure_property(prop);
+ flag= prop->editable ? prop->editable(ptr) : prop->flag;
+ return (flag & PROP_EDITABLE) && (!id || !id->lib || (prop->flag & PROP_LIB_EXCEPTION));
+}
- if(prop->editable)
- flag= prop->editable(ptr);
- else
- flag= prop->flag;
-
- id= ptr->id.data;
+int RNA_property_editable_flag(PointerRNA *ptr, PropertyRNA *prop)
+{
+ int flag;
- /* with this, libdata is not animated by its own library fcurves, FIXME */
-// return (flag & PROP_EDITABLE) && (!id || !id->lib || (flag & PROP_LIB_EXCEPTION));
- return (flag & PROP_EDITABLE) ? 1:0;
+ prop= rna_ensure_property(prop);
+ flag= prop->editable ? prop->editable(ptr) : prop->flag;
+ return (flag & PROP_EDITABLE);
}
/* same as RNA_property_editable(), except this checks individual items in an array */
@@ -1072,35 +1159,32 @@ int RNA_property_editable_index(PointerRNA *ptr, PropertyRNA *prop, int index)
int flag;
prop= rna_ensure_property(prop);
+
+ flag= prop->flag;
- /* if there is no function to do this for a given index,
- * just resort to doing this on the whole array
- */
- if (prop->itemeditable == NULL)
- return RNA_property_editable(ptr, prop);
-
- flag= prop->itemeditable(ptr, index);
+ if(prop->editable)
+ flag &= prop->editable(ptr);
+
+ if (prop->itemeditable)
+ flag &= prop->itemeditable(ptr, index);
+
id= ptr->id.data;
- /* with this, libdata is not animated by its own library fcurves, FIXME */
-// return (flag & PROP_EDITABLE) && (!id || !id->lib || (flag & PROP_LIB_EXCEPTION));
- return (flag & PROP_EDITABLE) ? 1:0;
+
+ return (flag & PROP_EDITABLE) && (!id || !id->lib || (prop->flag & PROP_LIB_EXCEPTION));
}
int RNA_property_animateable(PointerRNA *ptr, PropertyRNA *prop)
{
- int flag;
-
+ /* check that base ID-block can support animation data */
+ if (!id_type_can_have_animdata(ptr->id.data))
+ return 0;
+
prop= rna_ensure_property(prop);
- if(!(prop->flag & PROP_ANIMATEABLE))
+ if(!(prop->flag & PROP_ANIMATABLE))
return 0;
- if(prop->editable)
- flag= prop->editable(ptr);
- else
- flag= prop->flag;
-
- return (flag & PROP_EDITABLE);
+ return (prop->flag & PROP_EDITABLE);
}
int RNA_property_animated(PointerRNA *ptr, PropertyRNA *prop)
@@ -1131,7 +1215,7 @@ static void rna_property_update(bContext *C, Main *bmain, Scene *scene, PointerR
else {
/* WARNING! This is so property drivers update the display!
* not especially nice */
- DAG_id_flush_update(ptr->id.data, OB_RECALC_OB);
+ DAG_id_flush_update(ptr->id.data, OB_RECALC);
WM_main_add_notifier(NC_WINDOW, NULL);
}
@@ -1745,6 +1829,36 @@ void RNA_property_string_set(PointerRNA *ptr, PropertyRNA *prop, const char *val
}
}
+void RNA_property_string_get_default(PointerRNA *ptr, PropertyRNA *prop, char *value)
+{
+ StringPropertyRNA *sprop= (StringPropertyRNA*)prop;
+ strcpy(value, sprop->defaultvalue);
+}
+
+char *RNA_property_string_get_default_alloc(PointerRNA *ptr, PropertyRNA *prop, char *fixedbuf, int fixedlen)
+{
+ char *buf;
+ int length;
+
+ length= RNA_property_string_default_length(ptr, prop);
+
+ if(length+1 < fixedlen)
+ buf= fixedbuf;
+ else
+ buf= MEM_callocN(sizeof(char)*(length+1), "RNA_string_get_alloc");
+
+ RNA_property_string_get_default(ptr, prop, buf);
+
+ return buf;
+}
+
+/* this is the length without \0 terminator */
+int RNA_property_string_default_length(PointerRNA *ptr, PropertyRNA *prop)
+{
+ StringPropertyRNA *sprop= (StringPropertyRNA*)prop;
+ return strlen(sprop->defaultvalue);
+}
+
int RNA_property_enum_get(PointerRNA *ptr, PropertyRNA *prop)
{
EnumPropertyRNA *eprop= (EnumPropertyRNA*)prop;
@@ -1825,8 +1939,12 @@ void RNA_property_pointer_set(PointerRNA *ptr, PropertyRNA *prop, PointerRNA ptr
else {
PointerPropertyRNA *pprop= (PointerPropertyRNA*)prop;
- if(pprop->set && !((prop->flag & PROP_NEVER_NULL) && ptr_value.data == NULL))
+ if( pprop->set &&
+ !((prop->flag & PROP_NEVER_NULL) && ptr_value.data == NULL) &&
+ !((prop->flag & PROP_ID_SELF_CHECK) && ptr->id.data == ptr_value.id.data)
+ ) {
pprop->set(ptr, ptr_value);
+ }
}
}
@@ -1962,7 +2080,7 @@ void RNA_property_collection_add(PointerRNA *ptr, PropertyRNA *prop, PointerRNA
item= IDP_New(IDP_GROUP, val, "");
IDP_AppendArray(idprop, item);
- IDP_FreeProperty(item);
+ // IDP_FreeProperty(item); // IDP_AppendArray does a shallow copy (memcpy), only free memory
MEM_freeN(item);
}
else if(prop->flag & PROP_IDPROPERTY) {
@@ -1976,7 +2094,7 @@ void RNA_property_collection_add(PointerRNA *ptr, PropertyRNA *prop, PointerRNA
item= IDP_New(IDP_GROUP, val, "");
IDP_AppendArray(idprop, item);
- IDP_FreeProperty(item);
+ // IDP_FreeProperty(item); // IDP_AppendArray does a shallow copy (memcpy), only free memory
MEM_freeN(item);
}
}
@@ -2216,6 +2334,7 @@ int RNA_property_collection_raw_array(PointerRNA *ptr, PropertyRNA *prop, Proper
case PROP_RAW_INT: ((int*)raw.array)[a] = (int)var; break; \
case PROP_RAW_FLOAT: ((float*)raw.array)[a] = (float)var; break; \
case PROP_RAW_DOUBLE: ((double*)raw.array)[a] = (double)var; break; \
+ default: break; \
} \
}
@@ -3176,6 +3295,20 @@ void RNA_enum_set(PointerRNA *ptr, const char *name, int value)
printf("RNA_enum_set: %s.%s not found.\n", ptr->type->identifier, name);
}
+void RNA_enum_set_identifier(PointerRNA *ptr, const char *name, const char *id)
+{
+ PropertyRNA *prop= RNA_struct_find_property(ptr, name);
+
+ if(prop) {
+ int value;
+ if(RNA_property_enum_value(NULL, ptr, prop, id, &value))
+ RNA_property_enum_set(ptr, prop, value);
+ else
+ printf("RNA_enum_set_identifier: %s.%s has no enum id '%s'.\n", ptr->type->identifier, name, id);
+ } else
+ printf("RNA_enum_set_identifier: %s.%s not found.\n", ptr->type->identifier, name);
+}
+
int RNA_enum_is_equal(bContext *C, PointerRNA *ptr, const char *name, const char *enumname)
{
PropertyRNA *prop= RNA_struct_find_property(ptr, name);
@@ -3587,7 +3720,7 @@ ParameterList *RNA_parameter_list_create(ParameterList *parms, PointerRNA *ptr,
/* allocate data */
for(parm= func->cont.properties.first; parm; parm= parm->next)
- tot+= rna_parameter_size(parm);
+ tot+= rna_parameter_size_alloc(parm);
parms->data= MEM_callocN(tot, "RNA_parameter_list_create");
parms->func= func;
@@ -3628,7 +3761,11 @@ ParameterList *RNA_parameter_list_create(ParameterList *parms, PointerRNA *ptr,
}
}
- data= ((char*)data) + size;
+ /* set length to 0 */
+ if (parm->flag & PROP_DYNAMIC)
+ *((int *)(((char *)data) + size))= 0;
+
+ data= ((char*)data) + rna_parameter_size_alloc(parm);
}
return parms;
@@ -3650,7 +3787,7 @@ void RNA_parameter_list_free(ParameterList *parms)
MEM_freeN(array);
}
- tot+= rna_parameter_size(parm);
+ tot+= rna_parameter_size_alloc(parm);
}
MEM_freeN(parms->data);
@@ -3676,7 +3813,7 @@ void RNA_parameter_list_begin(ParameterList *parms, ParameterIterator *iter)
iter->offset= 0;
if(iter->valid) {
- iter->size= rna_parameter_size(iter->parm);
+ iter->size= rna_parameter_size_alloc(iter->parm);
iter->data= (((char*)iter->parms->data)+iter->offset);
ptype= RNA_property_type(iter->parm);
}
@@ -3691,7 +3828,7 @@ void RNA_parameter_list_next(ParameterIterator *iter)
iter->valid= iter->parm != NULL;
if(iter->valid) {
- iter->size= rna_parameter_size(iter->parm);
+ iter->size= rna_parameter_size_alloc(iter->parm);
iter->data= (((char*)iter->parms->data)+iter->offset);
ptype= RNA_property_type(iter->parm);
}
@@ -3762,6 +3899,51 @@ void RNA_parameter_set_lookup(ParameterList *parms, const char *identifier, void
RNA_parameter_set(parms, parm, value);
}
+int RNA_parameter_length_get(ParameterList *parms, PropertyRNA *parm)
+{
+ ParameterIterator iter;
+ int len= 0;
+
+ RNA_parameter_list_begin(parms, &iter);
+
+ for(; iter.valid; RNA_parameter_list_next(&iter))
+ if(iter.parm==parm)
+ break;
+
+ if(iter.valid)
+ len= RNA_parameter_length_get_data(parms, parm, iter.data);
+
+ RNA_parameter_list_end(&iter);
+
+ return len;
+}
+
+void RNA_parameter_length_set(ParameterList *parms, PropertyRNA *parm, int length)
+{
+ ParameterIterator iter;
+
+ RNA_parameter_list_begin(parms, &iter);
+
+ for(; iter.valid; RNA_parameter_list_next(&iter))
+ if(iter.parm==parm)
+ break;
+
+ if(iter.valid)
+ RNA_parameter_length_set_data(parms, parm, iter.data, length);
+
+ RNA_parameter_list_end(&iter);
+}
+
+int RNA_parameter_length_get_data(ParameterList *parms, PropertyRNA *parm, void *data)
+{
+ return *((int *)(((char *)data) + rna_parameter_size(parm)));
+}
+
+void RNA_parameter_length_set_data(ParameterList *parms, PropertyRNA *parm, void *data, int length)
+{
+ *((int *)(((char *)data) + rna_parameter_size(parm)))= length;
+}
+
int RNA_function_call(bContext *C, ReportList *reports, PointerRNA *ptr, FunctionRNA *func, ParameterList *parms)
{
if(func->call) {
@@ -4006,7 +4188,7 @@ int RNA_function_call_direct_va(bContext *C, ReportList *reports, PointerRNA *pt
retdata= iter.data;
continue;
}
- else if (flag & PROP_RETURN) {
+ else if (flag & PROP_OUTPUT) {
continue;
}
@@ -4236,8 +4418,15 @@ int RNA_property_reset(PointerRNA *ptr, PropertyRNA *prop, int index)
return 1;
}
+ case PROP_STRING:
+ {
+ char *value= RNA_property_string_get_default_alloc(ptr, prop, NULL, 0);
+ RNA_property_string_set(ptr, prop, value);
+ MEM_freeN(value);
+ return 1;
+ }
+
//case PROP_POINTER:
- //case PROP_STRING:
default:
// FIXME: many of the other types such as strings and pointers need this implemented too!
return 0;
diff --git a/source/blender/makesrna/intern/rna_action.c b/source/blender/makesrna/intern/rna_action.c
index b9c5661b771..e642d9546e8 100644
--- a/source/blender/makesrna/intern/rna_action.c
+++ b/source/blender/makesrna/intern/rna_action.c
@@ -15,7 +15,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor(s): Blender Foundation (2008), Roland Hess, Joshua Leung
*
@@ -64,116 +64,137 @@ static void rna_def_dopesheet(BlenderRNA *brna)
srna= RNA_def_struct(brna, "DopeSheet", NULL);
RNA_def_struct_sdna(srna, "bDopeSheet");
- RNA_def_struct_ui_text(srna, "DopeSheet", "Storage for Dopesheet/Grease-Pencil Editor data.");
-
+ RNA_def_struct_ui_text(srna, "DopeSheet", "Settings for filtering the channels shown in Animation Editors");
+
+ /* Source of DopeSheet data */
prop= RNA_def_property(srna, "source", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "ID");
- RNA_def_property_ui_text(prop, "Source", "ID-Block representing source data, currently ID_SCE (for Dopesheet), and ID_SC (for Grease Pencil).");
-
+ RNA_def_property_ui_text(prop, "Source", "ID-Block representing source data, currently ID_SCE (for Dopesheet), and ID_SC (for Grease Pencil)");
+
+ /* General Filtering Settings */
prop= RNA_def_property(srna, "only_selected", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "filterflag", ADS_FILTER_ONLYSEL);
- RNA_def_property_ui_text(prop, "Only Selected", "Only include channels relating to selected objects and data.");
+ RNA_def_property_ui_text(prop, "Only Selected", "Only include channels relating to selected objects and data");
RNA_def_property_ui_icon(prop, ICON_RESTRICT_SELECT_OFF, 0);
RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN_EDIT, NULL);
-
- prop= RNA_def_property(srna, "only_nla", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "filterflag", ADS_FILTER_ONLYNLA);
- RNA_def_property_ui_text(prop, "Only NLA", "Only include NLA data from Animation data.");
+
+ /* Object Group Filtering Settings */
+ prop= RNA_def_property(srna, "only_group_objects", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "filterflag", ADS_FILTER_ONLYOBGROUP);
+ RNA_def_property_ui_text(prop, "Only Objects in Group", "Only include channels from Objects in the specified Group");
+ RNA_def_property_ui_icon(prop, ICON_GROUP, 0);
RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN_EDIT, NULL);
-
- prop= RNA_def_property(srna, "use_filter", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "filterflag", ADS_FILTER_SELEDIT);
- RNA_def_property_ui_text(prop, "Use Filter", "Indicates if filtering options must be taken into account.");
+
+ prop= RNA_def_property(srna, "filtering_group", PROP_POINTER, PROP_NONE);
+ RNA_def_property_pointer_sdna(prop, NULL, "filter_grp");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Filtering Group", "Group that included Object should be a member of");
RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN_EDIT, NULL);
-
+
+ /* NLA Specific Settings */
+ prop= RNA_def_property(srna, "include_missing_nla", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "filterflag", ADS_FILTER_NLA_NOACT);
+ RNA_def_property_ui_text(prop, "Include Missing NLA", "Include Animation Data blocks with no NLA data. (NLA Editor only)");
+ RNA_def_property_ui_icon(prop, ICON_ACTION, 0);
+ RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN_EDIT, NULL);
+
+ /* Summary Settings (DopeSheet editors only) */
prop= RNA_def_property(srna, "display_summary", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "filterflag", ADS_FILTER_SUMMARY);
RNA_def_property_ui_text(prop, "Display Summary", "Display an additional 'summary' line. (DopeSheet Editors only)");
RNA_def_property_ui_icon(prop, ICON_BORDERMOVE, 0);
RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN_EDIT, NULL);
-
+
+ prop= RNA_def_property(srna, "collapse_summary", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", ADS_FLAG_SUMMARY_COLLAPSED);
+ RNA_def_property_ui_text(prop, "Collapse Summary", "Collapse summary when shown, so all other channels get hidden. (DopeSheet Editors Only)");
+ RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN_EDIT, NULL);
+
+
+ /* General DataType Filtering Settings */
+ prop= RNA_def_property(srna, "display_transforms", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "filterflag", ADS_FILTER_NOOBJ);
+ RNA_def_property_ui_text(prop, "Display Transforms", "Include visualization of Object-level Animation data (mostly Transforms)");
+ RNA_def_property_ui_icon(prop, ICON_MANIPUL, 0); // XXX?
+ RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN_EDIT, NULL);
+
prop= RNA_def_property(srna, "display_shapekeys", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "filterflag", ADS_FILTER_NOSHAPEKEYS);
- RNA_def_property_ui_text(prop, "Display Shapekeys", "Include visualization of ShapeKey related Animation data.");
+ RNA_def_property_ui_text(prop, "Display Shapekeys", "Include visualization of ShapeKey related Animation data");
RNA_def_property_ui_icon(prop, ICON_SHAPEKEY_DATA, 0);
RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN_EDIT, NULL);
-
+
prop= RNA_def_property(srna, "display_mesh", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "filterflag", ADS_FILTER_NOMESH);
- RNA_def_property_ui_text(prop, "Display Meshes", "Include visualization of Mesh related Animation data.");
+ RNA_def_property_ui_text(prop, "Display Meshes", "Include visualization of Mesh related Animation data");
RNA_def_property_ui_icon(prop, ICON_MESH_DATA, 0);
RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN_EDIT, NULL);
prop= RNA_def_property(srna, "display_camera", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "filterflag", ADS_FILTER_NOCAM);
- RNA_def_property_ui_text(prop, "Display Camera", "Include visualization of Camera related Animation data.");
+ RNA_def_property_ui_text(prop, "Display Camera", "Include visualization of Camera related Animation data");
RNA_def_property_ui_icon(prop, ICON_CAMERA_DATA, 0);
RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN_EDIT, NULL);
-
+
prop= RNA_def_property(srna, "display_material", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "filterflag", ADS_FILTER_NOMAT);
- RNA_def_property_ui_text(prop, "Display Material", "Include visualization of Material related Animation data.");
+ RNA_def_property_ui_text(prop, "Display Material", "Include visualization of Material related Animation data");
RNA_def_property_ui_icon(prop, ICON_MATERIAL_DATA, 0);
RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN_EDIT, NULL);
-
+
prop= RNA_def_property(srna, "display_lamp", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "filterflag", ADS_FILTER_NOLAM);
- RNA_def_property_ui_text(prop, "Display Lamp", "Include visualization of Lamp related Animation data.");
+ RNA_def_property_ui_text(prop, "Display Lamp", "Include visualization of Lamp related Animation data");
RNA_def_property_ui_icon(prop, ICON_LAMP_DATA, 0);
RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN_EDIT, NULL);
-
+
+ prop= RNA_def_property(srna, "display_texture", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "filterflag", ADS_FILTER_NOTEX);
+ RNA_def_property_ui_text(prop, "Display Texture", "Include visualization of Texture related Animation data");
+ RNA_def_property_ui_icon(prop, ICON_TEXTURE_DATA, 0);
+ RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN_EDIT, NULL);
+
prop= RNA_def_property(srna, "display_curve", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "filterflag", ADS_FILTER_NOCUR);
- RNA_def_property_ui_text(prop, "Display Curve", "Include visualization of Curve related Animation data.");
+ RNA_def_property_ui_text(prop, "Display Curve", "Include visualization of Curve related Animation data");
RNA_def_property_ui_icon(prop, ICON_CURVE_DATA, 0);
RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN_EDIT, NULL);
-
+
prop= RNA_def_property(srna, "display_world", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "filterflag", ADS_FILTER_NOWOR);
- RNA_def_property_ui_text(prop, "Display World", "Include visualization of World related Animation data.");
+ RNA_def_property_ui_text(prop, "Display World", "Include visualization of World related Animation data");
RNA_def_property_ui_icon(prop, ICON_WORLD_DATA, 0);
RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN_EDIT, NULL);
-
+
prop= RNA_def_property(srna, "display_scene", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "filterflag", ADS_FILTER_NOSCE);
- RNA_def_property_ui_text(prop, "Display Scene", "Include visualization of Scene related Animation data.");
+ RNA_def_property_ui_text(prop, "Display Scene", "Include visualization of Scene related Animation data");
RNA_def_property_ui_icon(prop, ICON_SCENE_DATA, 0);
RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN_EDIT, NULL);
-
+
prop= RNA_def_property(srna, "display_particle", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "filterflag", ADS_FILTER_NOPART);
- RNA_def_property_ui_text(prop, "Display Particle", "Include visualization of Particle related Animation data.");
+ RNA_def_property_ui_text(prop, "Display Particle", "Include visualization of Particle related Animation data");
RNA_def_property_ui_icon(prop, ICON_PARTICLE_DATA, 0);
RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN_EDIT, NULL);
-
+
prop= RNA_def_property(srna, "display_metaball", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "filterflag", ADS_FILTER_NOMBA);
- RNA_def_property_ui_text(prop, "Display Metaball", "Include visualization of Metaball related Animation data.");
+ RNA_def_property_ui_text(prop, "Display Metaball", "Include visualization of Metaball related Animation data");
RNA_def_property_ui_icon(prop, ICON_META_DATA, 0);
RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN_EDIT, NULL);
-
+
prop= RNA_def_property(srna, "display_armature", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "filterflag", ADS_FILTER_NOARM);
- RNA_def_property_ui_text(prop, "Display Armature", "Include visualization of Armature related Animation data.");
+ RNA_def_property_ui_text(prop, "Display Armature", "Include visualization of Armature related Animation data");
RNA_def_property_ui_icon(prop, ICON_ARMATURE_DATA, 0);
RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN_EDIT, NULL);
-
+
prop= RNA_def_property(srna, "display_node", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "filterflag", ADS_FILTER_NONTREE);
- RNA_def_property_ui_text(prop, "Display Node", "Include visualization of Node related Animation data.");
+ RNA_def_property_ui_text(prop, "Display Node", "Include visualization of Node related Animation data");
RNA_def_property_ui_icon(prop, ICON_NODETREE, 0);
RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN_EDIT, NULL);
-
- prop= RNA_def_property(srna, "include_missing_nla", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_negative_sdna(prop, NULL, "filterflag", ADS_FILTER_NLA_NOACT);
- RNA_def_property_ui_text(prop, "Include Missing NLA", "Include Animation Data blocks with no NLA data. (NLA Editor only)");
- RNA_def_property_ui_icon(prop, ICON_ACTION, 0);
- RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN_EDIT, NULL);
-
- prop= RNA_def_property(srna, "collapse_summary", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", ADS_FLAG_SUMMARY_COLLAPSED);
- RNA_def_property_ui_text(prop, "Collapse Summary", "Collapse summary when shown, so all other channels get hidden. (DopeSheet Editors Only)");
- RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN_EDIT, NULL);
}
static void rna_def_action_group(BlenderRNA *brna)
@@ -183,11 +204,12 @@ static void rna_def_action_group(BlenderRNA *brna)
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.");
+ 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);
+ RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN_EDIT, NULL);
/* WARNING: be very careful when working with this list, since the endpoint is not
* defined like a standard ListBase. Adding/removing channels from this list needs
@@ -200,23 +222,27 @@ static 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_collection_funcs(prop, 0, "rna_ActionGroup_channels_next", 0, 0, 0, 0, 0);
- RNA_def_property_ui_text(prop, "Channels", "F-Curves in this group.");
+ 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.");
+ RNA_def_property_ui_text(prop, "Selected", "Action Group is selected");
+ RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN_SELECT, NULL);
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.");
+ RNA_def_property_ui_text(prop, "Locked", "Action Group is locked");
+ RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN_EDIT, NULL);
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.");
+ RNA_def_property_ui_text(prop, "Expanded", "Action Group is expanded");
+ RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN_EDIT, NULL);
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.");
+ RNA_def_property_ui_text(prop, "Custom Color", "Index of custom color set");
+ RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN_EDIT, NULL);
}
static void rna_def_action(BlenderRNA *brna)
@@ -226,23 +252,23 @@ static void rna_def_action(BlenderRNA *brna)
srna= RNA_def_struct(brna, "Action", "ID");
RNA_def_struct_sdna(srna, "bAction");
- RNA_def_struct_ui_text(srna, "Action", "A collection of F-Curves for animation.");
+ 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.");
+ 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.");
+ 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");
- RNA_def_property_ui_text(prop, "Pose Markers", "Markers specific to this Action, for labeling poses.");
+ RNA_def_property_ui_text(prop, "Pose Markers", "Markers specific to this Action, for labeling poses");
RNA_api_action(srna);
}
diff --git a/source/blender/makesrna/intern/rna_action_api.c b/source/blender/makesrna/intern/rna_action_api.c
index 991a8251cc5..b09e91f1119 100644
--- a/source/blender/makesrna/intern/rna_action_api.c
+++ b/source/blender/makesrna/intern/rna_action_api.c
@@ -13,7 +13,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* The Original Code is Copyright (C) 2009 Blender Foundation.
* All rights reserved.
@@ -41,40 +41,35 @@
#include "DNA_anim_types.h"
#include "DNA_curve_types.h"
-/* XXX disabled until RNA allows returning arrays */
-#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)
+void rna_Action_get_frame_range(bAction *act, int **frame_range, int *length_r)
{
int *ret;
float start, end;
calc_action_range(act, &start, &end, 1);
- *ret_length= 2;
- ret= MEM_callocN(*ret_length * sizeof(int), "rna_Action_get_frame_range");
+ *length_r= 2;
+ ret= MEM_callocN(*length_r * sizeof(int), "rna_Action_get_frame_range");
ret[0]= (int)start;
ret[1]= (int)end;
-
- return ret;
+
+ *frame_range= ret;
}
-#endif
#else
void RNA_api_action(StructRNA *srna)
{
-#if 0
FunctionRNA *func;
PropertyRNA *parm;
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_ARRAY);
- RNA_def_function_return(func, parm);
-#endif
+ RNA_def_property_flag(parm, PROP_DYNAMIC);
+ RNA_def_function_output(func, parm);
}
#endif
diff --git a/source/blender/makesrna/intern/rna_actuator.c b/source/blender/makesrna/intern/rna_actuator.c
index ce83d1c469b..0cb8ff39a89 100644
--- a/source/blender/makesrna/intern/rna_actuator.c
+++ b/source/blender/makesrna/intern/rna_actuator.c
@@ -15,7 +15,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor(s): Blender Foundation (2008).
*
@@ -30,18 +30,65 @@
#include "rna_internal.h"
#include "DNA_actuator_types.h"
+#include "DNA_scene_types.h" // for MAXFRAME
+
+#include "WM_types.h"
#ifdef RNA_RUNTIME
+static StructRNA* rna_Actuator_refine(struct PointerRNA *ptr)
+{
+ bActuator *actuator= (bActuator*)ptr->data;
+
+ switch(actuator->type) {
+ case ACT_OBJECT:
+ return &RNA_ObjectActuator;
+ case ACT_IPO:
+ return &RNA_IpoActuator;
+ case ACT_CAMERA:
+ return &RNA_CameraActuator;
+ case ACT_SOUND:
+ return &RNA_SoundActuator;
+ case ACT_PROPERTY:
+ return &RNA_PropertyActuator;
+ case ACT_CONSTRAINT:
+ return &RNA_ConstraintActuator;
+ case ACT_EDIT_OBJECT:
+ return &RNA_EditObjectActuator;
+ case ACT_SCENE:
+ return &RNA_SceneActuator;
+ case ACT_RANDOM:
+ return &RNA_RandomActuator;
+ case ACT_MESSAGE:
+ return &RNA_MessageActuator;
+ case ACT_GAME:
+ return &RNA_GameActuator;
+ case ACT_VISIBILITY:
+ return &RNA_VisibilityActuator;
+ case ACT_2DFILTER:
+ return &RNA_TwoDFilterActuator;
+ case ACT_PARENT:
+ return &RNA_ParentActuator;
+ case ACT_SHAPEACTION:
+ return &RNA_ShapeActionActuator;
+ case ACT_STATE:
+ return &RNA_StateActuator;
+ case ACT_ARMATURE:
+ return &RNA_ArmatureActuator;
+ default:
+ return &RNA_Actuator;
+ }
+}
+
#else
-void RNA_def_actuator(BlenderRNA *brna)
+void rna_def_actuator(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
static EnumPropertyItem actuator_type_items[] ={
- {ACT_OBJECT, "OBJECT", 0, "Object", ""},
+ {ACT_OBJECT, "OBJECT", 0, "Motion", ""},
{ACT_IPO, "IPO", 0, "IPO", ""},
{ACT_CAMERA, "CAMERA", 0, "Camera", ""},
{ACT_SOUND, "SOUND", 0, "Sound", ""},
@@ -51,7 +98,7 @@ void RNA_def_actuator(BlenderRNA *brna)
{ACT_SCENE, "SCENE", 0, "Scene", ""},
{ACT_RANDOM, "RANDOM", 0, "Random", ""},
{ACT_MESSAGE, "MESSAGE", 0, "Message", ""},
- {ACT_ACTION, "ACTION", 0, "Action", ""},
+ {ACT_ACTION, "ACTION", 0, "Action", ""},
{ACT_GAME, "GAME", 0, "Game", ""},
{ACT_VISIBILITY, "VISIBILITY", 0, "Visibility", ""},
{ACT_2DFILTER, "FILTER_2D", 0, "2D Filter", ""},
@@ -62,9 +109,9 @@ void RNA_def_actuator(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "Actuator", NULL);
- RNA_def_struct_ui_text(srna, "Actuator", "Game engine logic brick to apply actions in the game engine.");
-
+ RNA_def_struct_ui_text(srna, "Actuator", "Actuator to apply actions in the game engine");
RNA_def_struct_sdna(srna, "bActuator");
+ RNA_def_struct_refine_func(srna, "rna_Actuator_refine");
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_ui_text(prop, "Name", "");
@@ -77,5 +124,1119 @@ void RNA_def_actuator(BlenderRNA *brna)
}
+static void rna_def_object_actuator(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA* prop;
+
+ static EnumPropertyItem prop_type_items[] ={
+ {ACT_OBJECT_NORMAL, "OBJECT_NORMAL", 0, "Simple motion", ""},
+ {ACT_OBJECT_SERVO, "OBJECT_SERVO", 0, "Servo Control", ""},
+ {0, NULL, 0, NULL, NULL}};
+
+ srna= RNA_def_struct(brna, "ObjectActuator", "Actuator");
+ RNA_def_struct_ui_text(srna, "Motion Actuator", "Actuator to control the object movement");
+ RNA_def_struct_sdna_from(srna, "bObjectActuator", "data");
+
+
+ prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_items(prop, prop_type_items);
+ RNA_def_property_ui_text(prop, "Motion Type", "Specify the motion system");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+ // XXX otype = type
+
+ prop= RNA_def_property(srna, "reference_object", PROP_POINTER, PROP_NONE);
+ RNA_def_property_struct_type(prop, "Object");
+ RNA_def_property_pointer_sdna(prop, NULL, "reference");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Reference Object", "Reference object for velocity calculation, leave empty for world reference");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "damping", PROP_INT, PROP_NONE);
+ RNA_def_property_ui_range(prop, 0, 1000, 1, 1);
+ RNA_def_property_ui_text(prop, "Damping", "Number of frames to reach the target velocity");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "proportional_coefficient", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "forcerot[0]");
+ RNA_def_property_ui_range(prop, 0.0, 200.0, 1.0, 0.1);
+ RNA_def_property_ui_text(prop, "Proportional Coefficient", "Typical value is 60x integral coefficient");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "integral_coefficient", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "forcerot[1]");
+ RNA_def_property_ui_range(prop, 0.0, 3.0, 0.1, 0.01);
+ RNA_def_property_ui_text(prop, "Integral Coefficient", "Low value (0.01) for slow response, high value (0.5) for fast response");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "derivate_coefficient", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "forcerot[2]");
+ RNA_def_property_ui_range(prop, -100.0, 100.0, 1.0, 0.1);
+ RNA_def_property_ui_text(prop, "Derivate Coefficient", "Not required, high values can cause instability");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ /* XXX We need one of those special get/set functions here:
+ int offset
+ if (flag & ACT_SERVO_LIMIT_X):
+ offset = 0
+ elif (flag & ACT_SERVO_LIMIT_Y):
+ offset = 1
+ elif (flag & ACT_SERVO_LIMIT_Z):
+ offset = 2
+
+ prop= RNA_def_property(srna, "force_max", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "dloc[offset]");
+ RNA_def_property_ui_range(prop, -100.0, 100.0, 1.0, 0.1);
+ RNA_def_property_ui_text(prop, "Max", "Set the upper limit for force");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "force_max", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "drot[offset]");
+ RNA_def_property_ui_range(prop, -100.0, 100.0, 1.0, 0.1);
+ RNA_def_property_ui_text(prop, "Max", "Set the upper limit for force");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+ */
+
+ /* floats 3 Arrays*/
+ prop= RNA_def_property(srna, "loc", PROP_FLOAT, PROP_TRANSLATION);
+ RNA_def_property_float_sdna(prop, NULL, "dloc");
+ RNA_def_property_array(prop, 3);
+ RNA_def_property_ui_range(prop, -10000.0, 10000.0, 0.1, 0.001);
+ RNA_def_property_ui_text(prop, "Loc", "Sets the location");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "rot", PROP_FLOAT, PROP_TRANSLATION);
+ RNA_def_property_float_sdna(prop, NULL, "drot");
+ RNA_def_property_array(prop, 3);
+ RNA_def_property_ui_range(prop, -10000.0, 10000.0, 0.1, 0.001);
+ RNA_def_property_ui_text(prop, "Rot", "Sets the rotation");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "force", PROP_FLOAT, PROP_TRANSLATION);
+ RNA_def_property_float_sdna(prop, NULL, "forceloc");
+ RNA_def_property_array(prop, 3);
+ RNA_def_property_ui_range(prop, -10000.0, 10000.0, 0.1, 0.001);
+ RNA_def_property_ui_text(prop, "Force", "Sets the force");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "torque", PROP_FLOAT, PROP_TRANSLATION);
+ RNA_def_property_float_sdna(prop, NULL, "forcerot");
+ RNA_def_property_array(prop, 3);
+ RNA_def_property_ui_range(prop, -10000.0, 10000.0, 0.1, 0.001);
+ RNA_def_property_ui_text(prop, "Torque", "Sets the torque");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "linear_velocity", PROP_FLOAT, PROP_TRANSLATION);
+ RNA_def_property_float_sdna(prop, NULL, "linearvelocity");
+ RNA_def_property_array(prop, 3);
+ RNA_def_property_ui_range(prop, -10000.0, 10000.0, 0.1, 0.001);
+ RNA_def_property_ui_text(prop, "Linear Velocity", "Sets the linear velocity (in Servo mode it sets the target relative linear velocity, it will be achieved by automatic application of force. Null velocity is a valid target)");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "angular_velocity", PROP_FLOAT, PROP_TRANSLATION);
+ RNA_def_property_float_sdna(prop, NULL, "angularvelocity");
+ RNA_def_property_array(prop, 3);
+ RNA_def_property_ui_range(prop, -10000.0, 10000.0, 0.1, 0.001);
+ RNA_def_property_ui_text(prop, "Angular Velocity", "Sets the angular velocity");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ /* booleans */
+ prop= RNA_def_property(srna, "local_location", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_DLOC_LOCAL);
+ RNA_def_property_ui_text(prop, "L", "Location is defined in local coordinates");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "local_rotation", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_DROT_LOCAL);
+ RNA_def_property_ui_text(prop, "L", "Rotation is defined in local coordinates");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "local_force", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_FORCE_LOCAL);
+ RNA_def_property_ui_text(prop, "L", "Force is defined in local coordinates");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "local_torque", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_TORQUE_LOCAL);
+ RNA_def_property_ui_text(prop, "L", "Torque is defined in local coordinates");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "local_linear_velocity", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_LIN_VEL_LOCAL);
+ RNA_def_property_ui_text(prop, "L", "Velocity is defined in local coordinates");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "local_angular_velocity", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_ANG_VEL_LOCAL);
+ RNA_def_property_ui_text(prop, "L", "Angular velocity is defined in local coordinates");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "add_linear_velocity", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_ADD_LIN_VEL);
+ RNA_def_property_ui_text(prop, "Add", "Toggles between ADD and SET linV");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "servo_limit_x", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_SERVO_LIMIT_X);
+ RNA_def_property_ui_text(prop, "X", "Set limit to force along the X axis");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "servo_limit_y", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_SERVO_LIMIT_Y);
+ RNA_def_property_ui_text(prop, "Y", "Set limit to force along the Y axis");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "servo_limit_z", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_SERVO_LIMIT_Z);
+ RNA_def_property_ui_text(prop, "Z", "Set limit to force along the Z axis");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+}
+
+static void rna_def_ipo_actuator(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ static EnumPropertyItem prop_type_items[] ={
+ {ACT_IPO_PLAY, "PLAY", 0, "Play", ""},
+ {ACT_IPO_PINGPONG, "PINGPONG", 0, "Ping Pong", ""},
+ {ACT_IPO_FLIPPER, "FLIPPER", 0, "Flipper", ""},
+ {ACT_IPO_LOOP_STOP, "STOP", 0, "Loop Stop", ""},
+ {ACT_IPO_LOOP_END, "END", 0, "Loop End", ""},
+// {ACT_IPO_KEY2KEY, "IPOCHILD", 0, "Key to Key", ""},
+ {ACT_IPO_FROM_PROP, "PROP", 0, "Property", ""},
+ {0, NULL, 0, NULL, NULL}};
+
+ srna= RNA_def_struct(brna, "IpoActuator", "Actuator");
+ RNA_def_struct_ui_text(srna, "Ipo Actuator", "Actuator to animate the object");
+ RNA_def_struct_sdna_from(srna, "bIpoActuator", "data");
+
+ prop= RNA_def_property(srna, "play_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, "Ipo Type", "Specify the way you want to play the animation");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "start_frame", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "sta");
+ RNA_def_property_ui_range(prop, 1, MAXFRAME, 1, 1);
+ RNA_def_property_ui_text(prop, "Start Frame", "");
+ RNA_def_property_update(prop, NC_SCENE, NULL);
+
+ prop= RNA_def_property(srna, "end_frame", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "end");
+ RNA_def_property_ui_range(prop, 1, MAXFRAME, 1, 1);
+ RNA_def_property_ui_text(prop, "End Frame", "");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "property", PROP_STRING, PROP_NONE);
+ RNA_def_property_string_sdna(prop, NULL, "name");
+ RNA_def_property_ui_text(prop, "Property", "Use this property to define the Ipo position");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "frame_property", PROP_STRING, PROP_NONE);
+ RNA_def_property_string_sdna(prop, NULL, "frameProp");
+ RNA_def_property_ui_text(prop, "Frame Property", "Assign the action's current frame number to this property");
+
+ /* booleans */
+ prop= RNA_def_property(srna, "force", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_IPOFORCE);
+ RNA_def_property_ui_text(prop, "Force", "Apply Ipo as a global or local force depending on the local option (dynamic objects only)");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+// logic_window::change_ipo_actuator
+// RNA_def_property_boolean_funcs(prop, "rna_Actuator_Ipo_get", "rna_Actuator_Ipo_get", "rna_Actuator_Ipo_range");
+
+ prop= RNA_def_property(srna, "local", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_IPOLOCAL);
+ RNA_def_property_ui_text(prop, "L", "Let the ipo acts in local coordinates, used in Force and Add mode");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "child", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_IPOCHILD);
+ RNA_def_property_ui_text(prop, "Child", "Update IPO on all children Objects as well");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "add", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_IPOADD);
+ RNA_def_property_ui_text(prop, "Add", "Ipo is added to the current loc/rot/scale in global or local coordinate according to Local flag");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+// logic_window::change_ipo_actuator
+// RNA_def_property_boolean_funcs(prop, "rna_Actuator_Ipo_get", "rna_Actuator_Ipo_get", "rna_Actuator_Ipo_range");
+}
+
+static void rna_def_camera_actuator(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ static EnumPropertyItem prop_axis_items[] ={
+ {(float)'x', "X", 0, "X", "Camera tries to get behind the X axis"},
+ {(float)'y', "Y", 0, "Y", "Camera tries to get behind the Y axis"},
+ {0, NULL, 0, NULL, NULL}};
+
+ srna= RNA_def_struct(brna, "CameraActuator", "Actuator");
+ RNA_def_struct_ui_text(srna, "Camera Actuator", "Actuator to ..");
+ RNA_def_struct_sdna_from(srna, "bCameraActuator", "data");
+
+ prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
+ RNA_def_property_struct_type(prop, "Object");
+ RNA_def_property_pointer_sdna(prop, NULL, "ob");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Camera Object", "Look at this Object");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ /* floats */
+ prop= RNA_def_property(srna, "height", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_ui_range(prop, 0.0, 20.0, 0.1, 0.1);
+ RNA_def_property_ui_text(prop, "Height", "");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "min", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_ui_range(prop, 0.0, 20.0, 0.1, 0.1);
+ RNA_def_property_ui_text(prop, "Min", "");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "max", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_ui_range(prop, 0.0, 20.0, 0.1, 0.1);
+ RNA_def_property_ui_text(prop, "Max", "");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ /* x/y */
+ // It could be changed to be a regular ENUM instead of this weird "(float)string enum"
+ prop= RNA_def_property(srna, "axis", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "axis");
+ RNA_def_property_enum_items(prop, prop_axis_items);
+ RNA_def_property_ui_text(prop, "Axis", "Specify the axy the Camera will try to get behind");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+}
+
+static void rna_def_sound_actuator(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ static EnumPropertyItem prop_type_items[] ={
+ {ACT_SND_PLAY_STOP_SOUND, "PLAYSTOP", 0, "Play Stop", ""},
+ {ACT_SND_PLAY_END_SOUND, "PLAYEND", 0, "Play End", ""},
+ {ACT_SND_LOOP_STOP_SOUND, "LOOPSTOP", 0, "Loop Stop", ""},
+ {ACT_SND_LOOP_END_SOUND, "LOOPEND", 0, "Loop End", ""},
+ {ACT_SND_LOOP_BIDIRECTIONAL_SOUND, "LOOPBIDIRECTIONAL", 0, "Loop Bidirectional", ""},
+ {ACT_SND_LOOP_BIDIRECTIONAL_STOP_SOUND, "LOOPBIDIRECTIONALSTOP", 0, "Loop Bidirectional Stop", ""},
+ {0, NULL, 0, NULL, NULL}
+ };
+
+ srna= RNA_def_struct(brna, "SoundActuator", "Actuator");
+ RNA_def_struct_ui_text(srna, "Sound Actuator", "Actuator to handle sound");
+ RNA_def_struct_sdna_from(srna, "bSoundActuator", "data");
+
+ prop= RNA_def_property(srna, "sound", PROP_POINTER, PROP_NONE);
+ RNA_def_property_struct_type(prop, "Sound");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_struct_ui_text(srna, "Sound", "Sound file");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_items(prop, prop_type_items);
+ RNA_def_property_ui_text(prop, "Type", "");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "volume", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_ui_range(prop, 0.0, 1.0, 0.1, 0.01);
+ RNA_def_property_range(prop, 0.0, 2.0);
+ RNA_def_property_ui_text(prop, "Volume", "Sets the initial volume of the sound");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "pitch", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_ui_range(prop, -12.0, 12.0, 1.0, 0.1);
+ RNA_def_property_ui_text(prop, "Pitch", "Sets the pitch of the sound");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ /* floats - 3D Parameters */
+ prop= RNA_def_property(srna, "minimum_gain_3d", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "sound3D.min_gain");
+ RNA_def_property_ui_range(prop, 0.0, 1.0, 0.1, 0.01);
+ RNA_def_property_ui_text(prop, "Minimum Gain", "The minimum gain of the sound, no matter how far it is away");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "maximum_gain_3d", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "sound3D.max_gain");
+ RNA_def_property_ui_range(prop, 0.0, 1.0, 0.1, 0.01);
+ RNA_def_property_ui_text(prop, "Minimum Gain", "The maximum gain of the sound, no matter how near it is");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "reference_distance_3d", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "sound3D.reference_distance");
+ RNA_def_property_ui_range(prop, 0.0, FLT_MAX, 1.0, 0.01);
+ RNA_def_property_ui_text(prop, "Reference Distance", "The distance where the sound has a gain of 1.0");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "max_distance_3d", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "sound3D.max_distance");
+ RNA_def_property_ui_range(prop, 0.0, FLT_MAX, 1.0, 0.01);
+ RNA_def_property_ui_text(prop, "Maximum Distance", "The maximum distance at which you can hear the sound");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "rolloff_factor_3d", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "sound3D.rolloff_factor");
+ RNA_def_property_ui_range(prop, 0.0, 5.0, 1.0, 0.01);
+ RNA_def_property_ui_text(prop, "Rolloff", "The influence factor on volume depending on distance");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "cone_outer_gain_3d", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "sound3D.cone_outer_gain");
+ RNA_def_property_ui_range(prop, 0.0, 1.0, 0.1, 0.01);
+ RNA_def_property_ui_text(prop, "Cone Outer Gain", "The gain outside the outer cone. The gain in the outer cone will be interpolated between this value and the normal gain in the inner cone");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "cone_outer_angle_3d", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "sound3D.cone_outer_angle");
+ RNA_def_property_ui_range(prop, 0.0, 360.0, 1.0, 0.01);
+ RNA_def_property_ui_text(prop, "Cone Outer Angle", "The angle of the outer cone");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "cone_inner_angle_3d", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "sound3D.cone_inner_angle");
+ RNA_def_property_ui_range(prop, 0.0, 360.0, 1.0, 0.01);
+ RNA_def_property_ui_text(prop, "Cone Inner Angle", "The angle of the inner cone");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ /* booleans */
+ prop= RNA_def_property(srna, "enable_sound_3d", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_SND_3D_SOUND);
+ RNA_def_property_ui_text(prop, "3D Sound", "Enable/Disable 3D Sound");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+}
+
+static void rna_def_property_actuator(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ static EnumPropertyItem prop_type_items[] ={
+ {ACT_PROP_ASSIGN, "ASSIGN", 0, "Assign", ""},
+ {ACT_PROP_ADD, "ADD", 0, "Add", ""},
+ {ACT_PROP_COPY, "COPY", 0, "Copy", ""},
+ {ACT_PROP_TOGGLE, "TOGGLE", 0, "Toggle", "For bool/int/float/timer properties only"},
+ {0, NULL, 0, NULL, NULL}
+ };
+
+ srna= RNA_def_struct(brna, "PropertyActuator", "Actuator");
+ RNA_def_struct_ui_text(srna, "Property Actuator", "Actuator to handle properties");
+ RNA_def_struct_sdna_from(srna, "bPropertyActuator", "data");
+
+ prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_items(prop, prop_type_items);
+ RNA_def_property_ui_text(prop, "Mode", "");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "prop_name", PROP_STRING, PROP_NONE);
+ RNA_def_property_string_sdna(prop, NULL, "name");
+ RNA_def_property_ui_text(prop, "Property", "The name of the property");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "value", PROP_STRING, PROP_NONE);
+ RNA_def_property_ui_text(prop, "Value", "The value to use, use \"\" around strings");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+}
+
+static void rna_def_constraint_actuator(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ static EnumPropertyItem prop_type_items[] ={
+ {ACT_CONST_TYPE_LOC, "LOC", 0, "Location Constraint", ""},
+ {ACT_CONST_TYPE_DIST, "DIST", 0, "Distance Constraint", ""},
+ {ACT_CONST_TYPE_ORI, "ORI", 0, "Orientation Constraint", ""},
+ {ACT_CONST_TYPE_FH, "FH", 0, "Force Field Constraint", ""},
+ {0, NULL, 0, NULL, NULL}
+ };
+
+ srna= RNA_def_struct(brna, "ConstraintActuator", "Actuator");
+ RNA_def_struct_ui_text(srna, "Constraint Actuator", "Actuator to ..");
+ RNA_def_struct_sdna_from(srna, "bConstraintActuator", "data");
+
+ //XXX
+}
+
+static void rna_def_edit_object_actuator(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ static EnumPropertyItem prop_type_items[] ={
+ {ACT_EDOB_ADD_OBJECT, "ADDOBJECT", 0, "Add Object", ""},
+ {ACT_EDOB_END_OBJECT, "ENDOBJECT", 0, "End Object", ""},
+ {ACT_EDOB_REPLACE_MESH, "REPLACEMESH", 0, "Replace Mesh", ""},
+ {ACT_EDOB_TRACK_TO, "TRACKTO", 0, "Track to", ""},
+ {ACT_EDOB_DYNAMICS, "DYNAMICS", 0, "Dynamics", ""},
+ {0, NULL, 0, NULL, NULL} };
+
+ static EnumPropertyItem prop_dyn_items[] ={
+ {ACT_EDOB_RESTORE_DYN, "RESTOREDYN", 0, "Restore Dynamics", ""},
+ {ACT_EDOB_SUSPEND_DYN, "SUSPENDDYN", 0, "Suspend Dynamics", ""},
+ {ACT_EDOB_ENABLE_RB, "ENABLERIGIDBOBY", 0, "Enable Rigid Body", ""},
+ {ACT_EDOB_DISABLE_RB, "DISABLERIGIDBOBY", 0, "Disable Rigid Body", ""},
+ {ACT_EDOB_SET_MASS, "SETMASS", 0, "Set Mass", ""},
+ {0, NULL, 0, NULL, NULL} };
+
+ srna= RNA_def_struct(brna, "EditObjectActuator", "Actuator");
+ RNA_def_struct_ui_text(srna, "Edit Object Actuator", "Actuator used to edit objects");
+ RNA_def_struct_sdna_from(srna, "bEditObjectActuator", "data");
+
+ prop= RNA_def_property(srna, "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, "Edit Object", "The mode of the actuator");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "dynamic_operation", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "dyn_operation");
+ RNA_def_property_enum_items(prop, prop_dyn_items);
+ RNA_def_property_ui_text(prop, "Dynamic Operation", "");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
+ RNA_def_property_struct_type(prop, "Object");
+ RNA_def_property_pointer_sdna(prop, NULL, "ob");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Object", "Add this Object and all its children (cant be on an visible layer)");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "track_object", PROP_POINTER, PROP_NONE);
+ RNA_def_property_struct_type(prop, "Object");
+ RNA_def_property_pointer_sdna(prop, NULL, "ob");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Object", "Track to this Object");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "mesh", PROP_POINTER, PROP_NONE);
+ RNA_def_property_struct_type(prop, "Mesh");
+ RNA_def_property_pointer_sdna(prop, NULL, "me");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Mesh", "Replace the existing, when left blank 'Phys' will remake the existing physics mesh");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "time", PROP_INT, PROP_NONE);
+ RNA_def_property_ui_range(prop, 0, 2000, 1, 1);
+ RNA_def_property_ui_text(prop, "Time", "Duration the new Object lives or the track takes");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "mass", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_ui_range(prop, 0, 10000, 1, 0.01);
+ RNA_def_property_ui_text(prop, "Mass", "The mass of the object");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ /* floats 3 Arrays*/
+ prop= RNA_def_property(srna, "linear_velocity", PROP_FLOAT, PROP_TRANSLATION);
+ RNA_def_property_float_sdna(prop, NULL, "linVelocity");
+ RNA_def_property_array(prop, 3);
+ RNA_def_property_ui_range(prop, -100.0, 100.0, 0.1, 0.01);
+ RNA_def_property_ui_text(prop, "Linear Velocity", "Velocity upon creation");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "angular_velocity", PROP_FLOAT, PROP_TRANSLATION);
+ RNA_def_property_float_sdna(prop, NULL, "angVelocity");
+ RNA_def_property_array(prop, 3);
+ RNA_def_property_ui_range(prop, -10000.0, 10000.0, 1.0, 0.01);
+ RNA_def_property_ui_text(prop, "Angular Velocity", "Angular velocity upon creation");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ /* booleans */
+ prop= RNA_def_property(srna, "local_linear_velocity", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "localflag", ACT_EDOB_LOCAL_LINV);
+ RNA_def_property_ui_text(prop, "L", "Apply the transformation locally");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "local_angular_velocity", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "localflag", ACT_EDOB_LOCAL_ANGV);
+ RNA_def_property_ui_text(prop, "L", "Apply the rotation locally");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "replace_display_mesh", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_EDOB_REPLACE_MESH_NOGFX);
+ RNA_def_property_ui_text(prop, "Gfx", "Replace the display mesh");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "replace_physics_mesh", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_EDOB_REPLACE_MESH_PHYS);
+ RNA_def_property_ui_text(prop, "Phys", "Replace the physics mesh (triangle bounds only - compound shapes not supported)");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "enable_3d_tracking", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_TRACK_3D);
+ RNA_def_property_ui_text(prop, "3D", "Enable 3D tracking");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+}
+
+static void rna_def_scene_actuator(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ static EnumPropertyItem prop_type_items[] ={
+ {ACT_SCENE_RESTART, "RESTART", 0, "Restart", ""},
+ {ACT_SCENE_SET, "SET", 0, "Set Scene", ""},
+ {ACT_SCENE_CAMERA, "CAMERA", 0, "Set Camera", ""},
+ {ACT_SCENE_ADD_FRONT, "ADDFRONT", 0, "Add OverlayScene", ""},
+ {ACT_SCENE_ADD_BACK, "ADDBACK", 0, "Add BackgroundScene", ""},
+ {ACT_SCENE_REMOVE, "REMOVE", 0, "Remove Scene", ""},
+ {ACT_SCENE_SUSPEND, "SUSPEND", 0, "Suspend Scene", ""},
+ {ACT_SCENE_RESUME, "RESUME", 0, "Resume Scene", ""},
+ {0, NULL, 0, NULL, NULL}};
+
+ srna= RNA_def_struct(brna, "SceneActuator", "Actuator");
+ RNA_def_struct_ui_text(srna, "Scene Actuator", "Actuator to ..");
+ RNA_def_struct_sdna_from(srna, "bSceneActuator", "data");
+
+ prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_items(prop, prop_type_items);
+ RNA_def_property_ui_text(prop, "Scene", "");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "camera", PROP_POINTER, PROP_NONE);
+ RNA_def_property_struct_type(prop, "Object");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Camera Object", "Set this Camera. Leave empty to refer to self object");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "scene", PROP_POINTER, PROP_NONE);
+ RNA_def_property_struct_type(prop, "Scene");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Scene", "Set the Scene to be added/removed/paused/resumed");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ /* XXX
+ Originally we had different 'scene' tooltips for different values of 'type'.
+ They were:
+ ACT_SCENE_RESTART ""
+ ACT_SCENE_CAMERA ""
+ ACT_SCENE_SET "Set this Scene"
+ ACT_SCENE_ADD_FRONT "Add an Overlay Scene"
+ ACT_SCENE_ADD_BACK "Add a Background Scene"
+ ACT_SCENE_REMOVE "Remove a Scene"
+ ACT_SCENE_SUSPEND "Pause a Scene"
+ ACT_SCENE_RESUME "Unpause a Scene"
+
+ It can be done in the ui script if still needed.
+ */
+
+}
+
+static void rna_def_random_actuator(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ static EnumPropertyItem prop_distribution_items[] ={
+ {ACT_RANDOM_BOOL_CONST, "RESTART", 0, "Bool Constant", ""},
+ {ACT_RANDOM_BOOL_UNIFORM, "SET", 0, "Bool Uniform", ""},
+ {ACT_RANDOM_BOOL_BERNOUILLI, "CAMERA", 0, "Bool Bernoulli", ""},
+ {ACT_RANDOM_INT_CONST, "ADDFRONT", 0, "Int Constant", ""},
+ {ACT_RANDOM_INT_UNIFORM, "ADDBACK", 0, "Int Uniform", ""},
+ {ACT_RANDOM_INT_POISSON, "REMOVE", 0, "Int Poisson", ""},
+ {ACT_RANDOM_FLOAT_CONST, "SUSPEND", 0, "Float Constant", ""},
+ {ACT_RANDOM_FLOAT_UNIFORM, "RESUME", 0, "Float Uniform", ""},
+ {ACT_RANDOM_FLOAT_NORMAL, "RESUME", 0, "Float Normal", ""},
+ {ACT_RANDOM_FLOAT_NEGATIVE_EXPONENTIAL, "RESUME", 0, "Float Neg. Exp.", ""},
+ {0, NULL, 0, NULL, NULL}};
+
+ srna= RNA_def_struct(brna, "RandomActuator", "Actuator");
+ RNA_def_struct_ui_text(srna, "Random Actuator", "Actuator to ..");
+ RNA_def_struct_sdna_from(srna, "bRandomActuator", "data");
+
+ prop= RNA_def_property(srna, "seed", PROP_INT, PROP_NONE);
+ RNA_def_property_ui_range(prop, 0, 1000, 1, 1);
+ RNA_def_property_range(prop, 0, MAXFRAME);
+ RNA_def_property_ui_text(prop, "Seed", "Initial seed of the random generator. Use Python for more freedom (choose 0 for not random)");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "property", PROP_STRING, PROP_NONE);
+ RNA_def_property_string_sdna(prop, NULL, "propname");
+ RNA_def_property_ui_text(prop, "Property", "Assign the random value to this property");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "distribution", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_items(prop, prop_distribution_items);
+ RNA_def_property_ui_text(prop, "Distribution", "Choose the type of distribution");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ /* arguments for the distribution */
+ /* int_arg_1, int_arg_2, float_arg_1, float_arg_2 */
+
+ /* ACT_RANDOM_BOOL_CONST */
+ prop= RNA_def_property(srna, "always_true", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "int_arg_1", 1);
+ RNA_def_property_ui_text(prop, "Always true", "Always false or always true");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ /* ACT_RANDOM_BOOL_UNIFORM */
+ // label => "Choose between true and false, 50% chance each"
+
+ /* ACT_RANDOM_BOOL_BERNOUILLI */
+ prop= RNA_def_property(srna, "chance", PROP_FLOAT, PROP_PERCENTAGE);
+ RNA_def_property_float_sdna(prop, NULL, "float_arg_1");
+ RNA_def_property_range(prop, 0.0, 1.0);
+ RNA_def_property_ui_text(prop, "Chance", "Pick a number between 0 and 1. Success if you stay below this value");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ /* ACT_RANDOM_INT_CONST */
+ prop= RNA_def_property(srna, "int_value", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "int_arg_1");
+ RNA_def_property_ui_range(prop, -1000, 1000, 1, 1);
+ RNA_def_property_ui_text(prop, "Value", "Always return this number");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ /* ACT_RANDOM_INT_UNIFORM */
+ prop= RNA_def_property(srna, "int_min", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "int_arg_1");
+ RNA_def_property_range(prop, -1000, 1000);
+ RNA_def_property_ui_text(prop, "Min", "Choose a number from a range. Lower boundary of the range");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "int_max", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "int_arg_2");
+ RNA_def_property_range(prop, -1000, 1000);
+ RNA_def_property_ui_text(prop, "Max", "Choose a number from a range. Upper boundary of the range");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ /* ACT_RANDOM_INT_POISSON */
+ prop= RNA_def_property(srna, "int_mean", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "float_arg_1");
+ RNA_def_property_range(prop, 0.01, 100.0);
+ RNA_def_property_ui_text(prop, "Mean", "Expected mean value of the distribution");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ /* ACT_RANDOM_FLOAT_CONST */
+ prop= RNA_def_property(srna, "float_value", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "float_arg_1");
+ RNA_def_property_range(prop, 0.0, 1.0);
+ RNA_def_property_ui_text(prop, "Value", "Always return this number");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ /* ACT_RANDOM_FLOAT_UNIFORM */
+ prop= RNA_def_property(srna, "float_min", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "float_arg_1");
+ RNA_def_property_range(prop, -1000.0, 1000.0);
+ RNA_def_property_ui_text(prop, "Min", "Choose a number from a range. Lower boundary of the range");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "float_max", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "float_arg_2");
+ RNA_def_property_range(prop, -1000.0, 1000.0);
+ RNA_def_property_ui_text(prop, "Max", "Choose a number from a range. Upper boundary of the range");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ /* ACT_RANDOM_FLOAT_NORMAL */
+ prop= RNA_def_property(srna, "float_mean", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "float_arg_1");
+ RNA_def_property_range(prop, -1000.0, 1000.0);
+ RNA_def_property_ui_text(prop, "Mean", "A normal distribution. Mean of the distribution");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "standard_derivation", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "float_arg_2");
+ RNA_def_property_range(prop, -1000.0, 1000.0);
+ RNA_def_property_ui_text(prop, "SD", "A normal distribution. Standard deviation of the distribution");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ /* ACT_RANDOM_FLOAT_NEGATIVE_EXPONENTIAL */
+ prop= RNA_def_property(srna, "half_life_time", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "float_arg_1");
+ RNA_def_property_range(prop, -1000.0, 1000.0);
+ RNA_def_property_ui_text(prop, "Half-life time", "Negative exponential dropoff");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+}
+
+static void rna_def_message_actuator(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ static EnumPropertyItem prop_body_type_items[] ={
+ {ACT_MESG_MESG, "TEXT", 0, "Text", ""},
+ {ACT_MESG_PROP, "PROPERTY", 0, "Property", ""},
+ {0, NULL, 0, NULL, NULL}};
+
+ srna= RNA_def_struct(brna, "MessageActuator", "Actuator");
+ RNA_def_struct_ui_text(srna, "Message Actuator", "Actuator to ..");
+ RNA_def_struct_sdna_from(srna, "bMessageActuator", "data");
+
+ prop= RNA_def_property(srna, "to_property", PROP_STRING, PROP_NONE);
+ RNA_def_property_string_sdna(prop, NULL, "toPropName");
+ RNA_def_property_ui_text(prop, "To", "Optional send message to objects with this name only, or empty to broadcast");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "subject", PROP_STRING, PROP_NONE);
+ RNA_def_property_ui_text(prop, "Subject", "Optional message subject. This is what can be filtered on");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "body_type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "bodyType");
+ RNA_def_property_enum_items(prop, prop_body_type_items);
+ RNA_def_property_ui_text(prop, "Body Type", "Toggle message type: either Text or a PropertyName");
+
+ /* ACT_MESG_MESG */
+ prop= RNA_def_property(srna, "body_message", PROP_STRING, PROP_NONE);
+ RNA_def_property_string_sdna(prop, NULL, "body");
+ RNA_def_property_ui_text(prop, "Body", "Optional message body Text");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ /* ACT_MESG_PROP */
+ prop= RNA_def_property(srna, "body_property", PROP_STRING, PROP_NONE);
+ RNA_def_property_string_sdna(prop, NULL, "body");
+ RNA_def_property_ui_text(prop, "Propname", "The message body will be set by the Property Value");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+}
+
+static void rna_def_game_actuator(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ static EnumPropertyItem prop_type_items[] ={
+// {ACT_GAME_LOAD, "LOAD", 0, "Load game", ""},
+// {ACT_GAME_START, "START", 0, "Start loaded game", ""},
+// keeping the load/start hacky for compatibility with 2.49
+// ideally we could use ACT_GAME_START again and do a do_version()
+
+ {ACT_GAME_LOAD, "START", 0, "Start new game", ""},
+ {ACT_GAME_RESTART, "RESTART", 0, "Restart this game", ""},
+ {ACT_GAME_QUIT, "QUIT", 0, "Quit this game", ""},
+ {ACT_GAME_SAVECFG, "SAVECFG", 0, "Save GameLogic.globalDict", ""},
+ {ACT_GAME_LOADCFG, "LOADCFG", 0, "Load GameLogic.globalDict", ""},
+ {0, NULL, 0, NULL, NULL}};
+
+ srna= RNA_def_struct(brna, "GameActuator", "Actuator");
+ RNA_def_struct_ui_text(srna, "Game Actuator", "");
+ RNA_def_struct_sdna_from(srna, "bGameActuator", "data");
+
+ prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_items(prop, prop_type_items);
+ RNA_def_property_ui_text(prop, "Game", "");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "filename", PROP_STRING, PROP_NONE);
+ RNA_def_property_ui_text(prop, "File", "Load this blend file, use the \"//\" prefix for a path relative to the current blend file");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+}
+
+static void rna_def_visibility_actuator(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ srna= RNA_def_struct(brna, "VisibilityActuator", "Actuator");
+ RNA_def_struct_ui_text(srna, "Visibility Actuator", "Actuator to set visibility and occlusion of the object");
+ RNA_def_struct_sdna_from(srna, "bVisibilityActuator", "data");
+
+ prop= RNA_def_property(srna, "visible", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_VISIBILITY_INVISIBLE);
+ RNA_def_property_ui_text(prop, "Visible", "Set the objects visible. Initialized from the objects render restriction toggle (access in the outliner)");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "occlusion", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_VISIBILITY_OCCLUSION);
+ RNA_def_property_ui_text(prop, "Occlusion", "Set the object to occlude objects behind it. Initialized from the object type in physics button");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "children", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_VISIBILITY_RECURSIVE);
+ RNA_def_property_ui_text(prop, "Children", "Set all the children of this object to the same visibility/occlusion recursively");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+}
+
+static void rna_def_twodfilter_actuator(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ static EnumPropertyItem prop_type_items[] ={
+ {ACT_2DFILTER_ENABLED, "ENABLE", 0, "Enable Filter", ""},
+ {ACT_2DFILTER_DISABLED, "DISABLE", 0, "Disable Filter", ""},
+ {ACT_2DFILTER_NOFILTER, "REMOVE", 0, "Remove Filter", ""},
+ {ACT_2DFILTER_MOTIONBLUR, "MOTIONBLUR", 0, "Motion Blur", ""},
+ {ACT_2DFILTER_BLUR, "BLUR", 0, "Blur", ""},
+ {ACT_2DFILTER_SHARPEN, "SHARPEN", 0, "Sharpen", ""},
+ {ACT_2DFILTER_DILATION, "DILATION", 0, "Dilation", ""},
+ {ACT_2DFILTER_EROSION, "EROSION", 0, "Erosion", ""},
+ {ACT_2DFILTER_LAPLACIAN, "LAPLACIAN", 0, "Laplacian", ""},
+ {ACT_2DFILTER_SOBEL, "SOBEL", 0, "Sobel", ""},
+ {ACT_2DFILTER_PREWITT, "PREWITT", 0, "Prewitt", ""},
+ {ACT_2DFILTER_GRAYSCALE, "GRAYSCALE", 0, "Gray Scale", ""},
+ {ACT_2DFILTER_SEPIA, "SEPIA", 0, "Sepia", ""},
+ {ACT_2DFILTER_INVERT, "INVERT", 0, "Invert", ""},
+ {ACT_2DFILTER_CUSTOMFILTER, "CUSTOMFILTER", 0, "Custom Filter", ""},
+// {ACT_2DFILTER_NUMBER_OF_FILTERS, "", 0, "Do not use it. Sentinel", ""},
+ {0, NULL, 0, NULL, NULL}};
+
+ srna= RNA_def_struct(brna, "TwoDFilterActuator", "Actuator");
+ RNA_def_struct_ui_text(srna, "2D Filter Actuator", "Actuator to ..");
+ RNA_def_struct_sdna_from(srna, "bTwoDFilterActuator", "data");
+
+ prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_items(prop, prop_type_items);
+ RNA_def_property_ui_text(prop, "2D Filter Type", "");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "glsl_shader", PROP_POINTER, PROP_NONE);
+ RNA_def_property_pointer_sdna(prop, NULL, "text");
+ RNA_def_property_struct_type(prop, "Text");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Script", "");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "filter_pass", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "int_arg");
+ RNA_def_property_ui_text(prop, "Pass Number", "Set filter order");
+ RNA_def_property_range(prop, 0, 99); //MAX_RENDER_PASS-1
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "motion_blur_value", PROP_FLOAT, PROP_PERCENTAGE);
+ RNA_def_property_float_sdna(prop, NULL, "float_arg");
+ RNA_def_property_ui_text(prop, "Value", "Set motion blur value");
+ RNA_def_property_range(prop, 0.0, 1.0);
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ /* booleans */
+ // it must be renamed to enable_motion_blur.
+ // it'll require code change and do_version()
+ // or RNA_def_property_boolean_funcs() to flip the boolean value
+ prop= RNA_def_property(srna, "disable_motion_blur", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", 1);
+ RNA_def_property_ui_text(prop, "D", "Enable/Disable Motion Blur");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+}
+
+static void rna_def_parent_actuator(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ static EnumPropertyItem prop_type_items[] ={
+ {ACT_PARENT_SET, "SETPARENT", 0, "Set Parent", ""},
+ {ACT_PARENT_REMOVE, "REMOVEPARENT", 0, "Remove Parent", ""},
+ {0, NULL, 0, NULL, NULL}};
+
+ srna= RNA_def_struct(brna, "ParentActuator", "Actuator");
+ RNA_def_struct_ui_text(srna, "Parent Actuator", "");
+ RNA_def_struct_sdna_from(srna, "bParentActuator", "data");
+
+ prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_items(prop, prop_type_items);
+ RNA_def_property_ui_text(prop, "Scene", "");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
+ RNA_def_property_struct_type(prop, "Object");
+ RNA_def_property_pointer_sdna(prop, NULL, "ob");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Parent Object", "Set this object as parent");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ /* booleans */
+ prop= RNA_def_property(srna, "compound", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_PARENT_COMPOUND);
+ RNA_def_property_ui_text(prop, "Compound", "Add this object shape to the parent shape (only if the parent shape is already compound)");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "ghost", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_PARENT_GHOST);
+ RNA_def_property_ui_text(prop, "Ghost", "Make this object ghost while parented (only if not compound)");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+}
+
+static void rna_def_shape_action_actuator(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ static EnumPropertyItem prop_type_items[] ={
+ {ACT_ACTION_PLAY, "PLAY", 0, "Play", ""},
+ {ACT_ACTION_FLIPPER, "FLIPPER", 0, "Flipper", ""},
+ {ACT_ACTION_LOOP_STOP, "LOOPSTOP", 0, "Loop Stop", ""},
+ {ACT_ACTION_LOOP_END, "LOOPEND", 0, "Loop End", ""},
+ {ACT_ACTION_FROM_PROP, "PROPERTY", 0, "Property", ""},
+#ifdef __NLA_ACTION_BY_MOTION_ACTUATOR
+ {ACT_ACTION_MOTION, "MOTION", 0, "Displacement", ""},
+#endif
+ {0, NULL, 0, NULL, NULL}};
+
+ srna= RNA_def_struct(brna, "ShapeActionActuator", "Actuator");
+ RNA_def_struct_ui_text(srna, "Shape Action Actuator", "Actuator to ..");
+ RNA_def_struct_sdna_from(srna, "bActionActuator", "data");
+
+ prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_items(prop, prop_type_items);
+ RNA_def_property_ui_text(prop, "Action type", "Action playback type");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "action", PROP_POINTER, PROP_NONE);
+ RNA_def_property_pointer_sdna(prop, NULL, "act");
+ RNA_def_property_struct_type(prop, "Action");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Action", "");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "continue_last_frame", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "end_reset", 1);
+ RNA_def_property_ui_text(prop, "Continue", "Restore last frame when switching on/off, otherwise play from the start each time");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "property", PROP_STRING, PROP_NONE);
+ RNA_def_property_string_sdna(prop, NULL, "name");
+ RNA_def_property_ui_text(prop, "Property", "Use this property to define the Action position");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "start_frame", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "sta");
+ RNA_def_property_range(prop, 0, MAXFRAME);
+ RNA_def_property_ui_text(prop, "Start frame", "");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "end_frame", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "end");
+ RNA_def_property_range(prop, 0, MAXFRAME);
+ RNA_def_property_ui_text(prop, "End frame", "");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "blendin", PROP_INT, PROP_NONE);
+ RNA_def_property_range(prop, 0, 32767);
+ RNA_def_property_ui_text(prop, "Blendin", "Number of frames of motion blending");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "priority", PROP_INT, PROP_NONE);
+ RNA_def_property_range(prop, 0, 100);
+ RNA_def_property_ui_text(prop, "Priority", "Execution priority - lower numbers will override actions with higher numbers. With 2 or more actions at once, the overriding channels must be lower in the stack");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "frame_property", PROP_STRING, PROP_NONE);
+ RNA_def_property_string_sdna(prop, NULL, "frameProp");
+ RNA_def_property_ui_text(prop, "Frame Property", "Assign the action's current frame number to this property");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+#ifdef __NLA_ACTION_BY_MOTION_ACTUATOR
+ prop= RNA_def_property(srna, "stride_length", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "stridelength");
+ RNA_def_property_range(prop, 0.0, 2500.0);
+ RNA_def_property_ui_text(prop, "Cycle", "Distance covered by a single cycle of the action");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+#endif
+}
+
+static void rna_def_state_actuator(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ static EnumPropertyItem prop_type_items[] ={
+ {ACT_STATE_SET, "SET", 0, "Set State", ""},
+ {ACT_STATE_ADD, "ADD", 0, "Add State", ""},
+ {ACT_STATE_REMOVE, "REMOVE", 0, "Remove State", ""},
+ {ACT_STATE_CHANGE, "CHANGE", 0, "Change State", ""},
+ {0, NULL, 0, NULL, NULL}};
+
+ srna= RNA_def_struct(brna, "StateActuator", "Actuator");
+ RNA_def_struct_ui_text(srna, "State Actuator", "Actuator to handle states");
+ RNA_def_struct_sdna_from(srna, "bStateActuator", "data");
+
+ prop= RNA_def_property(srna, "operation", 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, "Operation", "Select the bit operation on object state mask");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+/*
+ XXX mask needs a template or to use RNA layer type
+ prop= RNA_def_property(srna, "mask", PROP_BOOLEAN, PROP_LAYER);
+ RNA_def_property_array(prop, 20);
+*/
+ prop= RNA_def_property(srna, "mask", PROP_INT, PROP_NONE);
+ RNA_def_property_ui_text(prop, "Mask", "");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+}
+
+static void rna_def_armature_actuator(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA* prop;
+
+ static EnumPropertyItem prop_type_items[] ={
+ {ACT_ARM_RUN, "RUN", 0, "Run armature", ""},
+ {ACT_ARM_ENABLE, "ENABLE", 0, "Enable", ""},
+ {ACT_ARM_DISABLE, "DISABLE", 0, "Disable", ""},
+ {ACT_ARM_SETTARGET, "SETTARGET", 0, "Set target", ""},
+ {ACT_ARM_SETWEIGHT, "SETWEIGHT", 0, "Set weight", ""},
+ {0, NULL, 0, NULL, NULL}};
+
+ srna= RNA_def_struct(brna, "ArmatureActuator", "Actuator");
+ RNA_def_struct_ui_text(srna, "Armature Actuator", "Actuator to ..");
+ RNA_def_struct_sdna_from(srna, "bArmatureActuator", "data");
+
+ prop= RNA_def_property(srna, "contraint_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, "Constraint Type", "");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "bone", PROP_STRING, PROP_NONE);
+ RNA_def_property_string_sdna(prop, NULL, "posechannel");
+ RNA_def_property_ui_text(prop, "Bone", "Bone on which the constraint is defined");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+ // XXX uiButSetFunc(but, check_armature_actuator, but, armAct); // the bone must be from the armature
+ /* XXX eventually move to a datablock pointer. However datablocking this may be a problem
+ we would need to update the value whenever the armature changes. */
+
+ prop= RNA_def_property(srna, "contraint", PROP_STRING, PROP_NONE);
+ RNA_def_property_string_sdna(prop, NULL, "constraint");
+ RNA_def_property_ui_text(prop, "Constraint", "Name of the constraint you want to control");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+ // XXX uiButSetFunc(but, check_armature_actuator, but, armAct); // the constraintbone must be from the armature
+ /* XXX eventually move to a datablock pointer.
+ (more likely to work than for the Bone in my opinion) */
+
+ prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
+ RNA_def_property_struct_type(prop, "Object");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Target", "Set this object as the target of the constraint");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "secondary_target", PROP_POINTER, PROP_NONE);
+ RNA_def_property_pointer_sdna(prop, NULL, "subtarget");
+ RNA_def_property_struct_type(prop, "Object");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Secondary Target", "Set weight of this constraint");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "weight", PROP_FLOAT, PROP_PERCENTAGE);
+ RNA_def_property_float_sdna(prop, NULL, "weight");
+ RNA_def_property_range(prop, 0.0, 1.0);
+ RNA_def_property_ui_text(prop, "Weight", "Set weight of this constraint");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+}
+
+void RNA_def_actuator(BlenderRNA *brna)
+{
+ rna_def_actuator(brna);
+
+ rna_def_object_actuator(brna);
+ rna_def_ipo_actuator(brna);
+ rna_def_camera_actuator(brna);
+ rna_def_sound_actuator(brna);
+ rna_def_property_actuator(brna);
+ rna_def_constraint_actuator(brna); // to be done
+ rna_def_edit_object_actuator(brna);
+ rna_def_scene_actuator(brna);
+ rna_def_random_actuator(brna);
+ rna_def_message_actuator(brna);
+ rna_def_game_actuator(brna);
+ rna_def_visibility_actuator(brna);
+ rna_def_twodfilter_actuator(brna);
+ rna_def_parent_actuator(brna);
+ rna_def_shape_action_actuator(brna);
+ rna_def_state_actuator(brna);
+ rna_def_armature_actuator(brna);
+}
+
#endif
diff --git a/source/blender/makesrna/intern/rna_animation.c b/source/blender/makesrna/intern/rna_animation.c
index 56e2707b5bb..453d9b9a844 100644
--- a/source/blender/makesrna/intern/rna_animation.c
+++ b/source/blender/makesrna/intern/rna_animation.c
@@ -15,7 +15,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor(s): Blender Foundation (2009), Joshua Leung
*
@@ -175,7 +175,7 @@ static void rna_def_keyingset_path(BlenderRNA *brna)
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.");
+ RNA_def_struct_ui_text(srna, "Keying Set Path", "Path to a setting for use in a Keying Set");
/* ID */
prop= RNA_def_property(srna, "id", PROP_POINTER, PROP_NONE);
@@ -183,38 +183,38 @@ static void rna_def_keyingset_path(BlenderRNA *brna)
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_editable_func(prop, "rna_ksPath_id_editable");
RNA_def_property_pointer_funcs(prop, NULL, NULL, "rna_ksPath_id_typef");
- RNA_def_property_ui_text(prop, "ID-Block", "ID-Block that keyframes for Keying Set should be added to (for Absolute Keying Sets only).");
+ RNA_def_property_ui_text(prop, "ID-Block", "ID-Block that keyframes for Keying Set should be added to (for Absolute Keying Sets only)");
prop= RNA_def_property(srna, "id_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "idtype");
RNA_def_property_enum_items(prop, id_type_items);
RNA_def_property_enum_default(prop, ID_OB);
RNA_def_property_enum_funcs(prop, NULL, "rna_ksPath_id_type_set", NULL);
- RNA_def_property_ui_text(prop, "ID Type", "Type of ID-block that can be used.");
+ RNA_def_property_ui_text(prop, "ID Type", "Type of ID-block that can be used");
/* Group */
prop= RNA_def_property(srna, "group", PROP_STRING, PROP_NONE);
- RNA_def_property_ui_text(prop, "Group Name", "Name of Action Group to assign setting(s) for this path to.");
+ RNA_def_property_ui_text(prop, "Group Name", "Name of Action Group to assign setting(s) for this path to");
/* 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_ui_text(prop, "Grouping Method", "Method used to define which Group-name to use.");
+ RNA_def_property_ui_text(prop, "Grouping Method", "Method used to define which Group-name to use");
/* Path + Array Index */
prop= RNA_def_property(srna, "data_path", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_ksPath_RnaPath_get", "rna_ksPath_RnaPath_length", "rna_ksPath_RnaPath_set");
- RNA_def_property_ui_text(prop, "Data Path", "Path to property setting.");
+ RNA_def_property_ui_text(prop, "Data Path", "Path to property setting");
RNA_def_struct_name_property(srna, prop); // XXX this is the best indicator for now...
prop= RNA_def_property(srna, "array_index", PROP_INT, PROP_NONE);
- RNA_def_property_ui_text(prop, "RNA Array Index", "Index to the specific setting if applicable.");
+ RNA_def_property_ui_text(prop, "RNA Array Index", "Index to the specific setting if applicable");
/* Flags */
prop= RNA_def_property(srna, "entire_array", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", KSP_FLAG_WHOLE_ARRAY);
- RNA_def_property_ui_text(prop, "Entire Array", "When an 'array/vector' type is chosen (Location, Rotation, Color, etc.), entire array is to be used.");
+ RNA_def_property_ui_text(prop, "Entire Array", "When an 'array/vector' type is chosen (Location, Rotation, Color, etc.), entire array is to be used");
}
static void rna_def_keyingset(BlenderRNA *brna)
@@ -223,7 +223,7 @@ static void rna_def_keyingset(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "KeyingSet", NULL);
- RNA_def_struct_ui_text(srna, "Keying Set", "Settings that should be keyframed together.");
+ RNA_def_struct_ui_text(srna, "Keying Set", "Settings that should be keyframed together");
/* Name */
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
@@ -234,25 +234,26 @@ static void rna_def_keyingset(BlenderRNA *brna)
prop= RNA_def_property(srna, "paths", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "paths", NULL);
RNA_def_property_struct_type(prop, "KeyingSetPath");
- RNA_def_property_ui_text(prop, "Paths", "Keying Set Paths to define settings that get keyframed together.");
+ RNA_def_property_ui_text(prop, "Paths", "Keying Set Paths to define settings that get keyframed together");
prop= RNA_def_property(srna, "active_path", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "KeyingSetPath");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_editable_func(prop, "rna_KeyingSet_active_ksPath_editable");
RNA_def_property_pointer_funcs(prop, "rna_KeyingSet_active_ksPath_get", "rna_KeyingSet_active_ksPath_set", NULL);
- RNA_def_property_ui_text(prop, "Active Keying Set", "Active Keying Set used to insert/delete keyframes.");
+ RNA_def_property_ui_text(prop, "Active Keying Set", "Active Keying Set used to insert/delete keyframes");
prop= RNA_def_property(srna, "active_path_index", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "active_path");
RNA_def_property_int_funcs(prop, "rna_KeyingSet_active_ksPath_index_get", "rna_KeyingSet_active_ksPath_index_set", "rna_KeyingSet_active_ksPath_index_range");
- RNA_def_property_ui_text(prop, "Active Path Index", "Current Keying Set index.");
+ RNA_def_property_ui_text(prop, "Active Path Index", "Current Keying Set index");
/* Flags */
+ // XXX: depreceated
prop= RNA_def_property(srna, "builtin", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
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.");
+ RNA_def_property_ui_text(prop, "Built-In", "Keying Set is a built-in to Blender");
prop= RNA_def_property(srna, "absolute", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", KEYINGSET_ABSOLUTE);
@@ -261,15 +262,15 @@ static void rna_def_keyingset(BlenderRNA *brna)
/* Keyframing Flags */
prop= RNA_def_property(srna, "insertkey_needed", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "keyingflag", INSERTKEY_NEEDED);
- RNA_def_property_ui_text(prop, "Insert Keyframes - Only Needed", "Only insert keyframes where they're needed in the relevant F-Curves.");
+ RNA_def_property_ui_text(prop, "Insert Keyframes - Only Needed", "Only insert keyframes where they're needed in the relevant F-Curves");
prop= RNA_def_property(srna, "insertkey_visual", PROP_BOOLEAN, PROP_NONE);
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'.");
+ RNA_def_property_ui_text(prop, "Insert Keyframes - Visual", "Insert keyframes based on 'visual transforms'");
prop= RNA_def_property(srna, "insertkey_xyz_to_rgb", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "keyingflag", INSERTKEY_XYZ2RGB);
- RNA_def_property_ui_text(prop, "F-Curve Colors - XYZ to RGB", "Color for newly added transformation F-Curves (Location, Rotation, Scale) and also Color is based on the transform axis.");
+ RNA_def_property_ui_text(prop, "F-Curve Colors - XYZ to RGB", "Color for newly added transformation F-Curves (Location, Rotation, Scale) and also Color is based on the transform axis");
/* Keying Set API */
RNA_api_keyingset(srna);
@@ -284,7 +285,7 @@ void rna_def_animdata_common(StructRNA *srna)
prop= RNA_def_property(srna, "animation_data", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "adt");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Animation Data", "Animation data for this datablock.");
+ RNA_def_property_ui_text(prop, "Animation Data", "Animation data for this datablock");
}
void rna_def_animdata(BlenderRNA *brna)
@@ -293,49 +294,49 @@ void rna_def_animdata(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "AnimData", NULL);
- RNA_def_struct_ui_text(srna, "Animation Data", "Animation data for datablock.");
+ RNA_def_struct_ui_text(srna, "Animation Data", "Animation data for datablock");
/* NLA */
prop= RNA_def_property(srna, "nla_tracks", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "nla_tracks", NULL);
RNA_def_property_struct_type(prop, "NlaTrack");
- RNA_def_property_ui_text(prop, "NLA Tracks", "NLA Tracks (i.e. Animation Layers).");
+ RNA_def_property_ui_text(prop, "NLA Tracks", "NLA Tracks (i.e. Animation Layers)");
/* Active Action */
prop= RNA_def_property(srna, "action", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_funcs(prop, NULL, "rna_AnimData_action_set", NULL);
RNA_def_property_flag(prop, PROP_EDITABLE); /* this flag as well as the dynamic test must be defined for this to be editable... */
RNA_def_property_editable_func(prop, "rna_AnimData_action_editable");
- RNA_def_property_ui_text(prop, "Action", "Active Action for this datablock.");
+ RNA_def_property_ui_text(prop, "Action", "Active Action for this datablock");
/* Active Action Settings */
prop= RNA_def_property(srna, "action_extrapolation", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "act_extendmode");
RNA_def_property_enum_items(prop, nla_mode_extend_items);
- RNA_def_property_ui_text(prop, "Action Extrapolation", "Action to take for gaps past the Active Action's range (when evaluating with NLA).");
+ RNA_def_property_ui_text(prop, "Action Extrapolation", "Action to take for gaps past the Active Action's range (when evaluating with NLA)");
prop= RNA_def_property(srna, "action_blending", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "act_blendmode");
RNA_def_property_enum_items(prop, nla_mode_blend_items);
- RNA_def_property_ui_text(prop, "Action Blending", "Method used for combining Active Action's result with result of NLA stack.");
+ RNA_def_property_ui_text(prop, "Action Blending", "Method used for combining Active Action's result with result of NLA stack");
prop= RNA_def_property(srna, "action_influence", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "act_influence");
RNA_def_property_float_default(prop, 1.0f);
RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Action Influence", "Amount the Active Action contributes to the result of the NLA stack.");
+ RNA_def_property_ui_text(prop, "Action Influence", "Amount the Active Action contributes to the result of the NLA stack");
/* Drivers */
prop= RNA_def_property(srna, "drivers", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "drivers", NULL);
RNA_def_property_struct_type(prop, "FCurve");
- RNA_def_property_ui_text(prop, "Drivers", "The Drivers/Expressions for this datablock.");
+ RNA_def_property_ui_text(prop, "Drivers", "The Drivers/Expressions for this datablock");
/* General Settings */
prop= RNA_def_property(srna, "nla_enabled", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", ADT_NLA_EVAL_OFF);
- RNA_def_property_ui_text(prop, "NLA Evaluation Enabled", "NLA stack is evaluated when evaluating this block.");
+ RNA_def_property_ui_text(prop, "NLA Evaluation Enabled", "NLA stack is evaluated when evaluating this block");
}
/* --- */
diff --git a/source/blender/makesrna/intern/rna_animation_api.c b/source/blender/makesrna/intern/rna_animation_api.c
index fc36bab29af..b07f147ac96 100644
--- a/source/blender/makesrna/intern/rna_animation_api.c
+++ b/source/blender/makesrna/intern/rna_animation_api.c
@@ -15,7 +15,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* The Original Code is Copyright (C) 2009 Blender Foundation.
* All rights reserved.
@@ -41,7 +41,7 @@
#include "BKE_animsys.h"
-static void rna_KeyingSet_add_destination(KeyingSet *keyingset, ReportList *reports,
+static void rna_KeyingSet_add_path(KeyingSet *keyingset, ReportList *reports,
ID *id, char rna_path[], int array_index, int entire_array,
int grouping_method, char group_name[])
{
@@ -53,11 +53,11 @@ static void rna_KeyingSet_add_destination(KeyingSet *keyingset, ReportList *repo
/* 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);
+ BKE_keyingset_add_path(keyingset, id, group_name, rna_path, array_index, flag, grouping_method);
keyingset->active_path= BLI_countlist(&keyingset->paths);
}
else {
- BKE_report(reports, RPT_ERROR, "Keying Set Destination could not be added.");
+ BKE_report(reports, RPT_ERROR, "Keying Set Path could not be added.");
}
}
@@ -69,7 +69,7 @@ void RNA_api_keyingset(StructRNA *srna)
PropertyRNA *parm;
/* Add Destination */
- func= RNA_def_function(srna, "add_destination", "rna_KeyingSet_add_destination");
+ func= RNA_def_function(srna, "add_path", "rna_KeyingSet_add_path");
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 */
diff --git a/source/blender/makesrna/intern/rna_animviz.c b/source/blender/makesrna/intern/rna_animviz.c
index f0ef7a7d054..d67781085e5 100644
--- a/source/blender/makesrna/intern/rna_animviz.c
+++ b/source/blender/makesrna/intern/rna_animviz.c
@@ -15,7 +15,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor(s): Blender Foundation (2010), Joshua Leung
*
@@ -91,7 +91,7 @@ void rna_def_motionpath_common(StructRNA *srna)
prop= RNA_def_property(srna, "motion_path", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "mpath");
- RNA_def_property_ui_text(prop, "Motion Path", "Motion Path for this element.");
+ RNA_def_property_ui_text(prop, "Motion Path", "Motion Path for this element");
}
static void rna_def_animviz_motionpath_vert(BlenderRNA *brna)
@@ -101,7 +101,7 @@ static void rna_def_animviz_motionpath_vert(BlenderRNA *brna)
srna= RNA_def_struct(brna, "MotionPathVert", NULL);
RNA_def_struct_sdna(srna, "bMotionPathVert");
- RNA_def_struct_ui_text(srna, "Motion Path Cache Point", "Cached location on path.");
+ RNA_def_struct_ui_text(srna, "Motion Path Cache Point", "Cached location on path");
prop= RNA_def_property(srna, "co", PROP_FLOAT, PROP_XYZ);
RNA_def_property_array(prop, 3);
@@ -109,7 +109,7 @@ static void rna_def_animviz_motionpath_vert(BlenderRNA *brna)
prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOTIONPATH_VERT_SEL);
- RNA_def_property_ui_text(prop, "Selected", "Path point is selected for editing.");
+ RNA_def_property_ui_text(prop, "Selected", "Path point is selected for editing");
}
static void rna_def_animviz_motion_path(BlenderRNA *brna)
@@ -119,7 +119,7 @@ static void rna_def_animviz_motion_path(BlenderRNA *brna)
srna= RNA_def_struct(brna, "MotionPath", NULL);
RNA_def_struct_sdna(srna, "bMotionPath");
- RNA_def_struct_ui_text(srna, "Motion Path", "Cache of the worldspace positions of an element over a frame range.");
+ RNA_def_struct_ui_text(srna, "Motion Path", "Cache of the worldspace positions of an element over a frame range");
/* Collections */
prop= RNA_def_property(srna, "points", PROP_COLLECTION, PROP_NONE);
@@ -130,25 +130,25 @@ static void rna_def_animviz_motion_path(BlenderRNA *brna)
/* Playback Ranges */
prop= RNA_def_property(srna, "start_frame", PROP_INT, PROP_TIME);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Start Frame", "Starting frame of the stored range.");
+ RNA_def_property_ui_text(prop, "Start Frame", "Starting frame of the stored range");
prop= RNA_def_property(srna, "end_frame", PROP_INT, PROP_TIME);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "End Frame", "End frame of the stored range.");
+ RNA_def_property_ui_text(prop, "End Frame", "End frame of the stored range");
prop= RNA_def_property(srna, "length", PROP_INT, PROP_TIME);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Length", "Number of frames cached.");
+ RNA_def_property_ui_text(prop, "Length", "Number of frames cached");
/* Settings */
prop= RNA_def_property(srna, "use_bone_head", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOTIONPATH_FLAG_BHEAD);
RNA_def_property_clear_flag(prop, PROP_EDITABLE); // xxx
- RNA_def_property_ui_text(prop, "Use Bone Heads", "For PoseBone paths, use the bone head location when calculating this path.");
+ RNA_def_property_ui_text(prop, "Use Bone Heads", "For PoseBone paths, use the bone head location when calculating this path");
prop= RNA_def_property(srna, "editing", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOTIONPATH_FLAG_EDIT);
- RNA_def_property_ui_text(prop, "Edit Path", "Path is being edited.");
+ RNA_def_property_ui_text(prop, "Edit Path", "Path is being edited");
}
/* --- */
@@ -169,51 +169,51 @@ static void rna_def_animviz_ghosts(BlenderRNA *brna)
srna= RNA_def_struct(brna, "AnimVizOnionSkinning", NULL);
RNA_def_struct_sdna(srna, "bAnimVizSettings");
RNA_def_struct_nested(brna, srna, "AnimViz");
- RNA_def_struct_ui_text(srna, "Onion Skinning Settings", "Onion Skinning settings for animation visualisation.");
+ RNA_def_struct_ui_text(srna, "Onion Skinning Settings", "Onion Skinning settings for animation visualisation");
/* Enums */
prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "ghost_type");
RNA_def_property_enum_items(prop, prop_type_items);
- RNA_def_property_ui_text(prop, "Type", "Method used for determining what ghosts get drawn.");
+ RNA_def_property_ui_text(prop, "Type", "Method used for determining what ghosts get drawn");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */
/* Settings */
prop= RNA_def_property(srna, "only_selected", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "ghost_flag", GHOST_FLAG_ONLYSEL);
- RNA_def_property_ui_text(prop, "On Selected Bones Only", "For Pose-Mode drawing, only draw ghosts for selected bones.");
+ RNA_def_property_ui_text(prop, "On Selected Bones Only", "For Pose-Mode drawing, only draw ghosts for selected bones");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */
prop= RNA_def_property(srna, "frame_step", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "ghost_step");
RNA_def_property_range(prop, 1, 20);
- RNA_def_property_ui_text(prop, "Frame Step", "Number of frames between ghosts shown (not for 'On Keyframes' Onion-skining method).");
+ RNA_def_property_ui_text(prop, "Frame Step", "Number of frames between ghosts shown (not for 'On Keyframes' Onion-skining method)");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */
/* Playback Ranges */
prop= RNA_def_property(srna, "start_frame", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "ghost_sf");
RNA_def_property_int_funcs(prop, NULL, "rna_AnimViz_ghost_start_frame_set", NULL);
- RNA_def_property_ui_text(prop, "Start Frame", "Starting frame of range of Ghosts to display (not for 'Around Current Frame' Onion-skinning method).");
+ RNA_def_property_ui_text(prop, "Start Frame", "Starting frame of range of Ghosts to display (not for 'Around Current Frame' Onion-skinning method)");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */
prop= RNA_def_property(srna, "end_frame", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "ghost_ef");
RNA_def_property_int_funcs(prop, NULL, "rna_AnimViz_ghost_end_frame_set", NULL);
- RNA_def_property_ui_text(prop, "End Frame", "End frame of range of Ghosts to display (not for 'Around Current Frame' Onion-skinning method).");
+ RNA_def_property_ui_text(prop, "End Frame", "End frame of range of Ghosts to display (not for 'Around Current Frame' Onion-skinning method)");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */
/* Around Current Ranges */
prop= RNA_def_property(srna, "before_current", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "ghost_bc");
RNA_def_property_range(prop, 0, 30);
- RNA_def_property_ui_text(prop, "Before Current", "Number of frames to show before the current frame (only for 'Around Current Frame' Onion-skinning method).");
+ RNA_def_property_ui_text(prop, "Before Current", "Number of frames to show before the current frame (only for 'Around Current Frame' Onion-skinning method)");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */
prop= RNA_def_property(srna, "after_current", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "ghost_ac");
RNA_def_property_range(prop, 0, 30);
- RNA_def_property_ui_text(prop, "After Current", "Number of frames to show after the current frame (only for 'Around Current Frame' Onion-skinning method).");
+ RNA_def_property_ui_text(prop, "After Current", "Number of frames to show after the current frame (only for 'Around Current Frame' Onion-skinning method)");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */
}
@@ -223,8 +223,8 @@ static void rna_def_animviz_paths(BlenderRNA *brna)
PropertyRNA *prop;
static const EnumPropertyItem prop_type_items[]= {
- {MOTIONPATH_TYPE_RANGE, "RANGE", 0, "In Range", "Display Paths of poses within specified range."},
- {MOTIONPATH_TYPE_ACFRA, "CURRENT_FRAME", 0, "Around Frame", "Display Paths of poses within a fixed number of frames around the current frame."},
+ {MOTIONPATH_TYPE_RANGE, "RANGE", 0, "In Range", "Display Paths of poses within specified range"},
+ {MOTIONPATH_TYPE_ACFRA, "CURRENT_FRAME", 0, "Around Frame", "Display Paths of poses within a fixed number of frames around the current frame"},
{0, NULL, 0, NULL, NULL}};
static const EnumPropertyItem prop_location_items[]= {
{MOTIONPATH_BAKE_HEADS, "HEADS", 0, "Heads", "Calculate bone paths from heads"},
@@ -234,7 +234,7 @@ static void rna_def_animviz_paths(BlenderRNA *brna)
srna= RNA_def_struct(brna, "AnimVizMotionPaths", NULL);
RNA_def_struct_sdna(srna, "bAnimVizSettings");
RNA_def_struct_nested(brna, srna, "AnimViz");
- RNA_def_struct_ui_text(srna, "Motion Path Settings", "Motion Path settings for animation visualisation.");
+ RNA_def_struct_ui_text(srna, "Motion Path Settings", "Motion Path settings for animation visualisation");
/* Enums */
prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
@@ -268,7 +268,7 @@ static void rna_def_animviz_paths(BlenderRNA *brna)
prop= RNA_def_property(srna, "frame_step", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "path_step");
RNA_def_property_range(prop, 1, 100);
- RNA_def_property_ui_text(prop, "Frame Step", "Number of frames between paths shown (not for 'On Keyframes' Onion-skining method).");
+ RNA_def_property_ui_text(prop, "Frame Step", "Number of frames between paths shown (not for 'On Keyframes' Onion-skining method)");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */
@@ -276,26 +276,26 @@ static void rna_def_animviz_paths(BlenderRNA *brna)
prop= RNA_def_property(srna, "start_frame", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "path_sf");
RNA_def_property_int_funcs(prop, NULL, "rna_AnimViz_path_start_frame_set", NULL);
- RNA_def_property_ui_text(prop, "Start Frame", "Starting frame of range of paths to display/calculate (not for 'Around Current Frame' Onion-skinning method).");
+ RNA_def_property_ui_text(prop, "Start Frame", "Starting frame of range of paths to display/calculate (not for 'Around Current Frame' Onion-skinning method)");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */
prop= RNA_def_property(srna, "end_frame", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "path_ef");
RNA_def_property_int_funcs(prop, NULL, "rna_AnimViz_path_end_frame_set", NULL);
- RNA_def_property_ui_text(prop, "End Frame", "End frame of range of paths to display/calculate (not for 'Around Current Frame' Onion-skinning method).");
+ RNA_def_property_ui_text(prop, "End Frame", "End frame of range of paths to display/calculate (not for 'Around Current Frame' Onion-skinning method)");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */
/* Around Current Ranges */
prop= RNA_def_property(srna, "before_current", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "path_bc");
RNA_def_property_range(prop, 1, MAXFRAMEF/2);
- RNA_def_property_ui_text(prop, "Before Current", "Number of frames to show before the current frame (only for 'Around Current Frame' Onion-skinning method).");
+ RNA_def_property_ui_text(prop, "Before Current", "Number of frames to show before the current frame (only for 'Around Current Frame' Onion-skinning method)");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */
prop= RNA_def_property(srna, "after_current", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "path_ac");
RNA_def_property_range(prop, 1, MAXFRAMEF/2);
- RNA_def_property_ui_text(prop, "After Current", "Number of frames to show after the current frame (only for 'Around Current Frame' Onion-skinning method).");
+ RNA_def_property_ui_text(prop, "After Current", "Number of frames to show after the current frame (only for 'Around Current Frame' Onion-skinning method)");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */
}
@@ -308,7 +308,7 @@ void rna_def_animviz_common(StructRNA *srna)
prop= RNA_def_property(srna, "animation_visualisation", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "avs");
- RNA_def_property_ui_text(prop, "Animation Visualisation", "Animation data for this datablock.");
+ RNA_def_property_ui_text(prop, "Animation Visualisation", "Animation data for this datablock");
}
static void rna_def_animviz(BlenderRNA *brna)
@@ -318,21 +318,21 @@ static void rna_def_animviz(BlenderRNA *brna)
srna= RNA_def_struct(brna, "AnimViz", NULL);
RNA_def_struct_sdna(srna, "bAnimVizSettings");
- RNA_def_struct_ui_text(srna, "Animation Visualisation", "Settings for the visualisation of motion.");
+ RNA_def_struct_ui_text(srna, "Animation Visualisation", "Settings for the visualisation of motion");
/* onion-skinning settings (nested struct) */
prop= RNA_def_property(srna, "onion_skinning", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "AnimVizOnionSkinning");
RNA_def_property_pointer_funcs(prop, "rna_AnimViz_onion_skinning_get", NULL, NULL);
- RNA_def_property_ui_text(prop, "Onion Skinning", "Onion Skinning (ghosting) settings for visualisation.");
+ RNA_def_property_ui_text(prop, "Onion Skinning", "Onion Skinning (ghosting) settings for visualisation");
/* motion path settings (nested struct) */
prop= RNA_def_property(srna, "motion_paths", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "AnimVizMotionPaths");
RNA_def_property_pointer_funcs(prop, "rna_AnimViz_motion_paths_get", NULL, NULL);
- RNA_def_property_ui_text(prop, "Motion Paths", "Motion Path settings for visualisation.");
+ RNA_def_property_ui_text(prop, "Motion Paths", "Motion Path settings for visualisation");
}
/* --- */
diff --git a/source/blender/makesrna/intern/rna_armature.c b/source/blender/makesrna/intern/rna_armature.c
index 22b16c13630..d994a1c20be 100644
--- a/source/blender/makesrna/intern/rna_armature.c
+++ b/source/blender/makesrna/intern/rna_armature.c
@@ -15,7 +15,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor(s): Blender Foundation (2008), Joshua Leung
*
@@ -191,6 +191,7 @@ static void rna_Armature_layer_set(PointerRNA *ptr, const int *values)
}
}
+// XXX depreceated.... old armature only animviz
static void rna_Armature_ghost_start_frame_set(PointerRNA *ptr, int value)
{
bArmature *data= (bArmature*)ptr->data;
@@ -204,20 +205,7 @@ static void rna_Armature_ghost_end_frame_set(PointerRNA *ptr, int value)
CLAMP(value, data->ghostsf, (int)(MAXFRAMEF/2));
data->ghostef= value;
}
-
-static void rna_Armature_path_start_frame_set(PointerRNA *ptr, int value)
-{
- bArmature *data= (bArmature*)ptr->data;
- CLAMP(value, 1, data->pathef);
- data->pathsf= value;
-}
-
-static void rna_Armature_path_end_frame_set(PointerRNA *ptr, int value)
-{
- bArmature *data= (bArmature*)ptr->data;
- CLAMP(value, data->pathsf, (int)(MAXFRAMEF/2));
- data->pathef= value;
-}
+// XXX depreceated... old armature only animviz
static void rna_EditBone_name_set(PointerRNA *ptr, const char *value)
{
@@ -418,42 +406,42 @@ static void rna_def_bone_common(StructRNA *srna, int editbone)
RNA_def_property_boolean_sdna(prop, NULL, "flag", BONE_CONNECTED);
if(editbone) RNA_def_property_boolean_funcs(prop, NULL, "rna_EditBone_connected_set");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Connected", "When bone has a parent, bone's head is struck to the parent's tail.");
+ RNA_def_property_ui_text(prop, "Connected", "When bone has a parent, bone's head is struck to the parent's tail");
RNA_def_property_update(prop, 0, "rna_Armature_update_data");
prop= RNA_def_property(srna, "hinge", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", BONE_HINGE);
- RNA_def_property_ui_text(prop, "Inherit Rotation", "Bone inherits rotation or scale from parent bone.");
+ RNA_def_property_ui_text(prop, "Inherit Rotation", "Bone inherits rotation or scale from parent bone");
RNA_def_property_update(prop, 0, "rna_Armature_update_data");
prop= RNA_def_property(srna, "multiply_vertexgroup_with_envelope", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BONE_MULT_VG_ENV);
- RNA_def_property_ui_text(prop, "Multiply Vertex Group with Envelope", "When deforming bone, multiply effects of Vertex Group weights with Envelope influence.");
+ RNA_def_property_ui_text(prop, "Multiply Vertex Group with Envelope", "When deforming bone, multiply effects of Vertex Group weights with Envelope influence");
RNA_def_property_update(prop, 0, "rna_Armature_update_data");
prop= RNA_def_property(srna, "deform", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", BONE_NO_DEFORM);
- RNA_def_property_ui_text(prop, "Deform", "Bone does not deform any geometry.");
+ RNA_def_property_ui_text(prop, "Deform", "Bone does not deform any geometry");
RNA_def_property_update(prop, 0, "rna_Armature_update_data");
prop= RNA_def_property(srna, "inherit_scale", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_ui_text(prop, "Inherit Scale", "Bone inherits scaling from parent bone.");
+ RNA_def_property_ui_text(prop, "Inherit Scale", "Bone inherits scaling from parent bone");
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", BONE_NO_SCALE);
RNA_def_property_update(prop, 0, "rna_Armature_update_data");
prop= RNA_def_property(srna, "local_location", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_ui_text(prop, "Local Location", "Bone location is set in local space.");
+ RNA_def_property_ui_text(prop, "Local Location", "Bone location is set in local space");
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", BONE_NO_LOCAL_LOCATION);
RNA_def_property_update(prop, 0, "rna_Armature_update_data");
prop= RNA_def_property(srna, "draw_wire", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BONE_DRAWWIRE);
- RNA_def_property_ui_text(prop, "Draw Wire", "Bone is always drawn as Wireframe regardless of viewport draw mode. Useful for non-obstructive custom bone shapes.");
+ RNA_def_property_ui_text(prop, "Draw Wire", "Bone is always drawn as Wireframe regardless of viewport draw mode. Useful for non-obstructive custom bone shapes");
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
prop= RNA_def_property(srna, "cyclic_offset", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", BONE_NO_CYCLICOFFSET);
- RNA_def_property_ui_text(prop, "Cyclic Offset", "When bone doesn't have a parent, it receives cyclic offset effects.");
+ RNA_def_property_ui_text(prop, "Cyclic Offset", "When bone doesn't have a parent, it receives cyclic offset effects");
RNA_def_property_update(prop, 0, "rna_Armature_update_data");
prop= RNA_def_property(srna, "restrict_select", PROP_BOOLEAN, PROP_NONE);
@@ -466,44 +454,44 @@ static void rna_def_bone_common(StructRNA *srna, int editbone)
prop= RNA_def_property(srna, "envelope_distance", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "dist");
RNA_def_property_range(prop, 0.0f, 1000.0f);
- RNA_def_property_ui_text(prop, "Envelope Deform Distance", "Bone deformation distance (for Envelope deform only).");
+ RNA_def_property_ui_text(prop, "Envelope Deform Distance", "Bone deformation distance (for Envelope deform only)");
RNA_def_property_update(prop, 0, "rna_Armature_update_data");
prop= RNA_def_property(srna, "envelope_weight", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "weight");
RNA_def_property_range(prop, 0.0f, 1000.0f);
- RNA_def_property_ui_text(prop, "Envelope Deform Weight", "Bone deformation weight (for Envelope deform only).");
+ RNA_def_property_ui_text(prop, "Envelope Deform Weight", "Bone deformation weight (for Envelope deform only)");
RNA_def_property_update(prop, 0, "rna_Armature_update_data");
prop= RNA_def_property(srna, "head_radius", PROP_FLOAT, PROP_NONE);
if(editbone) RNA_def_property_update(prop, 0, "rna_Armature_editbone_transform_update");
RNA_def_property_float_sdna(prop, NULL, "rad_head");
//RNA_def_property_range(prop, 0, 1000); // XXX range is 0 to lim, where lim= 10000.0f*MAX2(1.0, view3d->grid);
- RNA_def_property_ui_text(prop, "Envelope Head Radius", "Radius of head of bone (for Envelope deform only).");
+ RNA_def_property_ui_text(prop, "Envelope Head Radius", "Radius of head of bone (for Envelope deform only)");
prop= RNA_def_property(srna, "tail_radius", PROP_FLOAT, PROP_NONE);
if(editbone) RNA_def_property_update(prop, 0, "rna_Armature_editbone_transform_update");
RNA_def_property_float_sdna(prop, NULL, "rad_tail");
//RNA_def_property_range(prop, 0, 1000); // XXX range is 0 to lim, where lim= 10000.0f*MAX2(1.0, view3d->grid);
- RNA_def_property_ui_text(prop, "Envelope Tail Radius", "Radius of tail of bone (for Envelope deform only).");
+ RNA_def_property_ui_text(prop, "Envelope Tail Radius", "Radius of tail of bone (for Envelope deform only)");
/* b-bones deform settings */
prop= RNA_def_property(srna, "bbone_segments", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "segments");
RNA_def_property_range(prop, 1, 32);
- RNA_def_property_ui_text(prop, "B-Bone Segments", "Number of subdivisions of bone (for B-Bones only).");
+ RNA_def_property_ui_text(prop, "B-Bone Segments", "Number of subdivisions of bone (for B-Bones only)");
RNA_def_property_update(prop, 0, "rna_Armature_update_data");
prop= RNA_def_property(srna, "bbone_in", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ease1");
RNA_def_property_range(prop, 0.0f, 2.0f);
- RNA_def_property_ui_text(prop, "B-Bone Ease In", "Length of first Bezier Handle (for B-Bones only).");
+ RNA_def_property_ui_text(prop, "B-Bone Ease In", "Length of first Bezier Handle (for B-Bones only)");
RNA_def_property_update(prop, 0, "rna_Armature_update_data");
prop= RNA_def_property(srna, "bbone_out", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ease2");
RNA_def_property_range(prop, 0.0f, 2.0f);
- RNA_def_property_ui_text(prop, "B-Bone Ease Out", "Length of second Bezier Handle (for B-Bones only).");
+ RNA_def_property_ui_text(prop, "B-Bone Ease Out", "Length of second Bezier Handle (for B-Bones only)");
RNA_def_property_update(prop, 0, "rna_Armature_update_data");
}
@@ -514,7 +502,7 @@ static void rna_def_bone(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "Bone", NULL);
- RNA_def_struct_ui_text(srna, "Bone", "Bone in an Armature datablock.");
+ RNA_def_struct_ui_text(srna, "Bone", "Bone in an Armature datablock");
RNA_def_struct_ui_icon(srna, ICON_BONE_DATA);
RNA_def_struct_path_func(srna, "rna_Bone_path");
RNA_def_struct_idproperties_func(srna, "rna_Bone_idproperties");
@@ -524,7 +512,7 @@ static void rna_def_bone(BlenderRNA *brna)
prop= RNA_def_property(srna, "parent", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "Bone");
RNA_def_property_pointer_sdna(prop, NULL, "parent");
- RNA_def_property_ui_text(prop, "Parent", "Parent bone (in same Armature).");
+ RNA_def_property_ui_text(prop, "Parent", "Parent bone (in same Armature)");
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
/* children (collection) */
@@ -538,7 +526,7 @@ static void rna_def_bone(BlenderRNA *brna)
// XXX should we define this in PoseChannel wrapping code instead? but PoseChannels directly get some of their flags from here...
prop= RNA_def_property(srna, "hidden", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BONE_HIDDEN_P);
- RNA_def_property_ui_text(prop, "Hidden", "Bone is not visible when it is not in Edit Mode (i.e. in Object or Pose Modes).");
+ RNA_def_property_ui_text(prop, "Hidden", "Bone is not visible when it is not in Edit Mode (i.e. in Object or Pose Modes)");
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE);
@@ -550,32 +538,32 @@ static void rna_def_bone(BlenderRNA *brna)
prop= RNA_def_property(srna, "matrix", PROP_FLOAT, PROP_MATRIX);
RNA_def_property_float_sdna(prop, NULL, "bone_mat");
RNA_def_property_array(prop, 9);
- RNA_def_property_ui_text(prop, "Bone Matrix", "3x3 bone matrix.");
+ RNA_def_property_ui_text(prop, "Bone Matrix", "3x3 bone matrix");
prop= RNA_def_property(srna, "matrix_local", PROP_FLOAT, PROP_MATRIX);
RNA_def_property_float_sdna(prop, NULL, "arm_mat");
RNA_def_property_array(prop, 16);
- RNA_def_property_ui_text(prop, "Bone Armature-Relative Matrix", "4x4 bone matrix relative to armature.");
+ RNA_def_property_ui_text(prop, "Bone Armature-Relative Matrix", "4x4 bone matrix relative to armature");
prop= RNA_def_property(srna, "tail", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "tail");
RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "Tail", "Location of tail end of the bone.");
+ RNA_def_property_ui_text(prop, "Tail", "Location of tail end of the bone");
prop= RNA_def_property(srna, "tail_local", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "arm_tail");
RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "Armature-Relative Tail", "Location of tail end of the bone relative to armature.");
+ RNA_def_property_ui_text(prop, "Armature-Relative Tail", "Location of tail end of the bone relative to armature");
prop= RNA_def_property(srna, "head", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "head");
RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "Head", "Location of head end of the bone relative to its parent.");
+ RNA_def_property_ui_text(prop, "Head", "Location of head end of the bone relative to its parent");
prop= RNA_def_property(srna, "head_local", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "arm_head");
RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "Armature-Relative Head", "Location of head end of the bone relative to armature.");
+ RNA_def_property_ui_text(prop, "Armature-Relative Head", "Location of head end of the bone relative to armature");
}
static void rna_def_edit_bone(BlenderRNA *brna)
@@ -586,7 +574,7 @@ static void rna_def_edit_bone(BlenderRNA *brna)
srna= RNA_def_struct(brna, "EditBone", NULL);
RNA_def_struct_sdna(srna, "EditBone");
RNA_def_struct_idproperties_func(srna, "rna_EditBone_idproperties");
- RNA_def_struct_ui_text(srna, "Edit Bone", "Editmode bone in an Armature datablock.");
+ RNA_def_struct_ui_text(srna, "Edit Bone", "Editmode bone in an Armature datablock");
RNA_def_struct_ui_icon(srna, ICON_BONE_DATA);
RNA_define_verify_sdna(0); // not in sdna
@@ -595,24 +583,24 @@ static void rna_def_edit_bone(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "EditBone");
RNA_def_property_pointer_funcs(prop, "rna_EditBone_parent_get", "rna_EditBone_parent_set", NULL);
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Parent", "Parent edit bone (in same Armature).");
+ RNA_def_property_ui_text(prop, "Parent", "Parent edit bone (in same Armature)");
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
prop= RNA_def_property(srna, "roll", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "roll");
- RNA_def_property_ui_text(prop, "Roll", "Bone rotation around head-tail axis.");
+ RNA_def_property_ui_text(prop, "Roll", "Bone rotation around head-tail axis");
RNA_def_property_update(prop, 0, "rna_Armature_editbone_transform_update");
prop= RNA_def_property(srna, "head", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "head");
RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "Head", "Location of head end of the bone.");
+ RNA_def_property_ui_text(prop, "Head", "Location of head end of the bone");
RNA_def_property_update(prop, 0, "rna_Armature_editbone_transform_update");
prop= RNA_def_property(srna, "tail", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "tail");
RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "Tail", "Location of tail end of the bone.");
+ RNA_def_property_ui_text(prop, "Tail", "Location of tail end of the bone");
RNA_def_property_update(prop, 0, "rna_Armature_editbone_transform_update");
rna_def_bone_common(srna, 1);
@@ -624,7 +612,7 @@ static void rna_def_edit_bone(BlenderRNA *brna)
prop= RNA_def_property(srna, "locked", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BONE_EDITMODE_LOCKED);
- RNA_def_property_ui_text(prop, "Locked", "Bone is not able to be transformed when in Edit Mode.");
+ RNA_def_property_ui_text(prop, "Locked", "Bone is not able to be transformed when in Edit Mode");
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE);
@@ -648,7 +636,7 @@ static void rna_def_edit_bone(BlenderRNA *brna)
RNA_def_property_array(prop, 16);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_flag(prop, PROP_THICK_WRAP); /* no reference to original data */
- RNA_def_property_ui_text(prop, "Editbone Matrix", "Read-only matrix calculated from the roll (armature space).");
+ RNA_def_property_ui_text(prop, "Editbone Matrix", "Read-only matrix calculated from the roll (armature space)");
RNA_def_property_float_funcs(prop, "rna_EditBone_matrix_get", NULL, NULL); // TODO - this could be made writable also
RNA_api_armature_edit_bone(srna);
@@ -669,14 +657,14 @@ static void rna_def_armature_bones(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_property_srna(cprop, "ArmatureBones");
srna= RNA_def_struct(brna, "ArmatureBones", NULL);
RNA_def_struct_sdna(srna, "bArmature");
- RNA_def_struct_ui_text(srna, "Armature Bones", "Collection of armature bones.");
+ RNA_def_struct_ui_text(srna, "Armature Bones", "Collection of armature bones");
prop= RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "Bone");
RNA_def_property_pointer_sdna(prop, NULL, "act_bone");
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Active Bone", "Armatures active bone.");
+ RNA_def_property_ui_text(prop, "Active Bone", "Armatures active bone");
RNA_def_property_pointer_funcs(prop, NULL, "rna_Armature_act_bone_set", NULL);
/* todo, redraw */
@@ -695,13 +683,13 @@ static void rna_def_armature_edit_bones(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_property_srna(cprop, "ArmatureEditBones");
srna= RNA_def_struct(brna, "ArmatureEditBones", NULL);
RNA_def_struct_sdna(srna, "bArmature");
- RNA_def_struct_ui_text(srna, "Armature EditBones", "Collection of armature edit bones.");
+ RNA_def_struct_ui_text(srna, "Armature EditBones", "Collection of armature edit bones");
prop= RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "EditBone");
RNA_def_property_pointer_sdna(prop, NULL, "act_edbone");
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Active EditBone", "Armatures active edit bone.");
+ RNA_def_property_ui_text(prop, "Active EditBone", "Armatures active edit bone");
//RNA_def_property_update(prop, 0, "rna_Armature_act_editbone_update");
RNA_def_property_pointer_funcs(prop, NULL, "rna_Armature_act_edit_bone_set", NULL);
@@ -712,19 +700,19 @@ static void rna_def_armature_edit_bones(BlenderRNA *brna, PropertyRNA *cprop)
func= RNA_def_function(srna, "new", "rna_Armature_edit_bone_new");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
RNA_def_function_ui_description(func, "Add a new bone.");
- parm= RNA_def_string(func, "name", "Object", 0, "", "New name for the bone.");
+ parm= RNA_def_string(func, "name", "Object", 0, "", "New name for the bone");
RNA_def_property_flag(parm, PROP_REQUIRED);
/* return type */
- parm= RNA_def_pointer(func, "bone", "EditBone", "", "Newly created edit bone.");
+ parm= RNA_def_pointer(func, "bone", "EditBone", "", "Newly created edit bone");
RNA_def_function_return(func, parm);
/* remove target */
func= RNA_def_function(srna, "remove", "rna_Armature_edit_bone_remove");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- RNA_def_function_ui_description(func, "Remove an existing bone from the armature.");
+ RNA_def_function_ui_description(func, "Remove an existing bone from the armature");
/* target to remove*/
- parm= RNA_def_pointer(func, "bone", "EditBone", "", "EditBone to remove.");
+ parm= RNA_def_pointer(func, "bone", "EditBone", "", "EditBone to remove");
RNA_def_property_flag(parm, PROP_REQUIRED);
}
@@ -734,31 +722,23 @@ static void rna_def_armature(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem prop_drawtype_items[] = {
- {ARM_OCTA, "OCTAHEDRAL", 0, "Octahedral", "Display bones as octahedral shape (default)."},
- {ARM_LINE, "STICK", 0, "Stick", "Display bones as simple 2D lines with dots."},
+ {ARM_OCTA, "OCTAHEDRAL", 0, "Octahedral", "Display bones as octahedral shape (default)"},
+ {ARM_LINE, "STICK", 0, "Stick", "Display bones as simple 2D lines with dots"},
{ARM_B_BONE, "BBONE", 0, "B-Bone", "Display bones as boxes, showing subdivision and B-Splines"},
- {ARM_ENVELOPE, "ENVELOPE", 0, "Envelope", "Display bones as extruded spheres, showing defomation influence volume."},
+ {ARM_ENVELOPE, "ENVELOPE", 0, "Envelope", "Display bones as extruded spheres, showing defomation influence volume"},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem prop_ghost_type_items[] = {
- {ARM_GHOST_CUR, "CURRENT_FRAME", 0, "Around Frame", "Display Ghosts of poses within a fixed number of frames around the current frame."},
- {ARM_GHOST_RANGE, "RANGE", 0, "In Range", "Display Ghosts of poses within specified range."},
- {ARM_GHOST_KEYS, "KEYS", 0, "On Keyframes", "Display Ghosts of poses on Keyframes."},
- {0, NULL, 0, NULL, NULL}};
- static const EnumPropertyItem prop_paths_type_items[]= {
- {ARM_PATH_ACFRA, "CURRENT_FRAME", 0, "Around Frame", "Display Paths of poses within a fixed number of frames around the current frame."},
- {0, "RANGE", 0, "In Range", "Display Paths of poses within specified range."},
- {0, NULL, 0, NULL, NULL}};
- static const EnumPropertyItem prop_paths_location_items[]= {
- {ARM_PATH_HEADS, "HEADS", 0, "Heads", "Calculate bone paths from heads"},
- {0, "TAILS", 0, "Tails", "Calculate bone paths from tails"},
+ {ARM_GHOST_CUR, "CURRENT_FRAME", 0, "Around Frame", "Display Ghosts of poses within a fixed number of frames around the current frame"},
+ {ARM_GHOST_RANGE, "RANGE", 0, "In Range", "Display Ghosts of poses within specified range"},
+ {ARM_GHOST_KEYS, "KEYS", 0, "On Keyframes", "Display Ghosts of poses on Keyframes"},
{0, NULL, 0, NULL, NULL}};
static const EnumPropertyItem prop_pose_position_items[]= {
- {0, "POSE", 0, "Pose Position", "Show armature in posed state."},
- {ARM_RESTPOS, "REST", 0, "Rest Position", "Show Armature in binding pose state. No posing possible."},
+ {0, "POSE", 0, "Pose Position", "Show armature in posed state"},
+ {ARM_RESTPOS, "REST", 0, "Rest Position", "Show Armature in binding pose state. No posing possible"},
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "Armature", "ID");
- RNA_def_struct_ui_text(srna, "Armature", "Armature datablock containing a hierarchy of bones, usually used for rigging characters.");
+ RNA_def_struct_ui_text(srna, "Armature", "Armature datablock containing a hierarchy of bones, usually used for rigging characters");
RNA_def_struct_ui_icon(srna, ICON_ARMATURE_DATA);
RNA_def_struct_sdna(srna, "bArmature");
@@ -783,38 +763,30 @@ static void rna_def_armature(BlenderRNA *brna)
prop= RNA_def_property(srna, "pose_position", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
RNA_def_property_enum_items(prop, prop_pose_position_items);
- RNA_def_property_ui_text(prop, "Pose Position", "Show armature in binding pose or final posed state.");
+ RNA_def_property_ui_text(prop, "Pose Position", "Show armature in binding pose or final posed state");
RNA_def_property_update(prop, 0, "rna_Armature_update_data");
prop= RNA_def_property(srna, "drawtype", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_drawtype_items);
RNA_def_property_ui_text(prop, "Draw Type", "");
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
+ RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);
+// XXX depreceated ....... old animviz for armatures only
prop= RNA_def_property(srna, "ghost_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "ghosttype");
RNA_def_property_enum_items(prop, prop_ghost_type_items);
RNA_def_property_ui_text(prop, "Ghost Type", "Method of Onion-skinning for active Action");
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
-
- prop= RNA_def_property(srna, "paths_type", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_bitflag_sdna(prop, NULL, "pathflag");
- RNA_def_property_enum_items(prop, prop_paths_type_items);
- RNA_def_property_ui_text(prop, "Paths Type", "Type of range to show for Bone Paths");
- RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
-
- prop= RNA_def_property(srna, "paths_location", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_bitflag_sdna(prop, NULL, "pathflag");
- RNA_def_property_enum_items(prop, prop_paths_location_items);
- RNA_def_property_ui_text(prop, "Paths Location", "When calculating Bone Paths, use Head or Tips");
- RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
-
+ RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);
+// XXX depreceated ....... old animviz for armatures only
+
/* Boolean values */
/* layer */
prop= RNA_def_property(srna, "layer", PROP_BOOLEAN, PROP_LAYER_MEMBER);
RNA_def_property_boolean_sdna(prop, NULL, "layer", 1);
RNA_def_property_array(prop, 32);
- RNA_def_property_ui_text(prop, "Visible Layers", "Armature layer visibility.");
+ RNA_def_property_ui_text(prop, "Visible Layers", "Armature layer visibility");
RNA_def_property_boolean_funcs(prop, NULL, "rna_Armature_layer_set");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Armature_redraw_data");
RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);
@@ -823,21 +795,21 @@ static void rna_def_armature(BlenderRNA *brna)
prop= RNA_def_property(srna, "layer_protection", PROP_BOOLEAN, PROP_LAYER);
RNA_def_property_boolean_sdna(prop, NULL, "layer_protected", 1);
RNA_def_property_array(prop, 32);
- RNA_def_property_ui_text(prop, "Layer Proxy Protection", "Protected layers in Proxy Instances are restored to Proxy settings on file reload and undo.");
+ RNA_def_property_ui_text(prop, "Layer Proxy Protection", "Protected layers in Proxy Instances are restored to Proxy settings on file reload and undo");
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
/* flag */
-
-
prop= RNA_def_property(srna, "draw_axes", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ARM_DRAWAXES);
- RNA_def_property_ui_text(prop, "Draw Axes", "Draw bone axes.");
+ RNA_def_property_ui_text(prop, "Draw Axes", "Draw bone axes");
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
+ RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);
prop= RNA_def_property(srna, "draw_names", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ARM_DRAWNAMES);
- RNA_def_property_ui_text(prop, "Draw Names", "Draw bone names.");
+ RNA_def_property_ui_text(prop, "Draw Names", "Draw bone names");
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
+ RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);
prop= RNA_def_property(srna, "delay_deform", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ARM_DELAYDEFORM);
@@ -846,28 +818,33 @@ static void rna_def_armature(BlenderRNA *brna)
prop= RNA_def_property(srna, "x_axis_mirror", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ARM_MIRROR_EDIT);
- RNA_def_property_ui_text(prop, "X-Axis Mirror", "Apply changes to matching bone on opposite side of X-Axis.");
+ RNA_def_property_ui_text(prop, "X-Axis Mirror", "Apply changes to matching bone on opposite side of X-Axis");
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
+ RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);
prop= RNA_def_property(srna, "auto_ik", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ARM_AUTO_IK);
- RNA_def_property_ui_text(prop, "Auto IK", "Add temporaral IK constraints while grabbing bones in Pose Mode.");
+ RNA_def_property_ui_text(prop, "Auto IK", "Add temporaral IK constraints while grabbing bones in Pose Mode");
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
+ RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);
prop= RNA_def_property(srna, "draw_custom_bone_shapes", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", ARM_NO_CUSTOM);
- RNA_def_property_ui_text(prop, "Draw Custom Bone Shapes", "Draw bones with their custom shapes.");
+ RNA_def_property_ui_text(prop, "Draw Custom Bone Shapes", "Draw bones with their custom shapes");
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
prop= RNA_def_property(srna, "draw_group_colors", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ARM_COL_CUSTOM);
- RNA_def_property_ui_text(prop, "Draw Bone Group Colors", "Draw bone group colors.");
+ RNA_def_property_ui_text(prop, "Draw Bone Group Colors", "Draw bone group colors");
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
+// XXX depreceated ....... old animviz for armatures only
prop= RNA_def_property(srna, "ghost_only_selected", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ARM_GHOST_ONLYSEL);
RNA_def_property_ui_text(prop, "Draw Ghosts on Selected Bones Only", "");
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
+ RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);
+// XXX depreceated ....... old animviz for armatures only
/* deformflag */
prop= RNA_def_property(srna, "deform_vertexgroups", PROP_BOOLEAN, PROP_NONE);
@@ -895,79 +872,37 @@ static void rna_def_armature(BlenderRNA *brna)
//RNA_def_property_ui_text(prop, "Invert Vertex Group Influence", "Invert Vertex Group influence (only for Modifiers)");
//RNA_def_property_update(prop, 0, "rna_Armature_update_data");
- /* pathflag */
- prop= RNA_def_property(srna, "paths_show_frame_numbers", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "pathflag", ARM_PATH_FNUMS);
- RNA_def_property_ui_text(prop, "Paths Show Frame Numbers", "When drawing Armature in Pose Mode, show frame numbers on Bone Paths");
- RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
-
- prop= RNA_def_property(srna, "paths_highlight_keyframes", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "pathflag", ARM_PATH_KFRAS);
- RNA_def_property_ui_text(prop, "Paths Highlight Keyframes", "When drawing Armature in Pose Mode, emphasize position of keyframes on Bone Paths");
- RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
-
- prop= RNA_def_property(srna, "paths_show_keyframe_numbers", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "pathflag", ARM_PATH_KFNOS);
- RNA_def_property_ui_text(prop, "Paths Show Keyframe Numbers", "When drawing Armature in Pose Mode, show frame numbers of Keyframes on Bone Paths");
- RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
-
-
/* Number fields */
+// XXX depreceated ....... old animviz for armatures only
/* ghost/onionskining settings */
prop= RNA_def_property(srna, "ghost_step", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "ghostep");
RNA_def_property_range(prop, 0, 30);
- RNA_def_property_ui_text(prop, "Ghosting Step", "Number of frame steps on either side of current frame to show as ghosts (only for 'Around Current Frame' Onion-skining method).");
+ RNA_def_property_ui_text(prop, "Ghosting Step", "Number of frame steps on either side of current frame to show as ghosts (only for 'Around Current Frame' Onion-skining method)");
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
+ RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);
prop= RNA_def_property(srna, "ghost_size", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "ghostsize");
RNA_def_property_range(prop, 1, 20);
- RNA_def_property_ui_text(prop, "Ghosting Frame Step", "Frame step for Ghosts (not for 'On Keyframes' Onion-skining method).");
+ RNA_def_property_ui_text(prop, "Ghosting Frame Step", "Frame step for Ghosts (not for 'On Keyframes' Onion-skining method)");
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
+ RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);
prop= RNA_def_property(srna, "ghost_start_frame", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "ghostsf");
RNA_def_property_int_funcs(prop, NULL, "rna_Armature_ghost_start_frame_set", NULL);
- RNA_def_property_ui_text(prop, "Ghosting Start Frame", "Starting frame of range of Ghosts to display (not for 'Around Current Frame' Onion-skinning method).");
+ RNA_def_property_ui_text(prop, "Ghosting Start Frame", "Starting frame of range of Ghosts to display (not for 'Around Current Frame' Onion-skinning method)");
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
+ RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);
prop= RNA_def_property(srna, "ghost_end_frame", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "ghostef");
RNA_def_property_int_funcs(prop, NULL, "rna_Armature_ghost_end_frame_set", NULL);
- RNA_def_property_ui_text(prop, "Ghosting End Frame", "End frame of range of Ghosts to display (not for 'Around Current Frame' Onion-skinning method).");
+ RNA_def_property_ui_text(prop, "Ghosting End Frame", "End frame of range of Ghosts to display (not for 'Around Current Frame' Onion-skinning method)");
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
-
- /* bone path settings */
- prop= RNA_def_property(srna, "path_size", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "pathsize");
- RNA_def_property_range(prop, 1, 100);
- RNA_def_property_ui_text(prop, "Paths Frame Step", "Number of frames between 'dots' on Bone Paths (when drawing).");
- RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
-
- prop= RNA_def_property(srna, "path_start_frame", PROP_INT, PROP_TIME);
- RNA_def_property_int_sdna(prop, NULL, "pathsf");
- RNA_def_property_int_funcs(prop, NULL, "rna_Armature_path_start_frame_set", NULL);
- RNA_def_property_ui_text(prop, "Paths Calculation Start Frame", "Starting frame of range of frames to use for Bone Path calculations.");
- RNA_def_property_update(prop, 0, "rna_Armature_update_data");
-
- prop= RNA_def_property(srna, "path_end_frame", PROP_INT, PROP_TIME);
- RNA_def_property_int_sdna(prop, NULL, "pathef");
- RNA_def_property_int_funcs(prop, NULL, "rna_Armature_path_end_frame_set", NULL);
- RNA_def_property_ui_text(prop, "Paths Calculation End Frame", "End frame of range of frames to use for Bone Path calculations.");
- RNA_def_property_update(prop, 0, "rna_Armature_update_data");
-
- prop= RNA_def_property(srna, "path_before_current", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "pathbc");
- RNA_def_property_range(prop, 1, MAXFRAMEF/2);
- RNA_def_property_ui_text(prop, "Paths Frames Before Current", "Number of frames before current frame to show on Bone Paths (only for 'Around Current' option).");
- RNA_def_property_update(prop, 0, "rna_Armature_update_data");
-
- prop= RNA_def_property(srna, "path_after_current", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "pathac");
- RNA_def_property_range(prop, 1, MAXFRAMEF/2);
- RNA_def_property_ui_text(prop, "Paths Frames After Current", "Number of frames after current frame to show on Bone Paths (only for 'Around Current' option).");
- RNA_def_property_update(prop, 0, "rna_Armature_update_data");
+ RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);
+// XXX depreceated ....... old animviz for armatures only
}
void RNA_def_armature(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_armature_api.c b/source/blender/makesrna/intern/rna_armature_api.c
index f3983a43b4f..0f38486a6fc 100644
--- a/source/blender/makesrna/intern/rna_armature_api.c
+++ b/source/blender/makesrna/intern/rna_armature_api.c
@@ -13,7 +13,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* The Original Code is Copyright (C) 2009 Blender Foundation.
* All rights reserved.
diff --git a/source/blender/makesrna/intern/rna_boid.c b/source/blender/makesrna/intern/rna_boid.c
index 01d8a4db498..063e20a73b7 100644
--- a/source/blender/makesrna/intern/rna_boid.c
+++ b/source/blender/makesrna/intern/rna_boid.c
@@ -15,7 +15,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* The Original Code is Copyright (C) 2009 by Janne Karhu.
* All rights reserved.
@@ -45,24 +45,24 @@
#include "WM_types.h"
EnumPropertyItem boidrule_type_items[] ={
- {eBoidRuleType_Goal, "GOAL", 0, "Goal", "Go to assigned object or loudest assigned signal source."},
- {eBoidRuleType_Avoid, "AVOID", 0, "Avoid", "Get away from assigned object or loudest assigned signal source."},
- {eBoidRuleType_AvoidCollision, "AVOID_COLLISION", 0, "Avoid Collision", "Monoeuver to avoid collisions with other boids and deflector objects in near future."},
- {eBoidRuleType_Separate, "SEPARATE", 0, "Separate", "Keep from going through other boids."},
- {eBoidRuleType_Flock, "FLOCK", 0, "Flock", "Move to center of neighbors and match their velocity."},
- {eBoidRuleType_FollowLeader, "FOLLOW_LEADER", 0, "Follow Leader", "Follow a boid or assigned object."},
- {eBoidRuleType_AverageSpeed, "AVERAGE_SPEED", 0, "Average Speed", "Maintain speed, flight level or wander."},
- {eBoidRuleType_Fight, "FIGHT", 0, "Fight", "Go to closest enemy and attack when in range."},
- //{eBoidRuleType_Protect, "PROTECT", 0, "Protect", "Go to enemy closest to target and attack when in range."},
- //{eBoidRuleType_Hide, "HIDE", 0, "Hide", "Find a deflector move to it's other side from closest enemy."},
- //{eBoidRuleType_FollowPath, "FOLLOW_PATH", 0, "Follow Path", "Move along a assigned curve or closest curve in a group."},
- //{eBoidRuleType_FollowWall, "FOLLOW_WALL", 0, "Follow Wall", "Move next to a deflector object's in direction of it's tangent."},
+ {eBoidRuleType_Goal, "GOAL", 0, "Goal", "Go to assigned object or loudest assigned signal source"},
+ {eBoidRuleType_Avoid, "AVOID", 0, "Avoid", "Get away from assigned object or loudest assigned signal source"},
+ {eBoidRuleType_AvoidCollision, "AVOID_COLLISION", 0, "Avoid Collision", "Maneuver to avoid collisions with other boids and deflector objects in near future"},
+ {eBoidRuleType_Separate, "SEPARATE", 0, "Separate", "Keep from going through other boids"},
+ {eBoidRuleType_Flock, "FLOCK", 0, "Flock", "Move to center of neighbors and match their velocity"},
+ {eBoidRuleType_FollowLeader, "FOLLOW_LEADER", 0, "Follow Leader", "Follow a boid or assigned object"},
+ {eBoidRuleType_AverageSpeed, "AVERAGE_SPEED", 0, "Average Speed", "Maintain speed, flight level or wander"},
+ {eBoidRuleType_Fight, "FIGHT", 0, "Fight", "Go to closest enemy and attack when in range"},
+ //{eBoidRuleType_Protect, "PROTECT", 0, "Protect", "Go to enemy closest to target and attack when in range"},
+ //{eBoidRuleType_Hide, "HIDE", 0, "Hide", "Find a deflector move to it's other side from closest enemy"},
+ //{eBoidRuleType_FollowPath, "FOLLOW_PATH", 0, "Follow Path", "Move along a assigned curve or closest curve in a group"},
+ //{eBoidRuleType_FollowWall, "FOLLOW_WALL", 0, "Follow Wall", "Move next to a deflector object's in direction of it's tangent"},
{0, NULL, 0, NULL, NULL}};
EnumPropertyItem boidruleset_type_items[] ={
- {eBoidRulesetType_Fuzzy, "FUZZY", 0, "Fuzzy", "Rules are gone through top to bottom. Only the first rule that effect above fuzziness threshold is evaluated."},
- {eBoidRulesetType_Random, "RANDOM", 0, "Random", "A random rule is selected for each boid."},
- {eBoidRulesetType_Average, "AVERAGE", 0, "Average", "All rules are averaged."},
+ {eBoidRulesetType_Fuzzy, "FUZZY", 0, "Fuzzy", "Rules are gone through top to bottom. Only the first rule that effect above fuzziness threshold is evaluated"},
+ {eBoidRulesetType_Random, "RANDOM", 0, "Random", "A random rule is selected for each boid"},
+ {eBoidRulesetType_Average, "AVERAGE", 0, "Average", "All rules are averaged"},
{0, NULL, 0, NULL, NULL}};
@@ -236,12 +236,12 @@ static void rna_def_boidrule_goal(BlenderRNA *brna)
prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
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_ui_text(prop, "Object", "Goal object");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Predict", "Predict target movement");
RNA_def_property_update(prop, 0, "rna_Boids_reset");
}
@@ -257,17 +257,17 @@ static void rna_def_boidrule_avoid(BlenderRNA *brna)
prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
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_ui_text(prop, "Object", "Object to avoid");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Predict", "Predict target movement");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Fear factor", "Avoid object if danger from it is above this threshol");
RNA_def_property_update(prop, 0, "rna_Boids_reset");
}
@@ -281,17 +281,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_ui_text(prop, "Boids", "Avoid collision with other boids");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Deflectors", "Avoid collision with deflector objects");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Look ahead", "Time to look ahead in seconds");
RNA_def_property_update(prop, 0, "rna_Boids_reset");
}
@@ -306,22 +306,22 @@ static void rna_def_boidrule_follow_leader(BlenderRNA *brna)
prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
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_ui_text(prop, "Object", "Follow this object instead of a boid");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Distance", "Distance behind leader to follow");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Queue Size", "How many boids in a line");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Line", "Follow leader in a line");
RNA_def_property_update(prop, 0, "rna_Boids_reset");
}
@@ -335,17 +335,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_ui_text(prop, "Wander", "How fast velocity's direction is randomized");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Level", "How much velocity's z-component is kept constant");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Speed", "Percentage of maximum speed");
RNA_def_property_update(prop, 0, "rna_Boids_reset");
}
@@ -359,12 +359,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_ui_text(prop, "Fight Distance", "Attack boids at max this distance");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Flee Distance", "Flee to this distance");
RNA_def_property_update(prop, 0, "rna_Boids_reset");
}
@@ -381,7 +381,7 @@ static void rna_def_boidrule(BlenderRNA *brna)
/* strings */
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
- RNA_def_property_ui_text(prop, "Name", "Boid rule name.");
+ RNA_def_property_ui_text(prop, "Name", "Boid rule name");
RNA_def_struct_name_property(srna, prop);
/* enums */
@@ -394,17 +394,17 @@ static void rna_def_boidrule(BlenderRNA *brna)
/* flags */
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_ui_text(prop, "In Air", "Use rule when boid is flying");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "On Land", "Use rule when boid is on land");
RNA_def_property_update(prop, 0, "rna_Boids_reset");
//prop= RNA_def_property(srna, "expanded", PROP_BOOLEAN, PROP_NONE);
//RNA_def_property_boolean_sdna(prop, NULL, "mode", eModifierMode_Expanded);
- //RNA_def_property_ui_text(prop, "Expanded", "Set modifier expanded in the user interface.");
+ //RNA_def_property_ui_text(prop, "Expanded", "Set modifier expanded in the user interface");
/* types */
rna_def_boidrule_goal(brna);
@@ -421,15 +421,15 @@ static void rna_def_boidstate(BlenderRNA *brna)
PropertyRNA *prop;
srna = RNA_def_struct(brna, "BoidState", NULL);
- RNA_def_struct_ui_text(srna, "Boid State", "Boid state for boid physics.");
+ RNA_def_struct_ui_text(srna, "Boid State", "Boid state for boid physics");
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
- RNA_def_property_ui_text(prop, "Name", "Boid state name.");
+ RNA_def_property_ui_text(prop, "Name", "Boid state name");
RNA_def_struct_name_property(srna, prop);
prop= RNA_def_property(srna, "ruleset_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, boidruleset_type_items);
- RNA_def_property_ui_text(prop, "Rule Evaluation", "How the rules in the list are evaluated.");
+ RNA_def_property_ui_text(prop, "Rule Evaluation", "How the rules in the list are evaluated");
prop= RNA_def_property(srna, "rules", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "BoidRule");
@@ -465,21 +465,21 @@ static void rna_def_boid_settings(BlenderRNA *brna)
PropertyRNA *prop;
srna = RNA_def_struct(brna, "BoidSettings", NULL);
- RNA_def_struct_ui_text(srna, "Boid Settings", "Settings for boid physics.");
+ RNA_def_struct_ui_text(srna, "Boid Settings", "Settings for boid physics");
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_ui_text(prop, "Landing Smoothness", "How smoothly the boids land");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Banking", "Amount of rotation around velocity vector on turns");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Height", "Boid height relative to particle size");
RNA_def_property_update(prop, 0, "rna_Boids_reset");
/* states */
@@ -499,99 +499,99 @@ static void rna_def_boid_settings(BlenderRNA *brna)
/* character properties */
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_ui_text(prop, "Health", "Initial boid health when born");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Strength", "Maximum caused damage on attack per second");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Aggression", "Boid will fight this times stronger enemy");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Accuracy", "Accuracy of attack");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Range", "The maximum distance from which a boid can attack");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Min Air Speed", "Minimum speed in air (relative to maximum speed)");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Max Air Speed", "Maximum speed in air");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Max Air Acceleration", "Maximum acceleration in air (relative to maximum speed)");
RNA_def_property_update(prop, 0, "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_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");
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_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");
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_ui_text(prop, "Jump Speed", "Maximum speed for jumping");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Max Land Speed", "Maximum speed on land");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Max Land Acceleration", "Maximum acceleration on land (relative to maximum speed)");
RNA_def_property_update(prop, 0, "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_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");
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_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");
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_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");
/* 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_ui_text(prop, "Allow Flight", "Allow boids to move in air");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Allow Land", "Allow boids to move on land");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Allow Climbing", "Allow boids to climb goal objects");
RNA_def_property_update(prop, 0, "rna_Boids_reset");
}
diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c
index 8f8dd4681ab..f3e784045b3 100644
--- a/source/blender/makesrna/intern/rna_brush.c
+++ b/source/blender/makesrna/intern/rna_brush.c
@@ -15,7 +15,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor(s): Blender Foundation (2008), Juho Veps�l�inen
*
@@ -32,19 +32,11 @@
#include "DNA_brush_types.h"
#include "DNA_texture_types.h"
+#include "BLI_math.h"
+
#include "IMB_imbuf.h"
-#include "WM_types.h"
-EnumPropertyItem brush_sculpt_tool_items[] = {
- {SCULPT_TOOL_DRAW, "DRAW", 0, "Draw", ""},
- {SCULPT_TOOL_SMOOTH, "SMOOTH", 0, "Smooth", ""},
- {SCULPT_TOOL_PINCH, "PINCH", 0, "Pinch", ""},
- {SCULPT_TOOL_INFLATE, "INFLATE", 0, "Inflate", ""},
- {SCULPT_TOOL_GRAB, "GRAB", 0, "Grab", ""},
- {SCULPT_TOOL_LAYER, "LAYER", 0, "Layer", ""},
- {SCULPT_TOOL_FLATTEN, "FLATTEN", 0, "Flatten", ""},
- {SCULPT_TOOL_CLAY, "CLAY", 0, "Clay", ""},
- {0, NULL, 0, NULL, NULL}};
+#include "WM_types.h"
#ifdef RNA_RUNTIME
@@ -60,20 +52,6 @@ static void rna_Brush_update(Main *bmain, Scene *scene, PointerRNA *ptr)
WM_main_add_notifier(NC_BRUSH|NA_EDITED, br);
}
-static float rna_BrushTextureSlot_angle_get(PointerRNA *ptr)
-{
- MTex *tex= (MTex*)ptr->data;
- const float conv = 57.295779506;
- return tex->rot * conv;
-}
-
-static void rna_BrushTextureSlot_angle_set(PointerRNA *ptr, float v)
-{
- MTex *tex= (MTex*)ptr->data;
- const float conv = 0.017453293;
- tex->rot = v * conv;
-}
-
#else
static void rna_def_brush_texture_slot(BlenderRNA *brna)
@@ -89,13 +67,12 @@ static void rna_def_brush_texture_slot(BlenderRNA *brna)
srna= RNA_def_struct(brna, "BrushTextureSlot", "TextureSlot");
RNA_def_struct_sdna(srna, "MTex");
- RNA_def_struct_ui_text(srna, "Brush Texture Slot", "Texture slot for textures in a Brush datablock.");
+ RNA_def_struct_ui_text(srna, "Brush Texture Slot", "Texture slot for textures in a Brush datablock");
prop= RNA_def_property(srna, "angle", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "rot");
- RNA_def_property_range(prop, 0, 360);
- RNA_def_property_float_funcs(prop, "rna_BrushTextureSlot_angle_get", "rna_BrushTextureSlot_angle_set", NULL);
- RNA_def_property_ui_text(prop, "Angle", "Defines brush texture rotation.");
+ RNA_def_property_range(prop, 0, M_PI*2);
+ RNA_def_property_ui_text(prop, "Angle", "Defines brush texture rotation");
RNA_def_property_update(prop, 0, "rna_TextureSlot_update");
prop= RNA_def_property(srna, "map_mode", PROP_ENUM, PROP_NONE);
@@ -111,14 +88,42 @@ static 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."},
+ {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"},
+ {0, NULL, 0, NULL, NULL}};
+
+ static EnumPropertyItem brush_sculpt_tool_items[] = {
+ {SCULPT_TOOL_DRAW, "DRAW", 0, "Draw", ""},
+ {SCULPT_TOOL_SMOOTH, "SMOOTH", 0, "Smooth", ""},
+ {SCULPT_TOOL_PINCH, "PINCH", 0, "Pinch", ""},
+ {SCULPT_TOOL_INFLATE, "INFLATE", 0, "Inflate", ""},
+ {SCULPT_TOOL_GRAB, "GRAB", 0, "Grab", ""},
+ {SCULPT_TOOL_LAYER, "LAYER", 0, "Layer", ""},
+ {SCULPT_TOOL_FLATTEN, "FLATTEN", 0, "Flatten", ""},
+ {SCULPT_TOOL_CLAY, "CLAY", 0, "Clay", ""},
+ {0, NULL, 0, NULL, NULL}};
+
+ static EnumPropertyItem brush_vertexpaint_tool_items[] = {
+ {0, "MIX", 0, "Mix", "Use mix blending mode while painting"},
+ {1, "ADD", 0, "Add", "Use add blending mode while painting"},
+ {2, "SUB", 0, "Subtract", "Use subtract blending mode while painting"},
+ {3, "MUL", 0, "Multiply", "Use multiply blending mode while painting"},
+ {4, "BLUR", 0, "Blur", "Blur the color with surrounding values"},
+ {5, "LIGHTEN", 0, "Lighten", "Use lighten blending mode while painting"},
+ {6, "DARKEN", 0, "Darken", "Use darken blending mode while painting"},
+ {0, NULL, 0, NULL, NULL}};
+
+ static EnumPropertyItem brush_imagepaint_tool_items[] = {
+ {PAINT_TOOL_DRAW, "DRAW", 0, "Draw", ""},
+ {PAINT_TOOL_SOFTEN, "SOFTEN", 0, "Soften", ""},
+ {PAINT_TOOL_SMEAR, "SMEAR", 0, "Smear", ""},
+ {PAINT_TOOL_CLONE, "CLONE", 0, "Clone", ""},
{0, NULL, 0, NULL, NULL}};
static const EnumPropertyItem prop_flip_direction_items[]= {
@@ -127,61 +132,72 @@ static void rna_def_brush(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "Brush", "ID");
- RNA_def_struct_ui_text(srna, "Brush", "Brush datablock for storing brush settings for painting and sculpting.");
+ RNA_def_struct_ui_text(srna, "Brush", "Brush datablock for storing brush settings for painting and sculpting");
RNA_def_struct_ui_icon(srna, ICON_BRUSH_DATA);
/* enums */
prop= RNA_def_property(srna, "blend", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_blend_items);
- RNA_def_property_ui_text(prop, "Blending mode", "Brush blending mode.");
+ RNA_def_property_ui_text(prop, "Blending mode", "Brush blending mode");
RNA_def_property_update(prop, 0, "rna_Brush_update");
prop= RNA_def_property(srna, "sculpt_tool", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, brush_sculpt_tool_items);
RNA_def_property_ui_text(prop, "Sculpt Tool", "");
RNA_def_property_update(prop, 0, "rna_Brush_update");
+
+ prop= RNA_def_property(srna, "vertexpaint_tool", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_items(prop, brush_vertexpaint_tool_items);
+ RNA_def_property_ui_text(prop, "Vertex/Weight Paint Tool", "");
+ RNA_def_property_update(prop, 0, "rna_Brush_update");
+
+ prop= RNA_def_property(srna, "imagepaint_tool", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_items(prop, brush_imagepaint_tool_items);
+ RNA_def_property_ui_text(prop, "Image Paint Tool", "");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, "rna_Brush_update");
prop= RNA_def_property(srna, "direction", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
RNA_def_property_enum_items(prop, prop_flip_direction_items);
- RNA_def_property_ui_text(prop, "Direction", "Mapping type to use for this image in the game engine.");
+ RNA_def_property_ui_text(prop, "Direction", "Mapping type to use for this image in the game engine");
RNA_def_property_update(prop, 0, "rna_Brush_update");
/* number values */
prop= RNA_def_property(srna, "size", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 1, 200);
- RNA_def_property_ui_text(prop, "Size", "Diameter of the brush.");
+ RNA_def_property_ui_text(prop, "Size", "Diameter of the brush");
RNA_def_property_update(prop, 0, "rna_Brush_update");
prop= RNA_def_property(srna, "jitter", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "jitter");
RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Jitter", "Jitter the position of the brush while painting.");
+ RNA_def_property_ui_text(prop, "Jitter", "Jitter the position of the brush while painting");
RNA_def_property_update(prop, 0, "rna_Brush_update");
prop= RNA_def_property(srna, "spacing", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "spacing");
RNA_def_property_range(prop, 1.0f, 100.0f);
- RNA_def_property_ui_text(prop, "Spacing", "Spacing between brush stamps.");
+ RNA_def_property_ui_text(prop, "Spacing", "Spacing between brush stamps");
RNA_def_property_update(prop, 0, "rna_Brush_update");
prop= RNA_def_property(srna, "smooth_stroke_radius", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 10, 200);
- RNA_def_property_ui_text(prop, "Smooth Stroke Radius", "Minimum distance from last point before stroke continues.");
+ RNA_def_property_ui_text(prop, "Smooth Stroke Radius", "Minimum distance from last point before stroke continues");
RNA_def_property_update(prop, 0, "rna_Brush_update");
prop= RNA_def_property(srna, "smooth_stroke_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.5, 0.99);
- RNA_def_property_ui_text(prop, "Smooth Stroke Factor", "Higher values give a smoother stroke.");
+ RNA_def_property_ui_text(prop, "Smooth Stroke Factor", "Higher values give a smoother stroke");
RNA_def_property_update(prop, 0, "rna_Brush_update");
prop= RNA_def_property(srna, "rate", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "rate");
RNA_def_property_range(prop, 0.010f, 1.0f);
- RNA_def_property_ui_text(prop, "Rate", "Number of paints per second for Airbrush.");
+ RNA_def_property_ui_text(prop, "Rate", "Number of paints per second for Airbrush");
RNA_def_property_update(prop, 0, "rna_Brush_update");
prop= RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR_GAMMA);
+ RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_float_sdna(prop, NULL, "rgb");
RNA_def_property_ui_text(prop, "Color", "");
RNA_def_property_update(prop, 0, "rna_Brush_update");
@@ -189,83 +205,83 @@ static void rna_def_brush(BlenderRNA *brna)
prop= RNA_def_property(srna, "strength", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "alpha");
RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Strength", "The amount of pressure on the brush.");
+ RNA_def_property_ui_text(prop, "Strength", "The amount of pressure on the brush");
RNA_def_property_update(prop, 0, "rna_Brush_update");
/* flag */
prop= RNA_def_property(srna, "use_airbrush", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_AIRBRUSH);
- RNA_def_property_ui_text(prop, "Airbrush", "Keep applying paint effect while holding mouse (spray).");
+ RNA_def_property_ui_text(prop, "Airbrush", "Keep applying paint effect while holding mouse (spray)");
RNA_def_property_update(prop, 0, "rna_Brush_update");
prop= RNA_def_property(srna, "use_wrap", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_TORUS);
- RNA_def_property_ui_text(prop, "Wrap", "Enable torus wrapping while painting.");
+ RNA_def_property_ui_text(prop, "Wrap", "Enable torus wrapping while painting");
RNA_def_property_update(prop, 0, "rna_Brush_update");
prop= RNA_def_property(srna, "use_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.");
+ RNA_def_property_ui_text(prop, "Strength Pressure", "Enable tablet pressure sensitivity for strength");
RNA_def_property_update(prop, 0, "rna_Brush_update");
prop= RNA_def_property(srna, "use_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.");
+ RNA_def_property_ui_text(prop, "Size Pressure", "Enable tablet pressure sensitivity for size");
RNA_def_property_update(prop, 0, "rna_Brush_update");
prop= RNA_def_property(srna, "use_jitter_pressure", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_JITTER_PRESSURE);
RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0);
- RNA_def_property_ui_text(prop, "Jitter Pressure", "Enable tablet pressure sensitivity for jitter.");
+ RNA_def_property_ui_text(prop, "Jitter Pressure", "Enable tablet pressure sensitivity for jitter");
RNA_def_property_update(prop, 0, "rna_Brush_update");
prop= RNA_def_property(srna, "use_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.");
+ RNA_def_property_ui_text(prop, "Spacing Pressure", "Enable tablet pressure sensitivity for spacing");
RNA_def_property_update(prop, 0, "rna_Brush_update");
prop= RNA_def_property(srna, "use_rake", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_RAKE);
- RNA_def_property_ui_text(prop, "Rake", "Rotate the brush texture to match the stroke direction.");
+ RNA_def_property_ui_text(prop, "Rake", "Rotate the brush texture to match the stroke direction");
RNA_def_property_update(prop, 0, "rna_Brush_update");
prop= RNA_def_property(srna, "use_anchor", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_ANCHORED);
- RNA_def_property_ui_text(prop, "Anchored", "Keep the brush anchored to the initial location.");
+ RNA_def_property_ui_text(prop, "Anchored", "Keep the brush anchored to the initial location");
RNA_def_property_update(prop, 0, "rna_Brush_update");
prop= RNA_def_property(srna, "use_space", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_SPACE);
- RNA_def_property_ui_text(prop, "Space", "Limit brush application to the distance specified by spacing.");
+ RNA_def_property_ui_text(prop, "Space", "Limit brush application to the distance specified by spacing");
RNA_def_property_update(prop, 0, "rna_Brush_update");
prop= RNA_def_property(srna, "use_smooth_stroke", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_SMOOTH_STROKE);
- RNA_def_property_ui_text(prop, "Smooth Stroke", "Brush lags behind mouse and follows a smoother path.");
+ RNA_def_property_ui_text(prop, "Smooth Stroke", "Brush lags behind mouse and follows a smoother path");
RNA_def_property_update(prop, 0, "rna_Brush_update");
prop= RNA_def_property(srna, "use_persistent", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_PERSISTENT);
- RNA_def_property_ui_text(prop, "Persistent", "Sculpts on a persistent layer of the mesh.");
+ RNA_def_property_ui_text(prop, "Persistent", "Sculpts on a persistent layer of the mesh");
RNA_def_property_update(prop, 0, "rna_Brush_update");
prop= RNA_def_property(srna, "use_accumulate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_ACCUMULATE);
- RNA_def_property_ui_text(prop, "Accumulate", "Accumulate stroke dabs on top of each other.");
+ RNA_def_property_ui_text(prop, "Accumulate", "Accumulate stroke dabs on top of each other");
RNA_def_property_update(prop, 0, "rna_Brush_update");
/* not exposed in the interface yet
prop= RNA_def_property(srna, "fixed_tex", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_FIXED_TEX);
- RNA_def_property_ui_text(prop, "Fixed Texture", "Keep texture origin in fixed position.");
+ RNA_def_property_ui_text(prop, "Fixed Texture", "Keep texture origin in fixed position");
RNA_def_property_update(prop, 0, "rna_Brush_update"); */
prop= RNA_def_property(srna, "curve", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
- RNA_def_property_ui_text(prop, "Curve", "Editable falloff curve.");
+ RNA_def_property_ui_text(prop, "Curve", "Editable falloff curve");
RNA_def_property_update(prop, 0, "rna_Brush_update");
/* texture */
@@ -285,20 +301,20 @@ static void rna_def_brush(BlenderRNA *brna)
prop= RNA_def_property(srna, "clone_image", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "clone.image");
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Clone Image", "Image for clone tool.");
- RNA_def_property_update(prop, 0, "rna_Brush_update");
+ RNA_def_property_ui_text(prop, "Clone Image", "Image for clone tool");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, "rna_Brush_update");
- prop= RNA_def_property(srna, "clone_opacity", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "clone_alpha", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "clone.alpha");
RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Clone Opacity", "Opacity of clone image display.");
- RNA_def_property_update(prop, 0, "rna_Brush_update");
+ RNA_def_property_ui_text(prop, "Clone Alpha", "Opacity of clone image display");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, "rna_Brush_update");
prop= RNA_def_property(srna, "clone_offset", PROP_FLOAT, PROP_XYZ);
RNA_def_property_float_sdna(prop, NULL, "clone.offset");
RNA_def_property_ui_text(prop, "Clone Offset", "");
RNA_def_property_ui_range(prop, -1.0f , 1.0f, 10.0f, 3);
- RNA_def_property_update(prop, 0, "rna_Brush_update");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, "rna_Brush_update");
}
@@ -333,7 +349,7 @@ static void rna_def_operator_stroke_element(BlenderRNA *brna)
prop= RNA_def_property(srna, "pressure", PROP_FLOAT, PROP_NONE);
RNA_def_property_flag(prop, PROP_IDPROPERTY);
RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Pressure", "Tablet pressure.");
+ RNA_def_property_ui_text(prop, "Pressure", "Tablet pressure");
prop= RNA_def_property(srna, "time", PROP_FLOAT, PROP_UNSIGNED);
RNA_def_property_flag(prop, PROP_IDPROPERTY);
diff --git a/source/blender/makesrna/intern/rna_camera.c b/source/blender/makesrna/intern/rna_camera.c
index e8538522d84..2776289b6f0 100644
--- a/source/blender/makesrna/intern/rna_camera.c
+++ b/source/blender/makesrna/intern/rna_camera.c
@@ -15,16 +15,14 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor(s): Blender Foundation (2008).
*
* ***** END GPL LICENSE BLOCK *****
*/
-#define _USE_MATH_DEFINES
#include <stdlib.h>
-#include <math.h>
#include "RNA_define.h"
#include "RNA_types.h"
@@ -33,6 +31,8 @@
#include "DNA_camera_types.h"
+#include "BLI_math.h"
+
#include "WM_types.h"
#ifdef RNA_RUNTIME
@@ -49,6 +49,18 @@ static void rna_Camera_lens_update(Main *bmain, Scene *scene, PointerRNA *ptr)
cam->angle= 360.0f * atan(16.0f/cam->lens) / M_PI;
}
+/* only for rad/deg conversion! can remove later */
+static float rna_Camera_angle_get(PointerRNA *ptr)
+{
+ Camera *cam= ptr->id.data;
+ return cam->angle * (M_PI / 180.0);
+}
+
+static void rna_Camera_angle_set(PointerRNA *ptr, float value)
+{
+ Camera *cam= ptr->id.data;
+ cam->angle= value * (180.0 / M_PI);
+}
#else
@@ -66,111 +78,113 @@ void RNA_def_camera(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "Camera", "ID");
- RNA_def_struct_ui_text(srna, "Camera", "Camera datablock for storing camera settings.");
+ RNA_def_struct_ui_text(srna, "Camera", "Camera datablock for storing camera settings");
RNA_def_struct_ui_icon(srna, ICON_CAMERA_DATA);
/* Enums */
prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_type_items);
- RNA_def_property_ui_text(prop, "Type", "Camera types.");
+ RNA_def_property_ui_text(prop, "Type", "Camera types");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
/* Number values */
prop= RNA_def_property(srna, "passepartout_alpha", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "passepartalpha");
- RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Passepartout Alpha", "Opacity (alpha) of the darkened overlay in Camera view.");
+ RNA_def_property_ui_text(prop, "Passepartout Alpha", "Opacity (alpha) of the darkened overlay in Camera view");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
- 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, 172.85f);
- RNA_def_property_ui_text(prop, "Angle", "Perspective Camera lend field of view in degrees.");
+ prop= RNA_def_property(srna, "angle", PROP_FLOAT, PROP_ANGLE);
+ RNA_def_property_range(prop, M_PI * (0.367/180.0), M_PI * (172.847/180.0));
+ RNA_def_property_ui_text(prop, "Angle", "Perspective Camera lens field of view in degrees");
+ RNA_def_property_float_funcs(prop, "rna_Camera_angle_get", "rna_Camera_angle_set", NULL); /* only for deg/rad conversion */
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Camera_angle_update");
prop= RNA_def_property(srna, "clip_start", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "clipsta");
RNA_def_property_range(prop, 0.0f, FLT_MAX);
- RNA_def_property_ui_text(prop, "Clip Start", "Camera near clipping distance.");
+ RNA_def_property_ui_text(prop, "Clip Start", "Camera near clipping distance");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
prop= RNA_def_property(srna, "clip_end", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "clipend");
RNA_def_property_range(prop, 1.0f, FLT_MAX);
- RNA_def_property_ui_text(prop, "Clip End", "Camera far clipping distance.");
+ RNA_def_property_ui_text(prop, "Clip End", "Camera far clipping distance");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
prop= RNA_def_property(srna, "lens", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "lens");
- RNA_def_property_range(prop, 1.0f, 250.0f);
- RNA_def_property_ui_text(prop, "Lens", "Perspective Camera lens value in mm.");
+ RNA_def_property_range(prop, 1.0f, 5000.0f);
+ RNA_def_property_ui_text(prop, "Lens", "Perspective Camera lens value in millimeters");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Camera_lens_update");
prop= RNA_def_property(srna, "ortho_scale", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ortho_scale");
RNA_def_property_range(prop, 0.01f, 1000.0f);
- RNA_def_property_ui_text(prop, "Orthographic Scale", "Orthographic Camera scale (similar to zoom).");
+ RNA_def_property_ui_text(prop, "Orthographic Scale", "Orthographic Camera scale (similar to zoom)");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
prop= RNA_def_property(srna, "draw_size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "drawsize");
- RNA_def_property_range(prop, 0.1f, 10.0f);
- RNA_def_property_ui_text(prop, "Draw Size", "Apparent size of the Camera object in the 3D View.");
+ RNA_def_property_range(prop, 0.1f, 1000.0f);
+ RNA_def_property_ui_range(prop, 0.01, 100, 1, 1);
+ RNA_def_property_ui_text(prop, "Draw Size", "Apparent size of the Camera object in the 3D View");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
prop= RNA_def_property(srna, "shift_x", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "shiftx");
- RNA_def_property_range(prop, -2.0f, 2.0f);
- RNA_def_property_ui_text(prop, "Shift X", "Perspective Camera horizontal shift.");
+ RNA_def_property_range(prop, -10.0f, 10.0f);
+ RNA_def_property_ui_range(prop, -2.0, 2.0, 1, 3);
+ RNA_def_property_ui_text(prop, "Shift X", "Perspective Camera horizontal shift");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
prop= RNA_def_property(srna, "shift_y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "shifty");
- RNA_def_property_range(prop, -2.0f, 2.0f);
- RNA_def_property_ui_text(prop, "Shift Y", "Perspective Camera vertical shift.");
+ RNA_def_property_range(prop, -10.0f, 10.0f);
+ RNA_def_property_ui_range(prop, -2.0, 2.0, 1, 3);
+ RNA_def_property_ui_text(prop, "Shift Y", "Perspective Camera vertical shift");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
prop= RNA_def_property(srna, "dof_distance", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "YF_dofdist");
RNA_def_property_range(prop, 0.0f, 5000.0f);
- RNA_def_property_ui_text(prop, "DOF Distance", "Distance to the focus point for depth of field.");
+ RNA_def_property_ui_text(prop, "DOF Distance", "Distance to the focus point for depth of field");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
/* flag */
prop= RNA_def_property(srna, "show_limits", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CAM_SHOWLIMITS);
- RNA_def_property_ui_text(prop, "Show Limits", "Draw the clipping range and focus point on the camera.");
+ RNA_def_property_ui_text(prop, "Show Limits", "Draw the clipping range and focus point on the camera");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
prop= RNA_def_property(srna, "show_mist", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CAM_SHOWMIST);
- RNA_def_property_ui_text(prop, "Show Mist", "Draw a line from the Camera to indicate the mist area.");
+ RNA_def_property_ui_text(prop, "Show Mist", "Draw a line from the Camera to indicate the mist area");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
prop= RNA_def_property(srna, "show_passepartout", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CAM_SHOWPASSEPARTOUT);
- RNA_def_property_ui_text(prop, "Show Passepartout", "Show a darkened overlay outside the image area in Camera view.");
+ RNA_def_property_ui_text(prop, "Show Passepartout", "Show a darkened overlay outside the image area in Camera view");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
prop= RNA_def_property(srna, "show_title_safe", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CAM_SHOWTITLESAFE);
- RNA_def_property_ui_text(prop, "Show Title Safe", "Show indicators for the title safe zone in Camera view.");
+ RNA_def_property_ui_text(prop, "Show Title Safe", "Show indicators for the title safe zone in Camera view");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
prop= RNA_def_property(srna, "show_name", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CAM_SHOWNAME);
- RNA_def_property_ui_text(prop, "Show Name", "Show the active Camera's name in Camera view.");
+ RNA_def_property_ui_text(prop, "Show Name", "Show the active Camera's name in Camera view");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
prop= RNA_def_property(srna, "lens_unit", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
RNA_def_property_enum_items(prop, prop_lens_unit_items);
- RNA_def_property_ui_text(prop, "Lens Unit", "Unit to edit lens in for the user interface.");
+ RNA_def_property_ui_text(prop, "Lens Unit", "Unit to edit lens in for the user interface");
prop= RNA_def_property(srna, "panorama", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CAM_PANORAMA);
- RNA_def_property_ui_text(prop, "Panorama", "Render the scene with a cylindrical camera for pseudo-fisheye lens effects.");
+ RNA_def_property_ui_text(prop, "Panorama", "Render the scene with a cylindrical camera for pseudo-fisheye lens effects");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
/* pointers */
@@ -180,7 +194,7 @@ void RNA_def_camera(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "Object");
RNA_def_property_pointer_sdna(prop, NULL, "dof_ob");
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "DOF Object", "Use this object to define the depth of field focal point.");
+ RNA_def_property_ui_text(prop, "DOF Object", "Use this object to define the depth of field focal point");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
}
diff --git a/source/blender/makesrna/intern/rna_cloth.c b/source/blender/makesrna/intern/rna_cloth.c
index c416db2a21c..4ecb93eb1d6 100644
--- a/source/blender/makesrna/intern/rna_cloth.c
+++ b/source/blender/makesrna/intern/rna_cloth.c
@@ -15,7 +15,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor(s): Blender Foundation (2008)
*
@@ -183,7 +183,7 @@ static void rna_def_cloth_sim_settings(BlenderRNA *brna)
PropertyRNA *prop;
srna = RNA_def_struct(brna, "ClothSettings", NULL);
- RNA_def_struct_ui_text(srna, "Cloth Settings", "Cloth simulation settings for an object.");
+ RNA_def_struct_ui_text(srna, "Cloth Settings", "Cloth simulation settings for an object");
RNA_def_struct_sdna(srna, "ClothSimSettings");
RNA_def_struct_path_func(srna, "rna_ClothSettings_path");
@@ -192,31 +192,31 @@ static void rna_def_cloth_sim_settings(BlenderRNA *brna)
prop= RNA_def_property(srna, "goal_min", PROP_FLOAT, PROP_NONE);
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_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");
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_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");
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_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");
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_ui_text(prop, "Goal Stiffness", "Goal (vertex target position) spring stiffness");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Goal Damping", "Goal (vertex target position) friction");
RNA_def_property_update(prop, 0, "rna_cloth_update");
prop= RNA_def_property(srna, "internal_friction", PROP_FLOAT, PROP_NONE);
@@ -225,23 +225,29 @@ static void rna_def_cloth_sim_settings(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Internal Friction", "");
RNA_def_property_update(prop, 0, "rna_cloth_update");
+ prop= RNA_def_property(srna, "collider_friction", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "collider_friction");
+ RNA_def_property_range(prop, 0.0f, 1.0f);
+ RNA_def_property_ui_text(prop, "Collider Friction", "");
+ RNA_def_property_update(prop, 0, "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_ui_text(prop, "Mass", "Mass of cloth material");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Mass Vertex Group", "Vertex Group for pinning of vertices");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Gravity", "Gravity or external force vector");
RNA_def_property_update(prop, 0, "rna_cloth_update");
/* various */
@@ -249,18 +255,18 @@ static void rna_def_cloth_sim_settings(BlenderRNA *brna)
prop= RNA_def_property(srna, "air_damping", PROP_FLOAT, PROP_NONE);
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_ui_text(prop, "Air Damping", "Air has normally some thickness which slows falling things down");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Pin Cloth", "Enable pinning of cloth vertices to other objects/positions");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Pin Stiffness", "Pin (vertex target position) spring stiffness");
RNA_def_property_update(prop, 0, "rna_cloth_update");
prop= RNA_def_property(srna, "quality", PROP_INT, PROP_NONE);
@@ -273,7 +279,7 @@ static void rna_def_cloth_sim_settings(BlenderRNA *brna)
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_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");
prop= RNA_def_property(srna, "spring_damping", PROP_FLOAT, PROP_NONE);
@@ -285,19 +291,19 @@ static void rna_def_cloth_sim_settings(BlenderRNA *brna)
prop= RNA_def_property(srna, "structural_stiffness", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "structural");
RNA_def_property_range(prop, 0.0f, 10000.0f);
- RNA_def_property_ui_text(prop, "Structural Stiffness", "Overall stiffness of structure.");
+ RNA_def_property_ui_text(prop, "Structural Stiffness", "Overall stiffness of structure");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Structural Stiffness Maximum", "Maximum structural stiffness value");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Structural Stiffness Vertex Group", "Vertex group for fine control over structural stiffness");
RNA_def_property_update(prop, 0, "rna_cloth_update");
prop= RNA_def_property(srna, "bending_stiffness", PROP_FLOAT, PROP_NONE);
@@ -310,12 +316,12 @@ static void rna_def_cloth_sim_settings(BlenderRNA *brna)
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_ui_text(prop, "Bending Stiffness Maximum", "Maximum bending stiffness value");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Bending Stiffness Vertex Group", "Vertex group for fine control over bending stiffness");
RNA_def_property_update(prop, 0, "rna_cloth_update");
prop= RNA_def_property(srna, "effector_weights", PROP_POINTER, PROP_NONE);
@@ -326,7 +332,7 @@ static void rna_def_cloth_sim_settings(BlenderRNA *brna)
prop= RNA_def_property(srna, "pre_roll", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "preroll");
RNA_def_property_range(prop, 0, 200);
- RNA_def_property_ui_text(prop, "Pre Roll", "Simulation starts on this frame.");
+ RNA_def_property_ui_text(prop, "Pre Roll", "Simulation starts on this frame");
RNA_def_property_update(prop, 0, "rna_cloth_reset");
@@ -336,13 +342,13 @@ static void rna_def_cloth_sim_settings(BlenderRNA *brna)
prop= RNA_def_property(srna, "shear_stiffness", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "shear");
RNA_def_property_range(prop, 0.0f, 1000.0f);
- RNA_def_property_ui_text(prop, "Shear Stiffness", "Shear spring stiffness."); */
+ RNA_def_property_ui_text(prop, "Shear Stiffness", "Shear spring stiffness"); */
/* unused still
prop= RNA_def_property(srna, "shear_stiffness_max", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "max_shear");
RNA_def_property_range(prop, 0.0f, upperLimitf);
- RNA_def_property_ui_text(prop, "Shear Stiffness Maximum", "Maximum shear scaling value."); */
+ RNA_def_property_ui_text(prop, "Shear Stiffness Maximum", "Maximum shear scaling value"); */
/* unused still
prop= RNA_def_property(srna, "effector_force_scale", PROP_FLOAT, PROP_NONE);
@@ -365,7 +371,7 @@ static void rna_def_cloth_sim_settings(BlenderRNA *brna)
prop= RNA_def_property(srna, "max_spring_extensions", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "maxspringlen");
RNA_def_property_range(prop, 1.0, 1000.0);
- RNA_def_property_ui_text(prop, "Maximum Spring Extension", "Maximum extension before spring gets cut."); */
+ RNA_def_property_ui_text(prop, "Maximum Spring Extension", "Maximum extension before spring gets cut"); */
}
static void rna_def_cloth_collision_settings(BlenderRNA *brna)
@@ -374,7 +380,7 @@ static void rna_def_cloth_collision_settings(BlenderRNA *brna)
PropertyRNA *prop;
srna = RNA_def_struct(brna, "ClothCollisionSettings", NULL);
- RNA_def_struct_ui_text(srna, "Cloth Collision Settings", "Cloth simulation settings for self collision and collision with other objects.");
+ RNA_def_struct_ui_text(srna, "Cloth Collision Settings", "Cloth simulation settings for self collision and collision with other objects");
RNA_def_struct_sdna(srna, "ClothCollSettings");
RNA_def_struct_path_func(srna, "rna_ClothCollisionSettings_path");
@@ -382,13 +388,13 @@ 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_ui_text(prop, "Enable Collision", "Enable collisions with other objects");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Minimum Distance", "Minimum distance between collision objects before collision response takes in");
RNA_def_property_update(prop, 0, "rna_cloth_update");
prop= RNA_def_property(srna, "friction", PROP_FLOAT, PROP_NONE);
@@ -406,18 +412,18 @@ static void rna_def_cloth_collision_settings(BlenderRNA *brna)
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_ui_text(prop, "Enable Self Collision", "Enable self collisions");
RNA_def_property_update(prop, 0, "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_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");
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_ui_text(prop, "Self Friction", "Friction/damping with self contact");
RNA_def_property_update(prop, 0, "rna_cloth_update");
prop= RNA_def_property(srna, "self_collision_quality", PROP_INT, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_color.c b/source/blender/makesrna/intern/rna_color.c
index c4edd00045b..ee19bce6435 100644
--- a/source/blender/makesrna/intern/rna_color.c
+++ b/source/blender/makesrna/intern/rna_color.c
@@ -15,7 +15,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor(s): Blender Foundation (2008).
*
@@ -126,7 +126,7 @@ static void rna_def_curvemappoint(BlenderRNA *brna)
};
srna= RNA_def_struct(brna, "CurveMapPoint", NULL);
- RNA_def_struct_ui_text(srna, "CurveMapPoint", "Point of a curve used for a curve mapping.");
+ RNA_def_struct_ui_text(srna, "CurveMapPoint", "Point of a curve used for a curve mapping");
/* not editable for now, need to have CurveMapping to do curvemapping_changed */
@@ -134,17 +134,17 @@ static void rna_def_curvemappoint(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "x");
RNA_def_property_array(prop, 2);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Location", "X/Y coordinates of the curve point.");
+ RNA_def_property_ui_text(prop, "Location", "X/Y coordinates of the curve point");
prop= RNA_def_property(srna, "handle_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
RNA_def_property_enum_items(prop, prop_handle_type_items);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Handle Type", "Curve interpolation at this point: bezier or vector.");
+ RNA_def_property_ui_text(prop, "Handle Type", "Curve interpolation at this point: bezier or vector");
prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CUMA_SELECT);
- RNA_def_property_ui_text(prop, "Selected", "Selection state of the curve point.");
+ RNA_def_property_ui_text(prop, "Selected", "Selection state of the curve point");
}
static void rna_def_curvemap(BlenderRNA *brna)
@@ -158,7 +158,7 @@ static void rna_def_curvemap(BlenderRNA *brna)
};
srna= RNA_def_struct(brna, "CurveMap", NULL);
- RNA_def_struct_ui_text(srna, "CurveMap", "Curve in a curve mapping.");
+ RNA_def_struct_ui_text(srna, "CurveMap", "Curve in a curve mapping");
/* not editable for now, need to have CurveMapping to do curvemapping_changed */
@@ -166,7 +166,7 @@ static void rna_def_curvemap(BlenderRNA *brna)
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
RNA_def_property_enum_items(prop, prop_extend_items);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Extend", "Extrapolate the curve or extend it horizontally.");
+ RNA_def_property_ui_text(prop, "Extend", "Extrapolate the curve or extend it horizontally");
prop= RNA_def_property(srna, "points", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "curve", "totpoint");
@@ -180,7 +180,7 @@ static void rna_def_curvemapping(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "CurveMapping", NULL);
- RNA_def_struct_ui_text(srna, "CurveMapping", "Curve mapping to map color, vector and scalar values to other values using a user defined curve.");
+ RNA_def_struct_ui_text(srna, "CurveMapping", "Curve mapping to map color, vector and scalar values to other values using a user defined curve");
prop= RNA_def_property(srna, "clip", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CUMA_DO_CLIP);
@@ -229,11 +229,21 @@ static void rna_def_curvemapping(BlenderRNA *brna)
RNA_def_property_float_funcs(prop, NULL, "rna_CurveMapping_white_level_set", NULL);
}
+static void rna_def_histogram(BlenderRNA *brna)
+{
+ StructRNA *srna;
+
+ srna= RNA_def_struct(brna, "Histogram", NULL);
+ RNA_def_struct_ui_text(srna, "Histogram", "Statistical view of the levels of color in an image");
+
+}
+
void RNA_def_color(BlenderRNA *brna)
{
rna_def_curvemappoint(brna);
rna_def_curvemap(brna);
rna_def_curvemapping(brna);
+ rna_def_histogram(brna);
}
#endif
diff --git a/source/blender/makesrna/intern/rna_constraint.c b/source/blender/makesrna/intern/rna_constraint.c
index 5ec8d438c42..65114804a3f 100644
--- a/source/blender/makesrna/intern/rna_constraint.c
+++ b/source/blender/makesrna/intern/rna_constraint.c
@@ -15,7 +15,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor(s): Blender Foundation (2008), Joshua Leung, Roland Hess
*
@@ -29,6 +29,8 @@
#include "rna_internal.h"
+#include "BLI_math.h"
+
#include "DNA_action_types.h"
#include "DNA_constraint_types.h"
#include "DNA_modifier_types.h"
@@ -334,7 +336,7 @@ static void rna_def_constrainttarget(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "ConstraintTarget", NULL);
- RNA_def_struct_ui_text(srna, "Constraint Target", "Target object for multi-target constraints.");
+ RNA_def_struct_ui_text(srna, "Constraint Target", "Target object for multi-target constraints");
RNA_def_struct_sdna(srna, "bConstraintTarget");
prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
@@ -357,7 +359,7 @@ static void rna_def_constraint_childof(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "ChildOfConstraint", "Constraint");
- RNA_def_struct_ui_text(srna, "Child Of Constraint", "Creates constraint-based parent-child relationship.");
+ RNA_def_struct_ui_text(srna, "Child Of Constraint", "Creates constraint-based parent-child relationship");
RNA_def_struct_sdna_from(srna, "bChildOfConstraint", "data");
prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
@@ -373,47 +375,47 @@ static void rna_def_constraint_childof(BlenderRNA *brna)
prop= RNA_def_property(srna, "use_location_x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CHILDOF_LOCX);
- RNA_def_property_ui_text(prop, "Location X", "Use X Location of Parent.");
+ RNA_def_property_ui_text(prop, "Location X", "Use X Location of Parent");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "use_location_y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CHILDOF_LOCY);
- RNA_def_property_ui_text(prop, "Location Y", "Use Y Location of Parent.");
+ RNA_def_property_ui_text(prop, "Location Y", "Use Y Location of Parent");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "use_location_z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CHILDOF_LOCZ);
- RNA_def_property_ui_text(prop, "Location Z", "Use Z Location of Parent.");
+ RNA_def_property_ui_text(prop, "Location Z", "Use Z Location of Parent");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "use_rotation_x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CHILDOF_ROTX);
- RNA_def_property_ui_text(prop, "Rotation X", "Use X Rotation of Parent.");
+ RNA_def_property_ui_text(prop, "Rotation X", "Use X Rotation of Parent");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "use_rotation_y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CHILDOF_ROTY);
- RNA_def_property_ui_text(prop, "Rotation Y", "Use Y Rotation of Parent.");
+ RNA_def_property_ui_text(prop, "Rotation Y", "Use Y Rotation of Parent");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "use_rotation_z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CHILDOF_ROTZ);
- RNA_def_property_ui_text(prop, "Rotation Z", "Use Z Rotation of Parent.");
+ RNA_def_property_ui_text(prop, "Rotation Z", "Use Z Rotation of Parent");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "use_scale_x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CHILDOF_SIZEX);
- RNA_def_property_ui_text(prop, "Scale X", "Use X Scale of Parent.");
+ RNA_def_property_ui_text(prop, "Scale X", "Use X Scale of Parent");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "use_scale_y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CHILDOF_SIZEY);
- RNA_def_property_ui_text(prop, "Scale Y", "Use Y Scale of Parent.");
+ RNA_def_property_ui_text(prop, "Scale Y", "Use Y Scale of Parent");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "use_scale_z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CHILDOF_SIZEZ);
- RNA_def_property_ui_text(prop, "Scale Z", "Use Z Scale of Parent.");
+ RNA_def_property_ui_text(prop, "Scale Z", "Use Z Scale of Parent");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
}
@@ -423,33 +425,33 @@ static void rna_def_constraint_python(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "PythonConstraint", "Constraint");
- RNA_def_struct_ui_text(srna, "Python Constraint", "Uses Python script for constraint evaluation.");
+ RNA_def_struct_ui_text(srna, "Python Constraint", "Uses Python script for constraint evaluation");
RNA_def_struct_sdna_from(srna, "bPythonConstraint", "data");
prop= RNA_def_property(srna, "targets", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "targets", NULL);
RNA_def_property_struct_type(prop, "ConstraintTarget");
- RNA_def_property_ui_text(prop, "Targets", "Target Objects.");
+ RNA_def_property_ui_text(prop, "Targets", "Target Objects");
prop= RNA_def_property(srna, "number_of_targets", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "tarnum");
- RNA_def_property_ui_text(prop, "Number of Targets", "Usually only 1-3 are needed.");
+ RNA_def_property_ui_text(prop, "Number of Targets", "Usually only 1-3 are needed");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
prop= RNA_def_property(srna, "text", PROP_POINTER, PROP_NONE);
- RNA_def_property_ui_text(prop, "Script", "The text object that contains the Python script.");
+ RNA_def_property_ui_text(prop, "Script", "The text object that contains the Python script");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "use_targets", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PYCON_USETARGETS);
- RNA_def_property_ui_text(prop, "Use Targets", "Use the targets indicated in the constraint panel.");
+ RNA_def_property_ui_text(prop, "Use Targets", "Use the targets indicated in the constraint panel");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
prop= RNA_def_property(srna, "script_error", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PYCON_SCRIPTERROR);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Script Error", "The linked Python script has thrown an error.");
+ RNA_def_property_ui_text(prop, "Script Error", "The linked Python script has thrown an error");
}
static void rna_def_constraint_kinematic(BlenderRNA *brna)
@@ -458,7 +460,7 @@ static void rna_def_constraint_kinematic(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "KinematicConstraint", "Constraint");
- RNA_def_struct_ui_text(srna, "Kinematic Constraint", "Inverse Kinematics.");
+ RNA_def_struct_ui_text(srna, "Kinematic Constraint", "Inverse Kinematics");
RNA_def_struct_sdna_from(srna, "bKinematicConstraint", "data");
prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
@@ -474,12 +476,12 @@ static void rna_def_constraint_kinematic(BlenderRNA *brna)
prop= RNA_def_property(srna, "iterations", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 1, 10000);
- RNA_def_property_ui_text(prop, "Iterations", "Maximum number of solving iterations.");
+ RNA_def_property_ui_text(prop, "Iterations", "Maximum number of solving iterations");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "pole_target", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "poletar");
- RNA_def_property_ui_text(prop, "Pole Target", "Object for pole rotation.");
+ RNA_def_property_ui_text(prop, "Pole Target", "Object for pole rotation");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
@@ -488,31 +490,31 @@ static void rna_def_constraint_kinematic(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Pole Sub-Target", "");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
- prop= RNA_def_property(srna, "pole_angle", PROP_FLOAT, PROP_ANGLE); // XXX - todo, convert to rad
+ prop= RNA_def_property(srna, "pole_angle", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "poleangle");
- RNA_def_property_range(prop, -180.0f, 180.f);
- RNA_def_property_ui_text(prop, "Pole Angle", "Pole rotation offset.");
+ RNA_def_property_range(prop, -M_PI, M_PI);
+ RNA_def_property_ui_text(prop, "Pole Angle", "Pole rotation offset");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "weight", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.01, 1.f);
- RNA_def_property_ui_text(prop, "Weight", "For Tree-IK: Weight of position control for this target.");
+ RNA_def_property_ui_text(prop, "Weight", "For Tree-IK: Weight of position control for this target");
prop= RNA_def_property(srna, "orient_weight", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "orientweight");
RNA_def_property_range(prop, 0.01, 1.f);
- RNA_def_property_ui_text(prop, "Orientation Weight", "For Tree-IK: Weight of orientation control for this target.");
+ RNA_def_property_ui_text(prop, "Orientation Weight", "For Tree-IK: Weight of orientation control for this target");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "chain_length", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "rootbone");
RNA_def_property_range(prop, 0, 255);
- RNA_def_property_ui_text(prop, "Chain Length", "How many bones are included in the IK effect - 0 uses all bones.");
+ RNA_def_property_ui_text(prop, "Chain Length", "How many bones are included in the IK effect - 0 uses all bones");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
prop= RNA_def_property(srna, "use_tail", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CONSTRAINT_IK_TIP);
- RNA_def_property_ui_text(prop, "Use Tail", "Include bone's tail as last element in chain.");
+ RNA_def_property_ui_text(prop, "Use Tail", "Include bone's tail as last element in chain");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
prop= RNA_def_property(srna, "axis_reference", PROP_ENUM, PROP_NONE);
@@ -523,7 +525,7 @@ static void rna_def_constraint_kinematic(BlenderRNA *brna)
prop= RNA_def_property(srna, "use_position", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CONSTRAINT_IK_POS);
- RNA_def_property_ui_text(prop, "Position", "Chain follows position of target.");
+ RNA_def_property_ui_text(prop, "Position", "Chain follows position of target");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
prop= RNA_def_property(srna, "pos_lock_x", PROP_BOOLEAN, PROP_NONE);
@@ -543,7 +545,7 @@ static void rna_def_constraint_kinematic(BlenderRNA *brna)
prop= RNA_def_property(srna, "use_rotation", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CONSTRAINT_IK_ROT);
- RNA_def_property_ui_text(prop, "Rotation", "Chain follows rotation of target.");
+ RNA_def_property_ui_text(prop, "Rotation", "Chain follows rotation of target");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
prop= RNA_def_property(srna, "rot_lock_x", PROP_BOOLEAN, PROP_NONE);
@@ -563,12 +565,12 @@ static void rna_def_constraint_kinematic(BlenderRNA *brna)
prop= RNA_def_property(srna, "use_target", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", CONSTRAINT_IK_AUTO);
- RNA_def_property_ui_text(prop, "Target", "Disable for targetless IK.");
+ RNA_def_property_ui_text(prop, "Target", "Disable for targetless IK");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
prop= RNA_def_property(srna, "use_stretch", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CONSTRAINT_IK_STRETCH);
- RNA_def_property_ui_text(prop, "Stretch", "Enable IK Stretching.");
+ RNA_def_property_ui_text(prop, "Stretch", "Enable IK Stretching");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
prop= RNA_def_property(srna, "ik_type", PROP_ENUM, PROP_NONE);
@@ -581,13 +583,13 @@ static void rna_def_constraint_kinematic(BlenderRNA *brna)
prop= RNA_def_property(srna, "limit_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "mode");
RNA_def_property_enum_items(prop, constraint_distance_items);
- RNA_def_property_ui_text(prop, "Limit Mode", "Distances in relation to sphere of influence to allow.");
+ RNA_def_property_ui_text(prop, "Limit Mode", "Distances in relation to sphere of influence to allow");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
prop= RNA_def_property(srna, "distance", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "dist");
RNA_def_property_range(prop, 0.0, 100.f);
- RNA_def_property_ui_text(prop, "Distance", "Radius of limiting sphere.");
+ RNA_def_property_ui_text(prop, "Distance", "Radius of limiting sphere");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
}
@@ -612,11 +614,11 @@ static void rna_def_constraint_track_to(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "TrackToConstraint", "Constraint");
- RNA_def_struct_ui_text(srna, "Track To Constraint", "Aims the constrained object toward the target.");
+ RNA_def_struct_ui_text(srna, "Track To Constraint", "Aims the constrained object toward the target");
prop= RNA_def_property(srna, "head_tail", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, "bConstraint", "headtail");
- RNA_def_property_ui_text(prop, "Head/Tail", "Target along length of bone: Head=0, Tail=1.");
+ RNA_def_property_ui_text(prop, "Head/Tail", "Target along length of bone: Head=0, Tail=1");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
RNA_def_struct_sdna_from(srna, "bTrackToConstraint", "data");
@@ -635,18 +637,18 @@ static void rna_def_constraint_track_to(BlenderRNA *brna)
prop= RNA_def_property(srna, "track", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "reserved1");
RNA_def_property_enum_items(prop, track_items);
- RNA_def_property_ui_text(prop, "Track Axis", "Axis that points to the target object.");
+ RNA_def_property_ui_text(prop, "Track Axis", "Axis that points to the target object");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "up", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "reserved2");
RNA_def_property_enum_items(prop, up_items);
- RNA_def_property_ui_text(prop, "Up Axis", "Axis that points upward.");
+ RNA_def_property_ui_text(prop, "Up Axis", "Axis that points upward");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "target_z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", TARGET_Z_UP);
- RNA_def_property_ui_text(prop, "Target Z", "Target's Z axis, not World Z axis, will constraint the Up direction.");
+ RNA_def_property_ui_text(prop, "Target Z", "Target's Z axis, not World Z axis, will constraint the Up direction");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
}
@@ -656,11 +658,11 @@ static void rna_def_constraint_locate_like(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "CopyLocationConstraint", "Constraint");
- RNA_def_struct_ui_text(srna, "Copy Location Constraint", "Copies the location of the target.");
+ RNA_def_struct_ui_text(srna, "Copy Location Constraint", "Copies the location of the target");
prop= RNA_def_property(srna, "head_tail", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, "bConstraint", "headtail");
- RNA_def_property_ui_text(prop, "Head/Tail", "Target along length of bone: Head=0, Tail=1.");
+ RNA_def_property_ui_text(prop, "Head/Tail", "Target along length of bone: Head=0, Tail=1");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
RNA_def_struct_sdna_from(srna, "bLocateLikeConstraint", "data");
@@ -679,37 +681,37 @@ static void rna_def_constraint_locate_like(BlenderRNA *brna)
prop= RNA_def_property(srna, "use_x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", LOCLIKE_X);
- RNA_def_property_ui_text(prop, "Copy X", "Copy the target's X location.");
+ RNA_def_property_ui_text(prop, "Copy X", "Copy the target's X location");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "use_y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", LOCLIKE_Y);
- RNA_def_property_ui_text(prop, "Copy Y", "Copy the target's Y location.");
+ RNA_def_property_ui_text(prop, "Copy Y", "Copy the target's Y location");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "use_z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", LOCLIKE_Z);
- RNA_def_property_ui_text(prop, "Copy Z", "Copy the target's Z location.");
+ RNA_def_property_ui_text(prop, "Copy Z", "Copy the target's Z location");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "invert_x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", LOCLIKE_X_INVERT);
- RNA_def_property_ui_text(prop, "Invert X", "Invert the X location.");
+ RNA_def_property_ui_text(prop, "Invert X", "Invert the X location");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "invert_y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", LOCLIKE_Y_INVERT);
- RNA_def_property_ui_text(prop, "Invert Y", "Invert the Y location.");
+ RNA_def_property_ui_text(prop, "Invert Y", "Invert the Y location");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "invert_z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", LOCLIKE_Z_INVERT);
- RNA_def_property_ui_text(prop, "Invert Z", "Invert the Z location.");
+ RNA_def_property_ui_text(prop, "Invert Z", "Invert the Z location");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "use_offset", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", LOCLIKE_OFFSET);
- RNA_def_property_ui_text(prop, "Offset", "Add original location into copied location.");
+ RNA_def_property_ui_text(prop, "Offset", "Add original location into copied location");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
}
@@ -719,7 +721,7 @@ static void rna_def_constraint_rotate_like(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "CopyRotationConstraint", "Constraint");
- RNA_def_struct_ui_text(srna, "Copy Rotation Constraint", "Copies the rotation of the target.");
+ RNA_def_struct_ui_text(srna, "Copy Rotation Constraint", "Copies the rotation of the target");
RNA_def_struct_sdna_from(srna, "bRotateLikeConstraint", "data");
prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
@@ -735,37 +737,37 @@ static void rna_def_constraint_rotate_like(BlenderRNA *brna)
prop= RNA_def_property(srna, "use_x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ROTLIKE_X);
- RNA_def_property_ui_text(prop, "Copy X", "Copy the target's X rotation.");
+ RNA_def_property_ui_text(prop, "Copy X", "Copy the target's X rotation");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "use_y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ROTLIKE_Y);
- RNA_def_property_ui_text(prop, "Copy Y", "Copy the target's Y rotation.");
+ RNA_def_property_ui_text(prop, "Copy Y", "Copy the target's Y rotation");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "use_z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ROTLIKE_Z);
- RNA_def_property_ui_text(prop, "Copy Z", "Copy the target's Z rotation.");
+ RNA_def_property_ui_text(prop, "Copy Z", "Copy the target's Z rotation");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "invert_x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ROTLIKE_X_INVERT);
- RNA_def_property_ui_text(prop, "Invert X", "Invert the X rotation.");
+ RNA_def_property_ui_text(prop, "Invert X", "Invert the X rotation");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "invert_y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ROTLIKE_Y_INVERT);
- RNA_def_property_ui_text(prop, "Invert Y", "Invert the Y rotation.");
+ RNA_def_property_ui_text(prop, "Invert Y", "Invert the Y rotation");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "invert_z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ROTLIKE_Z_INVERT);
- RNA_def_property_ui_text(prop, "Invert Z", "Invert the Z rotation.");
+ RNA_def_property_ui_text(prop, "Invert Z", "Invert the Z rotation");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "use_offset", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ROTLIKE_OFFSET);
- RNA_def_property_ui_text(prop, "Offset", "Add original rotation into copied rotation.");
+ RNA_def_property_ui_text(prop, "Offset", "Add original rotation into copied rotation");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
}
@@ -775,7 +777,7 @@ static void rna_def_constraint_size_like(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "CopyScaleConstraint", "Constraint");
- RNA_def_struct_ui_text(srna, "Copy Scale Constraint", "Copies the scale of the target.");
+ RNA_def_struct_ui_text(srna, "Copy Scale Constraint", "Copies the scale of the target");
RNA_def_struct_sdna_from(srna, "bSizeLikeConstraint", "data");
prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
@@ -792,22 +794,22 @@ static void rna_def_constraint_size_like(BlenderRNA *brna)
prop= RNA_def_property(srna, "use_x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SIZELIKE_X);
- RNA_def_property_ui_text(prop, "Copy X", "Copy the target's X scale.");
+ RNA_def_property_ui_text(prop, "Copy X", "Copy the target's X scale");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "use_y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SIZELIKE_Y);
- RNA_def_property_ui_text(prop, "Copy Y", "Copy the target's Y scale.");
+ RNA_def_property_ui_text(prop, "Copy Y", "Copy the target's Y scale");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "use_z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SIZELIKE_Z);
- RNA_def_property_ui_text(prop, "Copy Z", "Copy the target's Z scale.");
+ RNA_def_property_ui_text(prop, "Copy Z", "Copy the target's Z scale");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "use_offset", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SIZELIKE_OFFSET);
- RNA_def_property_ui_text(prop, "Offset", "Add original scale into copied scale.");
+ RNA_def_property_ui_text(prop, "Offset", "Add original scale into copied scale");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
}
@@ -817,12 +819,12 @@ static void rna_def_constraint_transform_like(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "CopyTransformsConstraint", "Constraint");
- RNA_def_struct_ui_text(srna, "Copy Transforms Constraint", "Copies all the transforms of the target.");
+ RNA_def_struct_ui_text(srna, "Copy Transforms Constraint", "Copies all the transforms of the target");
RNA_def_struct_sdna_from(srna, "bTransLikeConstraint", "data");
prop= RNA_def_property(srna, "head_tail", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, "bConstraint", "headtail");
- RNA_def_property_ui_text(prop, "Head/Tail", "Target along length of bone: Head=0, Tail=1.");
+ RNA_def_property_ui_text(prop, "Head/Tail", "Target along length of bone: Head=0, Tail=1");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
@@ -852,7 +854,7 @@ static void rna_def_constraint_minmax(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "FloorConstraint", "Constraint");
- RNA_def_struct_ui_text(srna, "Floor Constraint", "Uses the target object for location limitation.");
+ RNA_def_struct_ui_text(srna, "Floor Constraint", "Uses the target object for location limitation");
RNA_def_struct_sdna_from(srna, "bMinMaxConstraint","data");
prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
@@ -869,22 +871,22 @@ static void rna_def_constraint_minmax(BlenderRNA *brna)
prop= RNA_def_property(srna, "floor_location", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "minmaxflag");
RNA_def_property_enum_items(prop, minmax_items);
- RNA_def_property_ui_text(prop, "Floor Location", "Location of target that object will not pass through.");
+ RNA_def_property_ui_text(prop, "Floor Location", "Location of target that object will not pass through");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "sticky", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MINMAX_STICKY);
- RNA_def_property_ui_text(prop, "Sticky", "Immobilize object while constrained.");
+ RNA_def_property_ui_text(prop, "Sticky", "Immobilize object while constrained");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "use_rotation", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MINMAX_USEROT);
- RNA_def_property_ui_text(prop, "Use Rotation", "Use the target's rotation to determine floor.");
+ RNA_def_property_ui_text(prop, "Use Rotation", "Use the target's rotation to determine floor");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "offset", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_range(prop, 0.0, 100.f);
- RNA_def_property_ui_text(prop, "Offset", "Offset of floor from object origin.");
+ RNA_def_property_ui_text(prop, "Offset", "Offset of floor from object origin");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
}
@@ -906,7 +908,7 @@ static void rna_def_constraint_action(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "ActionConstraint", "Constraint");
- RNA_def_struct_ui_text(srna, "Action Constraint", "Map an action to the transform axes of a bone.");
+ RNA_def_struct_ui_text(srna, "Action Constraint", "Map an action to the transform axes of a bone");
RNA_def_struct_sdna_from(srna, "bActionConstraint", "data");
prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
@@ -923,7 +925,7 @@ static void rna_def_constraint_action(BlenderRNA *brna)
prop= RNA_def_property(srna, "transform_channel", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "type");
RNA_def_property_enum_items(prop, transform_channel_items);
- RNA_def_property_ui_text(prop, "Transform Channel", "Transformation channel from the target that is used to key the Action.");
+ RNA_def_property_ui_text(prop, "Transform Channel", "Transformation channel from the target that is used to key the Action");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "action", PROP_POINTER, PROP_NONE);
@@ -935,26 +937,26 @@ static void rna_def_constraint_action(BlenderRNA *brna)
prop= RNA_def_property(srna, "start_frame", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "start");
RNA_def_property_range(prop, MINAFRAME, MAXFRAME);
- RNA_def_property_ui_text(prop, "Start Frame", "First frame of the Action to use.");
+ RNA_def_property_ui_text(prop, "Start Frame", "First frame of the Action to use");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "end_frame", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "end");
RNA_def_property_range(prop, MINAFRAME, MAXFRAME);
- RNA_def_property_ui_text(prop, "End Frame", "Last frame of the Action to use.");
+ RNA_def_property_ui_text(prop, "End Frame", "Last frame of the Action to use");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "maximum", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "max");
RNA_def_property_range(prop, -1000.f, 1000.f);
- RNA_def_property_ui_text(prop, "Maximum", "Maximum value for target channel range.");
+ RNA_def_property_ui_text(prop, "Maximum", "Maximum value for target channel range");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
RNA_def_property_float_funcs(prop, NULL, NULL, "rna_ActionConstraint_minmax_range");
prop= RNA_def_property(srna, "minimum", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "min");
RNA_def_property_range(prop, -1000.f, 1000.f);
- RNA_def_property_ui_text(prop, "Minimum", "Minimum value for target channel range.");
+ RNA_def_property_ui_text(prop, "Minimum", "Minimum value for target channel range");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
RNA_def_property_float_funcs(prop, NULL, NULL, "rna_ActionConstraint_minmax_range");
}
@@ -980,7 +982,7 @@ static void rna_def_constraint_locked_track(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "LockedTrackConstraint", "Constraint");
- RNA_def_struct_ui_text(srna, "Locked Track Constraint", "Points toward the target along the track axis, while locking the other axis.");
+ RNA_def_struct_ui_text(srna, "Locked Track Constraint", "Points toward the target along the track axis, while locking the other axis");
RNA_def_struct_sdna_from(srna, "bLockTrackConstraint", "data");
prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
@@ -997,13 +999,13 @@ static void rna_def_constraint_locked_track(BlenderRNA *brna)
prop= RNA_def_property(srna, "track", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "trackflag");
RNA_def_property_enum_items(prop, locktrack_items);
- RNA_def_property_ui_text(prop, "Track Axis", "Axis that points to the target object.");
+ RNA_def_property_ui_text(prop, "Track Axis", "Axis that points to the target object");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "locked", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "lockflag");
RNA_def_property_enum_items(prop, lock_items);
- RNA_def_property_ui_text(prop, "Locked Axis", "Axis that points upward.");
+ RNA_def_property_ui_text(prop, "Locked Axis", "Axis that points upward");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
}
@@ -1028,7 +1030,7 @@ static void rna_def_constraint_follow_path(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "FollowPathConstraint", "Constraint");
- RNA_def_struct_ui_text(srna, "Follow Path Constraint", "Locks motion to the target path.");
+ RNA_def_struct_ui_text(srna, "Follow Path Constraint", "Locks motion to the target path");
RNA_def_struct_sdna_from(srna, "bFollowPathConstraint", "data");
prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
@@ -1039,41 +1041,40 @@ static void rna_def_constraint_follow_path(BlenderRNA *brna)
prop= RNA_def_property(srna, "offset", PROP_INT, PROP_TIME);
RNA_def_property_range(prop, MINAFRAME, MAXFRAME);
- RNA_def_property_ui_text(prop, "Offset", "Offset from the position corresponding to the time frame.");
+ 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_factor", PROP_FLOAT, PROP_FACTOR);
- RNA_def_property_float_sdna(prop, NULL, "offset"); // XXX we might be better with another var or some hackery?
+ RNA_def_property_float_sdna(prop, NULL, "offset_fac");
RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Offset Factor", "Percentage value defining target position along length of bone.");
+ RNA_def_property_ui_text(prop, "Offset Factor", "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");
RNA_def_property_enum_items(prop, forwardpath_items);
- RNA_def_property_ui_text(prop, "Forward Axis", "Axis that points forward along the path.");
+ RNA_def_property_ui_text(prop, "Forward Axis", "Axis that points forward along the path");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "up", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "upflag");
RNA_def_property_enum_items(prop, pathup_items);
- RNA_def_property_ui_text(prop, "Up Axis", "Axis that points upward.");
+ RNA_def_property_ui_text(prop, "Up Axis", "Axis that points upward");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "use_curve_follow", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "followflag", FOLLOWPATH_FOLLOW);
- RNA_def_property_ui_text(prop, "Follow Curve", "Object will follow the heading and banking of the curve.");
+ 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, "use_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_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");
prop= RNA_def_property(srna, "use_curve_radius", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "followflag", FOLLOWPATH_RADIUS);
- RNA_def_property_ui_text(prop, "Curve Radius", "Objects scale by the curve radius.");
+ RNA_def_property_ui_text(prop, "Curve Radius", "Objects scale by the curve radius");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
}
@@ -1095,11 +1096,11 @@ static void rna_def_constraint_stretch_to(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "StretchToConstraint", "Constraint");
- RNA_def_struct_ui_text(srna, "Stretch To Constraint", "Stretches to meet the target object.");
+ RNA_def_struct_ui_text(srna, "Stretch To Constraint", "Stretches to meet the target object");
prop= RNA_def_property(srna, "head_tail", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, "bConstraint", "headtail");
- RNA_def_property_ui_text(prop, "Head/Tail", "Target along length of bone: Head=0, Tail=1.");
+ RNA_def_property_ui_text(prop, "Head/Tail", "Target along length of bone: Head=0, Tail=1");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
RNA_def_struct_sdna_from(srna, "bStretchToConstraint", "data");
@@ -1118,24 +1119,24 @@ static void rna_def_constraint_stretch_to(BlenderRNA *brna)
prop= RNA_def_property(srna, "volume", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "volmode");
RNA_def_property_enum_items(prop, volume_items);
- RNA_def_property_ui_text(prop, "Maintain Volume", "Maintain the object's volume as it stretches.");
+ RNA_def_property_ui_text(prop, "Maintain Volume", "Maintain the object's volume as it stretches");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "keep_axis", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "plane");
RNA_def_property_enum_items(prop, plane_items);
- RNA_def_property_ui_text(prop, "Keep Axis", "Axis to maintain during stretch.");
+ RNA_def_property_ui_text(prop, "Keep Axis", "Axis to maintain during stretch");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "original_length", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "orglength");
RNA_def_property_range(prop, 0.0, 100.f);
- RNA_def_property_ui_text(prop, "Original Length", "Length at rest position.");
+ RNA_def_property_ui_text(prop, "Original Length", "Length at rest position");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "bulge", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 100.f);
- RNA_def_property_ui_text(prop, "Volume Variation", "Factor between volume variation and stretching.");
+ RNA_def_property_ui_text(prop, "Volume Variation", "Factor between volume variation and stretching");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
}
@@ -1152,17 +1153,17 @@ static void rna_def_constraint_rigid_body_joint(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "RigidBodyJointConstraint", "Constraint");
- RNA_def_struct_ui_text(srna, "Rigid Body Joint Constraint", "For use with the Game Engine.");
+ RNA_def_struct_ui_text(srna, "Rigid Body Joint Constraint", "For use with the Game Engine");
RNA_def_struct_sdna_from(srna, "bRigidBodyJointConstraint", "data");
prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "tar");
- RNA_def_property_ui_text(prop, "Target", "Target Object.");
+ RNA_def_property_ui_text(prop, "Target", "Target Object");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
prop= RNA_def_property(srna, "child", PROP_POINTER, PROP_NONE);
- RNA_def_property_ui_text(prop, "Child Object", "Child object.");
+ RNA_def_property_ui_text(prop, "Child Object", "Child object");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
@@ -1175,37 +1176,37 @@ static void rna_def_constraint_rigid_body_joint(BlenderRNA *brna)
prop= RNA_def_property(srna, "pivot_x", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "pivX");
RNA_def_property_range(prop, -1000.0, 1000.f);
- RNA_def_property_ui_text(prop, "Pivot X", "Offset pivot on X.");
+ RNA_def_property_ui_text(prop, "Pivot X", "Offset pivot on X");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "pivot_y", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "pivY");
RNA_def_property_range(prop, -1000.0, 1000.f);
- RNA_def_property_ui_text(prop, "Pivot Y", "Offset pivot on Y.");
+ RNA_def_property_ui_text(prop, "Pivot Y", "Offset pivot on Y");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "pivot_z", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "pivZ");
RNA_def_property_range(prop, -1000.0, 1000.f);
- RNA_def_property_ui_text(prop, "Pivot Z", "Offset pivot on Z.");
+ RNA_def_property_ui_text(prop, "Pivot Z", "Offset pivot on Z");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "axis_x", PROP_FLOAT, PROP_ANGLE); // XXX - convert to radians
+ prop= RNA_def_property(srna, "axis_x", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "axX");
- RNA_def_property_range(prop, -360.0, 360.f);
- RNA_def_property_ui_text(prop, "Axis X", "Rotate pivot on X axis in degrees.");
+ RNA_def_property_range(prop, -M_PI*2, M_PI*2);
+ RNA_def_property_ui_text(prop, "Axis X", "Rotate pivot on X axis in degrees");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "axis_y", PROP_FLOAT, PROP_ANGLE); // XXX - convert to radians
+ prop= RNA_def_property(srna, "axis_y", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "axY");
- RNA_def_property_range(prop, -360.0, 360.f);
- RNA_def_property_ui_text(prop, "Axis Y", "Rotate pivot on Y axis in degrees.");
+ RNA_def_property_range(prop, -M_PI*2, M_PI*2);
+ RNA_def_property_ui_text(prop, "Axis Y", "Rotate pivot on Y axis in degrees");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "axis_z", PROP_FLOAT, PROP_ANGLE); // XXX - convert to radians
+ prop= RNA_def_property(srna, "axis_z", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "axZ");
- RNA_def_property_range(prop, -360.0, 360.f);
- RNA_def_property_ui_text(prop, "Axis Z", "Rotate pivot on Z axis in degrees.");
+ RNA_def_property_range(prop, -M_PI*2, M_PI*2);
+ RNA_def_property_ui_text(prop, "Axis Z", "Rotate pivot on Z axis in degrees");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
/* XXX not sure how to wrap the two 6 element arrays for the generic joint */
@@ -1214,12 +1215,12 @@ static void rna_def_constraint_rigid_body_joint(BlenderRNA *brna)
prop= RNA_def_property(srna, "disable_linked_collision", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CONSTRAINT_DISABLE_LINKED_COLLISION);
- RNA_def_property_ui_text(prop, "Disable Linked Collision", "Disable collision between linked bodies.");
+ RNA_def_property_ui_text(prop, "Disable Linked Collision", "Disable collision between linked bodies");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "draw_pivot", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CONSTRAINT_DRAW_PIVOT);
- RNA_def_property_ui_text(prop, "Draw Pivot", "Display the pivot point and rotation in 3D view.");
+ RNA_def_property_ui_text(prop, "Draw Pivot", "Display the pivot point and rotation in 3D view");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
}
@@ -1236,7 +1237,7 @@ static void rna_def_constraint_clamp_to(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "ClampToConstraint", "Constraint");
- RNA_def_struct_ui_text(srna, "Clamp To Constraint", "Constrains an object's location to the nearest point along the target path.");
+ RNA_def_struct_ui_text(srna, "Clamp To Constraint", "Constrains an object's location to the nearest point along the target path");
RNA_def_struct_sdna_from(srna, "bClampToConstraint", "data");
prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
@@ -1248,12 +1249,12 @@ static void rna_def_constraint_clamp_to(BlenderRNA *brna)
prop= RNA_def_property(srna, "main_axis", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "flag");
RNA_def_property_enum_items(prop, clamp_items);
- RNA_def_property_ui_text(prop, "Main Axis", "Main axis of movement.");
+ RNA_def_property_ui_text(prop, "Main Axis", "Main axis of movement");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "cyclic", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag2", CLAMPTO_CYCLIC);
- RNA_def_property_ui_text(prop, "Cyclic", "Treat curve as cyclic curve (no clamping to curve bounding box.");
+ RNA_def_property_ui_text(prop, "Cyclic", "Treat curve as cyclic curve (no clamping to curve bounding box");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
}
@@ -1275,7 +1276,7 @@ static void rna_def_constraint_transform(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "TransformConstraint", "Constraint");
- RNA_def_struct_ui_text(srna, "Transformation Constraint", "Maps transformations of the target to the object.");
+ RNA_def_struct_ui_text(srna, "Transformation Constraint", "Maps transformations of the target to the object");
RNA_def_struct_sdna_from(srna, "bTransformConstraint", "data");
prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
@@ -1292,108 +1293,108 @@ static void rna_def_constraint_transform(BlenderRNA *brna)
prop= RNA_def_property(srna, "map_from", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "from");
RNA_def_property_enum_items(prop, transform_items);
- RNA_def_property_ui_text(prop, "Map From", "The transformation type to use from the target.");
+ RNA_def_property_ui_text(prop, "Map From", "The transformation type to use from the target");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "map_to", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "to");
RNA_def_property_enum_items(prop, transform_items);
- RNA_def_property_ui_text(prop, "Map To", "The transformation type to affect of the constrained object.");
+ RNA_def_property_ui_text(prop, "Map To", "The transformation type to affect of the constrained object");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "map_to_x_from", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "map[0]");
RNA_def_property_enum_items(prop, axis_map_items);
- RNA_def_property_ui_text(prop, "Map To X From", "The source axis constrained object's X axis uses.");
+ RNA_def_property_ui_text(prop, "Map To X From", "The source axis constrained object's X axis uses");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "map_to_y_from", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "map[1]");
RNA_def_property_enum_items(prop, axis_map_items);
- RNA_def_property_ui_text(prop, "Map To Y From", "The source axis constrained object's Y axis uses.");
+ RNA_def_property_ui_text(prop, "Map To Y From", "The source axis constrained object's Y axis uses");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "map_to_z_from", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "map[2]");
RNA_def_property_enum_items(prop, axis_map_items);
- RNA_def_property_ui_text(prop, "Map To Z From", "The source axis constrained object's Z axis uses.");
+ RNA_def_property_ui_text(prop, "Map To Z From", "The source axis constrained object's Z axis uses");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "extrapolate_motion", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "expo", CLAMPTO_CYCLIC);
- RNA_def_property_ui_text(prop, "Extrapolate Motion", "Extrapolate ranges.");
+ RNA_def_property_ui_text(prop, "Extrapolate Motion", "Extrapolate ranges");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "from_min_x", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "from_min[0]");
RNA_def_property_ui_range(prop, -1000.0f, 1000.0f, 10, 3);
- RNA_def_property_ui_text(prop, "From Minimum X", "Bottom range of X axis source motion.");
+ RNA_def_property_ui_text(prop, "From Minimum X", "Bottom range of X axis source motion");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "from_min_y", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "from_min[1]");
RNA_def_property_ui_range(prop, -1000.0f, 1000.0f, 10, 3);
- RNA_def_property_ui_text(prop, "From Minimum Y", "Bottom range of Y axis source motion.");
+ RNA_def_property_ui_text(prop, "From Minimum Y", "Bottom range of Y axis source motion");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "from_min_z", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "from_min[2]");
RNA_def_property_ui_range(prop, -1000.0f, 1000.0f, 10, 3);
- RNA_def_property_ui_text(prop, "From Minimum Z", "Bottom range of Z axis source motion.");
+ RNA_def_property_ui_text(prop, "From Minimum Z", "Bottom range of Z axis source motion");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "from_max_x", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "from_max[0]");
RNA_def_property_ui_range(prop, -1000.0f, 1000.0f, 10, 3);
- RNA_def_property_ui_text(prop, "From Maximum X", "Top range of X axis source motion.");
+ RNA_def_property_ui_text(prop, "From Maximum X", "Top range of X axis source motion");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "from_max_y", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "from_max[1]");
RNA_def_property_ui_range(prop, -1000.0f, 1000.0f, 10, 3);
- RNA_def_property_ui_text(prop, "From Maximum Y", "Top range of Y axis source motion.");
+ RNA_def_property_ui_text(prop, "From Maximum Y", "Top range of Y axis source motion");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "from_max_z", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "from_max[2]");
RNA_def_property_ui_range(prop, -1000.0f, 1000.0f, 10, 3);
- RNA_def_property_ui_text(prop, "From Maximum Z", "Top range of Z axis source motion.");
+ RNA_def_property_ui_text(prop, "From Maximum Z", "Top range of Z axis source motion");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "to_min_x", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "to_min[0]");
RNA_def_property_ui_range(prop, -1000.0f, 1000.0f, 10, 3);
- RNA_def_property_ui_text(prop, "To Minimum X", "Bottom range of X axis destination motion.");
+ RNA_def_property_ui_text(prop, "To Minimum X", "Bottom range of X axis destination motion");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "to_min_y", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "to_min[1]");
RNA_def_property_ui_range(prop, -1000.0f, 1000.0f, 10, 3);
- RNA_def_property_ui_text(prop, "To Minimum Y", "Bottom range of Y axis destination motion.");
+ RNA_def_property_ui_text(prop, "To Minimum Y", "Bottom range of Y axis destination motion");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "to_min_z", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "to_min[2]");
RNA_def_property_ui_range(prop, -1000.0f, 1000.0f, 10, 3);
- RNA_def_property_ui_text(prop, "To Minimum Z", "Bottom range of Z axis destination motion.");
+ RNA_def_property_ui_text(prop, "To Minimum Z", "Bottom range of Z axis destination motion");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "to_max_x", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "to_max[0]");
RNA_def_property_ui_range(prop, -1000.0f, 1000.0f, 10, 3);
- RNA_def_property_ui_text(prop, "To Maximum X", "Top range of X axis destination motion.");
+ RNA_def_property_ui_text(prop, "To Maximum X", "Top range of X axis destination motion");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "to_max_y", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "to_max[1]");
RNA_def_property_ui_range(prop, -1000.0f, 1000.0f, 10, 3);
- RNA_def_property_ui_text(prop, "To Maximum Y", "Top range of Y axis destination motion.");
+ RNA_def_property_ui_text(prop, "To Maximum Y", "Top range of Y axis destination motion");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "to_max_z", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "to_max[2]");
RNA_def_property_ui_range(prop, -1000.0f, 1000.0f, 10, 3);
- RNA_def_property_ui_text(prop, "To Maximum Z", "Top range of Z axis destination motion.");
+ RNA_def_property_ui_text(prop, "To Maximum Z", "Top range of Z axis destination motion");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
}
@@ -1403,78 +1404,78 @@ static void rna_def_constraint_location_limit(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "LimitLocationConstraint", "Constraint");
- RNA_def_struct_ui_text(srna, "Limit Location Constraint", "Limits the location of the constrained object.");
+ RNA_def_struct_ui_text(srna, "Limit Location Constraint", "Limits the location of the constrained object");
RNA_def_struct_sdna_from(srna, "bLocLimitConstraint", "data");
prop= RNA_def_property(srna, "use_minimum_x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", LIMIT_XMIN);
- RNA_def_property_ui_text(prop, "Minimum X", "Use the minimum X value.");
+ RNA_def_property_ui_text(prop, "Minimum X", "Use the minimum X value");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "use_minimum_y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", LIMIT_YMIN);
- RNA_def_property_ui_text(prop, "Minimum Y", "Use the minimum Y value.");
+ RNA_def_property_ui_text(prop, "Minimum Y", "Use the minimum Y value");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "use_minimum_z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", LIMIT_ZMIN);
- RNA_def_property_ui_text(prop, "Minimum Z", "Use the minimum Z value.");
+ RNA_def_property_ui_text(prop, "Minimum Z", "Use the minimum Z value");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "use_maximum_x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", LIMIT_XMAX);
- RNA_def_property_ui_text(prop, "Maximum X", "Use the maximum X value.");
+ RNA_def_property_ui_text(prop, "Maximum X", "Use the maximum X value");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "use_maximum_y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", LIMIT_YMAX);
- RNA_def_property_ui_text(prop, "Maximum Y", "Use the maximum Y value.");
+ RNA_def_property_ui_text(prop, "Maximum Y", "Use the maximum Y value");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "use_maximum_z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", LIMIT_ZMAX);
- RNA_def_property_ui_text(prop, "Maximum Z", "Use the maximum Z value.");
+ RNA_def_property_ui_text(prop, "Maximum Z", "Use the maximum Z value");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "minimum_x", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "xmin");
RNA_def_property_range(prop, -1000.0, 1000.f);
- RNA_def_property_ui_text(prop, "Minimum X", "Lowest X value to allow.");
+ RNA_def_property_ui_text(prop, "Minimum X", "Lowest X value to allow");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "minimum_y", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "ymin");
RNA_def_property_range(prop, -1000.0, 1000.f);
- RNA_def_property_ui_text(prop, "Minimum Y", "Lowest Y value to allow.");
+ RNA_def_property_ui_text(prop, "Minimum Y", "Lowest Y value to allow");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "minimum_z", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "zmin");
RNA_def_property_range(prop, -1000.0, 1000.f);
- RNA_def_property_ui_text(prop, "Minimum Z", "Lowest Z value to allow.");
+ RNA_def_property_ui_text(prop, "Minimum Z", "Lowest Z value to allow");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "maximum_x", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "xmax");
RNA_def_property_range(prop, -1000.0, 1000.f);
- RNA_def_property_ui_text(prop, "Maximum X", "Highest X value to allow.");
+ RNA_def_property_ui_text(prop, "Maximum X", "Highest X value to allow");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "maximum_y", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "ymax");
RNA_def_property_range(prop, -1000.0, 1000.f);
- RNA_def_property_ui_text(prop, "Maximum Y", "Highest Y value to allow.");
+ RNA_def_property_ui_text(prop, "Maximum Y", "Highest Y value to allow");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "maximum_z", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "zmax");
RNA_def_property_range(prop, -1000.0, 1000.f);
- RNA_def_property_ui_text(prop, "Maximum Z", "Highest Z value to allow.");
+ RNA_def_property_ui_text(prop, "Maximum Z", "Highest Z value to allow");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "limit_transform", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag2", LIMIT_TRANSFORM);
- RNA_def_property_ui_text(prop, "For Transform", "Transforms are affected by this constraint as well.");
+ RNA_def_property_ui_text(prop, "For Transform", "Transforms are affected by this constraint as well");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
}
@@ -1484,63 +1485,63 @@ static void rna_def_constraint_rotation_limit(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "LimitRotationConstraint", "Constraint");
- RNA_def_struct_ui_text(srna, "Limit Rotation Constraint", "Limits the rotation of the constrained object.");
+ RNA_def_struct_ui_text(srna, "Limit Rotation Constraint", "Limits the rotation of the constrained object");
RNA_def_struct_sdna_from(srna, "bRotLimitConstraint", "data");
prop= RNA_def_property(srna, "use_limit_x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", LIMIT_XROT);
- RNA_def_property_ui_text(prop, "Limit X", "Use the minimum X value.");
+ RNA_def_property_ui_text(prop, "Limit X", "Use the minimum X value");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "use_limit_y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", LIMIT_YROT);
- RNA_def_property_ui_text(prop, "Limit Y", "Use the minimum Y value.");
+ RNA_def_property_ui_text(prop, "Limit Y", "Use the minimum Y value");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "use_limit_z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", LIMIT_ZROT);
- RNA_def_property_ui_text(prop, "Limit Z", "Use the minimum Z value.");
+ RNA_def_property_ui_text(prop, "Limit Z", "Use the minimum Z value");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "minimum_x", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "xmin");
RNA_def_property_range(prop, -1000.0, 1000.f);
- RNA_def_property_ui_text(prop, "Minimum X", "Lowest X value to allow.");
+ RNA_def_property_ui_text(prop, "Minimum X", "Lowest X value to allow");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "minimum_y", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "ymin");
RNA_def_property_range(prop, -1000.0, 1000.f);
- RNA_def_property_ui_text(prop, "Minimum Y", "Lowest Y value to allow.");
+ RNA_def_property_ui_text(prop, "Minimum Y", "Lowest Y value to allow");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "minimum_z", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "zmin");
RNA_def_property_range(prop, -1000.0, 1000.f);
- RNA_def_property_ui_text(prop, "Minimum Z", "Lowest Z value to allow.");
+ RNA_def_property_ui_text(prop, "Minimum Z", "Lowest Z value to allow");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "maximum_x", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "xmax");
RNA_def_property_range(prop, -1000.0, 1000.f);
- RNA_def_property_ui_text(prop, "Maximum X", "Highest X value to allow.");
+ RNA_def_property_ui_text(prop, "Maximum X", "Highest X value to allow");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "maximum_y", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "ymax");
RNA_def_property_range(prop, -1000.0, 1000.f);
- RNA_def_property_ui_text(prop, "Maximum Y", "Highest Y value to allow.");
+ RNA_def_property_ui_text(prop, "Maximum Y", "Highest Y value to allow");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "maximum_z", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "zmax");
RNA_def_property_range(prop, -1000.0, 1000.f);
- RNA_def_property_ui_text(prop, "Maximum Z", "Highest Z value to allow.");
+ RNA_def_property_ui_text(prop, "Maximum Z", "Highest Z value to allow");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "limit_transform", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag2", LIMIT_TRANSFORM);
- RNA_def_property_ui_text(prop, "For Transform", "Transforms are affected by this constraint as well.");
+ RNA_def_property_ui_text(prop, "For Transform", "Transforms are affected by this constraint as well");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
}
@@ -1550,78 +1551,78 @@ static void rna_def_constraint_size_limit(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "LimitScaleConstraint", "Constraint");
- RNA_def_struct_ui_text(srna, "Limit Size Constraint", "Limits the scaling of the constrained object.");
+ RNA_def_struct_ui_text(srna, "Limit Size Constraint", "Limits the scaling of the constrained object");
RNA_def_struct_sdna_from(srna, "bSizeLimitConstraint", "data");
prop= RNA_def_property(srna, "use_minimum_x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", LIMIT_XMIN);
- RNA_def_property_ui_text(prop, "Minimum X", "Use the minimum X value.");
+ RNA_def_property_ui_text(prop, "Minimum X", "Use the minimum X value");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "use_minimum_y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", LIMIT_YMIN);
- RNA_def_property_ui_text(prop, "Minimum Y", "Use the minimum Y value.");
+ RNA_def_property_ui_text(prop, "Minimum Y", "Use the minimum Y value");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "use_minimum_z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", LIMIT_ZMIN);
- RNA_def_property_ui_text(prop, "Minimum Z", "Use the minimum Z value.");
+ RNA_def_property_ui_text(prop, "Minimum Z", "Use the minimum Z value");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "use_maximum_x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", LIMIT_XMAX);
- RNA_def_property_ui_text(prop, "Maximum X", "Use the maximum X value.");
+ RNA_def_property_ui_text(prop, "Maximum X", "Use the maximum X value");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "use_maximum_y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", LIMIT_YMAX);
- RNA_def_property_ui_text(prop, "Maximum Y", "Use the maximum Y value.");
+ RNA_def_property_ui_text(prop, "Maximum Y", "Use the maximum Y value");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "use_maximum_z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", LIMIT_ZMAX);
- RNA_def_property_ui_text(prop, "Maximum Z", "Use the maximum Z value.");
+ RNA_def_property_ui_text(prop, "Maximum Z", "Use the maximum Z value");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "minimum_x", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "xmin");
RNA_def_property_range(prop, -1000.0, 1000.f);
- RNA_def_property_ui_text(prop, "Minimum X", "Lowest X value to allow.");
+ RNA_def_property_ui_text(prop, "Minimum X", "Lowest X value to allow");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "minimum_y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ymin");
RNA_def_property_range(prop, -1000.0, 1000.f);
- RNA_def_property_ui_text(prop, "Minimum Y", "Lowest Y value to allow.");
+ RNA_def_property_ui_text(prop, "Minimum Y", "Lowest Y value to allow");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "minimum_z", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "zmin");
RNA_def_property_range(prop, -1000.0, 1000.f);
- RNA_def_property_ui_text(prop, "Minimum Z", "Lowest Z value to allow.");
+ RNA_def_property_ui_text(prop, "Minimum Z", "Lowest Z value to allow");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "maximum_x", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "xmax");
RNA_def_property_range(prop, -1000.0, 1000.f);
- RNA_def_property_ui_text(prop, "Maximum X", "Highest X value to allow.");
+ RNA_def_property_ui_text(prop, "Maximum X", "Highest X value to allow");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "maximum_y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ymax");
RNA_def_property_range(prop, -1000.0, 1000.f);
- RNA_def_property_ui_text(prop, "Maximum Y", "Highest Y value to allow.");
+ RNA_def_property_ui_text(prop, "Maximum Y", "Highest Y value to allow");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "maximum_z", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "zmax");
RNA_def_property_range(prop, -1000.0, 1000.f);
- RNA_def_property_ui_text(prop, "Maximum Z", "Highest Z value to allow.");
+ RNA_def_property_ui_text(prop, "Maximum Z", "Highest Z value to allow");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "limit_transform", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag2", LIMIT_TRANSFORM);
- RNA_def_property_ui_text(prop, "For Transform", "Transforms are affected by this constraint as well.");
+ RNA_def_property_ui_text(prop, "For Transform", "Transforms are affected by this constraint as well");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
}
@@ -1631,7 +1632,7 @@ static void rna_def_constraint_distance_limit(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "LimitDistanceConstraint", "Constraint");
- RNA_def_struct_ui_text(srna, "Limit Distance Constraint", "Limits the distance from target object.");
+ RNA_def_struct_ui_text(srna, "Limit Distance Constraint", "Limits the distance from target object");
RNA_def_struct_sdna_from(srna, "bDistLimitConstraint", "data");
prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
@@ -1648,13 +1649,13 @@ static void rna_def_constraint_distance_limit(BlenderRNA *brna)
prop= RNA_def_property(srna, "distance", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "dist");
RNA_def_property_range(prop, 0.0, 100.f);
- RNA_def_property_ui_text(prop, "Distance", "Radius of limiting sphere.");
+ RNA_def_property_ui_text(prop, "Distance", "Radius of limiting sphere");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "limit_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "mode");
RNA_def_property_enum_items(prop, constraint_distance_items);
- RNA_def_property_ui_text(prop, "Limit Mode", "Distances in relation to sphere of influence to allow.");
+ RNA_def_property_ui_text(prop, "Limit Mode", "Distances in relation to sphere of influence to allow");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
}
@@ -1670,7 +1671,7 @@ static void rna_def_constraint_shrinkwrap(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "ShrinkwrapConstraint", "Constraint");
- RNA_def_struct_ui_text(srna, "Shrinkwrap Constraint", "Creates constraint-based shrinkwrap relationship.");
+ RNA_def_struct_ui_text(srna, "Shrinkwrap Constraint", "Creates constraint-based shrinkwrap relationship");
RNA_def_struct_sdna_from(srna, "bShrinkwrapConstraint", "data");
prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
@@ -1688,7 +1689,7 @@ static void rna_def_constraint_shrinkwrap(BlenderRNA *brna)
prop= RNA_def_property(srna, "distance", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "dist");
RNA_def_property_range(prop, 0.0, 100.f);
- RNA_def_property_ui_text(prop, "Distance", "Distance to Target.");
+ RNA_def_property_ui_text(prop, "Distance", "Distance to Target");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "use_x", PROP_BOOLEAN, PROP_NONE);
@@ -1722,7 +1723,7 @@ static void rna_def_constraint_damped_track(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "DampedTrackConstraint", "Constraint");
- RNA_def_struct_ui_text(srna, "Damped Track Constraint", "Points toward target by taking the shortest rotation path.");
+ RNA_def_struct_ui_text(srna, "Damped Track Constraint", "Points toward target by taking the shortest rotation path");
RNA_def_struct_sdna_from(srna, "bDampTrackConstraint", "data");
prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
@@ -1739,7 +1740,7 @@ static void rna_def_constraint_damped_track(BlenderRNA *brna)
prop= RNA_def_property(srna, "track", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "trackflag");
RNA_def_property_enum_items(prop, damptrack_items);
- RNA_def_property_ui_text(prop, "Track Axis", "Axis that points to the target object.");
+ RNA_def_property_ui_text(prop, "Track Axis", "Axis that points to the target object");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
}
@@ -1750,12 +1751,12 @@ static void rna_def_constraint_spline_ik(BlenderRNA *brna)
static EnumPropertyItem splineik_xz_scale_mode[] = {
{CONSTRAINT_SPLINEIK_XZS_NONE, "NONE", 0, "None", "Don't scale the X and Z axes (Default)"},
- {CONSTRAINT_SPLINEIK_XZS_ORIGINAL, "BONE_ORIGINAL", 0, "Bone Original", "Use the original scaling of the bones."},
- {CONSTRAINT_SPLINEIK_XZS_VOLUMETRIC, "VOLUME_PRESERVE", 0, "Volume Preservation", "Scale of the X and Z axes is the inverse of the Y-Scale."},
+ {CONSTRAINT_SPLINEIK_XZS_ORIGINAL, "BONE_ORIGINAL", 0, "Bone Original", "Use the original scaling of the bones"},
+ {CONSTRAINT_SPLINEIK_XZS_VOLUMETRIC, "VOLUME_PRESERVE", 0, "Volume Preservation", "Scale of the X and Z axes is the inverse of the Y-Scale"},
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "SplineIKConstraint", "Constraint");
- RNA_def_struct_ui_text(srna, "Spline IK Constraint", "Align 'n' bones along a curve.");
+ RNA_def_struct_ui_text(srna, "Spline IK Constraint", "Align 'n' bones along a curve");
RNA_def_struct_sdna_from(srna, "bSplineIKConstraint", "data");
/* target chain */
@@ -1778,34 +1779,34 @@ static void rna_def_constraint_spline_ik(BlenderRNA *brna)
RNA_def_property_flag(prop, PROP_DYNAMIC);
RNA_def_property_dynamic_array_funcs(prop, "rna_SplineIKConstraint_joint_bindings_get_length");
RNA_def_property_float_funcs(prop, "rna_SplineIKConstraint_joint_bindings_get", "rna_SplineIKConstraint_joint_bindings_set", NULL);
- RNA_def_property_ui_text(prop, "Joint Bindings", "(EXPERIENCED USERS ONLY) The relative positions of the joints along the chain as percentages.");
+ RNA_def_property_ui_text(prop, "Joint Bindings", "(EXPERIENCED USERS ONLY) The relative positions of the joints along the chain as percentages");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
/* settings */
prop= RNA_def_property(srna, "chain_offset", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CONSTRAINT_SPLINEIK_NO_ROOT);
- RNA_def_property_ui_text(prop, "Chain Offset", "Offset the entire chain relative to the root joint.");
+ RNA_def_property_ui_text(prop, "Chain Offset", "Offset the entire chain relative to the root joint");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "even_divisions", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CONSTRAINT_SPLINEIK_EVENSPLITS);
- RNA_def_property_ui_text(prop, "Even Divisions", "Ignore the relative lengths of the bones when fitting to the curve.");
+ RNA_def_property_ui_text(prop, "Even Divisions", "Ignore the relative lengths of the bones when fitting to the curve");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "y_stretch", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", CONSTRAINT_SPLINEIK_SCALE_LIMITED);
- RNA_def_property_ui_text(prop, "Y Stretch", "Stretch the Y axis of the bones to fit the curve.");
+ RNA_def_property_ui_text(prop, "Y Stretch", "Stretch the Y axis of the bones to fit the curve");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "use_curve_radius", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", CONSTRAINT_SPLINEIK_NO_CURVERAD);
- RNA_def_property_ui_text(prop, "Use Curve Radius", "Average radius of the endpoints is used to tweak the X and Z Scaling of the bones, on top of XZ Scale mode.");
+ RNA_def_property_ui_text(prop, "Use Curve Radius", "Average radius of the endpoints is used to tweak the X and Z Scaling of the bones, on top of XZ Scale mode");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "xz_scaling_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "xzScaleMode");
RNA_def_property_enum_items(prop, splineik_xz_scale_mode);
- RNA_def_property_ui_text(prop, "XZ Scale Mode", "Method used for determining the scaling of the X and Z axes of the bones.");
+ RNA_def_property_ui_text(prop, "XZ Scale Mode", "Method used for determining the scaling of the X and Z axes of the bones");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
}
@@ -1817,7 +1818,7 @@ void RNA_def_constraint(BlenderRNA *brna)
/* data */
srna= RNA_def_struct(brna, "Constraint", NULL );
- RNA_def_struct_ui_text(srna, "Constraint", "Constraint modifying the transformation of objects and bones.");
+ RNA_def_struct_ui_text(srna, "Constraint", "Constraint modifying the transformation of objects and bones");
RNA_def_struct_refine_func(srna, "rna_ConstraintType_refine");
RNA_def_struct_path_func(srna, "rna_Constraint_path");
RNA_def_struct_sdna(srna, "bConstraint");
@@ -1839,25 +1840,25 @@ void RNA_def_constraint(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "ownspace");
RNA_def_property_enum_items(prop, space_pchan_items);
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_Constraint_owner_space_itemf");
- RNA_def_property_ui_text(prop, "Owner Space", "Space that owner is evaluated in.");
+ RNA_def_property_ui_text(prop, "Owner Space", "Space that owner is evaluated in");
prop= RNA_def_property(srna, "target_space", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "tarspace");
RNA_def_property_enum_items(prop, space_pchan_items);
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_Constraint_target_space_itemf");
- RNA_def_property_ui_text(prop, "Target Space", "Space that target is evaluated in.");
+ RNA_def_property_ui_text(prop, "Target Space", "Space that target is evaluated in");
/* flags */
- // XXX do we want to wrap this?
prop= RNA_def_property(srna, "expanded", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CONSTRAINT_EXPAND);
- RNA_def_property_ui_text(prop, "Expanded", "Constraint's panel is expanded in UI.");
+ RNA_def_property_ui_text(prop, "Expanded", "Constraint's panel is expanded in UI");
+ RNA_def_property_ui_icon(prop, ICON_TRIA_RIGHT, 1);
// 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", CONSTRAINT_DISABLE);
- RNA_def_property_ui_text(prop, "Disabled", "Constraint has invalid settings and will not be evaluated.");
+ RNA_def_property_ui_text(prop, "Disabled", "Constraint has invalid settings and will not be evaluated");
// 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);
@@ -1866,25 +1867,25 @@ void RNA_def_constraint(BlenderRNA *brna)
prop= RNA_def_property(srna, "proxy_local", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CONSTRAINT_PROXY_LOCAL);
- RNA_def_property_ui_text(prop, "Proxy Local", "Constraint was added in this proxy instance (i.e. did not belong to source Armature).");
+ RNA_def_property_ui_text(prop, "Proxy Local", "Constraint was added in this proxy instance (i.e. did not belong to source Armature)");
/* values */
prop= RNA_def_property(srna, "influence", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "enforce");
RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Influence", "Amount of influence constraint will have on the final solution.");
+ RNA_def_property_ui_text(prop, "Influence", "Amount of influence constraint will have on the final solution");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_influence_update");
/* readonly values */
prop= RNA_def_property(srna, "lin_error", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "lin_error");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Lin error", "Amount of residual error in Blender space unit for constraints that work on position.");
+ RNA_def_property_ui_text(prop, "Lin error", "Amount of residual error in Blender space unit for constraints that work on position");
prop= RNA_def_property(srna, "rot_error", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "rot_error");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Rot error", "Amount of residual error in radiant for constraints that work on orientation.");
+ RNA_def_property_ui_text(prop, "Rot error", "Amount of residual error in radiant for constraints that work on orientation");
/* pointers */
rna_def_constrainttarget(brna);
diff --git a/source/blender/makesrna/intern/rna_context.c b/source/blender/makesrna/intern/rna_context.c
index 70d61b15d9f..27808b7d1bf 100644
--- a/source/blender/makesrna/intern/rna_context.c
+++ b/source/blender/makesrna/intern/rna_context.c
@@ -15,7 +15,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor(s): Blender Foundation (2009).
*
@@ -142,7 +142,7 @@ void RNA_def_context(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "Context", NULL);
- RNA_def_struct_ui_text(srna, "Context", "Current windowmanager and data context.");
+ RNA_def_struct_ui_text(srna, "Context", "Current windowmanager and data context");
RNA_def_struct_sdna(srna, "bContext");
/* WM */
diff --git a/source/blender/makesrna/intern/rna_controller.c b/source/blender/makesrna/intern/rna_controller.c
index 4d5ef7aa123..0c1d3d69283 100644
--- a/source/blender/makesrna/intern/rna_controller.c
+++ b/source/blender/makesrna/intern/rna_controller.c
@@ -15,7 +15,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor(s): Blender Foundation (2008).
*
@@ -80,7 +80,7 @@ void RNA_def_controller(BlenderRNA *brna)
srna= RNA_def_struct(brna, "Controller", NULL);
RNA_def_struct_sdna(srna, "bController");
RNA_def_struct_refine_func(srna, "rna_Controller_refine");
- RNA_def_struct_ui_text(srna, "Controller", "Game engine logic brick to process events, connecting sensors to actuators.");
+ RNA_def_struct_ui_text(srna, "Controller", "Game engine logic brick to process events, connecting sensors to actuators");
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_ui_text(prop, "Name", "");
@@ -95,7 +95,7 @@ void RNA_def_controller(BlenderRNA *brna)
/* Expression Controller */
srna= RNA_def_struct(brna, "ExpressionController", "Controller");
RNA_def_struct_sdna_from(srna, "bExpressionCont", "data");
- RNA_def_struct_ui_text(srna, "Expression Controller", "Controller passing on events based on the evaluation of an expression.");
+ RNA_def_struct_ui_text(srna, "Expression Controller", "Controller passing on events based on the evaluation of an expression");
prop= RNA_def_property(srna, "expression", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "str");
@@ -105,31 +105,39 @@ void RNA_def_controller(BlenderRNA *brna)
/* Python Controller */
srna= RNA_def_struct(brna, "PythonController", "Controller" );
RNA_def_struct_sdna_from(srna, "bPythonCont", "data");
- RNA_def_struct_ui_text(srna, "Python Controller", "Controller executing a python script.");
+ RNA_def_struct_ui_text(srna, "Python Controller", "Controller executing a python script");
prop= RNA_def_property(srna, "text", PROP_POINTER, PROP_NONE);
- RNA_def_property_struct_type(prop, "ID");
+ RNA_def_property_struct_type(prop, "Text");
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Text", "Text datablock with the python script.");
+ RNA_def_property_ui_text(prop, "Text", "Text datablock with the python script");
+
+ prop= RNA_def_property(srna, "module", PROP_STRING, PROP_NONE);
+ RNA_def_property_ui_text(prop, "Module", "Module name and function to run e.g. \"someModule.main\". Internal texts and external python files can be used");
+ RNA_def_struct_name_property(srna, prop);
+
+ prop= RNA_def_property(srna, "debug", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", CONT_PY_DEBUG);
+ RNA_def_property_ui_text(prop, "D", "Continuously reload the module from disk for editing external modules without restarting");
/* Other Controllers */
srna= RNA_def_struct(brna, "AndController", "Controller");
- RNA_def_struct_ui_text(srna, "And Controller", "Controller passing on events based on a logical AND operation.");
+ RNA_def_struct_ui_text(srna, "And Controller", "Controller passing on events based on a logical AND operation");
srna= RNA_def_struct(brna, "OrController", "Controller");
- RNA_def_struct_ui_text(srna, "Or Controller", "Controller passing on events based on a logical OR operation.");
+ RNA_def_struct_ui_text(srna, "Or Controller", "Controller passing on events based on a logical OR operation");
srna= RNA_def_struct(brna, "NorController", "Controller");
- RNA_def_struct_ui_text(srna, "Nor Controller", "Controller passing on events based on a logical NOR operation.");
+ RNA_def_struct_ui_text(srna, "Nor Controller", "Controller passing on events based on a logical NOR operation");
srna= RNA_def_struct(brna, "NandController", "Controller");
- RNA_def_struct_ui_text(srna, "Nand Controller", "Controller passing on events based on a logical NAND operation.");
+ RNA_def_struct_ui_text(srna, "Nand Controller", "Controller passing on events based on a logical NAND operation");
srna= RNA_def_struct(brna, "XorController", "Controller");
- RNA_def_struct_ui_text(srna, "Xor Controller", "Controller passing on events based on a logical XOR operation.");
+ RNA_def_struct_ui_text(srna, "Xor Controller", "Controller passing on events based on a logical XOR operation");
srna= RNA_def_struct(brna, "XnorController", "Controller");
- RNA_def_struct_ui_text(srna, "Xnor Controller", "Controller passing on events based on a logical XNOR operation.");
+ RNA_def_struct_ui_text(srna, "Xnor Controller", "Controller passing on events based on a logical XNOR operation");
}
#endif
diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c
index 98c2963a110..499423276ab 100644
--- a/source/blender/makesrna/intern/rna_curve.c
+++ b/source/blender/makesrna/intern/rna_curve.c
@@ -15,7 +15,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor(s): Blender Foundation (2008), Juho Veps�l�inen
*
@@ -42,7 +42,6 @@ EnumPropertyItem beztriple_handle_type_items[] = {
{HD_AUTO, "AUTO", 0, "Auto", ""},
{HD_VECT, "VECTOR", 0, "Vector", ""},
{HD_ALIGN, "ALIGNED", 0, "Aligned", ""},
- {HD_AUTO_ANIM, "AUTO_CLAMPED", 0, "Auto Clamped", ""},
{0, NULL, 0, NULL, NULL}};
EnumPropertyItem beztriple_interpolation_mode_items[] = {
@@ -50,12 +49,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", ""},
- {BEZT_KEYTYPE_EXTREME, "EXTREME", 0, "Extreme", ""},
- {0, NULL, 0, NULL, NULL}};
#ifdef RNA_RUNTIME
@@ -89,7 +82,7 @@ static PointerRNA rna_Curve_active_nurb_get(PointerRNA *ptr)
nu = BLI_findlink(cu->editnurb, cu->actnu);
if(nu)
- return rna_pointer_inherit_refine(ptr, &RNA_Nurb, nu);
+ return rna_pointer_inherit_refine(ptr, &RNA_Spline, nu);
return rna_pointer_inherit_refine(ptr, NULL, NULL);
}
@@ -332,7 +325,7 @@ static void rna_def_bpoint(BlenderRNA *brna)
srna= RNA_def_struct(brna, "SplinePoint", NULL);
RNA_def_struct_sdna(srna, "BPoint");
- RNA_def_struct_ui_text(srna, "SplinePoint", "Spline point without handles.");
+ RNA_def_struct_ui_text(srna, "SplinePoint", "Spline point without handles");
/* Boolean values */
prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE);
@@ -361,7 +354,7 @@ static void rna_def_bpoint(BlenderRNA *brna)
prop= RNA_def_property(srna, "tilt", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "alfa");
/*RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);*/
- RNA_def_property_ui_text(prop, "Tilt", "Tilt in 3d View");
+ RNA_def_property_ui_text(prop, "Tilt", "Tilt in 3D View");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "weight_softbody", PROP_FLOAT, PROP_NONE);
@@ -385,7 +378,7 @@ static void rna_def_beztriple(BlenderRNA *brna)
srna= RNA_def_struct(brna, "BezierSplinePoint", NULL);
RNA_def_struct_sdna(srna, "BezTriple");
- RNA_def_struct_ui_text(srna, "Bezier Curve Point", "Bezier curve point with two handles.");
+ RNA_def_struct_ui_text(srna, "Bezier Curve Point", "Bezier curve point with two handles");
/* Boolean values */
prop= RNA_def_property(srna, "selected_handle1", PROP_BOOLEAN, PROP_NONE);
@@ -421,18 +414,6 @@ static void rna_def_beztriple(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Handle 2 Type", "Handle types");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "interpolation", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "ipo");
- 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...
-
/* Vector values */
prop= RNA_def_property(srna, "handle1", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_array(prop, 3);
@@ -456,7 +437,7 @@ static void rna_def_beztriple(BlenderRNA *brna)
prop= RNA_def_property(srna, "tilt", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "alfa");
/*RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);*/
- RNA_def_property_ui_text(prop, "Tilt", "Tilt in 3d View");
+ RNA_def_property_ui_text(prop, "Tilt", "Tilt in 3D View");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "weight", PROP_FLOAT, PROP_NONE);
@@ -479,34 +460,34 @@ static void rna_def_path(BlenderRNA *brna, StructRNA *srna)
/* number values */
prop= RNA_def_property(srna, "path_length", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "pathlen");
- RNA_def_property_range(prop, 1, 32767);
- RNA_def_property_ui_text(prop, "Path Length", "If no speed IPO was set, the length of path in frames.");
+ RNA_def_property_range(prop, 1, MAXFRAME);
+ RNA_def_property_ui_text(prop, "Path Length", "The number of frames that are needed to traverse the path, defining the maximum value for the 'Evaluation Time' setting");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
/* flags */
prop= RNA_def_property(srna, "use_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_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);
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_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);
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_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);
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_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");
prop= RNA_def_property(srna, "use_radius", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_PATH_RADIUS);
- RNA_def_property_ui_text(prop, "Radius", "Option for paths: apply the curve radius with path following it and deforming.");
+ RNA_def_property_ui_text(prop, "Radius", "Option for paths: apply the curve radius with path following it and deforming");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
}
@@ -517,7 +498,7 @@ static void rna_def_nurbs(BlenderRNA *brna, StructRNA *srna)
/* flags */
prop= RNA_def_property(srna, "uv_orco", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_UV_ORCO);
- RNA_def_property_ui_text(prop, "UV Orco", "Forces to use UV coordinates for texture mapping 'orco'.");
+ RNA_def_property_ui_text(prop, "UV Orco", "Forces to use UV coordinates for texture mapping 'orco'");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "vertex_normal_flip", PROP_BOOLEAN, PROP_NONE);
@@ -541,7 +522,7 @@ static void rna_def_font(BlenderRNA *brna, StructRNA *srna)
/* Enums */
prop= RNA_def_property(srna, "spacemode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_align_items);
- RNA_def_property_ui_text(prop, "Text Align", "Text align from the object center.");
+ RNA_def_property_ui_text(prop, "Text Align", "Text align from the object center");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
/* number values */
@@ -628,7 +609,7 @@ static void rna_def_font(BlenderRNA *brna, StructRNA *srna)
prop= RNA_def_property(srna, "text_on_curve", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "textoncurve");
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Text on Curve", "Curve deforming text object.");
+ RNA_def_property_ui_text(prop, "Text on Curve", "Curve deforming text object");
RNA_def_property_update(prop, 0, "rna_Curve_update_deps");
prop= RNA_def_property(srna, "font", PROP_POINTER, PROP_NONE);
@@ -639,13 +620,13 @@ static void rna_def_font(BlenderRNA *brna, StructRNA *srna)
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.");
+ RNA_def_property_ui_text(prop, "Edit Format", "Editing settings character formatting");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
/* flags */
prop= RNA_def_property(srna, "fast", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_FAST);
- RNA_def_property_ui_text(prop, "Fast", "Don't fill polygons while editing.");
+ RNA_def_property_ui_text(prop, "Fast", "Don't fill polygons while editing");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
}
@@ -655,7 +636,7 @@ static void rna_def_textbox(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "TextBox", NULL);
- RNA_def_struct_ui_text(srna, "Text Box", "Text bounding box for layout.");
+ RNA_def_struct_ui_text(srna, "Text Box", "Text bounding box for layout");
/* number values */
prop= RNA_def_property(srna, "x", PROP_FLOAT, PROP_NONE);
@@ -690,7 +671,7 @@ static void rna_def_charinfo(BlenderRNA *brna)
srna= RNA_def_struct(brna, "TextCharacterFormat", NULL);
RNA_def_struct_sdna(srna, "CharInfo");
- RNA_def_struct_ui_text(srna, "Text Character Format", "Text character formatting settings.");
+ RNA_def_struct_ui_text(srna, "Text Character Format", "Text character formatting settings");
/* flags */
prop= RNA_def_property(srna, "style", PROP_BOOLEAN, PROP_NONE);
@@ -725,7 +706,7 @@ static void rna_def_surface(BlenderRNA *brna)
srna= RNA_def_struct(brna, "SurfaceCurve", "Curve");
RNA_def_struct_sdna(srna, "Curve");
- RNA_def_struct_ui_text(srna, "Surface Curve", "Curve datablock used for storing surfaces.");
+ RNA_def_struct_ui_text(srna, "Surface Curve", "Curve datablock used for storing surfaces");
RNA_def_struct_ui_icon(srna, ICON_SURFACE_DATA);
rna_def_nurbs(brna, srna);
@@ -737,7 +718,7 @@ static void rna_def_text(BlenderRNA *brna)
srna= RNA_def_struct(brna, "TextCurve", "Curve");
RNA_def_struct_sdna(srna, "Curve");
- RNA_def_struct_ui_text(srna, "Text Curve", "Curve datablock used for storing text.");
+ RNA_def_struct_ui_text(srna, "Text Curve", "Curve datablock used for storing text");
RNA_def_struct_ui_icon(srna, ICON_FONT_DATA);
rna_def_font(brna, srna);
@@ -757,11 +738,11 @@ static void rna_def_curve(BlenderRNA *brna)
static const EnumPropertyItem curve_axis_items[]= {
{0, "2D", 0, "2D", "Clamp the Z axis of of the curve"},
- {CU_3D, "3D", 0, "3D", "Allow editing on the Z axis of this curve, also alows tilt and curve radius to be used."},
+ {CU_3D, "3D", 0, "3D", "Allow editing on the Z axis of this curve, also alows tilt and curve radius to be used"},
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "Curve", "ID");
- RNA_def_struct_ui_text(srna, "Curve", "Curve datablock storing curves, splines and NURBS.");
+ RNA_def_struct_ui_text(srna, "Curve", "Curve datablock storing curves, splines and NURBS");
RNA_def_struct_ui_icon(srna, ICON_CURVE_DATA);
RNA_def_struct_refine_func(srna, "rna_Curve_refine");
@@ -774,23 +755,23 @@ static void rna_def_curve(BlenderRNA *brna)
prop= RNA_def_property(srna, "splines", 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.");
+ RNA_def_property_struct_type(prop, "Spline");
+ 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_struct_type(prop, "Spline");
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_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_ui_text(prop, "Draw Normals", "Display 3D curve normals in editmode");
RNA_def_property_update(prop, NC_GEOM|ND_DATA, NULL);
rna_def_path(brna, srna);
@@ -800,66 +781,71 @@ static void rna_def_curve(BlenderRNA *brna)
RNA_def_property_int_sdna(prop, NULL, "bevresol");
RNA_def_property_range(prop, 0, 32);
RNA_def_property_ui_range(prop, 0, 32, 1.0, 0);
- RNA_def_property_ui_text(prop, "Bevel Resolution", "Bevel resolution when depth is non-zero and no specific bevel object has been defined.");
+ RNA_def_property_ui_text(prop, "Bevel Resolution", "Bevel resolution when depth is non-zero and no specific bevel object has been defined");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "width", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "width");
RNA_def_property_ui_range(prop, 0, 2.0, 0.1, 0);
- RNA_def_property_ui_text(prop, "Width", "Scale the original width (1.0) based on given factor.");
+ RNA_def_property_ui_text(prop, "Width", "Scale the original width (1.0) based on given factor");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "extrude", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ext1");
RNA_def_property_ui_range(prop, 0, 100.0, 0.1, 0);
- RNA_def_property_ui_text(prop, "Extrude", "Amount of curve extrusion when not using a bevel object.");
+ RNA_def_property_range(prop, 0.0, FLT_MAX);
+ RNA_def_property_ui_text(prop, "Extrude", "Amount of curve extrusion when not using a bevel object");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "bevel_depth", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ext2");
RNA_def_property_ui_range(prop, 0, 100.0, 0.1, 0);
- RNA_def_property_ui_text(prop, "Bevel Depth", "Bevel depth when not using a bevel object.");
+ RNA_def_property_ui_text(prop, "Bevel Depth", "Bevel depth when not using a bevel object");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "resolution_u", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "resolu");
- RNA_def_property_ui_range(prop, 1, 1024, 1, 0);
- RNA_def_property_ui_text(prop, "Resolution U", "Surface resolution in U direction.");
+ RNA_def_property_range(prop, 1, INT_MAX);
+ RNA_def_property_ui_range(prop, 1, 64, 1, 0);
+ RNA_def_property_ui_text(prop, "Resolution U", "Surface resolution in U direction");
RNA_def_property_update(prop, 0, "rna_Curve_resolution_u_update_data");
prop= RNA_def_property(srna, "resolution_v", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "resolv");
- RNA_def_property_ui_range(prop, 1, 1024, 1, 0);
- RNA_def_property_ui_text(prop, "Resolution V", "Surface resolution in V direction.");
+ RNA_def_property_ui_range(prop, 1, 64, 1, 0);
+ RNA_def_property_range(prop, 1, INT_MAX);
+ RNA_def_property_ui_text(prop, "Resolution V", "Surface resolution in V direction");
RNA_def_property_update(prop, 0, "rna_Curve_resolution_v_update_data");
prop= RNA_def_property(srna, "render_resolution_u", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "resolu_ren");
- RNA_def_property_ui_range(prop, 0, 1024, 1, 0);
- RNA_def_property_ui_text(prop, "Render Resolution U", "Surface resolution in U direction used while rendering. Zero skips this property.");
+ RNA_def_property_range(prop, 0, INT_MAX);
+ RNA_def_property_ui_range(prop, 1, 64, 1, 0);
+ RNA_def_property_ui_text(prop, "Render Resolution U", "Surface resolution in U direction used while rendering. Zero skips this property");
prop= RNA_def_property(srna, "render_resolution_v", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "resolv_ren");
- RNA_def_property_ui_range(prop, 0, 1024, 1, 0);
- RNA_def_property_ui_text(prop, "Render Resolution V", "Surface resolution in V direction used while rendering. Zero skips this property.");
+ RNA_def_property_ui_range(prop, 1, 64, 1, 0);
+ RNA_def_property_range(prop, 0, INT_MAX);
+ RNA_def_property_ui_text(prop, "Render Resolution V", "Surface resolution in V direction used while rendering. Zero skips this property");
prop= RNA_def_property(srna, "eval_time", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ctime");
- RNA_def_property_ui_text(prop, "Evaluation Time", "Parametric position along the length of the curve that Objects 'following' it should be at.");
+ RNA_def_property_ui_text(prop, "Evaluation Time", "Parametric position along the length of the curve that Objects 'following' it should be at. Position is evaluated by dividing by the 'Path Length' value");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
/* pointers */
prop= RNA_def_property(srna, "bevel_object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "bevobj");
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Bevel Object", "Curve object name that defines the bevel shape.");
+ RNA_def_property_ui_text(prop, "Bevel Object", "Curve object name that defines the bevel shape");
RNA_def_property_update(prop, 0, "rna_Curve_update_deps");
prop= RNA_def_property(srna, "taper_object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "taperobj");
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Taper Object", "Curve object name that defines the taper (width).");
+ RNA_def_property_ui_text(prop, "Taper Object", "Curve object name that defines the taper (width)");
RNA_def_property_update(prop, 0, "rna_Curve_update_deps");
/* Flags */
@@ -868,23 +854,23 @@ static void rna_def_curve(BlenderRNA *brna)
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
RNA_def_property_enum_items(prop, curve_axis_items);
RNA_def_property_enum_funcs(prop, NULL, "rna_Curve_dimension_set", NULL);
- RNA_def_property_ui_text(prop, "Dimensions", "Select 2D or 3D curve type.");
+ RNA_def_property_ui_text(prop, "Dimensions", "Select 2D or 3D curve type");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "front", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_FRONT);
- RNA_def_property_ui_text(prop, "Front", "Draw filled front for extruded/beveled curves.");
+ RNA_def_property_ui_text(prop, "Front", "Draw filled front for extruded/beveled curves");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "back", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_BACK);
- RNA_def_property_ui_text(prop, "Back", "Draw filled back for extruded/beveled curves.");
+ 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, "twist_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "twist_mode");
RNA_def_property_enum_items(prop, curve_twist_mode_items);
- RNA_def_property_ui_text(prop, "Twist Method", "The type of tilt calculation for 3D Curves.");
+ RNA_def_property_ui_text(prop, "Twist Method", "The type of tilt calculation for 3D Curves");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
// XXX - would be nice to have a better way to do this, only add for testing.
@@ -894,12 +880,6 @@ static void rna_def_curve(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Twist Smooth", "Smoothing iteration for tangents");
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.");
- RNA_def_property_update(prop, 0, "rna_Curve_update_data");
}
static void rna_def_curve_nurb(BlenderRNA *brna)
@@ -922,38 +902,39 @@ static void rna_def_curve_nurb(BlenderRNA *brna)
StructRNA *srna;
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.");
+ srna= RNA_def_struct(brna, "Spline", NULL);
+ RNA_def_struct_sdna(srna, "Nurb");
+ RNA_def_struct_ui_text(srna, "Spline", "Element of a curve, either Nurbs, 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, "SplinePoint");
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);
- 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 that make up this poly or nurbs spline");
prop= RNA_def_property(srna, "bezier_points", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "BezierSplinePoint");
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 for bezier curves only");
prop= RNA_def_property(srna, "tilt_interpolation", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "tilt_interp");
RNA_def_property_enum_items(prop, spline_interpolation_items);
- RNA_def_property_ui_text(prop, "Tilt Interpolation", "The type of tilt interpolation for 3D, Bezier curves.");
+ RNA_def_property_ui_text(prop, "Tilt Interpolation", "The type of tilt interpolation for 3D, Bezier curves");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "radius_interpolation", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "radius_interp");
RNA_def_property_enum_items(prop, spline_interpolation_items);
- RNA_def_property_ui_text(prop, "Radius Interpolation", "The type of radius interpolation for Bezier curves.");
+ 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_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);
@@ -984,57 +965,59 @@ static void rna_def_curve_nurb(BlenderRNA *brna)
prop= RNA_def_property(srna, "resolution_u", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "resolu");
- RNA_def_property_range(prop, 1, 1024);
+ RNA_def_property_range(prop, 1, INT_MAX);
+ RNA_def_property_ui_range(prop, 1, 64, 1, 0);
RNA_def_property_ui_text(prop, "Resolution U", "Curve or Surface subdivisions per segment");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "resolution_v", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "resolv");
- RNA_def_property_range(prop, 1, 1024);
+ RNA_def_property_range(prop, 1, INT_MAX);
+ RNA_def_property_ui_range(prop, 1, 64, 1, 0);
RNA_def_property_ui_text(prop, "Resolution V", "Surface subdivisions per segment");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
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_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 */
prop= RNA_def_property(srna, "cyclic_v", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flagv", CU_CYCLIC);
- RNA_def_property_ui_text(prop, "Cyclic V", "Make this surface a closed loop in the V direction.");
+ RNA_def_property_ui_text(prop, "Cyclic V", "Make this surface a closed loop in the V direction");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
/* Note, endpoint and bezier flags should never be on at the same time! */
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_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");
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_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");
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_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");
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_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");
prop= RNA_def_property(srna, "smooth", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_SMOOTH);
- RNA_def_property_ui_text(prop, "Smooth", "Smooth the normals of the surface or beveled curve.");
+ RNA_def_property_ui_text(prop, "Smooth", "Smooth the normals of the surface or beveled curve");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "hide", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "hide", 1);
- RNA_def_property_ui_text(prop, "Hide", "Hide this curve in editmode.");
+ RNA_def_property_ui_text(prop, "Hide", "Hide this curve in editmode");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "material_index", PROP_INT, PROP_UNSIGNED);
diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c
index ed10c0819fd..7629387d4fe 100644
--- a/source/blender/makesrna/intern/rna_define.c
+++ b/source/blender/makesrna/intern/rna_define.c
@@ -15,7 +15,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor(s): Blender Foundation (2008).
*
@@ -478,7 +478,7 @@ void RNA_struct_free(BlenderRNA *brna, StructRNA *srna)
if(srna->flag & STRUCT_RUNTIME) {
if(RNA_struct_py_type_get(srna)) {
- fprintf(stderr, "StructRNA \"%s\" freed while holdng a python reference\n", srna->name);
+ fprintf(stderr, "StructRNA \"%s\" freed while holding a python reference\n", srna->name);
}
}
@@ -650,7 +650,7 @@ StructRNA *RNA_def_struct(BlenderRNA *brna, const char *identifier, const char *
/* define some builtin properties */
prop= RNA_def_property(&srna->cont, "rna_properties", PROP_COLLECTION, PROP_NONE);
RNA_def_property_flag(prop, PROP_BUILTIN);
- RNA_def_property_ui_text(prop, "Properties", "RNA property collection.");
+ RNA_def_property_ui_text(prop, "Properties", "RNA property collection");
if(DefRNA.preprocess) {
RNA_def_property_struct_type(prop, "Property");
@@ -668,7 +668,7 @@ StructRNA *RNA_def_struct(BlenderRNA *brna, const char *identifier, const char *
prop= RNA_def_property(&srna->cont, "rna_type", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_HIDDEN);
- RNA_def_property_ui_text(prop, "RNA", "RNA type definition.");
+ RNA_def_property_ui_text(prop, "RNA", "RNA type definition");
if(DefRNA.preprocess) {
RNA_def_property_struct_type(prop, "Struct");
@@ -938,7 +938,7 @@ PropertyRNA *RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier
prop->flag= PROP_EDITABLE;
if(type != PROP_STRING)
- prop->flag |= PROP_ANIMATEABLE;
+ prop->flag |= PROP_ANIMATABLE;
}
if(DefRNA.preprocess) {
@@ -1703,6 +1703,7 @@ void RNA_def_property_collection_sdna(PropertyRNA *prop, const char *structname,
else {
dp->dnalengthstructname= structname;
dp->dnalengthname= lengthpropname;
+ prop->totarraylength= 0;
}
cprop->next= (PropCollectionNextFunc)"rna_iterator_array_next";
@@ -2419,17 +2420,26 @@ FunctionRNA *RNA_def_function_runtime(StructRNA *srna, const char *identifier, C
return func;
}
-/* C return value only!, multiple rna returns can be done with RNA_def_function_return_mark */
+/* C return value only!, multiple RNA returns can be done with RNA_def_function_output */
void RNA_def_function_return(FunctionRNA *func, PropertyRNA *ret)
{
+ if (ret->flag & PROP_DYNAMIC) {
+ fprintf(stderr, "RNA_def_function_return: %s.%s, dynamic values are not allowed as strict returns, use RNA_def_function_output instead.\n", func->identifier, ret->identifier);
+ return;
+ }
+ else if (ret->arraydimension) {
+ fprintf(stderr, "RNA_def_function_return: %s.%s, arrays are not allowed as strict returns, use RNA_def_function_output instead.\n", func->identifier, ret->identifier);
+ return;
+ }
+
func->c_ret= ret;
- RNA_def_function_return_mark(func, ret);
+ RNA_def_function_output(func, ret);
}
-void RNA_def_function_return_mark(FunctionRNA *func, PropertyRNA *ret)
+void RNA_def_function_output(FunctionRNA *func, PropertyRNA *ret)
{
- ret->flag|=PROP_RETURN;
+ ret->flag|= PROP_OUTPUT;
}
void RNA_def_function_flag(FunctionRNA *func, int flag)
@@ -2448,6 +2458,7 @@ int rna_parameter_size(PropertyRNA *parm)
int len= parm->totarraylength; /* only supports fixed length at the moment */
if(len > 0) {
+ /* XXX in other parts is mentioned that strings can be dynamic as well */
if (parm->flag & PROP_DYNAMIC)
return sizeof(void *);
@@ -2497,6 +2508,18 @@ int rna_parameter_size(PropertyRNA *parm)
return sizeof(void *);
}
+/* this function returns the size of the memory allocated for the parameter,
+ useful for instance for memory alignment or for storing additional information */
+int rna_parameter_size_alloc(PropertyRNA *parm)
+{
+ int size = rna_parameter_size(parm);
+
+ if (parm->flag & PROP_DYNAMIC)
+ size+= sizeof(int);
+
+ return size;
+}
+
/* Dynamic Enums */
void RNA_enum_item_add(EnumPropertyItem **items, int *totitem, EnumPropertyItem *item)
diff --git a/source/blender/makesrna/intern/rna_fcurve.c b/source/blender/makesrna/intern/rna_fcurve.c
index b6b05eb4896..d5d28ac83ae 100644
--- a/source/blender/makesrna/intern/rna_fcurve.c
+++ b/source/blender/makesrna/intern/rna_fcurve.c
@@ -15,7 +15,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor(s): Blender Foundation (2009), Joshua Leung
*
@@ -37,6 +37,8 @@
#include "MEM_guardedalloc.h"
+#include "BLI_math.h"
+
#include "WM_types.h"
EnumPropertyItem fmodifier_type_items[] = {
@@ -51,6 +53,12 @@ EnumPropertyItem fmodifier_type_items[] = {
{FMODIFIER_TYPE_LIMITS, "LIMITS", 0, "Limits", ""},
{0, NULL, 0, NULL, NULL}};
+EnumPropertyItem beztriple_keyframe_type_items[] = {
+ {BEZT_KEYTYPE_KEYFRAME, "KEYFRAME", 0, "Keyframe", ""},
+ {BEZT_KEYTYPE_BREAKDOWN, "BREAKDOWN", 0, "Breakdown", ""},
+ {BEZT_KEYTYPE_EXTREME, "EXTREME", 0, "Extreme", ""},
+ {0, NULL, 0, NULL, NULL}};
+
#ifdef RNA_RUNTIME
#include "WM_api.h"
@@ -152,12 +160,31 @@ static int rna_DriverTarget_id_editable(PointerRNA *ptr)
return (dtar->idtype)? PROP_EDITABLE : 0;
}
+static int rna_DriverTarget_id_type_editable(PointerRNA *ptr)
+{
+ DriverTarget *dtar= (DriverTarget*)ptr->data;
+
+ /* when the id-type can only be object, don't allow editing
+ * otherwise, there may be strange crashes
+ */
+ return ((dtar->flag & DTAR_FLAG_ID_OB_ONLY) == 0);
+}
+
static void rna_DriverTarget_id_type_set(PointerRNA *ptr, int value)
{
DriverTarget *data= (DriverTarget*)(ptr->data);
- /* set the driver type, then clear the id-block if the type is invalid */
- data->idtype= value;
+ /* check if ID-type is settable */
+ if ((data->flag & DTAR_FLAG_ID_OB_ONLY) == 0) {
+ /* change ID-type to the new type */
+ data->idtype= value;
+ }
+ else {
+ /* make sure ID-type is Object */
+ data->idtype= ID_OB;
+ }
+
+ /* clear the id-block if the type is invalid */
if ((data->id) && (GS(data->id->name) != data->idtype))
data->id= NULL;
}
@@ -206,6 +233,56 @@ static void rna_DriverVariable_type_set(PointerRNA *ptr, int value)
/* ****************************** */
+static void rna_FKeyframe_handle1_get(PointerRNA *ptr, float *values)
+{
+ BezTriple *bezt= (BezTriple*)ptr->data;
+
+ values[0]= bezt->vec[0][0];
+ values[1]= bezt->vec[0][1];
+}
+
+static void rna_FKeyframe_handle1_set(PointerRNA *ptr, const float *values)
+{
+ BezTriple *bezt= (BezTriple*)ptr->data;
+
+ bezt->vec[0][0]= values[0];
+ bezt->vec[0][1]= values[1];
+}
+
+static void rna_FKeyframe_handle2_get(PointerRNA *ptr, float *values)
+{
+ BezTriple *bezt= (BezTriple*)ptr->data;
+
+ values[0]= bezt->vec[2][0];
+ values[1]= bezt->vec[2][1];
+}
+
+static void rna_FKeyframe_handle2_set(PointerRNA *ptr, const float *values)
+{
+ BezTriple *bezt= (BezTriple*)ptr->data;
+
+ bezt->vec[2][0]= values[0];
+ bezt->vec[2][1]= values[1];
+}
+
+static void rna_FKeyframe_ctrlpoint_get(PointerRNA *ptr, float *values)
+{
+ BezTriple *bezt= (BezTriple*)ptr->data;
+
+ values[0]= bezt->vec[1][0];
+ values[1]= bezt->vec[1][1];
+}
+
+static void rna_FKeyframe_ctrlpoint_set(PointerRNA *ptr, const float *values)
+{
+ BezTriple *bezt= (BezTriple*)ptr->data;
+
+ bezt->vec[1][0]= values[0];
+ bezt->vec[1][1]= values[1];
+}
+
+/* ****************************** */
+
static void rna_FCurve_RnaPath_get(PointerRNA *ptr, char *value)
{
FCurve *fcu= (FCurve *)ptr->data;
@@ -339,19 +416,19 @@ static void rna_def_fmodifier_generator(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "FModifierGenerator", "FModifier");
- RNA_def_struct_ui_text(srna, "Generator F-Curve Modifier", "Deterministically generates values for the modified F-Curve.");
+ RNA_def_struct_ui_text(srna, "Generator F-Curve Modifier", "Deterministically generates values for the modified F-Curve");
RNA_def_struct_sdna_from(srna, "FMod_Generator", "data");
/* define common props */
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_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, generator_mode_items);
- RNA_def_property_ui_text(prop, "Mode", "Type of generator to use.");
+ RNA_def_property_ui_text(prop, "Mode", "Type of generator to use");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
@@ -367,7 +444,7 @@ static void rna_def_fmodifier_generator(BlenderRNA *brna)
RNA_def_property_flag(prop, PROP_DYNAMIC);
RNA_def_property_dynamic_array_funcs(prop, "rna_FModifierGenerator_coefficients_get_length");
RNA_def_property_float_funcs(prop, "rna_FModifierGenerator_coefficients_get", "rna_FModifierGenerator_coefficients_set", NULL);
- RNA_def_property_ui_text(prop, "Coefficients", "Coefficients for 'x' (starting from lowest power of x^0).");
+ RNA_def_property_ui_text(prop, "Coefficients", "Coefficients for 'x' (starting from lowest power of x^0)");
}
/* --------- */
@@ -387,36 +464,36 @@ static void rna_def_fmodifier_function_generator(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "FModifierFunctionGenerator", "FModifier");
- RNA_def_struct_ui_text(srna, "Built-In Function F-Modifier", "Generates values using a Built-In Function.");
+ RNA_def_struct_ui_text(srna, "Built-In Function F-Modifier", "Generates values using a Built-In Function");
RNA_def_struct_sdna_from(srna, "FMod_FunctionGenerator", "data");
/* 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_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_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_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_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_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_ui_text(prop, "Type", "Type of built-in function to use");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
}
@@ -428,7 +505,7 @@ static void rna_def_fmodifier_envelope_ctrl(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "FModifierEnvelopeControlPoint", NULL);
- RNA_def_struct_ui_text(srna, "Envelope Control Point", "Control point for envelope F-Modifier.");
+ RNA_def_struct_ui_text(srna, "Envelope Control Point", "Control point for envelope F-Modifier");
RNA_def_struct_sdna(srna, "FCM_EnvelopeData");
/* min/max extents
@@ -437,18 +514,18 @@ 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_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_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_ui_text(prop, "Frame", "Frame this control-point occurs on");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
// TODO:
@@ -461,29 +538,29 @@ static void rna_def_fmodifier_envelope(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "FModifierEnvelope", "FModifier");
- RNA_def_struct_ui_text(srna, "Envelope F-Modifier", "Scales the values of the modified F-Curve.");
+ RNA_def_struct_ui_text(srna, "Envelope F-Modifier", "Scales the values of the modified F-Curve");
RNA_def_struct_sdna_from(srna, "FMod_Envelope", "data");
/* Collections */
prop= RNA_def_property(srna, "control_points", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "data", "totvert");
RNA_def_property_struct_type(prop, "FModifierEnvelopeControlPoint");
- RNA_def_property_ui_text(prop, "Control Points", "Control points defining the shape of the envelope.");
+ RNA_def_property_ui_text(prop, "Control Points", "Control points defining the shape of the envelope");
/* Range Settings */
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_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_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_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);
}
@@ -495,20 +572,20 @@ static void rna_def_fmodifier_cycles(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem prop_type_items[] = {
- {FCM_EXTRAPOLATE_NONE, "NONE", 0, "No Cycles", "Don't do anything."},
- {FCM_EXTRAPOLATE_CYCLIC, "REPEAT", 0, "Repeat Motion", "Repeat keyframe range as-is."},
+ {FCM_EXTRAPOLATE_NONE, "NONE", 0, "No Cycles", "Don't do anything"},
+ {FCM_EXTRAPOLATE_CYCLIC, "REPEAT", 0, "Repeat Motion", "Repeat keyframe range as-is"},
{FCM_EXTRAPOLATE_CYCLIC_OFFSET, "REPEAT_OFFSET", 0, "Repeat with Offset", "Repeat keyframe range, but with offset based on gradient between values"},
{FCM_EXTRAPOLATE_MIRROR, "MIRROR", 0, "Repeat Mirrored", "Alternate between forward and reverse playback of keyframe range"},
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "FModifierCycles", "FModifier");
- RNA_def_struct_ui_text(srna, "Cycles F-Modifier", "Repeats the values of the modified F-Curve.");
+ RNA_def_struct_ui_text(srna, "Cycles F-Modifier", "Repeats the values of the modified F-Curve");
RNA_def_struct_sdna_from(srna, "FMod_Cycles", "data");
/* before */
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_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);
@@ -518,7 +595,7 @@ static void rna_def_fmodifier_cycles(BlenderRNA *brna)
/* 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_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);
@@ -534,7 +611,7 @@ static void rna_def_fmodifier_python(BlenderRNA *brna)
//PropertyRNA *prop;
srna= RNA_def_struct(brna, "FModifierPython", "FModifier");
- RNA_def_struct_ui_text(srna, "Python F-Modifier", "Performs user-defined operation on the modified F-Curve.");
+ RNA_def_struct_ui_text(srna, "Python F-Modifier", "Performs user-defined operation on the modified F-Curve");
RNA_def_struct_sdna_from(srna, "FMod_Python", "data");
}
@@ -546,47 +623,47 @@ static void rna_def_fmodifier_limits(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "FModifierLimits", "FModifier");
- RNA_def_struct_ui_text(srna, "Limits F-Modifier", "Limits the time/value ranges of the modified F-Curve.");
+ RNA_def_struct_ui_text(srna, "Limits F-Modifier", "Limits the time/value ranges of the modified F-Curve");
RNA_def_struct_sdna_from(srna, "FMod_Limits", "data");
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_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_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_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_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_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_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_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_ui_text(prop, "Maximum Y", "Highest Y value to allow");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
}
@@ -605,12 +682,12 @@ static void rna_def_fmodifier_noise(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "FModifierNoise", "FModifier");
- RNA_def_struct_ui_text(srna, "Noise F-Modifier", "Gives randomness to the modified F-Curve.");
+ RNA_def_struct_ui_text(srna, "Noise F-Modifier", "Gives randomness to the modified F-Curve");
RNA_def_struct_sdna_from(srna, "FMod_Noise", "data");
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_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);
@@ -646,13 +723,13 @@ static void rna_def_fmodifier(BlenderRNA *brna)
/* base struct definition */
srna= RNA_def_struct(brna, "FModifier", NULL);
RNA_def_struct_refine_func(srna, "rna_FModifierType_refine");
- RNA_def_struct_ui_text(srna, "F-Modifier", "Modifier for values of F-Curve.");
+ RNA_def_struct_ui_text(srna, "F-Modifier", "Modifier for values of F-Curve");
#if 0 // XXX not used yet
/* name */
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_struct_name_property(srna, prop);
- RNA_def_property_ui_text(prop, "Name", "Short description of F-Curve Modifier.");
+ RNA_def_property_ui_text(prop, "Name", "Short description of F-Curve Modifier");
#endif // XXX not used yet
/* type */
@@ -664,20 +741,19 @@ static void rna_def_fmodifier(BlenderRNA *brna)
/* settings */
prop= RNA_def_property(srna, "expanded", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", FMODIFIER_FLAG_EXPANDED);
- RNA_def_property_ui_text(prop, "Expanded", "F-Curve Modifier's panel is expanded in UI.");
+ RNA_def_property_ui_text(prop, "Expanded", "F-Curve Modifier's panel is expanded in UI");
RNA_def_property_ui_icon(prop, ICON_TRIA_RIGHT, 1);
prop= RNA_def_property(srna, "muted", PROP_BOOLEAN, PROP_NONE);
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_ui_text(prop, "Muted", "F-Curve Modifier will not be evaluated");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_PROP, NULL);
RNA_def_property_ui_icon(prop, ICON_MUTE_IPO_OFF, 1);
- // 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_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...
@@ -709,7 +785,7 @@ static void rna_def_drivertarget(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "DriverTarget", NULL);
- RNA_def_struct_ui_text(srna, "Driver Target", "Source of input values for driver variables.");
+ RNA_def_struct_ui_text(srna, "Driver Target", "Source of input values for driver variables");
/* Target Properties - ID-block to Drive */
prop= RNA_def_property(srna, "id", PROP_POINTER, PROP_NONE);
@@ -724,31 +800,31 @@ static void rna_def_drivertarget(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "idtype");
RNA_def_property_enum_items(prop, id_type_items);
RNA_def_property_enum_default(prop, ID_OB);
- // XXX need to add an 'editable func' for this, in the case where certain flags are set already...
RNA_def_property_enum_funcs(prop, NULL, "rna_DriverTarget_id_type_set", NULL);
- RNA_def_property_ui_text(prop, "ID Type", "Type of ID-block that can be used.");
+ RNA_def_property_editable_func(prop, "rna_DriverTarget_id_type_editable");
+ RNA_def_property_ui_text(prop, "ID Type", "Type of ID-block that can be used");
RNA_def_property_update(prop, 0, "rna_DriverTarget_update_data");
/* Target Properties - Property to Drive */
prop= RNA_def_property(srna, "data_path", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_DriverTarget_RnaPath_get", "rna_DriverTarget_RnaPath_length", "rna_DriverTarget_RnaPath_set");
- RNA_def_property_ui_text(prop, "Data Path", "RNA Path (from ID-block) to property used.");
+ RNA_def_property_ui_text(prop, "Data Path", "RNA Path (from ID-block) to property used");
RNA_def_property_update(prop, 0, "rna_DriverTarget_update_data");
prop= RNA_def_property(srna, "bone_target", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "pchan_name");
- RNA_def_property_ui_text(prop, "Bone Name", "Name of PoseBone to use as target.");
+ RNA_def_property_ui_text(prop, "Bone Name", "Name of PoseBone to use as target");
RNA_def_property_update(prop, 0, "rna_DriverTarget_update_data");
prop= RNA_def_property(srna, "transform_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "transChan");
RNA_def_property_enum_items(prop, prop_trans_chan_items);
- RNA_def_property_ui_text(prop, "Type", "Driver variable type.");
+ RNA_def_property_ui_text(prop, "Type", "Driver variable type");
RNA_def_property_update(prop, 0, "rna_DriverTarget_update_data");
prop= RNA_def_property(srna, "use_local_space_transforms", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", DTAR_FLAG_LOCALSPACE);
- RNA_def_property_ui_text(prop, "Local Space", "Use transforms in Local Space (as opposed to the worldspace default).");
+ RNA_def_property_ui_text(prop, "Local Space", "Use transforms in Local Space (as opposed to the worldspace default)");
RNA_def_property_update(prop, 0, "rna_DriverTarget_update_data");
}
@@ -767,7 +843,7 @@ static void rna_def_drivervar(BlenderRNA *brna)
srna= RNA_def_struct(brna, "DriverVariable", NULL);
RNA_def_struct_sdna(srna, "DriverVar");
- RNA_def_struct_ui_text(srna, "Driver Variable", "Variable from some source/target for driver relationship.");
+ RNA_def_struct_ui_text(srna, "Driver Variable", "Variable from some source/target for driver relationship");
/* Variable Name */
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
@@ -779,7 +855,7 @@ static void rna_def_drivervar(BlenderRNA *brna)
prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_type_items);
RNA_def_property_enum_funcs(prop, NULL, "rna_DriverVariable_type_set", NULL);
- RNA_def_property_ui_text(prop, "Type", "Driver variable type.");
+ RNA_def_property_ui_text(prop, "Type", "Driver variable type");
RNA_def_property_update(prop, 0, "rna_ChannelDriver_update_data"); // XXX
/* Targets */
@@ -787,7 +863,7 @@ static void rna_def_drivervar(BlenderRNA *brna)
prop= RNA_def_property(srna, "targets", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "targets", "num_targets");
RNA_def_property_struct_type(prop, "DriverTarget");
- RNA_def_property_ui_text(prop, "Targets", "Sources of input data for evaluating this variable.");
+ RNA_def_property_ui_text(prop, "Targets", "Sources of input data for evaluating this variable");
}
@@ -803,7 +879,7 @@ static void rna_def_channeldriver_variables(BlenderRNA *brna, PropertyRNA *cprop
RNA_def_property_srna(cprop, "ChannelDriverVariables");
srna= RNA_def_struct(brna, "ChannelDriverVariables", NULL);
RNA_def_struct_sdna(srna, "ChannelDriver");
- RNA_def_struct_ui_text(srna, "ChannelDriver Variables", "Collection of channel driver Variables.");
+ RNA_def_struct_ui_text(srna, "ChannelDriver Variables", "Collection of channel driver Variables");
/* add variable */
@@ -836,26 +912,31 @@ static void rna_def_channeldriver(BlenderRNA *brna)
srna= RNA_def_struct(brna, "Driver", NULL);
RNA_def_struct_sdna(srna, "ChannelDriver");
- RNA_def_struct_ui_text(srna, "Driver", "Driver for the value of a setting based on an external value.");
+ RNA_def_struct_ui_text(srna, "Driver", "Driver for the value of a setting based on an external value");
/* Enums */
prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_type_items);
- RNA_def_property_ui_text(prop, "Type", "Driver type.");
+ RNA_def_property_ui_text(prop, "Type", "Driver type");
RNA_def_property_update(prop, 0, "rna_ChannelDriver_update_data");
/* String values */
prop= RNA_def_property(srna, "expression", PROP_STRING, PROP_NONE);
- RNA_def_property_ui_text(prop, "Expression", "Expression to use for Scripted Expression.");
+ RNA_def_property_ui_text(prop, "Expression", "Expression to use for Scripted Expression");
RNA_def_property_update(prop, 0, "rna_ChannelDriver_update_expr");
/* Collections */
prop= RNA_def_property(srna, "variables", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "variables", NULL);
RNA_def_property_struct_type(prop, "DriverVariable");
- RNA_def_property_ui_text(prop, "Variables", "Properties acting as inputs for this driver.");
+ RNA_def_property_ui_text(prop, "Variables", "Properties acting as inputs for this driver");
rna_def_channeldriver_variables(brna, prop);
+ /* Settings */
+ prop= RNA_def_property(srna, "show_debug_info", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", DRIVER_FLAG_SHOWDEBUG);
+ RNA_def_property_ui_text(prop, "Show Debug Info", "Show intermediate values for the driver calculations to allow debugging of drivers");
+
/* Functions */
RNA_api_drivers(srna);
}
@@ -869,20 +950,97 @@ static void rna_def_fpoint(BlenderRNA *brna)
srna= RNA_def_struct(brna, "FCurveSample", NULL);
RNA_def_struct_sdna(srna, "FPoint");
- RNA_def_struct_ui_text(srna, "F-Curve Sample", "Sample point for F-Curve.");
+ RNA_def_struct_ui_text(srna, "F-Curve Sample", "Sample point for F-Curve");
/* Boolean values */
prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", 1);
RNA_def_property_ui_text(prop, "Selected", "Selection status");
+ RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_SELECT, NULL);
/* Vector value */
prop= RNA_def_property(srna, "point", PROP_FLOAT, PROP_XYZ);
- RNA_def_property_array(prop, 2);
RNA_def_property_float_sdna(prop, NULL, "vec");
+ RNA_def_property_array(prop, 2);
RNA_def_property_ui_text(prop, "Point", "Point coordinates");
+ RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
}
+
+/* duplicate of BezTriple in rna_curve.c
+ * but with F-Curve specific options updates/functionality
+ */
+static void rna_def_fkeyframe(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ srna= RNA_def_struct(brna, "Keyframe", NULL);
+ RNA_def_struct_sdna(srna, "BezTriple");
+ RNA_def_struct_ui_text(srna, "Keyframe", "Bezier curve point with two handles defining a Keyframe on an F-Curve");
+
+ /* Boolean values */
+ prop= RNA_def_property(srna, "selected_handle1", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "f1", 0);
+ RNA_def_property_ui_text(prop, "Handle 1 selected", "Handle 1 selection status");
+ RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_SELECT, NULL);
+
+ prop= RNA_def_property(srna, "selected_handle2", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "f3", 0);
+ RNA_def_property_ui_text(prop, "Handle 2 selected", "Handle 2 selection status");
+ RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_SELECT, NULL);
+
+ prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "f2", 0);
+ RNA_def_property_ui_text(prop, "Selected", "Control point selection status");
+ RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_SELECT, NULL);
+
+ /* Enums */
+ prop= RNA_def_property(srna, "handle1_type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "h1");
+ RNA_def_property_enum_items(prop, beztriple_handle_type_items);
+ RNA_def_property_ui_text(prop, "Handle 1 Type", "Handle types");
+ RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_PROP, NULL);
+
+ prop= RNA_def_property(srna, "handle2_type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "h2");
+ RNA_def_property_enum_items(prop, beztriple_handle_type_items);
+ RNA_def_property_ui_text(prop, "Handle 2 Type", "Handle types");
+ RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_PROP, NULL);
+
+ prop= RNA_def_property(srna, "interpolation", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "ipo");
+ RNA_def_property_enum_items(prop, beztriple_interpolation_mode_items);
+ RNA_def_property_ui_text(prop, "Interpolation", "Interpolation method to use for segment of the curve from this Keyframe until the next Keyframe");
+ RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_PROP, NULL);
+
+ prop= RNA_def_property(srna, "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, "Type", "The type of keyframe");
+ RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_PROP, NULL);
+
+ /* Vector values */
+ prop= RNA_def_property(srna, "handle1", PROP_FLOAT, PROP_TRANSLATION);
+ RNA_def_property_array(prop, 2);
+ RNA_def_property_float_funcs(prop, "rna_FKeyframe_handle1_get", "rna_FKeyframe_handle1_set", NULL);
+ RNA_def_property_ui_text(prop, "Handle 1", "Coordinates of the first handle");
+ RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
+
+ prop= RNA_def_property(srna, "co", PROP_FLOAT, PROP_TRANSLATION);
+ RNA_def_property_array(prop, 2);
+ RNA_def_property_float_funcs(prop, "rna_FKeyframe_ctrlpoint_get", "rna_FKeyframe_ctrlpoint_set", NULL);
+ RNA_def_property_ui_text(prop, "Control Point", "Coordinates of the control point");
+ RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
+
+ prop= RNA_def_property(srna, "handle2", PROP_FLOAT, PROP_TRANSLATION);
+ RNA_def_property_array(prop, 2);
+ RNA_def_property_float_funcs(prop, "rna_FKeyframe_handle2_get", "rna_FKeyframe_handle2_set", NULL);
+ RNA_def_property_ui_text(prop, "Handle 2", "Coordinates of the second handle");
+ RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
+}
+
+
static void rna_def_fcurve_modifiers(BlenderRNA *brna, PropertyRNA *cprop)
{
/* add modifiers */
@@ -895,7 +1053,7 @@ static void rna_def_fcurve_modifiers(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_property_srna(cprop, "FCurveModifiers");
srna= RNA_def_struct(brna, "FCurveModifiers", NULL);
RNA_def_struct_sdna(srna, "FCurve");
- RNA_def_struct_ui_text(srna, "F-Curve Modifiers", "Collection of F-Curve Modifiers.");
+ RNA_def_struct_ui_text(srna, "F-Curve Modifiers", "Collection of F-Curve Modifiers");
/* Collection active property */
@@ -903,7 +1061,7 @@ static void rna_def_fcurve_modifiers(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_property_struct_type(prop, "FModifier");
RNA_def_property_pointer_funcs(prop, "rna_FCurve_active_modifier_get", "rna_FCurve_active_modifier_set", NULL);
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Active F-Curve Modifier", "Active F-Curve Modifier.");
+ RNA_def_property_ui_text(prop, "Active F-Curve Modifier", "Active F-Curve Modifier");
/* Constraint collection */
func= RNA_def_function(srna, "new", "rna_FCurve_modifiers_new");
@@ -943,7 +1101,7 @@ static void rna_def_fcurve(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "FCurve", NULL);
- RNA_def_struct_ui_text(srna, "F-Curve", "F-Curve defining values of a period of time.");
+ RNA_def_struct_ui_text(srna, "F-Curve", "F-Curve defining values of a period of time");
RNA_def_struct_ui_icon(srna, ICON_ANIM_DATA);
/* Enums */
@@ -961,29 +1119,56 @@ static void rna_def_fcurve(BlenderRNA *brna)
prop= RNA_def_property(srna, "group", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "grp");
RNA_def_property_clear_flag(prop, PROP_EDITABLE); // XXX this is not editable for now, since editing this will easily break the visible hierarchy
- RNA_def_property_ui_text(prop, "Group", "Action Group that this F-Curve belongs to.");
+ RNA_def_property_ui_text(prop, "Group", "Action Group that this F-Curve belongs to");
+ RNA_def_property_update(prop, NC_ANIMATION|ND_FCURVES_ORDER, NULL);
/* Path + Array Index */
prop= RNA_def_property(srna, "data_path", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_FCurve_RnaPath_get", "rna_FCurve_RnaPath_length", "rna_FCurve_RnaPath_set");
- RNA_def_property_ui_text(prop, "Data Path", "RNA Path to property affected by F-Curve.");
+ RNA_def_property_ui_text(prop, "Data Path", "RNA Path to property affected by F-Curve");
RNA_def_property_update(prop, NC_ANIMATION, NULL); // XXX need an update callback for this to that animation gets evaluated
prop= RNA_def_property(srna, "array_index", PROP_INT, PROP_NONE);
- RNA_def_property_ui_text(prop, "RNA Array Index", "Index to the specific property affected by F-Curve if applicable.");
+ RNA_def_property_ui_text(prop, "RNA Array Index", "Index to the specific property affected by F-Curve if applicable");
RNA_def_property_update(prop, NC_ANIMATION, NULL); // XXX need an update callback for this so that animation gets evaluated
/* Color */
prop= RNA_def_property(srna, "color_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_mode_color_items);
- RNA_def_property_ui_text(prop, "Color Mode", "Method used to determine color of F-Curve in Graph Editor.");
+ RNA_def_property_ui_text(prop, "Color Mode", "Method used to determine color of F-Curve in Graph Editor");
RNA_def_property_update(prop, NC_ANIMATION, NULL);
prop= RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "Color", "Color of the F-Curve in the Graph Editor.");
+ RNA_def_property_ui_text(prop, "Color", "Color of the F-Curve in the Graph Editor");
RNA_def_property_update(prop, NC_ANIMATION, NULL);
+ /* Flags */
+ prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", FCURVE_SELECTED);
+ RNA_def_property_ui_text(prop, "Selected", "F-Curve is selected for editing");
+ RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_SELECT, NULL);
+
+ prop= RNA_def_property(srna, "locked", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", FCURVE_PROTECTED);
+ RNA_def_property_ui_text(prop, "Locked", "F-Curve's settings cannot be edited");
+ RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN_EDIT, NULL);
+
+ prop= RNA_def_property(srna, "muted", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", FCURVE_MUTED);
+ RNA_def_property_ui_text(prop, "Muted", "F-Curve is not evaluated");
+ RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN_EDIT, NULL);
+
+ prop= RNA_def_property(srna, "auto_clamped_handles", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", FCURVE_AUTO_HANDLES);
+ RNA_def_property_ui_text(prop, "Auto Clamped Handles", "All auto-handles for F-Curve are clamped");
+ RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_PROP, NULL);
+
+ prop= RNA_def_property(srna, "visible", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", FCURVE_VISIBLE);
+ RNA_def_property_ui_text(prop, "Visible", "F-Curve and its keyframes are shown in the Graph Editor graphs");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
+
/* Collections */
prop= RNA_def_property(srna, "sampled_points", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "fpt", "totvert");
@@ -992,12 +1177,12 @@ static void rna_def_fcurve(BlenderRNA *brna)
prop= RNA_def_property(srna, "keyframe_points", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "bezt", "totvert");
- RNA_def_property_struct_type(prop, "BezierSplinePoint");
+ RNA_def_property_struct_type(prop, "Keyframe");
RNA_def_property_ui_text(prop, "Keyframes", "User-editable keyframes");
prop= RNA_def_property(srna, "modifiers", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "FModifier");
- RNA_def_property_ui_text(prop, "Modifiers", "Modifiers affecting the shape of the F-Curve.");
+ RNA_def_property_ui_text(prop, "Modifiers", "Modifiers affecting the shape of the F-Curve");
rna_def_fcurve_modifiers(brna, prop);
}
@@ -1007,7 +1192,8 @@ static void rna_def_fcurve(BlenderRNA *brna)
void RNA_def_fcurve(BlenderRNA *brna)
{
rna_def_fcurve(brna);
- rna_def_fpoint(brna);
+ rna_def_fkeyframe(brna);
+ rna_def_fpoint(brna);
rna_def_drivertarget(brna);
rna_def_drivervar(brna);
diff --git a/source/blender/makesrna/intern/rna_fcurve_api.c b/source/blender/makesrna/intern/rna_fcurve_api.c
index d066d4f63fb..2f221663540 100644
--- a/source/blender/makesrna/intern/rna_fcurve_api.c
+++ b/source/blender/makesrna/intern/rna_fcurve_api.c
@@ -13,7 +13,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* The Original Code is Copyright (C) 2009 Blender Foundation.
* All rights reserved.
diff --git a/source/blender/makesrna/intern/rna_fluidsim.c b/source/blender/makesrna/intern/rna_fluidsim.c
index 682eebddbbe..c14c7ee365b 100644
--- a/source/blender/makesrna/intern/rna_fluidsim.c
+++ b/source/blender/makesrna/intern/rna_fluidsim.c
@@ -15,7 +15,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor(s): Blender Foundation (2008).
*
@@ -166,7 +166,7 @@ static void rna_def_fluidsim_slip(StructRNA *srna)
PropertyRNA *prop;
static EnumPropertyItem slip_items[] = {
- {OB_FSBND_NOSLIP, "NOSLIP", 0, "No Slip", "Obstacle causes zero normal and tangential velocity (=sticky). Default for all. Only option for moving objects."},
+ {OB_FSBND_NOSLIP, "NOSLIP", 0, "No Slip", "Obstacle causes zero normal and tangential velocity (=sticky). Default for all. Only option for moving objects"},
{OB_FSBND_PARTSLIP, "PARTIALSLIP", 0, "Partial Slip", "Mix between no-slip and free-slip. Non moving objects only!"},
{OB_FSBND_FREESLIP, "FREESLIP", 0, "Free Slip", "Obstacle only causes zero normal velocity (=not sticky). Non moving objects only!"},
{0, NULL, 0, NULL, NULL}};
@@ -179,7 +179,7 @@ static void rna_def_fluidsim_slip(StructRNA *srna)
prop= RNA_def_property(srna, "partial_slip_factor", 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.");
+ 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");
}
static void rna_def_fluidsim_domain(BlenderRNA *brna)
@@ -188,69 +188,69 @@ static void rna_def_fluidsim_domain(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem quality_items[] = {
- {OB_FSDOM_GEOM, "GEOMETRY", 0, "Geometry", "Display geometry."},
- {OB_FSDOM_PREVIEW, "PREVIEW", 0, "Preview", "Display preview quality results."},
- {OB_FSDOM_FINAL, "FINAL", 0, "Final", "Display final quality results."},
+ {OB_FSDOM_GEOM, "GEOMETRY", 0, "Geometry", "Display geometry"},
+ {OB_FSDOM_PREVIEW, "PREVIEW", 0, "Preview", "Display preview quality results"},
+ {OB_FSDOM_FINAL, "FINAL", 0, "Final", "Display final quality results"},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem viscosity_items[] = {
- {1, "MANUAL", 0, "Manual", "Manual viscosity settings."},
- {2, "WATER", 0, "Water", "Viscosity of 1.0 * 10^-6."},
- {3, "OIL", 0, "Oil", "Viscosity of 5.0 * 10^-5."},
- {4, "HONEY", 0, "Honey", "Viscosity of 2.0 * 10^-3."},
+ {1, "MANUAL", 0, "Manual", "Manual viscosity settings"},
+ {2, "WATER", 0, "Water", "Viscosity of 1.0 * 10^-6"},
+ {3, "OIL", 0, "Oil", "Viscosity of 5.0 * 10^-5"},
+ {4, "HONEY", 0, "Honey", "Viscosity of 2.0 * 10^-3"},
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "DomainFluidSettings", "FluidSettings");
RNA_def_struct_sdna(srna, "FluidsimSettings");
- RNA_def_struct_ui_text(srna, "Domain Fluid Simulation Settings", "Fluid simulation settings for the domain of a fluid simulation.");
+ RNA_def_struct_ui_text(srna, "Domain Fluid Simulation Settings", "Fluid simulation settings for the domain of a fluid simulation");
/* standard settings */
prop= RNA_def_property(srna, "resolution", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "resolutionxyz");
RNA_def_property_range(prop, 1, 1024);
- RNA_def_property_ui_text(prop, "Resolution", "Domain resolution in X,Y and Z direction.");
+ RNA_def_property_ui_text(prop, "Resolution", "Domain resolution in X,Y and Z direction");
prop= RNA_def_property(srna, "preview_resolution", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "previewresxyz");
RNA_def_property_range(prop, 1, 100);
- RNA_def_property_ui_text(prop, "Preview Resolution", "Preview resolution in X,Y and Z direction.");
+ RNA_def_property_ui_text(prop, "Preview Resolution", "Preview resolution in X,Y and Z direction");
prop= RNA_def_property(srna, "start_time", PROP_FLOAT, PROP_TIME);
RNA_def_property_float_sdna(prop, NULL, "animStart");
RNA_def_property_range(prop, 0, 100);
- RNA_def_property_ui_text(prop, "Start Time", "Simulation time of the first blender frame.");
+ RNA_def_property_ui_text(prop, "Start Time", "Simulation time of the first blender frame");
prop= RNA_def_property(srna, "end_time", PROP_FLOAT, PROP_TIME);
RNA_def_property_float_sdna(prop, NULL, "animEnd");
RNA_def_property_range(prop, 0, 100);
- RNA_def_property_ui_text(prop, "End Time", "Simulation time of the last blender frame.");
+ RNA_def_property_ui_text(prop, "End Time", "Simulation time of the last blender frame");
prop= RNA_def_property(srna, "viewport_display_mode", PROP_ENUM, PROP_NONE);
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_ui_text(prop, "Viewport Display Mode", "How to display the mesh in the viewport");
RNA_def_property_update(prop, 0, "rna_fluid_update");
prop= RNA_def_property(srna, "render_display_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "renderDisplayMode");
RNA_def_property_enum_items(prop, quality_items);
- RNA_def_property_ui_text(prop, "Render Display Mode", "How to display the mesh for rendering.");
+ RNA_def_property_ui_text(prop, "Render Display Mode", "How to display the mesh for rendering");
prop= RNA_def_property(srna, "reverse_frames", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", OB_FLUIDSIM_REVERSE);
- RNA_def_property_ui_text(prop, "Reverse Frames", "Reverse fluid frames.");
+ RNA_def_property_ui_text(prop, "Reverse Frames", "Reverse fluid frames");
prop= RNA_def_property(srna, "path", PROP_STRING, PROP_DIRPATH);
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_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");
prop= RNA_def_property(srna, "memory_estimate", PROP_STRING, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_string_funcs(prop, "rna_DomainFluidSettings_memory_estimate_get", "rna_DomainFluidSettings_memory_estimate_length", NULL);
- RNA_def_property_ui_text(prop, "Memory Estimate", "Estimated amount of memory needed for baking the domain.");
+ RNA_def_property_ui_text(prop, "Memory Estimate", "Estimated amount of memory needed for baking the domain");
/* advanced settings */
@@ -258,32 +258,32 @@ static void rna_def_fluidsim_domain(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "gravx");
RNA_def_property_array(prop, 3);
RNA_def_property_range(prop, -1000.1, 1000.1);
- RNA_def_property_ui_text(prop, "Gravity", "Gravity in X, Y and Z direction.");
+ RNA_def_property_ui_text(prop, "Gravity", "Gravity in X, Y and Z direction");
prop= RNA_def_property(srna, "viscosity_preset", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "viscosityMode");
RNA_def_property_enum_items(prop, viscosity_items);
- RNA_def_property_ui_text(prop, "Viscosity Preset", "Set viscosity of the fluid to a preset value, or use manual input.");
+ RNA_def_property_ui_text(prop, "Viscosity Preset", "Set viscosity of the fluid to a preset value, or use manual input");
prop= RNA_def_property(srna, "viscosity_base", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "viscosityValue");
RNA_def_property_range(prop, 0, 10);
- RNA_def_property_ui_text(prop, "Viscosity Base", "Viscosity setting: value that is multiplied by 10 to the power of (exponent*-1).");
+ RNA_def_property_ui_text(prop, "Viscosity Base", "Viscosity setting: value that is multiplied by 10 to the power of (exponent*-1)");
prop= RNA_def_property(srna, "viscosity_exponent", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "viscosityExponent");
RNA_def_property_range(prop, 0, 10);
- RNA_def_property_ui_text(prop, "Viscosity Exponent", "Negative exponent for the viscosity value (to simplify entering small values e.g. 5*10^-6.).");
+ RNA_def_property_ui_text(prop, "Viscosity Exponent", "Negative exponent for the viscosity value (to simplify entering small values e.g. 5*10^-6.)");
prop= RNA_def_property(srna, "real_world_size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "realsize");
RNA_def_property_range(prop, 0.001, 10);
- RNA_def_property_ui_text(prop, "Real World Size", "Size of the simulation domain in metres.");
+ RNA_def_property_ui_text(prop, "Real World Size", "Size of the simulation domain in metres");
prop= RNA_def_property(srna, "grid_levels", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "maxRefine");
RNA_def_property_range(prop, -1, 4);
- RNA_def_property_ui_text(prop, "Grid Levels", "Number of coarsened grids to use (-1 for automatic).");
+ RNA_def_property_ui_text(prop, "Grid Levels", "Number of coarsened grids to use (-1 for automatic)");
prop= RNA_def_property(srna, "compressibility", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "gstar");
@@ -297,7 +297,7 @@ static void rna_def_fluidsim_domain(BlenderRNA *brna)
prop= RNA_def_property(srna, "surface_smoothing", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "surfaceSmoothing");
RNA_def_property_range(prop, 0.0, 5.0);
- RNA_def_property_ui_text(prop, "Surface Smoothing", "Amount of surface smoothing. A value of 0 is off, 1 is normal smoothing and more than 1 is extra smoothing.");
+ RNA_def_property_ui_text(prop, "Surface Smoothing", "Amount of surface smoothing. A value of 0 is off, 1 is normal smoothing and more than 1 is extra smoothing");
prop= RNA_def_property(srna, "surface_subdivisions", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "surfaceSubdivs");
@@ -306,7 +306,7 @@ static void rna_def_fluidsim_domain(BlenderRNA *brna)
prop= RNA_def_property(srna, "generate_speed_vectors", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "domainNovecgen", 0);
- RNA_def_property_ui_text(prop, "Generate Speed Vectors", "Generate speed vectors for vector blur.");
+ RNA_def_property_ui_text(prop, "Generate Speed Vectors", "Generate speed vectors for vector blur");
/* particles */
@@ -318,7 +318,7 @@ static void rna_def_fluidsim_domain(BlenderRNA *brna)
prop= RNA_def_property(srna, "generate_particles", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "generateParticles");
RNA_def_property_range(prop, 0.0, 10.0);
- RNA_def_property_ui_text(prop, "Generate Particles", "Amount of particles to generate (0=off, 1=normal, >1=more).");
+ RNA_def_property_ui_text(prop, "Generate Particles", "Amount of particles to generate (0=off, 1=normal, >1=more)");
}
static void rna_def_fluidsim_volume(StructRNA *srna)
@@ -326,19 +326,19 @@ static void rna_def_fluidsim_volume(StructRNA *srna)
PropertyRNA *prop;
static EnumPropertyItem volume_type_items[] = {
- {1, "VOLUME", 0, "Volume", "Use only the inner volume of the mesh."},
- {2, "SHELL", 0, "Shell", "Use only the outer shell of the mesh."},
- {3, "BOTH", 0, "Both", "Use both the inner volume and the outer shell of the mesh."},
+ {1, "VOLUME", 0, "Volume", "Use only the inner volume of the mesh"},
+ {2, "SHELL", 0, "Shell", "Use only the outer shell of the mesh"},
+ {3, "BOTH", 0, "Both", "Use both the inner volume and the outer shell of the mesh"},
{0, NULL, 0, NULL, NULL}};
prop= RNA_def_property(srna, "volume_initialization", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "volumeInitType");
RNA_def_property_enum_items(prop, volume_type_items);
- RNA_def_property_ui_text(prop, "Volume Initialization", "Volume initialization type.");
+ RNA_def_property_ui_text(prop, "Volume Initialization", "Volume initialization type");
prop= RNA_def_property(srna, "export_animated_mesh", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "domainNovecgen", 0);
- RNA_def_property_ui_text(prop, "Export Animated Mesh", "Export this mesh as an animated one. Slower, only use if really necessary (e.g. armatures or parented objects), animated pos/rot/scale IPOs do not require it.");
+ RNA_def_property_ui_text(prop, "Export Animated Mesh", "Export this mesh as an animated one. Slower, only use if really necessary (e.g. armatures or parented objects), animated pos/rot/scale IPOs do not require it");
}
static void rna_def_fluidsim_fluid(BlenderRNA *brna)
@@ -348,7 +348,7 @@ static void rna_def_fluidsim_fluid(BlenderRNA *brna)
srna= RNA_def_struct(brna, "FluidFluidSettings", "FluidSettings");
RNA_def_struct_sdna(srna, "FluidsimSettings");
- RNA_def_struct_ui_text(srna, "Fluid Fluid Simulation Settings", "Fluid simulation settings for the fluid in the simulation.");
+ RNA_def_struct_ui_text(srna, "Fluid Fluid Simulation Settings", "Fluid simulation settings for the fluid in the simulation");
rna_def_fluidsim_volume(srna);
@@ -356,7 +356,7 @@ static void rna_def_fluidsim_fluid(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "iniVelx");
RNA_def_property_array(prop, 3);
RNA_def_property_range(prop, -1000.1, 1000.1);
- RNA_def_property_ui_text(prop, "Initial Velocity", "Initial velocity of fluid.");
+ RNA_def_property_ui_text(prop, "Initial Velocity", "Initial velocity of fluid");
}
static void rna_def_fluidsim_obstacle(BlenderRNA *brna)
@@ -366,7 +366,7 @@ static void rna_def_fluidsim_obstacle(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ObstacleFluidSettings", "FluidSettings");
RNA_def_struct_sdna(srna, "FluidsimSettings");
- RNA_def_struct_ui_text(srna, "Obstacle Fluid Simulation Settings", "Fluid simulation settings for obstacles in the simulation.");
+ RNA_def_struct_ui_text(srna, "Obstacle Fluid Simulation Settings", "Fluid simulation settings for obstacles in the simulation");
rna_def_fluidsim_volume(srna);
rna_def_fluidsim_slip(srna);
@@ -374,7 +374,7 @@ static void rna_def_fluidsim_obstacle(BlenderRNA *brna)
prop= RNA_def_property(srna, "impact_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "surfaceSmoothing");
RNA_def_property_range(prop, -2.0, 10.0);
- RNA_def_property_ui_text(prop, "Impact Factor", "This is an unphysical value for moving objects - it controls the impact an obstacle has on the fluid, =0 behaves a bit like outflow (deleting fluid), =1 is default, while >1 results in high forces. Can be used to tweak total mass.");
+ RNA_def_property_ui_text(prop, "Impact Factor", "This is an unphysical value for moving objects - it controls the impact an obstacle has on the fluid, =0 behaves a bit like outflow (deleting fluid), =1 is default, while >1 results in high forces. Can be used to tweak total mass");
}
static void rna_def_fluidsim_inflow(BlenderRNA *brna)
@@ -384,7 +384,7 @@ static void rna_def_fluidsim_inflow(BlenderRNA *brna)
srna= RNA_def_struct(brna, "InflowFluidSettings", "FluidSettings");
RNA_def_struct_sdna(srna, "FluidsimSettings");
- RNA_def_struct_ui_text(srna, "Inflow Fluid Simulation Settings", "Fluid simulation settings for objects adding fluids in the simulation.");
+ RNA_def_struct_ui_text(srna, "Inflow Fluid Simulation Settings", "Fluid simulation settings for objects adding fluids in the simulation");
rna_def_fluidsim_volume(srna);
@@ -392,7 +392,7 @@ static void rna_def_fluidsim_inflow(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "iniVelx");
RNA_def_property_array(prop, 3);
RNA_def_property_range(prop, -1000.1, 1000.1);
- RNA_def_property_ui_text(prop, "Inflow Velocity", "Initial velocity of fluid.");
+ RNA_def_property_ui_text(prop, "Inflow Velocity", "Initial velocity of fluid");
prop= RNA_def_property(srna, "local_coordinates", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "typeFlags", OB_FSINFLOW_LOCALCOORD);
@@ -405,7 +405,7 @@ static void rna_def_fluidsim_outflow(BlenderRNA *brna)
srna= RNA_def_struct(brna, "OutflowFluidSettings", "FluidSettings");
RNA_def_struct_sdna(srna, "FluidsimSettings");
- RNA_def_struct_ui_text(srna, "Outflow Fluid Simulation Settings", "Fluid simulation settings for objects removing fluids from the simulation.");
+ RNA_def_struct_ui_text(srna, "Outflow Fluid Simulation Settings", "Fluid simulation settings for objects removing fluids from the simulation");
rna_def_fluidsim_volume(srna);
}
@@ -417,24 +417,24 @@ static void rna_def_fluidsim_particle(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ParticleFluidSettings", "FluidSettings");
RNA_def_struct_sdna(srna, "FluidsimSettings");
- RNA_def_struct_ui_text(srna, "Particle Fluid Simulation Settings", "Fluid simulation settings for objects storing fluid particles generated by the simulation.");
+ RNA_def_struct_ui_text(srna, "Particle Fluid Simulation Settings", "Fluid simulation settings for objects storing fluid particles generated by the simulation");
prop= RNA_def_property(srna, "drops", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "typeFlags", OB_FSPART_DROP);
- RNA_def_property_ui_text(prop, "Drops", "Show drop particles.");
+ RNA_def_property_ui_text(prop, "Drops", "Show drop particles");
prop= RNA_def_property(srna, "floats", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "typeFlags", OB_FSPART_FLOAT);
- RNA_def_property_ui_text(prop, "Floats", "Show floating foam particles.");
+ RNA_def_property_ui_text(prop, "Floats", "Show floating foam particles");
prop= RNA_def_property(srna, "tracer", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "typeFlags", OB_FSPART_TRACER);
- RNA_def_property_ui_text(prop, "Tracer", "Show tracer particles.");
+ RNA_def_property_ui_text(prop, "Tracer", "Show tracer particles");
prop= RNA_def_property(srna, "particle_influence", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "particleInfSize");
RNA_def_property_range(prop, 0.0, 2.0);
- RNA_def_property_ui_text(prop, "Particle Influence", "Amount of particle size scaling: 0=off (all same size), 1=full (range 0.2-2.0), >1=stronger.");
+ RNA_def_property_ui_text(prop, "Particle Influence", "Amount of particle size scaling: 0=off (all same size), 1=full (range 0.2-2.0), >1=stronger");
prop= RNA_def_property(srna, "alpha_influence", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "particleInfAlpha");
@@ -444,7 +444,7 @@ static void rna_def_fluidsim_particle(BlenderRNA *brna)
prop= RNA_def_property(srna, "path", PROP_STRING, PROP_DIRPATH);
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_ui_text(prop, "Path", "Directory (and/or filename prefix) to store and load particles from");
RNA_def_property_update(prop, 0, "rna_fluid_update");
}
@@ -455,37 +455,37 @@ static void rna_def_fluidsim_control(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ControlFluidSettings", "FluidSettings");
RNA_def_struct_sdna(srna, "FluidsimSettings");
- RNA_def_struct_ui_text(srna, "Control Fluid Simulation Settings", "Fluid simulation settings for objects controlling the motion of fluid in the simulation.");
+ RNA_def_struct_ui_text(srna, "Control Fluid Simulation Settings", "Fluid simulation settings for objects controlling the motion of fluid in the simulation");
prop= RNA_def_property(srna, "start_time", PROP_FLOAT, PROP_TIME);
RNA_def_property_float_sdna(prop, NULL, "cpsTimeStart");
RNA_def_property_range(prop, 0.0, 100.0);
- RNA_def_property_ui_text(prop, "Start Time", "Specifies time when the control particles are activated.");
+ RNA_def_property_ui_text(prop, "Start Time", "Specifies time when the control particles are activated");
prop= RNA_def_property(srna, "end_time", PROP_FLOAT, PROP_TIME);
RNA_def_property_float_sdna(prop, NULL, "cpsTimeEnd");
RNA_def_property_range(prop, 0.0, 100.0);
- RNA_def_property_ui_text(prop, "End Time", "Specifies time when the control particles are deactivated.");
+ RNA_def_property_ui_text(prop, "End Time", "Specifies time when the control particles are deactivated");
prop= RNA_def_property(srna, "attraction_strength", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "attractforceStrength");
RNA_def_property_range(prop, -10.0, 10.0);
- RNA_def_property_ui_text(prop, "Attraction Strength", "Force strength for directional attraction towards the control object.");
+ RNA_def_property_ui_text(prop, "Attraction Strength", "Force strength for directional attraction towards the control object");
prop= RNA_def_property(srna, "attraction_radius", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "attractforceRadius");
RNA_def_property_range(prop, 0.0, 10.0);
- RNA_def_property_ui_text(prop, "Attraction Radius", "Specifies the force field radius around the control object.");
+ RNA_def_property_ui_text(prop, "Attraction Radius", "Specifies the force field radius around the control object");
prop= RNA_def_property(srna, "velocity_strength", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "velocityforceStrength");
RNA_def_property_range(prop, 0.0, 10.0);
- RNA_def_property_ui_text(prop, "Velocity Strength", "Force strength of how much of the control object's velocity is influencing the fluid velocity.");
+ RNA_def_property_ui_text(prop, "Velocity Strength", "Force strength of how much of the control object's velocity is influencing the fluid velocity");
prop= RNA_def_property(srna, "velocity_radius", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "velocityforceRadius");
RNA_def_property_range(prop, 0.0, 10.0);
- RNA_def_property_ui_text(prop, "Velocity Radius", "Specifies the force field radius around the control object.");
+ RNA_def_property_ui_text(prop, "Velocity Radius", "Specifies the force field radius around the control object");
prop= RNA_def_property(srna, "quality", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "cpsQuality");
@@ -494,7 +494,7 @@ static void rna_def_fluidsim_control(BlenderRNA *brna)
prop= RNA_def_property(srna, "reverse_frames", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", OB_FLUIDSIM_REVERSE);
- RNA_def_property_ui_text(prop, "Reverse Frames", "Reverse control object movement.");
+ RNA_def_property_ui_text(prop, "Reverse Frames", "Reverse control object movement");
}
void RNA_def_fluidsim(BlenderRNA *brna)
@@ -504,13 +504,13 @@ void RNA_def_fluidsim(BlenderRNA *brna)
static EnumPropertyItem prop_fluid_type_items[] = {
{OB_FLUIDSIM_ENABLE, "NONE", 0, "None", ""},
- {OB_FLUIDSIM_DOMAIN, "DOMAIN", 0, "Domain", "Bounding box of this object represents the computational domain of the fluid simulation."},
- {OB_FLUIDSIM_FLUID, "FLUID", 0, "Fluid", "Object represents a volume of fluid in the simulation."},
- {OB_FLUIDSIM_OBSTACLE, "OBSTACLE", 0, "Obstacle", "Object is a fixed obstacle."},
- {OB_FLUIDSIM_INFLOW, "INFLOW", 0, "Inflow", "Object adds fluid to the simulation."},
- {OB_FLUIDSIM_OUTFLOW, "OUTFLOW", 0, "Outflow", "Object removes fluid from the simulation."},
- {OB_FLUIDSIM_PARTICLE, "PARTICLE", 0, "Particle", "Object is made a particle system to display particles generated by a fluidsim domain object."},
- {OB_FLUIDSIM_CONTROL, "CONTROL", 0, "Control", "Object is made a fluid control mesh, which influences the fluid."},
+ {OB_FLUIDSIM_DOMAIN, "DOMAIN", 0, "Domain", "Bounding box of this object represents the computational domain of the fluid simulation"},
+ {OB_FLUIDSIM_FLUID, "FLUID", 0, "Fluid", "Object represents a volume of fluid in the simulation"},
+ {OB_FLUIDSIM_OBSTACLE, "OBSTACLE", 0, "Obstacle", "Object is a fixed obstacle"},
+ {OB_FLUIDSIM_INFLOW, "INFLOW", 0, "Inflow", "Object adds fluid to the simulation"},
+ {OB_FLUIDSIM_OUTFLOW, "OUTFLOW", 0, "Outflow", "Object removes fluid from the simulation"},
+ {OB_FLUIDSIM_PARTICLE, "PARTICLE", 0, "Particle", "Object is made a particle system to display particles generated by a fluidsim domain object"},
+ {OB_FLUIDSIM_CONTROL, "CONTROL", 0, "Control", "Object is made a fluid control mesh, which influences the fluid"},
{0, NULL, 0, NULL, NULL}};
@@ -518,16 +518,16 @@ void RNA_def_fluidsim(BlenderRNA *brna)
RNA_def_struct_sdna(srna, "FluidsimSettings");
RNA_def_struct_refine_func(srna, "rna_FluidSettings_refine");
RNA_def_struct_path_func(srna, "rna_FluidSettings_path");
- RNA_def_struct_ui_text(srna, "Fluid Simulation Settings", "Fluid simulation settings for an object taking part in the simulation.");
+ RNA_def_struct_ui_text(srna, "Fluid Simulation Settings", "Fluid simulation settings for an object taking part in the simulation");
prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "type");
RNA_def_property_enum_items(prop, prop_fluid_type_items);
- RNA_def_property_ui_text(prop, "Type", "Type of participation in the fluid simulation.");
+ RNA_def_property_ui_text(prop, "Type", "Type of participation in the fluid simulation");
RNA_def_property_update(prop, 0, "rna_FluidSettings_update_type");
//prop= RNA_def_property(srna, "ipo", PROP_POINTER, PROP_NONE);
- //RNA_def_property_ui_text(prop, "Ipo Curves", "Ipo curves used by fluid simulation settings.");
+ //RNA_def_property_ui_text(prop, "Ipo Curves", "Ipo curves used by fluid simulation settings");
/* types */
diff --git a/source/blender/makesrna/intern/rna_gpencil.c b/source/blender/makesrna/intern/rna_gpencil.c
index 30591efc481..4e9d15b182d 100644
--- a/source/blender/makesrna/intern/rna_gpencil.c
+++ b/source/blender/makesrna/intern/rna_gpencil.c
@@ -15,7 +15,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor(s): Blender Foundation (2009), Joshua Leung
*
@@ -35,6 +35,8 @@
#include "MEM_guardedalloc.h"
+#include "WM_types.h"
+
#ifdef RNA_RUNTIME
static int rna_GPencilLayer_active_frame_editable(PointerRNA *ptr)
@@ -75,17 +77,19 @@ static void rna_def_gpencil_stroke_point(BlenderRNA *brna)
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.");
+ RNA_def_struct_ui_text(srna, "Grease Pencil Stroke Point", "Data point for freehand stroke curve");
prop= RNA_def_property(srna, "co", PROP_FLOAT, PROP_XYZ);
RNA_def_property_float_sdna(prop, NULL, "x");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Coordinates", "");
+ RNA_def_property_update(prop, NC_SCREEN|ND_GPENCIL, NULL);
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.");
+ RNA_def_property_ui_text(prop, "Pressure", "Pressure of tablet at point when drawing it");
+ RNA_def_property_update(prop, NC_SCREEN|ND_GPENCIL, NULL);
}
static void rna_def_gpencil_stroke(BlenderRNA *brna)
@@ -95,7 +99,7 @@ static void rna_def_gpencil_stroke(BlenderRNA *brna)
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.");
+ 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);
@@ -120,22 +124,22 @@ static void rna_def_gpencil_frame(BlenderRNA *brna)
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.");
+ 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.");
+ 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).");
+ 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.");
+ RNA_def_property_ui_text(prop, "Selected", "Frame is selected for editing in the DopeSheet");
}
static void rna_def_gpencil_layer(BlenderRNA *brna)
@@ -156,67 +160,77 @@ static void rna_def_gpencil_layer(BlenderRNA *brna)
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.");
+ 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_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.");
+ RNA_def_property_ui_text(prop, "Color", "Color that all sketches in this layer are drawn with");
+ RNA_def_property_update(prop, NC_SCREEN|ND_GPENCIL, NULL);
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.");
+ RNA_def_property_ui_text(prop, "Opacity", "Visibility of strokes");
+ RNA_def_property_update(prop, NC_SCREEN|ND_GPENCIL, NULL);
/* 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).");
+ RNA_def_property_ui_text(prop, "Thickness", "Thickness of strokes (in pixels)");
+ RNA_def_property_update(prop, NC_SCREEN|ND_GPENCIL, NULL);
/* 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.");
+ RNA_def_property_ui_text(prop, "Use Onion Skinning", "Ghost frames on either side of frame");
+ RNA_def_property_update(prop, NC_SCREEN|ND_GPENCIL, NULL);
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)");
+ RNA_def_property_update(prop, NC_SCREEN|ND_GPENCIL, NULL);
/* 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.");
+ RNA_def_property_ui_text(prop, "Hide", "Layer doesn't get drawn");
+ RNA_def_property_update(prop, NC_SCREEN|ND_GPENCIL, NULL);
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.");
+ RNA_def_property_ui_text(prop, "Locked", "Layer is protected from further editing and/or frame changes");
+ RNA_def_property_update(prop, NC_SCREEN|ND_GPENCIL, NULL);
prop= RNA_def_property(srna, "frame_lock", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_LAYER_FRAMELOCK);
- RNA_def_property_ui_text(prop, "Frame Locked", "Current frame displayed by layer cannot be changed.");
+ RNA_def_property_ui_text(prop, "Frame Locked", "Current frame displayed by layer cannot be changed");
+ RNA_def_property_update(prop, NC_SCREEN|ND_GPENCIL, NULL);
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.");
+ RNA_def_property_ui_text(prop, "Active", "Layer is 'active' layer being edited");
+ RNA_def_property_update(prop, NC_SCREEN|ND_GPENCIL, NULL);
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.");
+ RNA_def_property_ui_text(prop, "Selected", "Layer is selected for editing in the DopeSheet");
+ RNA_def_property_update(prop, NC_SCREEN|ND_GPENCIL, NULL);
// 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).");
-
+ RNA_def_property_ui_text(prop, "Show Points", "Draw the points which make up the strokes (for debugging purposes)");
+ RNA_def_property_update(prop, NC_SCREEN|ND_GPENCIL, NULL);
}
static void rna_def_gpencil_data(BlenderRNA *brna)
@@ -233,14 +247,14 @@ static void rna_def_gpencil_data(BlenderRNA *brna)
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_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.");
+ RNA_def_property_ui_text(prop, "Layers", "Similar to layers in Photoshop");
/* Flags */
prop= RNA_def_property(srna, "draw_mode", PROP_ENUM, PROP_NONE);
@@ -250,7 +264,7 @@ static void rna_def_gpencil_data(BlenderRNA *brna)
prop= RNA_def_property(srna, "use_stroke_endpoints", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_DATA_DEPTH_STROKE_ENDPOINTS);
- RNA_def_property_ui_text(prop, "Only Endpoints", "When snapping the stroke to existing lines, only use the first and last parts of the line.");
+ RNA_def_property_ui_text(prop, "Only Endpoints", "When snapping the stroke to existing lines, only use the first and last parts of the line");
}
diff --git a/source/blender/makesrna/intern/rna_group.c b/source/blender/makesrna/intern/rna_group.c
index 528d2eb0b3d..8e8db26ffb3 100644
--- a/source/blender/makesrna/intern/rna_group.c
+++ b/source/blender/makesrna/intern/rna_group.c
@@ -15,7 +15,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor(s): Campbell Barton
*
@@ -83,7 +83,7 @@ static void rna_def_group_objects(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_property_srna(cprop, "GroupObjects");
srna= RNA_def_struct(brna, "GroupObjects", NULL);
RNA_def_struct_sdna(srna, "Group");
- RNA_def_struct_ui_text(srna, "Group Objects", "Collection of group objects.");
+ RNA_def_struct_ui_text(srna, "Group Objects", "Collection of group objects");
/* add object */
func= RNA_def_function(srna, "link", "rna_Group_objects_link");
@@ -109,24 +109,24 @@ void RNA_def_group(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "Group", "ID");
- RNA_def_struct_ui_text(srna, "Group", "Group of Object datablocks.");
+ RNA_def_struct_ui_text(srna, "Group", "Group of Object datablocks");
RNA_def_struct_ui_icon(srna, ICON_GROUP);
prop= RNA_def_property(srna, "dupli_offset", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "dupli_ofs");
- RNA_def_property_ui_text(prop, "Dupli Offset", "Offset from the origin to use when instancing as DupliGroup.");
+ RNA_def_property_ui_text(prop, "Dupli Offset", "Offset from the origin to use when instancing as DupliGroup");
RNA_def_property_ui_range(prop, -10000.0, 10000.0, 10, 4);
prop= RNA_def_property(srna, "layer", PROP_BOOLEAN, PROP_LAYER);
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.");
+ RNA_def_property_ui_text(prop, "Dupli Layers", "Layers visible when this groups is instanced as a dupli");
prop= RNA_def_property(srna, "objects", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "gobject", NULL);
RNA_def_property_struct_type(prop, "Object");
- RNA_def_property_ui_text(prop, "Objects", "A collection of this groups objects.");
+ 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);
rna_def_group_objects(brna, prop);
diff --git a/source/blender/makesrna/intern/rna_image.c b/source/blender/makesrna/intern/rna_image.c
index c4d7e772c58..e9eec9bf64a 100644
--- a/source/blender/makesrna/intern/rna_image.c
+++ b/source/blender/makesrna/intern/rna_image.c
@@ -15,7 +15,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor(s): Brecht Van Lommel
*
@@ -105,7 +105,6 @@ static void rna_Image_reload_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
Image *ima= ptr->id.data;
BKE_image_signal(ima, NULL, IMA_SIGNAL_RELOAD);
- printf("reload %p\n", ima);
}
static void rna_Image_generated_update(Main *bmain, Scene *scene, PointerRNA *ptr)
@@ -118,7 +117,7 @@ static void rna_ImageUser_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
ImageUser *iuser= ptr->data;
- BKE_image_user_calc_imanr(iuser, scene->r.cfra, 0);
+ BKE_image_user_calc_frame(iuser, scene->r.cfra, 0);
}
static EnumPropertyItem *rna_Image_source_itemf(bContext *C, PointerRNA *ptr, int *free)
@@ -202,50 +201,50 @@ static void rna_def_imageuser(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "ImageUser", NULL);
- RNA_def_struct_ui_text(srna, "Image User", "Parameters defining how an Image datablock is used by another datablock.");
+ RNA_def_struct_ui_text(srna, "Image User", "Parameters defining how an Image datablock is used by another datablock");
prop= RNA_def_property(srna, "auto_refresh", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", IMA_ANIM_ALWAYS);
- RNA_def_property_ui_text(prop, "Auto Refresh", "Always refresh image on frame changes.");
+ RNA_def_property_ui_text(prop, "Auto Refresh", "Always refresh image on frame changes");
RNA_def_property_update(prop, 0, "rna_ImageUser_update");
/* animation */
prop= RNA_def_property(srna, "cyclic", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "cycl", 0);
- RNA_def_property_ui_text(prop, "Cyclic", "Cycle the images in the movie.");
+ RNA_def_property_ui_text(prop, "Cyclic", "Cycle the images in the movie");
RNA_def_property_update(prop, 0, "rna_ImageUser_update");
prop= RNA_def_property(srna, "frames", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 0, MAXFRAMEF);
- RNA_def_property_ui_text(prop, "Frames", "Sets the number of images of a movie to use.");
+ RNA_def_property_ui_text(prop, "Frames", "Sets the number of images of a movie to use");
RNA_def_property_update(prop, 0, "rna_ImageUser_update");
prop= RNA_def_property(srna, "offset", PROP_INT, PROP_NONE);
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.");
+ RNA_def_property_ui_text(prop, "Offset", "Offsets the number of the frame to use in the animation");
RNA_def_property_update(prop, 0, "rna_ImageUser_update");
prop= RNA_def_property(srna, "start_frame", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "sfra");
RNA_def_property_range(prop, 1.0f, MAXFRAMEF);
- RNA_def_property_ui_text(prop, "Start Frame", "Sets the global starting frame of the movie.");
+ RNA_def_property_ui_text(prop, "Start Frame", "Sets the global starting frame of the movie");
RNA_def_property_update(prop, 0, "rna_ImageUser_update");
prop= RNA_def_property(srna, "fields_per_frame", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "fie_ima");
RNA_def_property_range(prop, -MAXFRAMEF, MAXFRAMEF);
- RNA_def_property_ui_text(prop, "Fields per Frame", "The number of fields per rendered frame (2 fields is 1 image).");
+ RNA_def_property_ui_text(prop, "Fields per Frame", "The number of fields per rendered frame (2 fields is 1 image)");
RNA_def_property_update(prop, 0, "rna_ImageUser_update");
prop= RNA_def_property(srna, "multilayer_layer", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "layer");
RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* image_multi_cb */
- RNA_def_property_ui_text(prop, "Layer", "Layer in multilayer image.");
+ RNA_def_property_ui_text(prop, "Layer", "Layer in multilayer image");
prop= RNA_def_property(srna, "multilayer_pass", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "pass");
RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* image_multi_cb */
- RNA_def_property_ui_text(prop, "Pass", "Pass in multilayer image.");
+ RNA_def_property_ui_text(prop, "Pass", "Pass in multilayer image");
}
static void rna_def_image(BlenderRNA *brna)
@@ -268,29 +267,29 @@ static void rna_def_image(BlenderRNA *brna)
{IMA_REFLECT, "REFLECTION", 0, "Reflection", "Use reflection mapping for mapping the image"},
{0, NULL, 0, NULL, NULL}};
static const EnumPropertyItem prop_field_order_items[]= {
- {0, "EVEN", 0, "Even", "Even Fields first"},
- {IMA_STD_FIELD, "ODD", 0, "Odd", "Odd Fields first"},
+ {0, "EVEN", 0, "Upper First", "Upper field first"},
+ {IMA_STD_FIELD, "ODD", 0, "Lower First", "Lower field first"},
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "Image", "ID");
- RNA_def_struct_ui_text(srna, "Image", "Image datablock referencing an external or packed image.");
+ RNA_def_struct_ui_text(srna, "Image", "Image datablock referencing an external or packed image");
RNA_def_struct_ui_icon(srna, ICON_IMAGE_DATA);
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", "Image/Movie file name.");
+ RNA_def_property_ui_text(prop, "Filename", "Image/Movie file name");
RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, "rna_Image_reload_update");
prop= RNA_def_property(srna, "source", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, image_source_items);
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_Image_source_itemf");
- RNA_def_property_ui_text(prop, "Source", "Where the image comes from.");
+ RNA_def_property_ui_text(prop, "Source", "Where the image comes from");
RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, "rna_Image_source_update");
prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_type_items);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Type", "How to generate the image.");
+ RNA_def_property_ui_text(prop, "Type", "How to generate the image");
RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
prop= RNA_def_property(srna, "packed_file", PROP_POINTER, PROP_NONE);
@@ -300,13 +299,13 @@ static void rna_def_image(BlenderRNA *brna)
prop= RNA_def_property(srna, "field_order", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
RNA_def_property_enum_items(prop, prop_field_order_items);
- RNA_def_property_ui_text(prop, "Field Order", "Order of video fields. Select which lines are displayed first.");
+ RNA_def_property_ui_text(prop, "Field Order", "Order of video fields. Select which lines are displayed first");
RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
/* booleans */
prop= RNA_def_property(srna, "fields", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", IMA_FIELDS);
- RNA_def_property_ui_text(prop, "Fields", "Use fields of the image.");
+ RNA_def_property_ui_text(prop, "Fields", "Use fields of the image");
RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, "rna_Image_fields_update");
prop= RNA_def_property(srna, "antialias", PROP_BOOLEAN, PROP_NONE);
@@ -316,95 +315,95 @@ static void rna_def_image(BlenderRNA *brna)
prop= RNA_def_property(srna, "premultiply", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", IMA_DO_PREMUL);
- RNA_def_property_ui_text(prop, "Premultiply", "Convert RGB from key alpha to premultiplied alpha.");
- RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
+ RNA_def_property_ui_text(prop, "Premultiply", "Convert RGB from key alpha to premultiplied alpha");
+ RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, "rna_Image_reload_update");
prop= RNA_def_property(srna, "dirty", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_Image_dirty_get", NULL);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Dirty", "Image has changed and is not saved.");
+ RNA_def_property_ui_text(prop, "Dirty", "Image has changed and is not saved");
/* generated image (image_generated_change_cb) */
prop= RNA_def_property(srna, "generated_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "gen_type");
RNA_def_property_enum_items(prop, prop_generated_type_items);
- RNA_def_property_ui_text(prop, "Generated Type", "Generated image type.");
+ RNA_def_property_ui_text(prop, "Generated Type", "Generated image type");
RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, "rna_Image_generated_update");
prop= RNA_def_property(srna, "generated_width", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "gen_x");
RNA_def_property_range(prop, 1, 16384);
- RNA_def_property_ui_text(prop, "Generated Width", "Generated image width.");
+ RNA_def_property_ui_text(prop, "Generated Width", "Generated image width");
RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, "rna_Image_generated_update");
prop= RNA_def_property(srna, "generated_height", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "gen_y");
RNA_def_property_range(prop, 1, 16384);
- RNA_def_property_ui_text(prop, "Generated Height", "Generated image height.");
+ RNA_def_property_ui_text(prop, "Generated Height", "Generated image height");
RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, "rna_Image_generated_update");
/* realtime properties */
prop= RNA_def_property(srna, "mapping", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
RNA_def_property_enum_items(prop, prop_mapping_items);
- RNA_def_property_ui_text(prop, "Mapping", "Mapping type to use for this image in the game engine.");
+ RNA_def_property_ui_text(prop, "Mapping", "Mapping type to use for this image in the game engine");
RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
prop= RNA_def_property(srna, "display_aspect", PROP_FLOAT, PROP_XYZ);
RNA_def_property_float_sdna(prop, NULL, "aspx");
RNA_def_property_array(prop, 2);
RNA_def_property_range(prop, 0.1f, 5000.0f);
- RNA_def_property_ui_text(prop, "Display Aspect", "Display Aspect for this image, does not affect rendering.");
+ RNA_def_property_ui_text(prop, "Display Aspect", "Display Aspect for this image, does not affect rendering");
RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
prop= RNA_def_property(srna, "animated", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "tpageflag", IMA_TWINANIM);
- RNA_def_property_ui_text(prop, "Animated", "Use as animated texture in the game engine.");
+ RNA_def_property_ui_text(prop, "Animated", "Use as animated texture in the game engine");
RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, "rna_Image_animated_update");
prop= RNA_def_property(srna, "animation_start", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "twsta");
RNA_def_property_range(prop, 0, 128);
- RNA_def_property_ui_text(prop, "Animation Start", "Start frame of an animated texture.");
+ RNA_def_property_ui_text(prop, "Animation Start", "Start frame of an animated texture");
RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, "rna_Image_animated_update");
prop= RNA_def_property(srna, "animation_end", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "twend");
RNA_def_property_range(prop, 0, 128);
- RNA_def_property_ui_text(prop, "Animation End", "End frame of an animated texture.");
+ RNA_def_property_ui_text(prop, "Animation End", "End frame of an animated texture");
RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, "rna_Image_animated_update");
prop= RNA_def_property(srna, "animation_speed", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "animspeed");
RNA_def_property_range(prop, 1, 100);
- RNA_def_property_ui_text(prop, "Animation Speed", "Speed of the animation in frames per second.");
+ RNA_def_property_ui_text(prop, "Animation Speed", "Speed of the animation in frames per second");
RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
prop= RNA_def_property(srna, "tiles", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "tpageflag", IMA_TILES);
- RNA_def_property_ui_text(prop, "Tiles", "Use of tilemode for faces (default shift-LMB to pick the tile for selected faces).");
+ RNA_def_property_ui_text(prop, "Tiles", "Use of tilemode for faces (default shift-LMB to pick the tile for selected faces)");
RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
prop= RNA_def_property(srna, "tiles_x", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "xrep");
RNA_def_property_range(prop, 1, 16);
- RNA_def_property_ui_text(prop, "Tiles X", "Degree of repetition in the X direction.");
+ RNA_def_property_ui_text(prop, "Tiles X", "Degree of repetition in the X direction");
RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
prop= RNA_def_property(srna, "tiles_y", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "yrep");
RNA_def_property_range(prop, 1, 16);
- RNA_def_property_ui_text(prop, "Tiles Y", "Degree of repetition in the Y direction.");
+ RNA_def_property_ui_text(prop, "Tiles Y", "Degree of repetition in the Y direction");
RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
prop= RNA_def_property(srna, "clamp_x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "tpageflag", IMA_CLAMP_U);
- RNA_def_property_ui_text(prop, "Clamp X", "Disable texture repeating horizontally.");
+ RNA_def_property_ui_text(prop, "Clamp X", "Disable texture repeating horizontally");
RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
prop= RNA_def_property(srna, "clamp_y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "tpageflag", IMA_CLAMP_V);
- RNA_def_property_ui_text(prop, "Clamp Y", "Disable texture repeating vertically.");
+ RNA_def_property_ui_text(prop, "Clamp Y", "Disable texture repeating vertically");
RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
/*
@@ -414,14 +413,14 @@ static void rna_def_image(BlenderRNA *brna)
prop= RNA_def_property(srna, "has_data", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_Image_has_data_get", NULL);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Has data", "True if this image has data.");
+ RNA_def_property_ui_text(prop, "Has data", "True if this image has data");
prop= RNA_def_property(srna, "depth", PROP_INT, PROP_NONE);
RNA_def_property_int_funcs(prop, "rna_Image_depth_get", NULL, NULL);
- RNA_def_property_ui_text(prop, "Depth", "Image bit depth.");
+ RNA_def_property_ui_text(prop, "Depth", "Image bit depth");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- prop= RNA_def_int_vector(srna, "size" , 2 , NULL , 0, 0, "Size" , "Width and height in pixels, zero when image data cant be loaded." , 0 , 0);
+ prop= RNA_def_int_vector(srna, "size" , 2 , NULL , 0, 0, "Size" , "Width and height in pixels, zero when image data cant be loaded" , 0 , 0);
RNA_def_property_int_funcs(prop, "rna_Image_size_get" , NULL, NULL);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
diff --git a/source/blender/makesrna/intern/rna_image_api.c b/source/blender/makesrna/intern/rna_image_api.c
index 3a978196a29..892370a9f72 100644
--- a/source/blender/makesrna/intern/rna_image_api.c
+++ b/source/blender/makesrna/intern/rna_image_api.c
@@ -15,7 +15,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* The Original Code is Copyright (C) 2009 Blender Foundation.
* All rights reserved.
@@ -37,33 +37,18 @@
#ifdef RNA_RUNTIME
#include "BKE_image.h"
+#include "BKE_packedFile.h"
#include "BKE_main.h"
#include "BKE_utildefines.h"
+#include "IMB_imbuf.h"
+
#include "DNA_image_types.h"
#include "DNA_scene_types.h"
#include "MEM_guardedalloc.h"
-/*
- User should check if returned path exists before copying a file there.
-
- TODO: it would be better to return a (abs, rel) tuple.
-*/
-static char *rna_Image_get_export_path(Image *image, char *dest_dir, int rel)
-{
- int length = FILE_MAX;
- char *path= MEM_callocN(length, "image file path");
-
- if (!BKE_get_image_export_path(image, dest_dir, rel ? NULL : path, length, rel ? path : NULL, length )) {
- MEM_freeN(path);
- return NULL;
- }
-
- return path;
-}
-
-static void rna_Image_save(Image *image, bContext *C, ReportList *reports, char *path, Scene *scene)
+static void rna_Image_save_render(Image *image, bContext *C, ReportList *reports, char *path, Scene *scene)
{
ImBuf *ibuf;
@@ -92,15 +77,25 @@ static void rna_Image_save(Image *image, bContext *C, ReportList *reports, char
}
}
-char *rna_Image_get_abs_filename(Image *image, bContext *C)
+static void rna_Image_save(Image *image, ReportList *reports)
{
- char *filename= MEM_callocN(FILE_MAX, "Image.get_abs_filename()");
-
- BLI_strncpy(filename, image->name, FILE_MAXDIR + FILE_MAXFILE);
- BLI_convertstringcode(filename, CTX_data_main(C)->name);
- BLI_convertstringframe(filename, CTX_data_scene(C)->r.cfra);
-
- return filename;
+ ImBuf *ibuf= BKE_image_get_ibuf(image, NULL);
+ if(ibuf) {
+ if(image->packedfile) {
+ if (writePackedFile(reports, image->name, image->packedfile, 0) != RET_OK) {
+ BKE_reportf(reports, RPT_ERROR, "Image \"%s\" could saved packed file to \"%s\"", image->id.name+2, image->name);
+ }
+ }
+ else if (IMB_saveiff(ibuf, image->name, ibuf->flags)) {
+ ibuf->userflags &= ~IB_BITMAPDIRTY;
+ }
+ else {
+ BKE_reportf(reports, RPT_ERROR, "Image \"%s\" could not be saved to \"%s\"", image->id.name+2, image->name);
+ }
+ }
+ else {
+ BKE_reportf(reports, RPT_ERROR, "Image \"%s\" does not have any image data", image->id.name+2);
+ }
}
#else
@@ -110,27 +105,16 @@ void RNA_api_image(StructRNA *srna)
FunctionRNA *func;
PropertyRNA *parm;
- func= RNA_def_function(srna, "get_export_path", "rna_Image_get_export_path");
- RNA_def_function_ui_description(func, "Produce image export path.");
- parm= RNA_def_string(func, "dest_dir", "", 0, "", "Destination directory.");
- RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_boolean(func, "get_rel_path", 1, "", "Return relative path if True.");
- RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_string(func, "path", "", 0, "", "Absolute export path.");
- RNA_def_function_return(func, parm);
-
- func= RNA_def_function(srna, "get_abs_filename", "rna_Image_get_abs_filename");
- RNA_def_function_ui_description(func, "Get absolute filename.");
- RNA_def_function_flag(func, FUNC_USE_CONTEXT);
- parm= RNA_def_string_file_path(func, "abs_filename", NULL, 0, "", "Image/movie absolute filename.");
- RNA_def_function_return(func, parm);
-
- func= RNA_def_function(srna, "save", "rna_Image_save");
- RNA_def_function_ui_description(func, "Save image to a specific path.");
+ func= RNA_def_function(srna, "save_render", "rna_Image_save_render");
+ RNA_def_function_ui_description(func, "Save image to a specific path using a scenes render settings.");
RNA_def_function_flag(func, FUNC_USE_CONTEXT|FUNC_USE_REPORTS);
parm= RNA_def_string(func, "path", "", 0, "", "Save path.");
RNA_def_property_flag(parm, PROP_REQUIRED);
parm= RNA_def_pointer(func, "scene", "Scene", "", "Scene to take image parameters from.");
+
+ func= RNA_def_function(srna, "save", "rna_Image_save");
+ RNA_def_function_ui_description(func, "Save image to its source path.");
+ RNA_def_function_flag(func, FUNC_USE_REPORTS);
}
#endif
diff --git a/source/blender/makesrna/intern/rna_internal.h b/source/blender/makesrna/intern/rna_internal.h
index 3d18804036a..06e0a96deed 100644
--- a/source/blender/makesrna/intern/rna_internal.h
+++ b/source/blender/makesrna/intern/rna_internal.h
@@ -15,7 +15,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor(s): Blender Foundation (2008).
*
@@ -331,6 +331,7 @@ PointerRNA rna_pointer_inherit_refine(struct PointerRNA *ptr, struct StructRNA *
/* Functions */
int rna_parameter_size(struct PropertyRNA *parm);
+int rna_parameter_size_alloc(struct PropertyRNA *parm);
#endif /* RNA_INTERNAL_H */
diff --git a/source/blender/makesrna/intern/rna_internal_types.h b/source/blender/makesrna/intern/rna_internal_types.h
index bef568bfa7d..7737d6094bc 100644
--- a/source/blender/makesrna/intern/rna_internal_types.h
+++ b/source/blender/makesrna/intern/rna_internal_types.h
@@ -15,7 +15,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor(s): Blender Foundation (2008).
*
diff --git a/source/blender/makesrna/intern/rna_key.c b/source/blender/makesrna/intern/rna_key.c
index 6ff961070b9..b53218b2d50 100644
--- a/source/blender/makesrna/intern/rna_key.c
+++ b/source/blender/makesrna/intern/rna_key.c
@@ -15,7 +15,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor(s): Blender Foundation (2008).
*
@@ -313,7 +313,7 @@ static void rna_def_keydata(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "ShapeKeyPoint", NULL);
- RNA_def_struct_ui_text(srna, "Shape Key Point", "Point in a shape key.");
+ RNA_def_struct_ui_text(srna, "Shape Key Point", "Point in a shape key");
prop= RNA_def_property(srna, "co", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_array(prop, 3);
@@ -322,7 +322,7 @@ static void rna_def_keydata(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_Key_update_data");
srna= RNA_def_struct(brna, "ShapeKeyCurvePoint", NULL);
- RNA_def_struct_ui_text(srna, "Shape Key Curve Point", "Point in a shape key for curves.");
+ RNA_def_struct_ui_text(srna, "Shape Key Curve Point", "Point in a shape key for curves");
prop= RNA_def_property(srna, "co", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_array(prop, 3);
@@ -336,7 +336,7 @@ static void rna_def_keydata(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_Key_update_data");
srna= RNA_def_struct(brna, "ShapeKeyBezierPoint", NULL);
- RNA_def_struct_ui_text(srna, "Shape Key Bezier Point", "Point in a shape key for bezier curves.");
+ RNA_def_struct_ui_text(srna, "Shape Key Bezier Point", "Point in a shape key for bezier curves");
prop= RNA_def_property(srna, "co", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_array(prop, 3);
@@ -375,7 +375,7 @@ static void rna_def_keyblock(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "ShapeKey", NULL);
- RNA_def_struct_ui_text(srna, "Shape Key", "Shape key in a shape keys datablock.");
+ RNA_def_struct_ui_text(srna, "Shape Key", "Shape key in a shape keys datablock");
RNA_def_struct_sdna(srna, "KeyBlock");
RNA_def_struct_path_func(srna, "rna_ShapeKey_path");
RNA_def_struct_ui_icon(srna, ICON_SHAPEKEY_DATA);
@@ -389,7 +389,7 @@ static void rna_def_keyblock(BlenderRNA *brna)
prop= RNA_def_property(srna, "frame", PROP_FLOAT, PROP_TIME);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_float_sdna(prop, NULL, "pos");
- RNA_def_property_ui_text(prop, "Frame", "Frame for absolute keys.");
+ RNA_def_property_ui_text(prop, "Frame", "Frame for absolute keys");
RNA_def_property_update(prop, 0, "rna_Key_update_data");
/* for now, this is editable directly, as users can set this even if they're not animating them (to test results) */
@@ -397,43 +397,43 @@ static void rna_def_keyblock(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "curval");
RNA_def_property_float_funcs(prop, NULL, "rna_ShapeKey_value_set", "rna_ShapeKey_value_range");
RNA_def_property_ui_range(prop, -10.0f, 10.0f, 10, 3);
- RNA_def_property_ui_text(prop, "Value", "Value of shape key at the current frame.");
+ RNA_def_property_ui_text(prop, "Value", "Value of shape key at the current frame");
RNA_def_property_update(prop, 0, "rna_Key_update_data");
prop= RNA_def_property(srna, "interpolation", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "type");
RNA_def_property_enum_items(prop, prop_keyblock_type_items);
- RNA_def_property_ui_text(prop, "Interpolation", "Interpolation type.");
+ RNA_def_property_ui_text(prop, "Interpolation", "Interpolation type");
RNA_def_property_update(prop, 0, "rna_Key_update_data");
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 weight group, to blend with basis shape.");
+ RNA_def_property_ui_text(prop, "Vertex Group", "Vertex weight group, to blend with basis shape");
RNA_def_property_update(prop, 0, "rna_Key_update_data");
prop= RNA_def_property(srna, "relative_key", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "ShapeKey");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_pointer_funcs(prop, "rna_ShapeKey_relative_key_get", "rna_ShapeKey_relative_key_set", NULL);
- RNA_def_property_ui_text(prop, "Relative Key", "Shape used as a relative key.");
+ RNA_def_property_ui_text(prop, "Relative Key", "Shape used as a relative key");
RNA_def_property_update(prop, 0, "rna_Key_update_data");
prop= RNA_def_property(srna, "mute", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", KEYBLOCK_MUTE);
- RNA_def_property_ui_text(prop, "Mute", "Mute this shape key.");
+ RNA_def_property_ui_text(prop, "Mute", "Mute this shape key");
RNA_def_property_ui_icon(prop, ICON_MUTE_IPO_OFF, 1);
RNA_def_property_update(prop, 0, "rna_Key_update_data");
prop= RNA_def_property(srna, "slider_min", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "slidermin");
RNA_def_property_range(prop, -10.0f, 10.0f);
- RNA_def_property_ui_text(prop, "Slider Min", "Minimum for slider.");
+ RNA_def_property_ui_text(prop, "Slider Min", "Minimum for slider");
prop= RNA_def_property(srna, "slider_max", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "slidermax");
RNA_def_property_range(prop, -10.0f, 10.0f);
RNA_def_property_float_default(prop, 1.0f);
- RNA_def_property_ui_text(prop, "Slider Max", "Maximum for slider.");
+ RNA_def_property_ui_text(prop, "Slider Max", "Maximum for slider");
prop= RNA_def_property(srna, "data", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "data", "totelem");
@@ -448,7 +448,7 @@ static void rna_def_key(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "Key", "ID");
- RNA_def_struct_ui_text(srna, "Key", "Shape keys datablock containing different shapes of geometric datablocks.");
+ RNA_def_struct_ui_text(srna, "Key", "Shape keys datablock containing different shapes of geometric datablocks");
RNA_def_struct_ui_icon(srna, ICON_SHAPEKEY_DATA);
prop= RNA_def_property(srna, "reference_key", PROP_POINTER, PROP_NONE);
@@ -460,24 +460,24 @@ static void rna_def_key(BlenderRNA *brna)
prop= RNA_def_property(srna, "keys", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "block", NULL);
RNA_def_property_struct_type(prop, "ShapeKey");
- RNA_def_property_ui_text(prop, "Keys", "Shape keys.");
+ RNA_def_property_ui_text(prop, "Keys", "Shape keys");
rna_def_animdata_common(srna);
prop= RNA_def_property(srna, "user", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "from");
- RNA_def_property_ui_text(prop, "User", "Datablock using these shape keys.");
+ RNA_def_property_ui_text(prop, "User", "Datablock using these shape keys");
prop= RNA_def_property(srna, "relative", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "type", KEY_RELATIVE);
- RNA_def_property_ui_text(prop, "Relative", "Makes shape keys relative.");
+ RNA_def_property_ui_text(prop, "Relative", "Makes shape keys relative");
RNA_def_property_update(prop, 0, "rna_Key_update_data");
prop= RNA_def_property(srna, "slurph", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "slurph");
RNA_def_property_range(prop, -500, 500);
- RNA_def_property_ui_text(prop, "Slurph", "Creates a delay in amount of frames in applying keypositions, first vertex goes first.");
+ RNA_def_property_ui_text(prop, "Slurph", "Creates a delay in amount of frames in applying keypositions, first vertex goes first");
RNA_def_property_update(prop, 0, "rna_Key_update_data");
}
diff --git a/source/blender/makesrna/intern/rna_lamp.c b/source/blender/makesrna/intern/rna_lamp.c
index 5112e68a008..5b9913ad311 100644
--- a/source/blender/makesrna/intern/rna_lamp.c
+++ b/source/blender/makesrna/intern/rna_lamp.c
@@ -15,7 +15,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor(s): Blender Foundation (2008).
*
@@ -33,6 +33,8 @@
#include "DNA_material_types.h"
#include "DNA_texture_types.h"
+#include "BLI_math_base.h"
+
#ifdef RNA_RUNTIME
#include "MEM_guardedalloc.h"
@@ -105,7 +107,10 @@ static void rna_Lamp_update(Main *bmain, Scene *scene, PointerRNA *ptr)
Lamp *la= ptr->id.data;
DAG_id_flush_update(&la->id, 0);
- WM_main_add_notifier(NC_LAMP|ND_LIGHTING, la);
+ if(scene->gm.matmode == GAME_MAT_GLSL)
+ WM_main_add_notifier(NC_LAMP|ND_LIGHTING_DRAW, la);
+ else
+ WM_main_add_notifier(NC_LAMP|ND_LIGHTING, la);
}
static void rna_Lamp_draw_update(Main *bmain, Scene *scene, PointerRNA *ptr)
@@ -124,6 +129,20 @@ static void rna_Lamp_sky_update(Main *bmain, Scene *scene, PointerRNA *ptr)
WM_main_add_notifier(NC_LAMP|ND_SKY, la);
}
+/* only for rad/deg conversion! can remove later */
+static float rna_Lamp_spot_size_get(PointerRNA *ptr)
+{
+ Lamp *la= ptr->id.data;
+ return la->spotsize * (M_PI / 180.0);
+}
+
+static void rna_Lamp_spot_size_set(PointerRNA *ptr, float value)
+{
+ Lamp *la= ptr->id.data;
+ la->spotsize= value * (180.0 / M_PI);
+}
+
+
#else
static void rna_def_lamp_mtex(BlenderRNA *brna)
@@ -132,14 +151,14 @@ static void rna_def_lamp_mtex(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem prop_texture_coordinates_items[] = {
- {TEXCO_GLOB, "GLOBAL", 0, "Global", "Uses global coordinates for the texture coordinates."},
- {TEXCO_VIEW, "VIEW", 0, "View", "Uses view coordinates for the texture coordinates."},
- {TEXCO_OBJECT, "OBJECT", 0, "Object", "Uses linked object's coordinates for texture coordinates."},
+ {TEXCO_GLOB, "GLOBAL", 0, "Global", "Uses global coordinates for the texture coordinates"},
+ {TEXCO_VIEW, "VIEW", 0, "View", "Uses view coordinates for the texture coordinates"},
+ {TEXCO_OBJECT, "OBJECT", 0, "Object", "Uses linked object's coordinates for texture coordinates"},
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "LampTextureSlot", "TextureSlot");
RNA_def_struct_sdna(srna, "MTex");
- RNA_def_struct_ui_text(srna, "Lamp Texture Slot", "Texture slot for textures in a Lamp datablock.");
+ RNA_def_struct_ui_text(srna, "Lamp Texture Slot", "Texture slot for textures in a Lamp datablock");
prop= RNA_def_property(srna, "texture_coordinates", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "texco");
@@ -150,28 +169,28 @@ static void rna_def_lamp_mtex(BlenderRNA *brna)
RNA_def_property_pointer_sdna(prop, NULL, "object");
RNA_def_property_struct_type(prop, "Object");
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Object", "Object to use for mapping with Object texture coordinates.");
+ RNA_def_property_ui_text(prop, "Object", "Object to use for mapping with Object texture coordinates");
prop= RNA_def_property(srna, "map_color", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", LAMAP_COL);
- RNA_def_property_ui_text(prop, "Color", "Lets the texture affect the basic color of the lamp.");
+ RNA_def_property_ui_text(prop, "Color", "Lets the texture affect the basic color of the lamp");
RNA_def_property_update(prop, 0, "rna_Lamp_update");
prop= RNA_def_property(srna, "map_shadow", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", LAMAP_SHAD);
- RNA_def_property_ui_text(prop, "Shadow", "Lets the texture affect the shadow color of the lamp.");
+ RNA_def_property_ui_text(prop, "Shadow", "Lets the texture affect the shadow color of the lamp");
RNA_def_property_update(prop, 0, "rna_Lamp_update");
prop= RNA_def_property(srna, "color_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, "Color Factor", "Amount texture affects color values.");
+ RNA_def_property_ui_text(prop, "Color Factor", "Amount texture affects color values");
RNA_def_property_update(prop, 0, "rna_Lamp_update");
prop= RNA_def_property(srna, "shadow_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "shadowfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
- RNA_def_property_ui_text(prop, "Shadow Factor", "Amount texture affects shadow.");
+ RNA_def_property_ui_text(prop, "Shadow Factor", "Amount texture affects shadow");
RNA_def_property_update(prop, 0, "rna_Lamp_update");
}
@@ -208,97 +227,97 @@ static void rna_def_lamp_sky_settings(BlenderRNA *brna)
srna= RNA_def_struct(brna, "LampSkySettings", NULL);
RNA_def_struct_sdna(srna, "Lamp");
RNA_def_struct_nested(brna, srna, "SunLamp");
- RNA_def_struct_ui_text(srna, "Lamp Sky Settings", "Sky related settings for a sun lamp.");
+ RNA_def_struct_ui_text(srna, "Lamp Sky Settings", "Sky related settings for a sun lamp");
prop= RNA_def_property(srna, "sky_color_space", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "sky_colorspace");
RNA_def_property_enum_items(prop, prop_skycolorspace_items);
- RNA_def_property_ui_text(prop, "Sky Color Space", "Color space to use for internal XYZ->RGB color conversion.");
+ RNA_def_property_ui_text(prop, "Sky Color Space", "Color space to use for internal XYZ->RGB color conversion");
RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");
prop= RNA_def_property(srna, "sky_blend_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "skyblendtype");
RNA_def_property_enum_items(prop, prop_blendmode_items);
- RNA_def_property_ui_text(prop, "Sky Blend Mode", "Blend mode for combining sun sky with world sky.");
+ RNA_def_property_ui_text(prop, "Sky Blend Mode", "Blend mode for combining sun sky with world sky");
RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");
/* Number values */
prop= RNA_def_property(srna, "horizon_brightness", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 20.0f);
- RNA_def_property_ui_text(prop, "Horizon Brightness", "Horizon brightness.");
+ RNA_def_property_ui_text(prop, "Horizon Brightness", "Horizon brightness");
RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");
prop= RNA_def_property(srna, "spread", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 10.0f);
- RNA_def_property_ui_text(prop, "Horizon Spread", "Horizon Spread.");
+ RNA_def_property_ui_text(prop, "Horizon Spread", "Horizon Spread");
RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");
prop= RNA_def_property(srna, "sun_brightness", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 10.0f);
- RNA_def_property_ui_text(prop, "Sun Brightness", "Sun brightness.");
+ RNA_def_property_ui_text(prop, "Sun Brightness", "Sun brightness");
RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");
prop= RNA_def_property(srna, "sun_size", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 10.0f);
- RNA_def_property_ui_text(prop, "Sun Size", "Sun size.");
+ RNA_def_property_ui_text(prop, "Sun Size", "Sun size");
RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");
prop= RNA_def_property(srna, "backscattered_light", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, -1.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Backscattered Light", "Backscattered light.");
+ RNA_def_property_ui_text(prop, "Backscattered Light", "Backscattered light");
RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");
prop= RNA_def_property(srna, "sun_intensity", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 10.0f);
- RNA_def_property_ui_text(prop, "Sun Intensity", "Sun intensity.");
+ RNA_def_property_ui_text(prop, "Sun Intensity", "Sun intensity");
RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");
prop= RNA_def_property(srna, "atmosphere_turbidity", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "atm_turbidity");
RNA_def_property_range(prop, 1.0f, 30.0f);
- RNA_def_property_ui_text(prop, "Atmosphere Turbidity", "Sky turbidity.");
+ RNA_def_property_ui_text(prop, "Atmosphere Turbidity", "Sky turbidity");
RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");
prop= RNA_def_property(srna, "atmosphere_inscattering", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "atm_inscattering_factor");
RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Atmosphere Inscatter", "Scatter contribution factor.");
+ RNA_def_property_ui_text(prop, "Atmosphere Inscatter", "Scatter contribution factor");
RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");
prop= RNA_def_property(srna, "atmosphere_extinction", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "atm_extinction_factor");
RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Atmosphere Extinction", "Extinction scattering contribution factor.");
+ RNA_def_property_ui_text(prop, "Atmosphere Extinction", "Extinction scattering contribution factor");
RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");
prop= RNA_def_property(srna, "atmosphere_distance_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "atm_distance_factor");
RNA_def_property_range(prop, 0.0f, 500.0f);
- RNA_def_property_ui_text(prop, "Atmosphere Distance Factor", "Multiplier to convert blender units to physical distance.");
+ RNA_def_property_ui_text(prop, "Atmosphere Distance Factor", "Multiplier to convert blender units to physical distance");
RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");
prop= RNA_def_property(srna, "sky_blend", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "skyblendfac");
RNA_def_property_range(prop, 0.0f, 2.0f);
- RNA_def_property_ui_text(prop, "Sky Blend", "Blend factor with sky.");
+ RNA_def_property_ui_text(prop, "Sky Blend", "Blend factor with sky");
RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");
prop= RNA_def_property(srna, "sky_exposure", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 20.0f);
- RNA_def_property_ui_text(prop, "Sky Exposure", "Strength of sky shading exponential exposure correction.");
+ RNA_def_property_ui_text(prop, "Sky Exposure", "Strength of sky shading exponential exposure correction");
RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");
/* boolean */
- prop= RNA_def_property(srna, "sky", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "use_sky", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "sun_effect_type", LA_SUN_EFFECT_SKY);
- RNA_def_property_ui_text(prop, "Sky", "Apply sun effect on sky.");
+ RNA_def_property_ui_text(prop, "Sky", "Apply sun effect on sky");
RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");
- prop= RNA_def_property(srna, "atmosphere", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "use_atmosphere", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "sun_effect_type", LA_SUN_EFFECT_AP);
- RNA_def_property_ui_text(prop, "Atmosphere", "Apply sun effect on atmosphere.");
+ RNA_def_property_ui_text(prop, "Atmosphere", "Apply sun effect on atmosphere");
RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");
}
@@ -308,58 +327,59 @@ static void rna_def_lamp(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem prop_type_items[] = {
- {LA_LOCAL, "POINT", 0, "Point", "Omnidirectional point light source."},
- {LA_SUN, "SUN", 0, "Sun", "Constant direction parallel ray light source."},
- {LA_SPOT, "SPOT", 0, "Spot", "Directional cone light source."},
- {LA_HEMI, "HEMI", 0, "Hemi", "180 degree constant light source."},
- {LA_AREA, "AREA", 0, "Area", "Directional area light source."},
+ {LA_LOCAL, "POINT", 0, "Point", "Omnidirectional point light source"},
+ {LA_SUN, "SUN", 0, "Sun", "Constant direction parallel ray light source"},
+ {LA_SPOT, "SPOT", 0, "Spot", "Directional cone light source"},
+ {LA_HEMI, "HEMI", 0, "Hemi", "180 degree constant light source"},
+ {LA_AREA, "AREA", 0, "Area", "Directional area light source"},
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "Lamp", "ID");
RNA_def_struct_refine_func(srna, "rna_Lamp_refine");
- RNA_def_struct_ui_text(srna, "Lamp", "Lamp datablock for lighting a scene.");
+ RNA_def_struct_ui_text(srna, "Lamp", "Lamp datablock for lighting a scene");
RNA_def_struct_ui_icon(srna, ICON_LAMP_DATA);
prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_type_items);
- RNA_def_property_ui_text(prop, "Type", "Type of Lamp.");
+ RNA_def_property_ui_text(prop, "Type", "Type of Lamp");
RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
prop= RNA_def_property(srna, "distance", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "dist");
- RNA_def_property_ui_range(prop, 0, 1000, 1.0, 2);
- RNA_def_property_ui_text(prop, "Distance", "Falloff distance - the light is at half the original intensity at this point.");
+ RNA_def_property_range(prop, 0, INT_MAX);
+ RNA_def_property_ui_range(prop, 0, 1000, 1, 3);
+ RNA_def_property_ui_text(prop, "Distance", "Falloff distance - the light is at half the original intensity at this point");
RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
prop= RNA_def_property(srna, "energy", PROP_FLOAT, PROP_NONE);
- RNA_def_property_ui_range(prop, 0, 10.0, 0.1, 2);
- RNA_def_property_ui_text(prop, "Energy", "Amount of light that the lamp emits.");
- RNA_def_property_update(prop, 0, "rna_Lamp_update");
+ RNA_def_property_ui_range(prop, 0, 10, 1, 3);
+ RNA_def_property_ui_text(prop, "Energy", "Amount of light that the lamp emits");
+ RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
prop= RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "r");
RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "Color", "Light color.");
- RNA_def_property_update(prop, 0, "rna_Lamp_update");
+ RNA_def_property_ui_text(prop, "Color", "Light color");
+ RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
prop= RNA_def_property(srna, "layer", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", LA_LAYER);
- RNA_def_property_ui_text(prop, "Layer", "Illuminates objects only on the same layer the lamp is on.");
+ RNA_def_property_ui_text(prop, "Layer", "Illuminates objects only on the same layer the lamp is on");
RNA_def_property_update(prop, 0, "rna_Lamp_update");
prop= RNA_def_property(srna, "negative", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", LA_NEG);
- RNA_def_property_ui_text(prop, "Negative", "Lamp casts negative light.");
+ RNA_def_property_ui_text(prop, "Negative", "Lamp casts negative light");
RNA_def_property_update(prop, 0, "rna_Lamp_update");
prop= RNA_def_property(srna, "specular", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "mode", LA_NO_SPEC);
- RNA_def_property_ui_text(prop, "Specular", "Lamp creates specular highlights.");
+ RNA_def_property_ui_text(prop, "Specular", "Lamp creates specular highlights");
RNA_def_property_update(prop, 0, "rna_Lamp_update");
prop= RNA_def_property(srna, "diffuse", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "mode", LA_NO_DIFF);
- RNA_def_property_ui_text(prop, "Diffuse", "Lamp does diffuse shading.");
+ RNA_def_property_ui_text(prop, "Diffuse", "Lamp does diffuse shading");
RNA_def_property_update(prop, 0, "rna_Lamp_update");
/* common */
@@ -384,7 +404,7 @@ static void rna_def_lamp_falloff(StructRNA *srna)
prop= RNA_def_property(srna, "falloff_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_fallofftype_items);
- RNA_def_property_ui_text(prop, "Falloff Type", "Intensity Decay with distance.");
+ RNA_def_property_ui_text(prop, "Falloff Type", "Intensity Decay with distance");
RNA_def_property_update(prop, 0, "rna_Lamp_update");
prop= RNA_def_property(srna, "falloff_curve", PROP_POINTER, PROP_NONE);
@@ -394,20 +414,20 @@ static void rna_def_lamp_falloff(StructRNA *srna)
prop= RNA_def_property(srna, "sphere", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", LA_SPHERE);
- RNA_def_property_ui_text(prop, "Sphere", "Sets light intensity to zero beyond lamp distance.");
+ RNA_def_property_ui_text(prop, "Sphere", "Sets light intensity to zero beyond lamp distance");
RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
prop= RNA_def_property(srna, "linear_attenuation", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "att1");
RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Linear Attenuation", "Linear distance attentuation.");
- RNA_def_property_update(prop, 0, "rna_Lamp_update");
+ RNA_def_property_ui_text(prop, "Linear Attenuation", "Linear distance attentuation");
+ RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
prop= RNA_def_property(srna, "quadratic_attenuation", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "att2");
RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Quadratic Attenuation", "Quadratic distance attentuation.");
- RNA_def_property_update(prop, 0, "rna_Lamp_update");
+ RNA_def_property_ui_text(prop, "Quadratic Attenuation", "Quadratic distance attentuation");
+ RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
}
static void rna_def_lamp_shadow(StructRNA *srna, int spot, int area)
@@ -416,13 +436,13 @@ static void rna_def_lamp_shadow(StructRNA *srna, int spot, int area)
static EnumPropertyItem prop_shadow_items[] = {
{0, "NOSHADOW", 0, "No Shadow", ""},
- {LA_SHAD_RAY, "RAY_SHADOW", 0, "Ray Shadow", "Use ray tracing for shadow."},
+ {LA_SHAD_RAY, "RAY_SHADOW", 0, "Ray Shadow", "Use ray tracing for shadow"},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem prop_spot_shadow_items[] = {
{0, "NOSHADOW", 0, "No Shadow", ""},
- {LA_SHAD_BUF, "BUFFER_SHADOW", 0, "Buffer Shadow", "Lets spotlight produce shadows using shadow buffer."},
- {LA_SHAD_RAY, "RAY_SHADOW", 0, "Ray Shadow", "Use ray tracing for shadow."},
+ {LA_SHAD_BUF, "BUFFER_SHADOW", 0, "Buffer Shadow", "Lets spotlight produce shadows using shadow buffer"},
+ {LA_SHAD_RAY, "RAY_SHADOW", 0, "Ray Shadow", "Use ray tracing for shadow"},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem prop_ray_sampling_method_items[] = {
@@ -439,55 +459,55 @@ static void rna_def_lamp_shadow(StructRNA *srna, int spot, int area)
prop= RNA_def_property(srna, "shadow_method", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "mode");
RNA_def_property_enum_items(prop, (spot)? prop_spot_shadow_items: prop_shadow_items);
- RNA_def_property_ui_text(prop, "Shadow Method", "Method to compute lamp shadow with.");
+ RNA_def_property_ui_text(prop, "Shadow Method", "Method to compute lamp shadow with");
RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
prop= RNA_def_property(srna, "shadow_color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "shdwr");
RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "Shadow Color", "Color of shadows cast by the lamp.");
+ RNA_def_property_ui_text(prop, "Shadow Color", "Color of shadows cast by the lamp");
RNA_def_property_update(prop, 0, "rna_Lamp_update");
prop= RNA_def_property(srna, "only_shadow", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", LA_ONLYSHADOW);
- RNA_def_property_ui_text(prop, "Only Shadow", "Causes light to cast shadows only without illuminating objects.");
+ RNA_def_property_ui_text(prop, "Only Shadow", "Causes light to cast shadows only without illuminating objects");
RNA_def_property_update(prop, 0, "rna_Lamp_update");
prop= RNA_def_property(srna, "shadow_ray_sampling_method", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "ray_samp_method");
RNA_def_property_enum_items(prop, (area)? prop_spot_ray_sampling_method_items: prop_ray_sampling_method_items);
- RNA_def_property_ui_text(prop, "Shadow Ray Sampling Method", "Method for generating shadow samples: Adaptive QMC is fastest, Constant QMC is less noisy but slower.");
+ RNA_def_property_ui_text(prop, "Shadow Ray Sampling Method", "Method for generating shadow samples: Adaptive QMC is fastest, Constant QMC is less noisy but slower");
RNA_def_property_update(prop, 0, "rna_Lamp_update");
prop= RNA_def_property(srna, (area)? "shadow_ray_samples_x": "shadow_ray_samples", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "ray_samp");
RNA_def_property_range(prop, 1, 64);
- RNA_def_property_ui_text(prop, (area)? "Shadow Ray Samples": "Shadow Ray Samples X","Amount of samples taken extra (samples x samples).");
+ RNA_def_property_ui_text(prop, (area)? "Shadow Ray Samples": "Shadow Ray Samples X","Amount of samples taken extra (samples x samples)");
RNA_def_property_update(prop, 0, "rna_Lamp_update");
if(area) {
prop= RNA_def_property(srna, "shadow_ray_samples_y", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "ray_sampy");
RNA_def_property_range(prop, 1, 64);
- RNA_def_property_ui_text(prop, "Shadow Ray Samples Y", "Amount of samples taken extra (samples x samples).");
+ RNA_def_property_ui_text(prop, "Shadow Ray Samples Y", "Amount of samples taken extra (samples x samples)");
RNA_def_property_update(prop, 0, "rna_Lamp_update");
}
prop= RNA_def_property(srna, "shadow_adaptive_threshold", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "adapt_thresh");
RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Shadow Adaptive Threshold", "Threshold for Adaptive Sampling (Raytraced shadows).");
+ RNA_def_property_ui_text(prop, "Shadow Adaptive Threshold", "Threshold for Adaptive Sampling (Raytraced shadows)");
RNA_def_property_update(prop, 0, "rna_Lamp_update");
prop= RNA_def_property(srna, "shadow_soft_size", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "area_size");
RNA_def_property_ui_range(prop, 0, 100, 0.1, 3);
- RNA_def_property_ui_text(prop, "Shadow Soft Size", "Light size for ray shadow sampling (Raytraced shadows).");
+ RNA_def_property_ui_text(prop, "Shadow Soft Size", "Light size for ray shadow sampling (Raytraced shadows)");
RNA_def_property_update(prop, 0, "rna_Lamp_update");
prop= RNA_def_property(srna, "shadow_layer", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", LA_LAYER_SHADOW);
- RNA_def_property_ui_text(prop, "Shadow Layer", "Causes only objects on the same layer to cast shadows.");
+ RNA_def_property_ui_text(prop, "Shadow Layer", "Causes only objects on the same layer to cast shadows");
RNA_def_property_update(prop, 0, "rna_Lamp_update");
}
@@ -497,7 +517,7 @@ static void rna_def_point_lamp(BlenderRNA *brna)
srna= RNA_def_struct(brna, "PointLamp", "Lamp");
RNA_def_struct_sdna(srna, "Lamp");
- RNA_def_struct_ui_text(srna, "Point Lamp", "Omnidirectional point lamp.");
+ RNA_def_struct_ui_text(srna, "Point Lamp", "Omnidirectional point lamp");
RNA_def_struct_ui_icon(srna, ICON_LAMP_POINT);
rna_def_lamp_falloff(srna);
@@ -516,48 +536,48 @@ static void rna_def_area_lamp(BlenderRNA *brna)
srna= RNA_def_struct(brna, "AreaLamp", "Lamp");
RNA_def_struct_sdna(srna, "Lamp");
- RNA_def_struct_ui_text(srna, "Area Lamp", "Directional area lamp.");
+ RNA_def_struct_ui_text(srna, "Area Lamp", "Directional area lamp");
RNA_def_struct_ui_icon(srna, ICON_LAMP_AREA);
rna_def_lamp_shadow(srna, 0, 1);
prop= RNA_def_property(srna, "umbra", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "ray_samp_type", LA_SAMP_UMBRA);
- RNA_def_property_ui_text(prop, "Umbra", "Emphasize parts that are fully shadowed (Constant Jittered sampling).");
+ RNA_def_property_ui_text(prop, "Umbra", "Emphasize parts that are fully shadowed (Constant Jittered sampling)");
RNA_def_property_update(prop, 0, "rna_Lamp_update");
prop= RNA_def_property(srna, "dither", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "ray_samp_type", LA_SAMP_DITHER);
- RNA_def_property_ui_text(prop, "Dither", "Use 2x2 dithering for sampling (Constant Jittered sampling).");
+ RNA_def_property_ui_text(prop, "Dither", "Use 2x2 dithering for sampling (Constant Jittered sampling)");
RNA_def_property_update(prop, 0, "rna_Lamp_update");
prop= RNA_def_property(srna, "jitter", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "ray_samp_type", LA_SAMP_JITTER);
- RNA_def_property_ui_text(prop, "Jitter", "Use noise for sampling (Constant Jittered sampling).");
+ RNA_def_property_ui_text(prop, "Jitter", "Use noise for sampling (Constant Jittered sampling)");
RNA_def_property_update(prop, 0, "rna_Lamp_update");
prop= RNA_def_property(srna, "shape", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "area_shape");
RNA_def_property_enum_items(prop, prop_areashape_items);
- RNA_def_property_ui_text(prop, "Shape", "Shape of the area lamp.");
+ RNA_def_property_ui_text(prop, "Shape", "Shape of the area lamp");
RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
prop= RNA_def_property(srna, "size", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "area_size");
RNA_def_property_ui_range(prop, 0, 100, 0.1, 3);
- RNA_def_property_ui_text(prop, "Size", "Size of the area of the area Lamp, X direction size for Rectangle shapes.");
+ RNA_def_property_ui_text(prop, "Size", "Size of the area of the area Lamp, X direction size for Rectangle shapes");
RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
prop= RNA_def_property(srna, "size_y", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "area_sizey");
RNA_def_property_ui_range(prop, 0, 100, 0.1, 3);
- RNA_def_property_ui_text(prop, "Size Y", "Size of the area of the area Lamp in the Y direction for Rectangle shapes.");
+ RNA_def_property_ui_text(prop, "Size Y", "Size of the area of the area Lamp in the Y direction for Rectangle shapes");
RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
prop= RNA_def_property(srna, "gamma", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "k");
RNA_def_property_ui_range(prop, 0.001, 2.0, 0.1, 3);
- RNA_def_property_ui_text(prop, "Gamma", "Light gamma correction value.");
+ RNA_def_property_ui_text(prop, "Gamma", "Light gamma correction value");
RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
}
@@ -567,27 +587,27 @@ static void rna_def_spot_lamp(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem prop_shadbuftype_items[] = {
- {LA_SHADBUF_REGULAR , "REGULAR", 0, "Classical", "Classic shadow buffer."},
- {LA_SHADBUF_HALFWAY, "HALFWAY", 0, "Classic-Halfway", "Regular buffer, averaging the closest and 2nd closest Z value to reducing bias artifaces."},
- {LA_SHADBUF_IRREGULAR, "IRREGULAR", 0, "Irregular", "Irregular buffer produces sharp shadow always, but it doesn't show up for raytracing."},
- {LA_SHADBUF_DEEP, "DEEP", 0, "Deep", "Deep shadow buffer supports transparency and better filtering, at the cost of more memory usage and processing time."},
+ {LA_SHADBUF_REGULAR , "REGULAR", 0, "Classical", "Classic shadow buffer"},
+ {LA_SHADBUF_HALFWAY, "HALFWAY", 0, "Classic-Halfway", "Regular buffer, averaging the closest and 2nd closest Z value to reducing bias artifaces"},
+ {LA_SHADBUF_IRREGULAR, "IRREGULAR", 0, "Irregular", "Irregular buffer produces sharp shadow always, but it doesn't show up for raytracing"},
+ {LA_SHADBUF_DEEP, "DEEP", 0, "Deep", "Deep shadow buffer supports transparency and better filtering, at the cost of more memory usage and processing time"},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem prop_shadbuffiltertype_items[] = {
- {LA_SHADBUF_BOX , "BOX", 0, "Box", "Apply the Box filter to shadow buffer samples."},
- {LA_SHADBUF_TENT, "TENT", 0, "Tent", "Apply the Tent Filter to shadow buffer samples."},
- {LA_SHADBUF_GAUSS, "GAUSS", 0, "Gauss", "Apply the Gauss filter to shadow buffer samples."},
+ {LA_SHADBUF_BOX , "BOX", 0, "Box", "Apply the Box filter to shadow buffer samples"},
+ {LA_SHADBUF_TENT, "TENT", 0, "Tent", "Apply the Tent Filter to shadow buffer samples"},
+ {LA_SHADBUF_GAUSS, "GAUSS", 0, "Gauss", "Apply the Gauss filter to shadow buffer samples"},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem prop_numbuffer_items[] = {
- {1, "BUFFERS_1", 0, "1", "Only one buffer rendered."},
- {4, "BUFFERS_4", 0, "4", "Renders 4 buffers for better AA, this quadruples memory usage."},
- {9, "BUFFERS_9", 0, "9", "Renders 9 buffers for better AA, this uses nine times more memory."},
+ {1, "BUFFERS_1", 0, "1", "Only one buffer rendered"},
+ {4, "BUFFERS_4", 0, "4", "Renders 4 buffers for better AA, this quadruples memory usage"},
+ {9, "BUFFERS_9", 0, "9", "Renders 9 buffers for better AA, this uses nine times more memory"},
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "SpotLamp", "Lamp");
RNA_def_struct_sdna(srna, "Lamp");
- RNA_def_struct_ui_text(srna, "Spot Lamp", "Directional cone lamp.");
+ RNA_def_struct_ui_text(srna, "Spot Lamp", "Directional cone lamp");
RNA_def_struct_ui_icon(srna, ICON_LAMP_SPOT);
rna_def_lamp_falloff(srna);
@@ -595,24 +615,24 @@ static void rna_def_spot_lamp(BlenderRNA *brna)
prop= RNA_def_property(srna, "square", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", LA_SQUARE);
- RNA_def_property_ui_text(prop, "Square", "Casts a square spot light shape.");
+ RNA_def_property_ui_text(prop, "Square", "Casts a square spot light shape");
RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
prop= RNA_def_property(srna, "halo", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", LA_HALO);
- RNA_def_property_ui_text(prop, "Halo", "Renders spotlight with a volumetric halo (Buffer Shadows).");
+ RNA_def_property_ui_text(prop, "Halo", "Renders spotlight with a volumetric halo (Buffer Shadows)");
RNA_def_property_update(prop, 0, "rna_Lamp_update");
prop= RNA_def_property(srna, "halo_intensity", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "haint");
RNA_def_property_ui_range(prop, 0, 5.0, 0.1, 3);
- RNA_def_property_ui_text(prop, "Halo Intensity", "Brightness of the spotlight's halo cone (Buffer Shadows).");
+ RNA_def_property_ui_text(prop, "Halo Intensity", "Brightness of the spotlight's halo cone (Buffer Shadows)");
RNA_def_property_update(prop, 0, "rna_Lamp_update");
prop= RNA_def_property(srna, "halo_step", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "shadhalostep");
RNA_def_property_range(prop, 0, 12);
- RNA_def_property_ui_text(prop, "Halo Step", "Volumetric halo sampling frequency.");
+ RNA_def_property_ui_text(prop, "Halo Step", "Volumetric halo sampling frequency");
RNA_def_property_update(prop, 0, "rna_Lamp_update");
prop= RNA_def_property(srna, "shadow_buffer_size", PROP_INT, PROP_NONE);
@@ -625,25 +645,31 @@ static void rna_def_spot_lamp(BlenderRNA *brna)
prop= RNA_def_property(srna, "shadow_filter_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "filtertype");
RNA_def_property_enum_items(prop, prop_shadbuffiltertype_items);
- RNA_def_property_ui_text(prop, "Shadow Filter Type", "Type of shadow filter (Buffer Shadows).");
+ RNA_def_property_ui_text(prop, "Shadow Filter Type", "Type of shadow filter (Buffer Shadows)");
RNA_def_property_update(prop, 0, "rna_Lamp_update");
prop= RNA_def_property(srna, "shadow_sample_buffers", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "buffers");
RNA_def_property_enum_items(prop, prop_numbuffer_items);
- RNA_def_property_ui_text(prop, "Shadow Sample Buffers", "Number of shadow buffers to render for better AA, this increases memory usage.");
+ RNA_def_property_ui_text(prop, "Shadow Sample Buffers", "Number of shadow buffers to render for better AA, this increases memory usage");
RNA_def_property_update(prop, 0, "rna_Lamp_update");
prop= RNA_def_property(srna, "spot_blend", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "spotblend");
RNA_def_property_range(prop, 0.0f ,1.0f);
- RNA_def_property_ui_text(prop, "Spot Blend", "The softness of the spotlight edge.");
+ RNA_def_property_ui_text(prop, "Spot Blend", "The softness of the spotlight edge");
+ RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
+
+ prop= RNA_def_property(srna, "spot_size", PROP_FLOAT, PROP_ANGLE);
+ // RNA_def_property_float_sdna(prop, NULL, "spotsize");
+ RNA_def_property_range(prop, M_PI/180.0f, M_PI);
+ RNA_def_property_ui_text(prop, "Spot Size", "Angle of the spotlight beam in degrees");
+ RNA_def_property_float_funcs(prop, "rna_Lamp_spot_size_get", "rna_Lamp_spot_size_set", NULL); /* only for deg/rad conversion */
RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
- prop= RNA_def_property(srna, "spot_size", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "spotsize");
- RNA_def_property_range(prop, 1.0f ,180.0f);
- RNA_def_property_ui_text(prop, "Spot Size", "Angle of the spotlight beam in degrees.");
+ prop= RNA_def_property(srna, "show_cone", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "mode", LA_SHOW_CONE);
+ RNA_def_property_ui_text(prop, "Show Cone", "Draw transparent cone in 3D view to visualize which objects are contained in it");
RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
prop= RNA_def_property(srna, "shadow_buffer_clip_start", PROP_FLOAT, PROP_DISTANCE);
@@ -655,47 +681,47 @@ static void rna_def_spot_lamp(BlenderRNA *brna)
prop= RNA_def_property(srna, "shadow_buffer_clip_end", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "clipend");
RNA_def_property_range(prop, 0.0f, 9999.0f);
- RNA_def_property_ui_text(prop, "Shadow Buffer Clip End", "Shadow map clip end beyond which objects will not generate shadows.");
+ RNA_def_property_ui_text(prop, "Shadow Buffer Clip End", "Shadow map clip end beyond which objects will not generate shadows");
RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
prop= RNA_def_property(srna, "shadow_buffer_bias", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "bias");
- RNA_def_property_range(prop, 0.0f, 5.0f);
- RNA_def_property_ui_text(prop, "Shadow Buffer Bias", "Shadow buffer sampling bias.");
+ RNA_def_property_range(prop, 0.001f, 5.0f);
+ RNA_def_property_ui_text(prop, "Shadow Buffer Bias", "Shadow buffer sampling bias");
RNA_def_property_update(prop, 0, "rna_Lamp_update");
prop= RNA_def_property(srna, "shadow_buffer_soft", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "soft");
RNA_def_property_range(prop, 0.0f, 100.0f);
- RNA_def_property_ui_text(prop, "Shadow Buffer Soft", "Size of shadow buffer sampling area.");
+ RNA_def_property_ui_text(prop, "Shadow Buffer Soft", "Size of shadow buffer sampling area");
RNA_def_property_update(prop, 0, "rna_Lamp_update");
prop= RNA_def_property(srna, "shadow_buffer_samples", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "samp");
RNA_def_property_range(prop, 1, 16);
- RNA_def_property_ui_text(prop, "Samples", "Number of shadow buffer samples.");
+ RNA_def_property_ui_text(prop, "Samples", "Number of shadow buffer samples");
RNA_def_property_update(prop, 0, "rna_Lamp_update");
prop= RNA_def_property(srna, "shadow_buffer_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "buftype");
RNA_def_property_enum_items(prop, prop_shadbuftype_items);
- RNA_def_property_ui_text(prop, "Shadow Buffer Type", "Type of shadow buffer.");
+ RNA_def_property_ui_text(prop, "Shadow Buffer Type", "Type of shadow buffer");
RNA_def_property_update(prop, 0, "rna_Lamp_update");
prop= RNA_def_property(srna, "auto_clip_start", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "bufflag", LA_SHADBUF_AUTO_START);
- RNA_def_property_ui_text(prop, "Autoclip Start", "Automatic calculation of clipping-start, based on visible vertices.");
+ RNA_def_property_ui_text(prop, "Autoclip Start", "Automatic calculation of clipping-start, based on visible vertices");
RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
prop= RNA_def_property(srna, "auto_clip_end", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "bufflag", LA_SHADBUF_AUTO_END);
- RNA_def_property_ui_text(prop, "Autoclip End", "Automatic calculation of clipping-end, based on visible vertices.");
+ RNA_def_property_ui_text(prop, "Autoclip End", "Automatic calculation of clipping-end, based on visible vertices");
RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
prop= RNA_def_property(srna, "compression_threshold", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "compressthresh");
RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Compress", "Deep shadow map compression threshold.");
+ RNA_def_property_ui_text(prop, "Compress", "Deep shadow map compression threshold");
RNA_def_property_update(prop, 0, "rna_Lamp_update");
}
@@ -706,7 +732,7 @@ static void rna_def_sun_lamp(BlenderRNA *brna)
srna= RNA_def_struct(brna, "SunLamp", "Lamp");
RNA_def_struct_sdna(srna, "Lamp");
- RNA_def_struct_ui_text(srna, "Sun Lamp", "Constant direction parallel ray lamp.");
+ RNA_def_struct_ui_text(srna, "Sun Lamp", "Constant direction parallel ray lamp");
RNA_def_struct_ui_icon(srna, ICON_LAMP_SUN);
rna_def_lamp_shadow(srna, 0, 0);
@@ -716,7 +742,7 @@ static void rna_def_sun_lamp(BlenderRNA *brna)
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "LampSkySettings");
RNA_def_property_pointer_funcs(prop, "rna_Lamp_sky_settings_get", NULL, NULL);
- RNA_def_property_ui_text(prop, "Sky Settings", "Sky related settings for sun lamps.");
+ RNA_def_property_ui_text(prop, "Sky Settings", "Sky related settings for sun lamps");
rna_def_lamp_sky_settings(brna);
}
@@ -727,7 +753,7 @@ static void rna_def_hemi_lamp(BlenderRNA *brna)
srna= RNA_def_struct(brna, "HemiLamp", "Lamp");
RNA_def_struct_sdna(srna, "Lamp");
- RNA_def_struct_ui_text(srna, "Hemi Lamp", "180 degree constant lamp.");
+ RNA_def_struct_ui_text(srna, "Hemi Lamp", "180 degree constant lamp");
RNA_def_struct_ui_icon(srna, ICON_LAMP_HEMI);
}
diff --git a/source/blender/makesrna/intern/rna_lattice.c b/source/blender/makesrna/intern/rna_lattice.c
index f46ea13ba2e..b017bc830c9 100644
--- a/source/blender/makesrna/intern/rna_lattice.c
+++ b/source/blender/makesrna/intern/rna_lattice.c
@@ -15,7 +15,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor(s): Blender Foundation (2008).
*
@@ -167,7 +167,7 @@ static void rna_def_latticepoint(BlenderRNA *brna)
srna= RNA_def_struct(brna, "LatticePoint", NULL);
RNA_def_struct_sdna(srna, "BPoint");
- RNA_def_struct_ui_text(srna, "LatticePoint", "Point in the lattice grid.");
+ RNA_def_struct_ui_text(srna, "LatticePoint", "Point in the lattice grid");
prop= RNA_def_property(srna, "co", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_array(prop, 3);
@@ -184,7 +184,7 @@ static void rna_def_latticepoint(BlenderRNA *brna)
prop= RNA_def_property(srna, "groups", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_funcs(prop, "rna_LatticePoint_groups_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", 0, 0, 0);
RNA_def_property_struct_type(prop, "VertexGroupElement");
- RNA_def_property_ui_text(prop, "Groups", "Weights for the vertex groups this point is member of.");
+ RNA_def_property_ui_text(prop, "Groups", "Weights for the vertex groups this point is member of");
}
static void rna_def_lattice(BlenderRNA *brna)
@@ -199,28 +199,28 @@ static void rna_def_lattice(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "Lattice", "ID");
- RNA_def_struct_ui_text(srna, "Lattice", "Lattice datablock defining a grid for deforming other objects.");
+ RNA_def_struct_ui_text(srna, "Lattice", "Lattice datablock defining a grid for deforming other objects");
RNA_def_struct_ui_icon(srna, ICON_LATTICE_DATA);
prop= RNA_def_property(srna, "points_u", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "pntsu");
RNA_def_property_int_funcs(prop, NULL, "rna_Lattice_points_u_set", NULL);
RNA_def_property_range(prop, 1, 64);
- RNA_def_property_ui_text(prop, "U", "Points in U direction.");
+ RNA_def_property_ui_text(prop, "U", "Points in U direction");
RNA_def_property_update(prop, 0, "rna_Lattice_update_size");
prop= RNA_def_property(srna, "points_v", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "pntsv");
RNA_def_property_int_funcs(prop, NULL, "rna_Lattice_points_v_set", NULL);
RNA_def_property_range(prop, 1, 64);
- RNA_def_property_ui_text(prop, "V", "Points in V direction.");
+ RNA_def_property_ui_text(prop, "V", "Points in V direction");
RNA_def_property_update(prop, 0, "rna_Lattice_update_size");
prop= RNA_def_property(srna, "points_w", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "pntsw");
RNA_def_property_int_funcs(prop, NULL, "rna_Lattice_points_w_set", NULL);
RNA_def_property_range(prop, 1, 64);
- RNA_def_property_ui_text(prop, "W", "Points in W direction.");
+ RNA_def_property_ui_text(prop, "W", "Points in W direction");
RNA_def_property_update(prop, 0, "rna_Lattice_update_size");
prop= RNA_def_property(srna, "interpolation_type_u", PROP_ENUM, PROP_NONE);
@@ -244,7 +244,7 @@ static void rna_def_lattice(BlenderRNA *brna)
prop= RNA_def_property(srna, "outside", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", LT_OUTSIDE);
RNA_def_property_boolean_funcs(prop, NULL, "rna_Lattice_outside_set");
- RNA_def_property_ui_text(prop, "Outside", "Only draw, and take into account, the outer vertices.");
+ RNA_def_property_ui_text(prop, "Outside", "Only draw, and take into account, the outer vertices");
RNA_def_property_update(prop, 0, "rna_Lattice_update_data");
prop= RNA_def_property(srna, "shape_keys", PROP_POINTER, PROP_NONE);
@@ -254,7 +254,7 @@ static void rna_def_lattice(BlenderRNA *brna)
prop= RNA_def_property(srna, "points", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "LatticePoint");
RNA_def_property_collection_funcs(prop, "rna_Lattice_points_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", 0, 0, 0);
- RNA_def_property_ui_text(prop, "Points", "Points of the lattice.");
+ RNA_def_property_ui_text(prop, "Points", "Points of the lattice");
}
void RNA_def_lattice(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_main.c b/source/blender/makesrna/intern/rna_main.c
index b47a2d5c907..31183cf08b6 100644
--- a/source/blender/makesrna/intern/rna_main.c
+++ b/source/blender/makesrna/intern/rna_main.c
@@ -15,7 +15,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor(s): Blender Foundation (2008).
*
@@ -286,14 +286,14 @@ void RNA_def_main(BlenderRNA *brna)
int i;
srna= RNA_def_struct(brna, "Main", NULL);
- RNA_def_struct_ui_text(srna, "Main", "Main data structure representing a .blend file and all its datablocks.");
+ RNA_def_struct_ui_text(srna, "Main", "Main data structure representing a .blend file and all its datablocks");
RNA_def_struct_ui_icon(srna, ICON_BLENDER);
prop= RNA_def_property(srna, "filename", PROP_STRING, PROP_FILEPATH);
RNA_def_property_string_maxlength(prop, 240);
RNA_def_property_string_funcs(prop, "rna_Main_filename_get", "rna_Main_filename_length", "rna_Main_filename_set");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Filename", "Path to the .blend file.");
+ RNA_def_property_ui_text(prop, "Filename", "Path to the .blend file");
for(i=0; lists[i].name; i++)
{
diff --git a/source/blender/makesrna/intern/rna_main_api.c b/source/blender/makesrna/intern/rna_main_api.c
index 395a56b6e3e..8db070597fc 100644
--- a/source/blender/makesrna/intern/rna_main_api.c
+++ b/source/blender/makesrna/intern/rna_main_api.c
@@ -15,7 +15,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* The Original Code is Copyright (C) 2009 Blender Foundation.
* All rights reserved.
@@ -30,6 +30,7 @@
#include <stdio.h>
#include "RNA_define.h"
+#include "RNA_access.h"
#include "RNA_types.h"
#include "RNA_enum_types.h"
@@ -38,6 +39,7 @@
#ifdef RNA_RUNTIME
#include "BKE_main.h"
+#include "BKE_curve.h"
#include "BKE_mesh.h"
#include "BKE_armature.h"
#include "BKE_library.h"
@@ -47,6 +49,8 @@
#include "BKE_texture.h"
#include "BKE_scene.h"
#include "BKE_text.h"
+#include "BKE_action.h"
+#include "BKE_group.h"
#include "DNA_armature_types.h"
#include "DNA_camera_types.h"
@@ -55,6 +59,8 @@
#include "DNA_mesh_types.h"
#include "DNA_object_types.h"
#include "DNA_text_types.h"
+#include "DNA_texture_types.h"
+#include "DNA_group_types.h"
#include "ED_screen.h"
@@ -63,8 +69,6 @@ Tex *rna_Main_add_texture(Main *bmain, char *name)
return add_texture(name);
}
-/* TODO: remove texture? */
-
Image *rna_Main_add_image(Main *bmain, char *filename)
{
return BKE_add_image_file(filename, 0);
@@ -76,10 +80,10 @@ Camera *rna_Main_cameras_new(Main *bmain, char* name)
}
void rna_Main_cameras_remove(Main *bmain, ReportList *reports, struct Camera *camera)
{
- if(camera->id.us == 0)
+ if(ID_REAL_USERS(camera) <= 0)
free_libblock(&bmain->camera, camera);
else
- BKE_reportf(reports, RPT_ERROR, "Camera \"%s\" must have zero users to be removed, found %d.", camera->id.name+2, camera->id.us);
+ BKE_reportf(reports, RPT_ERROR, "Camera \"%s\" must have zero users to be removed, found %d.", camera->id.name+2, ID_REAL_USERS(camera));
/* XXX python now has invalid pointer? */
}
@@ -107,12 +111,54 @@ void rna_Main_scenes_remove(Main *bmain, bContext *C, ReportList *reports, struc
unlink_scene(bmain, scene, newscene);
}
-Object *rna_Main_objects_new(Main *bmain, char* name, int type)
-{
- Object *ob= add_only_object(type, name);
+Object *rna_Main_objects_new(Main *bmain, ReportList *reports, char* name, ID *data)
+{
+ Object *ob;
+ int type= OB_EMPTY;
+ if(data) {
+ switch(GS(data->name)) {
+ case ID_ME:
+ type= OB_MESH;
+ break;
+ case ID_CU:
+ type= curve_type((struct Curve *)data);
+ break;
+ case ID_MB:
+ type= OB_MBALL;
+ break;
+ case ID_LA:
+ type= OB_LAMP;
+ break;
+ case ID_CA:
+ type= OB_CAMERA;
+ break;
+ case ID_LT:
+ type= OB_LATTICE;
+ break;
+ case ID_AR:
+ type= OB_ARMATURE;
+ break;
+ default:
+ {
+ const char *idname;
+ if(RNA_enum_id_from_value(id_type_items, GS(data->name), &idname) == 0)
+ idname= "UNKNOWN";
+
+ BKE_reportf(reports, RPT_ERROR, "ID type '%s' is not valid for a object.", idname);
+ return NULL;
+ }
+ }
+
+ data->us++;
+ }
+
+ ob= add_only_object(type, name);
ob->id.us--;
+
+ ob->data= data;
return ob;
}
+
void rna_Main_objects_remove(Main *bmain, ReportList *reports, struct Object *object)
{
/*
@@ -127,10 +173,10 @@ void rna_Main_objects_remove(Main *bmain, ReportList *reports, struct Object *ob
# don't do this since ob is already freed!
bpy.data.remove_object(ob)
*/
- if(object->id.us == 0)
+ if(ID_REAL_USERS(object) <= 0)
free_libblock(&bmain->object, object);
else
- BKE_reportf(reports, RPT_ERROR, "Object \"%s\" must have zero users to be removed, found %d.", object->id.name+2, object->id.us);
+ BKE_reportf(reports, RPT_ERROR, "Object \"%s\" must have zero users to be removed, found %d.", object->id.name+2, ID_REAL_USERS(object));
}
struct Material *rna_Main_materials_new(Main *bmain, char* name)
@@ -139,10 +185,10 @@ struct Material *rna_Main_materials_new(Main *bmain, char* name)
}
void rna_Main_materials_remove(Main *bmain, ReportList *reports, struct Material *material)
{
- if(material->id.us == 0)
+ if(ID_REAL_USERS(material) <= 0)
free_libblock(&bmain->mat, material);
else
- BKE_reportf(reports, RPT_ERROR, "Material \"%s\" must have zero users to be removed, found %d.", material->id.name+2, material->id.us);
+ BKE_reportf(reports, RPT_ERROR, "Material \"%s\" must have zero users to be removed, found %d.", material->id.name+2, ID_REAL_USERS(material));
/* XXX python now has invalid pointer? */
}
@@ -155,10 +201,10 @@ Mesh *rna_Main_meshes_new(Main *bmain, char* name)
}
void rna_Main_meshes_remove(Main *bmain, ReportList *reports, Mesh *mesh)
{
- if(mesh->id.us == 0)
+ if(ID_REAL_USERS(mesh) <= 0)
free_libblock(&bmain->mesh, mesh);
else
- BKE_reportf(reports, RPT_ERROR, "Mesh \"%s\" must have zero users to be removed, found %d.", mesh->id.name+2, mesh->id.us);
+ BKE_reportf(reports, RPT_ERROR, "Mesh \"%s\" must have zero users to be removed, found %d.", mesh->id.name+2, ID_REAL_USERS(mesh));
/* XXX python now has invalid pointer? */
}
@@ -171,11 +217,37 @@ Lamp *rna_Main_lamps_new(Main *bmain, char* name)
}
void rna_Main_lamps_remove(Main *bmain, ReportList *reports, Lamp *lamp)
{
- if(lamp->id.us == 0)
+ if(ID_REAL_USERS(lamp) <= 0)
free_libblock(&bmain->lamp, lamp);
else
- BKE_reportf(reports, RPT_ERROR, "Lamp \"%s\" must have zero users to be removed, found %d.", lamp->id.name+2, lamp->id.us);
+ BKE_reportf(reports, RPT_ERROR, "Lamp \"%s\" must have zero users to be removed, found %d.", lamp->id.name+2, ID_REAL_USERS(lamp));
+
+ /* XXX python now has invalid pointer? */
+}
+
+Tex *rna_Main_textures_new(Main *bmain, char* name)
+{
+ Tex *tex= add_texture(name);
+ tex->id.us--;
+ return tex;
+}
+void rna_Main_textures_remove(Main *bmain, ReportList *reports, struct Tex *tex)
+{
+ if(ID_REAL_USERS(tex) <= 0)
+ free_libblock(&bmain->tex, tex);
+ else
+ BKE_reportf(reports, RPT_ERROR, "Texture \"%s\" must have zero users to be removed, found %d.", tex->id.name+2, ID_REAL_USERS(tex));
+}
+Group *rna_Main_groups_new(Main *bmain, char* name)
+{
+ return add_group(name);
+}
+void rna_Main_groups_remove(Main *bmain, ReportList *reports, Group *group)
+{
+ unlink_group(group);
+ group->id.us= 0;
+ free_libblock(&bmain->group, group);
/* XXX python now has invalid pointer? */
}
@@ -206,10 +278,27 @@ bArmature *rna_Main_armatures_new(Main *bmain, char* name)
}
void rna_Main_armatures_remove(Main *bmain, ReportList *reports, bArmature *arm)
{
- if(arm->id.us == 0)
+ if(ID_REAL_USERS(arm) <= 0)
free_libblock(&bmain->armature, arm);
else
- BKE_reportf(reports, RPT_ERROR, "Armature \"%s\" must have zero users to be removed, found %d.", arm->id.name+2, arm->id.us);
+ BKE_reportf(reports, RPT_ERROR, "Armature \"%s\" must have zero users to be removed, found %d.", arm->id.name+2, ID_REAL_USERS(arm));
+
+ /* XXX python now has invalid pointer? */
+}
+
+bAction *rna_Main_actions_new(Main *bmain, char* name)
+{
+ bAction *act= add_empty_action(name);
+ act->id.us--;
+ act->id.flag &= ~LIB_FAKEUSER;
+ return act;
+}
+void rna_Main_actions_remove(Main *bmain, ReportList *reports, bAction *act)
+{
+ if(ID_REAL_USERS(act) <= 0)
+ free_libblock(&bmain->action, act);
+ else
+ BKE_reportf(reports, RPT_ERROR, "Action \"%s\" must have zero users to be removed, found %d.", act->id.name+2, ID_REAL_USERS(act));
/* XXX python now has invalid pointer? */
}
@@ -221,12 +310,6 @@ void RNA_api_main(StructRNA *srna)
FunctionRNA *func;
PropertyRNA *parm;
- func= RNA_def_function(srna, "add_texture", "rna_Main_add_texture");
- RNA_def_function_ui_description(func, "Add a new texture.");
- parm= RNA_def_string(func, "name", "Tex", 0, "", "New name for the datablock."); /* optional */
- parm= RNA_def_pointer(func, "texture", "Texture", "", "New texture.");
- RNA_def_function_return(func, parm);
-
func= RNA_def_function(srna, "add_image", "rna_Main_add_image");
RNA_def_function_ui_description(func, "Add a new image.");
parm= RNA_def_string(func, "filename", "", 0, "", "Filename to load image from.");
@@ -244,7 +327,7 @@ void RNA_def_main_cameras(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_property_srna(cprop, "MainCameras");
srna= RNA_def_struct(brna, "MainCameras", NULL);
- RNA_def_struct_ui_text(srna, "Main Cameras", "Collection of cameras.");
+ RNA_def_struct_ui_text(srna, "Main Cameras", "Collection of cameras");
func= RNA_def_function(srna, "new", "rna_Main_cameras_new");
RNA_def_function_ui_description(func, "Add a new camera to the main database");
@@ -269,7 +352,7 @@ void RNA_def_main_scenes(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_property_srna(cprop, "MainScenes");
srna= RNA_def_struct(brna, "MainScenes", NULL);
- RNA_def_struct_ui_text(srna, "Main Scenes", "Collection of scenes.");
+ RNA_def_struct_ui_text(srna, "Main Scenes", "Collection of scenes");
func= RNA_def_function(srna, "new", "rna_Main_scenes_new");
RNA_def_function_ui_description(func, "Add a new scene to the main database");
@@ -295,13 +378,14 @@ void RNA_def_main_objects(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_property_srna(cprop, "MainObjects");
srna= RNA_def_struct(brna, "MainObjects", NULL);
- RNA_def_struct_ui_text(srna, "Main Objects", "Collection of objects.");
+ RNA_def_struct_ui_text(srna, "Main Objects", "Collection of objects");
func= RNA_def_function(srna, "new", "rna_Main_objects_new");
+ RNA_def_function_flag(func, FUNC_USE_REPORTS);
RNA_def_function_ui_description(func, "Add a new object to the main database");
parm= RNA_def_string(func, "name", "Object", 0, "", "New name for the datablock.");
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_enum(func, "type", object_type_items, 0, "", "Type of Object.");
+ parm= RNA_def_pointer(func, "object_data", "ID", "", "Object data or None for an empty object.");
RNA_def_property_flag(parm, PROP_REQUIRED);
/* return type */
@@ -323,7 +407,7 @@ void RNA_def_main_materials(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_property_srna(cprop, "MainMaterials");
srna= RNA_def_struct(brna, "MainMaterials", NULL);
- RNA_def_struct_ui_text(srna, "Main Material", "Collection of materials.");
+ RNA_def_struct_ui_text(srna, "Main Material", "Collection of materials");
func= RNA_def_function(srna, "new", "rna_Main_materials_new");
RNA_def_function_ui_description(func, "Add a new material to the main database");
@@ -351,7 +435,7 @@ void RNA_def_main_meshes(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_property_srna(cprop, "MainMeshes");
srna= RNA_def_struct(brna, "MainMeshes", NULL);
- RNA_def_struct_ui_text(srna, "Main Meshes", "Collection of meshes.");
+ RNA_def_struct_ui_text(srna, "Main Meshes", "Collection of meshes");
func= RNA_def_function(srna, "new", "rna_Main_meshes_new");
RNA_def_function_ui_description(func, "Add a new mesh to the main database");
@@ -375,7 +459,7 @@ void RNA_def_main_lamps(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_property_srna(cprop, "MainLamps");
srna= RNA_def_struct(brna, "MainLamps", NULL);
- RNA_def_struct_ui_text(srna, "Main Lamps", "Collection of lamps.");
+ RNA_def_struct_ui_text(srna, "Main Lamps", "Collection of lamps");
func= RNA_def_function(srna, "new", "rna_Main_lamps_new");
RNA_def_function_ui_description(func, "Add a new lamp to the main database");
@@ -425,7 +509,27 @@ void RNA_def_main_vfonts(BlenderRNA *brna, PropertyRNA *cprop)
}
void RNA_def_main_textures(BlenderRNA *brna, PropertyRNA *cprop)
{
+ StructRNA *srna;
+ FunctionRNA *func;
+ PropertyRNA *parm;
+
+ RNA_def_property_srna(cprop, "MainTextures");
+ srna= RNA_def_struct(brna, "MainTextures", NULL);
+ RNA_def_struct_ui_text(srna, "Main Textures", "Collection of groups");
+
+ func= RNA_def_function(srna, "new", "rna_Main_textures_new");
+ RNA_def_function_ui_description(func, "Add a new texture to the main database");
+ parm= RNA_def_string(func, "name", "Texture", 0, "", "New name for the datablock.");
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+ /* return type */
+ parm= RNA_def_pointer(func, "texture", "Texture", "", "New texture datablock.");
+ RNA_def_function_return(func, parm);
+ func= RNA_def_function(srna, "remove", "rna_Main_textures_remove");
+ RNA_def_function_flag(func, FUNC_USE_REPORTS);
+ RNA_def_function_ui_description(func, "Remove a texture from the current blendfile.");
+ parm= RNA_def_pointer(func, "texture", "Texture", "", "Texture to remove.");
+ RNA_def_property_flag(parm, PROP_REQUIRED);
}
void RNA_def_main_brushes(BlenderRNA *brna, PropertyRNA *cprop)
{
@@ -437,7 +541,27 @@ void RNA_def_main_worlds(BlenderRNA *brna, PropertyRNA *cprop)
}
void RNA_def_main_groups(BlenderRNA *brna, PropertyRNA *cprop)
{
+ StructRNA *srna;
+ FunctionRNA *func;
+ PropertyRNA *parm;
+ RNA_def_property_srna(cprop, "MainGroups");
+ srna= RNA_def_struct(brna, "MainGroups", NULL);
+ RNA_def_struct_ui_text(srna, "Main Groups", "Collection of groups");
+
+ func= RNA_def_function(srna, "new", "rna_Main_groups_new");
+ RNA_def_function_ui_description(func, "Add a new group to the main database");
+ parm= RNA_def_string(func, "name", "Group", 0, "", "New name for the datablock.");
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+ /* return type */
+ parm= RNA_def_pointer(func, "group", "Group", "", "New group datablock.");
+ RNA_def_function_return(func, parm);
+
+ func= RNA_def_function(srna, "remove", "rna_Main_groups_remove");
+ RNA_def_function_flag(func, FUNC_USE_REPORTS);
+ RNA_def_function_ui_description(func, "Remove a group from the current blendfile.");
+ parm= RNA_def_pointer(func, "group", "Group", "", "Group to remove.");
+ RNA_def_property_flag(parm, PROP_REQUIRED);
}
void RNA_def_main_texts(BlenderRNA *brna, PropertyRNA *cprop)
{
@@ -447,7 +571,7 @@ void RNA_def_main_texts(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_property_srna(cprop, "MainTexts");
srna= RNA_def_struct(brna, "MainTexts", NULL);
- RNA_def_struct_ui_text(srna, "Main Texts", "Collection of texts.");
+ RNA_def_struct_ui_text(srna, "Main Texts", "Collection of texts");
func= RNA_def_function(srna, "new", "rna_Main_texts_new");
RNA_def_function_ui_description(func, "Add a new text to the main database");
@@ -485,7 +609,7 @@ void RNA_def_main_armatures(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_property_srna(cprop, "MainArmatures");
srna= RNA_def_struct(brna, "MainArmatures", NULL);
- RNA_def_struct_ui_text(srna, "Main Armatures", "Collection of armatures.");
+ RNA_def_struct_ui_text(srna, "Main Armatures", "Collection of armatures");
func= RNA_def_function(srna, "new", "rna_Main_armatures_new");
RNA_def_function_ui_description(func, "Add a new armature to the main database");
@@ -503,7 +627,27 @@ void RNA_def_main_armatures(BlenderRNA *brna, PropertyRNA *cprop)
}
void RNA_def_main_actions(BlenderRNA *brna, PropertyRNA *cprop)
{
+ StructRNA *srna;
+ FunctionRNA *func;
+ PropertyRNA *parm;
+ RNA_def_property_srna(cprop, "MainActions");
+ srna= RNA_def_struct(brna, "MainActions", NULL);
+ RNA_def_struct_ui_text(srna, "Main Actions", "Collection of actions");
+
+ func= RNA_def_function(srna, "new", "rna_Main_actions_new");
+ RNA_def_function_ui_description(func, "Add a new action to the main database");
+ parm= RNA_def_string(func, "name", "Action", 0, "", "New name for the datablock.");
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+ /* return type */
+ parm= RNA_def_pointer(func, "action", "Action", "", "New action datablock.");
+ RNA_def_function_return(func, parm);
+
+ func= RNA_def_function(srna, "remove", "rna_Main_actions_remove");
+ RNA_def_function_flag(func, FUNC_USE_REPORTS);
+ RNA_def_function_ui_description(func, "Remove a action from the current blendfile.");
+ parm= RNA_def_pointer(func, "action", "Action", "", "Action to remove.");
+ RNA_def_property_flag(parm, PROP_REQUIRED);
}
void RNA_def_main_particles(BlenderRNA *brna, PropertyRNA *cprop)
{
diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c
index b69e5130c0f..361aec5260c 100644
--- a/source/blender/makesrna/intern/rna_material.c
+++ b/source/blender/makesrna/intern/rna_material.c
@@ -15,7 +15,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor(s): Blender Foundation (2008), Nathan Letwory
*
@@ -37,17 +37,17 @@
#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."},
+{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
@@ -69,7 +69,10 @@ static void rna_Material_update(Main *bmain, Scene *scene, PointerRNA *ptr)
Material *ma= ptr->id.data;
DAG_id_flush_update(&ma->id, 0);
- WM_main_add_notifier(NC_MATERIAL|ND_SHADING, ma);
+ if(scene->gm.matmode == GAME_MAT_GLSL)
+ WM_main_add_notifier(NC_MATERIAL|ND_SHADING_DRAW, ma);
+ else
+ WM_main_add_notifier(NC_MATERIAL|ND_SHADING, ma);
}
static void rna_Material_draw_update(Main *bmain, Scene *scene, PointerRNA *ptr)
@@ -283,10 +286,10 @@ static void rna_def_material_mtex(BlenderRNA *brna)
PropertyRNA *prop;
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."},
- {MTEX_TUBE, "TUBE", 0, "Tube", "Maps with Z as central axis."},
- {MTEX_SPHERE, "SPHERE", 0, "Sphere", "Maps with Z as central axis."},
+ {MTEX_FLAT, "FLAT", 0, "Flat", "Maps X and Y coordinates directly"},
+ {MTEX_CUBE, "CUBE", 0, "Cube", "Maps using the normal vector"},
+ {MTEX_TUBE, "TUBE", 0, "Tube", "Maps with Z as central axis"},
+ {MTEX_SPHERE, "SPHERE", 0, "Sphere", "Maps with Z as central axis"},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem prop_x_mapping_items[] = {
@@ -319,7 +322,7 @@ static void rna_def_material_mtex(BlenderRNA *brna)
srna= RNA_def_struct(brna, "MaterialTextureSlot", "TextureSlot");
RNA_def_struct_sdna(srna, "MTex");
- RNA_def_struct_ui_text(srna, "Material Texture Slot", "Texture slot for textures in a Material datablock.");
+ RNA_def_struct_ui_text(srna, "Material Texture Slot", "Texture slot for textures in a Material datablock");
prop= RNA_def_property(srna, "texture_coordinates", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "texco");
@@ -332,22 +335,22 @@ static void rna_def_material_mtex(BlenderRNA *brna)
RNA_def_property_pointer_sdna(prop, NULL, "object");
RNA_def_property_struct_type(prop, "Object");
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Object", "Object to use for mapping with Object texture coordinates.");
+ RNA_def_property_ui_text(prop, "Object", "Object to use for mapping with Object texture coordinates");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "uv_layer", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "uvname");
- RNA_def_property_ui_text(prop, "UV Layer", "UV layer to use for mapping with UV texture coordinates.");
+ RNA_def_property_ui_text(prop, "UV Layer", "UV layer to use for mapping with UV texture coordinates");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "from_dupli", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "texflag", MTEX_DUPLI_MAPTO);
- RNA_def_property_ui_text(prop, "From Dupli", "Dupli's instanced from verts, faces or particles, inherit texture coordinate from their parent.");
+ RNA_def_property_ui_text(prop, "From Dupli", "Dupli's instanced from verts, faces or particles, inherit texture coordinate from their parent");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "from_original", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "texflag", MTEX_OB_DUPLI_ORIG);
- RNA_def_property_ui_text(prop, "From Original", "Dupli's derive their object coordinates from the original objects transformation.");
+ RNA_def_property_ui_text(prop, "From Original", "Dupli's derive their object coordinates from the original objects transformation");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "map_colordiff", PROP_BOOLEAN, PROP_NONE);
@@ -451,86 +454,86 @@ static void rna_def_material_mtex(BlenderRNA *brna)
prop= RNA_def_property(srna, "normal_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "norfac");
- RNA_def_property_ui_range(prop, 0, 5, 10, 3);
- RNA_def_property_ui_text(prop, "Normal Factor", "Amount texture affects normal values.");
+ RNA_def_property_ui_range(prop, -5, 5, 10, 3);
+ RNA_def_property_ui_text(prop, "Normal Factor", "Amount texture affects normal values");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "displacement_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "dispfac");
- RNA_def_property_ui_range(prop, 0, 1, 10, 3);
- RNA_def_property_ui_text(prop, "Displacement Factor", "Amount texture displaces the surface.");
+ RNA_def_property_ui_range(prop, -1, 1, 10, 3);
+ RNA_def_property_ui_text(prop, "Displacement Factor", "Amount texture displaces the surface");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "warp_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "warpfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
- RNA_def_property_ui_text(prop, "Warp Factor", "Amount texture affects texture coordinates of next channels.");
+ RNA_def_property_ui_text(prop, "Warp Factor", "Amount texture affects texture coordinates of next channels");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "colorspec_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "colspecfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
- RNA_def_property_ui_text(prop, "Specular Color Factor", "Amount texture affects specular color.");
+ RNA_def_property_ui_text(prop, "Specular Color Factor", "Amount texture affects specular color");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "colordiff_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, "Diffuse Color Factor", "Amount texture affects diffuse color.");
+ RNA_def_property_ui_text(prop, "Diffuse Color Factor", "Amount texture affects diffuse color");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "mirror_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "mirrfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
- RNA_def_property_ui_text(prop, "Mirror Factor", "Amount texture affects mirror color.");
+ RNA_def_property_ui_text(prop, "Mirror Factor", "Amount texture affects mirror color");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "alpha_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "alphafac");
- RNA_def_property_ui_range(prop, 0, 1, 10, 3);
- RNA_def_property_ui_text(prop, "Alpha Factor", "Amount texture affects alpha.");
+ RNA_def_property_ui_range(prop, -1, 1, 10, 3);
+ RNA_def_property_ui_text(prop, "Alpha Factor", "Amount texture affects alpha");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "diffuse_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "difffac");
- RNA_def_property_ui_range(prop, 0, 1, 10, 3);
- RNA_def_property_ui_text(prop, "Diffuse Factor", "Amount texture affects diffuse reflectivity.");
+ RNA_def_property_ui_range(prop, -1, 1, 10, 3);
+ RNA_def_property_ui_text(prop, "Diffuse Factor", "Amount texture affects diffuse reflectivity");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "specular_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "specfac");
- RNA_def_property_ui_range(prop, 0, 1, 10, 3);
- RNA_def_property_ui_text(prop, "Specular Factor", "Amount texture affects specular reflectivity.");
+ RNA_def_property_ui_range(prop, -1, 1, 10, 3);
+ RNA_def_property_ui_text(prop, "Specular Factor", "Amount texture affects specular reflectivity");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "emit_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "emitfac");
- RNA_def_property_ui_range(prop, 0, 1, 10, 3);
- RNA_def_property_ui_text(prop, "Emit Factor", "Amount texture affects emission.");
+ RNA_def_property_ui_range(prop, -1, 1, 10, 3);
+ RNA_def_property_ui_text(prop, "Emit Factor", "Amount texture affects emission");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "hardness_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "hardfac");
- RNA_def_property_ui_range(prop, 0, 1, 10, 3);
- RNA_def_property_ui_text(prop, "Hardness Factor", "Amount texture affects hardness.");
+ RNA_def_property_ui_range(prop, -1, 1, 10, 3);
+ RNA_def_property_ui_text(prop, "Hardness Factor", "Amount texture affects hardness");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "raymir_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "raymirrfac");
- RNA_def_property_ui_range(prop, 0, 1, 10, 3);
- RNA_def_property_ui_text(prop, "Ray Mirror Factor", "Amount texture affects ray mirror.");
+ RNA_def_property_ui_range(prop, -1, 1, 10, 3);
+ RNA_def_property_ui_text(prop, "Ray Mirror Factor", "Amount texture affects ray mirror");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "translucency_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "translfac");
- RNA_def_property_ui_range(prop, 0, 1, 10, 3);
- RNA_def_property_ui_text(prop, "Translucency Factor", "Amount texture affects translucency.");
+ RNA_def_property_ui_range(prop, -1, 1, 10, 3);
+ RNA_def_property_ui_text(prop, "Translucency Factor", "Amount texture affects translucency");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "ambient_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ambfac");
- RNA_def_property_ui_range(prop, 0, 1, 10, 3);
- RNA_def_property_ui_text(prop, "Ambient Factor", "Amount texture affects ambient.");
+ RNA_def_property_ui_range(prop, -1, 1, 10, 3);
+ RNA_def_property_ui_text(prop, "Ambient Factor", "Amount texture affects ambient");
RNA_def_property_update(prop, 0, "rna_Material_update");
/* volume material */
@@ -572,7 +575,7 @@ static void rna_def_material_mtex(BlenderRNA *brna)
prop= RNA_def_property(srna, "coloremission_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "colemitfac");
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_ui_text(prop, "Emission Color Factor", "Amount texture affects emission color");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "colorreflection_factor", PROP_FLOAT, PROP_NONE);
@@ -584,43 +587,43 @@ static void rna_def_material_mtex(BlenderRNA *brna)
prop= RNA_def_property(srna, "colortransmission_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "coltransfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
- RNA_def_property_ui_text(prop, "Transmission Color Factor", "Amount texture affects result color after light has been scattered/absorbed.");
+ RNA_def_property_ui_text(prop, "Transmission Color Factor", "Amount texture affects result color after light has been scattered/absorbed");
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, "densfac");
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_ui_text(prop, "Density Factor", "Amount texture affects density");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "emission_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "emitfac");
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_ui_text(prop, "Emission Factor", "Amount texture affects emission");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "scattering_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "scatterfac");
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_ui_text(prop, "Scattering Factor", "Amount texture affects scattering");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "reflection_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "reflfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
- RNA_def_property_ui_text(prop, "Reflection Factor", "Amount texture affects brightness of out-scattered light.");
+ RNA_def_property_ui_text(prop, "Reflection Factor", "Amount texture affects brightness of out-scattered light");
RNA_def_property_update(prop, 0, "rna_Material_update");
/* 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.");
+ RNA_def_property_ui_text(prop, "Enabled", "Enable this material texture slot");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "new_bump", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "texflag", MTEX_NEW_BUMP);
- RNA_def_property_ui_text(prop, "New Bump", "Use new, corrected bump mapping code (backwards compatibility option).");
+ RNA_def_property_ui_text(prop, "New Bump", "Use new, corrected bump mapping code (backwards compatibility option)");
RNA_def_property_update(prop, 0, "rna_Material_update");
}
@@ -665,49 +668,49 @@ static void rna_def_material_colors(StructRNA *srna)
prop= RNA_def_property(srna, "specular_color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "specr");
RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "Specular Color", "Specular color of the material.");
+ RNA_def_property_ui_text(prop, "Specular Color", "Specular color of the material");
RNA_def_property_update(prop, 0, "rna_Material_draw_update");
prop= RNA_def_property(srna, "mirror_color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "mirr");
RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "Mirror Color", "Mirror color of the material.");
+ RNA_def_property_ui_text(prop, "Mirror Color", "Mirror color of the material");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "alpha", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Alpha", "Alpha transparency of the material.");
+ RNA_def_property_ui_text(prop, "Alpha", "Alpha transparency of the material");
RNA_def_property_update(prop, 0, "rna_Material_draw_update");
prop= RNA_def_property(srna, "specular_alpha", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "spectra");
RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Specular Alpha", "Alpha transparency for specular areas.");
+ RNA_def_property_ui_text(prop, "Specular Alpha", "Alpha transparency for specular areas");
RNA_def_property_update(prop, 0, "rna_Material_update");
/* Color bands */
prop= RNA_def_property(srna, "use_diffuse_ramp", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_RAMP_COL);
RNA_def_property_boolean_funcs(prop, NULL, "rna_Material_use_diffuse_ramp_set");
- RNA_def_property_ui_text(prop, "Use Diffuse Ramp", "Toggle diffuse ramp operations.");
+ RNA_def_property_ui_text(prop, "Use Diffuse Ramp", "Toggle diffuse ramp operations");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "diffuse_ramp", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "ramp_col");
RNA_def_property_struct_type(prop, "ColorRamp");
- RNA_def_property_ui_text(prop, "Diffuse Ramp", "Color ramp used to affect diffuse shading.");
+ RNA_def_property_ui_text(prop, "Diffuse Ramp", "Color ramp used to affect diffuse shading");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "use_specular_ramp", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_RAMP_SPEC);
RNA_def_property_boolean_funcs(prop, NULL, "rna_Material_use_specular_ramp_set");
- RNA_def_property_ui_text(prop, "Use Specular Ramp", "Toggle specular ramp operations.");
+ RNA_def_property_ui_text(prop, "Use Specular Ramp", "Toggle specular ramp operations");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "specular_ramp", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "ramp_spec");
RNA_def_property_struct_type(prop, "ColorRamp");
- RNA_def_property_ui_text(prop, "Specular Ramp", "Color ramp used to affect specular shading.");
+ RNA_def_property_ui_text(prop, "Specular Ramp", "Color ramp used to affect specular shading");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "diffuse_ramp_blend", PROP_ENUM, PROP_NONE);
@@ -737,13 +740,13 @@ static void rna_def_material_colors(StructRNA *srna)
prop= RNA_def_property(srna, "diffuse_ramp_factor", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "rampfac_col");
RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Diffuse Ramp Factor", "Blending factor (also uses alpha in Colorband).");
+ RNA_def_property_ui_text(prop, "Diffuse Ramp Factor", "Blending factor (also uses alpha in Colorband)");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "specular_ramp_factor", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "rampfac_spec");
RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Specular Ramp Factor", "Blending factor (also uses alpha in Colorband).");
+ RNA_def_property_ui_text(prop, "Specular Ramp Factor", "Blending factor (also uses alpha in Colorband)");
RNA_def_property_update(prop, 0, "rna_Material_update");
}
@@ -768,7 +771,7 @@ static void rna_def_material_diffuse(StructRNA *srna)
prop= RNA_def_property(srna, "diffuse_intensity", PROP_FLOAT, PROP_FACTOR);
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 Intensity", "Amount of diffuse reflection");
RNA_def_property_update(prop, 0, "rna_Material_draw_update");
prop= RNA_def_property(srna, "roughness", PROP_FLOAT, PROP_NONE);
@@ -779,30 +782,30 @@ static void rna_def_material_diffuse(StructRNA *srna)
prop= RNA_def_property(srna, "diffuse_toon_size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "param[0]");
RNA_def_property_range(prop, 0.0f, 3.14f);
- RNA_def_property_ui_text(prop, "Diffuse Toon Size", "Size of diffuse toon area.");
+ RNA_def_property_ui_text(prop, "Diffuse Toon Size", "Size of diffuse toon area");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "diffuse_toon_smooth", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "param[1]");
RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Diffuse Toon Smooth", "Smoothness of diffuse toon area.");
+ RNA_def_property_ui_text(prop, "Diffuse Toon Smooth", "Smoothness of diffuse toon area");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "diffuse_fresnel", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "param[1]");
RNA_def_property_range(prop, 0.0f, 5.0f);
- RNA_def_property_ui_text(prop, "Diffuse Fresnel", "Power of Fresnel.");
+ RNA_def_property_ui_text(prop, "Diffuse Fresnel", "Power of Fresnel");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "diffuse_fresnel_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "param[0]");
RNA_def_property_range(prop, 0.0f, 5.0f);
- RNA_def_property_ui_text(prop, "Diffuse Fresnel Factor", "Blending factor of Frensel.");
+ RNA_def_property_ui_text(prop, "Diffuse Fresnel Factor", "Blending factor of Frensel");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "darkness", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 2.0f);
- RNA_def_property_ui_text(prop, "Darkness", "Minnaert darkness.");
+ RNA_def_property_ui_text(prop, "Darkness", "Minnaert darkness");
RNA_def_property_update(prop, 0, "rna_Material_update");
}
@@ -819,71 +822,71 @@ static void rna_def_material_raymirror(BlenderRNA *brna)
srna= RNA_def_struct(brna, "MaterialRaytraceMirror", NULL);
RNA_def_struct_sdna(srna, "Material");
RNA_def_struct_nested(brna, srna, "Material");
- RNA_def_struct_ui_text(srna, "Material Raytrace Mirror", "Raytraced reflection settings for a Material datablock.");
+ RNA_def_struct_ui_text(srna, "Material Raytrace Mirror", "Raytraced reflection settings for a Material datablock");
prop= RNA_def_property(srna, "enabled", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_RAYMIRROR); /* use bitflags */
- RNA_def_property_ui_text(prop, "Enabled", "Enable raytraced reflections.");
+ RNA_def_property_ui_text(prop, "Enabled", "Enable raytraced reflections");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "reflect_factor", PROP_FLOAT, PROP_FACTOR);
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, "Reflectivity", "Sets the amount mirror reflection for raytrace");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "fresnel", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "fresnel_mir");
RNA_def_property_range(prop, 0.0f, 5.0f);
- RNA_def_property_ui_text(prop, "Fresnel", "Power of Fresnel for mirror reflection.");
+ RNA_def_property_ui_text(prop, "Fresnel", "Power of Fresnel for mirror reflection");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "fresnel_factor", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "fresnel_mir_i");
RNA_def_property_range(prop, 0.0f, 5.0f);
- RNA_def_property_ui_text(prop, "Fresnel Factor", "Blending factor for Fresnel.");
+ RNA_def_property_ui_text(prop, "Fresnel Factor", "Blending factor for Fresnel");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "gloss_factor", PROP_FLOAT, PROP_FACTOR);
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 Amount", "The shininess of the reflection. Values < 1.0 give diffuse, blurry reflections");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "gloss_anisotropic", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "aniso_gloss_mir");
RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Gloss Anisotropy", "The shape of the reflection, from 0.0 (circular) to 1.0 (fully stretched along the tangent.");
+ RNA_def_property_ui_text(prop, "Gloss Anisotropy", "The shape of the reflection, from 0.0 (circular) to 1.0 (fully stretched along the tangent");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "gloss_samples", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "samp_gloss_mir");
RNA_def_property_range(prop, 0, 1024);
- RNA_def_property_ui_text(prop, "Gloss Samples", "Number of cone samples averaged for blurry reflections.");
+ RNA_def_property_ui_text(prop, "Gloss Samples", "Number of cone samples averaged for blurry reflections");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "gloss_threshold", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "adapt_thresh_mir");
RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Gloss Threshold", "Threshold for adaptive sampling. If a sample contributes less than this amount (as a percentage), sampling is stopped.");
+ RNA_def_property_ui_text(prop, "Gloss Threshold", "Threshold for adaptive sampling. If a sample contributes less than this amount (as a percentage), sampling is stopped");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "depth", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "ray_depth");
RNA_def_property_range(prop, 0, 10);
- RNA_def_property_ui_text(prop, "Depth", "Maximum allowed number of light inter-reflections.");
+ RNA_def_property_ui_text(prop, "Depth", "Maximum allowed number of light inter-reflections");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "distance", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "dist_mir");
RNA_def_property_range(prop, 0.0f, 10000.0f);
- RNA_def_property_ui_text(prop, "Maximum Distance", "Maximum distance of reflected rays. Reflections further than this range fade to sky color or material color.");
+ RNA_def_property_ui_text(prop, "Maximum Distance", "Maximum distance of reflected rays. Reflections further than this range fade to sky color or material color");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "fade_to", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "fadeto_mir");
RNA_def_property_enum_items(prop, prop_fadeto_mir_items);
- RNA_def_property_ui_text(prop, "Fade-out Color", "The color that rays with no intersection within the Max Distance take. Material color can be best for indoor scenes, sky color for outdoor.");
+ RNA_def_property_ui_text(prop, "Fade-out Color", "The color that rays with no intersection within the Max Distance take. Material color can be best for indoor scenes, sky color for outdoor");
RNA_def_property_update(prop, 0, "rna_Material_update");
}
@@ -895,66 +898,66 @@ static void rna_def_material_raytra(BlenderRNA *brna)
srna= RNA_def_struct(brna, "MaterialRaytraceTransparency", NULL);
RNA_def_struct_sdna(srna, "Material");
RNA_def_struct_nested(brna, srna, "Material");
- RNA_def_struct_ui_text(srna, "Material Raytrace Transparency", "Raytraced refraction settings for a Material datablock.");
+ RNA_def_struct_ui_text(srna, "Material Raytrace Transparency", "Raytraced refraction settings for a Material datablock");
prop= RNA_def_property(srna, "ior", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ang");
RNA_def_property_range(prop, 1.0f, 3.0f);
- RNA_def_property_ui_text(prop, "IOR", "Sets angular index of refraction for raytraced refraction.");
+ RNA_def_property_ui_text(prop, "IOR", "Sets angular index of refraction for raytraced refraction");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "fresnel", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "fresnel_tra");
RNA_def_property_range(prop, 0.0f, 5.0f);
- RNA_def_property_ui_text(prop, "Fresnel", "Power of Fresnel for transparency (Ray or ZTransp).");
+ RNA_def_property_ui_text(prop, "Fresnel", "Power of Fresnel for transparency (Ray or ZTransp)");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "fresnel_factor", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "fresnel_tra_i");
RNA_def_property_range(prop, 1.0f, 5.0f);
- RNA_def_property_ui_text(prop, "Fresnel Factor", "Blending factor for Fresnel.");
+ RNA_def_property_ui_text(prop, "Fresnel Factor", "Blending factor for Fresnel");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "gloss_factor", PROP_FLOAT, PROP_FACTOR);
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 Amount", "The clarity of the refraction. Values < 1.0 give diffuse, blurry refractions");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "gloss_samples", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "samp_gloss_tra");
RNA_def_property_range(prop, 0, 1024);
- RNA_def_property_ui_text(prop, "Gloss Samples", "Number of cone samples averaged for blurry refractions.");
+ RNA_def_property_ui_text(prop, "Gloss Samples", "Number of cone samples averaged for blurry refractions");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "gloss_threshold", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "adapt_thresh_tra");
RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Gloss Threshold", "Threshold for adaptive sampling. If a sample contributes less than this amount (as a percentage), sampling is stopped.");
+ RNA_def_property_ui_text(prop, "Gloss Threshold", "Threshold for adaptive sampling. If a sample contributes less than this amount (as a percentage), sampling is stopped");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "depth", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "ray_depth_tra");
RNA_def_property_range(prop, 0, 10);
- RNA_def_property_ui_text(prop, "Depth", "Maximum allowed number of light inter-refractions.");
+ RNA_def_property_ui_text(prop, "Depth", "Maximum allowed number of light inter-refractions");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "filter", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "filter");
RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Filter", "Amount to blend in the material's diffuse color in raytraced transparency (simulating absorption).");
+ RNA_def_property_ui_text(prop, "Filter", "Amount to blend in the material's diffuse color in raytraced transparency (simulating absorption)");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "limit", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "tx_limit");
RNA_def_property_range(prop, 0.0f, 100.0f);
- RNA_def_property_ui_text(prop, "Limit", "Maximum depth for light to travel through the transparent material before becoming fully filtered (0.0 is disabled).");
+ RNA_def_property_ui_text(prop, "Limit", "Maximum depth for light to travel through the transparent material before becoming fully filtered (0.0 is disabled)");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "falloff", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "tx_falloff");
RNA_def_property_range(prop, 0.1f, 10.0f);
- RNA_def_property_ui_text(prop, "Falloff", "Falloff power for transmissivity filter effect (1.0 is linear).");
+ RNA_def_property_ui_text(prop, "Falloff", "Falloff power for transmissivity filter effect (1.0 is linear)");
RNA_def_property_update(prop, 0, "rna_Material_update");
}
@@ -980,7 +983,7 @@ static void rna_def_material_volume(BlenderRNA *brna)
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.");
+ 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");
@@ -992,7 +995,7 @@ static void rna_def_material_volume(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "stepsize");
RNA_def_property_range(prop, 0.0f, FLT_MAX);
RNA_def_property_ui_range(prop, 0.001f, 1.0f, 1, 3);
- RNA_def_property_ui_text(prop, "Step Size", "Distance between subsequent volume depth samples.");
+ RNA_def_property_ui_text(prop, "Step Size", "Distance between subsequent volume depth samples");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "lighting_mode", PROP_ENUM, PROP_NONE);
@@ -1014,7 +1017,7 @@ static void rna_def_material_volume(BlenderRNA *brna)
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_ui_text(prop, "Resolution", "Resolution of the voxel grid, low resolutions are faster, high resolutions use more memory");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "ms_diffusion", PROP_FLOAT, PROP_NONE);
@@ -1039,7 +1042,7 @@ static void rna_def_material_volume(BlenderRNA *brna)
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_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, 0, "rna_Material_update");
prop= RNA_def_property(srna, "density", PROP_FLOAT, PROP_FACTOR);
@@ -1097,7 +1100,7 @@ static void rna_def_material_volume(BlenderRNA *brna)
prop= RNA_def_property(srna, "asymmetry", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "asymmetry");
RNA_def_property_range(prop, -1.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Asymmetry", "Back scattering (-1.0) to Forward scattering (1.0) and the range in between.");
+ RNA_def_property_ui_text(prop, "Asymmetry", "Back scattering (-1.0) to Forward scattering (1.0) and the range in between");
RNA_def_property_update(prop, 0, "rna_Material_update");
}
@@ -1110,123 +1113,123 @@ static void rna_def_material_halo(BlenderRNA *brna)
srna= RNA_def_struct(brna, "MaterialHalo", NULL);
RNA_def_struct_sdna(srna, "Material");
RNA_def_struct_nested(brna, srna, "Material");
- RNA_def_struct_ui_text(srna, "Material Halo", "Halo particle effect settings for a Material datablock.");
+ RNA_def_struct_ui_text(srna, "Material Halo", "Halo particle effect settings for a Material datablock");
prop= RNA_def_property(srna, "size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "hasize");
RNA_def_property_range(prop, 0.0f, 100.0f);
- RNA_def_property_ui_text(prop, "Size", "Sets the dimension of the halo.");
+ RNA_def_property_ui_text(prop, "Size", "Sets the dimension of the halo");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "hardness", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "har");
RNA_def_property_range(prop, 0, 127);
- RNA_def_property_ui_text(prop, "Hardness", "Sets the hardness of the halo.");
+ RNA_def_property_ui_text(prop, "Hardness", "Sets the hardness of the halo");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "add", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "add");
RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Add", "Sets the strength of the add effect.");
+ RNA_def_property_ui_text(prop, "Add", "Sets the strength of the add effect");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "rings", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "ringc");
RNA_def_property_range(prop, 0, 24);
- RNA_def_property_ui_text(prop, "Rings", "Sets the number of rings rendered over the halo.");
+ RNA_def_property_ui_text(prop, "Rings", "Sets the number of rings rendered over the halo");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "line_number", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "linec");
RNA_def_property_range(prop, 0, 250);
- RNA_def_property_ui_text(prop, "Line Number", "Sets the number of star shaped lines rendered over the halo.");
+ RNA_def_property_ui_text(prop, "Line Number", "Sets the number of star shaped lines rendered over the halo");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "star_tips", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "starc");
RNA_def_property_range(prop, 3, 50);
- RNA_def_property_ui_text(prop, "Star Tips", "Sets the number of points on the star shaped halo.");
+ RNA_def_property_ui_text(prop, "Star Tips", "Sets the number of points on the star shaped halo");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "seed", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "seed1");
RNA_def_property_range(prop, 0, 255);
- RNA_def_property_ui_text(prop, "Seed", "Randomizes ring dimension and line location.");
+ RNA_def_property_ui_text(prop, "Seed", "Randomizes ring dimension and line location");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "flare_mode", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_HALO_FLARE); /* use bitflags */
- RNA_def_property_ui_text(prop, "Flare", "Renders halo as a lensflare.");
+ RNA_def_property_ui_text(prop, "Flare", "Renders halo as a lensflare");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "flare_size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "flaresize");
RNA_def_property_range(prop, 0.1f, 25.0f);
- RNA_def_property_ui_text(prop, "Flare Size", "Sets the factor by which the flare is larger than the halo.");
+ RNA_def_property_ui_text(prop, "Flare Size", "Sets the factor by which the flare is larger than the halo");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "flare_subsize", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "subsize");
RNA_def_property_range(prop, 0.1f, 25.0f);
- RNA_def_property_ui_text(prop, "Flare Subsize", "Sets the dimension of the subflares, dots and circles.");
+ RNA_def_property_ui_text(prop, "Flare Subsize", "Sets the dimension of the subflares, dots and circles");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "flare_boost", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "flareboost");
RNA_def_property_range(prop, 0.1f, 10.0f);
- RNA_def_property_ui_text(prop, "Flare Boost", "Gives the flare extra strength.");
+ RNA_def_property_ui_text(prop, "Flare Boost", "Gives the flare extra strength");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "flare_seed", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "seed2");
RNA_def_property_range(prop, 0, 255);
- RNA_def_property_ui_text(prop, "Flare Seed", "Specifies an offset in the flare seed table.");
+ RNA_def_property_ui_text(prop, "Flare Seed", "Specifies an offset in the flare seed table");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "flares_sub", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "flarec");
RNA_def_property_range(prop, 1, 32);
- RNA_def_property_ui_text(prop, "Flares Sub", "Sets the number of subflares.");
+ RNA_def_property_ui_text(prop, "Flares Sub", "Sets the number of subflares");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "ring", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_HALO_RINGS);
- RNA_def_property_ui_text(prop, "Rings", "Renders rings over halo.");
+ RNA_def_property_ui_text(prop, "Rings", "Renders rings over halo");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "lines", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_HALO_LINES);
- RNA_def_property_ui_text(prop, "Lines", "Renders star shaped lines over halo.");
+ RNA_def_property_ui_text(prop, "Lines", "Renders star shaped lines over halo");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "star", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_STAR);
- RNA_def_property_ui_text(prop, "Star", "Renders halo as a star.");
+ RNA_def_property_ui_text(prop, "Star", "Renders halo as a star");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "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, "Texture", "Gives halo a texture");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "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, "Vertex Normal", "Uses the vertex normal to specify the dimension of the halo");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "xalpha", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_HALO_XALPHA);
- RNA_def_property_ui_text(prop, "Extreme Alpha", "Uses extreme alpha.");
+ RNA_def_property_ui_text(prop, "Extreme Alpha", "Uses extreme alpha");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "shaded", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_HALO_SHADE);
- RNA_def_property_ui_text(prop, "Shaded", "Lets halo receive light and shadows from external objects.");
+ RNA_def_property_ui_text(prop, "Shaded", "Lets halo receive light and shadows from external objects");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "soft", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_HALO_SOFT);
- RNA_def_property_ui_text(prop, "Soft", "Softens the edges of halos at intersections with other geometry.");
+ RNA_def_property_ui_text(prop, "Soft", "Softens the edges of halos at intersections with other geometry");
RNA_def_property_update(prop, 0, "rna_Material_update");
}
@@ -1238,65 +1241,65 @@ static void rna_def_material_sss(BlenderRNA *brna)
srna= RNA_def_struct(brna, "MaterialSubsurfaceScattering", NULL);
RNA_def_struct_sdna(srna, "Material");
RNA_def_struct_nested(brna, srna, "Material");
- RNA_def_struct_ui_text(srna, "Material Subsurface Scattering", "Diffuse subsurface scattering settings for a Material datablock.");
+ RNA_def_struct_ui_text(srna, "Material Subsurface Scattering", "Diffuse subsurface scattering settings for a Material datablock");
prop= RNA_def_property(srna, "radius", PROP_FLOAT, PROP_COLOR|PROP_UNIT_LENGTH);
RNA_def_property_float_sdna(prop, NULL, "sss_radius");
RNA_def_property_range(prop, 0.001, FLT_MAX);
RNA_def_property_ui_range(prop, 0.001, 10000, 1, 3);
- RNA_def_property_ui_text(prop, "Radius", "Mean red/green/blue scattering path length.");
+ RNA_def_property_ui_text(prop, "Radius", "Mean red/green/blue scattering path length");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "sss_col");
- RNA_def_property_ui_text(prop, "Color", "Scattering color.");
+ RNA_def_property_ui_text(prop, "Color", "Scattering color");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "error_tolerance", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "sss_error");
RNA_def_property_ui_range(prop, 0.0001, 10, 1, 3);
- RNA_def_property_ui_text(prop, "Error Tolerance", "Error tolerance (low values are slower and higher quality).");
+ RNA_def_property_ui_text(prop, "Error Tolerance", "Error tolerance (low values are slower and higher quality)");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "scale", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "sss_scale");
RNA_def_property_ui_range(prop, 0.001, 1000, 1, 3);
- RNA_def_property_ui_text(prop, "Scale", "Object scale factor.");
+ RNA_def_property_ui_text(prop, "Scale", "Object scale factor");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "ior", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "sss_ior");
RNA_def_property_ui_range(prop, 0.1, 2, 1, 3);
- RNA_def_property_ui_text(prop, "IOR", "Index of refraction (higher values are denser).");
+ RNA_def_property_ui_text(prop, "IOR", "Index of refraction (higher values are denser)");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "color_factor", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "sss_colfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
- RNA_def_property_ui_text(prop, "Color Factor", "Blend factor for SSS colors.");
+ RNA_def_property_ui_text(prop, "Color Factor", "Blend factor for SSS colors");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "texture_factor", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "sss_texfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
- RNA_def_property_ui_text(prop, "Texture Factor", "Texture scatting blend factor.");
+ RNA_def_property_ui_text(prop, "Texture Factor", "Texture scatting blend factor");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "front", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "sss_front");
RNA_def_property_range(prop, 0, 2);
- RNA_def_property_ui_text(prop, "Front", "Front scattering weight.");
+ RNA_def_property_ui_text(prop, "Front", "Front scattering weight");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "back", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "sss_back");
RNA_def_property_range(prop, 0, 10);
- RNA_def_property_ui_text(prop, "Back", "Back scattering weight.");
+ RNA_def_property_ui_text(prop, "Back", "Back scattering weight");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "enabled", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "sss_flag", MA_DIFF_SSS);
- RNA_def_property_ui_text(prop, "Enabled", "Enable diffuse subsurface scatting effects in a material.");
+ RNA_def_property_ui_text(prop, "Enabled", "Enable diffuse subsurface scatting effects in a material");
RNA_def_property_update(prop, 0, "rna_Material_update");
}
@@ -1344,19 +1347,19 @@ static void rna_def_material_specularity(StructRNA *srna)
prop= RNA_def_property(srna, "specular_toon_size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "param[2]");
RNA_def_property_range(prop, 0.0f, 1.53f);
- RNA_def_property_ui_text(prop, "Specular Toon Size", "Size of specular toon area.");
+ RNA_def_property_ui_text(prop, "Specular Toon Size", "Size of specular toon area");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "specular_toon_smooth", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "param[3]");
RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Specular Toon Smooth", "Ssmoothness of specular toon area.");
+ RNA_def_property_ui_text(prop, "Specular Toon Smooth", "Ssmoothness of specular toon area");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "specular_slope", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "rms");
RNA_def_property_range(prop, 0, 0.4);
- RNA_def_property_ui_text(prop, "Specular Slope", "The standard deviation of surface slope.");
+ RNA_def_property_ui_text(prop, "Specular Slope", "The standard deviation of surface slope");
RNA_def_property_update(prop, 0, "rna_Material_update");
}
@@ -1368,62 +1371,64 @@ static void rna_def_material_strand(BlenderRNA *brna)
srna= RNA_def_struct(brna, "MaterialStrand", NULL);
RNA_def_struct_sdna(srna, "Material");
RNA_def_struct_nested(brna, srna, "Material");
- RNA_def_struct_ui_text(srna, "Material Strand", "Strand settings for a Material datablock.");
+ RNA_def_struct_ui_text(srna, "Material Strand", "Strand settings for a Material datablock");
prop= RNA_def_property(srna, "tangent_shading", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_TANGENT_STR);
- RNA_def_property_ui_text(prop, "Tangent Shading", "Uses direction of strands as normal for tangent-shading.");
+ RNA_def_property_ui_text(prop, "Tangent Shading", "Uses direction of strands as normal for tangent-shading");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "surface_diffuse", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_STR_SURFDIFF);
- RNA_def_property_ui_text(prop, "Surface Diffuse", "Make diffuse shading more similar to shading the surface.");
+ RNA_def_property_ui_text(prop, "Surface Diffuse", "Make diffuse shading more similar to shading the surface");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "blend_distance", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "strand_surfnor");
RNA_def_property_range(prop, 0, 10);
- RNA_def_property_ui_text(prop, "Blend Distance", "Worldspace distance over which to blend in the surface normal.");
+ RNA_def_property_ui_text(prop, "Blend Distance", "Worldspace distance over which to blend in the surface normal");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "blender_units", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_STR_B_UNITS);
- RNA_def_property_ui_text(prop, "Blender Units", "Use Blender units for widths instead of pixels.");
+ RNA_def_property_ui_text(prop, "Blender Units", "Use Blender units for widths instead of pixels");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "root_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 or Blender units.");
+ RNA_def_property_ui_range(prop, 0, 10.0f, 10, 5);
+ RNA_def_property_ui_text(prop, "Root Size", "Start size of strands in pixels or Blender units");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "tip_size", PROP_FLOAT, PROP_UNSIGNED);
RNA_def_property_float_sdna(prop, NULL, "strand_end");
+ RNA_def_property_ui_range(prop, 0, 10.0f, 10, 5);
RNA_def_property_float_funcs(prop, NULL, NULL, "rna_MaterialStrand_end_size_range");
- RNA_def_property_ui_text(prop, "Tip Size", "End size of strands in pixels or Blender units.");
+ RNA_def_property_ui_text(prop, "Tip Size", "End size of strands in pixels or Blender units");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "min_size", PROP_FLOAT, PROP_UNSIGNED);
RNA_def_property_float_sdna(prop, NULL, "strand_min");
RNA_def_property_range(prop, 0.001, 10);
- RNA_def_property_ui_text(prop, "Minimum Size", "Minimum size of strands in pixels.");
+ RNA_def_property_ui_text(prop, "Minimum Size", "Minimum size of strands in pixels");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "shape", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "strand_ease");
RNA_def_property_range(prop, -0.9, 0.9);
- RNA_def_property_ui_text(prop, "Shape", "Positive values make strands rounder, negative makes strands spiky.");
+ RNA_def_property_ui_text(prop, "Shape", "Positive values make strands rounder, negative makes strands spiky");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "width_fade", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "strand_widthfade");
RNA_def_property_range(prop, 0, 2);
- RNA_def_property_ui_text(prop, "Width Fade", "Transparency along the width of the strand.");
+ RNA_def_property_ui_text(prop, "Width Fade", "Transparency along the width of the strand");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "uv_layer", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "strand_uvname");
- RNA_def_property_ui_text(prop, "UV Layer", "Name of UV layer to override.");
+ RNA_def_property_ui_text(prop, "UV Layer", "Name of UV layer to override");
RNA_def_property_update(prop, 0, "rna_Material_update");
}
@@ -1435,7 +1440,7 @@ static void rna_def_material_physics(BlenderRNA *brna)
srna= RNA_def_struct(brna, "MaterialPhysics", NULL);
RNA_def_struct_sdna(srna, "Material");
RNA_def_struct_nested(brna, srna, "Material");
- RNA_def_struct_ui_text(srna, "Material Physics", "Physics settings for a Material datablock.");
+ RNA_def_struct_ui_text(srna, "Material Physics", "Physics settings for a Material datablock");
prop= RNA_def_property(srna, "align_to_normal", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dynamode", MA_FH_NOR);
@@ -1473,69 +1478,69 @@ void RNA_def_material(BlenderRNA *brna)
PropertyRNA *prop;
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_HALO, "HALO", 0, "Halo", "Render object as halo particles."},
+ {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_HALO, "HALO", 0, "Halo", "Render object as halo particles"},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem transparency_items[] = {
- {MA_ZTRANSP, "Z_TRANSPARENCY", 0, "Z Transparency", "Use alpha buffer for transparent faces."},
- {MA_RAYTRANSP, "RAYTRACE", 0, "Raytrace", "Use raytracing for transparent refraction rendering."},
+ {MA_ZTRANSP, "Z_TRANSPARENCY", 0, "Z Transparency", "Use alpha buffer for transparent faces"},
+ {MA_RAYTRANSP, "RAYTRACE", 0, "Raytrace", "Use raytracing for transparent refraction rendering"},
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "Material", "ID");
- RNA_def_struct_ui_text(srna, "Material", "Material datablock to defined the appearance of geometric objects for rendering.");
+ RNA_def_struct_ui_text(srna, "Material", "Material datablock to defined the appearance of geometric objects for rendering");
RNA_def_struct_ui_icon(srna, ICON_MATERIAL_DATA);
prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "material_type");
RNA_def_property_enum_items(prop, prop_type_items);
- RNA_def_property_ui_text(prop, "Type", "Material type defining how the object is rendered.");
+ RNA_def_property_ui_text(prop, "Type", "Material type defining how the object is rendered");
RNA_def_property_enum_funcs(prop, NULL, "rna_Material_type_set", NULL);
RNA_def_property_update(prop, 0, "rna_Material_draw_update");
prop= RNA_def_property(srna, "transparency", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_TRANSP);
- RNA_def_property_ui_text(prop, "Transparency", "Render material as transparent.");
+ RNA_def_property_ui_text(prop, "Transparency", "Render material as transparent");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "transparency_method", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "mode");
RNA_def_property_enum_items(prop, transparency_items);
- RNA_def_property_ui_text(prop, "Transparency Method", "Method to use for rendering transparency.");
+ RNA_def_property_ui_text(prop, "Transparency Method", "Method to use for rendering transparency");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "ambient", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "amb");
RNA_def_property_range(prop, 0, 1);
- RNA_def_property_ui_text(prop, "Ambient", "Amount of global ambient color the material receives.");
+ RNA_def_property_ui_text(prop, "Ambient", "Amount of global ambient color the material receives");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "emit", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0, FLT_MAX);
- RNA_def_property_ui_range(prop, 0, 2.0f, 10, 2);
- RNA_def_property_ui_text(prop, "Emit", "Amount of light to emit.");
+ RNA_def_property_ui_range(prop, 0, 2.0f, 1, 2);
+ RNA_def_property_ui_text(prop, "Emit", "Amount of light to emit");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "translucency", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_range(prop, 0, 1);
- RNA_def_property_ui_text(prop, "Translucency", "Amount of diffuse shading on the back side.");
+ RNA_def_property_ui_text(prop, "Translucency", "Amount of diffuse shading on the back side");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "cubic", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "shade_flag", MA_CUBIC);
- RNA_def_property_ui_text(prop, "Cubic Interpolation", "Use cubic interpolation for diffuse values, for smoother transitions.");
+ RNA_def_property_ui_text(prop, "Cubic Interpolation", "Use cubic interpolation for diffuse values, for smoother transitions");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "object_color", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "shade_flag", MA_OBCOLOR);
- RNA_def_property_ui_text(prop, "Object Color", "Modulate the result with a per-object color.");
+ RNA_def_property_ui_text(prop, "Object Color", "Modulate the result with a per-object color");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "shadow_ray_bias", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "sbias");
RNA_def_property_range(prop, 0, 0.25);
- RNA_def_property_ui_text(prop, "Shadow Ray Bias", "Shadow raytracing bias to prevent terminator problems on shadow boundary.");
+ RNA_def_property_ui_text(prop, "Shadow Ray Bias", "Shadow raytracing bias to prevent terminator problems on shadow boundary");
prop= RNA_def_property(srna, "shadow_buffer_bias", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "lbias");
@@ -1545,66 +1550,66 @@ void RNA_def_material(BlenderRNA *brna)
prop= RNA_def_property(srna, "shadow_casting_alpha", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "shad_alpha");
RNA_def_property_range(prop, 0.001, 1);
- RNA_def_property_ui_text(prop, "Shadow Casting Alpha", "Shadow casting alpha, in use for Irregular and Deep shadow buffer.");
+ RNA_def_property_ui_text(prop, "Shadow Casting Alpha", "Shadow casting alpha, in use for Irregular and Deep shadow buffer");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "light_group", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "group");
RNA_def_property_struct_type(prop, "Group");
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Light Group", "Limit lighting to lamps in this Group.");
+ RNA_def_property_ui_text(prop, "Light Group", "Limit lighting to lamps in this Group");
RNA_def_property_update(prop, 0, "rna_Material_update");
/* flags */
prop= RNA_def_property(srna, "light_group_exclusive", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_GROUP_NOLAY);
- RNA_def_property_ui_text(prop, "Light Group Exclusive", "Material uses the light group exclusively - these lamps are excluded from other scene lighting.");
+ RNA_def_property_ui_text(prop, "Light Group Exclusive", "Material uses the light group exclusively - these lamps are excluded from other scene lighting");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "traceable", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_TRACEBLE);
- RNA_def_property_ui_text(prop, "Traceable", "Include this material and geometry that uses it in ray tracing calculations.");
+ RNA_def_property_ui_text(prop, "Traceable", "Include this material and geometry that uses it in ray tracing calculations");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "shadows", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_SHADOW);
- RNA_def_property_ui_text(prop, "Shadows", "Allows this material to receive shadows.");
+ RNA_def_property_ui_text(prop, "Shadows", "Allows this material to receive shadows");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "shadeless", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_SHLESS);
- RNA_def_property_ui_text(prop, "Shadeless", "Makes this material insensitive to light or shadow.");
+ RNA_def_property_ui_text(prop, "Shadeless", "Makes this material insensitive to light or shadow");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "vertex_color_light", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_VERTEXCOL);
- RNA_def_property_ui_text(prop, "Vertex Color Light", "Add vertex colors as additional lighting.");
+ RNA_def_property_ui_text(prop, "Vertex Color Light", "Add vertex colors as additional lighting");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "vertex_color_paint", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_VERTEXCOLP);
- RNA_def_property_ui_text(prop, "Vertex Color Paint", "Replaces object base color with vertex colors (multiplies with 'texture face' face assigned textures).");
+ RNA_def_property_ui_text(prop, "Vertex Color Paint", "Replaces object base color with vertex colors (multiplies with 'texture face' face assigned textures)");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "invert_z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_ZINV);
- RNA_def_property_ui_text(prop, "Invert Z Depth", "Renders material's faces with an inverted Z buffer (scanline only).");
+ RNA_def_property_ui_text(prop, "Invert Z Depth", "Renders material's faces with an inverted Z buffer (scanline only)");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "z_offset", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "zoffs");
- RNA_def_property_ui_text(prop, "Z Offset", "Gives faces an artificial offset in the Z buffer for Z transparency.");
+ RNA_def_property_ui_text(prop, "Z Offset", "Gives faces an artificial offset in the Z buffer for Z transparency");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "sky", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "use_sky", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_ENV);
- RNA_def_property_ui_text(prop, "Sky", "Renders this material with zero alpha, with sky background in place (scanline only).");
+ RNA_def_property_ui_text(prop, "Sky", "Renders this material with zero alpha, with sky background in place (scanline only)");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "only_shadow", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_ONLYSHADOW);
- RNA_def_property_ui_text(prop, "Only Shadow", "Renders shadows as the material's alpha value, making materials transparent except for shadowed areas.");
+ RNA_def_property_ui_text(prop, "Only Shadow", "Renders shadows as the material's alpha value, making materials transparent except for shadowed areas");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "face_texture", PROP_BOOLEAN, PROP_NONE);
@@ -1619,7 +1624,7 @@ void RNA_def_material(BlenderRNA *brna)
prop= RNA_def_property(srna, "cast_shadows_only", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_ONLYCAST);
- RNA_def_property_ui_text(prop, "Cast Shadows Only", "Makes objects with this material appear invisible, only casting shadows (not rendered).");
+ RNA_def_property_ui_text(prop, "Cast Shadows Only", "Makes objects with this material appear invisible, only casting shadows (not rendered)");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "exclude_mist", PROP_BOOLEAN, PROP_NONE);
@@ -1646,6 +1651,11 @@ void RNA_def_material(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_SHADBUF);
RNA_def_property_ui_text(prop, "Cast Buffer Shadows", "Allow this material to cast shadows from shadow buffer lamps");
RNA_def_property_update(prop, 0, "rna_Material_update");
+
+ prop= RNA_def_property(srna, "cast_approximate", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "shade_flag", MA_APPROX_OCCLUSION);
+ RNA_def_property_ui_text(prop, "Cast Approximate", "Allow this material to cast shadows when using approximate ambient occlusion.");
+ RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "tangent_shading", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_TANGENT_V);
@@ -1657,60 +1667,60 @@ void RNA_def_material(BlenderRNA *brna)
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "MaterialRaytraceMirror");
RNA_def_property_pointer_funcs(prop, "rna_Material_mirror_get", NULL, NULL);
- RNA_def_property_ui_text(prop, "Raytrace Mirror", "Raytraced reflection settings for the material.");
+ RNA_def_property_ui_text(prop, "Raytrace Mirror", "Raytraced reflection settings for the material");
prop= RNA_def_property(srna, "raytrace_transparency", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "MaterialRaytraceTransparency");
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.");
+ RNA_def_property_ui_text(prop, "Raytrace Transparency", "Raytraced transparency settings for the material");
prop= RNA_def_property(srna, "volume", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, 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.");
+ RNA_def_property_ui_text(prop, "Volume", "Volume settings for the material");
prop= RNA_def_property(srna, "halo", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "MaterialHalo");
RNA_def_property_pointer_funcs(prop, "rna_Material_halo_get", NULL, NULL);
- RNA_def_property_ui_text(prop, "Halo", "Halo settings for the material.");
+ RNA_def_property_ui_text(prop, "Halo", "Halo settings for the material");
prop= RNA_def_property(srna, "subsurface_scattering", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "MaterialSubsurfaceScattering");
RNA_def_property_pointer_funcs(prop, "rna_Material_sss_get", NULL, NULL);
- RNA_def_property_ui_text(prop, "Subsurface Scattering", "Subsurface scattering settings for the material.");
+ RNA_def_property_ui_text(prop, "Subsurface Scattering", "Subsurface scattering settings for the material");
prop= RNA_def_property(srna, "strand", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "MaterialStrand");
RNA_def_property_pointer_funcs(prop, "rna_Material_strand_get", NULL, NULL);
- RNA_def_property_ui_text(prop, "Strand", "Strand settings for the material.");
+ RNA_def_property_ui_text(prop, "Strand", "Strand settings for the material");
prop= RNA_def_property(srna, "physics", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "MaterialPhysics");
RNA_def_property_pointer_funcs(prop, "rna_Material_physics_get", NULL, NULL);
- RNA_def_property_ui_text(prop, "Physics", "Game physics settings.");
+ RNA_def_property_ui_text(prop, "Physics", "Game physics settings");
/* nodetree */
prop= RNA_def_property(srna, "node_tree", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "nodetree");
- RNA_def_property_ui_text(prop, "Node Tree", "Node tree for node based materials.");
+ RNA_def_property_ui_text(prop, "Node Tree", "Node tree for node based materials");
prop= RNA_def_property(srna, "use_nodes", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "use_nodes", 1);
RNA_def_property_boolean_funcs(prop, NULL, "rna_Material_use_nodes_set");
- RNA_def_property_ui_text(prop, "Use Nodes", "Use shader nodes to render the material.");
+ RNA_def_property_ui_text(prop, "Use Nodes", "Use shader nodes to render the material");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "active_node_material", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "Material");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_pointer_funcs(prop, "rna_Material_active_node_material_get", "rna_Material_active_node_material_set", NULL);
- RNA_def_property_ui_text(prop, "Material", "Active node material.");
+ RNA_def_property_ui_text(prop, "Material", "Active node material");
RNA_def_property_update(prop, NC_MATERIAL, NULL);
/* common */
@@ -1722,7 +1732,7 @@ void RNA_def_material(BlenderRNA *brna)
prop= RNA_def_property(srna, "use_textures", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "septex", 1);
RNA_def_property_array(prop, 18);
- RNA_def_property_ui_text(prop, "Use Textures", "Enable/Disable each texture.");
+ RNA_def_property_ui_text(prop, "Use Textures", "Enable/Disable each texture");
RNA_def_property_update(prop, 0, "rna_Material_update");
rna_def_material_colors(srna);
@@ -1747,22 +1757,22 @@ void rna_def_mtex_common(StructRNA *srna, const char *begin, const char *activeg
PropertyRNA *prop;
/* mtex */
- prop= RNA_def_property(srna, "textures", PROP_COLLECTION, PROP_NONE);
+ prop= RNA_def_property(srna, "texture_slots", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, structname);
RNA_def_property_collection_funcs(prop, begin, "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_dereference_get", 0, 0, 0);
- RNA_def_property_ui_text(prop, "Textures", "Texture slots defining the mapping and influence of textures.");
+ RNA_def_property_ui_text(prop, "Textures", "Texture slots defining the mapping and influence of textures");
prop= RNA_def_property(srna, "active_texture", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "Texture");
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_ui_text(prop, "Active Texture", "Active texture slot being displayed");
RNA_def_property_update(prop, 0, update);
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_ui_text(prop, "Active Texture Index", "Index of active texture slot");
RNA_def_property_update(prop, 0, update);
}
diff --git a/source/blender/makesrna/intern/rna_material_api.c b/source/blender/makesrna/intern/rna_material_api.c
index aa28b6b923c..8511df208cf 100644
--- a/source/blender/makesrna/intern/rna_material_api.c
+++ b/source/blender/makesrna/intern/rna_material_api.c
@@ -15,7 +15,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* The Original Code is Copyright (C) 2009 Blender Foundation.
* All rights reserved.
@@ -55,10 +55,10 @@ static void rna_Material_add_texture(Material *ma, Tex *tex, int mapto, int texc
break;
}
}
-
+
if (slot == -1)
slot= 0;
-
+
if (ma->mtex[slot]) {
ma->mtex[slot]->tex->id.us--;
}
@@ -69,8 +69,9 @@ static void rna_Material_add_texture(Material *ma, Tex *tex, int mapto, int texc
mtex= ma->mtex[slot];
mtex->tex= tex;
- id_us_plus(&tex->id);
-
+ if (tex)
+ id_us_plus(&tex->id);
+
mtex->texco= mapto;
mtex->mapto= texco;
}
@@ -84,17 +85,17 @@ void RNA_api_material(StructRNA *srna)
/* copied from rna_def_material_mtex (rna_material.c) */
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."},
+ {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}};
@@ -117,7 +118,8 @@ void RNA_api_material(StructRNA *srna)
func= RNA_def_function(srna, "add_texture", "rna_Material_add_texture");
RNA_def_function_ui_description(func, "Add a texture to material's free texture slot.");
- parm= RNA_def_pointer(func, "texture", "Texture", "", "Texture to add.");
+ parm= RNA_def_pointer(func, "texture", "Texture", "Texture", "Texture to add.");
+ RNA_def_property_flag(parm, PROP_REQUIRED);
parm= RNA_def_enum(func, "texture_coordinates", prop_texture_coordinates_items, TEXCO_UV, "", "Source of texture coordinate information."); /* optional */
parm= RNA_def_enum(func, "map_to", prop_texture_mapto_items, MAP_COL, "", "Controls which material property the texture affects."); /* optional */
}
diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c
index 0304cf8f352..01ffaacc086 100644
--- a/source/blender/makesrna/intern/rna_mesh.c
+++ b/source/blender/makesrna/intern/rna_mesh.c
@@ -15,7 +15,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor(s): Blender Foundation (2008).
*
@@ -972,6 +972,22 @@ static char *rna_MeshStringProperty_path(PointerRNA *ptr)
return rna_CustomDataData_path(ptr, "string_layers", CD_MCOL);
}
+static int rna_Mesh_tot_vert_get(PointerRNA *ptr)
+{
+ Mesh *me= (Mesh*)ptr->id.data;
+ return me->edit_btmesh ? me->edit_btmesh->bm->totvertsel : 0;
+}
+static int rna_Mesh_tot_edge_get(PointerRNA *ptr)
+{
+ Mesh *me= (Mesh*)ptr->id.data;
+ return me->edit_btmesh ? me->edit_btmesh->bm->totedgesel: 0;
+}
+static int rna_Mesh_tot_face_get(PointerRNA *ptr)
+{
+ Mesh *me= (Mesh*)ptr->id.data;
+ return me->edit_btmesh ? me->edit_btmesh->bm->totfacesel : 0;
+}
+
#else
static void rna_def_mvert_group(BlenderRNA *brna)
@@ -982,7 +998,7 @@ static void rna_def_mvert_group(BlenderRNA *brna)
srna= RNA_def_struct(brna, "VertexGroupElement", NULL);
RNA_def_struct_sdna(srna, "MDeformWeight");
RNA_def_struct_path_func(srna, "rna_VertexGroupElement_path");
- RNA_def_struct_ui_text(srna, "Vertex Group Element", "Weight value of a vertex in a vertex group.");
+ RNA_def_struct_ui_text(srna, "Vertex Group Element", "Weight value of a vertex in a vertex group");
RNA_def_struct_ui_icon(srna, ICON_GROUP_VERTEX);
/* we can't point to actual group, it is in the object and so
@@ -1006,7 +1022,7 @@ static void rna_def_mvert(BlenderRNA *brna)
srna= RNA_def_struct(brna, "MeshVertex", NULL);
RNA_def_struct_sdna(srna, "MVert");
- RNA_def_struct_ui_text(srna, "Mesh Vertex", "Vertex in a Mesh datablock.");
+ RNA_def_struct_ui_text(srna, "Mesh Vertex", "Vertex in a Mesh datablock");
RNA_def_struct_path_func(srna, "rna_MeshVertex_path");
RNA_def_struct_ui_icon(srna, ICON_VERTEXSEL);
@@ -1037,12 +1053,12 @@ static void rna_def_mvert(BlenderRNA *brna)
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);
RNA_def_property_struct_type(prop, "VertexGroupElement");
- RNA_def_property_ui_text(prop, "Groups", "Weights for the vertex groups this vertex is member of.");
+ RNA_def_property_ui_text(prop, "Groups", "Weights for the vertex groups this vertex is member of");
prop= RNA_def_property(srna, "index", PROP_INT, PROP_UNSIGNED);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_int_funcs(prop, "rna_MeshVertex_index_get", NULL, NULL);
- RNA_def_property_ui_text(prop, "Index", "Index number of the vertex.");
+ RNA_def_property_ui_text(prop, "Index", "Index number of the vertex");
}
static void rna_def_medge(BlenderRNA *brna)
@@ -1052,7 +1068,7 @@ static void rna_def_medge(BlenderRNA *brna)
srna= RNA_def_struct(brna, "MeshEdge", NULL);
RNA_def_struct_sdna(srna, "MEdge");
- RNA_def_struct_ui_text(srna, "Mesh Edge", "Edge in a Mesh datablock.");
+ RNA_def_struct_ui_text(srna, "Mesh Edge", "Edge in a Mesh datablock");
RNA_def_struct_path_func(srna, "rna_MeshEdge_path");
RNA_def_struct_ui_icon(srna, ICON_EDGESEL);
@@ -1105,7 +1121,7 @@ static void rna_def_medge(BlenderRNA *brna)
prop= RNA_def_property(srna, "index", PROP_INT, PROP_UNSIGNED);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_int_funcs(prop, "rna_MeshEdge_index_get", NULL, NULL);
- RNA_def_property_ui_text(prop, "Index", "Index number of the vertex.");
+ RNA_def_property_ui_text(prop, "Index", "Index number of the vertex");
}
static void rna_def_mface(BlenderRNA *brna)
@@ -1115,7 +1131,7 @@ static void rna_def_mface(BlenderRNA *brna)
srna= RNA_def_struct(brna, "MeshFace", NULL);
RNA_def_struct_sdna(srna, "MFace");
- RNA_def_struct_ui_text(srna, "Mesh Face", "Face in a Mesh datablock.");
+ RNA_def_struct_ui_text(srna, "Mesh Face", "Face in a Mesh datablock");
RNA_def_struct_path_func(srna, "rna_MeshFace_path");
RNA_def_struct_ui_icon(srna, ICON_FACESEL);
@@ -1169,7 +1185,7 @@ static void rna_def_mface(BlenderRNA *brna)
prop= RNA_def_property(srna, "index", PROP_INT, PROP_UNSIGNED);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_int_funcs(prop, "rna_MeshFace_index_get", NULL, NULL);
- RNA_def_property_ui_text(prop, "Index", "Index number of the vertex.");
+ RNA_def_property_ui_text(prop, "Index", "Index number of the vertex");
}
static void rna_def_mtexpoly(BlenderRNA *brna)
@@ -1185,7 +1201,7 @@ static void rna_def_mtexpoly(BlenderRNA *brna)
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_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);
@@ -1220,7 +1236,7 @@ static void rna_def_mtexpoly(BlenderRNA *brna)
srna= RNA_def_struct(brna, "MeshTextureFace", NULL);
RNA_def_struct_sdna(srna, "MTexPoly");
- RNA_def_struct_ui_text(srna, "Mesh Texture Face", "UV mapping, texturing and game engine data for a face.");
+ RNA_def_struct_ui_text(srna, "Mesh Texture Face", "UV mapping, texturing and game engine data for a face");
RNA_def_struct_path_func(srna, "rna_MeshTextureFace_path");
RNA_def_struct_ui_icon(srna, ICON_FACESEL_HLT);
@@ -1240,7 +1256,6 @@ static void rna_def_mtexpoly(BlenderRNA *brna)
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);
@@ -1332,11 +1347,11 @@ static void rna_def_msticky(BlenderRNA *brna)
srna= RNA_def_struct(brna, "MeshSticky", NULL);
RNA_def_struct_sdna(srna, "MSticky");
- RNA_def_struct_ui_text(srna, "Mesh Vertex Sticky Texture Coordinate", "Stricky texture coordinate.");
+ RNA_def_struct_ui_text(srna, "Mesh Vertex Sticky Texture Coordinate", "Stricky texture coordinate");
RNA_def_struct_path_func(srna, "rna_MeshSticky_path");
prop= RNA_def_property(srna, "co", PROP_FLOAT, PROP_XYZ);
- RNA_def_property_ui_text(prop, "Location", "Sticky texture coordinate location.");
+ RNA_def_property_ui_text(prop, "Location", "Sticky texture coordinate location");
RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
}
@@ -1346,7 +1361,7 @@ static void rna_def_mloopcol(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "MeshColorLayer", NULL);
- RNA_def_struct_ui_text(srna, "Mesh Vertex Color Layer", "Layer of vertex colors in a Mesh datablock.");
+ 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);
@@ -1376,7 +1391,7 @@ static void rna_def_mloopcol(BlenderRNA *brna)
srna= RNA_def_struct(brna, "MeshColor", NULL);
RNA_def_struct_sdna(srna, "MCol");
- RNA_def_struct_ui_text(srna, "Mesh Vertex Color", "Vertex colors for a face in a Mesh.");
+ RNA_def_struct_ui_text(srna, "Mesh Vertex Color", "Vertex colors for a face in a Mesh");
RNA_def_struct_path_func(srna, "rna_MeshColor_path");
RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
@@ -1390,7 +1405,7 @@ static void rna_def_mproperties(BlenderRNA *brna)
/* Float */
srna= RNA_def_struct(brna, "MeshFloatPropertyLayer", NULL);
RNA_def_struct_sdna(srna, "CustomDataLayer");
- RNA_def_struct_ui_text(srna, "Mesh Float Property Layer", "User defined layer of floating pointer number values.");
+ RNA_def_struct_ui_text(srna, "Mesh Float Property Layer", "User defined layer of floating pointer number values");
RNA_def_struct_path_func(srna, "rna_MeshFloatPropertyLayer_path");
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
@@ -1405,7 +1420,7 @@ static void rna_def_mproperties(BlenderRNA *brna)
srna= RNA_def_struct(brna, "MeshFloatProperty", NULL);
RNA_def_struct_sdna(srna, "MFloatProperty");
- RNA_def_struct_ui_text(srna, "Mesh Float Property", "User defined floating point number value in a float properties layer.");
+ RNA_def_struct_ui_text(srna, "Mesh Float Property", "User defined floating point number value in a float properties layer");
RNA_def_struct_path_func(srna, "rna_MeshFloatProperty_path");
prop= RNA_def_property(srna, "value", PROP_FLOAT, PROP_NONE);
@@ -1416,7 +1431,7 @@ static void rna_def_mproperties(BlenderRNA *brna)
/* Int */
srna= RNA_def_struct(brna, "MeshIntPropertyLayer", NULL);
RNA_def_struct_sdna(srna, "CustomDataLayer");
- RNA_def_struct_ui_text(srna, "Mesh Int Property Layer", "User defined layer of integer number values.");
+ RNA_def_struct_ui_text(srna, "Mesh Int Property Layer", "User defined layer of integer number values");
RNA_def_struct_path_func(srna, "rna_MeshIntPropertyLayer_path");
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
@@ -1431,7 +1446,7 @@ static void rna_def_mproperties(BlenderRNA *brna)
srna= RNA_def_struct(brna, "MeshIntProperty", NULL);
RNA_def_struct_sdna(srna, "MIntProperty");
- RNA_def_struct_ui_text(srna, "Mesh Int Property", "User defined integer number value in an integer properties layer.");
+ RNA_def_struct_ui_text(srna, "Mesh Int Property", "User defined integer number value in an integer properties layer");
RNA_def_struct_path_func(srna, "rna_MeshIntProperty_path");
prop= RNA_def_property(srna, "value", PROP_INT, PROP_NONE);
@@ -1442,7 +1457,7 @@ static void rna_def_mproperties(BlenderRNA *brna)
/* String */
srna= RNA_def_struct(brna, "MeshStringPropertyLayer", NULL);
RNA_def_struct_sdna(srna, "CustomDataLayer");
- RNA_def_struct_ui_text(srna, "Mesh String Property Layer", "User defined layer of string text values.");
+ RNA_def_struct_ui_text(srna, "Mesh String Property Layer", "User defined layer of string text values");
RNA_def_struct_path_func(srna, "rna_MeshStringPropertyLayer_path");
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
@@ -1457,7 +1472,7 @@ static void rna_def_mproperties(BlenderRNA *brna)
srna= RNA_def_struct(brna, "MeshStringProperty", NULL);
RNA_def_struct_sdna(srna, "MStringProperty");
- RNA_def_struct_ui_text(srna, "Mesh String Property", "User defined string text value in a string properties layer.");
+ RNA_def_struct_ui_text(srna, "Mesh String Property", "User defined string text value in a string properties layer");
RNA_def_struct_path_func(srna, "rna_MeshStringProperty_path");
prop= RNA_def_property(srna, "value", PROP_STRING, PROP_NONE);
@@ -1473,17 +1488,17 @@ void rna_def_texmat_common(StructRNA *srna, const char *texspace_editable)
/* texture space */
prop= RNA_def_property(srna, "auto_texspace", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "texflag", AUTOSPACE);
- RNA_def_property_ui_text(prop, "Auto Texture Space", "Adjusts active object's texture space automatically when transforming object.");
+ RNA_def_property_ui_text(prop, "Auto Texture Space", "Adjusts active object's texture space automatically when transforming object");
prop= RNA_def_property(srna, "texspace_loc", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "loc");
- RNA_def_property_ui_text(prop, "Texure Space Location", "Texture space location.");
+ 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_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");
@@ -1514,7 +1529,7 @@ static void rna_def_mesh_faces(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_property_srna(cprop, "MeshFaces");
srna= RNA_def_struct(brna, "MeshFaces", NULL);
RNA_def_struct_sdna(srna, "Mesh");
- RNA_def_struct_ui_text(srna, "Mesh Faces", "Collection of mesh faces.");
+ RNA_def_struct_ui_text(srna, "Mesh Faces", "Collection of mesh faces");
prop= RNA_def_property(srna, "active", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "act_face");
@@ -1528,35 +1543,35 @@ static void rna_def_mesh(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "Mesh", "ID");
- RNA_def_struct_ui_text(srna, "Mesh", "Mesh datablock to define geometric surfaces.");
+ RNA_def_struct_ui_text(srna, "Mesh", "Mesh datablock defining geometric surfaces");
RNA_def_struct_ui_icon(srna, ICON_MESH_DATA);
prop= RNA_def_property(srna, "verts", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "mvert", "totvert");
RNA_def_property_struct_type(prop, "MeshVertex");
- RNA_def_property_ui_text(prop, "Vertices", "Vertices of the mesh.");
+ RNA_def_property_ui_text(prop, "Vertices", "Vertices of the mesh");
prop= RNA_def_property(srna, "edges", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "medge", "totedge");
RNA_def_property_struct_type(prop, "MeshEdge");
- RNA_def_property_ui_text(prop, "Edges", "Edges of the mesh.");
+ RNA_def_property_ui_text(prop, "Edges", "Edges of the mesh");
prop= RNA_def_property(srna, "faces", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "mface", "totface");
RNA_def_property_struct_type(prop, "MeshFace");
- RNA_def_property_ui_text(prop, "Faces", "Faces of the mesh.");
+ RNA_def_property_ui_text(prop, "Faces", "Faces of the mesh");
rna_def_mesh_faces(brna, prop);
prop= RNA_def_property(srna, "sticky", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "msticky", "totvert");
RNA_def_property_struct_type(prop, "MeshSticky");
- RNA_def_property_ui_text(prop, "Sticky", "Sticky texture coordinates.");
+ RNA_def_property_ui_text(prop, "Sticky", "Sticky texture coordinates");
/* TODO, should this be allowed to be its self? */
prop= RNA_def_property(srna, "texture_mesh", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "texcomesh");
RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK);
- RNA_def_property_ui_text(prop, "Texture Mesh", "Use another mesh for texture indicies (vertex indicies must be aligned).");
+ RNA_def_property_ui_text(prop, "Texture Mesh", "Use another mesh for texture indicies (vertex indicies must be aligned)");
/* UV textures */
prop= RNA_def_property(srna, "uv_textures", PROP_COLLECTION, PROP_NONE);
@@ -1569,33 +1584,33 @@ static void rna_def_mesh(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "MeshTextureFaceLayer");
RNA_def_property_pointer_funcs(prop, "rna_Mesh_active_uv_texture_get", "rna_Mesh_active_uv_texture_set", NULL);
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Active UV Texture", "Active UV texture.");
+ RNA_def_property_ui_text(prop, "Active UV Texture", "Active UV texture");
RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "active_uv_texture_index", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_funcs(prop, "rna_Mesh_active_uv_texture_index_get", "rna_Mesh_active_uv_texture_index_set", "rna_Mesh_active_uv_texture_index_range");
- RNA_def_property_ui_text(prop, "Active UV Texture Index", "Active UV texture index.");
+ RNA_def_property_ui_text(prop, "Active UV Texture Index", "Active UV texture index");
RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "uv_texture_clone", PROP_POINTER, PROP_UNSIGNED);
RNA_def_property_struct_type(prop, "MeshTextureFaceLayer");
RNA_def_property_pointer_funcs(prop, "rna_Mesh_uv_texture_clone_get", "rna_Mesh_uv_texture_clone_set", NULL);
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Clone UV Texture", "UV texture to be used as cloning source.");
+ RNA_def_property_ui_text(prop, "Clone UV Texture", "UV texture to be used as cloning source");
prop= RNA_def_property(srna, "uv_texture_clone_index", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_funcs(prop, "rna_Mesh_uv_texture_clone_index_get", "rna_Mesh_uv_texture_clone_index_set", "rna_Mesh_active_uv_texture_index_range");
- RNA_def_property_ui_text(prop, "Clone UV Texture Index", "Clone UV texture index.");
+ RNA_def_property_ui_text(prop, "Clone UV Texture Index", "Clone UV texture index");
prop= RNA_def_property(srna, "uv_texture_stencil", PROP_POINTER, PROP_UNSIGNED);
RNA_def_property_struct_type(prop, "MeshTextureFaceLayer");
RNA_def_property_pointer_funcs(prop, "rna_Mesh_uv_texture_stencil_get", "rna_Mesh_uv_texture_stencil_set", NULL);
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Mask UV Texture", "UV texture to mask the painted area.");
+ RNA_def_property_ui_text(prop, "Mask UV Texture", "UV texture to mask the painted area");
prop= RNA_def_property(srna, "uv_texture_stencil_index", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_funcs(prop, "rna_Mesh_uv_texture_stencil_index_get", "rna_Mesh_uv_texture_stencil_index_set", "rna_Mesh_active_uv_texture_index_range");
- RNA_def_property_ui_text(prop, "Mask UV Texture Index", "Mask UV texture index.");
+ RNA_def_property_ui_text(prop, "Mask UV Texture Index", "Mask UV texture index");
/* Vertex colors */
@@ -1609,12 +1624,12 @@ static void rna_def_mesh(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "MeshColorLayer");
RNA_def_property_pointer_funcs(prop, "rna_Mesh_active_vertex_color_get", "rna_Mesh_active_vertex_color_set", NULL);
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Active Vertex Color Layer", "Active vertex color layer.");
+ RNA_def_property_ui_text(prop, "Active Vertex Color Layer", "Active vertex color layer");
RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "active_vertex_color_index", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_funcs(prop, "rna_Mesh_active_vertex_color_index_get", "rna_Mesh_active_vertex_color_index_set", "rna_Mesh_active_vertex_color_index_range");
- RNA_def_property_ui_text(prop, "Active Vertex Color Index", "Active vertex color index.");
+ RNA_def_property_ui_text(prop, "Active Vertex Color Index", "Active vertex color index");
RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "float_layers", PROP_COLLECTION, PROP_NONE);
@@ -1666,16 +1681,16 @@ 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_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");
prop= RNA_def_property(srna, "all_edges", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_ALLEDGES);
- RNA_def_property_ui_text(prop, "All Edges", "Displays all edges for wireframe in all view modes in the 3d view");
+ RNA_def_property_ui_text(prop, "All Edges", "Displays all edges for wireframe in all view modes in the 3D view");
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_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");
prop= RNA_def_property(srna, "draw_normals", PROP_BOOLEAN, PROP_NONE);
@@ -1742,12 +1757,33 @@ static void rna_def_mesh(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Z Mirror", "Z Axis mirror editing");
*/
+ prop= RNA_def_property(srna, "use_mirror_topology", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "editflag", ME_EDIT_MIRROR_TOPO);
+ RNA_def_property_ui_text(prop, "Topology Mirror", "Use topology based mirroring");
+
prop= RNA_def_property(srna, "use_paint_mask", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "editflag", ME_EDIT_PAINT_MASK);
RNA_def_property_ui_text(prop, "Paint Mask", "Face selection masking for painting");
RNA_def_property_ui_icon(prop, ICON_FACESEL_HLT, 0);
RNA_def_property_update(prop, 0, "rna_Mesh_update_draw");
+
+ /* readonly editmesh info - use for extrude menu */
+ prop= RNA_def_property(srna, "total_vert_sel", PROP_INT, PROP_UNSIGNED);
+ RNA_def_property_int_funcs(prop, "rna_Mesh_tot_vert_get", NULL, NULL);
+ RNA_def_property_ui_text(prop, "Selected Vert Total", "Selected vertex count in editmode");
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+
+ prop= RNA_def_property(srna, "total_edge_sel", PROP_INT, PROP_UNSIGNED);
+ RNA_def_property_int_funcs(prop, "rna_Mesh_tot_edge_get", NULL, NULL);
+ RNA_def_property_ui_text(prop, "Selected Edge Total", "Selected edge count in editmode");
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+
+ prop= RNA_def_property(srna, "total_face_sel", PROP_INT, PROP_UNSIGNED);
+ RNA_def_property_int_funcs(prop, "rna_Mesh_tot_face_get", NULL, NULL);
+ RNA_def_property_ui_text(prop, "Selected Face Total", "Selected face count in editmode");
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+
/* pointers */
rna_def_animdata_common(srna);
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 c274081b119..f0f899f5433 100644
--- a/source/blender/makesrna/intern/rna_mesh_api.c
+++ b/source/blender/makesrna/intern/rna_mesh_api.c
@@ -15,7 +15,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* The Original Code is Copyright (C) 2009 Blender Foundation.
* All rights reserved.
diff --git a/source/blender/makesrna/intern/rna_meta.c b/source/blender/makesrna/intern/rna_meta.c
index b7cd40b2efd..004e5fe0c6f 100644
--- a/source/blender/makesrna/intern/rna_meta.c
+++ b/source/blender/makesrna/intern/rna_meta.c
@@ -15,7 +15,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor(s): Blender Foundation (2008), Juho Vepsalainen, Jiri Hnidek
*
@@ -79,13 +79,13 @@ static void rna_def_metaelement(BlenderRNA *brna)
srna= RNA_def_struct(brna, "MetaElement", NULL);
RNA_def_struct_sdna(srna, "MetaElem");
- RNA_def_struct_ui_text(srna, "Meta Element", "Blobby element in a MetaBall datablock.");
+ RNA_def_struct_ui_text(srna, "Meta Element", "Blobby element in a MetaBall datablock");
RNA_def_struct_ui_icon(srna, ICON_OUTLINER_DATA_META);
/* enums */
prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_type_items);
- RNA_def_property_ui_text(prop, "Type", "Metaball types.");
+ RNA_def_property_ui_text(prop, "Type", "Metaball types");
RNA_def_property_update(prop, 0, "rna_MetaBall_update_data");
/* number values */
@@ -109,36 +109,36 @@ static void rna_def_metaelement(BlenderRNA *brna)
prop= RNA_def_property(srna, "size_x", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "expx");
RNA_def_property_range(prop, 0.0f, 20.0f);
- RNA_def_property_ui_text(prop, "Size X", "Size of element, use of components depends on element type.");
+ RNA_def_property_ui_text(prop, "Size X", "Size of element, use of components depends on element type");
RNA_def_property_update(prop, 0, "rna_MetaBall_update_data");
prop= RNA_def_property(srna, "size_y", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "expy");
RNA_def_property_range(prop, 0.0f, 20.0f);
- RNA_def_property_ui_text(prop, "Size Y", "Size of element, use of components depends on element type.");
+ RNA_def_property_ui_text(prop, "Size Y", "Size of element, use of components depends on element type");
RNA_def_property_update(prop, 0, "rna_MetaBall_update_data");
prop= RNA_def_property(srna, "size_z", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "expz");
RNA_def_property_range(prop, 0.0f, 20.0f);
- RNA_def_property_ui_text(prop, "Size Z", "Size of element, use of components depends on element type.");
+ RNA_def_property_ui_text(prop, "Size Z", "Size of element, use of components depends on element type");
RNA_def_property_update(prop, 0, "rna_MetaBall_update_data");
prop= RNA_def_property(srna, "stiffness", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "s");
RNA_def_property_range(prop, 0.0f, 10.0f);
- RNA_def_property_ui_text(prop, "Stiffness", "Stiffness defines how much of the element to fill.");
+ RNA_def_property_ui_text(prop, "Stiffness", "Stiffness defines how much of the element to fill");
RNA_def_property_update(prop, 0, "rna_MetaBall_update_data");
/* flags */
prop= RNA_def_property(srna, "negative", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MB_NEGATIVE);
- RNA_def_property_ui_text(prop, "Negative", "Set metaball as negative one.");
+ RNA_def_property_ui_text(prop, "Negative", "Set metaball as negative one");
RNA_def_property_update(prop, 0, "rna_MetaBall_update_data");
prop= RNA_def_property(srna, "hide", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MB_HIDE);
- RNA_def_property_ui_text(prop, "Hide", "Hide element.");
+ RNA_def_property_ui_text(prop, "Hide", "Hide element");
RNA_def_property_update(prop, 0, "rna_MetaBall_update_data");
}
@@ -147,48 +147,48 @@ static void rna_def_metaball(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
static EnumPropertyItem prop_update_items[] = {
- {MB_UPDATE_ALWAYS, "UPDATE_ALWAYS", 0, "Always", "While editing, update metaball always."},
- {MB_UPDATE_HALFRES, "HALFRES", 0, "Half", "While editing, update metaball in half resolution."},
- {MB_UPDATE_FAST, "FAST", 0, "Fast", "While editing, update metaball without polygonization."},
- {MB_UPDATE_NEVER, "NEVER", 0, "Never", "While editing, don't update metaball at all."},
+ {MB_UPDATE_ALWAYS, "UPDATE_ALWAYS", 0, "Always", "While editing, update metaball always"},
+ {MB_UPDATE_HALFRES, "HALFRES", 0, "Half", "While editing, update metaball in half resolution"},
+ {MB_UPDATE_FAST, "FAST", 0, "Fast", "While editing, update metaball without polygonization"},
+ {MB_UPDATE_NEVER, "NEVER", 0, "Never", "While editing, don't update metaball at all"},
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "MetaBall", "ID");
- RNA_def_struct_ui_text(srna, "MetaBall", "Metaball datablock to defined blobby surfaces.");
+ RNA_def_struct_ui_text(srna, "MetaBall", "Metaball datablock to defined blobby surfaces");
RNA_def_struct_ui_icon(srna, ICON_META_DATA);
prop= RNA_def_property(srna, "elements", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "elems", NULL);
RNA_def_property_struct_type(prop, "MetaElement");
- RNA_def_property_ui_text(prop, "Elements", "Meta elements.");
+ RNA_def_property_ui_text(prop, "Elements", "Meta elements");
prop= RNA_def_property(srna, "active_element", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "lastelem");
- RNA_def_property_ui_text(prop, "Last selected element.", "Last selected element.");
+ RNA_def_property_ui_text(prop, "Last selected element.", "Last selected element");
/* enums */
prop= RNA_def_property(srna, "flag", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_update_items);
- RNA_def_property_ui_text(prop, "Update", "Metaball edit update behavior.");
+ RNA_def_property_ui_text(prop, "Update", "Metaball edit update behavior");
RNA_def_property_update(prop, 0, "rna_MetaBall_update_data");
/* number values */
prop= RNA_def_property(srna, "wire_size", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "wiresize");
RNA_def_property_range(prop, 0.050f, 1.0f);
- RNA_def_property_ui_text(prop, "Wire Size", "Polygonization resolution in the 3D viewport.");
+ RNA_def_property_ui_text(prop, "Wire Size", "Polygonization resolution in the 3D viewport");
RNA_def_property_update(prop, 0, "rna_MetaBall_update_data");
prop= RNA_def_property(srna, "render_size", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "rendersize");
RNA_def_property_range(prop, 0.050f, 1.0f);
- RNA_def_property_ui_text(prop, "Render Size", "Polygonization resolution in rendering.");
+ RNA_def_property_ui_text(prop, "Render Size", "Polygonization resolution in rendering");
RNA_def_property_update(prop, 0, "rna_MetaBall_update_data");
prop= RNA_def_property(srna, "threshold", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "thresh");
RNA_def_property_range(prop, 0.0f, 5.0f);
- RNA_def_property_ui_text(prop, "Threshold", "Influence of meta elements.");
+ RNA_def_property_ui_text(prop, "Threshold", "Influence of meta elements");
RNA_def_property_update(prop, 0, "rna_MetaBall_update_data");
/* materials, textures */
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index 166ef55c23f..f8a85dbaeaf 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -15,7 +15,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor(s): Blender Foundation (2008), Juho Veps‰l‰inen
*
@@ -55,7 +55,7 @@ EnumPropertyItem modifier_type_items[] ={
{eModifierType_Mask, "MASK", ICON_MOD_MASK, "Mask", ""},
{eModifierType_Mirror, "MIRROR", ICON_MOD_MIRROR, "Mirror", ""},
{eModifierType_Multires, "MULTIRES", ICON_MOD_MULTIRES, "Multiresolution", ""},
- {eModifierType_Solidify, "SOLIDIFY", ICON_MOD_DISPLACE, "Solidify", ""},
+ {eModifierType_Solidify, "SOLIDIFY", ICON_MOD_SOLIDIFY, "Solidify", ""},
{eModifierType_Subsurf, "SUBSURF", ICON_MOD_SUBSURF, "Subdivision Surface", ""},
{eModifierType_UVProject, "UV_PROJECT", ICON_MOD_UVPROJECT, "UV Project", ""},
{0, "", 0, "Deform", ""},
@@ -328,7 +328,7 @@ static void rna_CastModifier_vgroup_set(PointerRNA *ptr, const char *value)
static void rna_SolidifyModifier_vgroup_set(PointerRNA *ptr, const char *value)
{
SolidifyModifierData *smd= (SolidifyModifierData*)ptr->data;
- rna_object_vgroup_name_set(ptr, value, smd->vgroup, sizeof(smd->vgroup));
+ rna_object_vgroup_name_set(ptr, value, smd->defgrp_name, sizeof(smd->defgrp_name));
}
static void rna_DisplaceModifier_uvlayer_set(PointerRNA *ptr, const char *value)
@@ -522,7 +522,7 @@ static void rna_def_property_subdivision_common(StructRNA *srna, const char type
PropertyRNA *prop= RNA_def_property(srna, "subdivision_type", PROP_ENUM, PROP_NONE);
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_ui_text(prop, "Subdivision Type", "Selects type of subdivision algorithm");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
}
@@ -532,7 +532,7 @@ static void rna_def_modifier_subsurf(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "SubsurfModifier", "Modifier");
- RNA_def_struct_ui_text(srna, "Subsurf Modifier", "Subdivision surface modifier.");
+ RNA_def_struct_ui_text(srna, "Subsurf Modifier", "Subdivision surface modifier");
RNA_def_struct_sdna(srna, "SubsurfModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_SUBSURF);
@@ -541,13 +541,13 @@ static void rna_def_modifier_subsurf(BlenderRNA *brna)
prop= RNA_def_property(srna, "levels", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "levels");
RNA_def_property_ui_range(prop, 0, 6, 1, 0);
- RNA_def_property_ui_text(prop, "Levels", "Number of subdivisions to perform.");
+ RNA_def_property_ui_text(prop, "Levels", "Number of subdivisions to perform");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "render_levels", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "renderLevels");
RNA_def_property_ui_range(prop, 0, 6, 1, 0);
- RNA_def_property_ui_text(prop, "Render Levels", "Number of subdivisions to perform when rendering.");
+ RNA_def_property_ui_text(prop, "Render Levels", "Number of subdivisions to perform when rendering");
prop= RNA_def_property(srna, "optimal_display", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", eSubsurfModifierFlag_ControlEdges);
@@ -556,7 +556,7 @@ static void rna_def_modifier_subsurf(BlenderRNA *brna)
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, "Subdivide UVs", "Use subsurf to subdivide UVs.");
+ RNA_def_property_ui_text(prop, "Subdivide UVs", "Use subsurf to subdivide UVs");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
}
@@ -566,7 +566,7 @@ static void rna_def_modifier_multires(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "MultiresModifier", "Modifier");
- RNA_def_struct_ui_text(srna, "Multires Modifier", "Multiresolution mesh modifier.");
+ RNA_def_struct_ui_text(srna, "Multires Modifier", "Multiresolution mesh modifier");
RNA_def_struct_sdna(srna, "MultiresModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_MULTIRES);
@@ -574,13 +574,13 @@ static void rna_def_modifier_multires(BlenderRNA *brna)
prop= RNA_def_property(srna, "levels", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "lvl");
- RNA_def_property_ui_text(prop, "Levels", "Number of subdivisions to use in the viewport.");
+ RNA_def_property_ui_text(prop, "Levels", "Number of subdivisions to use in the viewport");
RNA_def_property_int_funcs(prop, NULL, NULL, "rna_MultiresModifier_level_range");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "sculpt_levels", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "sculptlvl");
- RNA_def_property_ui_text(prop, "Sculpt Levels", "Number of subdivisions to use in sculpt mode.");
+ RNA_def_property_ui_text(prop, "Sculpt Levels", "Number of subdivisions to use in sculpt mode");
RNA_def_property_int_funcs(prop, NULL, NULL, "rna_MultiresModifier_level_range");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
@@ -592,16 +592,16 @@ static void rna_def_modifier_multires(BlenderRNA *brna)
prop= RNA_def_property(srna, "total_levels", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "totlvl");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Total Levels", "Number of subdivisions for which displacements are stored.");
+ RNA_def_property_ui_text(prop, "Total Levels", "Number of subdivisions for which displacements are stored");
prop= RNA_def_property(srna, "external", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_funcs(prop, "rna_MultiresModifier_external_get", NULL);
- RNA_def_property_ui_text(prop, "External", "Store multires displacements outside the .blend file, to save memory.");
+ RNA_def_property_ui_text(prop, "External", "Store multires displacements outside the .blend file, to save memory");
prop= RNA_def_property(srna, "filename", PROP_STRING, PROP_FILEPATH);
RNA_def_property_string_funcs(prop, "rna_MultiresModifier_filename_get", "rna_MultiresModifier_filename_length", "rna_MultiresModifier_filename_set");
- RNA_def_property_ui_text(prop, "Filename", "Path to external displacements file.");
+ RNA_def_property_ui_text(prop, "Filename", "Path to external displacements file");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "optimal_display", PROP_BOOLEAN, PROP_NONE);
@@ -616,19 +616,19 @@ static void rna_def_modifier_lattice(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "LatticeModifier", "Modifier");
- RNA_def_struct_ui_text(srna, "Lattice Modifier", "Lattice deformation modifier.");
+ RNA_def_struct_ui_text(srna, "Lattice Modifier", "Lattice deformation modifier");
RNA_def_struct_sdna(srna, "LatticeModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_LATTICE);
prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
- RNA_def_property_ui_text(prop, "Object", "Lattice object to deform with.");
+ 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|PROP_ID_SELF_CHECK);
RNA_def_property_update(prop, 0, "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_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");
}
@@ -648,26 +648,26 @@ static void rna_def_modifier_curve(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "CurveModifier", "Modifier");
- RNA_def_struct_ui_text(srna, "Curve Modifier", "Curve deformation modifier.");
+ RNA_def_struct_ui_text(srna, "Curve Modifier", "Curve deformation modifier");
RNA_def_struct_sdna(srna, "CurveModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_CURVE);
prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
- RNA_def_property_ui_text(prop, "Object", "Curve object to deform with.");
+ 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|PROP_ID_SELF_CHECK);
RNA_def_property_update(prop, 0, "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_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");
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_ui_text(prop, "Deform Axis", "The axis that the curve deforms along");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
}
@@ -677,13 +677,13 @@ static void rna_def_modifier_build(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "BuildModifier", "Modifier");
- RNA_def_struct_ui_text(srna, "Build Modifier", "Build effect modifier.");
+ RNA_def_struct_ui_text(srna, "Build Modifier", "Build effect modifier");
RNA_def_struct_sdna(srna, "BuildModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_BUILD);
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_ui_text(prop, "Start", "Specify the start frame of the effect");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "length", PROP_FLOAT, PROP_TIME);
@@ -692,12 +692,12 @@ static void rna_def_modifier_build(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Randomize", "Randomize the faces or edges during build");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Seed", "Specify the seed for random if used");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
}
@@ -707,55 +707,55 @@ static void rna_def_modifier_mirror(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "MirrorModifier", "Modifier");
- RNA_def_struct_ui_text(srna, "Mirror Modifier", "Mirroring modifier.");
+ RNA_def_struct_ui_text(srna, "Mirror Modifier", "Mirroring modifier");
RNA_def_struct_sdna(srna, "MirrorModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_MIRROR);
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_ui_text(prop, "X", "Enable X axis mirror");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Y", "Enable Y axis mirror");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Z", "Enable Z axis mirror");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Clip", "Prevents vertices from going through the mirror during transform");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Mirror Vertex Groups", "Mirror vertex groups (e.g. .R->.L)");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Mirror U", "Mirror the U texture coordinate around the 0.5 point");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Mirror V", "Mirror the V texture coordinate around the 0.5 point");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "merge_limit", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "tolerance");
RNA_def_property_range(prop, 0, FLT_MAX);
RNA_def_property_ui_range(prop, 0, 1, 0.01, 6);
- RNA_def_property_ui_text(prop, "Merge Limit", "Distance from axis within which mirrored vertices are merged.");
+ 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");
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_ui_text(prop, "Mirror Object", "Object to use as mirror");
RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK);
RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
}
@@ -766,20 +766,20 @@ static void rna_def_modifier_decimate(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "DecimateModifier", "Modifier");
- RNA_def_struct_ui_text(srna, "Decimate Modifier", "Decimation modifier.");
+ RNA_def_struct_ui_text(srna, "Decimate Modifier", "Decimation modifier");
RNA_def_struct_sdna(srna, "DecimateModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_DECIM);
prop= RNA_def_property(srna, "ratio", PROP_FLOAT, PROP_NONE);
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_ui_text(prop, "Ratio", "Defines the ratio of triangles to reduce to");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "face_count", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "faceCount");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Face Count", "The current number of faces in the decimated mesh.");
+ RNA_def_property_ui_text(prop, "Face Count", "The current number of faces in the decimated mesh");
}
static void rna_def_modifier_wave(BlenderRNA *brna)
@@ -795,28 +795,28 @@ static void rna_def_modifier_wave(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "WaveModifier", "Modifier");
- RNA_def_struct_ui_text(srna, "Wave Modifier", "Wave effect modifier.");
+ RNA_def_struct_ui_text(srna, "Wave Modifier", "Wave effect modifier");
RNA_def_struct_sdna(srna, "WaveModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_WAVE);
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_ui_text(prop, "X", "X axis motion");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Y", "Y axis motion");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Cyclic", "Cyclic wave effect");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Normals", "Dispace along normals");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "x_normal", PROP_BOOLEAN, PROP_NONE);
@@ -880,24 +880,24 @@ static void rna_def_modifier_wave(BlenderRNA *brna)
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_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");
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_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");
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_ui_text(prop, "Texture Coordinates", "Texture coordinates used for modulating input");
RNA_def_property_update(prop, 0, "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_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");
@@ -939,25 +939,25 @@ static void rna_def_modifier_armature(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "ArmatureModifier", "Modifier");
- RNA_def_struct_ui_text(srna, "Armature Modifier", "Armature deformation modifier.");
+ RNA_def_struct_ui_text(srna, "Armature Modifier", "Armature deformation modifier");
RNA_def_struct_sdna(srna, "ArmatureModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_ARMATURE);
prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
- RNA_def_property_ui_text(prop, "Object", "Armature object to deform with.");
+ 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|PROP_ID_SELF_CHECK);
RNA_def_property_update(prop, 0, "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_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");
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_ui_text(prop, "Invert", "Invert vertex group influence");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "use_vertex_groups", PROP_BOOLEAN, PROP_NONE);
@@ -972,7 +972,7 @@ static void rna_def_modifier_armature(BlenderRNA *brna)
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_ui_text(prop, "Quaternion", "Deform rotation interpolation with quaternions");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "b_bone_rest", PROP_BOOLEAN, PROP_NONE);
@@ -992,19 +992,19 @@ static void rna_def_modifier_hook(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "HookModifier", "Modifier");
- RNA_def_struct_ui_text(srna, "Hook Modifier", "Hook modifier to modify the location of vertices.");
+ RNA_def_struct_ui_text(srna, "Hook Modifier", "Hook modifier to modify the location of vertices");
RNA_def_struct_sdna(srna, "HookModifierData");
RNA_def_struct_ui_icon(srna, ICON_HOOK);
prop= RNA_def_property(srna, "falloff", PROP_FLOAT, PROP_DISTANCE);
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_ui_text(prop, "Falloff", "If not zero, the distance from the hook where influence ends");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Force", "Relative force of the hook");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
@@ -1019,7 +1019,7 @@ static void rna_def_modifier_hook(BlenderRNA *brna)
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_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");
}
@@ -1030,7 +1030,7 @@ static void rna_def_modifier_softbody(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "SoftBodyModifier", "Modifier");
- RNA_def_struct_ui_text(srna, "Soft Body Modifier", "Soft body simulation modifier.");
+ RNA_def_struct_ui_text(srna, "Soft Body Modifier", "Soft body simulation modifier");
RNA_def_struct_sdna(srna, "SoftbodyModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_SOFT);
@@ -1059,12 +1059,12 @@ static void rna_def_modifier_boolean(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "BooleanModifier", "Modifier");
- RNA_def_struct_ui_text(srna, "Boolean Modifier", "Boolean operations modifier.");
+ RNA_def_struct_ui_text(srna, "Boolean Modifier", "Boolean operations modifier");
RNA_def_struct_sdna(srna, "BooleanModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_BOOLEAN);
prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
- RNA_def_property_ui_text(prop, "Object", "Mesh object to use for boolean operation.");
+ 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|PROP_ID_SELF_CHECK);
RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
@@ -1087,31 +1087,31 @@ static void rna_def_modifier_array(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "ArrayModifier", "Modifier");
- RNA_def_struct_ui_text(srna, "Array Modifier", "Array duplication modifier.");
+ RNA_def_struct_ui_text(srna, "Array Modifier", "Array duplication modifier");
RNA_def_struct_sdna(srna, "ArrayModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_ARRAY);
/* Length parameters */
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_ui_text(prop, "Fit Type", "Array length calculation method");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Count", "Number of duplicates to make");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Length", "Length to fit array within");
RNA_def_property_update(prop, 0, "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_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|PROP_ID_SELF_CHECK);
RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
@@ -1140,25 +1140,25 @@ static void rna_def_modifier_array(BlenderRNA *brna)
/* 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_ui_text(prop, "Merge Vertices", "Merge vertices in adjacent duplicates");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Merge Vertices", "Merge vertices in first and last duplicates");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Merge Distance", "Limit below which to merge vertices");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Add Offset Object", "Add an object transformation to the total offset");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "offset_object", PROP_POINTER, PROP_NONE);
@@ -1169,13 +1169,13 @@ static void rna_def_modifier_array(BlenderRNA *brna)
/* 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_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|PROP_ID_SELF_CHECK);
RNA_def_property_update(prop, 0, "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_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|PROP_ID_SELF_CHECK);
RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
@@ -1187,24 +1187,24 @@ static void rna_def_modifier_edgesplit(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "EdgeSplitModifier", "Modifier");
- RNA_def_struct_ui_text(srna, "EdgeSplit Modifier", "Edge splitting modifier to create sharp edges.");
+ RNA_def_struct_ui_text(srna, "EdgeSplit Modifier", "Edge splitting modifier to create sharp edges");
RNA_def_struct_sdna(srna, "EdgeSplitModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_EDGESPLIT);
prop= RNA_def_property(srna, "split_angle", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0, 90);
RNA_def_property_ui_range(prop, 0, 90, 100, 2);
- RNA_def_property_ui_text(prop, "Split Angle", "Angle above which to split edges.");
+ RNA_def_property_ui_text(prop, "Split Angle", "Angle above which to split edges");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Use Edge Angle", "Split edges with high angle between faces");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Use Sharp Edges", "Split edges that are marked as sharp");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
}
@@ -1229,13 +1229,13 @@ static void rna_def_modifier_displace(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "DisplaceModifier", "Modifier");
- RNA_def_struct_ui_text(srna, "Displace Modifier", "Displacement modifier.");
+ RNA_def_struct_ui_text(srna, "Displace Modifier", "Displacement modifier");
RNA_def_struct_sdna(srna, "DisplaceModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_DISPLACE);
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_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");
@@ -1247,7 +1247,7 @@ static void rna_def_modifier_displace(BlenderRNA *brna)
prop= RNA_def_property(srna, "midlevel", PROP_FLOAT, PROP_DISTANCE);
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_ui_text(prop, "Midlevel", "Material value that gives no displacement");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "strength", PROP_FLOAT, PROP_NONE);
@@ -1269,7 +1269,7 @@ static void rna_def_modifier_displace(BlenderRNA *brna)
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_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");
@@ -1286,18 +1286,18 @@ 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, "UV Project 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);
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_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_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");
@@ -1328,17 +1328,17 @@ static void rna_def_modifier_uvproject(BlenderRNA *brna)
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_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.");
+ 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|PROP_ID_SELF_CHECK);
- RNA_def_property_ui_text(prop, "Object", "Object to use as projector transform.");
+ RNA_def_property_ui_text(prop, "Object", "Object to use as projector transform");
}
static void rna_def_modifier_smooth(BlenderRNA *brna)
@@ -1347,7 +1347,7 @@ static void rna_def_modifier_smooth(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "SmoothModifier", "Modifier");
- RNA_def_struct_ui_text(srna, "Smooth Modifier", "Smoothing effect modifier.");
+ RNA_def_struct_ui_text(srna, "Smooth Modifier", "Smoothing effect modifier");
RNA_def_struct_sdna(srna, "SmoothModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_SMOOTH);
@@ -1380,7 +1380,7 @@ static void rna_def_modifier_smooth(BlenderRNA *brna)
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_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");
}
@@ -1397,7 +1397,7 @@ static void rna_def_modifier_cast(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "CastModifier", "Modifier");
- RNA_def_struct_ui_text(srna, "Cast Modifier", "Cast modifier to cast to other shapes.");
+ RNA_def_struct_ui_text(srna, "Cast Modifier", "Cast modifier to cast to other shapes");
RNA_def_struct_sdna(srna, "CastModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_CAST);
@@ -1459,7 +1459,7 @@ static void rna_def_modifier_cast(BlenderRNA *brna)
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_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");
}
@@ -1469,41 +1469,41 @@ static void rna_def_modifier_meshdeform(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
static EnumPropertyItem prop_mode_items[] = {
- {0, "VOLUME", 0, "Volume", "Bind to volume inside cage mesh."},
- {1, "SURFACE", 0, "Surface", "Bind to surface of cage mesh."},
+ {0, "VOLUME", 0, "Volume", "Bind to volume inside cage mesh"},
+ {1, "SURFACE", 0, "Surface", "Bind to surface of cage mesh"},
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "MeshDeformModifier", "Modifier");
- RNA_def_struct_ui_text(srna, "MeshDeform Modifier", "Mesh deformation modifier to deform with other meshes.");
+ RNA_def_struct_ui_text(srna, "MeshDeform Modifier", "Mesh deformation modifier to deform with other meshes");
RNA_def_struct_sdna(srna, "MeshDeformModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_MESHDEFORM);
prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
- RNA_def_property_ui_text(prop, "Object", "Mesh object to deform with.");
+ 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|PROP_ID_SELF_CHECK);
RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
prop= RNA_def_property(srna, "is_bound", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_MeshDeformModifier_is_bound_get", NULL);
- RNA_def_property_ui_text(prop, "Bound", "Whether geometry has been bound to control cage.");
+ RNA_def_property_ui_text(prop, "Bound", "Whether geometry has been bound to control cage");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
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_ui_text(prop, "Invert", "Invert vertex group influence");
RNA_def_property_update(prop, 0, "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_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");
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_ui_text(prop, "Precision", "The grid size for binding");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "dynamic", PROP_BOOLEAN, PROP_NONE);
@@ -1513,7 +1513,7 @@ static void rna_def_modifier_meshdeform(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", "Method of binding vertices are bound to cage mesh.");
+ RNA_def_property_ui_text(prop, "Mode", "Method of binding vertices are bound to cage mesh");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
}
@@ -1522,7 +1522,7 @@ static void rna_def_modifier_particlesystem(BlenderRNA *brna)
StructRNA *srna;
srna= RNA_def_struct(brna, "ParticleSystemModifier", "Modifier");
- RNA_def_struct_ui_text(srna, "ParticleSystem Modifier", "Particle system simulation modifier.");
+ RNA_def_struct_ui_text(srna, "ParticleSystem Modifier", "Particle system simulation modifier");
RNA_def_struct_sdna(srna, "ParticleSystemModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_PARTICLES);
}
@@ -1540,13 +1540,13 @@ static void rna_def_modifier_particleinstance(BlenderRNA *brna)
};
srna= RNA_def_struct(brna, "ParticleInstanceModifier", "Modifier");
- RNA_def_struct_ui_text(srna, "ParticleInstance Modifier", "Particle system instancing modifier.");
+ RNA_def_struct_ui_text(srna, "ParticleInstance Modifier", "Particle system instancing modifier");
RNA_def_struct_sdna(srna, "ParticleInstanceModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_PARTICLES);
prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "ob");
- RNA_def_property_ui_text(prop, "Object", "Object that has the particle system.");
+ RNA_def_property_ui_text(prop, "Object", "Object that has the particle system");
RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK);
RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
@@ -1564,54 +1564,54 @@ static void rna_def_modifier_particleinstance(BlenderRNA *brna)
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_ui_text(prop, "Normal", "Create instances from normal particles");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Children", "Create instances from child particles");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Path", "Create instances along particle paths");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Unborn", "Show instances when particles are unborn");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Alive", "Show instances when particles are alive");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Dead", "Show instances when particles are dead");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Keep Shape", "Don't stretch the object");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Size", "Use particle size to scale the instances");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Position", "Position along path");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Random Position", "Randomize position along path");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
}
@@ -1621,7 +1621,7 @@ static void rna_def_modifier_explode(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "ExplodeModifier", "Modifier");
- RNA_def_struct_ui_text(srna, "Explode Modifier", "Explosion effect modifier based on a particle system.");
+ RNA_def_struct_ui_text(srna, "Explode Modifier", "Explosion effect modifier based on a particle system");
RNA_def_struct_sdna(srna, "ExplodeModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_EXPLODE);
@@ -1636,22 +1636,22 @@ static void rna_def_modifier_explode(BlenderRNA *brna)
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_ui_text(prop, "Split Edges", "Split face edges for nicer shrapnel");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Unborn", "Show mesh when particles are unborn");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Alive", "Show mesh when particles are alive");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Dead", "Show mesh when particles are dead");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
}
@@ -1661,7 +1661,7 @@ static void rna_def_modifier_cloth(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "ClothModifier", "Modifier");
- RNA_def_struct_ui_text(srna, "Cloth Modifier", "Cloth simulation modifier.");
+ RNA_def_struct_ui_text(srna, "Cloth Modifier", "Cloth simulation modifier");
RNA_def_struct_sdna(srna, "ClothModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_CLOTH);
@@ -1693,7 +1693,7 @@ static void rna_def_modifier_smoke(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "SmokeModifier", "Modifier");
- RNA_def_struct_ui_text(srna, "Smoke Modifier", "Smoke simulation 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);
@@ -1722,7 +1722,7 @@ static void rna_def_modifier_collision(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "CollisionModifier", "Modifier");
- RNA_def_struct_ui_text(srna, "Collision Modifier", "Collision modifier defining modifier stack position used for collision.");
+ RNA_def_struct_ui_text(srna, "Collision Modifier", "Collision modifier defining modifier stack position used for collision");
RNA_def_struct_sdna(srna, "CollisionModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_PHYSICS);
@@ -1739,9 +1739,9 @@ static void rna_def_modifier_bevel(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem prop_limit_method_items[] = {
- {0, "NONE", 0, "None", "Bevel the entire mesh by a constant amount."},
- {BME_BEVEL_ANGLE, "ANGLE", 0, "Angle", "Only bevel edges with sharp enough angles between faces."},
- {BME_BEVEL_WEIGHT, "WEIGHT", 0, "Weight", "Use bevel weights to determine how much bevel is applied; apply them separately in vert/edge select mode."},
+ {0, "NONE", 0, "None", "Bevel the entire mesh by a constant amount"},
+ {BME_BEVEL_ANGLE, "ANGLE", 0, "Angle", "Only bevel edges with sharp enough angles between faces"},
+ {BME_BEVEL_WEIGHT, "WEIGHT", 0, "Weight", "Use bevel weights to determine how much bevel is applied; apply them separately in vert/edge select mode"},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem prop_edge_weight_method_items[] = {
@@ -1751,7 +1751,7 @@ static void rna_def_modifier_bevel(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "BevelModifier", "Modifier");
- RNA_def_struct_ui_text(srna, "Bevel Modifier", "Bevel modifier to make edges and vertices more rounded.");
+ RNA_def_struct_ui_text(srna, "Bevel Modifier", "Bevel modifier to make edges and vertices more rounded");
RNA_def_struct_sdna(srna, "BevelModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_BEVEL);
@@ -1759,12 +1759,12 @@ static void rna_def_modifier_bevel(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "value");
RNA_def_property_range(prop, 0, FLT_MAX);
RNA_def_property_ui_range(prop, 0, 10, 0.1, 4);
- RNA_def_property_ui_text(prop, "Width", "Bevel value/amount.");
+ RNA_def_property_ui_text(prop, "Width", "Bevel value/amount");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Only Vertices", "Bevel verts/corners, not edges");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "limit_method", PROP_ENUM, PROP_NONE);
@@ -1776,14 +1776,14 @@ static void rna_def_modifier_bevel(BlenderRNA *brna)
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_ui_text(prop, "Edge Weight Method", "What edge weight to use for weighting a vertex");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Angle", "Angle above which to bevel edges");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
}
@@ -1799,7 +1799,7 @@ static void rna_def_modifier_shrinkwrap(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "ShrinkwrapModifier", "Modifier");
- RNA_def_struct_ui_text(srna, "Shrinkwrap Modifier", "Shrink wrapping modifier to shrink wrap and object to a target.");
+ RNA_def_struct_ui_text(srna, "Shrinkwrap Modifier", "Shrink wrapping modifier to shrink wrap and object to a target");
RNA_def_struct_sdna(srna, "ShrinkwrapModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_SHRINKWRAP);
@@ -1810,21 +1810,21 @@ static void rna_def_modifier_shrinkwrap(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "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_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|PROP_ID_SELF_CHECK);
RNA_def_property_update(prop, 0, "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_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|PROP_ID_SELF_CHECK);
RNA_def_property_update(prop, 0, "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_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");
@@ -1832,7 +1832,7 @@ static void rna_def_modifier_shrinkwrap(BlenderRNA *brna)
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_ui_text(prop, "Offset", "Distance to keep from the target");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "x", PROP_BOOLEAN, PROP_NONE);
@@ -1854,27 +1854,27 @@ static void rna_def_modifier_shrinkwrap(BlenderRNA *brna)
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_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");
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_ui_text(prop, "Negative", "Allow vertices to move in the negative direction of axis");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Positive", "Allow vertices to move in the positive direction of axis");
RNA_def_property_update(prop, 0, "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_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");
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_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");
prop= RNA_def_property(srna, "keep_above_surface", PROP_BOOLEAN, PROP_NONE);
@@ -1889,14 +1889,14 @@ static void rna_def_modifier_fluidsim(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "FluidSimulationModifier", "Modifier");
- RNA_def_struct_ui_text(srna, "Fluid Simulation Modifier", "Fluid simulation modifier.");
+ RNA_def_struct_ui_text(srna, "Fluid Simulation Modifier", "Fluid simulation modifier");
RNA_def_struct_sdna(srna, "FluidsimModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_FLUIDSIM);
prop= RNA_def_property(srna, "settings", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "fss");
- RNA_def_property_ui_text(prop, "Settings", "Settings for how this object is used in the fluid simulation.");
+ RNA_def_property_ui_text(prop, "Settings", "Settings for how this object is used in the fluid simulation");
}
static void rna_def_modifier_mask(BlenderRNA *brna)
@@ -1910,7 +1910,7 @@ static void rna_def_modifier_mask(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "MaskModifier", "Modifier");
- RNA_def_struct_ui_text(srna, "Mask Modifier", "Mask modifier to hide parts of the mesh.");
+ RNA_def_struct_ui_text(srna, "Mask Modifier", "Mask modifier to hide parts of the mesh");
RNA_def_struct_sdna(srna, "MaskModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_MASK);
@@ -1921,20 +1921,20 @@ static void rna_def_modifier_mask(BlenderRNA *brna)
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_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|PROP_ID_SELF_CHECK);
RNA_def_property_update(prop, 0, "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_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");
prop= RNA_def_property(srna, "invert", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_MASK_INV);
- RNA_def_property_ui_text(prop, "Invert", "Use vertices that are not part of region defined.");
+ RNA_def_property_ui_text(prop, "Invert", "Use vertices that are not part of region defined");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
}
@@ -1951,7 +1951,7 @@ static void rna_def_modifier_simpledeform(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "SimpleDeformModifier", "Modifier");
- RNA_def_struct_ui_text(srna, "SimpleDeform Modifier", "Simple deformation modifier to apply effects such as twisting and bending.");
+ RNA_def_struct_ui_text(srna, "SimpleDeform Modifier", "Simple deformation modifier to apply effects such as twisting and bending");
RNA_def_struct_sdna(srna, "SimpleDeformModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_SIMPLEDEFORM);
@@ -1962,18 +1962,18 @@ static void rna_def_modifier_simpledeform(BlenderRNA *brna)
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_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");
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_ui_text(prop, "Origin", "Origin of modifier space coordinates");
RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK);
RNA_def_property_update(prop, 0, "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_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");
prop= RNA_def_property(srna, "factor", PROP_FLOAT, PROP_NONE);
@@ -1987,7 +1987,7 @@ static void rna_def_modifier_simpledeform(BlenderRNA *brna)
RNA_def_property_array(prop, 2);
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_ui_text(prop, "Limits", "Lower/Upper limits for deform");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "lock_x_axis", PROP_BOOLEAN, PROP_NONE);
@@ -2006,7 +2006,7 @@ static void rna_def_modifier_surface(BlenderRNA *brna)
StructRNA *srna;
srna= RNA_def_struct(brna, "SurfaceModifier", "Modifier");
- RNA_def_struct_ui_text(srna, "Surface Modifier", "Surface modifier defining modifier stack position used for surface fields.");
+ RNA_def_struct_ui_text(srna, "Surface Modifier", "Surface modifier defining modifier stack position used for surface fields");
RNA_def_struct_sdna(srna, "SurfaceModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_PHYSICS);
}
@@ -2017,41 +2017,41 @@ static void rna_def_modifier_solidify(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "SolidifyModifier", "Modifier");
- RNA_def_struct_ui_text(srna, "Solidify Modifier", "Create a solid skin by extruding, compensating for sharp angles.");
+ RNA_def_struct_ui_text(srna, "Solidify Modifier", "Create a solid skin by extruding, compensating for sharp angles");
RNA_def_struct_sdna(srna, "SolidifyModifierData");
- RNA_def_struct_ui_icon(srna, ICON_MOD_DISPLACE);
+ RNA_def_struct_ui_icon(srna, ICON_MOD_SOLIDIFY);
prop= RNA_def_property(srna, "offset", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "offset");
RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
RNA_def_property_ui_range(prop, -10, 10, 0.1, 4);
- RNA_def_property_ui_text(prop, "Thickness", "Thickness of the shell.");
+ RNA_def_property_ui_text(prop, "Thickness", "Thickness of the shell");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "edge_crease_inner", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "crease_inner");
RNA_def_property_range(prop, 0, 1);
RNA_def_property_ui_range(prop, 0, 1, 0.1, 3);
- RNA_def_property_ui_text(prop, "Inner Crease", "Assign a crease to inner edges.");
+ RNA_def_property_ui_text(prop, "Inner Crease", "Assign a crease to inner edges");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "edge_crease_outer", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "crease_outer");
RNA_def_property_range(prop, 0, 1);
RNA_def_property_ui_range(prop, 0, 1, 0.1, 3);
- RNA_def_property_ui_text(prop, "Outer Crease", "Assign a crease to outer edges.");
+ RNA_def_property_ui_text(prop, "Outer Crease", "Assign a crease to outer edges");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "edge_crease_rim", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "crease_rim");
RNA_def_property_range(prop, 0, 1);
RNA_def_property_ui_range(prop, 0, 1, 0.1, 3);
- RNA_def_property_ui_text(prop, "Rim Crease", "Assign a crease to the edges making up the rim.");
+ RNA_def_property_ui_text(prop, "Rim Crease", "Assign a crease to the edges making up the rim");
RNA_def_property_update(prop, 0, "rna_Modifier_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_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_SolidifyModifier_vgroup_set");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
@@ -2078,7 +2078,7 @@ void RNA_def_modifier(BlenderRNA *brna)
/* data */
srna= RNA_def_struct(brna, "Modifier", NULL);
- RNA_def_struct_ui_text(srna , "Modifier", "Modifier affecting the geometry data of an object.");
+ RNA_def_struct_ui_text(srna , "Modifier", "Modifier affecting the geometry data of an object");
RNA_def_struct_refine_func(srna, "rna_Modifier_refine");
RNA_def_struct_path_func(srna, "rna_Modifier_path");
RNA_def_struct_sdna(srna, "ModifierData");
@@ -2086,7 +2086,7 @@ void RNA_def_modifier(BlenderRNA *brna)
/* strings */
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_Modifier_name_set");
- RNA_def_property_ui_text(prop, "Name", "Modifier name.");
+ RNA_def_property_ui_text(prop, "Name", "Modifier name");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER|NA_RENAME, NULL);
RNA_def_struct_name_property(srna, prop);
@@ -2100,30 +2100,31 @@ void RNA_def_modifier(BlenderRNA *brna)
/* flags */
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_ui_text(prop, "Realtime", "Realtime display of a modifier");
RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);
RNA_def_property_update(prop, 0, "rna_Modifier_update");
RNA_def_property_ui_icon(prop, ICON_RESTRICT_VIEW_OFF, 0);
prop= RNA_def_property(srna, "render", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", eModifierMode_Render);
- RNA_def_property_ui_text(prop, "Render", "Use modifier during rendering.");
+ RNA_def_property_ui_text(prop, "Render", "Use modifier during rendering");
RNA_def_property_ui_icon(prop, ICON_SCENE, 0);
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_ui_text(prop, "Editmode", "Use modifier while in the edit mode");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "On Cage", "Enable direct editing of modifier control cage");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "expanded", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", eModifierMode_Expanded);
- RNA_def_property_ui_text(prop, "Expanded", "Set modifier expanded in the user interface.");
+ RNA_def_property_ui_text(prop, "Expanded", "Set modifier expanded in the user interface");
+ RNA_def_property_ui_icon(prop, ICON_TRIA_RIGHT, 1);
/* types */
diff --git a/source/blender/makesrna/intern/rna_nla.c b/source/blender/makesrna/intern/rna_nla.c
index b70af62a556..246616ccffc 100644
--- a/source/blender/makesrna/intern/rna_nla.c
+++ b/source/blender/makesrna/intern/rna_nla.c
@@ -15,7 +15,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor(s): Blender Foundation (2009), Joshua Leung
*
@@ -85,6 +85,12 @@ static char *rna_NlaStrip_path(PointerRNA *ptr)
return "";
}
+static void rna_NlaStrip_transform_update(Main *bmain, Scene *scene, PointerRNA *ptr)
+{
+ NlaStrip *strip= (NlaStrip*)ptr->data;
+
+ BKE_nlameta_flush_transforms(strip);
+}
static void rna_NlaStrip_start_frame_set(PointerRNA *ptr, float value)
{
@@ -158,43 +164,25 @@ static void rna_NlaStrip_end_frame_set(PointerRNA *ptr, float value)
static void rna_NlaStrip_scale_set(PointerRNA *ptr, float value)
{
NlaStrip *data= (NlaStrip*)ptr->data;
- float actlen, mapping;
/* set scale value */
CLAMP(value, 0.0001f, 1000.0f); /* NOTE: these need to be synced with the values in the property definition in rna_def_nlastrip() */
data->scale= value;
- /* calculate existing factors */
- actlen= data->actend - data->actstart;
- if (IS_EQ(actlen, 0.0f)) actlen= 1.0f;
- mapping= data->scale * data->repeat;
-
- /* adjust endpoint of strip in response to this */
- if (IS_EQ(mapping, 0.0f) == 0)
- data->end = (actlen * mapping) + data->start;
- else
- printf("NlaStrip Set Scale Error (in RNA): Scale = %0.4f, Repeat = %0.4f \n", data->scale, data->repeat);
+ /* adjust the strip extents in response to this */
+ BKE_nlastrip_recalculate_bounds(data);
}
static void rna_NlaStrip_repeat_set(PointerRNA *ptr, float value)
{
NlaStrip *data= (NlaStrip*)ptr->data;
- float actlen, mapping;
- /* set scale value */
+ /* set repeat value */
CLAMP(value, 0.01f, 1000.0f); /* NOTE: these need to be synced with the values in the property definition in rna_def_nlastrip() */
data->repeat= value;
- /* calculate existing factors */
- actlen= data->actend - data->actstart;
- if (IS_EQ(actlen, 0.0f)) actlen= 1.0f;
- mapping= data->scale * data->repeat;
-
- /* adjust endpoint of strip in response to this */
- if (IS_EQ(mapping, 0.0f) == 0)
- data->end = (actlen * mapping) + data->start;
- else
- printf("NlaStrip Set Repeat Error (in RNA): Scale = %0.4f, Repeat = %0.4f \n", data->scale, data->repeat);
+ /* adjust the strip extents in response to this */
+ BKE_nlastrip_recalculate_bounds(data);
}
static void rna_NlaStrip_blend_in_set(PointerRNA *ptr, float value)
@@ -228,15 +216,26 @@ static void rna_NlaStrip_blend_out_set(PointerRNA *ptr, float value)
static void rna_NlaStrip_action_start_frame_set(PointerRNA *ptr, float value)
{
NlaStrip *data= (NlaStrip*)ptr->data;
+
+ /* prevent start frame from occurring after end of action */
CLAMP(value, MINAFRAME, data->actend);
data->actstart= value;
+
+ /* adjust the strip extents in response to this */
+ // TODO: should the strip be moved backwards instead as a special case?
+ BKE_nlastrip_recalculate_bounds(data);
}
static void rna_NlaStrip_action_end_frame_set(PointerRNA *ptr, float value)
{
NlaStrip *data= (NlaStrip*)ptr->data;
+
+ /* prevent end frame from starting before start of action */
CLAMP(value, data->actstart, MAXFRAME);
data->actend= value;
+
+ /* adjust the strip extents in response to this */
+ BKE_nlastrip_recalculate_bounds(data);
}
static void rna_NlaStrip_animated_influence_set(PointerRNA *ptr, int value)
@@ -269,15 +268,15 @@ static void rna_NlaStrip_animated_time_set(PointerRNA *ptr, int value)
/* enum defines exported for rna_animation.c */
EnumPropertyItem nla_mode_blend_items[] = {
- {NLASTRIP_MODE_REPLACE, "REPLACE", 0, "Replace", "Result strip replaces the accumulated results by amount specified by influence."},
- {NLASTRIP_MODE_ADD, "ADD", 0, "Add", "Weighted result of strip is added to the accumlated results."},
- {NLASTRIP_MODE_SUBTRACT, "SUBTRACT", 0, "Subtract", "Weighted result of strip is removed from the accumlated results."},
- {NLASTRIP_MODE_MULTIPLY, "MULITPLY", 0, "Multiply", "Weighted result of strip is multiplied with the accumlated results."},
+ {NLASTRIP_MODE_REPLACE, "REPLACE", 0, "Replace", "Result strip replaces the accumulated results by amount specified by influence"},
+ {NLASTRIP_MODE_ADD, "ADD", 0, "Add", "Weighted result of strip is added to the accumlated results"},
+ {NLASTRIP_MODE_SUBTRACT, "SUBTRACT", 0, "Subtract", "Weighted result of strip is removed from the accumlated results"},
+ {NLASTRIP_MODE_MULTIPLY, "MULITPLY", 0, "Multiply", "Weighted result of strip is multiplied with the accumlated results"},
{0, NULL, 0, NULL, NULL}};
EnumPropertyItem nla_mode_extend_items[] = {
- {NLASTRIP_EXTEND_NOTHING, "NOTHING", 0, "Nothing", "Strip has no influence past its extents."},
- {NLASTRIP_EXTEND_HOLD, "HOLD", 0, "Hold", "Hold the first frame if no previous strips in track, and always hold last frame."},
- {NLASTRIP_EXTEND_HOLD_FORWARD, "HOLD_FORWARD", 0, "Hold Forward", "Only hold last frame."},
+ {NLASTRIP_EXTEND_NOTHING, "NOTHING", 0, "Nothing", "Strip has no influence past its extents"},
+ {NLASTRIP_EXTEND_HOLD, "HOLD", 0, "Hold", "Hold the first frame if no previous strips in track, and always hold last frame"},
+ {NLASTRIP_EXTEND_HOLD_FORWARD, "HOLD_FORWARD", 0, "Hold Forward", "Only hold last frame"},
{0, NULL, 0, NULL, NULL}};
static void rna_def_nlastrip(BlenderRNA *brna)
@@ -287,14 +286,14 @@ static void rna_def_nlastrip(BlenderRNA *brna)
/* enum defs */
static EnumPropertyItem prop_type_items[] = {
- {NLASTRIP_TYPE_CLIP, "CLIP", 0, "Action Clip", "NLA Strip references some Action."},
- {NLASTRIP_TYPE_TRANSITION, "TRANSITION", 0, "Transition", "NLA Strip 'transitions' between adjacent strips."},
- {NLASTRIP_TYPE_META, "META", 0, "Meta", "NLA Strip acts as a container for adjacent strips."},
+ {NLASTRIP_TYPE_CLIP, "CLIP", 0, "Action Clip", "NLA Strip references some Action"},
+ {NLASTRIP_TYPE_TRANSITION, "TRANSITION", 0, "Transition", "NLA Strip 'transitions' between adjacent strips"},
+ {NLASTRIP_TYPE_META, "META", 0, "Meta", "NLA Strip acts as a container for adjacent strips"},
{0, NULL, 0, NULL, NULL}};
/* 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_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
@@ -309,34 +308,36 @@ static void rna_def_nlastrip(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "type");
RNA_def_property_clear_flag(prop, PROP_EDITABLE); // XXX for now, not editable, since this is dangerous
RNA_def_property_enum_items(prop, prop_type_items);
- RNA_def_property_ui_text(prop, "Type", "Type of NLA Strip.");
+ RNA_def_property_ui_text(prop, "Type", "Type of NLA Strip");
prop= RNA_def_property(srna, "extrapolation", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "extendmode");
RNA_def_property_enum_items(prop, nla_mode_extend_items);
- RNA_def_property_ui_text(prop, "Extrapolation", "Action to take for gaps past the strip extents.");
+ RNA_def_property_ui_text(prop, "Extrapolation", "Action to take for gaps past the strip extents");
prop= RNA_def_property(srna, "blending", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "blendmode");
RNA_def_property_enum_items(prop, nla_mode_blend_items);
- RNA_def_property_ui_text(prop, "Blending", "Method used for combining strip's result with accumulated result.");
+ RNA_def_property_ui_text(prop, "Blending", "Method used for combining strip's result with accumulated result");
/* Strip extents */
prop= RNA_def_property(srna, "start_frame", PROP_FLOAT, PROP_TIME);
RNA_def_property_float_sdna(prop, NULL, "start");
RNA_def_property_float_funcs(prop, NULL, "rna_NlaStrip_start_frame_set", NULL);
RNA_def_property_ui_text(prop, "Start Frame", "");
+ RNA_def_property_update(prop, 0, "rna_NlaStrip_transform_update");
prop= RNA_def_property(srna, "end_frame", PROP_FLOAT, PROP_TIME);
RNA_def_property_float_sdna(prop, NULL, "end");
RNA_def_property_float_funcs(prop, NULL, "rna_NlaStrip_end_frame_set", NULL);
RNA_def_property_ui_text(prop, "End Frame", "");
+ RNA_def_property_update(prop, 0, "rna_NlaStrip_transform_update");
/* Blending */
prop= RNA_def_property(srna, "blend_in", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "blendin");
RNA_def_property_float_funcs(prop, NULL, "rna_NlaStrip_blend_in_set", NULL);
- RNA_def_property_ui_text(prop, "Blend In", "Number of frames at start of strip to fade in influence.");
+ RNA_def_property_ui_text(prop, "Blend In", "Number of frames at start of strip to fade in influence");
prop= RNA_def_property(srna, "blend_out", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "blendout");
@@ -345,13 +346,13 @@ static void rna_def_nlastrip(BlenderRNA *brna)
prop= RNA_def_property(srna, "auto_blending", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", NLASTRIP_FLAG_AUTO_BLENDS);
- RNA_def_property_ui_text(prop, "Auto Blend In/Out", "Number of frames for Blending In/Out is automatically determined from overlapping strips.");
+ RNA_def_property_ui_text(prop, "Auto Blend In/Out", "Number of frames for Blending In/Out is automatically determined from overlapping strips");
/* 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.");
+ RNA_def_property_ui_text(prop, "Action", "Action referenced by this strip");
/* Action extents */
prop= RNA_def_property(srna, "action_start_frame", PROP_FLOAT, PROP_TIME);
@@ -369,65 +370,65 @@ static void rna_def_nlastrip(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "repeat");
RNA_def_property_float_funcs(prop, NULL, "rna_NlaStrip_repeat_set", NULL);
RNA_def_property_range(prop, 0.1f, 1000.0f); /* these limits have currently be chosen arbitarily, but could be extended (minimum should still be > 0 though) if needed... */
- RNA_def_property_ui_text(prop, "Repeat", "Number of times to repeat the action range.");
+ RNA_def_property_ui_text(prop, "Repeat", "Number of times to repeat the action range");
prop= RNA_def_property(srna, "scale", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "scale");
RNA_def_property_float_funcs(prop, NULL, "rna_NlaStrip_scale_set", NULL);
RNA_def_property_range(prop, 0.0001f, 1000.0f); /* these limits can be extended, but beyond this, we can get some crazy+annoying bugs due to numeric errors */
- RNA_def_property_ui_text(prop, "Scale", "Scaling factor for action.");
+ RNA_def_property_ui_text(prop, "Scale", "Scaling factor for action");
/* Strip's F-Curves */
prop= RNA_def_property(srna, "fcurves", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "FCurve");
- RNA_def_property_ui_text(prop, "F-Curves", "F-Curves for controlling the strip's influence and timing.");
+ RNA_def_property_ui_text(prop, "F-Curves", "F-Curves for controlling the strip's influence and timing");
/* Strip's F-Modifiers */
prop= RNA_def_property(srna, "modifiers", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "FModifier");
- RNA_def_property_ui_text(prop, "Modifiers", "Modifiers affecting all the F-Curves in the referenced Action.");
+ RNA_def_property_ui_text(prop, "Modifiers", "Modifiers affecting all the F-Curves in the referenced Action");
/* Strip's Sub-Strips (for Meta-Strips) */
prop= RNA_def_property(srna, "strips", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "NlaStrip");
- RNA_def_property_ui_text(prop, "NLA Strips", "NLA Strips that this strip acts as a container for (if it is of type Meta).");
+ RNA_def_property_ui_text(prop, "NLA Strips", "NLA Strips that this strip acts as a container for (if it is of type Meta)");
/* Settings - Values necessary for evaluation */
prop= RNA_def_property(srna, "influence", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Influence", "Amount the strip contributes to the current result.");
+ RNA_def_property_ui_text(prop, "Influence", "Amount the strip contributes to the current result");
prop= RNA_def_property(srna, "strip_time", PROP_FLOAT, PROP_TIME);
- RNA_def_property_ui_text(prop, "Strip Time", "Frame of referenced Action to evaluate.");
+ RNA_def_property_ui_text(prop, "Strip Time", "Frame of referenced Action to evaluate");
// TODO: should the animated_influence/time settings be animatable themselves?
prop= RNA_def_property(srna, "animated_influence", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", NLASTRIP_FLAG_USR_INFLUENCE);
RNA_def_property_boolean_funcs(prop, NULL, "rna_NlaStrip_animated_influence_set");
- RNA_def_property_ui_text(prop, "Animated Influence", "Influence setting is controlled by an F-Curve rather than automatically determined.");
+ RNA_def_property_ui_text(prop, "Animated Influence", "Influence setting is controlled by an F-Curve rather than automatically determined");
prop= RNA_def_property(srna, "animated_time", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", NLASTRIP_FLAG_USR_TIME);
RNA_def_property_boolean_funcs(prop, NULL, "rna_NlaStrip_animated_time_set");
- RNA_def_property_ui_text(prop, "Animated Strip Time", "Strip time is controlled by an F-Curve rather than automatically determined.");
+ RNA_def_property_ui_text(prop, "Animated Strip Time", "Strip time is controlled by an F-Curve rather than automatically determined");
/* settings */
prop= RNA_def_property(srna, "active", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* can be made editable by hooking it up to the necessary NLA API methods */
RNA_def_property_boolean_sdna(prop, NULL, "flag", NLASTRIP_FLAG_ACTIVE);
- RNA_def_property_ui_text(prop, "Active", "NLA Strip is active.");
+ RNA_def_property_ui_text(prop, "Active", "NLA Strip is active");
prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", NLASTRIP_FLAG_SELECT);
- RNA_def_property_ui_text(prop, "Selected", "NLA Strip is selected.");
+ RNA_def_property_ui_text(prop, "Selected", "NLA Strip is selected");
prop= RNA_def_property(srna, "muted", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", NLASTRIP_FLAG_MUTED);
- RNA_def_property_ui_text(prop, "Muted", "NLA Strip is not evaluated.");
+ RNA_def_property_ui_text(prop, "Muted", "NLA Strip is not evaluated");
prop= RNA_def_property(srna, "reversed", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", NLASTRIP_FLAG_REVERSE);
- RNA_def_property_ui_text(prop, "Reversed", "NLA Strip is played back in reverse order (only when timing is automatically determined).");
+ RNA_def_property_ui_text(prop, "Reversed", "NLA Strip is played back in reverse order (only when timing is automatically determined)");
// TODO:
// - sync length
@@ -439,13 +440,13 @@ static void rna_def_nlatrack(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "NlaTrack", NULL);
- RNA_def_struct_ui_text(srna, "NLA Track", "A animation layer containing Actions referenced as NLA strips.");
+ RNA_def_struct_ui_text(srna, "NLA Track", "A animation layer containing Actions referenced as NLA strips");
RNA_def_struct_ui_icon(srna, ICON_NLA);
/* strips collection */
prop= RNA_def_property(srna, "strips", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "NlaStrip");
- RNA_def_property_ui_text(prop, "NLA Strips", "NLA Strips on this NLA-track.");
+ RNA_def_property_ui_text(prop, "NLA Strips", "NLA Strips on this NLA-track");
/* name property */
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
@@ -456,24 +457,24 @@ static void rna_def_nlatrack(BlenderRNA *brna)
prop= RNA_def_property(srna, "active", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* can be made editable by hooking it up to the necessary NLA API methods */
RNA_def_property_boolean_sdna(prop, NULL, "flag", NLATRACK_ACTIVE);
- RNA_def_property_ui_text(prop, "Active", "NLA Track is active.");
+ RNA_def_property_ui_text(prop, "Active", "NLA Track is active");
prop= RNA_def_property(srna, "solo", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* can be made editable by hooking it up to the necessary NLA API methods */
RNA_def_property_boolean_sdna(prop, NULL, "flag", NLATRACK_SOLO);
- RNA_def_property_ui_text(prop, "Solo", "NLA Track is evaluated itself (i.e. active Action and all other NLA Tracks in the same AnimData block are disabled).");
+ RNA_def_property_ui_text(prop, "Solo", "NLA Track is evaluated itself (i.e. active Action and all other NLA Tracks in the same AnimData block are disabled)");
prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", NLATRACK_SELECTED);
- RNA_def_property_ui_text(prop, "Selected", "NLA Track is selected.");
+ RNA_def_property_ui_text(prop, "Selected", "NLA Track is selected");
prop= RNA_def_property(srna, "muted", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", NLATRACK_MUTED);
- RNA_def_property_ui_text(prop, "Muted", "NLA Track is not evaluated.");
+ RNA_def_property_ui_text(prop, "Muted", "NLA Track is not evaluated");
prop= RNA_def_property(srna, "locked", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", NLATRACK_PROTECTED);
- RNA_def_property_ui_text(prop, "Locked", "NLA Track is locked.");
+ RNA_def_property_ui_text(prop, "Locked", "NLA Track is locked");
}
/* --------- */
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index 9922f099cd5..d8c5c796fa3 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -15,7 +15,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor(s): Blender Foundation (2008), Nathan Letwory, Robin Allen
*
@@ -42,8 +42,12 @@
#include "BKE_image.h"
#include "BKE_texture.h"
+#include "BLI_math.h"
+
#include "WM_types.h"
+#include "MEM_guardedalloc.h"
+
#ifdef RNA_RUNTIME
#include "ED_node.h"
@@ -63,6 +67,9 @@ static StructRNA *rna_Node_refine(struct PointerRNA *ptr)
#undef DefNode
+ case NODE_GROUP:
+ return &RNA_NodeGroup;
+
default:
return &RNA_Node;
}
@@ -177,6 +184,16 @@ static void rna_Node_update(Main *bmain, Scene *scene, PointerRNA *ptr)
node_update(bmain, scene, ntree, node);
}
+static void rna_NodeGroup_update(Main *bmain, Scene *scene, PointerRNA *ptr)
+{
+ bNodeTree *ntree= (bNodeTree*)ptr->id.data;
+ bNode *node= (bNode*)ptr->data;
+
+ nodeVerifyGroup((bNodeTree *)node->id);
+
+ node_update(bmain, scene, ntree, node);
+}
+
static void rna_Node_update_name(Main *bmain, Scene *scene, PointerRNA *ptr)
{
bNodeTree *ntree= (bNodeTree*)ptr->id.data;
@@ -474,7 +491,7 @@ static EnumPropertyItem node_filter_items[] = {
enum
{
- Category_NoCategory,
+ Category_GroupNode,
Category_ShaderNode,
Category_CompositorNode,
Category_TextureNode
@@ -521,6 +538,8 @@ static void init(void)
#undef DefNode
#undef Str
+
+ reg_node(NODE_GROUP, Category_GroupNode, "GROUP", "NodeGroup", "Node", "Group", "");
}
static StructRNA* def_node(BlenderRNA *brna, int node_id)
@@ -535,17 +554,17 @@ static StructRNA* def_node(BlenderRNA *brna, int node_id)
return srna;
}
-static EnumPropertyItem* alloc_node_type_items(int category)
+void alloc_node_type_items(EnumPropertyItem *items, int category)
{
int i;
- int count = 2;
- EnumPropertyItem *item, *items;
+ int count = 3;
+ EnumPropertyItem *item = items;
for(i=0; i<MaxNodes; i++)
if(nodes[i].defined && nodes[i].category == category)
count++;
- item = items = malloc(count * sizeof(EnumPropertyItem));
+ /*item = items = MEM_callocN(count * sizeof(EnumPropertyItem), "alloc_node_type_items");*/
for(i=0; i<MaxNodes; i++) {
NodeInfo *node = nodes + i;
@@ -562,19 +581,41 @@ static EnumPropertyItem* alloc_node_type_items(int category)
item->value = NODE_DYNAMIC;
item->identifier = "SCRIPT";
+ item->icon = 0;
item->name = "Script";
item->description = "";
item++;
- memset(item, 0, sizeof(EnumPropertyItem));
+ item->value = NODE_GROUP;
+ item->identifier = "GROUP";
+ item->icon = 0;
+ item->name = "Group";
+ item->description = "";
- return items;
+ item++;
+
+ /* NOTE!, increase 'count' when adding items here */
+
+ memset(item, 0, sizeof(EnumPropertyItem));
}
/* -- Common nodes ---------------------------------------------------------- */
+static void def_group(StructRNA *srna)
+{
+ PropertyRNA *prop;
+
+ prop = RNA_def_property(srna, "nodetree", PROP_POINTER, PROP_NONE);
+ RNA_def_property_pointer_sdna(prop, NULL, "id");
+ RNA_def_property_struct_type(prop, "NodeTree");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Node Tree", "");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_NodeGroup_update");
+}
+
+
static void def_math(StructRNA *srna)
{
PropertyRNA *prop;
@@ -1134,6 +1175,7 @@ static void def_cmp_output_file(StructRNA *srna)
RNA_def_property_ui_text(prop, "Quality", "");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
+ // TODO: should these be limited to the extents of the each other so that no cross-over occurs?
prop = RNA_def_property(srna, "start_frame", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "sfra");
RNA_def_property_range(prop, MINFRAMEF, MAXFRAMEF);
@@ -1185,14 +1227,14 @@ static void def_cmp_diff_matte(StructRNA *srna)
RNA_def_property_float_sdna(prop, NULL, "t1");
RNA_def_property_float_funcs(prop, NULL, "rna_Matte_t1_set", NULL);
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, "Tolerance", "Color distances below this threshold are keyed");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "falloff", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "t2");
RNA_def_property_float_funcs(prop, NULL, "rna_Matte_t2_set", NULL);
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_ui_text(prop, "Falloff", "Color distances below this additional threshold are partially keyed");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
}
@@ -1231,14 +1273,14 @@ static void def_cmp_distance_matte(StructRNA *srna)
RNA_def_property_float_sdna(prop, NULL, "t1");
RNA_def_property_float_funcs(prop, NULL, "rna_Matte_t1_set", NULL);
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, "Tolerance", "Color distances below this threshold are keyed");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "falloff", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "t2");
RNA_def_property_float_funcs(prop, NULL, "rna_Matte_t2_set", NULL);
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_ui_text(prop, "Falloff", "Color distances below this additional threshold are partially keyed");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
}
@@ -1802,7 +1844,7 @@ static void def_cmp_lensdist(StructRNA *srna)
prop = RNA_def_property(srna, "projector", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "proj", 1);
- RNA_def_property_ui_text(prop, "Projector", "Enable/disable projector mode. Effect is applied in horizontal direction only.");
+ RNA_def_property_ui_text(prop, "Projector", "Enable/disable projector mode. Effect is applied in horizontal direction only");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "jitter", PROP_BOOLEAN, PROP_NONE);
@@ -1815,7 +1857,83 @@ static void def_cmp_lensdist(StructRNA *srna)
RNA_def_property_ui_text(prop, "Fit", "For positive distortion factor only: scale image such that black areas are not visible");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
}
+
+static void def_cmp_colorbalance(StructRNA *srna)
+{
+ PropertyRNA *prop;
+ static float default_1[3] = {1.f, 1.f, 1.f};
+
+ static EnumPropertyItem type_items[] = {
+ {0, "LIFT_GAMMA_GAIN", 0, "Lift/Gamma/Gain", ""},
+ {1, "OFFSET_POWER_SLOPE", 0, "Offset/Power/Slope (ASC-CDL)", "ASC-CDL standard color correction"},
+ {0, NULL, 0, NULL, NULL}};
+
+ prop = RNA_def_property(srna, "correction_formula", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "custom1");
+ RNA_def_property_enum_items(prop, type_items);
+ RNA_def_property_ui_text(prop, "Correction Formula", "");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
+
+ RNA_def_struct_sdna_from(srna, "NodeColorBalance", "storage");
+
+ prop = RNA_def_property(srna, "lift", PROP_FLOAT, PROP_COLOR_GAMMA);
+ RNA_def_property_float_sdna(prop, NULL, "lift");
+ RNA_def_property_array(prop, 3);
+ RNA_def_property_ui_range(prop, 0, 1, 0.1, 3);
+ RNA_def_property_ui_text(prop, "Lift", "Correction for Shadows");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
+
+ prop = RNA_def_property(srna, "gamma", PROP_FLOAT, PROP_COLOR_GAMMA);
+ RNA_def_property_float_sdna(prop, NULL, "gamma");
+ RNA_def_property_array(prop, 3);
+ RNA_def_property_float_array_default(prop, default_1);
+ RNA_def_property_ui_range(prop, 0, 2, 0.1, 3);
+ RNA_def_property_ui_text(prop, "Gamma", "Correction for Midtones");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
+
+ prop = RNA_def_property(srna, "gain", PROP_FLOAT, PROP_COLOR_GAMMA);
+ RNA_def_property_float_sdna(prop, NULL, "gain");
+ RNA_def_property_array(prop, 3);
+ RNA_def_property_float_array_default(prop, default_1);
+ RNA_def_property_ui_range(prop, 0, 2, 0.1, 3);
+ RNA_def_property_ui_text(prop, "Gain", "Correction for Highlights");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
+
+
+ prop = RNA_def_property(srna, "offset", PROP_FLOAT, PROP_COLOR_GAMMA);
+ RNA_def_property_float_sdna(prop, NULL, "lift");
+ RNA_def_property_array(prop, 3);
+ RNA_def_property_ui_range(prop, 0, 1, 0.1, 3);
+ RNA_def_property_ui_text(prop, "Offset", "Correction for Shadows");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
+
+ prop = RNA_def_property(srna, "power", PROP_FLOAT, PROP_COLOR_GAMMA);
+ RNA_def_property_float_sdna(prop, NULL, "gamma");
+ RNA_def_property_array(prop, 3);
+ RNA_def_property_float_array_default(prop, default_1);
+ RNA_def_property_ui_range(prop, 0, 2, 0.1, 3);
+ RNA_def_property_ui_text(prop, "Power", "Correction for Midtones");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
+
+ prop = RNA_def_property(srna, "slope", PROP_FLOAT, PROP_COLOR_GAMMA);
+ RNA_def_property_float_sdna(prop, NULL, "gain");
+ RNA_def_property_array(prop, 3);
+ RNA_def_property_float_array_default(prop, default_1);
+ RNA_def_property_ui_range(prop, 0, 2, 0.1, 3);
+ RNA_def_property_ui_text(prop, "Slope", "Correction for Highlights");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
+}
+
+static void def_cmp_huecorrect(StructRNA *srna)
+{
+ PropertyRNA *prop;
+ prop = RNA_def_property(srna, "mapping", PROP_POINTER, PROP_NONE);
+ RNA_def_property_pointer_sdna(prop, NULL, "storage");
+ RNA_def_property_struct_type(prop, "CurveMapping");
+ RNA_def_property_ui_text(prop, "Mapping", "");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
+}
/* -- Texture Nodes --------------------------------------------------------- */
@@ -1883,31 +2001,31 @@ static void def_tex_bricks(StructRNA *srna)
/* -------------------------------------------------------------------------- */
+static EnumPropertyItem shader_node_type_items[MaxNodes];
static void rna_def_shader_node(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
- EnumPropertyItem *node_type_items;
- node_type_items = alloc_node_type_items(Category_ShaderNode);
+ alloc_node_type_items(shader_node_type_items, Category_ShaderNode);
srna = RNA_def_struct(brna, "ShaderNode", "Node");
- RNA_def_struct_ui_text(srna, "Shader Node", "Material shader node.");
+ RNA_def_struct_ui_text(srna, "Shader Node", "Material shader node");
RNA_def_struct_sdna(srna, "bNode");
prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_enum_items(prop, node_type_items);
+ RNA_def_property_enum_items(prop, shader_node_type_items);
RNA_def_property_ui_text(prop, "Type", "");
}
+static EnumPropertyItem compositor_node_type_items[MaxNodes];
static void rna_def_compositor_node(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
- EnumPropertyItem *node_type_items;
- node_type_items = alloc_node_type_items(Category_CompositorNode);
+ alloc_node_type_items(compositor_node_type_items, Category_CompositorNode);
srna = RNA_def_struct(brna, "CompositorNode", "Node");
RNA_def_struct_ui_text(srna, "Compositor Node", "");
@@ -1915,17 +2033,17 @@ static void rna_def_compositor_node(BlenderRNA *brna)
prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_enum_items(prop, node_type_items);
+ RNA_def_property_enum_items(prop, compositor_node_type_items);
RNA_def_property_ui_text(prop, "Type", "");
}
+static EnumPropertyItem texture_node_type_items[MaxNodes];
static void rna_def_texture_node(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
- EnumPropertyItem *node_type_items;
- node_type_items = alloc_node_type_items(Category_TextureNode);
+ alloc_node_type_items(texture_node_type_items, Category_TextureNode);
srna = RNA_def_struct(brna, "TextureNode", "Node");
RNA_def_struct_ui_text(srna, "Texture Node", "");
@@ -1933,7 +2051,7 @@ static void rna_def_texture_node(BlenderRNA *brna)
prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_enum_items(prop, node_type_items);
+ RNA_def_property_enum_items(prop, texture_node_type_items);
RNA_def_property_ui_text(prop, "Type", "");
}
@@ -1965,13 +2083,13 @@ static void rna_def_node_socket_value(BlenderRNA *brna)
prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Name", "Socket name.");
+ RNA_def_property_ui_text(prop, "Name", "Socket name");
RNA_def_struct_name_property(srna, prop);
prop = RNA_def_property(srna, "default_value", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ns.vec");
RNA_def_property_array(prop, 1);
- RNA_def_property_ui_text(prop, "Default Value", "Default value of the socket when no link is attached.");
+ RNA_def_property_ui_text(prop, "Default Value", "Default value of the socket when no link is attached");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_NodeSocket_update");
RNA_def_property_float_funcs(prop, NULL, NULL, "rna_NodeSocket_defvalue_range");
}
@@ -1989,13 +2107,13 @@ static void rna_def_node_socket_vector(BlenderRNA *brna)
prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Name", "Socket name.");
+ RNA_def_property_ui_text(prop, "Name", "Socket name");
RNA_def_struct_name_property(srna, prop);
prop = RNA_def_property(srna, "default_value", PROP_FLOAT, PROP_XYZ);
RNA_def_property_float_sdna(prop, NULL, "ns.vec");
RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "Default Value", "Default value of the socket when no link is attached.");
+ RNA_def_property_ui_text(prop, "Default Value", "Default value of the socket when no link is attached");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_NodeSocket_update");
RNA_def_property_float_funcs(prop, NULL, NULL, "rna_NodeSocket_defvalue_range");
}
@@ -2013,13 +2131,13 @@ static void rna_def_node_socket_rgba(BlenderRNA *brna)
prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Name", "Socket name.");
+ RNA_def_property_ui_text(prop, "Name", "Socket name");
RNA_def_struct_name_property(srna, prop);
prop = RNA_def_property(srna, "default_value", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "ns.vec");
RNA_def_property_array(prop, 4);
- RNA_def_property_ui_text(prop, "Default Value", "Default value of the socket when no link is attached.");
+ RNA_def_property_ui_text(prop, "Default Value", "Default value of the socket when no link is attached");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_NodeSocket_update");
RNA_def_property_float_funcs(prop, NULL, NULL, "rna_NodeSocket_defvalue_range");
}
@@ -2030,7 +2148,7 @@ static void rna_def_node(BlenderRNA *brna)
PropertyRNA *prop;
srna = RNA_def_struct(brna, "Node", NULL);
- RNA_def_struct_ui_text(srna, "Node", "Node in a node tree.");
+ RNA_def_struct_ui_text(srna, "Node", "Node in a node tree");
RNA_def_struct_sdna(srna, "bNode");
RNA_def_struct_ui_icon(srna, ICON_NODE);
RNA_def_struct_refine_func(srna, "rna_Node_refine");
@@ -2044,7 +2162,7 @@ static void rna_def_node(BlenderRNA *brna)
RNA_def_property_update(prop, NC_NODE, "rna_Node_update");
prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
- RNA_def_property_ui_text(prop, "Name", "Node name.");
+ RNA_def_property_ui_text(prop, "Name", "Node name");
RNA_def_struct_name_property(srna, prop);
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update_name");
@@ -2065,7 +2183,7 @@ static void rna_def_nodetree(BlenderRNA *brna)
PropertyRNA *prop;
srna = RNA_def_struct(brna, "NodeTree", "ID");
- RNA_def_struct_ui_text(srna, "Node Tree", "Node tree consisting of linked nodes used for materials, textures and compositing.");
+ RNA_def_struct_ui_text(srna, "Node Tree", "Node tree consisting of linked nodes used for materials, textures and compositing");
RNA_def_struct_sdna(srna, "bNodeTree");
RNA_def_struct_ui_icon(srna, ICON_NODETREE);
@@ -2106,13 +2224,15 @@ void RNA_def_nodetree(BlenderRNA *brna)
rna_def_shader_node(brna);
rna_def_compositor_node(brna);
rna_def_texture_node(brna);
-
+
#define DefNode(Category, ID, DefFunc, EnumName, StructName, UIName, UIDesc) \
define_specific_node(brna, ID, DefFunc);
#include "rna_nodetree_types.h"
#undef DefNode
+
+ define_specific_node(brna, NODE_GROUP, def_group);
}
#endif
diff --git a/source/blender/makesrna/intern/rna_nodetree_types.h b/source/blender/makesrna/intern/rna_nodetree_types.h
index d9a1db996de..b31751a8ce7 100644
--- a/source/blender/makesrna/intern/rna_nodetree_types.h
+++ b/source/blender/makesrna/intern/rna_nodetree_types.h
@@ -15,7 +15,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor(s): Robin Allen
*
@@ -107,6 +107,8 @@ DefNode( CompositorNode, CMP_NODE_LENSDIST, def_cmp_lensdist, "LENSD
DefNode( CompositorNode, CMP_NODE_VIEW_LEVELS, def_cmp_levels, "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( CompositorNode, CMP_NODE_COLORBALANCE, def_cmp_colorbalance, "COLORBALANCE", ColorBalance, "Color Balance", "" )
+DefNode( CompositorNode, CMP_NODE_HUECORRECT, def_cmp_huecorrect, "HUECORRECT", HueCorrect, "Hue Correct", "" )
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 fd9d7272b6d..8215cb6bf41 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -15,7 +15,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor(s): Blender Foundation (2008).
*
@@ -932,7 +932,7 @@ static PointerRNA rna_Object_active_shape_key_get(PointerRNA *ptr)
return PointerRNA_NULL;
kb= BLI_findlink(&key->block, ob->shapenr-1);
- RNA_pointer_create((ID *)ob->data, &RNA_ShapeKey, kb, &keyptr);
+ RNA_pointer_create((ID *)key, &RNA_ShapeKey, kb, &keyptr);
return keyptr;
}
@@ -998,6 +998,19 @@ static void rna_Object_modifier_remove(Object *object, bContext *C, ReportList *
ED_object_modifier_remove(reports, CTX_data_scene(C), object, md);
}
+static void rna_Object_boundbox_get(PointerRNA *ptr, float *values)
+{
+ Object *ob= (Object*)ptr->id.data;
+ BoundBox *bb= object_get_boundbox(ob);
+ if(bb) {
+ memcpy(values, bb->vec, sizeof(bb->vec));
+ }
+ else {
+ memset(values, -1.0f, sizeof(bb->vec));
+ }
+
+}
+
#else
static void rna_def_vertex_group(BlenderRNA *brna)
@@ -1007,18 +1020,18 @@ static void rna_def_vertex_group(BlenderRNA *brna)
srna= RNA_def_struct(brna, "VertexGroup", NULL);
RNA_def_struct_sdna(srna, "bDeformGroup");
- RNA_def_struct_ui_text(srna, "Vertex Group", "Group of vertices, used for armature deform and other purposes.");
+ RNA_def_struct_ui_text(srna, "Vertex Group", "Group of vertices, used for armature deform and other purposes");
RNA_def_struct_ui_icon(srna, ICON_GROUP_VERTEX);
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
- RNA_def_property_ui_text(prop, "Name", "Vertex group name.");
+ RNA_def_property_ui_text(prop, "Name", "Vertex group name");
RNA_def_struct_name_property(srna, prop);
RNA_def_property_update(prop, NC_GEOM|ND_DATA|NA_RENAME, NULL);
prop= RNA_def_property(srna, "index", PROP_INT, PROP_UNSIGNED);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_int_funcs(prop, "rna_VertexGroup_index_get", NULL, NULL);
- RNA_def_property_ui_text(prop, "Index", "Index number of the vertex group.");
+ RNA_def_property_ui_text(prop, "Index", "Index number of the vertex group");
}
static void rna_def_material_slot(BlenderRNA *brna)
@@ -1036,25 +1049,25 @@ static void rna_def_material_slot(BlenderRNA *brna)
* get/set for the properties. */
srna= RNA_def_struct(brna, "MaterialSlot", NULL);
- RNA_def_struct_ui_text(srna, "Material Slot", "Material slot in an object.");
+ RNA_def_struct_ui_text(srna, "Material Slot", "Material slot in an object");
RNA_def_struct_ui_icon(srna, ICON_MATERIAL_DATA);
prop= RNA_def_property(srna, "material", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "Material");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_pointer_funcs(prop, "rna_MaterialSlot_material_get", "rna_MaterialSlot_material_set", NULL);
- RNA_def_property_ui_text(prop, "Material", "Material datablock used by this material slot.");
+ RNA_def_property_ui_text(prop, "Material", "Material datablock used by this material slot");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_update");
prop= RNA_def_property(srna, "link", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, link_items);
RNA_def_property_enum_funcs(prop, "rna_MaterialSlot_link_get", "rna_MaterialSlot_link_set", NULL);
- RNA_def_property_ui_text(prop, "Link", "Link material to object or the object's data.");
+ RNA_def_property_ui_text(prop, "Link", "Link material to object or the object's data");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_update");
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_MaterialSlot_name_get", "rna_MaterialSlot_name_length", NULL);
- RNA_def_property_ui_text(prop, "Name", "Material slot name.");
+ RNA_def_property_ui_text(prop, "Name", "Material slot name");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_struct_name_property(srna, prop);
}
@@ -1077,39 +1090,39 @@ static void rna_def_object_game_settings(BlenderRNA *brna)
srna= RNA_def_struct(brna, "GameObjectSettings", NULL);
RNA_def_struct_sdna(srna, "Object");
RNA_def_struct_nested(brna, srna, "Object");
- RNA_def_struct_ui_text(srna, "Game Object Settings", "Game engine related settings for the object.");
+ RNA_def_struct_ui_text(srna, "Game Object Settings", "Game engine related settings for the object");
RNA_def_struct_ui_icon(srna, ICON_GAME);
/* logic */
prop= RNA_def_property(srna, "sensors", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "Sensor");
- RNA_def_property_ui_text(prop, "Sensors", "Game engine sensor to detect events.");
+ RNA_def_property_ui_text(prop, "Sensors", "Game engine sensor to detect events");
prop= RNA_def_property(srna, "controllers", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "Controller");
- RNA_def_property_ui_text(prop, "Controllers", "Game engine controllers to process events, connecting sensor to actuators.");
+ RNA_def_property_ui_text(prop, "Controllers", "Game engine controllers to process events, connecting sensor to actuators");
prop= RNA_def_property(srna, "actuators", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "Actuator");
- RNA_def_property_ui_text(prop, "Actuators", "Game engine actuators to act on events.");
+ RNA_def_property_ui_text(prop, "Actuators", "Game engine actuators to act on events");
prop= RNA_def_property(srna, "properties", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "prop", NULL);
RNA_def_property_struct_type(prop, "GameProperty"); /* rna_property.c */
- RNA_def_property_ui_text(prop, "Properties", "Game engine properties.");
+ RNA_def_property_ui_text(prop, "Properties", "Game engine properties");
prop= RNA_def_property(srna, "show_sensors", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "scaflag", OB_SHOWSENS);
- RNA_def_property_ui_text(prop, "Show Sensors", "Shows sensors for this object in the user interface.");
+ RNA_def_property_ui_text(prop, "Show Sensors", "Shows sensors for this object in the user interface");
prop= RNA_def_property(srna, "show_controllers", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "scaflag", OB_SHOWCONT);
- RNA_def_property_ui_text(prop, "Show Controllers", "Shows controllers for this object in the user interface.");
+ RNA_def_property_ui_text(prop, "Show Controllers", "Shows controllers for this object in the user interface");
prop= RNA_def_property(srna, "show_actuators", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "scaflag", OB_SHOWACT);
- RNA_def_property_ui_text(prop, "Show Actuators", "Shows actuators for this object in the user interface.");
+ RNA_def_property_ui_text(prop, "Show Actuators", "Shows actuators for this object in the user interface");
/* physics */
@@ -1117,19 +1130,19 @@ static void rna_def_object_game_settings(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "body_type");
RNA_def_property_enum_items(prop, body_type_items);
RNA_def_property_enum_funcs(prop, "rna_GameObjectSettings_physics_type_get", "rna_GameObjectSettings_physics_type_set", NULL);
- RNA_def_property_ui_text(prop, "Physics Type", "Selects the type of physical representation.");
+ RNA_def_property_ui_text(prop, "Physics Type", "Selects the type of physical representation");
prop= RNA_def_property(srna, "actor", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gameflag", OB_ACTOR);
- RNA_def_property_ui_text(prop, "Actor", "Object is detected by the Near and Radar sensor.");
+ RNA_def_property_ui_text(prop, "Actor", "Object is detected by the Near and Radar sensor");
prop= RNA_def_property(srna, "ghost", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gameflag", OB_GHOST);
- RNA_def_property_ui_text(prop, "Ghost", "Object does not restitute collisions, like a ghost.");
+ RNA_def_property_ui_text(prop, "Ghost", "Object does not restitute collisions, like a ghost");
prop= RNA_def_property(srna, "mass", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.01, 10000.0);
- RNA_def_property_ui_text(prop, "Mass", "Mass of the object.");
+ RNA_def_property_ui_text(prop, "Mass", "Mass of the object");
prop= RNA_def_property(srna, "radius", PROP_FLOAT, PROP_NONE|PROP_UNIT_LENGTH);
RNA_def_property_float_sdna(prop, NULL, "inertia");
@@ -1139,64 +1152,64 @@ static void rna_def_object_game_settings(BlenderRNA *brna)
prop= RNA_def_property(srna, "no_sleeping", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gameflag", OB_COLLISION_RESPONSE);
- RNA_def_property_ui_text(prop, "No Sleeping", "Disable auto (de)activation in physics simulation.");
+ RNA_def_property_ui_text(prop, "No Sleeping", "Disable auto (de)activation in physics simulation");
prop= RNA_def_property(srna, "damping", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "damping");
RNA_def_property_range(prop, 0.0, 1.0);
- RNA_def_property_ui_text(prop, "Damping", "General movement damping.");
+ RNA_def_property_ui_text(prop, "Damping", "General movement damping");
prop= RNA_def_property(srna, "rotation_damping", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "rdamping");
RNA_def_property_range(prop, 0.0, 1.0);
- RNA_def_property_ui_text(prop, "Rotation Damping", "General rotation damping.");
+ RNA_def_property_ui_text(prop, "Rotation Damping", "General rotation damping");
prop= RNA_def_property(srna, "minimum_velocity", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "min_vel");
RNA_def_property_range(prop, 0.0, 1000.0);
- RNA_def_property_ui_text(prop, "Velocity Min", "Clamp velocity to this minimum speed (except when totally still).");
+ RNA_def_property_ui_text(prop, "Velocity Min", "Clamp velocity to this minimum speed (except when totally still)");
prop= RNA_def_property(srna, "maximum_velocity", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "max_vel");
RNA_def_property_range(prop, 0.0, 1000.0);
- RNA_def_property_ui_text(prop, "Velocity Max", "Clamp velocity to this maximum speed.");
+ RNA_def_property_ui_text(prop, "Velocity Max", "Clamp velocity to this maximum speed");
/* lock position */
prop= RNA_def_property(srna, "lock_x_axis", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gameflag2", OB_LOCK_RIGID_BODY_X_AXIS);
- RNA_def_property_ui_text(prop, "Lock X Axis", "Disable simulation of linear motion along the X axis.");
+ RNA_def_property_ui_text(prop, "Lock X Axis", "Disable simulation of linear motion along the X axis");
prop= RNA_def_property(srna, "lock_y_axis", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gameflag2", OB_LOCK_RIGID_BODY_Y_AXIS);
- RNA_def_property_ui_text(prop, "Lock Y Axis", "Disable simulation of linear motion along the Y axis.");
+ RNA_def_property_ui_text(prop, "Lock Y Axis", "Disable simulation of linear motion along the Y axis");
prop= RNA_def_property(srna, "lock_z_axis", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gameflag2", OB_LOCK_RIGID_BODY_Z_AXIS);
- RNA_def_property_ui_text(prop, "Lock Z Axis", "Disable simulation of linear motion along the Z axis.");
+ RNA_def_property_ui_text(prop, "Lock Z Axis", "Disable simulation of linear motion along the Z axis");
/* lock rotation */
prop= RNA_def_property(srna, "lock_x_rot_axis", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gameflag2", OB_LOCK_RIGID_BODY_X_ROT_AXIS);
- RNA_def_property_ui_text(prop, "Lock X Rotation Axis", "Disable simulation of angular motion along the X axis.");
+ RNA_def_property_ui_text(prop, "Lock X Rotation Axis", "Disable simulation of angular motion along the X axis");
prop= RNA_def_property(srna, "lock_y_rot_axis", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gameflag2", OB_LOCK_RIGID_BODY_Y_ROT_AXIS);
- RNA_def_property_ui_text(prop, "Lock Y Rotation Axis", "Disable simulation of angular motion along the Y axis.");
+ RNA_def_property_ui_text(prop, "Lock Y Rotation Axis", "Disable simulation of angular motion along the Y axis");
prop= RNA_def_property(srna, "lock_z_rot_axis", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gameflag2", OB_LOCK_RIGID_BODY_Z_ROT_AXIS);
- RNA_def_property_ui_text(prop, "Lock Z Rotation Axis", "Disable simulation of angular motion along the Z axis.");
+ RNA_def_property_ui_text(prop, "Lock Z Rotation Axis", "Disable simulation of angular motion along the Z axis");
/* is this used anywhere ? */
prop= RNA_def_property(srna, "use_activity_culling", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "gameflag2", OB_NEVER_DO_ACTIVITY_CULLING);
- RNA_def_property_ui_text(prop, "Lock Z Rotation Axis", "Disable simulation of angular motion along the Z axis.");
+ RNA_def_property_ui_text(prop, "Lock Z Rotation Axis", "Disable simulation of angular motion along the Z axis");
prop= RNA_def_property(srna, "material_physics", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gameflag", OB_DO_FH);
- RNA_def_property_ui_text(prop, "Use Material Physics", "Use physics settings in materials.");
+ RNA_def_property_ui_text(prop, "Use Material Physics", "Use physics settings in materials");
prop= RNA_def_property(srna, "rotate_from_normal", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gameflag", OB_ROT_FH);
@@ -1205,57 +1218,57 @@ static void rna_def_object_game_settings(BlenderRNA *brna)
prop= RNA_def_property(srna, "form_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "formfactor");
RNA_def_property_range(prop, 0.0, 1.0);
- RNA_def_property_ui_text(prop, "Form Factor", "Form factor scales the inertia tensor.");
+ RNA_def_property_ui_text(prop, "Form Factor", "Form factor scales the inertia tensor");
prop= RNA_def_property(srna, "anisotropic_friction", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gameflag", OB_ANISOTROPIC_FRICTION);
- RNA_def_property_ui_text(prop, "Anisotropic Friction", "Enable anisotropic friction.");
+ RNA_def_property_ui_text(prop, "Anisotropic Friction", "Enable anisotropic friction");
prop= RNA_def_property(srna, "friction_coefficients", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "anisotropicFriction");
RNA_def_property_range(prop, 0.0, 1.0);
- RNA_def_property_ui_text(prop, "Friction Coefficients", "Relative friction coefficient in the in the X, Y and Z directions, when anisotropic friction is enabled.");
+ RNA_def_property_ui_text(prop, "Friction Coefficients", "Relative friction coefficient in the in the X, Y and Z directions, when anisotropic friction is enabled");
prop= RNA_def_property(srna, "use_collision_bounds", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gameflag", OB_BOUNDS);
- RNA_def_property_ui_text(prop, "Use Collision Bounds", "Specify a collision bounds type other than the default.");
+ RNA_def_property_ui_text(prop, "Use Collision Bounds", "Specify a collision bounds type other than the default");
prop= RNA_def_property(srna, "collision_bounds", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "boundtype");
RNA_def_property_enum_items(prop, collision_bounds_items);
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_Object_collision_bounds_itemf");
- RNA_def_property_ui_text(prop, "Collision Bounds", "Selects the collision type.");
+ RNA_def_property_ui_text(prop, "Collision Bounds", "Selects the collision type");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
prop= RNA_def_property(srna, "collision_compound", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gameflag", OB_CHILD);
- RNA_def_property_ui_text(prop, "Collison Compound", "Add children to form a compound collision object.");
+ RNA_def_property_ui_text(prop, "Collison Compound", "Add children to form a compound collision object");
prop= RNA_def_property(srna, "collision_margin", PROP_FLOAT, PROP_NONE|PROP_UNIT_LENGTH);
RNA_def_property_float_sdna(prop, NULL, "margin");
RNA_def_property_range(prop, 0.0, 1.0);
- RNA_def_property_ui_text(prop, "Collision Margin", "Extra margin around object for collision detection, small amount required for stability.");
+ RNA_def_property_ui_text(prop, "Collision Margin", "Extra margin around object for collision detection, small amount required for stability");
prop= RNA_def_property(srna, "soft_body", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "bsoft");
- RNA_def_property_ui_text(prop, "Soft Body Settings", "Settings for Bullet soft body simulation.");
+ RNA_def_property_ui_text(prop, "Soft Body Settings", "Settings for Bullet soft body simulation");
/* state */
prop= RNA_def_property(srna, "state", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "state", 1);
RNA_def_property_array(prop, 30);
- RNA_def_property_ui_text(prop, "State", "State determining which controllers are displayed.");
+ RNA_def_property_ui_text(prop, "State", "State determining which controllers are displayed");
RNA_def_property_boolean_funcs(prop, NULL, "rna_GameObjectSettings_state_set");
prop= RNA_def_property(srna, "initial_state", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "init_state", 1);
RNA_def_property_array(prop, 30);
- RNA_def_property_ui_text(prop, "Initial State", "Initial state when the game starts.");
+ RNA_def_property_ui_text(prop, "Initial State", "Initial state when the game starts");
prop= RNA_def_property(srna, "debug_state", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "scaflag", OB_DEBUGSTATE);
- RNA_def_property_ui_text(prop, "Debug State", "Print state debug info in the game engine.");
+ RNA_def_property_ui_text(prop, "Debug State", "Print state debug info in the game engine");
}
static void rna_def_object_constraints(BlenderRNA *brna, PropertyRNA *cprop)
@@ -1269,7 +1282,7 @@ static void rna_def_object_constraints(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_property_srna(cprop, "ObjectConstraints");
srna= RNA_def_struct(brna, "ObjectConstraints", NULL);
RNA_def_struct_sdna(srna, "Object");
- RNA_def_struct_ui_text(srna, "Object Constraints", "Collection of object constraints.");
+ RNA_def_struct_ui_text(srna, "Object Constraints", "Collection of object constraints");
/* Collection active property */
@@ -1277,7 +1290,7 @@ static void rna_def_object_constraints(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_property_struct_type(prop, "Constraint");
RNA_def_property_pointer_funcs(prop, "rna_Object_active_constraint_get", "rna_Object_active_constraint_set", NULL);
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Active Constraint", "Active Object constraint.");
+ RNA_def_property_ui_text(prop, "Active Constraint", "Active Object constraint");
/* Constraint collection */
@@ -1313,14 +1326,14 @@ static void rna_def_object_modifiers(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_property_srna(cprop, "ObjectModifiers");
srna= RNA_def_struct(brna, "ObjectModifiers", NULL);
RNA_def_struct_sdna(srna, "Object");
- RNA_def_struct_ui_text(srna, "Object Modifiers", "Collection of object modifiers.");
+ RNA_def_struct_ui_text(srna, "Object Modifiers", "Collection of object modifiers");
#if 0
prop= RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "EditBone");
RNA_def_property_pointer_sdna(prop, NULL, "act_edbone");
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Active EditBone", "Armatures active edit bone.");
+ RNA_def_property_ui_text(prop, "Active EditBone", "Armatures active edit bone");
//RNA_def_property_update(prop, 0, "rna_Armature_act_editbone_update");
RNA_def_property_pointer_funcs(prop, NULL, "rna_Armature_act_edit_bone_set", NULL);
@@ -1380,12 +1393,12 @@ static void rna_def_object(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem track_items[] = {
- {OB_POSX, "POSX", 0, "+X", ""},
- {OB_POSY, "POSY", 0, "+Y", ""},
- {OB_POSZ, "POSZ", 0, "+Z", ""},
- {OB_NEGX, "NEGX", 0, "-X", ""},
- {OB_NEGY, "NEGY", 0, "-Y", ""},
- {OB_NEGZ, "NEGZ", 0, "-Z", ""},
+ {OB_POSX, "POS_X", 0, "+X", ""},
+ {OB_POSY, "POS_Y", 0, "+Y", ""},
+ {OB_POSZ, "POS_Z", 0, "+Z", ""},
+ {OB_NEGX, "NEG_X", 0, "-X", ""},
+ {OB_NEGY, "NEG_Y", 0, "-Y", ""},
+ {OB_NEGZ, "NEG_Z", 0, "-Z", ""},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem up_items[] = {
@@ -1412,30 +1425,32 @@ static void rna_def_object(BlenderRNA *brna)
static EnumPropertyItem dupli_items[] = {
{0, "NONE", 0, "None", ""},
- {OB_DUPLIFRAMES, "FRAMES", 0, "Frames", "Make copy of object for every frame."},
- {OB_DUPLIVERTS, "VERTS", 0, "Verts", "Duplicate child objects on all vertices."},
- {OB_DUPLIFACES, "FACES", 0, "Faces", "Duplicate child objects on all faces."},
- {OB_DUPLIGROUP, "GROUP", 0, "Group", "Enable group instancing."},
+ {OB_DUPLIFRAMES, "FRAMES", 0, "Frames", "Make copy of object for every frame"},
+ {OB_DUPLIVERTS, "VERTS", 0, "Verts", "Duplicate child objects on all vertices"},
+ {OB_DUPLIFACES, "FACES", 0, "Faces", "Duplicate child objects on all faces"},
+ {OB_DUPLIGROUP, "GROUP", 0, "Group", "Enable group instancing"},
{0, NULL, 0, NULL, NULL}};
// XXX: this RNA enum define is currently duplicated for objects, since there is some text here which is not applicable
static EnumPropertyItem prop_rotmode_items[] = {
- {ROT_MODE_QUAT, "QUATERNION", 0, "Quaternion (WXYZ)", "No Gimbal Lock."},
+ {ROT_MODE_QUAT, "QUATERNION", 0, "Quaternion (WXYZ)", "No Gimbal Lock"},
{ROT_MODE_XYZ, "XYZ", 0, "XYZ Euler", "XYZ Rotation Order. Prone to Gimbal Lock. (Default)"},
{ROT_MODE_XZY, "XZY", 0, "XZY Euler", "XZY Rotation Order. Prone to Gimbal Lock"},
{ROT_MODE_YXZ, "YXZ", 0, "YXZ Euler", "YXZ Rotation Order. Prone to Gimbal Lock"},
{ROT_MODE_YZX, "YZX", 0, "YZX Euler", "YZX Rotation Order. Prone to Gimbal Lock"},
{ROT_MODE_ZXY, "ZXY", 0, "ZXY Euler", "ZXY Rotation Order. Prone to Gimbal Lock"},
{ROT_MODE_ZYX, "ZYX", 0, "ZYX Euler", "ZYX Rotation Order. Prone to Gimbal Lock"},
- {ROT_MODE_AXISANGLE, "AXIS_ANGLE", 0, "Axis Angle", "Axis Angle (W+XYZ). Defines a rotation around some axis defined by 3D-Vector."},
+ {ROT_MODE_AXISANGLE, "AXIS_ANGLE", 0, "Axis Angle", "Axis Angle (W+XYZ). Defines a rotation around some axis defined by 3D-Vector"},
{0, NULL, 0, NULL, NULL}};
static float default_quat[4] = {1,0,0,0}; /* default quaternion values */
static float default_axisAngle[4] = {0,0,1,0}; /* default axis-angle rotation values */
+ static float default_scale[3] = {1,1,1}; /* default scale values */
int matrix_dimsize[]= {4, 4};
+ int boundbox_dimsize[]= {8, 3};
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_ui_text(srna, "Object", "Object datablock defining an object in a scene");
RNA_def_struct_clear_flag(srna, STRUCT_ID_REFCOUNT);
RNA_def_struct_ui_icon(srna, ICON_OBJECT_DATA);
@@ -1444,34 +1459,41 @@ static void rna_def_object(BlenderRNA *brna)
RNA_def_property_pointer_funcs(prop, NULL, "rna_Object_data_set", "rna_Object_data_typef");
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_ui_text(prop, "Data", "Object data");
RNA_def_property_update(prop, 0, "rna_Object_update_data");
prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "type");
RNA_def_property_enum_items(prop, object_type_items);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Type", "Type of Object.");
+ RNA_def_property_ui_text(prop, "Type", "Type of Object");
prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "mode");
RNA_def_property_enum_items(prop, object_mode_items);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Mode", "Object interaction mode.");
+ RNA_def_property_ui_text(prop, "Mode", "Object interaction mode");
prop= RNA_def_property(srna, "layers", PROP_BOOLEAN, PROP_LAYER_MEMBER);
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.");
+ RNA_def_property_ui_text(prop, "Layers", "Layers the object is on");
RNA_def_property_boolean_funcs(prop, NULL, "rna_Object_layer_set");
RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_layer_update");
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", "Object selection state.");
+ RNA_def_property_ui_text(prop, "Selected", "Object selection state");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_select_update");
+ /* for data access */
+ prop= RNA_def_property(srna, "bound_box", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_multi_array(prop, 2, boundbox_dimsize);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_float_funcs(prop, "rna_Object_boundbox_get", NULL, NULL);
+ RNA_def_property_ui_text(prop, "Bound Box", "Objects bound box in object-space coords");
+
/* parent and track */
prop= RNA_def_property(srna, "parent", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_funcs(prop, NULL, "rna_Object_parent_set", NULL);
@@ -1483,78 +1505,78 @@ static void rna_def_object(BlenderRNA *brna)
RNA_def_property_enum_bitflag_sdna(prop, NULL, "partype");
RNA_def_property_enum_items(prop, parent_type_items);
RNA_def_property_enum_funcs(prop, NULL, "rna_Object_parent_type_set", "rna_Object_parent_type_itemf");
- RNA_def_property_ui_text(prop, "Parent Type", "Type of parent relation.");
+ RNA_def_property_ui_text(prop, "Parent Type", "Type of parent relation");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_dependency_update");
prop= RNA_def_property(srna, "parent_vertices", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "par1");
RNA_def_property_array(prop, 3);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Parent Vertices", "Indices of vertices in cases of a vertex parenting relation.");
+ RNA_def_property_ui_text(prop, "Parent Vertices", "Indices of vertices in cases of a vertex parenting relation");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_update");
prop= RNA_def_property(srna, "parent_bone", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "parsubstr");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_Object_parent_bone_set");
- RNA_def_property_ui_text(prop, "Parent Bone", "Name of parent bone in case of a bone parenting relation.");
+ RNA_def_property_ui_text(prop, "Parent Bone", "Name of parent bone in case of a bone parenting relation");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_dependency_update");
prop= RNA_def_property(srna, "track", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK);
- RNA_def_property_ui_text(prop, "Track", "Object being tracked to define the rotation (Old Track).");
+ RNA_def_property_ui_text(prop, "Track", "Object being tracked to define the rotation (Old Track)");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_dependency_update");
prop= RNA_def_property(srna, "track_axis", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "trackflag");
RNA_def_property_enum_items(prop, track_items);
- RNA_def_property_ui_text(prop, "Track Axis", "Tracking axis pointing to the another object.");
+ RNA_def_property_ui_text(prop, "Track Axis", "Tracking axis pointing to the tracked object");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_update");
prop= RNA_def_property(srna, "up_axis", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "upflag");
RNA_def_property_enum_items(prop, up_items);
- RNA_def_property_ui_text(prop, "Up Axis", "Specify the axis that points up.");
+ RNA_def_property_ui_text(prop, "Up Axis", "Axis that points in the upward direction");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_update");
/* proxy */
prop= RNA_def_property(srna, "proxy", PROP_POINTER, PROP_NONE);
- RNA_def_property_ui_text(prop, "Proxy", "Library object this proxy object controls.");
+ RNA_def_property_ui_text(prop, "Proxy", "Library object this proxy object controls");
prop= RNA_def_property(srna, "proxy_group", PROP_POINTER, PROP_NONE);
- RNA_def_property_ui_text(prop, "Proxy Group", "Library group duplicator object this proxy object controls.");
+ RNA_def_property_ui_text(prop, "Proxy Group", "Library group duplicator object this proxy object controls");
/* materials */
- prop= RNA_def_property(srna, "materials", PROP_COLLECTION, PROP_NONE);
+ prop= RNA_def_property(srna, "material_slots", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "mat", "totcol");
RNA_def_property_struct_type(prop, "MaterialSlot");
RNA_def_property_collection_funcs(prop, NULL, NULL, NULL, "rna_iterator_array_get", 0, 0, 0); /* don't dereference pointer! */
- RNA_def_property_ui_text(prop, "Materials", "Material slots in the object.");
+ RNA_def_property_ui_text(prop, "Material Slots", "Material slots in the object");
prop= RNA_def_property(srna, "active_material", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "Material");
RNA_def_property_pointer_funcs(prop, "rna_Object_active_material_get", "rna_Object_active_material_set", NULL);
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Active Material", "Active material being displayed.");
+ RNA_def_property_ui_text(prop, "Active Material", "Active material being displayed");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_update");
prop= RNA_def_property(srna, "active_material_index", PROP_INT, PROP_UNSIGNED);
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_ui_text(prop, "Active Material Index", "Index of active material slot");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
/* transform */
prop= RNA_def_property(srna, "location", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "loc");
RNA_def_property_editable_array_func(prop, "rna_Object_location_editable");
- RNA_def_property_ui_text(prop, "Location", "Location of the object.");
+ RNA_def_property_ui_text(prop, "Location", "Location of the object");
RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_update");
prop= RNA_def_property(srna, "rotation_quaternion", PROP_FLOAT, PROP_QUATERNION);
RNA_def_property_float_sdna(prop, NULL, "quat");
RNA_def_property_editable_array_func(prop, "rna_Object_rotation_4d_editable");
RNA_def_property_float_array_default(prop, default_quat);
- RNA_def_property_ui_text(prop, "Quaternion Rotation", "Rotation in Quaternions.");
+ RNA_def_property_ui_text(prop, "Quaternion Rotation", "Rotation in Quaternions");
RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_update");
/* XXX: for axis-angle, it would have been nice to have 2 separate fields for UI purposes, but
@@ -1565,13 +1587,13 @@ static void rna_def_object(BlenderRNA *brna)
RNA_def_property_float_funcs(prop, "rna_Object_rotation_axis_angle_get", "rna_Object_rotation_axis_angle_set", NULL);
RNA_def_property_editable_array_func(prop, "rna_Object_rotation_4d_editable");
RNA_def_property_float_array_default(prop, default_axisAngle);
- RNA_def_property_ui_text(prop, "Axis-Angle Rotation", "Angle of Rotation for Axis-Angle rotation representation.");
+ RNA_def_property_ui_text(prop, "Axis-Angle Rotation", "Angle of Rotation for Axis-Angle rotation representation");
RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_update");
prop= RNA_def_property(srna, "rotation_euler", PROP_FLOAT, PROP_EULER);
RNA_def_property_float_sdna(prop, NULL, "rot");
RNA_def_property_editable_array_func(prop, "rna_Object_rotation_euler_editable");
- RNA_def_property_ui_text(prop, "Euler Rotation", "Rotation in Eulers.");
+ RNA_def_property_ui_text(prop, "Euler Rotation", "Rotation in Eulers");
RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_update");
prop= RNA_def_property(srna, "rotation_mode", PROP_ENUM, PROP_NONE);
@@ -1584,91 +1606,92 @@ static void rna_def_object(BlenderRNA *brna)
prop= RNA_def_property(srna, "scale", PROP_FLOAT, PROP_XYZ);
RNA_def_property_float_sdna(prop, NULL, "size");
RNA_def_property_editable_array_func(prop, "rna_Object_scale_editable");
- RNA_def_property_ui_text(prop, "Scale", "Scaling of the object.");
+ RNA_def_property_float_array_default(prop, default_scale);
+ RNA_def_property_ui_text(prop, "Scale", "Scaling of the object");
RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_update");
prop= RNA_def_property(srna, "dimensions", PROP_FLOAT, PROP_XYZ|PROP_UNIT_LENGTH);
RNA_def_property_array(prop, 3);
RNA_def_property_float_funcs(prop, "rna_Object_dimensions_get", "rna_Object_dimensions_set", NULL);
- RNA_def_property_ui_text(prop, "Dimensions", "Absolute bounding box dimensions of the object.");
+ RNA_def_property_ui_text(prop, "Dimensions", "Absolute bounding box dimensions of the object");
RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_update");
/* delta transforms */
prop= RNA_def_property(srna, "delta_location", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "dloc");
- RNA_def_property_ui_text(prop, "Delta Location", "Extra added translation to object location.");
+ RNA_def_property_ui_text(prop, "Delta Location", "Extra translation added to the location of the object");
RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_update");
prop= RNA_def_property(srna, "delta_rotation_euler", PROP_FLOAT, PROP_EULER);
RNA_def_property_float_sdna(prop, NULL, "drot");
- RNA_def_property_ui_text(prop, "Delta Rotation (Euler)", "Extra added rotation to the rotation of the object (when using Euler rotations).");
+ RNA_def_property_ui_text(prop, "Delta Rotation (Euler)", "Extra rotation added to the rotation of the object (when using Euler rotations)");
RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_update");
prop= RNA_def_property(srna, "delta_rotation_quaternion", PROP_FLOAT, PROP_QUATERNION);
RNA_def_property_float_sdna(prop, NULL, "dquat");
RNA_def_property_float_array_default(prop, default_quat);
- RNA_def_property_ui_text(prop, "Delta Rotation (Quaternion)", "Extra added rotation to the rotation of the object (when using Quaternion rotations).");
+ RNA_def_property_ui_text(prop, "Delta Rotation (Quaternion)", "Extra rotation added to the rotation of the object (when using Quaternion rotations)");
RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_update");
#if 0 // XXX not supported well yet...
prop= RNA_def_property(srna, "delta_rotation_axis_angle", PROP_FLOAT, PROP_AXISANGLE);
RNA_def_property_float_sdna(prop, NULL, "dquat"); // FIXME: this is not a single field any more! (drotAxis and drotAngle)
RNA_def_property_float_array_default(prop, default_axisAngle);
- RNA_def_property_ui_text(prop, "Delta Rotation (Axis Angle)", "Extra added rotation to the rotation of the object (when using Axis-Angle rotations).");
+ RNA_def_property_ui_text(prop, "Delta Rotation (Axis Angle)", "Extra rotation added to the rotation of the object (when using Axis-Angle rotations)");
RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_update");
#endif
prop= RNA_def_property(srna, "delta_scale", PROP_FLOAT, PROP_XYZ);
RNA_def_property_float_sdna(prop, NULL, "dsize");
- RNA_def_property_ui_text(prop, "Delta Scale", "Extra added scaling to the scale of the object.");
+ RNA_def_property_ui_text(prop, "Delta Scale", "Extra scaling added to the scale of the object");
RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_update");
/* transform locks */
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_ui_text(prop, "Lock Location", "Lock editing of location in the interface");
RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_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_ui_text(prop, "Lock Rotation", "Lock editing of rotation in the interface");
RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_update");
// XXX this is sub-optimal - it really should be included above, but due to technical reasons we can't do this!
prop= RNA_def_property(srna, "lock_rotation_w", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "protectflag", OB_LOCK_ROTW);
- RNA_def_property_ui_text(prop, "Lock Rotation (4D Angle)", "Lock editing of 'angle' component of four-component rotations in the interface.");
+ RNA_def_property_ui_text(prop, "Lock Rotation (4D Angle)", "Lock editing of 'angle' component of four-component rotations in the interface");
// XXX this needs a better name
prop= RNA_def_property(srna, "lock_rotations_4d", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "protectflag", OB_LOCK_ROT4D);
- RNA_def_property_ui_text(prop, "Lock Rotations (4D)", "Lock editing of four component rotations by components (instead of as Eulers).");
+ RNA_def_property_ui_text(prop, "Lock Rotations (4D)", "Lock editing of four component rotations by components (instead of as Eulers)");
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_ui_text(prop, "Lock Scale", "Lock editing of scale in the interface");
RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_update");
/* 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_ui_text(prop, "Matrix", "Transformation matrix.");
+ RNA_def_property_ui_text(prop, "Matrix", "Transformation matrix");
RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_matrix_update");
/* collections */
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 of the object.");
+ RNA_def_property_ui_text(prop, "Constraints", "Constraints affecting the transformation of the object");
// RNA_def_property_collection_funcs(prop, 0, 0, 0, 0, 0, 0, 0, "constraints__add", "constraints__remove");
rna_def_object_constraints(brna, prop);
prop= RNA_def_property(srna, "modifiers", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "Modifier");
- RNA_def_property_ui_text(prop, "Modifiers", "Modifiers affecting the geometric data of the Object.");
+ RNA_def_property_ui_text(prop, "Modifiers", "Modifiers affecting the geometric data of the object");
rna_def_object_modifiers(brna, prop);
/* game engine */
@@ -1676,48 +1699,49 @@ static void rna_def_object(BlenderRNA *brna)
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "GameObjectSettings");
RNA_def_property_pointer_funcs(prop, "rna_Object_game_settings_get", NULL, NULL);
- RNA_def_property_ui_text(prop, "Game Settings", "Game engine related settings for the object.");
+ RNA_def_property_ui_text(prop, "Game Settings", "Game engine related settings for the object");
/* vertex groups */
prop= RNA_def_property(srna, "vertex_groups", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "defbase", NULL);
RNA_def_property_struct_type(prop, "VertexGroup");
- RNA_def_property_ui_text(prop, "Vertex Groups", "Vertex groups of the object.");
+ RNA_def_property_ui_text(prop, "Vertex Groups", "Vertex groups of the object");
prop= RNA_def_property(srna, "active_vertex_group", PROP_POINTER, PROP_NONE);
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_ui_text(prop, "Active Vertex Group", "Vertex groups of the object");
RNA_def_property_update(prop, NC_GEOM|ND_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_ui_text(prop, "Active Vertex Group Index", "Active index in vertex group array");
RNA_def_property_update(prop, NC_GEOM|ND_DATA, "rna_Object_update_data");
/* empty */
prop= RNA_def_property(srna, "empty_draw_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "empty_drawtype");
RNA_def_property_enum_items(prop, empty_drawtype_items);
- RNA_def_property_ui_text(prop, "Empty Display Type", "Viewport display style for empties.");
+ RNA_def_property_ui_text(prop, "Empty Display Type", "Viewport display style for empties");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
prop= RNA_def_property(srna, "empty_draw_size", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "empty_drawsize");
- RNA_def_property_range(prop, 0.01, 10.0);
- RNA_def_property_ui_text(prop, "Empty Display Size", "Size of of display for empties in the viewport.");
+ RNA_def_property_range(prop, 0.1f, 1000.0f);
+ RNA_def_property_ui_range(prop, 0.01, 100, 1, 1);
+ RNA_def_property_ui_text(prop, "Empty Display Size", "Size of display for empties in the viewport");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
/* render */
prop= RNA_def_property(srna, "pass_index", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "index");
- RNA_def_property_ui_text(prop, "Pass Index", "Index # for the IndexOB render pass.");
+ RNA_def_property_ui_text(prop, "Pass Index", "Index # for the IndexOB render pass");
RNA_def_property_update(prop, NC_OBJECT, NULL);
prop= RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "col");
- RNA_def_property_ui_text(prop, "Color", "Object color and alpha, used when faces have the ObColor mode enabled.");
+ RNA_def_property_ui_text(prop, "Color", "Object color and alpha, used when faces have the ObColor mode enabled");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
/* physics */
@@ -1725,23 +1749,23 @@ static void rna_def_object(BlenderRNA *brna)
RNA_def_property_pointer_sdna(prop, NULL, "pd");
RNA_def_property_struct_type(prop, "FieldSettings");
RNA_def_property_pointer_funcs(prop, "rna_Object_field_get", NULL, NULL);
- RNA_def_property_ui_text(prop, "Field Settings", "Settings for using the objects as a field in physics simulation.");
+ RNA_def_property_ui_text(prop, "Field Settings", "Settings for using the objects as a field in physics simulation");
prop= RNA_def_property(srna, "collision", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "pd");
RNA_def_property_struct_type(prop, "CollisionSettings");
RNA_def_property_pointer_funcs(prop, "rna_Object_collision_get", NULL, NULL);
- RNA_def_property_ui_text(prop, "Collision Settings", "Settings for using the objects as a collider in physics simulation.");
+ RNA_def_property_ui_text(prop, "Collision Settings", "Settings for using the objects as a collider in physics simulation");
prop= RNA_def_property(srna, "soft_body", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "soft");
RNA_def_property_struct_type(prop, "SoftBodySettings");
- RNA_def_property_ui_text(prop, "Soft Body Settings", "Settings for soft body simulation.");
+ RNA_def_property_ui_text(prop, "Soft Body Settings", "Settings for soft body simulation");
prop= RNA_def_property(srna, "particle_systems", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "particlesystem", NULL);
RNA_def_property_struct_type(prop, "ParticleSystem");
- RNA_def_property_ui_text(prop, "Particle Systems", "Particle systems emitted from the object.");
+ RNA_def_property_ui_text(prop, "Particle Systems", "Particle systems emitted from the object");
prop= RNA_def_property(srna, "active_particle_system", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "ParticleSystem");
@@ -1751,23 +1775,23 @@ static void rna_def_object(BlenderRNA *brna)
prop= RNA_def_property(srna, "active_particle_system_index", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_funcs(prop, "rna_Object_active_particle_system_index_get", "rna_Object_active_particle_system_index_set", "rna_Object_active_particle_system_index_range");
- RNA_def_property_ui_text(prop, "Active Particle System Index", "Index of active particle system slot.");
+ RNA_def_property_ui_text(prop, "Active Particle System Index", "Index of active particle system slot");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_particle_update");
/* restrict */
prop= RNA_def_property(srna, "restrict_view", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "restrictflag", OB_RESTRICT_VIEW);
- RNA_def_property_ui_text(prop, "Restrict View", "Restrict visibility in the viewport.");
+ RNA_def_property_ui_text(prop, "Restrict View", "Restrict visibility in the viewport");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
prop= RNA_def_property(srna, "restrict_select", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "restrictflag", OB_RESTRICT_SELECT);
- RNA_def_property_ui_text(prop, "Restrict Select", "Restrict selection in the viewport.");
+ RNA_def_property_ui_text(prop, "Restrict Select", "Restrict selection in the viewport");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
prop= RNA_def_property(srna, "restrict_render", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "restrictflag", OB_RESTRICT_RENDER);
- RNA_def_property_ui_text(prop, "Restrict Render", "Restrict renderability.");
+ RNA_def_property_ui_text(prop, "Restrict Render", "Restrict renderability");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
/* anim */
@@ -1779,97 +1803,97 @@ static void rna_def_object(BlenderRNA *brna)
/* duplicates */
prop= RNA_def_property(srna, "track_override_parent", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "transflag", OB_POWERTRACK);
- RNA_def_property_ui_text(prop, "Track Override Parent", "Override rotation from parenting.");
+ RNA_def_property_ui_text(prop, "Track Override Parent", "Override rotation from parenting");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_update");
prop= RNA_def_property(srna, "slow_parent", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "partype", PARSLOW);
- RNA_def_property_ui_text(prop, "Slow Parent", "Create a delay in the parent relationship.");
+ RNA_def_property_ui_text(prop, "Slow Parent", "Create a delay in the parent relationship");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_update");
prop= RNA_def_property(srna, "dupli_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "transflag");
RNA_def_property_enum_items(prop, dupli_items);
- RNA_def_property_ui_text(prop, "Dupli Type", "If not None, object duplication method to use.");
+ RNA_def_property_ui_text(prop, "Dupli Type", "If not None, object duplication method to use");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_dependency_update");
prop= RNA_def_property(srna, "use_dupli_frames_speed", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "transflag", OB_DUPLINOSPEED);
- RNA_def_property_ui_text(prop, "Dupli Frames Speed", "Set dupliframes to use the frame."); // TODO, better descriptio!
+ RNA_def_property_ui_text(prop, "Dupli Frames Speed", "Set dupliframes to use the frame"); // TODO, better descriptio!
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_update");
prop= RNA_def_property(srna, "use_dupli_verts_rotation", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "transflag", OB_DUPLIROT);
- RNA_def_property_ui_text(prop, "Dupli Verts Rotation", "Rotate dupli according to vertex normal.");
+ RNA_def_property_ui_text(prop, "Dupli Verts Rotation", "Rotate dupli according to vertex normal");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
prop= RNA_def_property(srna, "use_dupli_faces_scale", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "transflag", OB_DUPLIFACES_SCALE);
- RNA_def_property_ui_text(prop, "Dupli Faces Inherit Scale", "Scale dupli based on face size.");
+ RNA_def_property_ui_text(prop, "Dupli Faces Inherit Scale", "Scale dupli based on face size");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_update");
prop= RNA_def_property(srna, "dupli_faces_scale", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "dupfacesca");
RNA_def_property_range(prop, 0.001f, 10000.0f);
- RNA_def_property_ui_text(prop, "Dupli Faces Scale", "Scale the DupliFace objects.");
+ RNA_def_property_ui_text(prop, "Dupli Faces Scale", "Scale the DupliFace objects");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
prop= RNA_def_property(srna, "dupli_group", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "dup_group");
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Dupli Group", "Instance an existing group.");
+ RNA_def_property_ui_text(prop, "Dupli Group", "Instance an existing group");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_dependency_update");
prop= RNA_def_property(srna, "dupli_frames_start", PROP_INT, PROP_NONE|PROP_UNIT_TIME);
RNA_def_property_int_sdna(prop, NULL, "dupsta");
RNA_def_property_range(prop, MINAFRAME, MAXFRAME);
- RNA_def_property_ui_text(prop, "Dupli Frames Start", "Start frame for DupliFrames.");
+ RNA_def_property_ui_text(prop, "Dupli Frames Start", "Start frame for DupliFrames");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_update");
prop= RNA_def_property(srna, "dupli_frames_end", PROP_INT, PROP_NONE|PROP_UNIT_TIME);
RNA_def_property_int_sdna(prop, NULL, "dupend");
RNA_def_property_range(prop, MINAFRAME, MAXFRAME);
- RNA_def_property_ui_text(prop, "Dupli Frames End", "End frame for DupliFrames.");
+ RNA_def_property_ui_text(prop, "Dupli Frames End", "End frame for DupliFrames");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_update");
prop= RNA_def_property(srna, "dupli_frames_on", PROP_INT, PROP_NONE|PROP_UNIT_TIME);
RNA_def_property_int_sdna(prop, NULL, "dupon");
RNA_def_property_range(prop, MINFRAME, MAXFRAME);
RNA_def_property_ui_range(prop, 1, 1500, 1, 0);
- RNA_def_property_ui_text(prop, "Dupli Frames On", "Number of frames to use between DupOff frames.");
+ RNA_def_property_ui_text(prop, "Dupli Frames On", "Number of frames to use between DupOff frames");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_update");
prop= RNA_def_property(srna, "dupli_frames_off", PROP_INT, PROP_NONE|PROP_UNIT_TIME);
RNA_def_property_int_sdna(prop, NULL, "dupoff");
RNA_def_property_range(prop, 0, MAXFRAME);
RNA_def_property_ui_range(prop, 0, 1500, 1, 0);
- RNA_def_property_ui_text(prop, "Dupli Frames Off", "Recurring frames to exclude from the Dupliframes.");
+ RNA_def_property_ui_text(prop, "Dupli Frames Off", "Recurring frames to exclude from the Dupliframes");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_update");
prop= RNA_def_property(srna, "dupli_list", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "duplilist", NULL);
RNA_def_property_struct_type(prop, "DupliObject");
- RNA_def_property_ui_text(prop, "Dupli list", "Object duplis.");
+ RNA_def_property_ui_text(prop, "Dupli list", "Object duplis");
/* time offset */
prop= RNA_def_property(srna, "time_offset", PROP_FLOAT, PROP_NONE|PROP_UNIT_TIME);
RNA_def_property_float_sdna(prop, NULL, "sf");
RNA_def_property_range(prop, MINAFRAMEF, MAXFRAMEF);
- RNA_def_property_ui_text(prop, "Time Offset", "Animation offset in frames for IPO's and dupligroup instances.");
+ RNA_def_property_ui_text(prop, "Time Offset", "Animation offset in frames for IPO's and dupligroup instances");
RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_update");
prop= RNA_def_property(srna, "time_offset_edit", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "ipoflag", OB_OFFS_OB);
- RNA_def_property_ui_text(prop, "Time Offset Edit", "Use time offset when inserting keys and display time offset for IPO and action views.");
+ RNA_def_property_ui_text(prop, "Time Offset Edit", "Use time offset when inserting keys and display time offset for IPO and action views");
prop= RNA_def_property(srna, "time_offset_parent", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "ipoflag", OB_OFFS_PARENT);
- RNA_def_property_ui_text(prop, "Time Offset Parent", "Apply the time offset to this objects parent relationship.");
+ RNA_def_property_ui_text(prop, "Time Offset Parent", "Apply the time offset to this objects parent relationship");
RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_update");
prop= RNA_def_property(srna, "time_offset_particle", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "ipoflag", OB_OFFS_PARTICLE);
- RNA_def_property_ui_text(prop, "Time Offset Particle", "Let the time offset work on the particle effect.");
+ RNA_def_property_ui_text(prop, "Time Offset Particle", "Let the time offset work on the particle effect");
RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_update");
prop= RNA_def_property(srna, "time_offset_add_parent", PROP_BOOLEAN, PROP_NONE);
@@ -1881,23 +1905,23 @@ static void rna_def_object(BlenderRNA *brna)
prop= RNA_def_property(srna, "max_draw_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "dt");
RNA_def_property_enum_items(prop, drawtype_items);
- RNA_def_property_ui_text(prop, "Maximum Draw Type", "Maximum draw type to display object with in viewport.");
+ RNA_def_property_ui_text(prop, "Maximum Draw Type", "Maximum draw type to display object with in viewport");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
prop= RNA_def_property(srna, "draw_bounds", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dtx", OB_BOUNDBOX);
- RNA_def_property_ui_text(prop, "Draw Bounds", "Displays the object's bounds.");
+ RNA_def_property_ui_text(prop, "Draw Bounds", "Displays the object's bounds");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
prop= RNA_def_property(srna, "draw_bounds_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "boundtype");
RNA_def_property_enum_items(prop, boundtype_items);
- RNA_def_property_ui_text(prop, "Draw Bounds Type", "Object boundary display type.");
+ RNA_def_property_ui_text(prop, "Draw Bounds Type", "Object boundary display type");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
prop= RNA_def_property(srna, "draw_name", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dtx", OB_DRAWNAME);
- RNA_def_property_ui_text(prop, "Draw Name", "Displays the object's name.");
+ RNA_def_property_ui_text(prop, "Draw Name", "Displays the object's name");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
prop= RNA_def_property(srna, "draw_axis", PROP_BOOLEAN, PROP_NONE);
@@ -1907,22 +1931,22 @@ static void rna_def_object(BlenderRNA *brna)
prop= RNA_def_property(srna, "draw_texture_space", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dtx", OB_TEXSPACE);
- RNA_def_property_ui_text(prop, "Draw Texture Space", "Displays the object's texture space.");
+ RNA_def_property_ui_text(prop, "Draw Texture Space", "Displays the object's texture space");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
prop= RNA_def_property(srna, "draw_wire", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dtx", OB_DRAWWIRE);
- RNA_def_property_ui_text(prop, "Draw Wire", "Adds the object's wireframe over solid drawing.");
+ RNA_def_property_ui_text(prop, "Draw Wire", "Adds the object's wireframe over solid drawing");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
prop= RNA_def_property(srna, "draw_transparent", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dtx", OB_DRAWTRANSP);
- RNA_def_property_ui_text(prop, "Draw Transparent", "Enables transparent materials for the object (Mesh only).");
+ RNA_def_property_ui_text(prop, "Draw Transparent", "Enables transparent materials for the object (Mesh only)");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
prop= RNA_def_property(srna, "x_ray", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dtx", OB_DRAWXRAY);
- RNA_def_property_ui_text(prop, "X-Ray", "Makes the object draw in front of others.");
+ 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 */
@@ -1936,36 +1960,36 @@ static void rna_def_object(BlenderRNA *brna)
prop= RNA_def_property(srna, "pose_library", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "poselib");
RNA_def_property_struct_type(prop, "Action");
- RNA_def_property_ui_text(prop, "Pose Library", "Action used as a pose library for armatures.");
+ RNA_def_property_ui_text(prop, "Pose Library", "Action used as a pose library for armatures");
prop= RNA_def_property(srna, "pose", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "pose");
RNA_def_property_struct_type(prop, "Pose");
- RNA_def_property_ui_text(prop, "Pose", "Current pose for armatures.");
+ RNA_def_property_ui_text(prop, "Pose", "Current pose for armatures");
/* shape keys */
prop= RNA_def_property(srna, "shape_key_lock", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "shapeflag", OB_SHAPE_LOCK);
- RNA_def_property_ui_text(prop, "Shape Key Lock", "Always show the current Shape for this Object.");
+ 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");
prop= RNA_def_property(srna, "shape_key_edit_mode", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "shapeflag", OB_SHAPE_EDIT_MODE);
- RNA_def_property_ui_text(prop, "Shape Key Edit Mode", "Apply shape keys in edit mode (for Meshes only).");
+ RNA_def_property_ui_text(prop, "Shape Key Edit Mode", "Apply shape keys in edit mode (for Meshes only)");
RNA_def_property_ui_icon(prop, ICON_EDITMODE_HLT, 0);
RNA_def_property_update(prop, 0, "rna_Object_update_data");
prop= RNA_def_property(srna, "active_shape_key", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "ShapeKey");
RNA_def_property_pointer_funcs(prop, "rna_Object_active_shape_key_get", NULL, NULL);
- RNA_def_property_ui_text(prop, "Active Shape Key", "Current shape key.");
+ RNA_def_property_ui_text(prop, "Active Shape Key", "Current shape key");
prop= RNA_def_property(srna, "active_shape_key_index", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "shapenr");
- RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE); // XXX this is really unpredictable...
+ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); // XXX this is really unpredictable...
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_ui_text(prop, "Active Shape Key Index", "Current shape key index");
RNA_def_property_update(prop, 0, "rna_Object_active_shape_update");
RNA_api_object(srna);
@@ -1978,25 +2002,23 @@ static void rna_def_dupli_object(BlenderRNA *brna)
srna= RNA_def_struct(brna, "DupliObject", NULL);
RNA_def_struct_sdna(srna, "DupliObject");
- RNA_def_struct_ui_text(srna, "Dupli Object", "Dupli Object data.");
+ RNA_def_struct_ui_text(srna, "Object Duplicate", "An object duplicate");
/* RNA_def_struct_ui_icon(srna, ICON_OBJECT_DATA); */
prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
- /* RNA_def_property_struct_type(prop, "Object"); */
RNA_def_property_pointer_sdna(prop, NULL, "ob");
/* RNA_def_property_pointer_funcs(prop, "rna_DupliObject_object_get", NULL, NULL); */
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Object", "Object this DupliObject represents.");
+ RNA_def_property_ui_text(prop, "Object", "Object being duplicated");
- prop= RNA_def_property(srna, "ob_matrix", PROP_FLOAT, PROP_MATRIX);
+ prop= RNA_def_property(srna, "object_matrix", PROP_FLOAT, PROP_MATRIX);
RNA_def_property_float_sdna(prop, NULL, "omat");
RNA_def_property_array(prop, 16);
- RNA_def_property_ui_text(prop, "Object Matrix", "Object transformation matrix.");
+ RNA_def_property_ui_text(prop, "Object Matrix", "Duplicated object transformation matrix");
prop= RNA_def_property(srna, "matrix", PROP_FLOAT, PROP_MATRIX);
RNA_def_property_float_sdna(prop, NULL, "mat");
RNA_def_property_array(prop, 16);
- RNA_def_property_ui_text(prop, "DupliObject Matrix", "DupliObject transformation matrix.");
+ RNA_def_property_ui_text(prop, "Object Duplicate Matrix", "Object duplicate transformation matrix");
/* TODO: DupliObject has more properties that can be wrapped */
}
@@ -2008,30 +2030,30 @@ static void rna_def_base(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ObjectBase", NULL);
RNA_def_struct_sdna(srna, "Base");
- RNA_def_struct_ui_text(srna, "Object Base", "An objects instance in a scene.");
+ RNA_def_struct_ui_text(srna, "Object Base", "An object instance in a scene");
RNA_def_struct_ui_icon(srna, ICON_OBJECT_DATA);
prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "object");
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Object", "Object this base links to.");
+ RNA_def_property_ui_text(prop, "Object", "Object this base links to");
/* same as object layer */
prop= RNA_def_property(srna, "layers", PROP_BOOLEAN, PROP_LAYER_MEMBER);
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.");
+ RNA_def_property_ui_text(prop, "Layers", "Layers the object base is on");
RNA_def_property_boolean_funcs(prop, NULL, "rna_Base_layer_set");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Base_layer_update");
-
+
prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BA_SELECT);
- RNA_def_property_ui_text(prop, "Selected", "Object base selection state.");
+ RNA_def_property_ui_text(prop, "Selected", "Object base selection state");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Base_select_update");
-
- /* could use other flags like - BA_WAS_SEL, but for now selected is enough */
-
- /* TODO: DupliObject has more properties that can be wrapped */
+
+ prop= RNA_def_property(srna, "selected_user", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", BA_WAS_SEL);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "User Selected", "Object base user selection state, used to restore user selection after transformations");
}
void RNA_def_object(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_object_api.c b/source/blender/makesrna/intern/rna_object_api.c
index 8379ae7995d..649a2a9f52f 100644
--- a/source/blender/makesrna/intern/rna_object_api.c
+++ b/source/blender/makesrna/intern/rna_object_api.c
@@ -15,7 +15,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* The Original Code is Copyright (C) 2009 Blender Foundation.
* All rights reserved.
@@ -343,7 +343,7 @@ static void rna_Mesh_assign_verts_to_group(Object *ob, bDeformGroup *group, int
}
Mesh *me = (Mesh*)ob->data;
- int group_index = get_defgroup_num(ob, group);
+ int group_index = defgroup_find_index(ob, group);
if (group_index == -1) {
BKE_report(reports, RPT_ERROR, "No deform groups assigned to mesh.");
return;
@@ -417,15 +417,15 @@ void RNA_api_object(StructRNA *srna)
PropertyRNA *parm;
static EnumPropertyItem mesh_type_items[] = {
- {0, "PREVIEW", 0, "Preview", "Apply modifier preview settings."},
- {1, "RENDER", 0, "Render", "Apply modifier render settings."},
+ {0, "PREVIEW", 0, "Preview", "Apply modifier preview settings"},
+ {1, "RENDER", 0, "Render", "Apply modifier render settings"},
{0, NULL, 0, NULL, NULL}
};
static EnumPropertyItem assign_mode_items[] = {
- {WEIGHT_REPLACE, "REPLACE", 0, "Replace", "Replace."}, /* TODO: more meaningful descriptions */
- {WEIGHT_ADD, "ADD", 0, "Add", "Add."},
- {WEIGHT_SUBTRACT, "SUBTRACT", 0, "Subtract", "Subtract."},
+ {WEIGHT_REPLACE, "REPLACE", 0, "Replace", "Replace"}, /* TODO: more meaningful descriptions */
+ {WEIGHT_ADD, "ADD", 0, "Add", "Add"},
+ {WEIGHT_SUBTRACT, "SUBTRACT", 0, "Subtract", "Subtract"},
{0, NULL, 0, NULL, NULL}
};
@@ -497,13 +497,13 @@ void RNA_api_object(StructRNA *srna)
/* return location and normal */
parm= RNA_def_float_vector(func, "location", 3, NULL, -FLT_MAX, FLT_MAX, "Location", "The hit location of this ray cast", -1e4, 1e4);
RNA_def_property_flag(parm, PROP_THICK_WRAP);
- RNA_def_function_return_mark(func, parm);
+ RNA_def_function_output(func, parm);
parm= RNA_def_float_vector(func, "normal", 3, NULL, -FLT_MAX, FLT_MAX, "Normal", "The face normal at the ray cast hit location", -1e4, 1e4);
RNA_def_property_flag(parm, PROP_THICK_WRAP);
- RNA_def_function_return_mark(func, parm);
+ RNA_def_function_output(func, parm);
parm= RNA_def_int(func, "index", 0, 0, 0, "", "The face index, -1 when no intersection is found.", 0, 0);
- RNA_def_function_return_mark(func, parm);
+ RNA_def_function_output(func, parm);
/* DAG */
diff --git a/source/blender/makesrna/intern/rna_object_force.c b/source/blender/makesrna/intern/rna_object_force.c
index 0eb4f9b9da0..259f634c59d 100644
--- a/source/blender/makesrna/intern/rna_object_force.c
+++ b/source/blender/makesrna/intern/rna_object_force.c
@@ -15,7 +15,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor(s): Blender Foundation (2008), Thomas Dinges
*
@@ -675,28 +675,28 @@ static void rna_def_pointcache(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "PointCache", NULL);
- RNA_def_struct_ui_text(srna, "Point Cache", "Point cache for physics simulations.");
+ RNA_def_struct_ui_text(srna, "Point Cache", "Point cache for physics simulations");
RNA_def_struct_ui_icon(srna, ICON_PHYSICS);
prop= RNA_def_property(srna, "start_frame", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "startframe");
RNA_def_property_range(prop, 1, 300000);
- RNA_def_property_ui_text(prop, "Start", "Frame on which the simulation starts.");
+ RNA_def_property_ui_text(prop, "Start", "Frame on which the simulation starts");
prop= RNA_def_property(srna, "end_frame", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "endframe");
RNA_def_property_range(prop, 1, 300000);
- RNA_def_property_ui_text(prop, "End", "Frame on which the simulation stops.");
+ RNA_def_property_ui_text(prop, "End", "Frame on which the simulation stops");
prop= RNA_def_property(srna, "step", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 1, 20);
- RNA_def_property_ui_text(prop, "Cache Step", "Number of frames between cached frames.");
+ RNA_def_property_ui_text(prop, "Cache Step", "Number of frames between cached frames");
RNA_def_property_update(prop, NC_OBJECT, "rna_Cache_change");
prop= RNA_def_property(srna, "index", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "index");
RNA_def_property_range(prop, -1, 100);
- RNA_def_property_ui_text(prop, "Cache Index", "Index number of cache files.");
+ RNA_def_property_ui_text(prop, "Cache Index", "Index number of cache files");
RNA_def_property_update(prop, NC_OBJECT, "rna_Cache_idname_change");
/* flags */
@@ -730,7 +730,7 @@ static void rna_def_pointcache(BlenderRNA *brna)
prop= RNA_def_property(srna, "filepath", PROP_STRING, PROP_DIRPATH);
RNA_def_property_string_sdna(prop, NULL, "path");
- RNA_def_property_ui_text(prop, "File Path", "Cache file path.");
+ RNA_def_property_ui_text(prop, "File Path", "Cache file path");
RNA_def_property_update(prop, NC_OBJECT, "rna_Cache_idname_change");
prop= RNA_def_property(srna, "quick_cache", PROP_BOOLEAN, PROP_NONE);
@@ -741,7 +741,7 @@ static void rna_def_pointcache(BlenderRNA *brna)
prop= RNA_def_property(srna, "info", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "info");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Cache Info", "Info on current cache status.");
+ RNA_def_property_ui_text(prop, "Cache Info", "Info on current cache status");
prop= RNA_def_property(srna, "external", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PTCACHE_EXTERNAL);
@@ -767,7 +767,7 @@ static void rna_def_collision(BlenderRNA *brna)
srna= RNA_def_struct(brna, "CollisionSettings", NULL);
RNA_def_struct_sdna(srna, "PartDeflect");
RNA_def_struct_path_func(srna, "rna_CollisionSettings_path");
- RNA_def_struct_ui_text(srna, "Collision Settings", "Collision settings for object in physics simulation.");
+ RNA_def_struct_ui_text(srna, "Collision Settings", "Collision settings for object in physics simulation");
prop= RNA_def_property(srna, "enabled", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "deflect", 1);
@@ -847,7 +847,7 @@ static void rna_def_collision(BlenderRNA *brna)
prop= RNA_def_property(srna, "absorption", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_range(prop, 0.0f, 1.0f, 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_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_CollisionSettings_update");
}
@@ -859,13 +859,13 @@ static void rna_def_effector_weight(BlenderRNA *brna)
srna= RNA_def_struct(brna, "EffectorWeights", NULL);
RNA_def_struct_sdna(srna, "EffectorWeights");
RNA_def_struct_path_func(srna, "rna_EffectorWeight_path");
- RNA_def_struct_ui_text(srna, "Effector Weights", "Effector weights for physics simulation.");
+ RNA_def_struct_ui_text(srna, "Effector Weights", "Effector weights for physics simulation");
RNA_def_struct_ui_icon(srna, ICON_PHYSICS);
/* Flags */
prop= RNA_def_property(srna, "do_growing_hair", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", EFF_WEIGHT_DO_HAIR);
- RNA_def_property_ui_text(prop, "Use For Growing Hair", "Use force fields when growing hair.");
+ RNA_def_property_ui_text(prop, "Use For Growing Hair", "Use force fields when growing hair");
RNA_def_property_update(prop, 0, "rna_EffectorWeight_update");
/* General */
@@ -873,14 +873,14 @@ static void rna_def_effector_weight(BlenderRNA *brna)
RNA_def_property_pointer_sdna(prop, NULL, "group");
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_ui_text(prop, "Effector Group", "Limit effectors to this Group");
RNA_def_property_update(prop, 0, "rna_EffectorWeight_dependency_update");
prop= RNA_def_property(srna, "gravity", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "global_gravity");
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, "Gravity", "Global gravity weight.");
+ RNA_def_property_ui_text(prop, "Gravity", "Global gravity weight");
RNA_def_property_update(prop, 0, "rna_EffectorWeight_update");
/* Effector weights */
@@ -888,91 +888,91 @@ static void rna_def_effector_weight(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "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_ui_text(prop, "All", "All effector's weight");
RNA_def_property_update(prop, 0, "rna_EffectorWeight_update");
prop= RNA_def_property(srna, "force", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "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, "Force", "Force effector weight.");
+ RNA_def_property_ui_text(prop, "Force", "Force effector weight");
RNA_def_property_update(prop, 0, "rna_EffectorWeight_update");
prop= RNA_def_property(srna, "vortex", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "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_ui_text(prop, "Vortex", "Vortex effector weight");
RNA_def_property_update(prop, 0, "rna_EffectorWeight_update");
prop= RNA_def_property(srna, "magnetic", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "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_ui_text(prop, "Magnetic", "Magnetic effector weight");
RNA_def_property_update(prop, 0, "rna_EffectorWeight_update");
prop= RNA_def_property(srna, "wind", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "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_ui_text(prop, "Wind", "Wind effector weight");
RNA_def_property_update(prop, 0, "rna_EffectorWeight_update");
prop= RNA_def_property(srna, "curveguide", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "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_ui_text(prop, "Curve Guide", "Curve guide effector weight");
RNA_def_property_update(prop, 0, "rna_EffectorWeight_update");
prop= RNA_def_property(srna, "texture", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "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_ui_text(prop, "Texture", "Texture effector weight");
RNA_def_property_update(prop, 0, "rna_EffectorWeight_update");
prop= RNA_def_property(srna, "harmonic", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "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_ui_text(prop, "Harmonic", "Harmonic effector weight");
RNA_def_property_update(prop, 0, "rna_EffectorWeight_update");
prop= RNA_def_property(srna, "charge", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "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_ui_text(prop, "Charge", "Charge effector weight");
RNA_def_property_update(prop, 0, "rna_EffectorWeight_update");
prop= RNA_def_property(srna, "lennardjones", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "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_ui_text(prop, "Lennard-Jones", "Lennard-Jones effector weight");
RNA_def_property_update(prop, 0, "rna_EffectorWeight_update");
prop= RNA_def_property(srna, "boid", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "weight[10]");
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, "Boid", "Boid effector weight.");
+ RNA_def_property_ui_text(prop, "Boid", "Boid effector weight");
RNA_def_property_update(prop, 0, "rna_EffectorWeight_update");
prop= RNA_def_property(srna, "turbulence", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "weight[11]");
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, "Turbulence", "Turbulence effector weight.");
+ RNA_def_property_ui_text(prop, "Turbulence", "Turbulence effector weight");
RNA_def_property_update(prop, 0, "rna_EffectorWeight_update");
prop= RNA_def_property(srna, "drag", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "weight[12]");
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, "Drag", "Drag effector weight.");
+ RNA_def_property_ui_text(prop, "Drag", "Drag effector weight");
RNA_def_property_update(prop, 0, "rna_EffectorWeight_update");
}
@@ -1034,7 +1034,7 @@ static void rna_def_field(BlenderRNA *brna)
srna= RNA_def_struct(brna, "FieldSettings", NULL);
RNA_def_struct_sdna(srna, "PartDeflect");
RNA_def_struct_path_func(srna, "rna_FieldSettings_path");
- RNA_def_struct_ui_text(srna, "Field Settings", "Field settings for an object in physics simulation.");
+ RNA_def_struct_ui_text(srna, "Field Settings", "Field settings for an object in physics simulation");
RNA_def_struct_ui_icon(srna, ICON_PHYSICS);
/* Enums */
@@ -1042,19 +1042,19 @@ static void rna_def_field(BlenderRNA *brna)
prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "forcefield");
RNA_def_property_enum_items(prop, field_type_items);
- RNA_def_property_ui_text(prop, "Type", "Type of field.");
+ RNA_def_property_ui_text(prop, "Type", "Type of field");
RNA_def_property_update(prop, 0, "rna_FieldSettings_dependency_update");
prop= RNA_def_property(srna, "shape", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, effector_shape_items);
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_Effector_shape_itemf");
- RNA_def_property_ui_text(prop, "Shape", "Which direction is used to calculate the effector force.");
+ RNA_def_property_ui_text(prop, "Shape", "Which direction is used to calculate the effector force");
RNA_def_property_update(prop, 0, "rna_FieldSettings_shape_update");
prop= RNA_def_property(srna, "falloff_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "falloff");
RNA_def_property_enum_items(prop, falloff_items);
- RNA_def_property_ui_text(prop, "Fall-Off", "Fall-off shape.");
+ RNA_def_property_ui_text(prop, "Fall-Off", "Fall-off shape");
RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
prop= RNA_def_property(srna, "texture_mode", PROP_ENUM, PROP_NONE);
@@ -1066,7 +1066,7 @@ static void rna_def_field(BlenderRNA *brna)
prop= RNA_def_property(srna, "z_direction", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "zdir");
RNA_def_property_enum_items(prop, zdirection_items);
- RNA_def_property_ui_text(prop, "Z Direction", "Effect in full or only positive/negative Z direction.");
+ RNA_def_property_ui_text(prop, "Z Direction", "Effect in full or only positive/negative Z direction");
RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
/* Float */
@@ -1081,7 +1081,7 @@ static void rna_def_field(BlenderRNA *brna)
prop= RNA_def_property(srna, "linear_drag", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "f_strength");
RNA_def_property_range(prop, -2.0f, 2.0f);
- RNA_def_property_ui_text(prop, "Linear Drag", "Drag component proportional to velocity.");
+ RNA_def_property_ui_text(prop, "Linear Drag", "Drag component proportional to velocity");
RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
prop= RNA_def_property(srna, "harmonic_damping", PROP_FLOAT, PROP_NONE);
@@ -1094,7 +1094,7 @@ static void rna_def_field(BlenderRNA *brna)
prop= RNA_def_property(srna, "quadratic_drag", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "f_damp");
RNA_def_property_range(prop, -2.0f, 2.0f);
- RNA_def_property_ui_text(prop, "Quadratic Drag", "Drag component proportional to the square of velocity.");
+ RNA_def_property_ui_text(prop, "Quadratic Drag", "Drag component proportional to the square of velocity");
RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
prop= RNA_def_property(srna, "flow", PROP_FLOAT, PROP_NONE);
@@ -1252,7 +1252,7 @@ static void rna_def_field(BlenderRNA *brna)
prop= RNA_def_property(srna, "guide_minimum", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "f_strength");
RNA_def_property_range(prop, 0.0f, 1000.0f);
- RNA_def_property_ui_text(prop, "Minimum Distance", "The distance from which particles are affected fully.");
+ RNA_def_property_ui_text(prop, "Minimum Distance", "The distance from which particles are affected fully");
RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
prop= RNA_def_property(srna, "guide_free", PROP_FLOAT, PROP_NONE);
@@ -1312,7 +1312,7 @@ static void rna_def_field(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Amplitude", "The amplitude of the offset");
RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
- /* Variables used for Curve Guide, allready wrapped, used for other fields too */
+ /* Variables used for Curve Guide, already wrapped, used for other fields too */
// falloff_power, use_max_distance, maximum_distance
}
@@ -1323,7 +1323,7 @@ static void rna_def_game_softbody(BlenderRNA *brna)
srna= RNA_def_struct(brna, "GameSoftBodySettings", NULL);
RNA_def_struct_sdna(srna, "BulletSoftBody");
- RNA_def_struct_ui_text(srna, "Game Soft Body Settings", "Soft body simulation settings for an object in the game engine.");
+ RNA_def_struct_ui_text(srna, "Game Soft Body Settings", "Soft body simulation settings for an object in the game engine");
/* Floats */
@@ -1401,7 +1401,7 @@ static void rna_def_softbody(BlenderRNA *brna)
srna= RNA_def_struct(brna, "SoftBodySettings", NULL);
RNA_def_struct_sdna(srna, "SoftBody");
RNA_def_struct_path_func(srna, "rna_SoftBodySettings_path");
- RNA_def_struct_ui_text(srna, "Soft Body Settings", "Soft body simulation settings for an object.");
+ RNA_def_struct_ui_text(srna, "Soft Body Settings", "Soft body simulation settings for an object");
/* General Settings */
@@ -1419,7 +1419,7 @@ static void rna_def_softbody(BlenderRNA *brna)
prop= RNA_def_property(srna, "mass_vertex_group", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "namedVG_Mass");
- RNA_def_property_ui_text(prop, "Mass Vertex Group", "Control point mass values.");
+ RNA_def_property_ui_text(prop, "Mass Vertex Group", "Control point mass values");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_SoftBodySettings_mass_vgroup_set");
RNA_def_property_update(prop, 0, "rna_softbody_update");
@@ -1440,36 +1440,36 @@ static void rna_def_softbody(BlenderRNA *brna)
prop= RNA_def_property(srna, "goal_vertex_group", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "vertgroup");
RNA_def_property_string_funcs(prop, "rna_SoftBodySettings_goal_vgroup_get", "rna_SoftBodySettings_goal_vgroup_length", "rna_SoftBodySettings_goal_vgroup_set");
- RNA_def_property_ui_text(prop, "Goal Vertex Group", "Control point weight values.");
+ RNA_def_property_ui_text(prop, "Goal Vertex Group", "Control point weight values");
prop= RNA_def_property(srna, "goal_min", PROP_FLOAT, PROP_NONE);
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_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");
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_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");
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_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");
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_ui_text(prop, "Goal Stiffness", "Goal (vertex target position) spring stiffness");
RNA_def_property_update(prop, 0, "rna_softbody_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_ui_text(prop, "Goal Damping", "Goal (vertex target position) friction");
RNA_def_property_update(prop, 0, "rna_softbody_update");
/* Edge Spring Settings */
@@ -1523,7 +1523,7 @@ static void rna_def_softbody(BlenderRNA *brna)
prop= RNA_def_property(srna, "spring_vertex_group", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "namedVG_Spring_K");
- RNA_def_property_ui_text(prop, "Spring Vertex Group", "Control point spring strength values.");
+ RNA_def_property_ui_text(prop, "Spring Vertex Group", "Control point spring strength values");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_SoftBodySettings_spring_vgroup_set");
RNA_def_property_update(prop, 0, "rna_softbody_update");
@@ -1606,18 +1606,18 @@ static void rna_def_softbody(BlenderRNA *brna)
/* translation */
prop= RNA_def_property(srna, "lcom", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "lcom");
- RNA_def_property_ui_text(prop, "Center of mass", "Location of Center of mass.");
+ RNA_def_property_ui_text(prop, "Center of mass", "Location of Center of mass");
/* matrix */
prop= RNA_def_property(srna, "lrot", PROP_FLOAT, PROP_MATRIX);
RNA_def_property_float_sdna(prop, NULL, "lrot");
RNA_def_property_multi_array(prop, 2, matrix_dimsize);
- RNA_def_property_ui_text(prop, "Rot Matrix", "Estimated rotation matrix.");
+ RNA_def_property_ui_text(prop, "Rot Matrix", "Estimated rotation matrix");
prop= RNA_def_property(srna, "lscale", PROP_FLOAT, PROP_MATRIX);
RNA_def_property_float_sdna(prop, NULL, "lscale");
RNA_def_property_multi_array(prop, 2, matrix_dimsize);
- RNA_def_property_ui_text(prop, "Scale Matrix", "Estimated scale matrix.");
+ RNA_def_property_ui_text(prop, "Scale Matrix", "Estimated scale matrix");
/***********************************************************************************/
@@ -1625,7 +1625,7 @@ 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_ui_text(prop, "Use Goal", "Define forces for vertices to stick to animated position");
RNA_def_property_update(prop, 0, "rna_softbody_update");
prop= RNA_def_property(srna, "use_edges", PROP_BOOLEAN, PROP_NONE);
@@ -1635,27 +1635,27 @@ static void rna_def_softbody(BlenderRNA *brna)
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_ui_text(prop, "Stiff Quads", "Adds diagonal springs on 4-gons");
RNA_def_property_update(prop, 0, "rna_softbody_update");
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_ui_text(prop, "Edge Collision", "Edges collide too");
RNA_def_property_update(prop, 0, "rna_softbody_update");
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_ui_text(prop, "Face Collision", "Faces collide too, SLOOOOOW warning");
RNA_def_property_update(prop, 0, "rna_softbody_update");
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_ui_text(prop, "N", "New aero(uses angle and length)");
RNA_def_property_update(prop, 0, "rna_softbody_update");
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_ui_text(prop, "Self Collision", "Enable naive vertex ball self collision");
RNA_def_property_update(prop, 0, "rna_softbody_update");
prop= RNA_def_property(srna, "effector_weights", PROP_POINTER, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_packedfile.c b/source/blender/makesrna/intern/rna_packedfile.c
index 85918bce05b..be0d948b2d1 100644
--- a/source/blender/makesrna/intern/rna_packedfile.c
+++ b/source/blender/makesrna/intern/rna_packedfile.c
@@ -15,7 +15,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor(s): Blender Foundation (2008).
*
@@ -47,11 +47,11 @@ void RNA_def_packedfile(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "PackedFile", NULL);
- RNA_def_struct_ui_text(srna, "Packed File", "External file packed into the .blend file.");
+ RNA_def_struct_ui_text(srna, "Packed File", "External file packed into the .blend file");
prop= RNA_def_property(srna, "size", PROP_INT, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Size", "Size of packed file in bytes.");
+ RNA_def_property_ui_text(prop, "Size", "Size of packed file in bytes");
}
diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c
index 543965a337e..4028ef28307 100644
--- a/source/blender/makesrna/intern/rna_particle.c
+++ b/source/blender/makesrna/intern/rna_particle.c
@@ -15,7 +15,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor(s): Blender Foundation (2008).
*
@@ -590,7 +590,7 @@ static void psys_vg_name_set__internal(PointerRNA *ptr, const char *value, int i
psys->vgroup[index]= 0;
}
else {
- int vgroup_num = get_named_vertexgroup_num(ob, (char*)value);
+ int vgroup_num = defgroup_name_index(ob, (char*)value);
if(vgroup_num == -1)
return;
@@ -648,17 +648,18 @@ static void rna_def_particle_hair_key(BlenderRNA *brna)
srna = RNA_def_struct(brna, "ParticleHairKey", NULL);
RNA_def_struct_sdna(srna, "HairKey");
- RNA_def_struct_ui_text(srna, "Particle Hair Key", "Particle key for hair particle system.");
+ RNA_def_struct_ui_text(srna, "Particle Hair Key", "Particle key for hair particle system");
prop= RNA_def_property(srna, "location", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "co");
- RNA_def_property_ui_text(prop, "Location", "Key location.");
+ RNA_def_property_ui_text(prop, "Location", "Key location");
prop= RNA_def_property(srna, "time", PROP_FLOAT, PROP_UNSIGNED);
- RNA_def_property_ui_text(prop, "Time", "Relative time of key over hair length.");
+ RNA_def_property_ui_text(prop, "Time", "Relative time of key over hair length");
prop= RNA_def_property(srna, "weight", PROP_FLOAT, PROP_UNSIGNED);
- RNA_def_property_ui_text(prop, "Weight", "Weight for softbody simulation.");
+ RNA_def_property_range(prop, 0.0, 1.0);
+ RNA_def_property_ui_text(prop, "Weight", "Weight for cloth simulation");
}
static void rna_def_particle_key(BlenderRNA *brna)
@@ -667,11 +668,11 @@ static void rna_def_particle_key(BlenderRNA *brna)
PropertyRNA *prop;
srna = RNA_def_struct(brna, "ParticleKey", NULL);
- RNA_def_struct_ui_text(srna, "Particle Key", "Key location for a particle over time.");
+ RNA_def_struct_ui_text(srna, "Particle Key", "Key location for a particle over time");
prop= RNA_def_property(srna, "location", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "co");
- RNA_def_property_ui_text(prop, "Location", "Key location.");
+ RNA_def_property_ui_text(prop, "Location", "Key location");
prop= RNA_def_property(srna, "velocity", PROP_FLOAT, PROP_VELOCITY);
RNA_def_property_float_sdna(prop, NULL, "vel");
@@ -679,14 +680,14 @@ static void rna_def_particle_key(BlenderRNA *brna)
prop= RNA_def_property(srna, "rotation", PROP_FLOAT, PROP_QUATERNION);
RNA_def_property_float_sdna(prop, NULL, "rot");
- RNA_def_property_ui_text(prop, "Rotation", "Key rotation quaterion.");
+ RNA_def_property_ui_text(prop, "Rotation", "Key rotation quaterion");
prop= RNA_def_property(srna, "angular_velocity", PROP_FLOAT, PROP_VELOCITY);
RNA_def_property_float_sdna(prop, NULL, "ave");
- RNA_def_property_ui_text(prop, "Angular Velocity", "Key angular velocity.");
+ RNA_def_property_ui_text(prop, "Angular Velocity", "Key angular velocity");
prop= RNA_def_property(srna, "time", PROP_FLOAT, PROP_UNSIGNED);
- RNA_def_property_ui_text(prop, "Time", "Time of key over the simulation.");
+ RNA_def_property_ui_text(prop, "Time", "Time of key over the simulation");
}
static void rna_def_child_particle(BlenderRNA *brna)
@@ -695,7 +696,7 @@ static void rna_def_child_particle(BlenderRNA *brna)
//PropertyRNA *prop;
srna = RNA_def_struct(brna, "ChildParticle", NULL);
- RNA_def_struct_ui_text(srna, "Child Particle", "Child particle interpolated from simulated or edited particles.");
+ RNA_def_struct_ui_text(srna, "Child Particle", "Child particle interpolated from simulated or edited particles");
// int num, parent; /* num is face index on the final derived mesh */
@@ -721,7 +722,7 @@ static void rna_def_particle(BlenderRNA *brna)
srna = RNA_def_struct(brna, "Particle", NULL);
RNA_def_struct_sdna(srna, "ParticleData");
- RNA_def_struct_ui_text(srna, "Particle", "Particle in a particle system.");
+ RNA_def_struct_ui_text(srna, "Particle", "Particle in a particle system");
/* Particle State & Previous State */
prop= RNA_def_property(srna, "location", PROP_FLOAT, PROP_TRANSLATION);
@@ -823,18 +824,18 @@ static void rna_def_particle_dupliweight(BlenderRNA *brna)
PropertyRNA *prop;
srna = RNA_def_struct(brna, "ParticleDupliWeight", NULL);
- RNA_def_struct_ui_text(srna, "Particle Dupliobject Weight", "Weight of a particle dupliobject in a group.");
+ RNA_def_struct_ui_text(srna, "Particle Dupliobject Weight", "Weight of a particle dupliobject in a group");
RNA_def_struct_sdna(srna, "ParticleDupliWeight");
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_ParticleDupliWeight_name_get", "rna_ParticleDupliWeight_name_length", NULL);
- RNA_def_property_ui_text(prop, "Name", "Particle dupliobject name.");
+ RNA_def_property_ui_text(prop, "Name", "Particle dupliobject name");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_struct_name_property(srna, prop);
prop= RNA_def_property(srna, "count", PROP_INT, PROP_UNSIGNED);
RNA_def_property_range(prop, 0, INT_MAX);
- RNA_def_property_ui_text(prop, "Count", "The number of times this object is repeated with respect to other objects.");
+ RNA_def_property_ui_text(prop, "Count", "The number of times this object is repeated with respect to other objects");
RNA_def_property_update(prop, 0, "rna_Particle_redo");
}
@@ -957,20 +958,20 @@ static void rna_def_particle_settings(BlenderRNA *brna)
};
srna= RNA_def_struct(brna, "ParticleSettings", "ID");
- RNA_def_struct_ui_text(srna, "Particle Settings", "Particle settings, reusable by multiple particle systems.");
+ RNA_def_struct_ui_text(srna, "Particle Settings", "Particle settings, reusable by multiple particle systems");
RNA_def_struct_ui_icon(srna, ICON_PARTICLE_DATA);
/* flag */
prop= RNA_def_property(srna, "react_start_end", PROP_BOOLEAN, PROP_NONE);
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_clear_flag(prop, PROP_ANIMATABLE);
+ RNA_def_property_ui_text(prop, "Start/End", "Give birth to unreacted particles eventually");
RNA_def_property_update(prop, 0, "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_clear_flag(prop, PROP_ANIMATABLE);
+ RNA_def_property_ui_text(prop, "Multi React", "React multiple times");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
/* TODO: used somewhere? */
@@ -980,7 +981,7 @@ 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_ui_text(prop, "Unborn", "Show particles before they are emitted");
RNA_def_property_update(prop, 0, "rna_Particle_redo");
prop= RNA_def_property(srna, "died", PROP_BOOLEAN, PROP_NONE);
@@ -990,38 +991,38 @@ static void rna_def_particle_settings(BlenderRNA *brna)
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_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Random", "Emit in random order of elements");
RNA_def_property_update(prop, 0, "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_clear_flag(prop, PROP_ANIMATABLE);
+ 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");
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_clear_flag(prop, PROP_ANIMATABLE);
+ 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");
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_clear_flag(prop, PROP_ANIMATABLE);
+ RNA_def_property_ui_text(prop, "Size Deflect", "Use particle's size in deflection");
RNA_def_property_update(prop, 0, "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_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Dynamic", "Sets rotation to dynamic/constant");
RNA_def_property_update(prop, 0, "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_clear_flag(prop, PROP_ANIMATABLE);
+ RNA_def_property_ui_text(prop, "Mass from Size", "Multiply mass by particle size");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "boids_2d", PROP_BOOLEAN, PROP_NONE);
@@ -1031,7 +1032,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
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_ui_text(prop, "Branching", "Branch child paths from each other");
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "animate_branching", PROP_BOOLEAN, PROP_NONE);
@@ -1041,22 +1042,22 @@ static void rna_def_particle_settings(BlenderRNA *brna)
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_ui_text(prop, "Symmetric", "Start and end points are the same");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "B-Spline", "Interpolate hair using B-Splines");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Invert", "Invert what is considered object and what is not");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Children", "Apply effectors to children");
RNA_def_property_update(prop, 0, "rna_Particle_redo");
//prop= RNA_def_property(srna, "child_seams", PROP_BOOLEAN, PROP_NONE);
@@ -1076,27 +1077,27 @@ static void rna_def_particle_settings(BlenderRNA *brna)
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_ui_text(prop, "Self Effect", "Particle effectors effect themselves");
RNA_def_property_update(prop, 0, "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_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Type", "");
RNA_def_property_update(prop, 0, "rna_Particle_change_type");
prop= RNA_def_property(srna, "emit_from", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "from");
RNA_def_property_enum_items(prop, part_reactor_from_items);
- RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
+ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
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");
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_clear_flag(prop, PROP_ANIMATABLE);
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");
@@ -1104,30 +1105,30 @@ static void rna_def_particle_settings(BlenderRNA *brna)
/* physics modes */
prop= RNA_def_property(srna, "physics_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "phystype");
- RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
+ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
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");
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_clear_flag(prop, PROP_ANIMATABLE);
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");
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_clear_flag(prop, PROP_ANIMATABLE);
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_ui_text(prop, "Angular Velocity Mode", "Particle angular velocity mode");
RNA_def_property_update(prop, 0, "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_clear_flag(prop, PROP_ANIMATABLE);
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_ui_text(prop, "React On", "The event of target particles to react on");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
/*draw flag*/
@@ -1143,7 +1144,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
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_ui_text(prop, "Emitter", "Render emitter Object also");
RNA_def_property_update(prop, 0, "rna_Particle_redo");
prop= RNA_def_property(srna, "draw_health", PROP_BOOLEAN, PROP_NONE);
@@ -1163,7 +1164,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
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_ui_text(prop, "Parents", "Render parent particles");
RNA_def_property_update(prop, 0, "rna_Particle_redo");
prop= RNA_def_property(srna, "num", PROP_BOOLEAN, PROP_NONE);
@@ -1183,7 +1184,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
prop= RNA_def_property(srna, "use_global_dupli", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_GLOBAL_OB);
- RNA_def_property_ui_text(prop, "Use Global", "Use object's global coordinates for duplication.");
+ RNA_def_property_ui_text(prop, "Use Global", "Use object's global coordinates for duplication");
RNA_def_property_update(prop, 0, "rna_Particle_redo");
prop= RNA_def_property(srna, "render_adaptive", PROP_BOOLEAN, PROP_NONE);
@@ -1198,12 +1199,12 @@ static void rna_def_particle_settings(BlenderRNA *brna)
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_ui_text(prop, "Material Color", "Draw particles using material's diffuse color");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Whole Group", "Use whole group at once");
RNA_def_property_update(prop, 0, "rna_Particle_redo");
prop= RNA_def_property(srna, "render_strand", PROP_BOOLEAN, PROP_NONE);
@@ -1226,7 +1227,8 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_Particle_redo");
prop= RNA_def_property(srna, "draw_size", PROP_INT, PROP_NONE);
- RNA_def_property_range(prop, 0, 10);
+ RNA_def_property_range(prop, 0, 1000);
+ RNA_def_property_ui_range(prop, 1, 100, 1, 0);
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");
@@ -1273,7 +1275,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
prop= RNA_def_property(srna, "display", PROP_INT, PROP_NONE);
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_ui_text(prop, "Display", "Percentage of particles to display in 3D view");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "material", PROP_INT, PROP_NONE);
@@ -1320,7 +1322,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
prop= RNA_def_property(srna, "billboard_animation", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "bb_anim");
RNA_def_property_enum_items(prop, bb_anim_items);
- RNA_def_property_ui_text(prop, "Animate", "How to animate billboard textures.");
+ RNA_def_property_ui_text(prop, "Animate", "How to animate billboard textures");
prop= RNA_def_property(srna, "billboard_split_offset", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "bb_split_offset");
@@ -1350,7 +1352,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
/* simplification */
prop= RNA_def_property(srna, "enable_simplify", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "simplify_flag", PART_SIMPLIFY_ENABLE);
- RNA_def_property_ui_text(prop, "Child Simplification", "Remove child strands as the object becomes smaller on the screen.");
+ RNA_def_property_ui_text(prop, "Child Simplification", "Remove child strands as the object becomes smaller on the screen");
prop= RNA_def_property(srna, "viewport", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "simplify_flag", PART_SIMPLIFY_VIEWPORT);
@@ -1359,7 +1361,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
prop= RNA_def_property(srna, "simplify_refsize", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "simplify_refsize");
RNA_def_property_range(prop, 1, 32768);
- RNA_def_property_ui_text(prop, "Reference Size", "Reference size size in pixels, after which simplification begins.");
+ RNA_def_property_ui_text(prop, "Reference Size", "Reference size size in pixels, after which simplification begins");
prop= RNA_def_property(srna, "simplify_rate", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 1.0f);
@@ -1367,7 +1369,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
prop= RNA_def_property(srna, "simplify_transition", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Transition", "Transition period for fading out strands.");
+ RNA_def_property_ui_text(prop, "Transition", "Transition period for fading out strands");
prop= RNA_def_property(srna, "simplify_viewport", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 0.999f);
@@ -1377,17 +1379,17 @@ static void rna_def_particle_settings(BlenderRNA *brna)
prop= RNA_def_property(srna, "start", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "sta");//optional if prop names are the same
RNA_def_property_range(prop, MINAFRAMEF, MAXFRAMEF);
- RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
+ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
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_ui_text(prop, "Start", "Frame # to start emitting particles");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "end", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, MINAFRAMEF, MAXFRAMEF);
- RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
+ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
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_ui_text(prop, "End", "Frame # to stop emitting particles");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "lifetime", PROP_FLOAT, PROP_TIME);
@@ -1398,20 +1400,21 @@ static void rna_def_particle_settings(BlenderRNA *brna)
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_ui_text(prop, "Random", "Give the particle life a random variation");
RNA_def_property_update(prop, 0, "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_range(prop, 0.0f, 100.0f);
+ RNA_def_property_ui_range(prop, 0, 10, 1, 3);
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");
prop= RNA_def_property(srna, "jitter_factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
+ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
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_ui_text(prop, "Amount", "Amount of jitter applied to the sampling");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "effect_hair", PROP_FLOAT, PROP_NONE);
@@ -1422,35 +1425,36 @@ static void rna_def_particle_settings(BlenderRNA *brna)
prop= RNA_def_property(srna, "amount", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "totpart");
- RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
+ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
/* This limit is for those freaks who have the machine power to handle it. */
/* 10M particles take around 2.2 Gb of memory / disk space in saved file and */
/* each cached frame takes around 0.5 Gb of memory / disk space depending on cache mode. */
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_ui_text(prop, "Amount", "Total number of particles");
RNA_def_property_update(prop, 0, "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_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 0, 1000);
- RNA_def_property_ui_text(prop, "P/F", "Emission locations / face (0 = automatic).");
+ RNA_def_property_ui_text(prop, "P/F", "Emission locations / face (0 = automatic)");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "grid_resolution", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "grid_res");
- RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
+ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
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_ui_text(prop, "Resolution", "The resolution of the particle grid");
RNA_def_property_update(prop, 0, "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_range(prop, -1000.0f, 1000.0f);
+ RNA_def_property_ui_range(prop, 0, 100, 1, 3);
+ 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");
prop= RNA_def_property(srna, "object_factor", PROP_FLOAT, PROP_NONE);
@@ -1463,44 +1467,48 @@ static void rna_def_particle_settings(BlenderRNA *brna)
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_ui_range(prop, 0, 100, 1, 3);
+ RNA_def_property_ui_text(prop, "Random", "Give the starting speed a random variation");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Particle", "Let the target particle give the particle a starting speed");
RNA_def_property_update(prop, 0, "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_range(prop, -1000.0f, 1000.0f);
+ RNA_def_property_ui_range(prop, -100, 100, 1, 2);
+ 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");
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_ui_text(prop, "Rot", "Rotate the surface tangent");
RNA_def_property_update(prop, 0, "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_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");
prop= RNA_def_property(srna, "object_aligned_factor", PROP_FLOAT, PROP_VELOCITY);
RNA_def_property_float_sdna(prop, NULL, "ob_vel");
RNA_def_property_array(prop, 3);
RNA_def_property_range(prop, -200.0f, 200.0f);
+ RNA_def_property_ui_range(prop, -100, 100, 1, 3);
RNA_def_property_ui_text(prop, "Object Aligned", "Let the emitter object orientation give the particle a starting speed");
RNA_def_property_update(prop, 0, "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_range(prop, -100, 100, 10, 3);
RNA_def_property_ui_text(prop, "Angular Velocity", "Angular velocity amount");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
@@ -1525,14 +1533,14 @@ static void rna_def_particle_settings(BlenderRNA *brna)
/* 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_range(prop, 0.01, 100, 1, 3);
RNA_def_property_ui_text(prop, "Mass", "Specify the mass of the particles");
RNA_def_property_update(prop, 0, "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_range(prop, 0.01, 100, 1, 3);
RNA_def_property_ui_text(prop, "Size", "The size of the particles");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
@@ -1545,7 +1553,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
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_ui_text(prop, "Shape", "Power of reaction strength dependence on distance to target");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
@@ -1553,12 +1561,13 @@ static void rna_def_particle_settings(BlenderRNA *brna)
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_ui_text(prop, "Drag", "Specify the amount of air-drag");
RNA_def_property_update(prop, 0, "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_range(prop, 0, 20, 1, 3);
RNA_def_property_ui_text(prop, "Brownian", "Specify the amount of brownian motion");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
@@ -1572,7 +1581,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
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_ui_text(prop, "Random Length", "Give path length a random variation");
RNA_def_property_update(prop, 0, "rna_Particle_redo");
/* children */
@@ -1587,37 +1596,37 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_int_sdna(prop, NULL, "ren_child_nbr");
RNA_def_property_range(prop, 0, 100000);
RNA_def_property_ui_range(prop, 0, 10000, 1, 0);
- RNA_def_property_ui_text(prop, "Rendered Children", "Amount of children/parent for rendering.");
+ RNA_def_property_ui_text(prop, "Rendered Children", "Amount of children/parent for rendering");
prop= RNA_def_property(srna, "virtual_parents", PROP_FLOAT, PROP_NONE);
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_ui_text(prop, "Virtual Parents", "Relative amount of virtual parents");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Child Size", "A multiplier for the child particle size");
RNA_def_property_update(prop, 0, "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_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");
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_ui_text(prop, "Child Radius", "Radius of children around parent");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Child Roundness", "Roundness of children around parent");
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
/* clumping */
@@ -1639,7 +1648,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "kink_amp");
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_ui_text(prop, "Amplitude", "The amplitude of the offset");
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "kink_frequency", PROP_FLOAT, PROP_NONE);
@@ -1659,40 +1668,40 @@ static void rna_def_particle_settings(BlenderRNA *brna)
prop= RNA_def_property(srna, "rough1", PROP_FLOAT, PROP_NONE);
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_ui_text(prop, "Rough1", "Amount of location dependent rough");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Size1", "Size of location dependent rough");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Rough2", "Amount of random rough");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Size2", "Size of random rough");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Threshold", "Amount of particles left untouched by random rough");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Rough Endpoint", "Amount of end point rough");
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "rough_end_shape", PROP_FLOAT, PROP_NONE);
@@ -1709,14 +1718,14 @@ static void rna_def_particle_settings(BlenderRNA *brna)
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_ui_text(prop, "Threshold", "Amount of particles left untouched by child path length");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Threshold", "Threshold of branching");
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
/* drawing stuff */
@@ -1737,20 +1746,20 @@ static void rna_def_particle_settings(BlenderRNA *brna)
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_ui_text(prop, "Path Start", "Starting time of drawn path");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Path End", "End time of drawn path");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Trail Count", "Number of trail particles");
RNA_def_property_update(prop, 0, "rna_Particle_redo");
/* keyed particles */
@@ -1758,7 +1767,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_int_sdna(prop, NULL, "keyed_loops");
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_ui_text(prop, "Loop count", "Number of times the keys are looped");
RNA_def_property_update(prop, 0, "rna_Particle_redo");
/* boids */
@@ -1778,7 +1787,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
prop= RNA_def_property(srna, "dupliweights", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "ParticleDupliWeight");
- RNA_def_property_ui_text(prop, "Dupli Group Weights", "Weights for all of the objects in the dupli group.");
+ RNA_def_property_ui_text(prop, "Dupli Group Weights", "Weights for all of the objects in the dupli group");
prop= RNA_def_property(srna, "active_dupliweight", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "ParticleDupliWeight");
@@ -1793,7 +1802,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
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_ui_text(prop, "Dupli Object", "Show this Object in place of particles");
RNA_def_property_update(prop, 0, "rna_Particle_redo_dependency");
prop= RNA_def_property(srna, "billboard_object", PROP_POINTER, PROP_NONE);
@@ -1838,24 +1847,24 @@ static void rna_def_particle_target(BlenderRNA *brna)
srna = RNA_def_struct(brna, "ParticleTarget", NULL);
- RNA_def_struct_ui_text(srna, "Particle Target", "Target particle system.");
+ RNA_def_struct_ui_text(srna, "Particle Target", "Target particle system");
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_ParticleTarget_name_get", "rna_ParticleTarget_name_length", NULL);
- RNA_def_property_ui_text(prop, "Name", "Particle target name.");
+ RNA_def_property_ui_text(prop, "Name", "Particle target name");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_struct_name_property(srna, prop);
prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
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_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");
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_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");
prop= RNA_def_property(srna, "time", PROP_FLOAT, PROP_TIME);
@@ -1872,12 +1881,12 @@ static void rna_def_particle_target(BlenderRNA *brna)
prop= RNA_def_property(srna, "valid", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PTARGET_VALID);
- RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
- RNA_def_property_ui_text(prop, "Valid", "Keyed particles target is valid.");
+ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
+ RNA_def_property_ui_text(prop, "Valid", "Keyed particles target is valid");
prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, mode_items);
- RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
+ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Mode", "");
RNA_def_property_update(prop, 0, "rna_Particle_target_reset");
@@ -1888,11 +1897,11 @@ static void rna_def_particle_system(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "ParticleSystem", NULL);
- RNA_def_struct_ui_text(srna, "Particle System", "Particle system in an object.");
+ RNA_def_struct_ui_text(srna, "Particle System", "Particle system in an object");
RNA_def_struct_ui_icon(srna, ICON_PARTICLE_DATA);
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
- RNA_def_property_ui_text(prop, "Name", "Particle system name.");
+ RNA_def_property_ui_text(prop, "Name", "Particle system name");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER|NA_RENAME, NULL);
RNA_def_struct_name_property(srna, prop);
@@ -1903,21 +1912,21 @@ static void rna_def_particle_system(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "ParticleSettings");
RNA_def_property_flag(prop, PROP_EDITABLE|PROP_NEVER_NULL);
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_ui_text(prop, "Settings", "Particle system settings");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "particles", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "particles", "totpart");
RNA_def_property_struct_type(prop, "Particle");
- RNA_def_property_ui_text(prop, "Particles", "Particles generated by the particle system.");
+ RNA_def_property_ui_text(prop, "Particles", "Particles generated by the particle system");
prop= RNA_def_property(srna, "child_particles", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "child", "totchild");
RNA_def_property_struct_type(prop, "ChildParticle");
- RNA_def_property_ui_text(prop, "Child Particles", "Child particles generated by the particle system.");
+ RNA_def_property_ui_text(prop, "Child Particles", "Child particles generated by the particle system");
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_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");
/* hair */
@@ -1928,7 +1937,7 @@ static void rna_def_particle_system(BlenderRNA *brna)
prop= RNA_def_property(srna, "hair_dynamics", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PSYS_HAIR_DYNAMICS);
- RNA_def_property_ui_text(prop, "Hair Dynamics", "Enable hair dynamics using cloth simulation.");
+ RNA_def_property_ui_text(prop, "Hair Dynamics", "Enable hair dynamics using cloth simulation");
RNA_def_property_update(prop, 0, "rna_Particle_hair_dynamics");
prop= RNA_def_property(srna, "cloth", PROP_POINTER, PROP_NONE);
@@ -1942,25 +1951,25 @@ static void rna_def_particle_system(BlenderRNA *brna)
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_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");
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_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");
/* 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_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Keyed timing", "Use key times");
RNA_def_property_update(prop, 0, "rna_Particle_redo");
prop= RNA_def_property(srna, "targets", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "ParticleTarget");
- RNA_def_property_ui_text(prop, "Targets", "Target particle systems.");
+ RNA_def_property_ui_text(prop, "Targets", "Target particle systems");
prop= RNA_def_property(srna, "active_particle_target", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "ParticleTarget");
@@ -1976,17 +1985,17 @@ static void rna_def_particle_system(BlenderRNA *brna)
prop= RNA_def_property(srna, "billboard_normal_uv", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "bb_uvname[0]");
RNA_def_property_string_maxlength(prop, 32);
- RNA_def_property_ui_text(prop, "Billboard Normal UV", "UV Layer to control billboard normals.");
+ RNA_def_property_ui_text(prop, "Billboard Normal UV", "UV Layer to control billboard normals");
prop= RNA_def_property(srna, "billboard_time_index_uv", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "bb_uvname[1]");
RNA_def_property_string_maxlength(prop, 32);
- RNA_def_property_ui_text(prop, "Billboard Time Index UV", "UV Layer to control billboard time index (X-Y).");
+ RNA_def_property_ui_text(prop, "Billboard Time Index UV", "UV Layer to control billboard time index (X-Y)");
prop= RNA_def_property(srna, "billboard_split_uv", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "bb_uvname[2]");
RNA_def_property_string_maxlength(prop, 32);
- RNA_def_property_ui_text(prop, "Billboard Split UV", "UV Layer to control billboard splitting.");
+ RNA_def_property_ui_text(prop, "Billboard Split UV", "UV Layer to control billboard splitting");
/* vertex groups */
@@ -1994,128 +2003,128 @@ static void rna_def_particle_system(BlenderRNA *brna)
#if 0 // int access. works ok but isnt useful for the UI
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_ui_text(prop, "Vertex Group Density", "Vertex group to control density");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
#endif
prop= RNA_def_property(srna, "vertex_group_density", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_ParticleVGroup_name_get_0", "rna_ParticleVGroup_name_len_0", "rna_ParticleVGroup_name_set_0");
- RNA_def_property_ui_text(prop, "Vertex Group Density", "Vertex group to control density.");
+ RNA_def_property_ui_text(prop, "Vertex Group Density", "Vertex group to control density");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Vertex Group Density Negate", "Negate the effect of the density vertex group");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "vertex_group_velocity", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_ParticleVGroup_name_get_1", "rna_ParticleVGroup_name_len_1", "rna_ParticleVGroup_name_set_1");
- RNA_def_property_ui_text(prop, "Vertex Group Velocity", "Vertex group to control velocity.");
+ RNA_def_property_ui_text(prop, "Vertex Group Velocity", "Vertex group to control velocity");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Vertex Group Velocity Negate", "Negate the effect of the velocity vertex group");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "vertex_group_length", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_ParticleVGroup_name_get_2", "rna_ParticleVGroup_name_len_2", "rna_ParticleVGroup_name_set_2");
- RNA_def_property_ui_text(prop, "Vertex Group Length", "Vertex group to control length.");
+ RNA_def_property_ui_text(prop, "Vertex Group Length", "Vertex group to control length");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Vertex Group Length Negate", "Negate the effect of the length vertex group");
RNA_def_property_update(prop, 0, "rna_Particle_redo");
prop= RNA_def_property(srna, "vertex_group_clump", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_ParticleVGroup_name_get_3", "rna_ParticleVGroup_name_len_3", "rna_ParticleVGroup_name_set_3");
- RNA_def_property_ui_text(prop, "Vertex Group Clump", "Vertex group to control clump.");
+ RNA_def_property_ui_text(prop, "Vertex Group Clump", "Vertex group to control clump");
RNA_def_property_update(prop, 0, "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_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");
prop= RNA_def_property(srna, "vertex_group_kink", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_ParticleVGroup_name_get_4", "rna_ParticleVGroup_name_len_4", "rna_ParticleVGroup_name_set_4");
- RNA_def_property_ui_text(prop, "Vertex Group Kink", "Vertex group to control kink.");
+ RNA_def_property_ui_text(prop, "Vertex Group Kink", "Vertex group to control kink");
RNA_def_property_update(prop, 0, "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_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");
prop= RNA_def_property(srna, "vertex_group_roughness1", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_ParticleVGroup_name_get_5", "rna_ParticleVGroup_name_len_5", "rna_ParticleVGroup_name_set_5");
- RNA_def_property_ui_text(prop, "Vertex Group Roughness 1", "Vertex group to control roughness 1.");
+ 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");
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_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");
prop= RNA_def_property(srna, "vertex_group_roughness2", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_ParticleVGroup_name_get_6", "rna_ParticleVGroup_name_len_6", "rna_ParticleVGroup_name_set_6");
- RNA_def_property_ui_text(prop, "Vertex Group Roughness 2", "Vertex group to control roughness 2.");
+ 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");
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_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");
prop= RNA_def_property(srna, "vertex_group_roughness_end", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_ParticleVGroup_name_get_7", "rna_ParticleVGroup_name_len_7", "rna_ParticleVGroup_name_set_7");
- RNA_def_property_ui_text(prop, "Vertex Group Roughness End", "Vertex group to control roughness end.");
+ 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");
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_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");
prop= RNA_def_property(srna, "vertex_group_size", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_ParticleVGroup_name_get_8", "rna_ParticleVGroup_name_len_8", "rna_ParticleVGroup_name_set_8");
- RNA_def_property_ui_text(prop, "Vertex Group Size", "Vertex group to control size.");
+ RNA_def_property_ui_text(prop, "Vertex Group Size", "Vertex group to control size");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Vertex Group Size Negate", "Negate the effect of the size vertex group");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "vertex_group_tangent", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_ParticleVGroup_name_get_9", "rna_ParticleVGroup_name_len_9", "rna_ParticleVGroup_name_set_9");
- RNA_def_property_ui_text(prop, "Vertex Group Tangent", "Vertex group to control tangent.");
+ RNA_def_property_ui_text(prop, "Vertex Group Tangent", "Vertex group to control tangent");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Vertex Group Tangent Negate", "Negate the effect of the tangent vertex group");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "vertex_group_rotation", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_ParticleVGroup_name_get_10", "rna_ParticleVGroup_name_len_10", "rna_ParticleVGroup_name_set_10");
- RNA_def_property_ui_text(prop, "Vertex Group Rotation", "Vertex group to control rotation.");
+ RNA_def_property_ui_text(prop, "Vertex Group Rotation", "Vertex group to control rotation");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Vertex Group Rotation Negate", "Negate the effect of the rotation vertex group");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "vertex_group_field", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_ParticleVGroup_name_get_11", "rna_ParticleVGroup_name_len_11", "rna_ParticleVGroup_name_set_11");
- RNA_def_property_ui_text(prop, "Vertex Group Field", "Vertex group to control field.");
+ RNA_def_property_ui_text(prop, "Vertex Group Field", "Vertex group to control field");
RNA_def_property_update(prop, 0, "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_ui_text(prop, "Vertex Group Field Negate", "Negate the effect of the field vertex group");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
/* pointcache */
@@ -2134,7 +2143,7 @@ static void rna_def_particle_system(BlenderRNA *brna)
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_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 */
diff --git a/source/blender/makesrna/intern/rna_pose.c b/source/blender/makesrna/intern/rna_pose.c
index b37442fab6a..240d02f7f9e 100644
--- a/source/blender/makesrna/intern/rna_pose.c
+++ b/source/blender/makesrna/intern/rna_pose.c
@@ -15,7 +15,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor(s): Blender Foundation (2008), Roland Hess, Joshua Leung
*
@@ -37,6 +37,8 @@
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
+#include "BLI_math.h"
+
#include "WM_types.h"
#ifdef RNA_RUNTIME
@@ -44,7 +46,6 @@
#include "BIK_api.h"
#include "BKE_action.h"
#include "BKE_armature.h"
-#include "BLI_math.h"
#include "DNA_userdef_types.h"
@@ -446,10 +447,19 @@ static int rna_PoseChannel_constraints_remove(bPoseChannel *pchan, bContext *C,
return remove_constraint_index(&pchan->constraints, index);
}
-static int rna_PoseChannel_location_editable(PointerRNA *ptr, int index)
+static int rna_PoseChannel_proxy_editable(PointerRNA *ptr)
{
+ Object *ob= (Object*)ptr->id.data;
+ bArmature *arm= ob->data;
bPoseChannel *pchan= (bPoseChannel*)ptr->data;
+ return (ob->proxy && pchan->bone && (pchan->bone->layer & arm->layer_protected))? 0: PROP_EDITABLE;
+}
+
+static int rna_PoseChannel_location_editable(PointerRNA *ptr, int index)
+{
+ bPoseChannel *pchan= (bPoseChannel*)ptr->data;
+
/* only if the axis in question is locked, not editable... */
if ((index == 0) && (pchan->protectflag & OB_LOCK_LOCX))
return 0;
@@ -556,7 +566,7 @@ static void rna_def_bone_group(BlenderRNA *brna)
/* struct */
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_text(srna, "Bone Group", "Groups of Pose Channels (Bones)");
RNA_def_struct_ui_icon(srna, ICON_GROUP_BONE);
/* name */
@@ -571,7 +581,7 @@ static void rna_def_bone_group(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "customCol");
RNA_def_property_enum_items(prop, prop_colorSets_items);
RNA_def_property_enum_funcs(prop, NULL, "rna_BoneGroup_color_set_set", NULL);
- RNA_def_property_ui_text(prop, "Color Set", "Custom color set to use.");
+ RNA_def_property_ui_text(prop, "Color Set", "Custom color set to use");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
// TODO: editing the colors for this should result in changes to the color type...
@@ -579,13 +589,13 @@ static void rna_def_bone_group(BlenderRNA *brna)
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "ThemeBoneColorSet");
RNA_def_property_pointer_sdna(prop, NULL, "cs"); /* NOTE: the DNA data is not really a pointer, but this code works :) */
- RNA_def_property_ui_text(prop, "Colors", "Copy of the colors associated with the group's color set.");
+ RNA_def_property_ui_text(prop, "Colors", "Copy of the colors associated with the group's color set");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
}
static EnumPropertyItem prop_iksolver_items[] = {
- {IKSOLVER_LEGACY, "LEGACY", 0, "Legacy", "Original IK solver."},
- {IKSOLVER_ITASC, "ITASC", 0, "iTaSC", "Multi constraint, stateful IK solver."},
+ {IKSOLVER_LEGACY, "LEGACY", 0, "Legacy", "Original IK solver"},
+ {IKSOLVER_ITASC, "ITASC", 0, "iTaSC", "Multi constraint, stateful IK solver"},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem prop_solver_items[] = {
@@ -605,14 +615,14 @@ static void rna_def_pose_channel_constraints(BlenderRNA *brna, PropertyRNA *cpro
RNA_def_property_srna(cprop, "PoseBoneConstraints");
srna= RNA_def_struct(brna, "PoseBoneConstraints", NULL);
RNA_def_struct_sdna(srna, "bPoseChannel");
- RNA_def_struct_ui_text(srna, "PoseBone Constraints", "Collection of pose bone constraints.");
+ RNA_def_struct_ui_text(srna, "PoseBone Constraints", "Collection of pose bone constraints");
/* Collection active property */
prop= RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "Constraint");
RNA_def_property_pointer_funcs(prop, "rna_PoseChannel_active_constraint_get", "rna_PoseChannel_active_constraint_set", NULL);
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Active Constraint", "Active PoseChannel constraint.");
+ RNA_def_property_ui_text(prop, "Active Constraint", "Active PoseChannel constraint");
/* Constraint collection */
@@ -648,25 +658,26 @@ static void rna_def_pose_channel(BlenderRNA *brna)
{ROT_MODE_YZX, "YZX", 0, "YZX Euler", "YZX Rotation Order. Prone to Gimbal Lock"},
{ROT_MODE_ZXY, "ZXY", 0, "ZXY Euler", "ZXY Rotation Order. Prone to Gimbal Lock"},
{ROT_MODE_ZYX, "ZYX", 0, "ZYX Euler", "ZYX Rotation Order. Prone to Gimbal Lock"},
- {ROT_MODE_AXISANGLE, "AXIS_ANGLE", 0, "Axis Angle", "Axis Angle (W+XYZ). Defines a rotation around some axis defined by 3D-Vector."},
+ {ROT_MODE_AXISANGLE, "AXIS_ANGLE", 0, "Axis Angle", "Axis Angle (W+XYZ). Defines a rotation around some axis defined by 3D-Vector"},
{0, NULL, 0, NULL, NULL}};
static float default_quat[4] = {1,0,0,0}; /* default quaternion values */
static float default_axisAngle[4] = {0,0,1,0}; /* default axis-angle rotation values */
+ static float default_scale[3] = {1,1,1}; /* default scale values */
StructRNA *srna;
PropertyRNA *prop;
srna= RNA_def_struct(brna, "PoseBone", NULL);
RNA_def_struct_sdna(srna, "bPoseChannel");
- RNA_def_struct_ui_text(srna, "Pose Bone", "Channel defining pose data for a bone in a Pose.");
+ RNA_def_struct_ui_text(srna, "Pose Bone", "Channel defining pose data for a bone in a Pose");
RNA_def_struct_path_func(srna, "rna_PoseBone_path");
RNA_def_struct_idproperties_func(srna, "rna_PoseBone_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.");
+ RNA_def_property_ui_text(prop, "Constraints", "Constraints that act on this PoseChannel");
rna_def_pose_channel_constraints(brna, prop);
@@ -674,6 +685,7 @@ static void rna_def_pose_channel(BlenderRNA *brna)
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_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
RNA_def_struct_name_property(srna, prop);
prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE);
@@ -681,18 +693,6 @@ static void rna_def_pose_channel(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Selected", "");
/* Baked Bone Path cache data */
- 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);
- RNA_def_property_ui_text(prop, "Bone Paths Calculation Start Frame", "Starting frame of range of frames to use for Bone Path calculations.");
- RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
-
- prop= RNA_def_property(srna, "path_end_frame", PROP_INT, PROP_TIME);
- RNA_def_property_int_sdna(prop, NULL, "pathef");
- 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, "rna_Pose_update");
-
rna_def_motionpath_common(srna);
/* Relationships to other bones */
@@ -700,37 +700,41 @@ static void rna_def_pose_channel(BlenderRNA *brna)
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "Bone");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Bone", "Bone associated with this PoseBone.");
+ RNA_def_property_ui_text(prop, "Bone", "Bone associated with this PoseBone");
prop= RNA_def_property(srna, "parent", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "PoseBone");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Parent", "Parent of this pose bone.");
+ RNA_def_property_ui_text(prop, "Parent", "Parent of this pose bone");
prop= RNA_def_property(srna, "child", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "PoseBone");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Child", "Child of this pose bone.");
+ RNA_def_property_ui_text(prop, "Child", "Child of this pose bone");
/* Transformation settings */
prop= RNA_def_property(srna, "location", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "loc");
RNA_def_property_editable_array_func(prop, "rna_PoseChannel_location_editable");
RNA_def_property_ui_text(prop, "Location", "");
- RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Pose_update");
+ RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable"); // XXX... disabled, since proxy-locked layers are currently used for ensuring proxy-syncing too
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
prop= RNA_def_property(srna, "scale", PROP_FLOAT, PROP_XYZ);
RNA_def_property_float_sdna(prop, NULL, "size");
RNA_def_property_editable_array_func(prop, "rna_PoseChannel_scale_editable");
+ RNA_def_property_float_array_default(prop, default_scale);
RNA_def_property_ui_text(prop, "Scale", "");
- RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Pose_update");
+ RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable"); // XXX... disabled, since proxy-locked layers are currently used for ensuring proxy-syncing too
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
prop= RNA_def_property(srna, "rotation_quaternion", PROP_FLOAT, PROP_QUATERNION);
RNA_def_property_float_sdna(prop, NULL, "quat");
RNA_def_property_editable_array_func(prop, "rna_PoseChannel_rotation_4d_editable");
RNA_def_property_float_array_default(prop, default_quat);
- RNA_def_property_ui_text(prop, "Quaternion Rotation", "Rotation in Quaternions.");
- RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Pose_update");
+ RNA_def_property_ui_text(prop, "Quaternion Rotation", "Rotation in Quaternions");
+ RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable"); // XXX... disabled, since proxy-locked layers are currently used for ensuring proxy-syncing too
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
/* XXX: for axis-angle, it would have been nice to have 2 separate fields for UI purposes, but
* having a single one is better for Keyframing and other property-management situations...
@@ -740,19 +744,22 @@ static void rna_def_pose_channel(BlenderRNA *brna)
RNA_def_property_float_funcs(prop, "rna_PoseChannel_rotation_axis_angle_get", "rna_PoseChannel_rotation_axis_angle_set", NULL);
RNA_def_property_editable_array_func(prop, "rna_PoseChannel_rotation_4d_editable");
RNA_def_property_float_array_default(prop, default_axisAngle);
- RNA_def_property_ui_text(prop, "Axis-Angle Rotation", "Angle of Rotation for Axis-Angle rotation representation.");
- RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Pose_update");
+ RNA_def_property_ui_text(prop, "Axis-Angle Rotation", "Angle of Rotation for Axis-Angle rotation representation");
+ RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable"); // XXX... disabled, since proxy-locked layers are currently used for ensuring proxy-syncing too
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
prop= RNA_def_property(srna, "rotation_euler", PROP_FLOAT, PROP_EULER);
RNA_def_property_float_sdna(prop, NULL, "eul");
RNA_def_property_editable_array_func(prop, "rna_PoseChannel_rotation_euler_editable");
- RNA_def_property_ui_text(prop, "Euler Rotation", "Rotation in Eulers.");
- RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Pose_update");
+ RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable"); // XXX... disabled, since proxy-locked layers are currently used for ensuring proxy-syncing too
+ RNA_def_property_ui_text(prop, "Euler Rotation", "Rotation in Eulers");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "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); // XXX move to using a single define of this someday
RNA_def_property_enum_funcs(prop, NULL, "rna_PoseChannel_rotation_mode_set", NULL);
+ RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable"); // XXX... disabled, since proxy-locked layers are currently used for ensuring proxy-syncing too
RNA_def_property_ui_text(prop, "Rotation Mode", "");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
@@ -761,149 +768,162 @@ static void rna_def_pose_channel(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "chan_mat");
RNA_def_property_array(prop, 16);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Channel Matrix", "4x4 matrix, before constraints.");
+ RNA_def_property_ui_text(prop, "Channel Matrix", "4x4 matrix, before constraints");
prop= RNA_def_property(srna, "matrix", PROP_FLOAT, PROP_MATRIX);
RNA_def_property_float_sdna(prop, NULL, "pose_mat");
RNA_def_property_array(prop, 16);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Pose Matrix", "Final 4x4 matrix for this channel.");
+ RNA_def_property_ui_text(prop, "Pose Matrix", "Final 4x4 matrix for this channel");
- /*
- prop= RNA_def_property(srna, "constraint_inverse_matrix", PROP_FLOAT, PROP_MATRIX);
- RNA_def_property_struct_type(prop, "constinv");
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- 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, "head", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "pose_head");
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.");
+ RNA_def_property_ui_text(prop, "Pose Head Position", "Location of head of the channel's bone");
prop= RNA_def_property(srna, "tail", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "pose_tail");
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.");
+ 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_ui_text(prop, "Has IK", "Is part of an IK chain");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_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_ui_text(prop, "IK X DoF", "Allow movement around the X axis");
+ RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_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_IK_update");
+ RNA_def_property_ui_text(prop, "IK Y DoF", "Allow movement around the Y axis");
+ RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_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_ui_text(prop, "IK Z DoF", "Allow movement around the Z axis");
+ RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_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_ui_text(prop, "IK X Limit", "Limit movement around the X axis");
+ RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_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_ui_text(prop, "IK Y Limit", "Limit movement around the Y axis");
+ RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_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_ui_text(prop, "IK Z Limit", "Limit movement around the Z axis");
+ RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_update");
prop= RNA_def_property(srna, "ik_rot_control", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "ikflag", BONE_IK_ROTCTL);
RNA_def_property_ui_text(prop, "IK rot control", "Apply channel rotation as IK constraint");
+ RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_update");
prop= RNA_def_property(srna, "ik_lin_control", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "ikflag", BONE_IK_LINCTL);
RNA_def_property_ui_text(prop, "IK rot control", "Apply channel size as IK constraint if stretching is enabled");
+ RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_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_range(prop, -M_PI, 0.0f);
RNA_def_property_ui_text(prop, "IK X Minimum", "Minimum angles for IK Limit");
+ RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_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_range(prop, 0.0f, M_PI);
RNA_def_property_ui_text(prop, "IK X Maximum", "Maximum angles for IK Limit");
+ RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_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_range(prop, -M_PI, 0.0f);
RNA_def_property_ui_text(prop, "IK Y Minimum", "Minimum angles for IK Limit");
+ RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_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_range(prop, 0.0f, M_PI);
RNA_def_property_ui_text(prop, "IK Y Maximum", "Maximum angles for IK Limit");
+ RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_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_range(prop, -M_PI, 0.0f);
RNA_def_property_ui_text(prop, "IK Z Minimum", "Minimum angles for IK Limit");
+ RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_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_range(prop, 0.0f, M_PI);
RNA_def_property_ui_text(prop, "IK Z Maximum", "Maximum angles for IK Limit");
+ RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_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_ui_text(prop, "IK X Stiffness", "IK stiffness around the X axis");
+ RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_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_ui_text(prop, "IK Y Stiffness", "IK stiffness around the Y axis");
+ RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_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_ui_text(prop, "IK Z Stiffness", "IK stiffness around the Z axis");
+ RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_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_ui_text(prop, "IK Stretch", "Allow scaling of the bone for IK");
+ RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_update");
prop= RNA_def_property(srna, "ik_rot_weight", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ikrotweight");
RNA_def_property_range(prop, 0.0f,1.0f);
- RNA_def_property_ui_text(prop, "IK Rot Weight", "Weight of rotation constraint for IK.");
+ RNA_def_property_ui_text(prop, "IK Rot Weight", "Weight of rotation constraint for IK");
+ RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
prop= RNA_def_property(srna, "ik_lin_weight", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "iklinweight");
RNA_def_property_range(prop, 0.0f,1.0f);
- RNA_def_property_ui_text(prop, "IK Lin Weight", "Weight of scale constraint for IK.");
+ RNA_def_property_ui_text(prop, "IK Lin Weight", "Weight of scale constraint for IK");
+ RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
/* custom bone shapes */
@@ -911,14 +931,16 @@ static void rna_def_pose_channel(BlenderRNA *brna)
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_ui_text(prop, "Custom Object", "Object that defines custom draw type for this bone.");
+ RNA_def_property_ui_text(prop, "Custom Object", "Object that defines custom draw type for this bone");
+ RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
prop= RNA_def_property(srna, "custom_shape_transform", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "custom_tx");
RNA_def_property_struct_type(prop, "PoseBone");
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Custom Shape Transform", "Bone that defines the display transform of this custom shape.");
+ RNA_def_property_ui_text(prop, "Custom Shape Transform", "Bone that defines the display transform of this custom shape");
+ RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
/* bone groups */
@@ -926,7 +948,8 @@ static void rna_def_pose_channel(BlenderRNA *brna)
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_ui_text(prop, "Bone Group Index", "Bone Group this pose channel belongs to (0=no group)");
+ RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
prop= RNA_def_property(srna, "bone_group", PROP_POINTER, PROP_NONE);
@@ -934,36 +957,43 @@ static void rna_def_pose_channel(BlenderRNA *brna)
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_editable_func(prop, "rna_PoseChannel_proxy_editable");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
/* transform locks */
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_ui_text(prop, "Lock Location", "Lock editing of location in the interface");
+ RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
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_ui_text(prop, "Lock Rotation", "Lock editing of rotation in the interface");
+ RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
// XXX this is sub-optimal - it really should be included above, but due to technical reasons we can't do this!
prop= RNA_def_property(srna, "lock_rotation_w", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "protectflag", OB_LOCK_ROTW);
- RNA_def_property_ui_text(prop, "Lock Rotation (4D Angle)", "Lock editing of 'angle' component of four-component rotations in the interface.");
+ RNA_def_property_ui_text(prop, "Lock Rotation (4D Angle)", "Lock editing of 'angle' component of four-component rotations in the interface");
+ RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
+
// XXX this needs a better name
prop= RNA_def_property(srna, "lock_rotations_4d", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "protectflag", OB_LOCK_ROT4D);
- RNA_def_property_ui_text(prop, "Lock Rotations (4D)", "Lock editing of four component rotations by components (instead of as Eulers).");
+ RNA_def_property_ui_text(prop, "Lock Rotations (4D)", "Lock editing of four component rotations by components (instead of as Eulers)");
+ RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
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_ui_text(prop, "Lock Scale", "Lock editing of scale in the interface");
+ RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
RNA_api_pose_channel(srna);
@@ -972,13 +1002,13 @@ static void rna_def_pose_channel(BlenderRNA *brna)
static void rna_def_pose_itasc(BlenderRNA *brna)
{
static const EnumPropertyItem prop_itasc_mode_items[]= {
- {0, "ANIMATION", 0, "Animation", "Stateless solver computing pose starting from current action and non-IK constraints."},
- {ITASC_SIMULATION, "SIMULATION", 0, "Simulation", "Statefull solver running in real-time context and ignoring actions and non-IK constraints."},
+ {0, "ANIMATION", 0, "Animation", "Stateless solver computing pose starting from current action and non-IK constraints"},
+ {ITASC_SIMULATION, "SIMULATION", 0, "Simulation", "Statefull solver running in real-time context and ignoring actions and non-IK constraints"},
{0, NULL, 0, NULL, NULL}};
static const EnumPropertyItem prop_itasc_reiteration_items[]= {
- {0, "NEVER", 0, "Never", "The solver does not reiterate, not even on first frame (starts from rest pose)."},
- {ITASC_INITIAL_REITERATION, "INITIAL", 0, "Initial", "The solver reiterates (converges) on the first frame but not on subsequent frame."},
- {ITASC_INITIAL_REITERATION|ITASC_REITERATION, "ALWAYS", 0, "Always", "The solver reiterates (converges) on all frames."},
+ {0, "NEVER", 0, "Never", "The solver does not reiterate, not even on first frame (starts from rest pose)"},
+ {ITASC_INITIAL_REITERATION, "INITIAL", 0, "Initial", "The solver reiterates (converges) on the first frame but not on subsequent frame"},
+ {ITASC_INITIAL_REITERATION|ITASC_REITERATION, "ALWAYS", 0, "Always", "The solver reiterates (converges) on all frames"},
{0, NULL, 0, NULL, NULL}};
StructRNA *srna;
@@ -986,24 +1016,24 @@ static void rna_def_pose_itasc(BlenderRNA *brna)
srna= RNA_def_struct(brna, "Itasc", "IKParam");
RNA_def_struct_sdna(srna, "bItasc");
- RNA_def_struct_ui_text(srna, "bItasc", "Parameters for the iTaSC IK solver.");
+ RNA_def_struct_ui_text(srna, "bItasc", "Parameters for the iTaSC IK solver");
prop= RNA_def_property(srna, "precision", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "precision");
RNA_def_property_range(prop, 0.0f,0.1f);
- RNA_def_property_ui_text(prop, "Precision", "Precision of convergence in case of reiteration.");
+ RNA_def_property_ui_text(prop, "Precision", "Precision of convergence in case of reiteration");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Itasc_update");
prop= RNA_def_property(srna, "num_iter", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "numiter");
RNA_def_property_range(prop, 1.f,1000.f);
- RNA_def_property_ui_text(prop, "Iterations", "Maximum number of iterations for convergence in case of reiteration.");
+ RNA_def_property_ui_text(prop, "Iterations", "Maximum number of iterations for convergence in case of reiteration");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Itasc_update");
prop= RNA_def_property(srna, "num_step", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "numstep");
RNA_def_property_range(prop, 1.f, 50.f);
- RNA_def_property_ui_text(prop, "Num steps", "Divides the frame interval into this many steps.");
+ RNA_def_property_ui_text(prop, "Num steps", "Divides the frame interval into this many steps");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Itasc_update");
prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
@@ -1020,31 +1050,31 @@ static void rna_def_pose_itasc(BlenderRNA *brna)
prop= RNA_def_property(srna, "auto_step", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ITASC_AUTO_STEP);
- RNA_def_property_ui_text(prop, "Auto step", "Automatically determine the optimal number of steps for best performance/accurary trade off.");
+ RNA_def_property_ui_text(prop, "Auto step", "Automatically determine the optimal number of steps for best performance/accurary trade off");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Itasc_update");
prop= RNA_def_property(srna, "min_step", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "minstep");
RNA_def_property_range(prop, 0.0f,0.1f);
- RNA_def_property_ui_text(prop, "Min step", "Lower bound for timestep in second in case of automatic substeps.");
+ RNA_def_property_ui_text(prop, "Min step", "Lower bound for timestep in second in case of automatic substeps");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Itasc_update");
prop= RNA_def_property(srna, "max_step", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "maxstep");
RNA_def_property_range(prop, 0.0f,1.0f);
- RNA_def_property_ui_text(prop, "Max step", "Higher bound for timestep in second in case of automatic substeps.");
+ RNA_def_property_ui_text(prop, "Max step", "Higher bound for timestep in second in case of automatic substeps");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Itasc_update");
prop= RNA_def_property(srna, "feedback", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "feedback");
RNA_def_property_range(prop, 0.0f,100.0f);
- RNA_def_property_ui_text(prop, "Feedback", "Feedback coefficient for error correction. Average response time=1/feedback. Default=20.");
+ RNA_def_property_ui_text(prop, "Feedback", "Feedback coefficient for error correction. Average response time=1/feedback. Default=20");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Itasc_update");
prop= RNA_def_property(srna, "max_velocity", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "maxvel");
RNA_def_property_range(prop, 0.0f,100.0f);
- RNA_def_property_ui_text(prop, "Max Velocity", "Maximum joint velocity in rad/s. Default=50.");
+ RNA_def_property_ui_text(prop, "Max Velocity", "Maximum joint velocity in rad/s. Default=50");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Itasc_update");
prop= RNA_def_property(srna, "solver", PROP_ENUM, PROP_NONE);
@@ -1073,14 +1103,14 @@ static void rna_def_pose_ikparam(BlenderRNA *brna)
srna= RNA_def_struct(brna, "IKParam", NULL);
RNA_def_struct_sdna(srna, "bIKParam");
- RNA_def_struct_ui_text(srna, "IKParam", "Base type for IK solver parameters.");
+ RNA_def_struct_ui_text(srna, "IKParam", "Base type for IK solver parameters");
RNA_def_struct_refine_func(srna, "rna_IKParam_refine");
prop= RNA_def_property(srna, "ik_solver", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "iksolver");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_enum_items(prop, prop_iksolver_items);
- RNA_def_property_ui_text(prop, "IK Solver", "IK solver for which these parameters are defined, 0 for Legacy, 1 for iTaSC.");
+ RNA_def_property_ui_text(prop, "IK Solver", "IK solver for which these parameters are defined, 0 for Legacy, 1 for iTaSC");
}
static void rna_def_pose(BlenderRNA *brna)
@@ -1091,31 +1121,31 @@ static void rna_def_pose(BlenderRNA *brna)
/* struct definition */
srna= RNA_def_struct(brna, "Pose", NULL);
RNA_def_struct_sdna(srna, "bPose");
- RNA_def_struct_ui_text(srna, "Pose", "A collection of pose channels, including settings for animating bones.");
+ RNA_def_struct_ui_text(srna, "Pose", "A collection of pose channels, including settings for animating bones");
/* pose channels */
prop= RNA_def_property(srna, "bones", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "chanbase", NULL);
RNA_def_property_struct_type(prop, "PoseBone");
- RNA_def_property_ui_text(prop, "Pose Bones", "Individual pose bones for the armature.");
+ RNA_def_property_ui_text(prop, "Pose Bones", "Individual pose bones for the armature");
RNA_def_property_collection_funcs(prop, 0, 0, 0, 0, 0, 0, "rna_PoseBones_lookup_string"); /* can be removed, only for fast lookup */
/* bone groups */
prop= RNA_def_property(srna, "bone_groups", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "agroups", NULL);
RNA_def_property_struct_type(prop, "BoneGroup");
- RNA_def_property_ui_text(prop, "Bone Groups", "Groups of the bones.");
+ RNA_def_property_ui_text(prop, "Bone Groups", "Groups of the bones");
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", "Active bone group for this 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);
RNA_def_property_int_sdna(prop, NULL, "active_group");
RNA_def_property_int_funcs(prop, "rna_Pose_active_bone_group_index_get", "rna_Pose_active_bone_group_index_set", "rna_Pose_active_bone_group_index_range");
- RNA_def_property_ui_text(prop, "Active Bone Group Index", "Active index in bone groups array.");
+ RNA_def_property_ui_text(prop, "Active Bone Group Index", "Active index in bone groups array");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
/* ik solvers */
@@ -1123,14 +1153,14 @@ static void rna_def_pose(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "iksolver");
RNA_def_property_enum_funcs(prop, NULL, "rna_Pose_ik_solver_set", NULL);
RNA_def_property_enum_items(prop, prop_iksolver_items);
- RNA_def_property_ui_text(prop, "IK Solver", "Selection of IK solver for IK chain, current choice is 0 for Legacy, 1 for iTaSC.");
+ RNA_def_property_ui_text(prop, "IK Solver", "Selection of IK solver for IK chain, current choice is 0 for Legacy, 1 for iTaSC");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_ik_solver_update");
prop= RNA_def_property(srna, "ik_param", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "IKParam");
RNA_def_property_pointer_funcs(prop, "rna_Pose_ikparam_get", NULL, "rna_Pose_ikparam_typef");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "IK Param", "Parameters for IK solver.");
+ RNA_def_property_ui_text(prop, "IK Param", "Parameters for IK solver");
/* animviz */
rna_def_animviz_common(srna);
diff --git a/source/blender/makesrna/intern/rna_pose_api.c b/source/blender/makesrna/intern/rna_pose_api.c
index d1a1513ec3a..6863a168b20 100644
--- a/source/blender/makesrna/intern/rna_pose_api.c
+++ b/source/blender/makesrna/intern/rna_pose_api.c
@@ -15,7 +15,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* The Original Code is Copyright (C) 2009 Blender Foundation.
* All rights reserved.
diff --git a/source/blender/makesrna/intern/rna_property.c b/source/blender/makesrna/intern/rna_property.c
index a1fcbac274e..ff410d11ca7 100644
--- a/source/blender/makesrna/intern/rna_property.c
+++ b/source/blender/makesrna/intern/rna_property.c
@@ -15,7 +15,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor(s): Blender Foundation (2008).
*
@@ -104,7 +104,7 @@ void RNA_def_gameproperty(BlenderRNA *brna)
/* Base Struct for GameProperty */
srna= RNA_def_struct(brna, "GameProperty", NULL);
- RNA_def_struct_ui_text(srna , "Game Property", "Game engine user defined object property.");
+ RNA_def_struct_ui_text(srna , "Game Property", "Game engine user defined object property");
RNA_def_struct_sdna(srna, "bProperty");
RNA_def_struct_refine_func(srna, "rna_GameProperty_refine");
@@ -120,58 +120,58 @@ void RNA_def_gameproperty(BlenderRNA *brna)
prop= RNA_def_property(srna, "debug", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PROP_DEBUG);
- RNA_def_property_ui_text(prop, "Debug", "Print debug information for this property.");
+ RNA_def_property_ui_text(prop, "Debug", "Print debug information for this property");
/* GameBooleanProperty */
srna= RNA_def_struct(brna, "GameBooleanProperty", "GameProperty");
- RNA_def_struct_ui_text(srna , "Game Boolean Property", "Game engine user defined boolean property.");
+ RNA_def_struct_ui_text(srna , "Game Boolean Property", "Game engine user defined boolean property");
RNA_def_struct_sdna(srna, "bProperty");
prop= RNA_def_property(srna, "value", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "data", 1);
- RNA_def_property_ui_text(prop, "Value", "Property value.");
+ RNA_def_property_ui_text(prop, "Value", "Property value");
/* GameIntProperty */
srna= RNA_def_struct(brna, "GameIntProperty", "GameProperty");
- RNA_def_struct_ui_text(srna , "Game Integer Property", "Game engine user defined integer number property.");
+ RNA_def_struct_ui_text(srna , "Game Integer Property", "Game engine user defined integer number property");
RNA_def_struct_sdna(srna, "bProperty");
prop= RNA_def_property(srna, "value", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "data");
- RNA_def_property_ui_text(prop, "Value", "Property value.");
+ RNA_def_property_ui_text(prop, "Value", "Property value");
RNA_def_property_range(prop, -10000, 10000);
/* GameFloatProperty */
srna= RNA_def_struct(brna, "GameFloatProperty", "GameProperty");
- RNA_def_struct_ui_text(srna, "Game Float Property", "Game engine user defined floating pointer number property.");
+ RNA_def_struct_ui_text(srna, "Game Float Property", "Game engine user defined floating pointer number property");
RNA_def_struct_sdna(srna, "bProperty");
prop= RNA_def_property(srna, "value", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "data");
- RNA_def_property_ui_text(prop, "Value", "Property value.");
+ RNA_def_property_ui_text(prop, "Value", "Property value");
RNA_def_property_range(prop, -10000, 10000);
RNA_def_property_float_funcs(prop, "rna_GameFloatProperty_value_get", "rna_GameFloatProperty_value_set", NULL);
/* GameTimerProperty */
srna= RNA_def_struct(brna, "GameTimerProperty", "GameProperty");
- RNA_def_struct_ui_text(srna, "Game Timer Property", "Game engine user defined timer property.");
+ RNA_def_struct_ui_text(srna, "Game Timer Property", "Game engine user defined timer property");
RNA_def_struct_sdna(srna, "bProperty");
prop= RNA_def_property(srna, "value", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "data");
- RNA_def_property_ui_text(prop, "Value", "Property value.");
+ RNA_def_property_ui_text(prop, "Value", "Property value");
RNA_def_property_range(prop, -10000, 10000);
RNA_def_property_float_funcs(prop, "rna_GameFloatProperty_value_get", "rna_GameFloatProperty_value_set", NULL);
/* GameStringProperty */
srna= RNA_def_struct(brna, "GameStringProperty", "GameProperty");
- RNA_def_struct_ui_text(srna, "Game String Property", "Game engine user defined text string property.");
+ RNA_def_struct_ui_text(srna, "Game String Property", "Game engine user defined text string property");
RNA_def_struct_sdna(srna, "bProperty");
prop= RNA_def_property(srna, "value", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "poin");
RNA_def_property_string_maxlength(prop, MAX_PROPSTRING);
- RNA_def_property_ui_text(prop, "Value", "Property value.");
+ RNA_def_property_ui_text(prop, "Value", "Property value");
}
#endif
diff --git a/source/blender/makesrna/intern/rna_render.c b/source/blender/makesrna/intern/rna_render.c
index 8212423acd5..c52d60f5d41 100644
--- a/source/blender/makesrna/intern/rna_render.c
+++ b/source/blender/makesrna/intern/rna_render.c
@@ -15,7 +15,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor(s): Blender Foundation (2009)
*
@@ -231,7 +231,7 @@ static void rna_def_render_engine(BlenderRNA *brna)
srna= RNA_def_struct(brna, "RenderEngine", NULL);
RNA_def_struct_sdna(srna, "RenderEngine");
- RNA_def_struct_ui_text(srna, "Render Engine", "Render engine.");
+ RNA_def_struct_ui_text(srna, "Render Engine", "Render engine");
RNA_def_struct_refine_func(srna, "rna_RenderEngine_refine");
RNA_def_struct_register_funcs(srna, "rna_RenderEngine_register", "rna_RenderEngine_unregister");
@@ -292,7 +292,7 @@ static void rna_def_render_result(BlenderRNA *brna)
FunctionRNA *func;
srna= RNA_def_struct(brna, "RenderResult", NULL);
- RNA_def_struct_ui_text(srna, "Render Result", "Result of rendering, including all layers and passes.");
+ RNA_def_struct_ui_text(srna, "Render Result", "Result of rendering, including all layers and passes");
func= RNA_def_function(srna, "load_from_file", "RE_result_load_from_file");
RNA_def_function_ui_description(func, "Copies the pixels of this render result from an image file.");
@@ -369,6 +369,8 @@ static void rna_def_render_pass(BlenderRNA *brna)
{SCE_PASS_INDEXOB, "OBJECT_INDEX", 0, "Object Index", ""},
{SCE_PASS_UV, "UV", 0, "UV", ""},
{SCE_PASS_MIST, "MIST", 0, "Mist", ""},
+ {SCE_PASS_EMIT, "EMIT", 0, "Emit", ""},
+ {SCE_PASS_ENVIRONMENT, "ENVIRONMENT", 0, "Environment", ""},
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "RenderPass", NULL);
diff --git a/source/blender/makesrna/intern/rna_rna.c b/source/blender/makesrna/intern/rna_rna.c
index e6c21d8fede..7c4b48b09f6 100644
--- a/source/blender/makesrna/intern/rna_rna.c
+++ b/source/blender/makesrna/intern/rna_rna.c
@@ -15,7 +15,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor(s): Blender Foundation (2008).
*
@@ -32,6 +32,27 @@
#include "rna_internal.h"
+EnumPropertyItem property_type_items[] = {
+ {PROP_BOOLEAN, "BOOLEAN", 0, "Boolean", ""},
+ {PROP_INT, "INT", 0, "Integer", ""},
+ {PROP_FLOAT, "FLOAT", 0, "Float", ""},
+ {PROP_STRING, "STRING", 0, "String", ""},
+ {PROP_ENUM, "ENUM", 0, "Enumeration", ""},
+ {PROP_POINTER, "POINTER", 0, "Pointer", ""},
+ {PROP_COLLECTION, "COLLECTION", 0, "Collection", ""},
+ {0, NULL, 0, NULL, NULL}};
+
+EnumPropertyItem property_unit_items[] = {
+ {PROP_UNIT_NONE, "NONE", 0, "None", ""},
+ {PROP_UNIT_LENGTH, "LENGTH", 0, "Length", ""},
+ {PROP_UNIT_AREA, "AREA", 0, "Area", ""},
+ {PROP_UNIT_VOLUME, "VOLUME", 0, "Volume", ""},
+ {PROP_UNIT_ROTATION, "ROTATION", 0, "Rotation", ""},
+ {PROP_UNIT_TIME, "TIME", 0, "Time", ""},
+ {PROP_UNIT_VELOCITY, "VELOCITY", 0, "Velocity", ""},
+ {PROP_UNIT_ACCELERATION, "ACCELERATION", 0, "Acceleration", ""},
+ {0, NULL, 0, NULL, NULL}};
+
#ifdef RNA_RUNTIME
#include "BLI_ghash.h"
@@ -436,10 +457,10 @@ static int rna_Property_readonly_get(PointerRNA *ptr)
return prop->flag & PROP_EDITABLE ? 0:1;
}
-static int rna_Property_use_return_get(PointerRNA *ptr)
+static int rna_Property_use_output_get(PointerRNA *ptr)
{
PropertyRNA *prop= (PropertyRNA*)ptr->data;
- return prop->flag & PROP_RETURN ? 1:0;
+ return prop->flag & PROP_OUTPUT ? 1:0;
}
static int rna_Property_is_required_get(PointerRNA *ptr)
@@ -798,6 +819,42 @@ static void rna_BlenderRNA_structs_begin(CollectionPropertyIterator *iter, Point
rna_iterator_listbase_begin(iter, &((BlenderRNA*)ptr->data)->structs, NULL);
}
+/* optional, for faster lookups */
+static int rna_BlenderRNA_structs_length(PointerRNA *ptr)
+{
+ return BLI_countlist(&((BlenderRNA*)ptr->data)->structs);
+}
+static PointerRNA rna_BlenderRNA_structs_lookup_int(PointerRNA *ptr, int index)
+{
+ StructRNA *srna= BLI_findlink(&((BlenderRNA*)ptr->data)->structs, index);
+
+ if(srna) {
+ PointerRNA r_ptr;
+ RNA_pointer_create(NULL, &RNA_Struct, srna, &r_ptr);
+ return r_ptr;
+ }
+ else {
+ return PointerRNA_NULL;
+ }
+}
+static PointerRNA rna_BlenderRNA_structs_lookup_string(PointerRNA *ptr, const char *key)
+{
+ StructRNA *srna= ((BlenderRNA*)ptr->data)->structs.first;
+ for(; srna; srna=srna->cont.next)
+ if(key[0] == srna->identifier[0] && strcmp(key, srna->identifier)==0)
+ break;
+
+ if(srna) {
+ PointerRNA r_ptr;
+ RNA_pointer_create(NULL, &RNA_Struct, srna, &r_ptr);
+ return r_ptr;
+ }
+ else {
+ return PointerRNA_NULL;
+ }
+}
+
+
#else
static void rna_def_struct(BlenderRNA *brna)
@@ -812,42 +869,42 @@ static void rna_def_struct(BlenderRNA *brna)
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_string_funcs(prop, "rna_Struct_name_get", "rna_Struct_name_length", NULL);
- RNA_def_property_ui_text(prop, "Name", "Human readable name.");
+ RNA_def_property_ui_text(prop, "Name", "Human readable name");
prop= RNA_def_property(srna, "identifier", PROP_STRING, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_string_funcs(prop, "rna_Struct_identifier_get", "rna_Struct_identifier_length", NULL);
- RNA_def_property_ui_text(prop, "Identifier", "Unique name used in the code and scripting.");
+ RNA_def_property_ui_text(prop, "Identifier", "Unique name used in the code and scripting");
RNA_def_struct_name_property(srna, prop);
prop= RNA_def_property(srna, "description", PROP_STRING, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_string_funcs(prop, "rna_Struct_description_get", "rna_Struct_description_length", NULL);
- RNA_def_property_ui_text(prop, "Description", "Description of the Struct's purpose.");
+ RNA_def_property_ui_text(prop, "Description", "Description of the Struct's purpose");
prop= RNA_def_property(srna, "base", PROP_POINTER, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_struct_type(prop, "Struct");
RNA_def_property_pointer_funcs(prop, "rna_Struct_base_get", NULL, NULL);
- RNA_def_property_ui_text(prop, "Base", "Struct definition this is derived from.");
+ RNA_def_property_ui_text(prop, "Base", "Struct definition this is derived from");
prop= RNA_def_property(srna, "nested", PROP_POINTER, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_struct_type(prop, "Struct");
RNA_def_property_pointer_funcs(prop, "rna_Struct_nested_get", NULL, NULL);
- RNA_def_property_ui_text(prop, "Nested", "Struct in which this struct is always nested, and to which it logically belongs.");
+ RNA_def_property_ui_text(prop, "Nested", "Struct in which this struct is always nested, and to which it logically belongs");
prop= RNA_def_property(srna, "name_property", PROP_POINTER, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_struct_type(prop, "StringProperty");
RNA_def_property_pointer_funcs(prop, "rna_Struct_name_property_get", NULL, NULL);
- RNA_def_property_ui_text(prop, "Name Property", "Property that gives the name of the struct.");
+ RNA_def_property_ui_text(prop, "Name Property", "Property that gives the name of the struct");
prop= RNA_def_property(srna, "properties", PROP_COLLECTION, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_struct_type(prop, "Property");
RNA_def_property_collection_funcs(prop, "rna_Struct_properties_begin", "rna_Struct_properties_next", "rna_iterator_listbase_end", "rna_Struct_properties_get", 0, 0, 0);
- RNA_def_property_ui_text(prop, "Properties", "Properties in the struct.");
+ RNA_def_property_ui_text(prop, "Properties", "Properties in the struct");
prop= RNA_def_property(srna, "functions", PROP_COLLECTION, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
@@ -860,15 +917,6 @@ static void rna_def_property(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem type_items[] = {
- {PROP_BOOLEAN, "BOOLEAN", 0, "Boolean", ""},
- {PROP_INT, "INT", 0, "Integer", ""},
- {PROP_FLOAT, "FLOAT", 0, "Float", ""},
- {PROP_STRING, "STRING", 0, "String", ""},
- {PROP_ENUM, "ENUM", 0, "Enumeration", ""},
- {PROP_POINTER, "POINTER", 0, "Pointer", ""},
- {PROP_COLLECTION, "COLLECTION", 0, "Collection", ""},
- {0, NULL, 0, NULL, NULL}};
static EnumPropertyItem subtype_items[] = {
{PROP_NONE, "NONE", 0, "None", ""},
{PROP_FILEPATH, "FILE_PATH", 0, "File Path", ""},
@@ -890,91 +938,81 @@ static void rna_def_property(BlenderRNA *brna)
{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", ""},
- {PROP_UNIT_LENGTH, "LENGTH", 0, "Length", ""},
- {PROP_UNIT_AREA, "AREA", 0, "Area", ""},
- {PROP_UNIT_VOLUME, "VOLUME", 0, "Volume", ""},
- {PROP_UNIT_ROTATION, "ROTATION", 0, "Rotation", ""},
- {PROP_UNIT_TIME, "TIME", 0, "Time", ""},
- {PROP_UNIT_VELOCITY, "VELOCITY", 0, "Velocity", ""},
- {PROP_UNIT_ACCELERATION, "ACCELERATION", 0, "Acceleration", ""},
- {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "Property", NULL);
- RNA_def_struct_ui_text(srna, "Property Definition", "RNA property definition.");
+ RNA_def_struct_ui_text(srna, "Property Definition", "RNA property definition");
RNA_def_struct_refine_func(srna, "rna_Property_refine");
RNA_def_struct_ui_icon(srna, ICON_RNA);
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_string_funcs(prop, "rna_Property_name_get", "rna_Property_name_length", NULL);
- RNA_def_property_ui_text(prop, "Name", "Human readable name.");
+ RNA_def_property_ui_text(prop, "Name", "Human readable name");
prop= RNA_def_property(srna, "identifier", PROP_STRING, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_string_funcs(prop, "rna_Property_identifier_get", "rna_Property_identifier_length", NULL);
- RNA_def_property_ui_text(prop, "Identifier", "Unique name used in the code and scripting.");
+ RNA_def_property_ui_text(prop, "Identifier", "Unique name used in the code and scripting");
RNA_def_struct_name_property(srna, prop);
prop= RNA_def_property(srna, "description", PROP_STRING, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_string_funcs(prop, "rna_Property_description_get", "rna_Property_description_length", NULL);
- RNA_def_property_ui_text(prop, "Description", "Description of the property for tooltips.");
+ RNA_def_property_ui_text(prop, "Description", "Description of the property for tooltips");
prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_enum_items(prop, type_items);
+ RNA_def_property_enum_items(prop, property_type_items);
RNA_def_property_enum_funcs(prop, "rna_Property_type_get", NULL, NULL);
- RNA_def_property_ui_text(prop, "Type", "Data type of the property.");
+ RNA_def_property_ui_text(prop, "Type", "Data type of the property");
prop= RNA_def_property(srna, "subtype", PROP_ENUM, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_enum_items(prop, subtype_items);
RNA_def_property_enum_funcs(prop, "rna_Property_subtype_get", NULL, NULL);
- RNA_def_property_ui_text(prop, "Subtype", "Semantic interpretation of the property.");
+ RNA_def_property_ui_text(prop, "Subtype", "Semantic interpretation of the property");
prop= RNA_def_property(srna, "srna", PROP_POINTER, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_struct_type(prop, "Struct");
RNA_def_property_pointer_funcs(prop, "rna_Property_srna_get", NULL, NULL);
- RNA_def_property_ui_text(prop, "Base", "Struct definition used for properties assigned to this item.");
+ RNA_def_property_ui_text(prop, "Base", "Struct definition used for properties assigned to this item");
prop= RNA_def_property(srna, "unit", PROP_ENUM, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_enum_items(prop, unit_items);
+ RNA_def_property_enum_items(prop, property_unit_items);
RNA_def_property_enum_funcs(prop, "rna_Property_unit_get", NULL, NULL);
- RNA_def_property_ui_text(prop, "Unit", "Type of units for this property.");
+ RNA_def_property_ui_text(prop, "Unit", "Type of units for this property");
prop= RNA_def_property(srna, "is_readonly", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_funcs(prop, "rna_Property_readonly_get", NULL);
- RNA_def_property_ui_text(prop, "Read Only", "Property is editable through RNA.");
+ RNA_def_property_ui_text(prop, "Read Only", "Property is editable through RNA");
prop= RNA_def_property(srna, "is_required", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_funcs(prop, "rna_Property_is_required_get", NULL);
- RNA_def_property_ui_text(prop, "Required", "False when this property is an optional argument in an rna function.");
+ RNA_def_property_ui_text(prop, "Required", "False when this property is an optional argument in an rna function");
prop= RNA_def_property(srna, "is_never_none", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_funcs(prop, "rna_Property_is_never_none_get", NULL);
- RNA_def_property_ui_text(prop, "Never None", "True when this value can't be set to None.");
+ RNA_def_property_ui_text(prop, "Never None", "True when this value can't be set to None");
- prop= RNA_def_property(srna, "use_return", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "use_output", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_boolean_funcs(prop, "rna_Property_use_return_get", NULL);
- RNA_def_property_ui_text(prop, "Return", "True when this property is a return value from an rna function.");
+ RNA_def_property_boolean_funcs(prop, "rna_Property_use_output_get", NULL);
+ RNA_def_property_ui_text(prop, "Return", "True when this property is an output value from an rna function");
prop= RNA_def_property(srna, "registered", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_funcs(prop, "rna_Property_registered_get", NULL);
- RNA_def_property_ui_text(prop, "Registered", "Property is registerd as part of type registration.");
+ RNA_def_property_ui_text(prop, "Registered", "Property is registerd as part of type registration");
prop= RNA_def_property(srna, "registered_optional", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_funcs(prop, "rna_Property_registered_optional_get", NULL);
- RNA_def_property_ui_text(prop, "Registered Optionally", "Property is optionally registerd as part of type registration.");
+ RNA_def_property_ui_text(prop, "Registered Optionally", "Property is optionally registerd as part of type registration");
}
static void rna_def_function(BlenderRNA *brna)
@@ -989,29 +1027,29 @@ static void rna_def_function(BlenderRNA *brna)
prop= RNA_def_property(srna, "identifier", PROP_STRING, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_string_funcs(prop, "rna_Function_identifier_get", "rna_Function_identifier_length", NULL);
- RNA_def_property_ui_text(prop, "Identifier", "Unique name used in the code and scripting.");
+ RNA_def_property_ui_text(prop, "Identifier", "Unique name used in the code and scripting");
RNA_def_struct_name_property(srna, prop);
prop= RNA_def_property(srna, "description", PROP_STRING, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_string_funcs(prop, "rna_Function_description_get", "rna_Function_description_length", NULL);
- RNA_def_property_ui_text(prop, "Description", "Description of the Function's purpose.");
+ RNA_def_property_ui_text(prop, "Description", "Description of the Function's purpose");
prop= RNA_def_property(srna, "parameters", PROP_COLLECTION, PROP_NONE);
/*RNA_def_property_clear_flag(prop, PROP_EDITABLE);*/
RNA_def_property_struct_type(prop, "Property");
RNA_def_property_collection_funcs(prop, "rna_Function_parameters_begin", "rna_iterator_listbase_next", "rna_iterator_listbase_end", "rna_iterator_listbase_get", 0, 0, 0);
- RNA_def_property_ui_text(prop, "Parameters", "Parameters for the function.");
+ RNA_def_property_ui_text(prop, "Parameters", "Parameters for the function");
prop= RNA_def_property(srna, "registered", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_funcs(prop, "rna_Function_registered_get", NULL);
- RNA_def_property_ui_text(prop, "Registered", "Function is registerd as callback as part of type registration.");
+ RNA_def_property_ui_text(prop, "Registered", "Function is registerd as callback as part of type registration");
prop= RNA_def_property(srna, "registered_optional", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_funcs(prop, "rna_Function_registered_optional_get", NULL);
- RNA_def_property_ui_text(prop, "Registered Optionally", "Function is optionally registerd as callback part of type registration.");
+ RNA_def_property_ui_text(prop, "Registered Optionally", "Function is optionally registerd as callback part of type registration");
}
static void rna_def_number_property(StructRNA *srna, PropertyType type)
@@ -1062,7 +1100,7 @@ static void rna_def_number_property(StructRNA *srna, PropertyType type)
prop= RNA_def_property(srna, "array_length", PROP_INT, PROP_UNSIGNED);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_int_funcs(prop, "rna_Property_array_length_get", NULL, NULL);
- RNA_def_property_ui_text(prop, "Array Length", "Maximum length of the array, 0 means unlimited.");
+ RNA_def_property_ui_text(prop, "Array Length", "Maximum length of the array, 0 means unlimited");
if(type == PROP_BOOLEAN)
return;
@@ -1071,37 +1109,37 @@ static void rna_def_number_property(StructRNA *srna, PropertyType type)
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
if(type == PROP_INT) RNA_def_property_int_funcs(prop, "rna_IntProperty_hard_min_get", NULL, NULL);
else RNA_def_property_float_funcs(prop, "rna_FloatProperty_hard_min_get", NULL, NULL);
- RNA_def_property_ui_text(prop, "Hard Minimum", "Minimum value used by buttons.");
+ RNA_def_property_ui_text(prop, "Hard Minimum", "Minimum value used by buttons");
prop= RNA_def_property(srna, "hard_max", type, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
if(type == PROP_INT) RNA_def_property_int_funcs(prop, "rna_IntProperty_hard_max_get", NULL, NULL);
else RNA_def_property_float_funcs(prop, "rna_FloatProperty_hard_max_get", NULL, NULL);
- RNA_def_property_ui_text(prop, "Hard Maximum", "Maximum value used by buttons.");
+ RNA_def_property_ui_text(prop, "Hard Maximum", "Maximum value used by buttons");
prop= RNA_def_property(srna, "soft_min", type, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
if(type == PROP_INT) RNA_def_property_int_funcs(prop, "rna_IntProperty_soft_min_get", NULL, NULL);
else RNA_def_property_float_funcs(prop, "rna_FloatProperty_soft_min_get", NULL, NULL);
- RNA_def_property_ui_text(prop, "Soft Minimum", "Minimum value used by buttons.");
+ RNA_def_property_ui_text(prop, "Soft Minimum", "Minimum value used by buttons");
prop= RNA_def_property(srna, "soft_max", type, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
if(type == PROP_INT) RNA_def_property_int_funcs(prop, "rna_IntProperty_soft_max_get", NULL, NULL);
else RNA_def_property_float_funcs(prop, "rna_FloatProperty_soft_max_get", NULL, NULL);
- RNA_def_property_ui_text(prop, "Soft Maximum", "Maximum value used by buttons.");
+ RNA_def_property_ui_text(prop, "Soft Maximum", "Maximum value used by buttons");
prop= RNA_def_property(srna, "step", type, PROP_UNSIGNED);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
if(type == PROP_INT) RNA_def_property_int_funcs(prop, "rna_IntProperty_step_get", NULL, NULL);
else RNA_def_property_float_funcs(prop, "rna_FloatProperty_step_get", NULL, NULL);
- RNA_def_property_ui_text(prop, "Step", "Step size used by number buttons, for floats 1/100th of the step size.");
+ RNA_def_property_ui_text(prop, "Step", "Step size used by number buttons, for floats 1/100th of the step size");
if(type == PROP_FLOAT) {
prop= RNA_def_property(srna, "precision", PROP_INT, PROP_UNSIGNED);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_int_funcs(prop, "rna_FloatProperty_precision_get", NULL, NULL);
- RNA_def_property_ui_text(prop, "Precision", "Number of digits after the dot used by buttons.");
+ RNA_def_property_ui_text(prop, "Precision", "Number of digits after the dot used by buttons");
}
}
@@ -1112,12 +1150,12 @@ static void rna_def_string_property(StructRNA *srna)
prop= RNA_def_property(srna, "default", PROP_STRING, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_string_funcs(prop, "rna_StringProperty_default_get", "rna_StringProperty_default_length", NULL);
- RNA_def_property_ui_text(prop, "Default", "string default value.");
+ RNA_def_property_ui_text(prop, "Default", "string default value");
prop= RNA_def_property(srna, "max_length", PROP_INT, PROP_UNSIGNED);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_int_funcs(prop, "rna_StringProperty_max_length_get", NULL, NULL);
- RNA_def_property_ui_text(prop, "Maximum Length", "Maximum length of the string, 0 means unlimited.");
+ RNA_def_property_ui_text(prop, "Maximum Length", "Maximum length of the string, 0 means unlimited");
}
static void rna_def_enum_property(BlenderRNA *brna, StructRNA *srna)
@@ -1139,32 +1177,32 @@ static void rna_def_enum_property(BlenderRNA *brna, StructRNA *srna)
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_struct_type(prop, "EnumPropertyItem");
RNA_def_property_collection_funcs(prop, "rna_EnumProperty_items_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", 0, 0, 0);
- RNA_def_property_ui_text(prop, "Items", "Possible values for the property.");
+ RNA_def_property_ui_text(prop, "Items", "Possible values for the property");
srna= RNA_def_struct(brna, "EnumPropertyItem", NULL);
- RNA_def_struct_ui_text(srna, "Enum Item Definition", "Definition of a choice in an RNA enum property.");
+ RNA_def_struct_ui_text(srna, "Enum Item Definition", "Definition of a choice in an RNA enum property");
RNA_def_struct_ui_icon(srna, ICON_RNA);
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_string_funcs(prop, "rna_EnumPropertyItem_name_get", "rna_EnumPropertyItem_name_length", NULL);
- RNA_def_property_ui_text(prop, "Name", "Human readable name.");
+ RNA_def_property_ui_text(prop, "Name", "Human readable name");
prop= RNA_def_property(srna, "description", PROP_STRING, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_string_funcs(prop, "rna_EnumPropertyItem_description_get", "rna_EnumPropertyItem_description_length", NULL);
- RNA_def_property_ui_text(prop, "Description", "Description of the item's purpose.");
+ RNA_def_property_ui_text(prop, "Description", "Description of the item's purpose");
prop= RNA_def_property(srna, "identifier", PROP_STRING, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_string_funcs(prop, "rna_EnumPropertyItem_identifier_get", "rna_EnumPropertyItem_identifier_length", NULL);
- RNA_def_property_ui_text(prop, "Identifier", "Unique name used in the code and scripting.");
+ RNA_def_property_ui_text(prop, "Identifier", "Unique name used in the code and scripting");
RNA_def_struct_name_property(srna, prop);
prop= RNA_def_property(srna, "value", PROP_INT, PROP_UNSIGNED);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_int_funcs(prop, "rna_EnumPropertyItem_value_get", NULL, NULL);
- RNA_def_property_ui_text(prop, "Value", "Value of the item.");
+ RNA_def_property_ui_text(prop, "Value", "Value of the item");
}
static void rna_def_pointer_property(StructRNA *srna, PropertyType type)
@@ -1178,7 +1216,7 @@ static void rna_def_pointer_property(StructRNA *srna, PropertyType type)
RNA_def_property_pointer_funcs(prop, "rna_PointerProperty_fixed_type_get", NULL, NULL);
else
RNA_def_property_pointer_funcs(prop, "rna_CollectionProperty_fixed_type_get", NULL, NULL);
- RNA_def_property_ui_text(prop, "Pointer Type", "Fixed pointer type, empty if variable type.");
+ RNA_def_property_ui_text(prop, "Pointer Type", "Fixed pointer type, empty if variable type");
}
void RNA_def_rna(BlenderRNA *brna)
@@ -1194,37 +1232,37 @@ void RNA_def_rna(BlenderRNA *brna)
/* BooleanProperty */
srna= RNA_def_struct(brna, "BooleanProperty", "Property");
- RNA_def_struct_ui_text(srna, "Boolean Definition", "RNA boolean property definition.");
+ RNA_def_struct_ui_text(srna, "Boolean Definition", "RNA boolean property definition");
rna_def_number_property(srna, PROP_BOOLEAN);
/* IntProperty */
srna= RNA_def_struct(brna, "IntProperty", "Property");
- RNA_def_struct_ui_text(srna, "Int Definition", "RNA integer number property definition.");
+ RNA_def_struct_ui_text(srna, "Int Definition", "RNA integer number property definition");
rna_def_number_property(srna, PROP_INT);
/* FloatProperty */
srna= RNA_def_struct(brna, "FloatProperty", "Property");
- RNA_def_struct_ui_text(srna, "Float Definition", "RNA floating pointer number property definition.");
+ RNA_def_struct_ui_text(srna, "Float Definition", "RNA floating pointer number property definition");
rna_def_number_property(srna, PROP_FLOAT);
/* StringProperty */
srna= RNA_def_struct(brna, "StringProperty", "Property");
- RNA_def_struct_ui_text(srna, "String Definition", "RNA text string property definition.");
+ RNA_def_struct_ui_text(srna, "String Definition", "RNA text string property definition");
rna_def_string_property(srna);
/* EnumProperty */
srna= RNA_def_struct(brna, "EnumProperty", "Property");
- RNA_def_struct_ui_text(srna, "Enum Definition", "RNA enumeration property definition, to choose from a number of predefined options.");
+ RNA_def_struct_ui_text(srna, "Enum Definition", "RNA enumeration property definition, to choose from a number of predefined options");
rna_def_enum_property(brna, srna);
/* PointerProperty */
srna= RNA_def_struct(brna, "PointerProperty", "Property");
- RNA_def_struct_ui_text(srna, "Pointer Definition", "RNA pointer property to point to another RNA struct.");
+ RNA_def_struct_ui_text(srna, "Pointer Definition", "RNA pointer property to point to another RNA struct");
rna_def_pointer_property(srna, PROP_POINTER);
/* CollectionProperty */
srna= RNA_def_struct(brna, "CollectionProperty", "Property");
- RNA_def_struct_ui_text(srna, "Collection Definition", "RNA collection property to define lists, arrays and mappings.");
+ RNA_def_struct_ui_text(srna, "Collection Definition", "RNA collection property to define lists, arrays and mappings");
rna_def_pointer_property(srna, PROP_COLLECTION);
/* Function */
@@ -1232,13 +1270,20 @@ void RNA_def_rna(BlenderRNA *brna)
/* Blender RNA */
srna= RNA_def_struct(brna, "BlenderRNA", NULL);
- RNA_def_struct_ui_text(srna, "Blender RNA", "Blender RNA structure definitions.");
+ RNA_def_struct_ui_text(srna, "Blender RNA", "Blender RNA structure definitions");
RNA_def_struct_ui_icon(srna, ICON_RNA);
prop= RNA_def_property(srna, "structs", PROP_COLLECTION, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_struct_type(prop, "Struct");
- RNA_def_property_collection_funcs(prop, "rna_BlenderRNA_structs_begin", "rna_iterator_listbase_next", "rna_iterator_listbase_end", "rna_iterator_listbase_get", 0, 0, 0);
+ RNA_def_property_collection_funcs(prop, "rna_BlenderRNA_structs_begin", "rna_iterator_listbase_next", "rna_iterator_listbase_end", "rna_iterator_listbase_get",
+ /* included for speed, can be removed */
+#if 0
+ 0,0,0);
+#else
+ "rna_BlenderRNA_structs_length", "rna_BlenderRNA_structs_lookup_int", "rna_BlenderRNA_structs_lookup_string");
+#endif
+
RNA_def_property_ui_text(prop, "Structs", "");
}
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 63628e0889d..523d36f5e7a 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -15,7 +15,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor(s): Blender Foundation (2008).
*
@@ -29,6 +29,8 @@
#include "rna_internal.h"
+#include "DNA_group_types.h"
+#include "DNA_modifier_types.h"
#include "DNA_scene_types.h"
#include "DNA_userdef_types.h"
@@ -49,12 +51,13 @@
#include "WM_types.h"
+#include "BLI_threads.h"
EnumPropertyItem snap_target_items[] = {
- {SCE_SNAP_TARGET_CLOSEST, "CLOSEST", 0, "Closest", "Snap closest point onto target."},
- {SCE_SNAP_TARGET_CENTER, "CENTER", 0, "Center", "Snap center onto target."},
- {SCE_SNAP_TARGET_MEDIAN, "MEDIAN", 0, "Median", "Snap median onto target."},
- {SCE_SNAP_TARGET_ACTIVE, "ACTIVE", 0, "Active", "Snap active onto target."},
+ {SCE_SNAP_TARGET_CLOSEST, "CLOSEST", 0, "Closest", "Snap closest point onto target"},
+ {SCE_SNAP_TARGET_CENTER, "CENTER", 0, "Center", "Snap center onto target"},
+ {SCE_SNAP_TARGET_MEDIAN, "MEDIAN", 0, "Median", "Snap median onto target"},
+ {SCE_SNAP_TARGET_ACTIVE, "ACTIVE", 0, "Active", "Snap active onto target"},
{0, NULL, 0, NULL, NULL}};
EnumPropertyItem proportional_falloff_items[] ={
@@ -76,17 +79,17 @@ EnumPropertyItem proportional_editing_items[] = {
/* keep for operators, not used here */
EnumPropertyItem mesh_select_mode_items[] = {
- {SCE_SELECT_VERTEX, "VERTEX", ICON_VERTEXSEL, "Vertex", "Vertex selection mode."},
- {SCE_SELECT_EDGE, "EDGE", ICON_EDGESEL, "Edge", "Edge selection mode."},
- {SCE_SELECT_FACE, "FACE", ICON_FACESEL, "Face", "Face selection mode."},
+ {SCE_SELECT_VERTEX, "VERTEX", ICON_VERTEXSEL, "Vertex", "Vertex selection mode"},
+ {SCE_SELECT_EDGE, "EDGE", ICON_EDGESEL, "Edge", "Edge selection mode"},
+ {SCE_SELECT_FACE, "FACE", ICON_FACESEL, "Face", "Face selection mode"},
{0, NULL, 0, NULL, NULL}};
EnumPropertyItem snap_element_items[] = {
- {SCE_SNAP_MODE_INCREMENT, "INCREMENT", ICON_SNAP_INCREMENT, "Increment", "Snap to increments of grid."},
- {SCE_SNAP_MODE_VERTEX, "VERTEX", ICON_SNAP_VERTEX, "Vertex", "Snap to vertices."},
- {SCE_SNAP_MODE_EDGE, "EDGE", ICON_SNAP_EDGE, "Edge", "Snap to edges."},
- {SCE_SNAP_MODE_FACE, "FACE", ICON_SNAP_FACE, "Face", "Snap to faces."},
- {SCE_SNAP_MODE_VOLUME, "VOLUME", ICON_SNAP_VOLUME, "Volume", "Snap to volume."},
+ {SCE_SNAP_MODE_INCREMENT, "INCREMENT", ICON_SNAP_INCREMENT, "Increment", "Snap to increments of grid"},
+ {SCE_SNAP_MODE_VERTEX, "VERTEX", ICON_SNAP_VERTEX, "Vertex", "Snap to vertices"},
+ {SCE_SNAP_MODE_EDGE, "EDGE", ICON_SNAP_EDGE, "Edge", "Snap to edges"},
+ {SCE_SNAP_MODE_FACE, "FACE", ICON_SNAP_FACE, "Face", "Snap to faces"},
+ {SCE_SNAP_MODE_VOLUME, "VOLUME", ICON_SNAP_VOLUME, "Volume", "Snap to volume"},
{0, NULL, 0, NULL, NULL}};
#ifdef RNA_RUNTIME
@@ -106,6 +109,7 @@ EnumPropertyItem snap_element_items[] = {
#include "BKE_depsgraph.h"
#include "BKE_image.h"
#include "BKE_mesh.h"
+#include "BKE_sound.h"
#include "BLI_threads.h"
#include "BLI_editVert.h"
@@ -128,18 +132,18 @@ static PointerRNA rna_Scene_objects_get(CollectionPropertyIterator *iter)
return rna_pointer_inherit_refine(&iter->parent, &RNA_Object, ((Base*)internal->link)->object);
}
-static void rna_Scene_link_object(Scene *scene, ReportList *reports, Object *ob)
+static Base *rna_Scene_link_object(Scene *scene, ReportList *reports, Object *ob)
{
Base *base;
if (ob->type != OB_EMPTY && ob->data==NULL) {
BKE_reportf(reports, RPT_ERROR, "Object \"%s\" is not an Empty type and has no Object Data set.");
- return;
+ return NULL;
}
if (object_in_scene(ob, scene)) {
BKE_reportf(reports, RPT_ERROR, "Object \"%s\" is already in scene \"%s\".", ob->id.name+2, scene->id.name+2);
- return;
+ return NULL;
}
base= scene_add_base(scene, ob);
@@ -150,17 +154,30 @@ static void rna_Scene_link_object(Scene *scene, ReportList *reports, Object *ob)
ob->recalc |= OB_RECALC;
DAG_scene_sort(scene);
+
+ return base;
}
-static void rna_Scene_unlink_object(Scene *sce, ReportList *reports, Object *ob)
+static void rna_Scene_unlink_object(Scene *scene, bContext *C, ReportList *reports, Object *ob)
{
- Base *base= object_in_scene(ob, sce);
+ Base *base= object_in_scene(ob, scene);
if (!base) {
BKE_report(reports, RPT_ERROR, "Object is not in this scene.");
return;
}
+ if (base==scene->basact && ob->mode != OB_MODE_OBJECT) {
+ BKE_report(reports, RPT_ERROR, "Object must be in 'Object Mode' to unlink.");
+ return;
+ }
+
/* as long as ED_base_object_free_and_unlink calls free_libblock_us, we don't have to decrement ob->id.us */
- ED_base_object_free_and_unlink(sce, base);
+ ED_base_object_free_and_unlink(scene, base);
+
+ /* needed otherwise the depgraph will contain free'd objects which can crash, see [#20958] */
+ DAG_scene_sort(scene);
+ DAG_ids_flush_update(0);
+
+ WM_event_add_notifier(C, NC_SCENE|ND_OB_ACTIVE, scene);
}
static void rna_Scene_skgen_etch_template_set(PointerRNA *ptr, PointerRNA value)
@@ -215,10 +232,20 @@ static void rna_Scene_layer_update(Main *bmain, Scene *unused, PointerRNA *ptr)
ED_view3d_scene_layers_update(bmain, scene);
}
+static void rna_Scene_current_frame_set(PointerRNA *ptr, int value)
+{
+ Scene *data= (Scene*)ptr->data;
+
+ /* if negative frames aren't allowed, then we can't use them */
+ FRAMENUMBER_MIN_CLAMP(value);
+ data->r.cfra= value;
+}
+
static void rna_Scene_start_frame_set(PointerRNA *ptr, int value)
{
Scene *data= (Scene*)ptr->data;
- CLAMP(value, 1, data->r.efra);
+ /* MINFRAME not MINAFRAME, since some output formats can't taken negative frames */
+ CLAMP(value, MINFRAME, data->r.efra);
data->r.sfra= value;
}
@@ -229,28 +256,21 @@ static void rna_Scene_end_frame_set(PointerRNA *ptr, int value)
data->r.efra= value;
}
-static int rna_Scene_use_preview_range_get(PointerRNA *ptr)
-{
- Scene *data= (Scene*)ptr->data;
-
- /* this is simply overloaded to assume that preview-range
- * start frame cannot be less than 1 when on,
- * so psfra=0 means 'off'
- */
- return (data->r.psfra != 0);
-}
-
static void rna_Scene_use_preview_range_set(PointerRNA *ptr, int value)
{
Scene *data= (Scene*)ptr->data;
- /* if enable, copy range from render-range, otherwise just clear */
if (value) {
- data->r.psfra= data->r.sfra;
- data->r.pefra= data->r.efra;
+ /* copy range from scene if not set before */
+ if ((data->r.psfra == data->r.pefra) && (data->r.psfra == 0)) {
+ data->r.psfra= data->r.sfra;
+ data->r.pefra= data->r.efra;
+ }
+
+ data->r.flag |= SCER_PRV_RANGE;
}
else
- data->r.psfra= 0;
+ data->r.flag &= ~SCER_PRV_RANGE;
}
@@ -259,14 +279,14 @@ static void rna_Scene_preview_range_start_frame_set(PointerRNA *ptr, int value)
Scene *data= (Scene*)ptr->data;
/* check if enabled already */
- if (data->r.psfra == 0) {
+ if ((data->r.flag & SCER_PRV_RANGE) == 0) {
/* set end of preview range to end frame, then clamp as per normal */
// TODO: or just refuse to set instead?
data->r.pefra= data->r.efra;
}
/* now set normally */
- CLAMP(value, 1, data->r.pefra);
+ CLAMP(value, MINAFRAME, data->r.pefra);
data->r.psfra= value;
}
@@ -275,7 +295,7 @@ static void rna_Scene_preview_range_end_frame_set(PointerRNA *ptr, int value)
Scene *data= (Scene*)ptr->data;
/* check if enabled already */
- if (data->r.psfra == 0) {
+ if ((data->r.flag & SCER_PRV_RANGE) == 0) {
/* set start of preview range to start frame, then clamp as per normal */
// TODO: or just refuse to set instead?
data->r.psfra= data->r.sfra;
@@ -286,10 +306,11 @@ static void rna_Scene_preview_range_end_frame_set(PointerRNA *ptr, int value)
data->r.pefra= value;
}
-static void rna_Scene_frame_update(Main *bmain, Scene *unused, PointerRNA *ptr)
+static void rna_Scene_frame_update(bContext *C, PointerRNA *ptr)
{
//Scene *scene= ptr->id.data;
//ED_update_for_newframe(C);
+ sound_seek_scene(C);
}
static int rna_Scene_active_keying_set_editable(PointerRNA *ptr)
@@ -335,12 +356,12 @@ static void rna_Scene_active_keying_set_index_range(PointerRNA *ptr, int *min, i
}
-static char *rna_SceneRenderData_path(PointerRNA *ptr)
+static char *rna_RenderSettings_path(PointerRNA *ptr)
{
- return BLI_sprintfN("render_data");
+ return BLI_sprintfN("render");
}
-static int rna_SceneRenderData_threads_get(PointerRNA *ptr)
+static int rna_RenderSettings_threads_get(PointerRNA *ptr)
{
RenderData *rd= (RenderData*)ptr->data;
@@ -350,14 +371,23 @@ static int rna_SceneRenderData_threads_get(PointerRNA *ptr)
return BLI_system_thread_count();
}
-static int rna_SceneRenderData_save_buffers_get(PointerRNA *ptr)
+static int rna_RenderSettings_save_buffers_get(PointerRNA *ptr)
{
RenderData *rd= (RenderData*)ptr->data;
+ if(rd->mode & R_BORDER)
+ return 0;
+ else
+ return (rd->scemode & (R_EXR_TILE_FILE|R_FULL_SAMPLE)) != 0;
+}
- return (rd->scemode & (R_EXR_TILE_FILE|R_FULL_SAMPLE)) != 0;
+static int rna_RenderSettings_full_sample_get(PointerRNA *ptr)
+{
+ RenderData *rd= (RenderData*)ptr->data;
+
+ return (rd->scemode & R_FULL_SAMPLE) && !(rd->mode & R_BORDER);
}
-static void rna_SceneRenderData_file_format_set(PointerRNA *ptr, int value)
+static void rna_RenderSettings_file_format_set(PointerRNA *ptr, int value)
{
RenderData *rd= (RenderData*)ptr->data;
@@ -374,7 +404,7 @@ static int rna_SceneRender_file_ext_length(PointerRNA *ptr)
{
RenderData *rd= (RenderData*)ptr->data;
char ext[8];
-
+ ext[0]= '\0';
BKE_add_image_extension(ext, rd->imtype);
return strlen(ext);
}
@@ -385,7 +415,7 @@ static void rna_SceneRender_file_ext_get(PointerRNA *ptr, char *str)
BKE_add_image_extension(str, rd->imtype);
}
-void rna_SceneRenderData_jpeg2k_preset_update(RenderData *rd)
+void rna_RenderSettings_jpeg2k_preset_update(RenderData *rd)
{
rd->subimtype &= ~(R_JPEG2K_12BIT|R_JPEG2K_16BIT | R_JPEG2K_CINE_PRESET|R_JPEG2K_CINE_48FPS);
@@ -407,37 +437,37 @@ void rna_SceneRenderData_jpeg2k_preset_update(RenderData *rd)
}
#ifdef WITH_OPENJPEG
-static void rna_SceneRenderData_jpeg2k_preset_set(PointerRNA *ptr, int value)
+static void rna_RenderSettings_jpeg2k_preset_set(PointerRNA *ptr, int value)
{
RenderData *rd= (RenderData*)ptr->data;
rd->jp2_preset= value;
- rna_SceneRenderData_jpeg2k_preset_update(rd);
+ rna_RenderSettings_jpeg2k_preset_update(rd);
}
-static void rna_SceneRenderData_jpeg2k_depth_set(PointerRNA *ptr, int value)
+static void rna_RenderSettings_jpeg2k_depth_set(PointerRNA *ptr, int value)
{
RenderData *rd= (RenderData*)ptr->data;
rd->jp2_depth= value;
- rna_SceneRenderData_jpeg2k_preset_update(rd);
+ rna_RenderSettings_jpeg2k_preset_update(rd);
}
#endif
#ifdef WITH_QUICKTIME
-static int rna_SceneRenderData_qtcodecsettings_codecType_get(PointerRNA *ptr)
+static int rna_RenderSettings_qtcodecsettings_codecType_get(PointerRNA *ptr)
{
RenderData *rd= (RenderData*)ptr->data;
return quicktime_rnatmpvalue_from_codectype(rd->qtcodecsettings.codecType);
}
-static void rna_SceneRenderData_qtcodecsettings_codecType_set(PointerRNA *ptr, int value)
+static void rna_RenderSettings_qtcodecsettings_codecType_set(PointerRNA *ptr, int value)
{
RenderData *rd= (RenderData*)ptr->data;
rd->qtcodecsettings.codecType = quicktime_codecType_from_rnatmpvalue(value);
}
-static EnumPropertyItem *rna_SceneRenderData_qtcodecsettings_codecType_itemf(bContext *C, PointerRNA *ptr, int *free)
+static EnumPropertyItem *rna_RenderSettings_qtcodecsettings_codecType_itemf(bContext *C, PointerRNA *ptr, int *free)
{
EnumPropertyItem *item= NULL;
EnumPropertyItem tmp = {0, "", 0, "", ""};
@@ -464,19 +494,19 @@ static EnumPropertyItem *rna_SceneRenderData_qtcodecsettings_codecType_itemf(bCo
}
#endif
-static int rna_SceneRenderData_active_layer_index_get(PointerRNA *ptr)
+static int rna_RenderSettings_active_layer_index_get(PointerRNA *ptr)
{
RenderData *rd= (RenderData*)ptr->data;
return rd->actlay;
}
-static void rna_SceneRenderData_active_layer_index_set(PointerRNA *ptr, int value)
+static void rna_RenderSettings_active_layer_index_set(PointerRNA *ptr, int value)
{
RenderData *rd= (RenderData*)ptr->data;
rd->actlay= value;
}
-static void rna_SceneRenderData_active_layer_index_range(PointerRNA *ptr, int *min, int *max)
+static void rna_RenderSettings_active_layer_index_range(PointerRNA *ptr, int *min, int *max)
{
RenderData *rd= (RenderData*)ptr->data;
@@ -485,7 +515,7 @@ static void rna_SceneRenderData_active_layer_index_range(PointerRNA *ptr, int *m
*max= MAX2(0, *max);
}
-static void rna_SceneRenderData_engine_set(PointerRNA *ptr, int value)
+static void rna_RenderSettings_engine_set(PointerRNA *ptr, int value)
{
RenderData *rd= (RenderData*)ptr->data;
RenderEngineType *type= BLI_findlink(&R_engines, value);
@@ -494,7 +524,7 @@ static void rna_SceneRenderData_engine_set(PointerRNA *ptr, int value)
BLI_strncpy(rd->engine, type->idname, sizeof(rd->engine));
}
-static EnumPropertyItem *rna_SceneRenderData_engine_itemf(bContext *C, PointerRNA *ptr, int *free)
+static EnumPropertyItem *rna_RenderSettings_engine_itemf(bContext *C, PointerRNA *ptr, int *free)
{
RenderEngineType *type;
EnumPropertyItem *item= NULL;
@@ -514,7 +544,7 @@ static EnumPropertyItem *rna_SceneRenderData_engine_itemf(bContext *C, PointerRN
return item;
}
-static int rna_SceneRenderData_engine_get(PointerRNA *ptr)
+static int rna_RenderSettings_engine_get(PointerRNA *ptr)
{
RenderData *rd= (RenderData*)ptr->data;
RenderEngineType *type;
@@ -527,10 +557,24 @@ static int rna_SceneRenderData_engine_get(PointerRNA *ptr)
return 0;
}
-static void rna_SceneRenderData_color_management_update(Main *bmain, Scene *unused, PointerRNA *ptr)
+static void rna_RenderSettings_color_management_update(Main *bmain, Scene *unused, PointerRNA *ptr)
{
- /* reset all generated image block buffers to prevent out-of-date conversions */
- BKE_image_free_image_ibufs();
+ /* reset image nodes */
+ Scene *scene= (Scene*)ptr->id.data;
+ bNodeTree *ntree=scene->nodetree;
+ bNode *node;
+
+ if(ntree && scene->use_nodes) {
+ for (node=ntree->nodes.first; node; node=node->next) {
+ if (ELEM(node->type, CMP_NODE_VIEWER, CMP_NODE_IMAGE)) {
+ ED_node_changed_update(&scene->id, node);
+ WM_main_add_notifier(NC_NODE|NA_EDITED, node);
+
+ if (node->type == CMP_NODE_IMAGE)
+ BKE_image_signal((Image *)node->id, NULL, IMA_SIGNAL_RELOAD);
+ }
+ }
+ }
}
static void rna_SceneRenderLayer_name_set(PointerRNA *ptr, const char *value)
@@ -553,12 +597,12 @@ static void rna_SceneRenderLayer_name_set(PointerRNA *ptr, const char *value)
}
}
-static int rna_SceneRenderData_multiple_engines_get(PointerRNA *ptr)
+static int rna_RenderSettings_multiple_engines_get(PointerRNA *ptr)
{
return (BLI_countlist(&R_engines) > 1);
}
-static int rna_SceneRenderData_use_game_engine_get(PointerRNA *ptr)
+static int rna_RenderSettings_use_game_engine_get(PointerRNA *ptr)
{
RenderData *rd= (RenderData*)ptr->data;
RenderEngineType *type;
@@ -608,13 +652,15 @@ static void rna_Scene_editmesh_select_mode_set(PointerRNA *ptr, const int *value
ToolSettings *ts = (ToolSettings*)ptr->data;
int flag = (value[0] ? SCE_SELECT_VERTEX:0) | (value[1] ? SCE_SELECT_EDGE:0) | (value[2] ? SCE_SELECT_FACE:0);
- ts->selectmode = flag;
+ if(flag) {
+ ts->selectmode = flag;
- if(scene->basact) {
- Mesh *me= get_mesh(scene->basact->object);
- if(me && me->edit_btmesh && me->edit_btmesh->selectmode != flag) {
- me->edit_btmesh->selectmode= flag;
- EDBM_selectmode_set(me->edit_btmesh);
+ if(scene->basact) {
+ Mesh *me= get_mesh(scene->basact->object);
+ if(me && me->edit_btmesh && me->edit_btmesh->selectmode != flag) {
+ me->edit_btmesh->selectmode= flag;
+ EDBM_selectmode_set(me->edit_btmesh);
+ }
}
}
}
@@ -630,7 +676,60 @@ static void rna_Scene_editmesh_select_mode_update(Main *bmain, Scene *scene, Poi
}
WM_main_add_notifier(NC_GEOM|ND_SELECT, me);
- WM_main_add_notifier(NC_SCENE|ND_MODE, NULL); /* header redraw */
+ WM_main_add_notifier(NC_SCENE|ND_TOOLSETTINGS, NULL);
+}
+
+static void object_simplify_update(Object *ob)
+{
+ ModifierData *md;
+
+ for(md=ob->modifiers.first; md; md=md->next)
+ if(ELEM3(md->type, eModifierType_Subsurf, eModifierType_Multires, eModifierType_ParticleSystem))
+ ob->recalc |= OB_RECALC_DATA;
+
+ if(ob->dup_group) {
+ GroupObject *gob;
+
+ for(gob=ob->dup_group->gobject.first; gob; gob=gob->next)
+ object_simplify_update(gob->ob);
+ }
+}
+
+static void rna_Scene_simplify_update(Main *bmain, Scene *scene, PointerRNA *ptr)
+{
+ Base *base;
+
+ for(base= scene->base.first; base; base= base->next)
+ object_simplify_update(base->object);
+
+ DAG_ids_flush_update(0);
+ WM_main_add_notifier(NC_GEOM|ND_DATA, NULL);
+}
+
+static int rna_Scene_sync_mode_get(PointerRNA *ptr)
+{
+ Scene *scene= (Scene*)ptr->data;
+ if(scene->audio.flag & AUDIO_SYNC)
+ return AUDIO_SYNC;
+ return scene->flag & SCE_FRAME_DROP;
+}
+
+static void rna_Scene_sync_mode_set(PointerRNA *ptr, int value)
+{
+ Scene *scene= (Scene*)ptr->data;
+
+ if(value == AUDIO_SYNC)
+ scene->audio.flag |= AUDIO_SYNC;
+ else if(value == SCE_FRAME_DROP)
+ {
+ scene->audio.flag &= ~AUDIO_SYNC;
+ scene->flag |= SCE_FRAME_DROP;
+ }
+ else
+ {
+ scene->audio.flag &= ~AUDIO_SYNC;
+ scene->flag &= ~SCE_FRAME_DROP;
+ }
}
#else
@@ -661,10 +760,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_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"},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem auto_key_items[] = {
@@ -673,16 +772,24 @@ static void rna_def_tool_settings(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem retarget_roll_items[] = {
- {SK_RETARGET_ROLL_NONE, "NONE", 0, "None", "Don't adjust roll."},
- {SK_RETARGET_ROLL_VIEW, "VIEW", 0, "View", "Roll bones to face the view."},
- {SK_RETARGET_ROLL_JOINT, "JOINT", 0, "Joint", "Roll bone to original joint plane offset."},
+ {SK_RETARGET_ROLL_NONE, "NONE", 0, "None", "Don't adjust roll"},
+ {SK_RETARGET_ROLL_VIEW, "VIEW", 0, "View", "Roll bones to face the view"},
+ {SK_RETARGET_ROLL_JOINT, "JOINT", 0, "Joint", "Roll bone to original joint plane offset"},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem sketch_convert_items[] = {
- {SK_CONVERT_CUT_FIXED, "FIXED", 0, "Fixed", "Subdivide stroke in fixed number of bones."},
- {SK_CONVERT_CUT_LENGTH, "LENGTH", 0, "Length", "Subdivide stroke in bones of specific length."},
- {SK_CONVERT_CUT_ADAPTATIVE, "ADAPTIVE", 0, "Adaptive", "Subdivide stroke adaptively, with more subdivision in curvier parts."},
- {SK_CONVERT_RETARGET, "RETARGET", 0, "Retarget", "Retarget template bone chain to stroke."},
+ {SK_CONVERT_CUT_FIXED, "FIXED", 0, "Fixed", "Subdivide stroke in fixed number of bones"},
+ {SK_CONVERT_CUT_LENGTH, "LENGTH", 0, "Length", "Subdivide stroke in bones of specific length"},
+ {SK_CONVERT_CUT_ADAPTATIVE, "ADAPTIVE", 0, "Adaptive", "Subdivide stroke adaptively, with more subdivision in curvier parts"},
+ {SK_CONVERT_RETARGET, "RETARGET", 0, "Retarget", "Retarget template bone chain to stroke"},
+ {0, NULL, 0, NULL, NULL}};
+
+ static EnumPropertyItem edge_tag_items[] = {
+ {EDGE_MODE_SELECT, "SELECT", 0, "Select", ""},
+ {EDGE_MODE_TAG_SEAM, "SEAM", 0, "Tag Seam", ""},
+ {EDGE_MODE_TAG_SHARP, "SHARP", 0, "Tag Sharp", ""},
+ {EDGE_MODE_TAG_CREASE, "CREASE", 0, "Tag Crease", ""},
+ {EDGE_MODE_TAG_BEVEL, "BEVEL", 0, "Tag Bevel", ""},
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "ToolSettings", NULL);
@@ -718,64 +825,64 @@ static void rna_def_tool_settings(BlenderRNA *brna)
prop= RNA_def_property(srna, "proportional_editing", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "proportional");
RNA_def_property_enum_items(prop, proportional_editing_items);
- RNA_def_property_ui_text(prop, "Proportional Editing", "Proportional editing mode.");
- RNA_def_property_update(prop, NC_SCENE|ND_MODE, NULL); /* header redraw */
+ RNA_def_property_ui_text(prop, "Proportional Editing", "Proportional editing mode");
+ RNA_def_property_update(prop, NC_SCENE|ND_TOOLSETTINGS, NULL); /* header redraw */
prop= RNA_def_property(srna, "proportional_editing_falloff", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "prop_mode");
RNA_def_property_enum_items(prop, proportional_falloff_items);
- RNA_def_property_ui_text(prop, "Proportional Editing Falloff", "Falloff type for proportional editing mode.");
- RNA_def_property_update(prop, NC_SCENE|ND_MODE, NULL); /* header redraw */
+ RNA_def_property_ui_text(prop, "Proportional Editing Falloff", "Falloff type for proportional editing mode");
+ RNA_def_property_update(prop, NC_SCENE|ND_TOOLSETTINGS, NULL); /* header redraw */
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_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_ui_range(prop, 0.01, 10.0, 10.0, 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.");
+ RNA_def_property_ui_text(prop, "AutoMerge Editing", "Automatically merge vertices moved to the same location");
prop= RNA_def_property(srna, "snap", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "snap_flag", SCE_SNAP);
- RNA_def_property_ui_text(prop, "Snap", "Snap during transform.");
+ RNA_def_property_ui_text(prop, "Snap", "Snap during transform");
RNA_def_property_ui_icon(prop, ICON_SNAP_OFF, 1);
- RNA_def_property_update(prop, NC_SCENE|ND_MODE, NULL); /* header redraw */
+ RNA_def_property_update(prop, NC_SCENE|ND_TOOLSETTINGS, NULL); /* header redraw */
prop= RNA_def_property(srna, "snap_align_rotation", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "snap_flag", SCE_SNAP_ROTATE);
- RNA_def_property_ui_text(prop, "Snap Align Rotation", "Align rotation with the snapping target.");
+ RNA_def_property_ui_text(prop, "Snap Align Rotation", "Align rotation with the snapping target");
RNA_def_property_ui_icon(prop, ICON_SNAP_NORMAL, 0);
- RNA_def_property_update(prop, NC_SCENE|ND_MODE, NULL); /* header redraw */
+ RNA_def_property_update(prop, NC_SCENE|ND_TOOLSETTINGS, NULL); /* header redraw */
prop= RNA_def_property(srna, "snap_element", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "snap_mode");
RNA_def_property_enum_items(prop, snap_element_items);
- RNA_def_property_ui_text(prop, "Snap Element", "Type of element to snap to.");
- RNA_def_property_update(prop, NC_SCENE|ND_MODE, NULL); /* header redraw */
+ RNA_def_property_ui_text(prop, "Snap Element", "Type of element to snap to");
+ RNA_def_property_update(prop, NC_SCENE|ND_TOOLSETTINGS, NULL); /* header redraw */
prop= RNA_def_property(srna, "snap_target", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "snap_target");
RNA_def_property_enum_items(prop, snap_target_items);
- RNA_def_property_ui_text(prop, "Snap Target", "Which part to snap onto the target.");
- RNA_def_property_update(prop, NC_SCENE|ND_MODE, NULL); /* header redraw */
+ RNA_def_property_ui_text(prop, "Snap Target", "Which part to snap onto the target");
+ RNA_def_property_update(prop, NC_SCENE|ND_TOOLSETTINGS, NULL); /* header redraw */
prop= RNA_def_property(srna, "snap_peel_object", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "snap_flag", SCE_SNAP_PEEL_OBJECT);
- RNA_def_property_ui_text(prop, "Snap Peel Object", "Consider objects as whole when finding volume center.");
+ RNA_def_property_ui_text(prop, "Snap Peel Object", "Consider objects as whole when finding volume center");
RNA_def_property_ui_icon(prop, ICON_SNAP_PEEL_OBJECT, 0);
- RNA_def_property_update(prop, NC_SCENE|ND_MODE, NULL); /* header redraw */
+ RNA_def_property_update(prop, NC_SCENE|ND_TOOLSETTINGS, NULL); /* header redraw */
prop= RNA_def_property(srna, "snap_project", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "snap_flag", SCE_SNAP_PROJECT);
- RNA_def_property_ui_text(prop, "Project Individual Elements", "DOC_BROKEN");
+ RNA_def_property_ui_text(prop, "Project Individual Elements", "Project vertices on the surface of other objects");
RNA_def_property_ui_icon(prop, ICON_RETOPO, 0);
- RNA_def_property_update(prop, NC_SCENE|ND_MODE, NULL); /* header redraw */
+ RNA_def_property_update(prop, NC_SCENE|ND_TOOLSETTINGS, NULL); /* header redraw */
/* Auto Keying */
- prop= RNA_def_property(srna, "enable_auto_key", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "use_auto_keying", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "autokey_mode", AUTOKEY_ON);
RNA_def_property_ui_text(prop, "Auto Keying", "Automatic keyframe insertion for Objects and Bones");
@@ -786,24 +893,24 @@ static void rna_def_tool_settings(BlenderRNA *brna)
prop= RNA_def_property(srna, "record_with_nla", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "autokey_flag", ANIMRECORD_FLAG_WITHNLA);
- RNA_def_property_ui_text(prop, "Layered", "Add a new NLA Track + Strip for every loop/pass made over the animation to allow non-destructive tweaking.");
+ RNA_def_property_ui_text(prop, "Layered", "Add a new NLA Track + Strip for every loop/pass made over the animation to allow non-destructive tweaking");
/* UV */
prop= RNA_def_property(srna, "uv_selection_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "uv_selectmode");
RNA_def_property_enum_items(prop, uv_select_mode_items);
- RNA_def_property_ui_text(prop, "UV Selection Mode", "UV selection and display mode.");
+ RNA_def_property_ui_text(prop, "UV Selection Mode", "UV selection and display mode");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
prop= RNA_def_property(srna, "uv_sync_selection", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uv_flag", UV_SYNC_SELECTION);
- RNA_def_property_ui_text(prop, "UV Sync Selection", "Keep UV and edit mode mesh selection in sync.");
+ RNA_def_property_ui_text(prop, "UV Sync Selection", "Keep UV and edit mode mesh selection in sync");
RNA_def_property_ui_icon(prop, ICON_EDIT, 0);
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
prop= RNA_def_property(srna, "uv_local_view", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uv_flag", UV_SHOW_SAME_IMAGE);
- RNA_def_property_ui_text(prop, "UV Local View", "Draw only faces with the currently displayed image assigned.");
+ RNA_def_property_ui_text(prop, "UV Local View", "Draw only faces with the currently displayed image assigned");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
/* Mesh */
@@ -811,11 +918,18 @@ static void rna_def_tool_settings(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "selectmode", 1);
RNA_def_property_array(prop, 3);
RNA_def_property_boolean_funcs(prop, NULL, "rna_Scene_editmesh_select_mode_set");
+ RNA_def_property_ui_text(prop, "Mesh Selection Mode", "Which mesh elements selection works on");
RNA_def_property_update(prop, 0, "rna_Scene_editmesh_select_mode_update");
prop= RNA_def_property(srna, "vertex_group_weight", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "vgroup_weight");
- RNA_def_property_ui_text(prop, "Vertex Group Weight", "Weight to assign in vertex groups.");
+ RNA_def_property_ui_text(prop, "Vertex Group Weight", "Weight to assign in vertex groups");
+
+ /* use with MESH_OT_select_shortest_path */
+ prop= RNA_def_property(srna, "edge_path_mode", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "edge_mode");
+ RNA_def_property_enum_items(prop, edge_tag_items);
+ RNA_def_property_ui_text(prop, "Edge Tag Mode", "The edge flag to tag when selecting the shortest path");
/* etch-a-ton */
prop= RNA_def_property(srna, "bone_sketching", PROP_BOOLEAN, PROP_NONE);
@@ -848,37 +962,37 @@ static void rna_def_tool_settings(BlenderRNA *brna)
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_struct_type(prop, "Object");
RNA_def_property_pointer_funcs(prop, NULL, "rna_Scene_skgen_etch_template_set", NULL);
- RNA_def_property_ui_text(prop, "Template", "Template armature that will be retargeted to the stroke.");
+ RNA_def_property_ui_text(prop, "Template", "Template armature that will be retargeted to the stroke");
prop= RNA_def_property(srna, "etch_subdivision_number", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "skgen_subdivision_number");
RNA_def_property_range(prop, 1, 10000);
- RNA_def_property_ui_text(prop, "Subdivisions", "Number of bones in the subdivided stroke.");
+ RNA_def_property_ui_text(prop, "Subdivisions", "Number of bones in the subdivided stroke");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
prop= RNA_def_property(srna, "etch_adaptive_limit", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "skgen_correlation_limit");
RNA_def_property_range(prop, 0.00001, 1.0);
RNA_def_property_ui_range(prop, 0.01, 1.0, 0.01, 2);
- RNA_def_property_ui_text(prop, "Limit", "Number of bones in the subdivided stroke.");
+ RNA_def_property_ui_text(prop, "Limit", "Number of bones in the subdivided stroke");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
prop= RNA_def_property(srna, "etch_length_limit", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "skgen_length_limit");
RNA_def_property_range(prop, 0.00001, 100000.0);
RNA_def_property_ui_range(prop, 0.001, 100.0, 0.1, 3);
- RNA_def_property_ui_text(prop, "Length", "Number of bones in the subdivided stroke.");
+ RNA_def_property_ui_text(prop, "Length", "Number of bones in the subdivided stroke");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
prop= RNA_def_property(srna, "etch_roll_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "skgen_retarget_roll");
RNA_def_property_enum_items(prop, retarget_roll_items);
- RNA_def_property_ui_text(prop, "Retarget roll mode", "Method used to adjust the roll of bones when retargeting.");
+ RNA_def_property_ui_text(prop, "Retarget roll mode", "Method used to adjust the roll of bones when retargeting");
prop= RNA_def_property(srna, "etch_convert_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "bone_sketching_convert");
RNA_def_property_enum_items(prop, sketch_convert_items);
- RNA_def_property_ui_text(prop, "Stroke conversion method", "Method used to convert stroke to bones.");
+ RNA_def_property_ui_text(prop, "Stroke conversion method", "Method used to convert stroke to bones");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
}
@@ -893,6 +1007,11 @@ static void rna_def_unit_settings(BlenderRNA *brna)
{USER_UNIT_METRIC, "METRIC", 0, "Metric", ""},
{USER_UNIT_IMPERIAL, "IMPERIAL", 0, "Imperial", ""},
{0, NULL, 0, NULL, NULL}};
+
+ static EnumPropertyItem rotation_units[] = {
+ {0, "DEGREES", 0, "Degrees", ""},
+ {USER_UNIT_ROT_RADIANS, "RADIANS", 0, "Radians", ""},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "UnitSettings", NULL);
RNA_def_struct_ui_text(srna, "Unit Settings", "");
@@ -900,18 +1019,24 @@ static void rna_def_unit_settings(BlenderRNA *brna)
/* Units */
prop= RNA_def_property(srna, "system", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, unit_systems);
- RNA_def_property_ui_text(prop, "Unit System", "The unit system to use for button display.");
+ RNA_def_property_ui_text(prop, "Unit System", "The unit system to use for button display");
RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "scale_length", PROP_FLOAT, PROP_UNSIGNED);
- RNA_def_property_ui_text(prop, "Unit Scale", "Scale to use when converting between blender units and dimensions.");
+ RNA_def_property_ui_text(prop, "Unit Scale", "Scale to use when converting between blender units and dimensions");
RNA_def_property_range(prop, 0.00001, 100000.0);
RNA_def_property_ui_range(prop, 0.001, 100.0, 0.1, 3);
RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "use_separate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_UNIT_OPT_SPLIT);
- RNA_def_property_ui_text(prop, "Separate Units", "Display units in pairs.");
+ RNA_def_property_ui_text(prop, "Separate Units", "Display units in pairs");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
+
+ prop= RNA_def_property(srna, "rotation_units", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
+ RNA_def_property_enum_items(prop, rotation_units);
+ RNA_def_property_ui_text(prop, "Rotation Units", "Unit to use for displaying/editing rotation values");
RNA_def_property_update(prop, NC_WINDOW, NULL);
}
@@ -922,7 +1047,7 @@ void rna_def_render_layer_common(StructRNA *srna, int scene)
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
if(scene) RNA_def_property_string_funcs(prop, NULL, NULL, "rna_SceneRenderLayer_name_set");
else RNA_def_property_string_sdna(prop, NULL, "name");
- RNA_def_property_ui_text(prop, "Name", "Render layer name.");
+ RNA_def_property_ui_text(prop, "Name", "Render layer name");
RNA_def_struct_name_property(srna, prop);
if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
@@ -931,7 +1056,7 @@ void rna_def_render_layer_common(StructRNA *srna, int scene)
RNA_def_property_pointer_sdna(prop, NULL, "mat_override");
RNA_def_property_struct_type(prop, "Material");
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Material Override", "Material to override all other materials in this render layer.");
+ RNA_def_property_ui_text(prop, "Material Override", "Material to override all other materials in this render layer");
if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
@@ -939,7 +1064,7 @@ void rna_def_render_layer_common(StructRNA *srna, int scene)
RNA_def_property_pointer_sdna(prop, NULL, "light_override");
RNA_def_property_struct_type(prop, "Group");
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Light Override", "Group to override all other lights in this render layer.");
+ RNA_def_property_ui_text(prop, "Light Override", "Group to override all other lights in this render layer");
if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
@@ -947,7 +1072,7 @@ void rna_def_render_layer_common(StructRNA *srna, int scene)
prop= RNA_def_property(srna, "visible_layers", PROP_BOOLEAN, PROP_LAYER_MEMBER);
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.");
+ RNA_def_property_ui_text(prop, "Visible Layers", "Scene layers included in this render layer");
if(scene) RNA_def_property_boolean_funcs(prop, NULL, "rna_SceneRenderLayer_layer_set");
else RNA_def_property_boolean_funcs(prop, NULL, "rna_RenderLayer_layer_set");
if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
@@ -956,183 +1081,219 @@ void rna_def_render_layer_common(StructRNA *srna, int scene)
prop= RNA_def_property(srna, "zmask_layers", PROP_BOOLEAN, PROP_LAYER);
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.");
+ RNA_def_property_ui_text(prop, "Zmask Layers", "Zmask scene layers");
if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
/* layer options */
prop= RNA_def_property(srna, "enabled", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "layflag", SCE_LAY_DISABLE);
- RNA_def_property_ui_text(prop, "Enabled", "Disable or enable the render layer.");
+ RNA_def_property_ui_text(prop, "Enabled", "Disable or enable the render layer");
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", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_ZMASK);
- RNA_def_property_ui_text(prop, "Zmask", "Only render what's in front of the solid z values.");
+ RNA_def_property_ui_text(prop, "Zmask", "Only render what's in front of the solid z values");
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_negate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_NEG_ZMASK);
- RNA_def_property_ui_text(prop, "Zmask Negate", "For Zmask, only render what is behind solid z values instead of in front.");
+ RNA_def_property_ui_text(prop, "Zmask Negate", "For Zmask, only render what is behind solid z values instead of in front");
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, "all_z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_ALL_Z);
- RNA_def_property_ui_text(prop, "All Z", "Fill in Z values for solid faces in invisible layers, for masking.");
+ RNA_def_property_ui_text(prop, "All Z", "Fill in Z values for solid faces in invisible layers, for masking");
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, "solid", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_SOLID);
- RNA_def_property_ui_text(prop, "Solid", "Render Solid faces in this Layer.");
+ RNA_def_property_ui_text(prop, "Solid", "Render Solid faces in this Layer");
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, "halo", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_HALO);
- RNA_def_property_ui_text(prop, "Halo", "Render Halos in this Layer (on top of Solid).");
+ RNA_def_property_ui_text(prop, "Halo", "Render Halos in this Layer (on top of Solid)");
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, "ztransp", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_ZTRA);
- RNA_def_property_ui_text(prop, "ZTransp", "Render Z-Transparent faces in this Layer (On top of Solid and Halos).");
+ RNA_def_property_ui_text(prop, "ZTransp", "Render Z-Transparent faces in this Layer (On top of Solid and Halos)");
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, "sky", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_SKY);
- RNA_def_property_ui_text(prop, "Sky", "Render Sky in this Layer.");
+ RNA_def_property_ui_text(prop, "Sky", "Render Sky in this Layer");
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, "edge", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_EDGE);
- RNA_def_property_ui_text(prop, "Edge", "Render Edge-enhance in this Layer (only works for Solid faces).");
+ RNA_def_property_ui_text(prop, "Edge", "Render Edge-enhance in this Layer (only works for Solid faces)");
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, "strand", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_STRAND);
- RNA_def_property_ui_text(prop, "Strand", "Render Strands in this Layer.");
+ RNA_def_property_ui_text(prop, "Strand", "Render Strands in this Layer");
if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
/* passes */
prop= RNA_def_property(srna, "pass_combined", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_COMBINED);
- RNA_def_property_ui_text(prop, "Combined", "Deliver full combined RGBA buffer.");
+ RNA_def_property_ui_text(prop, "Combined", "Deliver full combined RGBA buffer");
if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop= RNA_def_property(srna, "pass_z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_Z);
- RNA_def_property_ui_text(prop, "Z", "Deliver Z values pass.");
+ RNA_def_property_ui_text(prop, "Z", "Deliver Z values pass");
if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop= RNA_def_property(srna, "pass_vector", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_VECTOR);
- RNA_def_property_ui_text(prop, "Vector", "Deliver speed vector pass.");
+ RNA_def_property_ui_text(prop, "Vector", "Deliver speed vector pass");
if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop= RNA_def_property(srna, "pass_normal", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_NORMAL);
- RNA_def_property_ui_text(prop, "Normal", "Deliver normal pass.");
+ RNA_def_property_ui_text(prop, "Normal", "Deliver normal pass");
if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop= RNA_def_property(srna, "pass_uv", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_UV);
- RNA_def_property_ui_text(prop, "UV", "Deliver texture UV pass.");
+ RNA_def_property_ui_text(prop, "UV", "Deliver texture UV pass");
if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop= RNA_def_property(srna, "pass_mist", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_MIST);
- RNA_def_property_ui_text(prop, "Mist", "Deliver mist factor pass (0.0-1.0).");
+ RNA_def_property_ui_text(prop, "Mist", "Deliver mist factor pass (0.0-1.0)");
if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop= RNA_def_property(srna, "pass_object_index", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_INDEXOB);
- RNA_def_property_ui_text(prop, "Object Index", "Deliver object index pass.");
+ RNA_def_property_ui_text(prop, "Object Index", "Deliver object index pass");
if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop= RNA_def_property(srna, "pass_color", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_RGBA);
- RNA_def_property_ui_text(prop, "Color", "Deliver shade-less color pass.");
+ RNA_def_property_ui_text(prop, "Color", "Deliver shade-less color pass");
if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop= RNA_def_property(srna, "pass_diffuse", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_DIFFUSE);
- RNA_def_property_ui_text(prop, "Diffuse", "Deliver diffuse pass.");
+ RNA_def_property_ui_text(prop, "Diffuse", "Deliver diffuse pass");
if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop= RNA_def_property(srna, "pass_specular", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_SPEC);
- RNA_def_property_ui_text(prop, "Specular", "Deliver specular pass.");
+ RNA_def_property_ui_text(prop, "Specular", "Deliver specular pass");
if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop= RNA_def_property(srna, "pass_shadow", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_SHADOW);
- RNA_def_property_ui_text(prop, "Shadow", "Deliver shadow pass.");
+ RNA_def_property_ui_text(prop, "Shadow", "Deliver shadow pass");
if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop= RNA_def_property(srna, "pass_ao", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_AO);
- RNA_def_property_ui_text(prop, "AO", "Deliver AO pass.");
+ RNA_def_property_ui_text(prop, "AO", "Deliver AO pass");
if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop= RNA_def_property(srna, "pass_reflection", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_REFLECT);
- RNA_def_property_ui_text(prop, "Reflection", "Deliver raytraced reflection pass.");
+ RNA_def_property_ui_text(prop, "Reflection", "Deliver raytraced reflection pass");
if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop= RNA_def_property(srna, "pass_refraction", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_REFRACT);
- RNA_def_property_ui_text(prop, "Refraction", "Deliver raytraced refraction pass.");
+ RNA_def_property_ui_text(prop, "Refraction", "Deliver raytraced refraction pass");
+ if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+
+ prop= RNA_def_property(srna, "pass_emit", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_EMIT);
+ RNA_def_property_ui_text(prop, "Emit", "Deliver emission pass");
+ if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+
+ prop= RNA_def_property(srna, "pass_environment", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_ENVIRONMENT);
+ RNA_def_property_ui_text(prop, "Environment", "Deliver environment lighting pass");
+ if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+
+ prop= RNA_def_property(srna, "pass_indirect", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_INDIRECT);
+ RNA_def_property_ui_text(prop, "Indirect", "Deliver indirect lighting pass");
if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop= RNA_def_property(srna, "pass_specular_exclude", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_SPEC);
- RNA_def_property_ui_text(prop, "Specular Exclude", "Exclude specular pass from combined.");
+ RNA_def_property_ui_text(prop, "Specular Exclude", "Exclude specular pass from combined");
if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop= RNA_def_property(srna, "pass_shadow_exclude", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_SHADOW);
- RNA_def_property_ui_text(prop, "Shadow Exclude", "Exclude shadow pass from combined.");
+ RNA_def_property_ui_text(prop, "Shadow Exclude", "Exclude shadow pass from combined");
if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop= RNA_def_property(srna, "pass_ao_exclude", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_AO);
- RNA_def_property_ui_text(prop, "AO Exclude", "Exclude AO pass from combined.");
+ RNA_def_property_ui_text(prop, "AO Exclude", "Exclude AO pass from combined");
if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop= RNA_def_property(srna, "pass_reflection_exclude", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_REFLECT);
- RNA_def_property_ui_text(prop, "Reflection Exclude", "Exclude raytraced reflection pass from combined.");
+ RNA_def_property_ui_text(prop, "Reflection Exclude", "Exclude raytraced reflection pass from combined");
if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop= RNA_def_property(srna, "pass_refraction_exclude", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_REFRACT);
- RNA_def_property_ui_text(prop, "Refraction Exclude", "Exclude raytraced refraction pass from combined.");
+ RNA_def_property_ui_text(prop, "Refraction Exclude", "Exclude raytraced refraction pass from combined");
+ if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+
+ prop= RNA_def_property(srna, "pass_emit_exclude", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_EMIT);
+ RNA_def_property_ui_text(prop, "Emit Exclude", "Exclude emission pass from combined");
+ if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+
+ prop= RNA_def_property(srna, "pass_environment_exclude", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_ENVIRONMENT);
+ RNA_def_property_ui_text(prop, "Environment Exclude", "Exclude environment pass from combined");
+ if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+
+ prop= RNA_def_property(srna, "pass_indirect_exclude", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_INDIRECT);
+ RNA_def_property_ui_text(prop, "Indirect Exclude", "Exclude indirect pass from combined");
if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
}
@@ -1181,39 +1342,39 @@ static void rna_def_scene_game_data(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem material_items[] ={
- {GAME_MAT_TEXFACE, "TEXTURE_FACE", 0, "Texture Face", "Single texture face materials."},
- {GAME_MAT_MULTITEX, "MULTITEXTURE", 0, "Multitexture", "Multitexture materials."},
- {GAME_MAT_GLSL, "GLSL", 0, "GLSL", "OpenGL shading language shaders."},
+ {GAME_MAT_TEXFACE, "TEXTURE_FACE", 0, "Texture Face", "Single texture face materials"},
+ {GAME_MAT_MULTITEX, "MULTITEXTURE", 0, "Multitexture", "Multitexture materials"},
+ {GAME_MAT_GLSL, "GLSL", 0, "GLSL", "OpenGL shading language shaders"},
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "SceneGameData", NULL);
RNA_def_struct_sdna(srna, "GameData");
RNA_def_struct_nested(brna, srna, "Scene");
- RNA_def_struct_ui_text(srna, "Game Data", "Game data for a Scene datablock.");
+ RNA_def_struct_ui_text(srna, "Game Data", "Game data for a Scene datablock");
prop= RNA_def_property(srna, "resolution_x", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "xplay");
RNA_def_property_range(prop, 4, 10000);
- RNA_def_property_ui_text(prop, "Resolution X", "Number of horizontal pixels in the screen.");
+ RNA_def_property_ui_text(prop, "Resolution X", "Number of horizontal pixels in the screen");
RNA_def_property_update(prop, NC_SCENE, NULL);
prop= RNA_def_property(srna, "resolution_y", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "yplay");
RNA_def_property_range(prop, 4, 10000);
- RNA_def_property_ui_text(prop, "Resolution Y", "Number of vertical pixels in the screen.");
+ RNA_def_property_ui_text(prop, "Resolution Y", "Number of vertical pixels in the screen");
RNA_def_property_update(prop, NC_SCENE, NULL);
prop= RNA_def_property(srna, "depth", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "depth");
RNA_def_property_range(prop, 8, 32);
- RNA_def_property_ui_text(prop, "Bits", "Displays bit depth of full screen display.");
+ RNA_def_property_ui_text(prop, "Bits", "Displays bit depth of full screen display");
RNA_def_property_update(prop, NC_SCENE, NULL);
// Do we need it here ? (since we already have it in World
prop= RNA_def_property(srna, "frequency", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "freqplay");
RNA_def_property_range(prop, 4, 2000);
- RNA_def_property_ui_text(prop, "Freq", "Displays clock frequency of fullscreen display.");
+ RNA_def_property_ui_text(prop, "Freq", "Displays clock frequency of fullscreen display");
RNA_def_property_update(prop, NC_SCENE, NULL);
prop= RNA_def_property(srna, "fullscreen", PROP_BOOLEAN, PROP_NONE);
@@ -1225,7 +1386,7 @@ static void rna_def_scene_game_data(BlenderRNA *brna)
prop= RNA_def_property(srna, "framing_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "framing.type");
RNA_def_property_enum_items(prop, framing_types_items);
- RNA_def_property_ui_text(prop, "Framing Types", "Select the type of Framing you want.");
+ RNA_def_property_ui_text(prop, "Framing Types", "Select the type of Framing you want");
RNA_def_property_update(prop, NC_SCENE, NULL);
prop= RNA_def_property(srna, "framing_color", PROP_FLOAT, PROP_COLOR);
@@ -1295,13 +1456,13 @@ static void rna_def_scene_game_data(BlenderRNA *brna)
prop= RNA_def_property(srna, "physics_engine", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "physicsEngine");
RNA_def_property_enum_items(prop, physics_engine_items);
- RNA_def_property_ui_text(prop, "Physics Engine", "Physics engine used for physics simulation in the game engine.");
+ RNA_def_property_ui_text(prop, "Physics Engine", "Physics engine used for physics simulation in the game engine");
RNA_def_property_update(prop, NC_SCENE, NULL);
prop= RNA_def_property(srna, "physics_gravity", PROP_FLOAT, PROP_ACCELERATION);
RNA_def_property_float_sdna(prop, NULL, "gravity");
RNA_def_property_range(prop, 0.0, 25.0);
- RNA_def_property_ui_text(prop, "Physics Gravity", "Gravitational constant used for physics simulation in the game engine.");
+ RNA_def_property_ui_text(prop, "Physics Gravity", "Gravitational constant used for physics simulation in the game engine");
RNA_def_property_update(prop, NC_SCENE, NULL);
prop= RNA_def_property(srna, "occlusion_culling_resolution", PROP_FLOAT, PROP_NONE);
@@ -1314,7 +1475,7 @@ static void rna_def_scene_game_data(BlenderRNA *brna)
RNA_def_property_int_sdna(prop, NULL, "ticrate");
RNA_def_property_ui_range(prop, 1, 60, 1, 1);
RNA_def_property_range(prop, 1, 250);
- RNA_def_property_ui_text(prop, "Frames Per Second", "The nominal number of game frames per second. Physics fixed timestep = 1/fps, independently of actual frame rate.");
+ RNA_def_property_ui_text(prop, "Frames Per Second", "The nominal number of game frames per second. Physics fixed timestep = 1/fps, independently of actual frame rate");
RNA_def_property_update(prop, NC_SCENE, NULL);
prop= RNA_def_property(srna, "logic_step_max", PROP_INT, PROP_NONE);
@@ -1342,88 +1503,83 @@ static void rna_def_scene_game_data(BlenderRNA *brna)
prop= RNA_def_property(srna, "use_occlusion_culling", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", (1 << 5)); //XXX mode hardcoded // WO_DBVT_CULLING
RNA_def_property_ui_text(prop, "DBVT culling", "Use optimized Bullet DBVT tree for view frustrum and occlusion culling");
- RNA_def_property_update(prop, NC_SCENE, NULL);
// not used // deprecated !!!!!!!!!!!!!
prop= RNA_def_property(srna, "activity_culling", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", (1 << 3)); //XXX mode hardcoded
RNA_def_property_ui_text(prop, "Activity Culling", "Activity culling is enabled");
- RNA_def_property_update(prop, NC_SCENE, NULL);
// not used // deprecated !!!!!!!!!!!!!
prop= RNA_def_property(srna, "activity_culling_box_radius", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "activityBoxRadius");
RNA_def_property_range(prop, 0.0, 1000.0);
RNA_def_property_ui_text(prop, "box radius", "Radius of the activity bubble, in Manhattan length. Objects outside the box are activity-culled");
- RNA_def_property_update(prop, NC_SCENE, NULL);
/* booleans */
- prop= RNA_def_property(srna, "all_frames", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", GAME_ENABLE_ALL_FRAMES);
- RNA_def_property_ui_text(prop, "All Frames", "Render as many frames as possible, rather than respecting framerate.");
- RNA_def_property_update(prop, NC_SCENE, NULL);
-
prop= RNA_def_property(srna, "show_debug_properties", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", GAME_SHOW_DEBUG_PROPS);
- RNA_def_property_ui_text(prop, "Show Debug Properties", "Show properties marked for debugging while the game runs.");
- RNA_def_property_update(prop, NC_SCENE, NULL);
+ RNA_def_property_ui_text(prop, "Show Debug Properties", "Show properties marked for debugging while the game runs");
prop= RNA_def_property(srna, "show_framerate_profile", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", GAME_SHOW_FRAMERATE);
- RNA_def_property_ui_text(prop, "Show Framerate and Profile", "Show framerate and profiling information while the game runs.");
- RNA_def_property_update(prop, NC_SCENE, NULL);
+ RNA_def_property_ui_text(prop, "Show Framerate and Profile", "Show framerate and profiling information while the game runs");
prop= RNA_def_property(srna, "show_physics_visualization", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", GAME_SHOW_PHYSICS);
- RNA_def_property_ui_text(prop, "Show Physics Visualization", "Show a visualization of physics bounds and interactions.");
- RNA_def_property_update(prop, NC_SCENE, NULL);
+ RNA_def_property_ui_text(prop, "Show Physics Visualization", "Show a visualization of physics bounds and interactions");
- prop= RNA_def_property(srna, "display_lists", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "use_frame_rate", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_ENABLE_ALL_FRAMES);
+ RNA_def_property_ui_text(prop, "Use Frame Rate", "Respect the frame rate rather then rendering as many frames as possible");
+
+ prop= RNA_def_property(srna, "use_display_lists", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", GAME_DISPLAY_LISTS);
- RNA_def_property_ui_text(prop, "Display Lists", "Use display lists to speed up rendering by keeping geometry on the GPU.");
- RNA_def_property_update(prop, NC_SCENE, NULL);
+ RNA_def_property_ui_text(prop, "Display Lists", "Use display lists to speed up rendering by keeping geometry on the GPU");
- prop= RNA_def_property(srna, "deprecation_warnings", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "use_deprecation_warnings", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_IGNORE_DEPRECATION_WARNINGS);
- RNA_def_property_ui_text(prop, "Deprecation Warnings", "Print warnings when using deprecated features in the python API.");
- RNA_def_property_update(prop, NC_SCENE, NULL);
+ RNA_def_property_ui_text(prop, "Deprecation Warnings", "Print warnings when using deprecated features in the python API");
+
+ prop= RNA_def_property(srna, "use_animation_record", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", GAME_ENABLE_ANIMATION_RECORD);
+ RNA_def_property_ui_text(prop, "Record Animation", "Record animation to fcurves");
/* materials */
prop= RNA_def_property(srna, "material_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "matmode");
RNA_def_property_enum_items(prop, material_items);
- RNA_def_property_ui_text(prop, "Material Mode", "Material mode to use for rendering.");
- RNA_def_property_update(prop, NC_SCENE, NULL);
+ RNA_def_property_ui_text(prop, "Material Mode", "Material mode to use for rendering");
+ RNA_def_property_update(prop, NC_SCENE|NA_EDITED, NULL);
prop= RNA_def_property(srna, "glsl_lights", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_GLSL_NO_LIGHTS);
- RNA_def_property_ui_text(prop, "GLSL Lights", "Use lights for GLSL rendering.");
- RNA_def_property_update(prop, NC_SCENE, NULL);
+ RNA_def_property_ui_text(prop, "GLSL Lights", "Use lights for GLSL rendering");
+ RNA_def_property_update(prop, NC_SCENE|NA_EDITED, NULL);
prop= RNA_def_property(srna, "glsl_shaders", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_GLSL_NO_SHADERS);
- RNA_def_property_ui_text(prop, "GLSL Shaders", "Use shaders for GLSL rendering.");
- RNA_def_property_update(prop, NC_SCENE, NULL);
+ RNA_def_property_ui_text(prop, "GLSL Shaders", "Use shaders for GLSL rendering");
+ RNA_def_property_update(prop, NC_SCENE|NA_EDITED, NULL);
prop= RNA_def_property(srna, "glsl_shadows", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_GLSL_NO_SHADOWS);
- RNA_def_property_ui_text(prop, "GLSL Shadows", "Use shadows for GLSL rendering.");
- RNA_def_property_update(prop, NC_SCENE, NULL);
+ RNA_def_property_ui_text(prop, "GLSL Shadows", "Use shadows for GLSL rendering");
+ RNA_def_property_update(prop, NC_SCENE|NA_EDITED, NULL);
prop= RNA_def_property(srna, "glsl_ramps", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_GLSL_NO_RAMPS);
- RNA_def_property_ui_text(prop, "GLSL Ramps", "Use ramps for GLSL rendering.");
- RNA_def_property_update(prop, NC_SCENE, NULL);
+ RNA_def_property_ui_text(prop, "GLSL Ramps", "Use ramps for GLSL rendering");
+ RNA_def_property_update(prop, NC_SCENE|NA_EDITED, NULL);
prop= RNA_def_property(srna, "glsl_nodes", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_GLSL_NO_NODES);
- RNA_def_property_ui_text(prop, "GLSL Nodes", "Use nodes for GLSL rendering.");
- RNA_def_property_update(prop, NC_SCENE, NULL);
+ RNA_def_property_ui_text(prop, "GLSL Nodes", "Use nodes for GLSL rendering");
+ RNA_def_property_update(prop, NC_SCENE|NA_EDITED, NULL);
prop= RNA_def_property(srna, "glsl_extra_textures", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_GLSL_NO_EXTRA_TEX);
- RNA_def_property_ui_text(prop, "GLSL Extra Textures", "Use extra textures like normal or specular maps for GLSL rendering.");
- RNA_def_property_update(prop, NC_SCENE, NULL);
+ RNA_def_property_ui_text(prop, "GLSL Extra Textures", "Use extra textures like normal or specular maps for GLSL rendering");
+ RNA_def_property_update(prop, NC_SCENE|NA_EDITED, NULL);
}
static void rna_def_scene_render_layer(BlenderRNA *brna)
@@ -1431,7 +1587,7 @@ static void rna_def_scene_render_layer(BlenderRNA *brna)
StructRNA *srna;
srna= RNA_def_struct(brna, "SceneRenderLayer", NULL);
- RNA_def_struct_ui_text(srna, "Scene Render Layer", "Render layer.");
+ RNA_def_struct_ui_text(srna, "Scene Render Layer", "Render layer");
rna_def_render_layer_common(srna, 1);
}
@@ -1508,7 +1664,7 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
static EnumPropertyItem raytrace_structure_items[] = {
{R_RAYSTRUCTURE_AUTO, "AUTO", 0, "Auto", ""},
- {R_RAYSTRUCTURE_OCTREE, "OCTREE", 0, "Octree", "Use old Octree structure."},
+ {R_RAYSTRUCTURE_OCTREE, "OCTREE", 0, "Octree", "Use old Octree structure"},
{R_RAYSTRUCTURE_BLIBVH, "BLIBVH", 0, "BLI BVH", "Use BLI K-Dop BVH.c"},
{R_RAYSTRUCTURE_VBVH, "VBVH", 0, "vBVH", ""},
{R_RAYSTRUCTURE_SIMD_SVBVH, "SIMD_SVBVH", 0, "SIMD SVBVH", ""},
@@ -1524,8 +1680,8 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem field_order_items[] = {
- {0, "FIELDS_EVENFIRST", 0, "Even", "Even Fields First"},
- {R_ODDFIELD, "FIELDS_ODDFIRST", 0, "Odd", "Odd Fields First"},
+ {0, "FIELDS_EVENFIRST", 0, "Upper First", "Upper field first"},
+ {R_ODDFIELD, "FIELDS_ODDFIRST", 0, "Lower First", "Lower field first"},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem threads_mode_items[] = {
@@ -1574,12 +1730,7 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
#ifdef WITH_FFMPEG
{R_H264, "H264", ICON_FILE_MOVIE, "H.264", ""},
{R_XVID, "XVID", ICON_FILE_MOVIE, "Xvid", ""},
- // XXX broken
-#if 0
-#ifdef WITH_OGG
{R_THEORA, "THEORA", ICON_FILE_MOVIE, "Ogg Theora", ""},
-#endif
-#endif
{R_FFMPEG, "FFMPEG", ICON_FILE_MOVIE, "FFMpeg", ""},
#endif
{R_FRAMESERVER, "FRAMESERVER", ICON_FILE_SCRIPT, "Frame Server", ""},
@@ -1630,16 +1781,15 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
{FFMPEG_DV, "DV", 0, "DV", ""},
{FFMPEG_H264, "H264", 0, "H.264", ""},
{FFMPEG_XVID, "XVID", 0, "Xvid", ""},
- // XXX broken
-#if 0
-#ifdef WITH_OGG
{FFMPEG_OGG, "OGG", 0, "Ogg", ""},
-#endif
-#endif
+ {FFMPEG_MKV, "MKV", 0, "Matroska", ""},
{FFMPEG_FLV, "FLASH", 0, "Flash", ""},
+ {FFMPEG_WAV, "WAV", 0, "Wav", ""},
+ {FFMPEG_MP3, "MP3", 0, "Mp3", ""},
{0, NULL, 0, NULL, NULL}};
-
+
static EnumPropertyItem ffmpeg_codec_items[] = {
+ {CODEC_ID_NONE, "NONE", 0, "None", ""},
{CODEC_ID_MPEG1VIDEO, "MPEG1", 0, "MPEG-1", ""},
{CODEC_ID_MPEG2VIDEO, "MPEG2", 0, "MPEG-2", ""},
{CODEC_ID_MPEG4, "MPEG4", 0, "MPEG-4(divx)", ""},
@@ -1647,18 +1797,19 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
{CODEC_ID_DVVIDEO, "DV", 0, "DV", ""},
{CODEC_ID_H264, "H264", 0, "H.264", ""},
{CODEC_ID_XVID, "XVID", 0, "Xvid", ""},
-#ifdef WITH_OGG
{CODEC_ID_THEORA, "THEORA", 0, "Theora", ""},
-#endif
{CODEC_ID_FLV1, "FLASH", 0, "Flash Video", ""},
+ {CODEC_ID_FFV1, "FFV1", 0, "FFmpeg video codec #1", ""},
{0, NULL, 0, NULL, NULL}};
-
+
static EnumPropertyItem ffmpeg_audio_codec_items[] = {
+ {CODEC_ID_NONE, "NONE", 0, "None", ""},
{CODEC_ID_MP2, "MP2", 0, "MP2", ""},
{CODEC_ID_MP3, "MP3", 0, "MP3", ""},
{CODEC_ID_AC3, "AC3", 0, "AC3", ""},
{CODEC_ID_AAC, "AAC", 0, "AAC", ""},
{CODEC_ID_VORBIS, "VORBIS", 0, "Vorbis", ""},
+ {CODEC_ID_FLAC, "FLAC", 0, "FLAC", ""},
{CODEC_ID_PCM_S16LE, "PCM", 0, "PCM", ""},
{0, NULL, 0, NULL, NULL}};
#endif
@@ -1667,11 +1818,11 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
{0, "BLENDER_RENDER", 0, "Blender Render", ""},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "SceneRenderData", NULL);
+ srna= RNA_def_struct(brna, "RenderSettings", NULL);
RNA_def_struct_sdna(srna, "RenderData");
RNA_def_struct_nested(brna, srna, "Scene");
- RNA_def_struct_path_func(srna, "rna_SceneRenderData_path");
- RNA_def_struct_ui_text(srna, "Render Data", "Rendering settings for a Scene datablock.");
+ RNA_def_struct_path_func(srna, "rna_RenderSettings_path");
+ RNA_def_struct_ui_text(srna, "Render Data", "Rendering settings for a Scene datablock");
prop= RNA_def_property(srna, "color_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "planes");
@@ -1682,13 +1833,13 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
prop= RNA_def_property(srna, "resolution_x", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "xsch");
RNA_def_property_range(prop, 4, 10000);
- RNA_def_property_ui_text(prop, "Resolution X", "Number of horizontal pixels in the rendered image.");
+ RNA_def_property_ui_text(prop, "Resolution X", "Number of horizontal pixels in the rendered image");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "resolution_y", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "ysch");
RNA_def_property_range(prop, 4, 10000);
- RNA_def_property_ui_text(prop, "Resolution Y", "Number of vertical pixels in the rendered image.");
+ RNA_def_property_ui_text(prop, "Resolution Y", "Number of vertical pixels in the rendered image");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "resolution_percentage", PROP_INT, PROP_PERCENTAGE);
@@ -1700,13 +1851,13 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
prop= RNA_def_property(srna, "parts_x", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "xparts");
RNA_def_property_range(prop, 1, 512);
- RNA_def_property_ui_text(prop, "Parts X", "Number of horizontal tiles to use while rendering.");
+ RNA_def_property_ui_text(prop, "Parts X", "Number of horizontal tiles to use while rendering");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "parts_y", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "yparts");
RNA_def_property_range(prop, 1, 512);
- RNA_def_property_ui_text(prop, "Parts Y", "Number of vertical tiles to use while rendering.");
+ RNA_def_property_ui_text(prop, "Parts Y", "Number of vertical tiles to use while rendering");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "pixel_aspect_x", PROP_FLOAT, PROP_NONE);
@@ -1726,7 +1877,7 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
prop= RNA_def_property(srna, "quality", PROP_INT, PROP_PERCENTAGE);
RNA_def_property_int_sdna(prop, NULL, "quality");
RNA_def_property_range(prop, 1, 100);
- RNA_def_property_ui_text(prop, "Quality", "Quality of JPEG images, AVI Jpeg and SGI movies.");
+ RNA_def_property_ui_text(prop, "Quality", "Quality of JPEG images, AVI Jpeg and SGI movies");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
/* Tiff */
@@ -1792,14 +1943,14 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
prop= RNA_def_property(srna, "jpeg2k_preset", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "jp2_preset");
RNA_def_property_enum_items(prop, jp2_preset_items);
- RNA_def_property_enum_funcs(prop, NULL, "rna_SceneRenderData_jpeg2k_preset_set", NULL);
+ RNA_def_property_enum_funcs(prop, NULL, "rna_RenderSettings_jpeg2k_preset_set", NULL);
RNA_def_property_ui_text(prop, "Preset", "Use a DCI Standard preset for saving jpeg2000");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "jpeg2k_depth", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "jp2_depth");
RNA_def_property_enum_items(prop, jp2_depth_items);
- RNA_def_property_enum_funcs(prop, NULL, "rna_SceneRenderData_jpeg2k_depth_set", NULL);
+ RNA_def_property_enum_funcs(prop, NULL, "rna_RenderSettings_jpeg2k_depth_set", NULL);
RNA_def_property_ui_text(prop, "Depth", "Bit depth per channel");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
@@ -1815,9 +1966,9 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
prop= RNA_def_property(srna, "quicktime_codec_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "qtcodecsettings.codecType");
RNA_def_property_enum_items(prop, quicktime_codec_type_items);
- RNA_def_property_enum_funcs(prop, "rna_SceneRenderData_qtcodecsettings_codecType_get",
- "rna_SceneRenderData_qtcodecsettings_codecType_set",
- "rna_SceneRenderData_qtcodecsettings_codecType_itemf");
+ RNA_def_property_enum_funcs(prop, "rna_RenderSettings_qtcodecsettings_codecType_get",
+ "rna_RenderSettings_qtcodecsettings_codecType_set",
+ "rna_RenderSettings_qtcodecsettings_codecType_itemf");
RNA_def_property_ui_text(prop, "Codec", "QuickTime codec type");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
@@ -1887,11 +2038,10 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
prop= RNA_def_property(srna, "ffmpeg_autosplit", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "ffcodecdata.flags", FFMPEG_AUTOSPLIT_OUTPUT);
- RNA_def_property_ui_text(prop, "Autosplit Output", "Autosplit output at 2GB boundary.");
+ RNA_def_property_ui_text(prop, "Autosplit Output", "Autosplit output at 2GB boundary");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
/* FFMPEG Audio*/
-
prop= RNA_def_property(srna, "ffmpeg_audio_codec", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "ffcodecdata.audio_codec");
RNA_def_property_enum_items(prop, ffmpeg_audio_codec_items);
@@ -1904,11 +2054,6 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Bitrate", "Audio bitrate(kb/s)");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "ffmpeg_multiplex_audio", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "ffcodecdata.flags", FFMPEG_MULTIPLEX_AUDIO);
- RNA_def_property_ui_text(prop, "Multiplex Audio", "Interleave audio with the output video");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
-
prop= RNA_def_property(srna, "ffmpeg_audio_mixrate", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "ffcodecdata.audio_mixrate");
RNA_def_property_range(prop, 8000, 192000);
@@ -1925,12 +2070,14 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
prop= RNA_def_property(srna, "fps", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "frs_sec");
+ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 1, 120);
- RNA_def_property_ui_text(prop, "FPS", "Framerate, expressed in frames per second.");
+ RNA_def_property_ui_text(prop, "FPS", "Framerate, expressed in frames per second");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "fps_base", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "frs_sec_base");
+ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 0.1f, 120.0f);
RNA_def_property_ui_text(prop, "FPS Base", "Framerate base");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
@@ -1938,63 +2085,63 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
prop= RNA_def_property(srna, "dither_intensity", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "dither_intensity");
RNA_def_property_range(prop, 0.0f, 2.0f);
- RNA_def_property_ui_text(prop, "Dither Intensity", "Amount of dithering noise added to the rendered image to break up banding.");
+ RNA_def_property_ui_text(prop, "Dither Intensity", "Amount of dithering noise added to the rendered image to break up banding");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "pixel_filter", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "filtertype");
RNA_def_property_enum_items(prop, pixel_filter_items);
- RNA_def_property_ui_text(prop, "Pixel Filter", "Reconstruction filter used for combining anti-aliasing samples.");
+ RNA_def_property_ui_text(prop, "Pixel Filter", "Reconstruction filter used for combining anti-aliasing samples");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "filter_size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "gauss");
RNA_def_property_range(prop, 0.5f, 1.5f);
- RNA_def_property_ui_text(prop, "Filter Size", "Pixel width over which the reconstruction filter combines samples.");
+ RNA_def_property_ui_text(prop, "Filter Size", "Pixel width over which the reconstruction filter combines samples");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "alpha_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "alphamode");
RNA_def_property_enum_items(prop, alpha_mode_items);
- RNA_def_property_ui_text(prop, "Alpha Mode", "Representation of alpha information in the RGBA pixels.");
+ RNA_def_property_ui_text(prop, "Alpha Mode", "Representation of alpha information in the RGBA pixels");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "octree_resolution", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "ocres");
RNA_def_property_enum_items(prop, octree_resolution_items);
- RNA_def_property_ui_text(prop, "Octree Resolution", "Resolution of raytrace accelerator. Use higher resolutions for larger scenes.");
+ RNA_def_property_ui_text(prop, "Octree Resolution", "Resolution of raytrace accelerator. Use higher resolutions for larger scenes");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "raytrace_structure", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "raytrace_structure");
RNA_def_property_enum_items(prop, raytrace_structure_items);
- RNA_def_property_ui_text(prop, "Raytrace Acceleration Structure", "Type of raytrace accelerator structure.");
+ RNA_def_property_ui_text(prop, "Raytrace Acceleration Structure", "Type of raytrace accelerator structure");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "use_instances", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "raytrace_options", R_RAYTRACE_USE_INSTANCES);
- RNA_def_property_ui_text(prop, "Use Instances", "Instance support leads to effective memory reduction when using duplicates.");
+ RNA_def_property_ui_text(prop, "Use Instances", "Instance support leads to effective memory reduction when using duplicates");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "use_local_coords", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "raytrace_options", R_RAYTRACE_USE_LOCAL_COORDS);
- RNA_def_property_ui_text(prop, "Use Local Coords", "Vertex coordinates are stored localy on each primitive. Increases memory usage, but may have impact on speed.");
+ RNA_def_property_ui_text(prop, "Use Local Coords", "Vertex coordinates are stored localy on each primitive. Increases memory usage, but may have impact on speed");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "antialiasing", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_OSA);
- RNA_def_property_ui_text(prop, "Anti-Aliasing", "Render and combine multiple samples per pixel to prevent jagged edges.");
+ RNA_def_property_ui_text(prop, "Anti-Aliasing", "Render and combine multiple samples per pixel to prevent jagged edges");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "antialiasing_samples", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "osa");
RNA_def_property_enum_items(prop, fixed_oversample_items);
- RNA_def_property_ui_text(prop, "Anti-Aliasing Samples", "Amount of anti-aliasing samples per pixel.");
+ RNA_def_property_ui_text(prop, "Anti-Aliasing Samples", "Amount of anti-aliasing samples per pixel");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "fields", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_FIELDS);
- RNA_def_property_ui_text(prop, "Fields", "Render image to two fields per frame, for interlaced TV output.");
+ RNA_def_property_ui_text(prop, "Fields", "Render image to two fields per frame, for interlaced TV output");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "field_order", PROP_ENUM, PROP_NONE);
@@ -2005,37 +2152,37 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
prop= RNA_def_property(srna, "fields_still", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_FIELDSTILL);
- RNA_def_property_ui_text(prop, "Fields Still", "Disable the time difference between fields.");
+ RNA_def_property_ui_text(prop, "Fields Still", "Disable the time difference between fields");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "render_shadows", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_SHADOW);
- RNA_def_property_ui_text(prop, "Render Shadows", "Calculate shadows while rendering.");
+ RNA_def_property_ui_text(prop, "Render Shadows", "Calculate shadows while rendering");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "render_envmaps", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_ENVMAP);
- RNA_def_property_ui_text(prop, "Render Environment Maps", "Calculate environment maps while rendering.");
+ RNA_def_property_ui_text(prop, "Render Environment Maps", "Calculate environment maps while rendering");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "render_radiosity", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_RADIO);
- RNA_def_property_ui_text(prop, "Render Radiosity", "Calculate radiosity in a pre-process before rendering.");
+ RNA_def_property_ui_text(prop, "Render Radiosity", "Calculate radiosity in a pre-process before rendering");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "render_sss", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_SSS);
- RNA_def_property_ui_text(prop, "Render SSS", "Calculate sub-surface scattering in materials rendering.");
+ RNA_def_property_ui_text(prop, "Render SSS", "Calculate sub-surface scattering in materials rendering");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "render_raytracing", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_RAYTRACE);
- RNA_def_property_ui_text(prop, "Render Raytracing", "Pre-calculate the raytrace accelerator and render raytracing effects.");
+ RNA_def_property_ui_text(prop, "Render Raytracing", "Pre-calculate the raytrace accelerator and render raytracing effects");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "render_textures", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "scemode", R_NO_TEX);
- RNA_def_property_ui_text(prop, "Render Textures", "Use textures to affect material properties.");
+ RNA_def_property_ui_text(prop, "Render Textures", "Use textures to affect material properties");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "edge", PROP_BOOLEAN, PROP_NONE);
@@ -2057,8 +2204,8 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
prop= RNA_def_property(srna, "threads", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "threads");
- RNA_def_property_range(prop, 1, 8);
- RNA_def_property_int_funcs(prop, "rna_SceneRenderData_threads_get", NULL, NULL);
+ RNA_def_property_range(prop, 1, BLENDER_MAX_THREADS);
+ RNA_def_property_int_funcs(prop, "rna_RenderSettings_threads_get", NULL, NULL);
RNA_def_property_ui_text(prop, "Threads", "Number of CPU threads to use simultaneously while rendering (for multi-core/CPU systems)");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
@@ -2070,18 +2217,24 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
prop= RNA_def_property(srna, "motion_blur", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_MBLUR);
- RNA_def_property_ui_text(prop, "Motion Blur", "Use multi-sampled 3D scene motion blur (uses number of anti-aliasing samples).");
+ RNA_def_property_ui_text(prop, "Motion Blur", "Use multi-sampled 3D scene motion blur");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "motion_blur_samples", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "mblur_samples");
+ RNA_def_property_range(prop, 1, 32);
+ RNA_def_property_ui_text(prop, "Motion Samples", "Number of scene samples to take with motion blur");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "use_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_ui_text(prop, "Border", "Render a user-defined border region, within the frame size. Note, this disables save_buffers and full_sample");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "border_min_x", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "border.xmin");
RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Border Minimum X", "Sets minimum X value to for the render border.");
+ RNA_def_property_ui_text(prop, "Border Minimum X", "Sets minimum X value to for the render border");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "border_min_y", PROP_FLOAT, PROP_NONE);
@@ -2104,33 +2257,33 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
prop= RNA_def_property(srna, "crop_to_border", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_CROP);
- RNA_def_property_ui_text(prop, "Crop to Border", "Crop the rendered frame to the defined border size.");
+ 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);
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_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.");
+ RNA_def_property_ui_text(prop, "Overwrite", "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);
RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_DOCOMP);
- RNA_def_property_ui_text(prop, "Compositing", "Process the render result through the compositing pipeline, if compositing nodes are enabled.");
+ RNA_def_property_ui_text(prop, "Compositing", "Process the render result through the compositing pipeline, if compositing nodes are enabled");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "use_sequencer", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_DOSEQ);
- RNA_def_property_ui_text(prop, "Sequencer", "Process the render (and composited) result through the video sequence editor pipeline, if sequencer strips exist.");
+ RNA_def_property_ui_text(prop, "Sequencer", "Process the render (and composited) result through the video sequence editor pipeline, if sequencer strips exist");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "color_management", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "color_mgt_flag", R_COLOR_MANAGEMENT);
RNA_def_property_ui_text(prop, "Color Management", "Use color profiles and gamma corrected imaging pipeline");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS|NC_MATERIAL|ND_SHADING, "rna_SceneRenderData_color_management_update");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS|NC_MATERIAL|ND_SHADING, "rna_RenderSettings_color_management_update");
prop= RNA_def_property(srna, "use_file_extension", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_EXTENSION);
@@ -2140,35 +2293,36 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
prop= RNA_def_property(srna, "file_format", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "imtype");
RNA_def_property_enum_items(prop, image_type_items);
- RNA_def_property_enum_funcs(prop, NULL, "rna_SceneRenderData_file_format_set", NULL);
- RNA_def_property_ui_text(prop, "File Format", "File format to save the rendered images as.");
+ RNA_def_property_enum_funcs(prop, NULL, "rna_RenderSettings_file_format_set", NULL);
+ RNA_def_property_ui_text(prop, "File Format", "File format to save the rendered images as");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "file_extension", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_SceneRender_file_ext_get", "rna_SceneRender_file_ext_length", NULL);
- RNA_def_property_ui_text(prop, "Extension", "The file extension used for saving renders.");
+ RNA_def_property_ui_text(prop, "Extension", "The file extension used for saving renders");
RNA_def_struct_name_property(srna, prop);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop= RNA_def_property(srna, "free_image_textures", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_FREE_IMAGE);
- RNA_def_property_ui_text(prop, "Free Image Textures", "Free all image texture from memory after render, to save memory before compositing.");
+ RNA_def_property_ui_text(prop, "Free Image Textures", "Free all image texture from memory after render, to save memory before compositing");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "free_unused_nodes", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_FREE_IMAGE);
- RNA_def_property_ui_text(prop, "Free Unused Nodes", "Free Nodes that are not used while compositing, to save memory.");
+ RNA_def_property_ui_text(prop, "Free Unused Nodes", "Free Nodes that are not used while compositing, to save memory");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "save_buffers", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_EXR_TILE_FILE);
- RNA_def_property_boolean_funcs(prop, "rna_SceneRenderData_save_buffers_get", NULL);
- RNA_def_property_ui_text(prop, "Save Buffers","Save tiles for all RenderLayers and SceneNodes to files in the temp directory (saves memory, required for Full Sample).");
+ RNA_def_property_boolean_funcs(prop, "rna_RenderSettings_save_buffers_get", NULL);
+ RNA_def_property_ui_text(prop, "Save Buffers","Save tiles for all RenderLayers and SceneNodes to files in the temp directory (saves memory, required for Full Sample)");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "full_sample", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_FULL_SAMPLE);
- RNA_def_property_ui_text(prop, "Full Sample","Save for every anti-aliasing sample the entire RenderLayer results. This solves anti-aliasing issues with compositing.");
+ RNA_def_property_boolean_funcs(prop, "rna_RenderSettings_full_sample_get", NULL);
+ RNA_def_property_ui_text(prop, "Full Sample","Save for every anti-aliasing sample the entire RenderLayer results. This solves anti-aliasing issues with compositing");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "backbuf", PROP_BOOLEAN, PROP_NONE);
@@ -2184,7 +2338,7 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
prop= RNA_def_property(srna, "output_path", PROP_STRING, PROP_DIRPATH);
RNA_def_property_string_sdna(prop, NULL, "pic");
- 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_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 */
@@ -2214,7 +2368,7 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
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", "With displacement normalize to the distance, with ambient occlusion normalize without using material settings.");
+ RNA_def_property_ui_text(prop, "Normalized", "With displacement normalize to the distance, with ambient occlusion normalize without using material settings");
prop= RNA_def_property(srna, "bake_clear", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "bake_flag", R_BAKE_CLEAR);
@@ -2311,7 +2465,7 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "fg_stamp");
RNA_def_property_array(prop, 4);
RNA_def_property_range(prop,0.0,1.0);
- RNA_def_property_ui_text(prop, "Stamp Foreground", "Stamp text color");
+ RNA_def_property_ui_text(prop, "Stamp Text Color", "Color to use for stamp text");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "stamp_background", PROP_FLOAT, PROP_COLOR);
@@ -2330,37 +2484,68 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
prop= RNA_def_property(srna, "single_layer", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_SINGLE_LAYER);
- RNA_def_property_ui_text(prop, "Single Layer", "Only render the active layer.");
+ RNA_def_property_ui_text(prop, "Single Layer", "Only render the active layer");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "active_layer_index", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "actlay");
- RNA_def_property_int_funcs(prop, "rna_SceneRenderData_active_layer_index_get", "rna_SceneRenderData_active_layer_index_set", "rna_SceneRenderData_active_layer_index_range");
- RNA_def_property_ui_text(prop, "Active Layer Index", "Active index in render layer array.");
+ RNA_def_property_int_funcs(prop, "rna_RenderSettings_active_layer_index_get", "rna_RenderSettings_active_layer_index_set", "rna_RenderSettings_active_layer_index_range");
+ RNA_def_property_ui_text(prop, "Active Layer Index", "Active index in render layer array");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
/* engine */
prop= RNA_def_property(srna, "engine", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, engine_items);
- RNA_def_property_enum_funcs(prop, "rna_SceneRenderData_engine_get", "rna_SceneRenderData_engine_set", "rna_SceneRenderData_engine_itemf");
- RNA_def_property_ui_text(prop, "Engine", "Engine to use for rendering.");
+ RNA_def_property_enum_funcs(prop, "rna_RenderSettings_engine_get", "rna_RenderSettings_engine_set", "rna_RenderSettings_engine_itemf");
+ RNA_def_property_ui_text(prop, "Engine", "Engine to use for rendering");
RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "multiple_engines", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_funcs(prop, "rna_SceneRenderData_multiple_engines_get", NULL);
+ RNA_def_property_boolean_funcs(prop, "rna_RenderSettings_multiple_engines_get", NULL);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Multiple Engines", "More than one rendering engine is available.");
+ RNA_def_property_ui_text(prop, "Multiple Engines", "More than one rendering engine is available");
prop= RNA_def_property(srna, "use_game_engine", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_funcs(prop, "rna_SceneRenderData_use_game_engine_get", NULL);
+ RNA_def_property_boolean_funcs(prop, "rna_RenderSettings_use_game_engine_get", NULL);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Use Game Engine", "Current rendering engine is a game engine.");
+ RNA_def_property_ui_text(prop, "Use Game Engine", "Current rendering engine is a game engine");
+
+ /* simplify */
+ prop= RNA_def_property(srna, "use_simplify", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "mode", R_SIMPLIFY);
+ RNA_def_property_ui_text(prop, "Use Simplify", "Enable simplification of scene for quicker preview renders");
+ RNA_def_property_update(prop, 0, "rna_Scene_simplify_update");
+
+ prop= RNA_def_property(srna, "simplify_subdivision", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "simplify_subsurf");
+ RNA_def_property_ui_range(prop, 0, 6, 1, 0);
+ RNA_def_property_ui_text(prop, "Simplify Subdivision", "Global maximum subdivision level");
+ RNA_def_property_update(prop, 0, "rna_Scene_simplify_update");
+
+ prop= RNA_def_property(srna, "simplify_child_particles", PROP_FLOAT, PROP_FACTOR);
+ RNA_def_property_float_sdna(prop, NULL, "simplify_particles");
+ RNA_def_property_ui_text(prop, "Simplify Child Particles", "Global child particles percentage");
+ RNA_def_property_update(prop, 0, "rna_Scene_simplify_update");
+
+ prop= RNA_def_property(srna, "simplify_shadow_samples", PROP_INT, PROP_UNSIGNED);
+ RNA_def_property_int_sdna(prop, NULL, "simplify_shadowsamples");
+ RNA_def_property_ui_range(prop, 1, 16, 1, 0);
+ RNA_def_property_ui_text(prop, "Simplify Shadow Samples", "Global maximum shadow samples");
+ RNA_def_property_update(prop, 0, "rna_Scene_simplify_update");
+
+ prop= RNA_def_property(srna, "simplify_ao_sss", PROP_FLOAT, PROP_FACTOR);
+ RNA_def_property_float_sdna(prop, NULL, "simplify_aosss");
+ RNA_def_property_ui_text(prop, "Simplify AO and SSS", "Global approximate AA and SSS quality factor");
+ RNA_def_property_update(prop, 0, "rna_Scene_simplify_update");
+
+ prop= RNA_def_property(srna, "simplify_triangulate", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "simplify_flag", R_SIMPLE_NO_TRIANGULATE);
+ RNA_def_property_ui_text(prop, "Skip Quad to Triangles", "Disables non-planer quads being triangulated");
/* Scene API */
RNA_api_scene_render(srna);
}
-
/* scene.objects */
static void rna_def_scene_objects(BlenderRNA *brna, PropertyRNA *cprop)
{
@@ -2373,17 +2558,19 @@ static void rna_def_scene_objects(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_property_srna(cprop, "SceneObjects");
srna= RNA_def_struct(brna, "SceneObjects", NULL);
RNA_def_struct_sdna(srna, "Scene");
- RNA_def_struct_ui_text(srna, "Scene Objects", "Collection of scene objects.");
+ RNA_def_struct_ui_text(srna, "Scene Objects", "Collection of scene objects");
func= RNA_def_function(srna, "link", "rna_Scene_link_object");
RNA_def_function_ui_description(func, "Link object to scene.");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
parm= RNA_def_pointer(func, "object", "Object", "", "Object to add to scene.");
RNA_def_property_flag(parm, PROP_REQUIRED);
+ parm= RNA_def_pointer(func, "base", "ObjectBase", "", "The newly created base.");
+ RNA_def_function_return(func, parm);
func= RNA_def_function(srna, "unlink", "rna_Scene_unlink_object");
RNA_def_function_ui_description(func, "Unlink object from scene.");
- RNA_def_function_flag(func, FUNC_USE_REPORTS);
+ RNA_def_function_flag(func, FUNC_USE_CONTEXT|FUNC_USE_REPORTS);
parm= RNA_def_pointer(func, "object", "Object", "", "Object to remove from scene.");
RNA_def_property_flag(parm, PROP_REQUIRED);
@@ -2391,7 +2578,7 @@ static void rna_def_scene_objects(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_property_struct_type(prop, "Object");
RNA_def_property_pointer_funcs(prop, "rna_Scene_active_object_get", "rna_Scene_active_object_set", NULL);
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Active Object", "Active object for this scene.");
+ RNA_def_property_ui_text(prop, "Active Object", "Active object for this scene");
/* Could call: ED_base_object_activate(C, scene->basact);
* but would be a bad level call and it seems the notifier is enough */
RNA_def_property_update(prop, NC_SCENE|ND_OB_ACTIVE, NULL);
@@ -2410,13 +2597,13 @@ static void rna_def_scene_bases(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_property_srna(cprop, "SceneBases");
srna= RNA_def_struct(brna, "SceneBases", NULL);
RNA_def_struct_sdna(srna, "Scene");
- RNA_def_struct_ui_text(srna, "Scene Bases", "Collection of scene bases.");
+ RNA_def_struct_ui_text(srna, "Scene Bases", "Collection of scene bases");
prop= RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "ObjectBase");
RNA_def_property_pointer_sdna(prop, NULL, "basact");
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Active Base", "Active object base in the scene.");
+ RNA_def_property_ui_text(prop, "Active Base", "Active object base in the scene");
RNA_def_property_update(prop, NC_SCENE|ND_OB_ACTIVE, NULL);
}
@@ -2427,25 +2614,31 @@ void RNA_def_scene(BlenderRNA *brna)
FunctionRNA *func;
static EnumPropertyItem audio_distance_model_items[] = {
- {0, "NONE", 0, "None", "No distance attenuation."},
- {1, "INVERSE", 0, "Inverse", "Inverse distance model."},
- {2, "INVERSE_CLAMPED", 0, "Inverse Clamped", "Inverse distance model with clamping."},
- {3, "LINEAR", 0, "Linear", "Linear distance model."},
- {4, "LINEAR_CLAMPED", 0, "Linear Clamped", "Linear distance model with clamping."},
- {5, "EXPONENT", 0, "Exponent", "Exponent distance model."},
- {6, "EXPONENT_CLAMPED", 0, "Exponent Clamped", "Exponent distance model with clamping."},
+ {0, "NONE", 0, "None", "No distance attenuation"},
+ {1, "INVERSE", 0, "Inverse", "Inverse distance model"},
+ {2, "INVERSE_CLAMPED", 0, "Inverse Clamped", "Inverse distance model with clamping"},
+ {3, "LINEAR", 0, "Linear", "Linear distance model"},
+ {4, "LINEAR_CLAMPED", 0, "Linear Clamped", "Linear distance model with clamping"},
+ {5, "EXPONENT", 0, "Exponent", "Exponent distance model"},
+ {6, "EXPONENT_CLAMPED", 0, "Exponent Clamped", "Exponent distance model with clamping"},
+ {0, NULL, 0, NULL, NULL}};
+
+ static EnumPropertyItem sync_mode_items[] = {
+ {0, "NONE", 0, "No Sync", "Do not sync, play every frame"},
+ {SCE_FRAME_DROP, "FRAME_DROP", 0, "Frame Dropping", "Drop frames if playback is too slow"},
+ {AUDIO_SYNC, "AUDIO_SYNC", 0, "AV-sync", "Sync to audio playback, dropping frames"},
{0, NULL, 0, NULL, NULL}};
/* Struct definition */
srna= RNA_def_struct(brna, "Scene", "ID");
- RNA_def_struct_ui_text(srna, "Scene", "Scene consisting objects and defining time and render related settings.");
+ RNA_def_struct_ui_text(srna, "Scene", "Scene consisting objects and defining time and render related settings");
RNA_def_struct_ui_icon(srna, ICON_SCENE_DATA);
RNA_def_struct_clear_flag(srna, STRUCT_ID_REFCOUNT);
/* Global Settings */
prop= RNA_def_property(srna, "camera", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Camera", "Active camera used for rendering the scene.");
+ RNA_def_property_ui_text(prop, "Camera", "Active camera used for rendering the scene");
RNA_def_property_update(prop, NC_SCENE, NULL);
prop= RNA_def_property(srna, "set", PROP_POINTER, PROP_NONE);
@@ -2453,17 +2646,17 @@ void RNA_def_scene(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "Scene");
RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK);
RNA_def_property_pointer_funcs(prop, NULL, "rna_Scene_set_set", NULL);
- RNA_def_property_ui_text(prop, "Set Scene", "Background set scene.");
+ RNA_def_property_ui_text(prop, "Set Scene", "Background set scene");
RNA_def_property_update(prop, NC_SCENE, NULL);
prop= RNA_def_property(srna, "world", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "World", "World used for rendering the scene.");
+ RNA_def_property_ui_text(prop, "World", "World used for rendering the scene");
RNA_def_property_update(prop, NC_SCENE|NC_WORLD, NULL);
prop= RNA_def_property(srna, "cursor_location", PROP_FLOAT, PROP_XYZ|PROP_UNIT_LENGTH);
RNA_def_property_float_sdna(prop, NULL, "cursor");
- RNA_def_property_ui_text(prop, "Cursor Location", "3D cursor location.");
+ RNA_def_property_ui_text(prop, "Cursor Location", "3D cursor location");
RNA_def_property_ui_range(prop, -10000.0, 10000.0, 10, 4);
RNA_def_property_update(prop, NC_WINDOW, NULL);
@@ -2486,66 +2679,69 @@ void RNA_def_scene(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "lay", 1);
RNA_def_property_array(prop, 20);
RNA_def_property_boolean_funcs(prop, NULL, "rna_Scene_layer_set");
- RNA_def_property_ui_text(prop, "Visible Layers", "Layers visible when rendering the scene.");
+ RNA_def_property_ui_text(prop, "Visible Layers", "Layers visible when rendering the scene");
RNA_def_property_update(prop, NC_SCENE|ND_LAYER, "rna_Scene_layer_update");
/* Frame Range Stuff */
prop= RNA_def_property(srna, "current_frame", PROP_INT, PROP_TIME);
- RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
+ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_int_sdna(prop, NULL, "r.cfra");
RNA_def_property_range(prop, MINAFRAME, MAXFRAME);
+ RNA_def_property_int_funcs(prop, NULL, "rna_Scene_current_frame_set", NULL);
RNA_def_property_ui_text(prop, "Current Frame", "");
+ RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
RNA_def_property_update(prop, NC_SCENE|ND_FRAME, "rna_Scene_frame_update");
prop= RNA_def_property(srna, "start_frame", PROP_INT, PROP_TIME);
- RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
+ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_int_sdna(prop, NULL, "r.sfra");
RNA_def_property_int_funcs(prop, NULL, "rna_Scene_start_frame_set", NULL);
RNA_def_property_range(prop, MINFRAME, MAXFRAME);
- RNA_def_property_ui_text(prop, "Start Frame", "");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_ui_text(prop, "Start Frame", "First frame of the playback/rendering range");
+ RNA_def_property_update(prop, NC_SCENE|ND_FRAME, NULL);
prop= RNA_def_property(srna, "end_frame", PROP_INT, PROP_TIME);
- RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
+ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_int_sdna(prop, NULL, "r.efra");
RNA_def_property_int_funcs(prop, NULL, "rna_Scene_end_frame_set", NULL);
RNA_def_property_range(prop, MINFRAME, MAXFRAME);
- RNA_def_property_ui_text(prop, "End Frame", "");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_ui_text(prop, "End Frame", "Final frame of the playback/rendering range");
+ RNA_def_property_update(prop, NC_SCENE|ND_FRAME, NULL);
prop= RNA_def_property(srna, "frame_step", PROP_INT, PROP_TIME);
- RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
+ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_int_sdna(prop, NULL, "r.frame_step");
RNA_def_property_range(prop, 0, MAXFRAME);
- RNA_def_property_ui_range(prop, 0, 100, 1, 0);
+ RNA_def_property_ui_range(prop, 1, 100, 1, 0);
RNA_def_property_ui_text(prop, "Frame Step", "Number of frames to skip forward while rendering/playing back each frame");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE|ND_FRAME, NULL);
/* Preview Range (frame-range for UI playback) */
- prop=RNA_def_property(srna, "use_preview_range", PROP_BOOLEAN, PROP_NONE); /* use_preview_range is not really a separate setting in SDNA */
- RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
- RNA_def_property_boolean_funcs(prop, "rna_Scene_use_preview_range_get", "rna_Scene_use_preview_range_set");
+ prop=RNA_def_property(srna, "use_preview_range", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
+ RNA_def_property_boolean_sdna(prop, NULL, "r.flag", SCER_PRV_RANGE);
+ RNA_def_property_boolean_funcs(prop, NULL, "rna_Scene_use_preview_range_set");
RNA_def_property_ui_text(prop, "Use Preview Range", "");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE|ND_FRAME, NULL);
prop= RNA_def_property(srna, "preview_range_start_frame", PROP_INT, PROP_TIME);
- RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
+ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_int_sdna(prop, NULL, "r.psfra");
RNA_def_property_int_funcs(prop, NULL, "rna_Scene_preview_range_start_frame_set", NULL);
RNA_def_property_ui_text(prop, "Preview Range Start Frame", "");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE|ND_FRAME, NULL);
prop= RNA_def_property(srna, "preview_range_end_frame", PROP_INT, PROP_TIME);
- RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
+ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_int_sdna(prop, NULL, "r.pefra");
RNA_def_property_int_funcs(prop, NULL, "rna_Scene_preview_range_end_frame_set", NULL);
RNA_def_property_ui_text(prop, "Preview Range End Frame", "");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE|ND_FRAME, NULL);
/* Stamp */
prop= RNA_def_property(srna, "stamp_note", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "r.stamp_udata");
- RNA_def_property_ui_text(prop, "Stamp Note", "User define note for the render stamping.");
+ RNA_def_property_ui_text(prop, "Stamp Note", "User define note for the render stamping");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
/* Animation Data (for Scene) */
@@ -2555,18 +2751,30 @@ void RNA_def_scene(BlenderRNA *brna)
prop= RNA_def_property(srna, "nla_tweakmode_on", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SCE_NLA_EDIT_ON);
RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* DO NOT MAKE THIS EDITABLE, OR NLA EDITOR BREAKS */
- RNA_def_property_ui_text(prop, "NLA TweakMode", "Indicates whether there is any action referenced by NLA being edited. Strictly read-only.");
+ RNA_def_property_ui_text(prop, "NLA TweakMode", "Indicates whether there is any action referenced by NLA being edited. Strictly read-only");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
-
+ /* Frame dropping flag for playback and sync enum */
+ prop= RNA_def_property(srna, "frame_drop", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", SCE_FRAME_DROP);
+ RNA_def_property_ui_text(prop, "Frame Dropping", "Play back dropping frames if frame display is too slow");
+ RNA_def_property_update(prop, NC_SCENE, NULL);
+
+ prop= RNA_def_property(srna, "sync_mode", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_funcs(prop, "rna_Scene_sync_mode_get", "rna_Scene_sync_mode_set", NULL);
+ RNA_def_property_enum_items(prop, sync_mode_items);
+ RNA_def_property_ui_text(prop, "Sync Mode", "How to sync playback");
+ RNA_def_property_update(prop, NC_SCENE, NULL);
+
+
/* Nodes (Compositing) */
prop= RNA_def_property(srna, "nodetree", PROP_POINTER, PROP_NONE);
- RNA_def_property_ui_text(prop, "Node Tree", "Compositing node tree.");
+ RNA_def_property_ui_text(prop, "Node Tree", "Compositing node tree");
prop= RNA_def_property(srna, "use_nodes", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "use_nodes", 1);
RNA_def_property_boolean_funcs(prop, NULL, "rna_Scene_use_nodes_set");
- RNA_def_property_ui_text(prop, "Use Nodes", "Enable the compositing node tree.");
+ RNA_def_property_ui_text(prop, "Use Nodes", "Enable the compositing node tree");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
/* Sequencer */
@@ -2579,7 +2787,7 @@ void RNA_def_scene(BlenderRNA *brna)
prop= RNA_def_property(srna, "keying_sets", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "keyingsets", NULL);
RNA_def_property_struct_type(prop, "KeyingSet");
- RNA_def_property_ui_text(prop, "Keying Sets", "Keying Sets for this Scene.");
+ RNA_def_property_ui_text(prop, "Keying Sets", "Keying Sets for this Scene");
RNA_def_property_update(prop, NC_SCENE|ND_KEYINGSET, NULL);
prop= RNA_def_property(srna, "active_keying_set", PROP_POINTER, PROP_NONE);
@@ -2587,13 +2795,13 @@ void RNA_def_scene(BlenderRNA *brna)
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_editable_func(prop, "rna_Scene_active_keying_set_editable");
RNA_def_property_pointer_funcs(prop, "rna_Scene_active_keying_set_get", "rna_Scene_active_keying_set_set", NULL);
- RNA_def_property_ui_text(prop, "Active Keying Set", "Active Keying Set used to insert/delete keyframes.");
+ RNA_def_property_ui_text(prop, "Active Keying Set", "Active Keying Set used to insert/delete keyframes");
RNA_def_property_update(prop, NC_SCENE|ND_KEYINGSET, NULL);
prop= RNA_def_property(srna, "active_keying_set_index", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "active_keyingset");
RNA_def_property_int_funcs(prop, "rna_Scene_active_keying_set_index_get", "rna_Scene_active_keying_set_index_set", "rna_Scene_active_keying_set_index_range");
- RNA_def_property_ui_text(prop, "Active Keying Set Index", "Current Keying Set index.");
+ RNA_def_property_ui_text(prop, "Active Keying Set Index", "Current Keying Set index");
RNA_def_property_update(prop, NC_SCENE|ND_KEYINGSET, NULL);
/* Tool Settings */
@@ -2620,54 +2828,54 @@ void RNA_def_scene(BlenderRNA *brna)
prop= RNA_def_property(srna, "use_gravity", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "physics_settings.flag", PHYS_GLOBAL_GRAVITY);
- RNA_def_property_ui_text(prop, "Global Gravity", "Use global gravity for all dynamics.");
+ RNA_def_property_ui_text(prop, "Global Gravity", "Use global gravity for all dynamics");
RNA_def_property_update(prop, 0, "rna_Physics_update");
/* Render Data */
- prop= RNA_def_property(srna, "render_data", PROP_POINTER, PROP_NONE);
+ prop= RNA_def_property(srna, "render", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "r");
- RNA_def_property_struct_type(prop, "SceneRenderData");
+ RNA_def_property_struct_type(prop, "RenderSettings");
RNA_def_property_ui_text(prop, "Render Data", "");
/* Markers */
prop= RNA_def_property(srna, "timeline_markers", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "markers", NULL);
RNA_def_property_struct_type(prop, "TimelineMarker");
- RNA_def_property_ui_text(prop, "Timeline Markers", "Markers used in all timelines for the current scene.");
+ RNA_def_property_ui_text(prop, "Timeline Markers", "Markers used in all timelines for the current scene");
/* Audio Settings */
prop= RNA_def_property(srna, "mute_audio", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "audio.flag", AUDIO_MUTE);
- RNA_def_property_ui_text(prop, "Audio Muted", "Play back of audio from Sequence Editor will be muted.");
+ RNA_def_property_ui_text(prop, "Audio Muted", "Play back of audio from Sequence Editor will be muted");
RNA_def_property_update(prop, NC_SCENE, NULL);
prop= RNA_def_property(srna, "sync_audio", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "audio.flag", AUDIO_SYNC);
- RNA_def_property_ui_text(prop, "Audio Sync", "Play back and sync with audio from Sequence Editor for realtime playback.");
+ RNA_def_property_ui_text(prop, "Audio Sync", "Play back and sync with audio clock, dropping frames if frame display is too slow");
RNA_def_property_update(prop, NC_SCENE, NULL);
prop= RNA_def_property(srna, "scrub_audio", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "audio.flag", AUDIO_SCRUB);
- RNA_def_property_ui_text(prop, "Audio Scrubbing", "Play audio from Sequence Editor while scrubbing.");
+ RNA_def_property_ui_text(prop, "Audio Scrubbing", "Play audio from Sequence Editor while scrubbing");
RNA_def_property_update(prop, NC_SCENE, NULL);
prop= RNA_def_property(srna, "speed_of_sound", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "audio.speed_of_sound");
RNA_def_property_range(prop, 0.01f, FLT_MAX);
- RNA_def_property_ui_text(prop, "Speed of Sound", "Speed of sound for doppler effect calculation.");
+ RNA_def_property_ui_text(prop, "Speed of Sound", "Speed of sound for doppler effect calculation");
RNA_def_property_update(prop, NC_SCENE, NULL);
prop= RNA_def_property(srna, "doppler_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "audio.doppler_factor");
RNA_def_property_range(prop, 0.0, FLT_MAX);
- RNA_def_property_ui_text(prop, "Doppler Factor", "Pitch factor for doppler effect calculation.");
+ RNA_def_property_ui_text(prop, "Doppler Factor", "Pitch factor for doppler effect calculation");
RNA_def_property_update(prop, NC_SCENE, NULL);
prop= RNA_def_property(srna, "distance_model", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "audio.distance_model");
RNA_def_property_enum_items(prop, audio_distance_model_items);
- RNA_def_property_ui_text(prop, "Distance Model", "Distance model for distance attenuation calculation.");
+ RNA_def_property_ui_text(prop, "Distance Model", "Distance model for distance attenuation calculation");
RNA_def_property_update(prop, NC_SCENE, NULL);
/* Game Settings */
diff --git a/source/blender/makesrna/intern/rna_scene_api.c b/source/blender/makesrna/intern/rna_scene_api.c
index 84dc3e6971e..6cae59c4dce 100644
--- a/source/blender/makesrna/intern/rna_scene_api.c
+++ b/source/blender/makesrna/intern/rna_scene_api.c
@@ -15,7 +15,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* The Original Code is Copyright (C) 2009 Blender Foundation.
* All rights reserved.
@@ -108,6 +108,9 @@ void RNA_api_scene(StructRNA *srna)
parm= RNA_def_int(func, "frame", 0, MINAFRAME, MAXFRAME, "", "Frame number to set.", MINAFRAME, MAXFRAME);
RNA_def_property_flag(parm, PROP_REQUIRED);
+ func= RNA_def_function(srna, "update", "scene_update_tagged");
+ RNA_def_function_ui_description(func, "Update data tagged to be updated from previous access to data or operators.");
+
/* 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.");
@@ -134,7 +137,7 @@ void RNA_api_scene_render(StructRNA *srna)
parm= RNA_def_int(func, "frame", INT_MIN, INT_MIN, INT_MAX, "", "Frame number to use, if unset the current frame will be used.", MINAFRAME, MAXFRAME);
parm= RNA_def_string(func, "name", "", FILE_MAX, "File Name", "the resulting filename from the scenes render settings.");
RNA_def_property_flag(parm, PROP_THICK_WRAP); /* needed for string return value */
- RNA_def_function_return_mark(func, parm);
+ RNA_def_function_output(func, parm);
}
#endif
diff --git a/source/blender/makesrna/intern/rna_screen.c b/source/blender/makesrna/intern/rna_screen.c
index 5a29eee5cf2..b2148e38de1 100644
--- a/source/blender/makesrna/intern/rna_screen.c
+++ b/source/blender/makesrna/intern/rna_screen.c
@@ -15,7 +15,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor(s): Blender Foundation (2008), Nathan Letwory
*
@@ -109,33 +109,33 @@ static void rna_def_area(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "Area", NULL);
- RNA_def_struct_ui_text(srna, "Area", "Area in a subdivided screen, containing an editor.");
+ RNA_def_struct_ui_text(srna, "Area", "Area in a subdivided screen, containing an editor");
RNA_def_struct_sdna(srna, "ScrArea");
prop= RNA_def_property(srna, "spaces", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "spacedata", NULL);
RNA_def_property_struct_type(prop, "Space");
- RNA_def_property_ui_text(prop, "Spaces", "Spaces contained in this area, the first space is active.");
+ RNA_def_property_ui_text(prop, "Spaces", "Spaces contained in this area, the first space is active");
prop= RNA_def_property(srna, "active_space", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "spacedata.first");
RNA_def_property_struct_type(prop, "Space");
- RNA_def_property_ui_text(prop, "Active Space", "Space currently being displayed in this area.");
+ RNA_def_property_ui_text(prop, "Active Space", "Space currently being displayed in this area");
prop= RNA_def_property(srna, "regions", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "regionbase", NULL);
RNA_def_property_struct_type(prop, "Region");
- RNA_def_property_ui_text(prop, "Regions", "Regions this area is subdivided in.");
+ RNA_def_property_ui_text(prop, "Regions", "Regions this area is subdivided in");
prop= RNA_def_property(srna, "show_menus", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", HEADER_NO_PULLDOWN);
- RNA_def_property_ui_text(prop, "Show Menus", "Show menus in the header.");
+ RNA_def_property_ui_text(prop, "Show Menus", "Show menus in the header");
prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "spacetype");
RNA_def_property_enum_items(prop, space_type_items);
RNA_def_property_enum_funcs(prop, NULL, "rna_Area_type_set", NULL);
- RNA_def_property_ui_text(prop, "Type", "Space type.");
+ RNA_def_property_ui_text(prop, "Type", "Space type");
RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
RNA_def_property_update(prop, 0, "rna_Area_type_update");
@@ -148,29 +148,29 @@ static void rna_def_region(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "Region", NULL);
- RNA_def_struct_ui_text(srna, "Region", "Region in a subdivided screen area.");
+ RNA_def_struct_ui_text(srna, "Region", "Region in a subdivided screen area");
RNA_def_struct_sdna(srna, "ARegion");
prop= RNA_def_property(srna, "id", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "swinid");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Region ID", "Unique ID for this region.");
+ RNA_def_property_ui_text(prop, "Region ID", "Unique ID for this region");
prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "regiontype");
RNA_def_property_enum_items(prop, region_type_items);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Region Type", "Type of this region.");
+ RNA_def_property_ui_text(prop, "Region Type", "Type of this region");
prop= RNA_def_property(srna, "width", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "winx");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Width", "Region width.");
+ RNA_def_property_ui_text(prop, "Width", "Region width");
prop= RNA_def_property(srna, "height", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "winy");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Height", "Region height.");
+ RNA_def_property_ui_text(prop, "Height", "Region height");
}
static void rna_def_screen(BlenderRNA *brna)
@@ -180,30 +180,30 @@ static void rna_def_screen(BlenderRNA *brna)
srna= RNA_def_struct(brna, "Screen", "ID");
RNA_def_struct_sdna(srna, "Screen"); /* it is actually bScreen but for 2.5 the dna is patched! */
- RNA_def_struct_ui_text(srna, "Screen", "Screen datablock, defining the layout of areas in a window.");
+ RNA_def_struct_ui_text(srna, "Screen", "Screen datablock, defining the layout of areas in a window");
RNA_def_struct_ui_icon(srna, ICON_SPLITSCREEN);
prop= RNA_def_property(srna, "scene", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_EDITABLE|PROP_NEVER_NULL);
RNA_def_property_pointer_funcs(prop, NULL, "rna_Screen_scene_set", NULL);
- RNA_def_property_ui_text(prop, "Scene", "Active scene to be edited in the screen.");
+ RNA_def_property_ui_text(prop, "Scene", "Active scene to be edited in the screen");
RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
RNA_def_property_update(prop, 0, "rna_Screen_scene_update");
prop= RNA_def_property(srna, "areas", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "areabase", NULL);
RNA_def_property_struct_type(prop, "Area");
- RNA_def_property_ui_text(prop, "Areas", "Areas the screen is subdivided into.");
+ RNA_def_property_ui_text(prop, "Areas", "Areas the screen is subdivided into");
prop= RNA_def_property(srna, "animation_playing", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_funcs(prop, "rna_Screen_animation_playing_get", NULL);
- RNA_def_property_ui_text(prop, "Animation Playing", "Animation playback is active.");
+ RNA_def_property_ui_text(prop, "Animation Playing", "Animation playback is active");
prop= RNA_def_property(srna, "fullscreen", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_funcs(prop, "rna_Screen_fullscreen_get", NULL);
- RNA_def_property_ui_text(prop, "Fullscreen", "An area is maximised, filling this screen.");
+ RNA_def_property_ui_text(prop, "Fullscreen", "An area is maximised, filling this screen");
}
void RNA_def_screen(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_sculpt_paint.c b/source/blender/makesrna/intern/rna_sculpt_paint.c
index 99bee9413cd..456071499e3 100644
--- a/source/blender/makesrna/intern/rna_sculpt_paint.c
+++ b/source/blender/makesrna/intern/rna_sculpt_paint.c
@@ -15,7 +15,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor(s): Campbell Barton
*
@@ -37,13 +37,14 @@
#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."},
+ {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"},
+ {PE_BRUSH_WEIGHT, "WEIGHT", 0, "Weight", "Weight hair particles"},
{0, NULL, 0, NULL, NULL}};
#ifdef RNA_RUNTIME
@@ -56,10 +57,10 @@ static EnumPropertyItem particle_edit_hair_brush_items[] = {
#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."},
+ {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)
@@ -209,7 +210,7 @@ static void rna_def_paint(BlenderRNA *brna)
"rna_iterator_array_end",
"rna_iterator_array_dereference_get",
"rna_Paint_brushes_length", 0, 0);
- RNA_def_property_ui_text(prop, "Brushes", "Brushes selected for this paint mode.");
+ RNA_def_property_ui_text(prop, "Brushes", "Brushes selected for this paint mode");
prop= RNA_def_property(srna, "active_brush_index", PROP_INT, PROP_NONE);
RNA_def_property_int_funcs(prop, NULL, "rna_Paint_active_brush_index_set", "rna_Paint_active_brush_index_range");
@@ -227,7 +228,7 @@ static void rna_def_paint(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "Brush");
RNA_def_property_pointer_funcs(prop, "rna_Paint_active_brush_get", "rna_Paint_active_brush_set", NULL);
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Brush", "Active paint brush.");
+ RNA_def_property_ui_text(prop, "Brush", "Active paint brush");
RNA_def_property_update(prop, NC_BRUSH|NA_EDITED, NULL);
prop= RNA_def_property(srna, "show_brush", PROP_BOOLEAN, PROP_NONE);
@@ -236,7 +237,7 @@ static void rna_def_paint(BlenderRNA *brna)
prop= RNA_def_property(srna, "fast_navigate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", PAINT_FAST_NAVIGATE);
- RNA_def_property_ui_text(prop, "Fast Navigate", "For multires, show low resolution while navigating the view.");
+ RNA_def_property_ui_text(prop, "Fast Navigate", "For multires, show low resolution while navigating the view");
}
static void rna_def_sculpt(BlenderRNA *brna)
@@ -249,97 +250,73 @@ static void rna_def_sculpt(BlenderRNA *brna)
prop= RNA_def_property(srna, "symmetry_x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", SCULPT_SYMM_X);
- RNA_def_property_ui_text(prop, "Symmetry X", "Mirror brush across the X axis.");
+ RNA_def_property_ui_text(prop, "Symmetry X", "Mirror brush across the X axis");
prop= RNA_def_property(srna, "symmetry_y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", SCULPT_SYMM_Y);
- RNA_def_property_ui_text(prop, "Symmetry Y", "Mirror brush across the Y axis.");
+ RNA_def_property_ui_text(prop, "Symmetry Y", "Mirror brush across the Y axis");
prop= RNA_def_property(srna, "symmetry_z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", SCULPT_SYMM_Z);
- RNA_def_property_ui_text(prop, "Symmetry Z", "Mirror brush across the Z axis.");
+ RNA_def_property_ui_text(prop, "Symmetry Z", "Mirror brush across the Z axis");
prop= RNA_def_property(srna, "lock_x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", SCULPT_LOCK_X);
- RNA_def_property_ui_text(prop, "Lock X", "Disallow changes to the X axis of vertices.");
+ RNA_def_property_ui_text(prop, "Lock X", "Disallow changes to the X axis of vertices");
prop= RNA_def_property(srna, "lock_y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", SCULPT_LOCK_Y);
- RNA_def_property_ui_text(prop, "Lock Y", "Disallow changes to the Y axis of vertices.");
+ RNA_def_property_ui_text(prop, "Lock Y", "Disallow changes to the Y axis of vertices");
prop= RNA_def_property(srna, "lock_z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", SCULPT_LOCK_Z);
- RNA_def_property_ui_text(prop, "Lock Z", "Disallow changes to the Z axis of vertices.");
+ RNA_def_property_ui_text(prop, "Lock Z", "Disallow changes to the Z axis of vertices");
}
static void rna_def_vertex_paint(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem brush_mode_items[] = {
- {0, "MIX", 0, "Mix", "Use mix blending mode while painting."},
- {1, "ADD", 0, "Add", "Use add blending mode while painting."},
- {2, "SUB", 0, "Subtract", "Use subtract blending mode while painting."},
- {3, "MUL", 0, "Multiply", "Use multiply blending mode while painting."},
- {4, "BLUR", 0, "Blur", "Blur the color with surrounding values"},
- {5, "LIGHTEN", 0, "Lighten", "Use lighten blending mode while painting."},
- {6, "DARKEN", 0, "Darken", "Use darken blending mode while painting."},
- {0, NULL, 0, NULL, NULL}};
-
+
srna= RNA_def_struct(brna, "VertexPaint", "Paint");
RNA_def_struct_sdna(srna, "VPaint");
- RNA_def_struct_ui_text(srna, "Vertex Paint", "Properties of vertex and weight paint mode.");
-
- prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_items(prop, brush_mode_items);
- RNA_def_property_ui_text(prop, "Brush Mode", "Mode in which color is painted.");
+ RNA_def_struct_ui_text(srna, "Vertex Paint", "Properties of vertex and weight paint mode");
prop= RNA_def_property(srna, "all_faces", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", VP_AREA);
- RNA_def_property_ui_text(prop, "All Faces", "Paint on all faces inside brush.");
+ RNA_def_property_ui_text(prop, "All Faces", "Paint on all faces inside brush");
prop= RNA_def_property(srna, "normals", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", VP_NORMALS);
- RNA_def_property_ui_text(prop, "Normals", "Applies the vertex normal before painting.");
+ RNA_def_property_ui_text(prop, "Normals", "Applies the vertex normal before painting");
prop= RNA_def_property(srna, "spray", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", VP_SPRAY);
- RNA_def_property_ui_text(prop, "Spray", "Keep applying paint effect while holding mouse.");
+ RNA_def_property_ui_text(prop, "Spray", "Keep applying paint effect while holding mouse");
}
static void rna_def_image_paint(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
-
- static EnumPropertyItem tool_items[] = {
- {PAINT_TOOL_DRAW, "DRAW", 0, "Draw", ""},
- {PAINT_TOOL_SOFTEN, "SOFTEN", 0, "Soften", ""},
- {PAINT_TOOL_SMEAR, "SMEAR", 0, "Smear", ""},
- {PAINT_TOOL_CLONE, "CLONE", 0, "Clone", ""},
- {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "ImagePaint", "Paint");
RNA_def_struct_sdna(srna, "ImagePaintSettings");
- RNA_def_struct_ui_text(srna, "Image Paint", "Properties of image and texture painting mode.");
-
- prop= RNA_def_property(srna, "tool", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_items(prop, tool_items);
- RNA_def_property_ui_text(prop, "Tool", "");
-
+ RNA_def_struct_ui_text(srna, "Image Paint", "Properties of image and texture painting mode");
+
/* booleans */
prop= RNA_def_property(srna, "show_brush_draw", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", IMAGEPAINT_DRAW_TOOL);
- RNA_def_property_ui_text(prop, "Show Brush Draw", "Enables brush shape while drawing.");
+ RNA_def_property_ui_text(prop, "Show Brush Draw", "Enables brush shape while drawing");
prop= RNA_def_property(srna, "show_brush", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", IMAGEPAINT_DRAW_TOOL_DRAWING);
- RNA_def_property_ui_text(prop, "Show Brush", "Enables brush shape while not drawing.");
+ RNA_def_property_ui_text(prop, "Show Brush", "Enables brush shape while not drawing");
prop= RNA_def_property(srna, "use_projection", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", IMAGEPAINT_PROJECT_DISABLE);
- RNA_def_property_ui_text(prop, "Project Paint", "Use projection painting for improved consistency in the brush strokes.");
+ RNA_def_property_ui_text(prop, "Project Paint", "Use projection painting for improved consistency in the brush strokes");
prop= RNA_def_property(srna, "use_occlude", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", IMAGEPAINT_PROJECT_XRAY);
@@ -369,11 +346,11 @@ static void rna_def_image_paint(BlenderRNA *brna)
prop= RNA_def_property(srna, "seam_bleed", PROP_INT, PROP_UNSIGNED);
RNA_def_property_ui_range(prop, 0, 8, 0, 0);
- RNA_def_property_ui_text(prop, "Bleed", "Extend paint beyond the faces UVs to reduce seams (in pixels, slower).");
+ RNA_def_property_ui_text(prop, "Bleed", "Extend paint beyond the faces UVs to reduce seams (in pixels, slower)");
prop= RNA_def_property(srna, "normal_angle", PROP_INT, PROP_UNSIGNED);
RNA_def_property_range(prop, 0, 90);
- RNA_def_property_ui_text(prop, "Angle", "Paint most on faces pointing towards the view acording to this angle.");
+ RNA_def_property_ui_text(prop, "Angle", "Paint most on faces pointing towards the view acording to this angle");
}
static void rna_def_particle_edit(BlenderRNA *brna)
@@ -388,13 +365,13 @@ static void rna_def_particle_edit(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem puff_mode[] = {
- {0, "ADD", 0, "Add", "Make hairs more puffy."},
- {1, "SUB", 0, "Sub", "Make hairs less puffy."},
+ {0, "ADD", 0, "Add", "Make hairs more puffy"},
+ {1, "SUB", 0, "Sub", "Make hairs less puffy"},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem length_mode[] = {
- {0, "GROW", 0, "Grow", "Make hairs longer."},
- {1, "SHRINK", 0, "Shrink", "Make hairs shorter."},
+ {0, "GROW", 0, "Grow", "Make hairs longer"},
+ {1, "SHRINK", 0, "Shrink", "Make hairs shorter"},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem edit_type_items[]= {
@@ -409,7 +386,7 @@ static void rna_def_particle_edit(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ParticleEdit", NULL);
RNA_def_struct_sdna(srna, "ParticleEditSettings");
- RNA_def_struct_ui_text(srna, "Particle Edit", "Properties of particle editing mode.");
+ RNA_def_struct_ui_text(srna, "Particle Edit", "Properties of particle editing mode");
prop= RNA_def_property(srna, "tool", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "brushtype");
@@ -420,49 +397,49 @@ static void rna_def_particle_edit(BlenderRNA *brna)
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_ui_text(prop, "Selection Mode", "Particle select and display mode");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "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);
- RNA_def_property_ui_text(prop, "Keep Lengths", "Keep path lengths constant.");
+ RNA_def_property_ui_text(prop, "Keep Lengths", "Keep path lengths constant");
prop= RNA_def_property(srna, "keep_root", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PE_LOCK_FIRST);
- RNA_def_property_ui_text(prop, "Keep Root", "Keep root keys unmodified.");
+ RNA_def_property_ui_text(prop, "Keep Root", "Keep root keys unmodified");
prop= RNA_def_property(srna, "emitter_deflect", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PE_DEFLECT_EMITTER);
- RNA_def_property_ui_text(prop, "Deflect Emitter", "Keep paths from intersecting the emitter.");
+ RNA_def_property_ui_text(prop, "Deflect Emitter", "Keep paths from intersecting the emitter");
prop= RNA_def_property(srna, "emitter_distance", PROP_FLOAT, PROP_UNSIGNED);
RNA_def_property_float_sdna(prop, NULL, "emitterdist");
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.");
+ 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_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, "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.");
+ 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_ui_text(prop, "Draw Particles", "Draw actual particles");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
prop= RNA_def_property(srna, "add_interpolate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PE_INTERPOLATE_ADDED);
- RNA_def_property_ui_text(prop, "Interpolate", "Interpolate new particles from the existing ones.");
+ RNA_def_property_ui_text(prop, "Interpolate", "Interpolate new particles from the existing ones");
prop= RNA_def_property(srna, "add_keys", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "totaddkey");
RNA_def_property_range(prop, 2, INT_MAX);
RNA_def_property_ui_range(prop, 2, 20, 10, 3);
- RNA_def_property_ui_text(prop, "Keys", "How many keys to make new particles with.");
+ RNA_def_property_ui_text(prop, "Keys", "How many keys to make new particles with");
prop= RNA_def_property(srna, "brush", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "ParticleBrush");
@@ -471,12 +448,12 @@ static void rna_def_particle_edit(BlenderRNA *brna)
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_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_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);
@@ -504,29 +481,33 @@ static void rna_def_particle_edit(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ParticleBrush", NULL);
RNA_def_struct_sdna(srna, "ParticleBrushData");
- RNA_def_struct_ui_text(srna, "Particle Brush", "Particle editing brush.");
+ RNA_def_struct_ui_text(srna, "Particle Brush", "Particle editing brush");
prop= RNA_def_property(srna, "size", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 1, INT_MAX);
RNA_def_property_ui_range(prop, 1, 100, 10, 3);
- RNA_def_property_ui_text(prop, "Size", "Brush size.");
+ RNA_def_property_ui_text(prop, "Size", "Brush size");
prop= RNA_def_property(srna, "strength", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 1, INT_MAX);
RNA_def_property_ui_range(prop, 1, 100, 10, 3);
- RNA_def_property_ui_text(prop, "Strength", "Brush strength.");
+ RNA_def_property_ui_text(prop, "Strength", "Brush strength");
prop= RNA_def_property(srna, "steps", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "step");
RNA_def_property_range(prop, 1, INT_MAX);
RNA_def_property_ui_range(prop, 1, 50, 10, 3);
- RNA_def_property_ui_text(prop, "Steps", "Brush steps.");
+ RNA_def_property_ui_text(prop, "Steps", "Brush steps");
prop= RNA_def_property(srna, "puff_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "invert");
RNA_def_property_enum_items(prop, puff_mode);
RNA_def_property_ui_text(prop, "Puff Mode", "");
+ prop= RNA_def_property(srna, "use_puff_volume", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", PE_BRUSH_DATA_PUFF_VOLUME);
+ RNA_def_property_ui_text(prop, "Puff Volume", "Apply puff to unselected end-points, (helps maintain hair volume when puffing root)");
+
prop= RNA_def_property(srna, "length_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "invert");
RNA_def_property_enum_items(prop, length_mode);
diff --git a/source/blender/makesrna/intern/rna_sensor.c b/source/blender/makesrna/intern/rna_sensor.c
index 1003af6d4d1..3e628e9dbe2 100644
--- a/source/blender/makesrna/intern/rna_sensor.c
+++ b/source/blender/makesrna/intern/rna_sensor.c
@@ -15,7 +15,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor(s): Blender Foundation (2008).
*
@@ -98,12 +98,12 @@ static void rna_def_sensor(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "Sensor", NULL);
- RNA_def_struct_ui_text(srna, "Sensor", "Game engine logic brick to detect events.");
+ RNA_def_struct_ui_text(srna, "Sensor", "Game engine logic brick to detect events");
RNA_def_struct_sdna(srna, "bSensor");
RNA_def_struct_refine_func(srna, "rna_Sensor_refine");
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
- RNA_def_property_ui_text(prop, "Name", "Sensor name.");
+ RNA_def_property_ui_text(prop, "Name", "Sensor name");
RNA_def_struct_name_property(srna, prop);
/* type is not editable, would need to do proper data free/alloc */
@@ -113,22 +113,22 @@ static void rna_def_sensor(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Type", "");
prop= RNA_def_property(srna, "invert", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_ui_text(prop, "Invert Output", "Invert the level(output) of this sensor.");
+ RNA_def_property_ui_text(prop, "Invert Output", "Invert the level(output) of this sensor");
prop= RNA_def_property(srna, "level", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_ui_text(prop, "Level", "Level detector, trigger controllers of new states(only applicable upon logic state transition).");
+ RNA_def_property_ui_text(prop, "Level", "Level detector, trigger controllers of new states(only applicable upon logic state transition)");
prop= RNA_def_property(srna, "pulse_true_level", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "pulse", SENS_PULSE_REPEAT);
- RNA_def_property_ui_text(prop, "Pulse True Level", "Activate TRUE level triggering (pulse mode).");
+ RNA_def_property_ui_text(prop, "Pulse True Level", "Activate TRUE level triggering (pulse mode)");
prop= RNA_def_property(srna, "pulse_false_level", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "pulse", SENS_NEG_PULSE_MODE);
- RNA_def_property_ui_text(prop, "Pulse False Level", "Activate FALSE level triggering (pulse mode).");
+ RNA_def_property_ui_text(prop, "Pulse False Level", "Activate FALSE level triggering (pulse mode)");
prop= RNA_def_property(srna, "frequence", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "freq");
- RNA_def_property_ui_text(prop, "Frequency", "Delay between repeated pulses(in logic tics, 0=no delay).");
+ RNA_def_property_ui_text(prop, "Frequency", "Delay between repeated pulses(in logic tics, 0=no delay)");
RNA_def_property_range(prop, 0, 10000);
}
@@ -136,7 +136,7 @@ static void rna_def_always_sensor(BlenderRNA *brna)
{
StructRNA *srna;
srna= RNA_def_struct(brna, "AlwaysSensor", "Sensor");
- RNA_def_struct_ui_text(srna, "Always Sensor", "Sensor to generate continuous pulses.");
+ RNA_def_struct_ui_text(srna, "Always Sensor", "Sensor to generate continuous pulses");
}
static void rna_def_near_sensor(BlenderRNA *brna)
@@ -145,16 +145,16 @@ static void rna_def_near_sensor(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "NearSensor", "Sensor");
- RNA_def_struct_ui_text(srna , "Near Sensor", "Sensor to detect nearby objects.");
+ RNA_def_struct_ui_text(srna , "Near Sensor", "Sensor to detect nearby objects");
RNA_def_struct_sdna_from(srna, "bNearSensor", "data");
prop= RNA_def_property(srna, "property", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "name");
- RNA_def_property_ui_text(prop, "Property", "Only look for objects with this property.");
+ RNA_def_property_ui_text(prop, "Property", "Only look for objects with this property");
prop= RNA_def_property(srna, "distance", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "dist");
- RNA_def_property_ui_text(prop, "Distance", "Trigger distance.");
+ RNA_def_property_ui_text(prop, "Distance", "Trigger distance");
RNA_def_property_range(prop, 0.0f, 10000.0f);
prop= RNA_def_property(srna, "reset_distance", PROP_FLOAT, PROP_NONE);
@@ -180,13 +180,13 @@ static void rna_def_mouse_sensor(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "MouseSensor", "Sensor");
- RNA_def_struct_ui_text(srna, "Mouse Sensor", "Sensor to detect mouse events.");
+ RNA_def_struct_ui_text(srna, "Mouse Sensor", "Sensor to detect mouse events");
RNA_def_struct_sdna_from(srna, "bMouseSensor", "data");
prop= RNA_def_property(srna, "mouse_event", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "type");
RNA_def_property_enum_items(prop, mouse_event_items);
- RNA_def_property_ui_text(prop, "Mouse Event", "Specify the type of event this mouse sensor should trigger on.");
+ RNA_def_property_ui_text(prop, "Mouse Event", "Specify the type of event this mouse sensor should trigger on");
}
static void rna_def_touch_sensor(BlenderRNA *brna)
@@ -195,13 +195,14 @@ static void rna_def_touch_sensor(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "TouchSensor", "Sensor");
- RNA_def_struct_ui_text(srna, "Touch Sensor", "Sensor to detect objects colliding with the current object.");
+ RNA_def_struct_ui_text(srna, "Touch Sensor", "Sensor to detect objects colliding with the current object");
RNA_def_struct_sdna_from(srna, "bTouchSensor", "data");
prop= RNA_def_property(srna, "material", PROP_POINTER, PROP_NONE);
+ RNA_def_property_struct_type(prop, "Material");
RNA_def_property_pointer_sdna(prop, NULL, "ma");
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Material", "Only look for floors with this material.");
+ RNA_def_property_ui_text(prop, "Material", "Only look for floors with this material");
}
static void rna_def_keyboard_sensor(BlenderRNA *brna)
@@ -210,37 +211,37 @@ static void rna_def_keyboard_sensor(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "KeyboardSensor", "Sensor");
- RNA_def_struct_ui_text(srna, "Keyboard Sensor", "Sensor to detect keyboard events.");
+ RNA_def_struct_ui_text(srna, "Keyboard Sensor", "Sensor to detect keyboard events");
RNA_def_struct_sdna_from(srna, "bKeyboardSensor", "data");
prop= RNA_def_property(srna, "key", PROP_INT, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* need better range or enum check */
- RNA_def_property_ui_text(prop, "Key", "Input key code.");
+ RNA_def_property_ui_text(prop, "Key", "Input key code");
RNA_def_property_range(prop, 0, 255);
prop= RNA_def_property(srna, "modifier_key", PROP_INT, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* need better range or enum check */
RNA_def_property_int_sdna(prop, NULL, "qual");
- RNA_def_property_ui_text(prop, "Modifier Key", "Modifier key code.");
+ RNA_def_property_ui_text(prop, "Modifier Key", "Modifier key code");
RNA_def_property_range(prop, 0, 255);
prop= RNA_def_property(srna, "second_modifier_key", PROP_INT, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* need better range or enum check */
RNA_def_property_int_sdna(prop, NULL, "qual2");
- RNA_def_property_ui_text(prop, "Second Modifier Key", "Modifier key code.");
+ RNA_def_property_ui_text(prop, "Second Modifier Key", "Modifier key code");
RNA_def_property_range(prop, 0, 255);
prop= RNA_def_property(srna, "target", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "targetName");
- RNA_def_property_ui_text(prop, "Target", "Property that indicates whether to log keystrokes as a string.");
+ RNA_def_property_ui_text(prop, "Target", "Property that indicates whether to log keystrokes as a string");
prop= RNA_def_property(srna, "log", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "toggleName");
- RNA_def_property_ui_text(prop, "Log", "Property that receive the keystrokes in case a string is logged.");
+ RNA_def_property_ui_text(prop, "Log", "Property that receive the keystrokes in case a string is logged");
prop= RNA_def_property(srna, "all_keys", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "type", 1);
- RNA_def_property_ui_text(prop, "All Keys", "Trigger this sensor on any keystroke.");
+ RNA_def_property_ui_text(prop, "All Keys", "Trigger this sensor on any keystroke");
}
static void rna_def_property_sensor(BlenderRNA *brna)
@@ -256,13 +257,13 @@ static void rna_def_property_sensor(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "PropertySensor", "Sensor");
- RNA_def_struct_ui_text(srna, "Property Sensor", "Sensor to detect values and changes in values of properties.");
+ RNA_def_struct_ui_text(srna, "Property Sensor", "Sensor to detect values and changes in values of properties");
RNA_def_struct_sdna_from(srna, "bPropertySensor", "data");
prop= RNA_def_property(srna, "evaluation_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, "Evaluation Type", "Type of property evaluation.");
+ RNA_def_property_ui_text(prop, "Evaluation Type", "Type of property evaluation");
prop= RNA_def_property(srna, "property", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "name");
@@ -270,15 +271,15 @@ static void rna_def_property_sensor(BlenderRNA *brna)
prop= RNA_def_property(srna, "value", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "value");
- RNA_def_property_ui_text(prop, "Value", "Check for this value in types in Equal or Not Equal types.");
+ RNA_def_property_ui_text(prop, "Value", "Check for this value in types in Equal or Not Equal types");
prop= RNA_def_property(srna, "min_value", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "value");
- RNA_def_property_ui_text(prop, "Minimum Value", "Specify minimum value in Interval type.");
+ RNA_def_property_ui_text(prop, "Minimum Value", "Specify minimum value in Interval type");
prop= RNA_def_property(srna, "max_value", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "maxvalue");
- RNA_def_property_ui_text(prop, "Maximum Value", "Specify maximum value in Interval type.");
+ RNA_def_property_ui_text(prop, "Maximum Value", "Specify maximum value in Interval type");
}
static void rna_def_armature_sensor(BlenderRNA *brna)
@@ -294,13 +295,13 @@ static void rna_def_armature_sensor(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "ArmatureSensor", "Sensor");
- RNA_def_struct_ui_text(srna, "Armature Sensor", "Sensor to detect values and changes in values of IK solver.");
+ RNA_def_struct_ui_text(srna, "Armature Sensor", "Sensor to detect values and changes in values of IK solver");
RNA_def_struct_sdna_from(srna, "bArmatureSensor", "data");
prop= RNA_def_property(srna, "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, "Test Type", "Type of value and test.");
+ RNA_def_property_ui_text(prop, "Test Type", "Type of value and test");
prop= RNA_def_property(srna, "channel_name", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "posechannel");
@@ -308,11 +309,11 @@ static void rna_def_armature_sensor(BlenderRNA *brna)
prop= RNA_def_property(srna, "constraint_name", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "constraint");
- RNA_def_property_ui_text(prop, "Constraint name", "Identify the bone constraint to check value from.");
+ RNA_def_property_ui_text(prop, "Constraint name", "Identify the bone constraint to check value from");
prop= RNA_def_property(srna, "value", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "value");
- RNA_def_property_ui_text(prop, "Compare Value", "Specify value to be used in comparison.");
+ RNA_def_property_ui_text(prop, "Compare Value", "Specify value to be used in comparison");
}
static void rna_def_actuator_sensor(BlenderRNA *brna)
@@ -321,12 +322,13 @@ static void rna_def_actuator_sensor(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "ActuatorSensor", "Sensor");
- RNA_def_struct_ui_text(srna, "Actuator Sensor", "Sensor to detect state modifications of actuators.");
+ RNA_def_struct_ui_text(srna, "Actuator Sensor", "Sensor to detect state modifications of actuators");
RNA_def_struct_sdna_from(srna, "bActuatorSensor", "data");
+ // XXX if eventually have Logics using RNA 100%, we could use the actuator datablock isntead of its name
prop= RNA_def_property(srna, "actuator", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "name");
- RNA_def_property_ui_text(prop, "Actuator", "Actuator name, actuator active state modifications will be detected.");
+ RNA_def_property_ui_text(prop, "Actuator", "Actuator name, actuator active state modifications will be detected");
}
static void rna_def_delay_sensor(BlenderRNA *brna)
@@ -335,20 +337,20 @@ static void rna_def_delay_sensor(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "DelaySensor", "Sensor");
- RNA_def_struct_ui_text(srna, "Delay Sensor", "Sensor to send delayed events.");
+ RNA_def_struct_ui_text(srna, "Delay Sensor", "Sensor to send delayed events");
RNA_def_struct_sdna_from(srna, "bDelaySensor", "data");
prop= RNA_def_property(srna, "delay", PROP_INT, PROP_NONE);
- RNA_def_property_ui_text(prop, "Delay", "Delay in number of logic tics before the positive trigger (default 60 per second).");
+ RNA_def_property_ui_text(prop, "Delay", "Delay in number of logic tics before the positive trigger (default 60 per second)");
RNA_def_property_range(prop, 0, 5000);
prop= RNA_def_property(srna, "duration", PROP_INT, PROP_NONE);
- RNA_def_property_ui_text(prop, "Duration", "If >0, delay in number of logic tics before the negative trigger following the positive trigger.");
+ RNA_def_property_ui_text(prop, "Duration", "If >0, delay in number of logic tics before the negative trigger following the positive trigger");
RNA_def_property_range(prop, 0, 5000);
prop= RNA_def_property(srna, "repeat", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SENS_DELAY_REPEAT);
- RNA_def_property_ui_text(prop, "Repeat", "Toggle repeat option. If selected, the sensor restarts after Delay+Dur logic tics.");
+ RNA_def_property_ui_text(prop, "Repeat", "Toggle repeat option. If selected, the sensor restarts after Delay+Dur logic tics");
}
static void rna_def_collision_sensor(BlenderRNA *brna)
@@ -361,21 +363,28 @@ static void rna_def_collision_sensor(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "CollisionSensor", "Sensor");
- RNA_def_struct_ui_text(srna, "Collision Sensor", "Sensor to detect objects colliding with the current object, with more settings than the Touch sensor.");
+ RNA_def_struct_ui_text(srna, "Collision Sensor", "Sensor to detect objects colliding with the current object, with more settings than the Touch sensor");
RNA_def_struct_sdna_from(srna, "bCollisionSensor", "data");
prop= RNA_def_property(srna, "property", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "name");
- RNA_def_property_ui_text(prop, "Property Name", "Only look for Objects with this property.");
+ RNA_def_property_ui_text(prop, "Property Name", "Only look for Objects with this property");
prop= RNA_def_property(srna, "material", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "materialName");
- RNA_def_property_ui_text(prop, "Material Name", "Only look for Objects with this material.");
+ RNA_def_property_ui_text(prop, "Material Name", "Only look for Objects with this material");
+/*
+ prop= RNA_def_property(srna, "material", PROP_POINTER, PROP_NONE);
+ RNA_def_property_struct_type(prop, "Material");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_pointer_sdna(prop, NULL, "ma");
+ RNA_def_property_ui_text(prop, "Material", "Only look for Objects with this material");
+*/
prop= RNA_def_property(srna, "collision_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "mode");
RNA_def_property_enum_items(prop, prop_type_items);
- RNA_def_property_ui_text(prop, "Collision Type", "Toggle collision on material or property.");
+ RNA_def_property_ui_text(prop, "Collision Type", "Toggle collision on material or property");
}
static void rna_def_radar_sensor(BlenderRNA *brna)
@@ -392,25 +401,25 @@ static void rna_def_radar_sensor(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "RadarSensor", "Sensor");
- RNA_def_struct_ui_text(srna, "Radar Sensor", "Sensor to detect objects in a cone shaped radar emanating from the current object.");
+ RNA_def_struct_ui_text(srna, "Radar Sensor", "Sensor to detect objects in a cone shaped radar emanating from the current object");
RNA_def_struct_sdna_from(srna, "bRadarSensor", "data");
prop= RNA_def_property(srna, "property", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "name");
- RNA_def_property_ui_text(prop, "Property", "Only look for Objects with this property.");
+ RNA_def_property_ui_text(prop, "Property", "Only look for Objects with this property");
prop= RNA_def_property(srna, "axis", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, axis_items);
- RNA_def_property_ui_text(prop, "Axis", "Specify along which axis the radar cone is cast.");
+ RNA_def_property_ui_text(prop, "Axis", "Specify along which axis the radar cone is cast");
prop= RNA_def_property(srna, "angle", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 179.9);
- RNA_def_property_ui_text(prop, "Angle", "Opening angle of the radar cone.");
+ RNA_def_property_ui_text(prop, "Angle", "Opening angle of the radar cone");
prop= RNA_def_property(srna, "distance", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "range");
RNA_def_property_range(prop, 0.0, 10000.0);
- RNA_def_property_ui_text(prop, "Distance", "Depth of the radar cone.");
+ RNA_def_property_ui_text(prop, "Distance", "Depth of the radar cone");
}
static void rna_def_random_sensor(BlenderRNA *brna)
@@ -419,12 +428,12 @@ static void rna_def_random_sensor(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "RandomSensor", "Sensor");
- RNA_def_struct_ui_text(srna, "Random Sensor", "Sensor to send random events.");
+ RNA_def_struct_ui_text(srna, "Random Sensor", "Sensor to send random events");
RNA_def_struct_sdna_from(srna, "bRandomSensor", "data");
prop= RNA_def_property(srna, "seed", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 0, 1000);
- RNA_def_property_ui_text(prop, "Seed", "Initial seed of the generator. (Choose 0 for not random).");
+ RNA_def_property_ui_text(prop, "Seed", "Initial seed of the generator. (Choose 0 for not random)");
}
static void rna_def_ray_sensor(BlenderRNA *brna)
@@ -445,34 +454,42 @@ static void rna_def_ray_sensor(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "RaySensor", "Sensor");
- RNA_def_struct_ui_text(srna, "Ray Sensor", "Sensor to detect intersections with a ray emanating from the current object.");
+ RNA_def_struct_ui_text(srna, "Ray Sensor", "Sensor to detect intersections with a ray emanating from the current object");
RNA_def_struct_sdna_from(srna, "bRaySensor", "data");
prop= RNA_def_property(srna, "property", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "propname");
- RNA_def_property_ui_text(prop, "Property", "Only look for Objects with this property.");
+ RNA_def_property_ui_text(prop, "Property", "Only look for Objects with this property");
prop= RNA_def_property(srna, "material", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "matname");
- RNA_def_property_ui_text(prop, "Material", "Only look for Objects with this material.");
+ RNA_def_property_ui_text(prop, "Material", "Only look for Objects with this material");
+
+/*
+ prop= RNA_def_property(srna, "material", PROP_POINTER, PROP_NONE);
+ RNA_def_property_struct_type(prop, "Material");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_pointer_sdna(prop, NULL, "ma");
+ RNA_def_property_ui_text(prop, "Material", "Only look for Objects with this material");
+*/
prop= RNA_def_property(srna, "ray_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "mode");
RNA_def_property_enum_items(prop, prop_type_items);
- RNA_def_property_ui_text(prop, "Collision Type", "Toggle collision on material or property.");
+ RNA_def_property_ui_text(prop, "Collision Type", "Toggle collision on material or property");
prop= RNA_def_property(srna, "x_ray_mode", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", SENS_RAY_XRAY);
- RNA_def_property_ui_text(prop, "X-Ray Mode", "Toggle X-Ray option (see through objects that don't have the property).");
+ RNA_def_property_ui_text(prop, "X-Ray Mode", "Toggle X-Ray option (see through objects that don't have the property)");
prop= RNA_def_property(srna, "range", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.01, 10000.0);
- RNA_def_property_ui_text(prop, "Range", "Sense objects no farther than this distance.");
+ RNA_def_property_ui_text(prop, "Range", "Sense objects no farther than this distance");
prop= RNA_def_property(srna, "axis", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "axisflag");
RNA_def_property_enum_items(prop, axis_items);
- RNA_def_property_ui_text(prop, "Axis", "Specify along which axis the ray is cast.");
+ RNA_def_property_ui_text(prop, "Axis", "Specify along which axis the ray is cast");
}
static void rna_def_message_sensor(BlenderRNA *brna)
@@ -481,11 +498,11 @@ static void rna_def_message_sensor(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "MessageSensor", "Sensor");
- RNA_def_struct_ui_text(srna, "Message Sensor", "Sensor to detect incoming messages.");
+ RNA_def_struct_ui_text(srna, "Message Sensor", "Sensor to detect incoming messages");
RNA_def_struct_sdna_from(srna, "bMessageSensor", "data");
prop= RNA_def_property(srna, "subject", PROP_STRING, PROP_NONE);
- RNA_def_property_ui_text(prop, "Subject", "Optional subject filter: only accept messages with this subject, or empty for all.");
+ RNA_def_property_ui_text(prop, "Subject", "Optional subject filter: only accept messages with this subject, or empty for all");
}
static void rna_def_joystick_sensor(BlenderRNA *brna)
@@ -507,54 +524,54 @@ static void rna_def_joystick_sensor(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "JoystickSensor", "Sensor");
- RNA_def_struct_ui_text(srna, "Joystick Sensor", "Sensor to detect joystick events.");
+ RNA_def_struct_ui_text(srna, "Joystick Sensor", "Sensor to detect joystick events");
RNA_def_struct_sdna_from(srna, "bJoystickSensor", "data");
prop= RNA_def_property(srna, "joystick_index", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "joyindex");
- RNA_def_property_ui_text(prop, "Joystick Index", "Specify which joystick to use.");
+ RNA_def_property_ui_text(prop, "Joystick Index", "Specify which joystick to use");
RNA_def_property_range(prop, 0, SENS_JOY_MAXINDEX-1);
prop= RNA_def_property(srna, "event_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "type");
RNA_def_property_enum_items(prop, event_type_items);
- RNA_def_property_ui_text(prop, "Event Type", "The type of event this joystick sensor is triggered on.");
+ RNA_def_property_ui_text(prop, "Event Type", "The type of event this joystick sensor is triggered on");
prop= RNA_def_property(srna, "all_events", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SENS_JOY_ANY_EVENT);
- RNA_def_property_ui_text(prop, "All Events", "Triggered by all events on this joysticks current type (axis/button/hat).");
+ RNA_def_property_ui_text(prop, "All Events", "Triggered by all events on this joysticks current type (axis/button/hat)");
/* Button */
prop= RNA_def_property(srna, "button_number", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "button");
- RNA_def_property_ui_text(prop, "Button Number", "Specify which button to use.");
+ RNA_def_property_ui_text(prop, "Button Number", "Specify which button to use");
RNA_def_property_range(prop, 0, 18);
/* Axis */
prop= RNA_def_property(srna, "axis_number", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "axis");
- RNA_def_property_ui_text(prop, "Axis Number", "Specify which axis pair to use, 1 is usually the main direction input.");
+ RNA_def_property_ui_text(prop, "Axis Number", "Specify which axis pair to use, 1 is usually the main direction input");
RNA_def_property_range(prop, 1, 2);
prop= RNA_def_property(srna, "axis_threshold", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "precision");
- RNA_def_property_ui_text(prop, "Axis Threshold", "Specify the precision of the axis.");
+ RNA_def_property_ui_text(prop, "Axis Threshold", "Specify the precision of the axis");
RNA_def_property_range(prop, 0, 32768);
prop= RNA_def_property(srna, "axis_direction", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "axisf");
RNA_def_property_enum_items(prop, axis_direction_items);
- RNA_def_property_ui_text(prop, "Axis Direction", "The direction of the axis.");
+ RNA_def_property_ui_text(prop, "Axis Direction", "The direction of the axis");
/* Hat */
prop= RNA_def_property(srna, "hat_number", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "hat");
- RNA_def_property_ui_text(prop, "Hat Number", "Specify which hat to use.");
+ RNA_def_property_ui_text(prop, "Hat Number", "Specify which hat to use");
RNA_def_property_range(prop, 1, 2);
prop= RNA_def_property(srna, "hat_direction", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "hatf");
- RNA_def_property_ui_text(prop, "Hat Direction", "Specify hat direction.");
+ RNA_def_property_ui_text(prop, "Hat Direction", "Specify hat direction");
RNA_def_property_range(prop, 0, 12);
}
diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c
index f875e6a7fa2..7464df6eb79 100644
--- a/source/blender/makesrna/intern/rna_sequencer.c
+++ b/source/blender/makesrna/intern/rna_sequencer.c
@@ -15,7 +15,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor(s): Blender Foundation (2008)
*
@@ -35,6 +35,7 @@
#include "DNA_scene_types.h"
#include "DNA_sequence_types.h"
+#include "BKE_animsys.h"
#include "BKE_sequencer.h"
#include "MEM_guardedalloc.h"
@@ -93,7 +94,7 @@ static void rna_Sequence_frame_change_update(Scene *scene, Sequence *seq)
{
Editing *ed= seq_give_editing(scene, FALSE);
ListBase *seqbase= seq_seqbase(&ed->seqbase, seq);
- calc_sequence_disp(seq);
+ calc_sequence_disp(scene, seq);
if(seq_test_overlap(seqbase, seq)) {
shuffle_seq(seqbase, seq, scene); // XXX - BROKEN!, uses context seqbasep
@@ -235,22 +236,20 @@ static int rna_Sequence_name_length(PointerRNA *ptr)
static void rna_Sequence_name_set(PointerRNA *ptr, const char *value)
{
Scene *scene= (Scene*)ptr->id.data;
-// Editing *ed= seq_give_editing(scene, FALSE);
Sequence *seq= (Sequence*)ptr->data;
-// Sequence *iseq;
+ char oldname[32];
+
+ /* make a copy of the old name first */
+ BLI_strncpy(oldname, seq->name+2, sizeof(seq->name)-2);
+
+ /* copy the new name into the name slot */
BLI_strncpy(seq->name+2, value, sizeof(seq->name)-2);
-
- seqUniqueName(&scene->ed->seqbase, seq);
-
- // TODO, unique name for all meta's
- /*
- SEQ_BEGIN(ed, iseq) {
- if(iseq->seqbase.first)
- seqUniqueName(&iseq->seqbase, seq);
-
- }
- SEQ_END
- */
+
+ /* make sure the name is unique */
+ seqbase_unique_name_recursive(&scene->ed->seqbase, seq);
+
+ /* fix all the animation data which may link to this */
+ BKE_all_animdata_fix_paths_rename("sequence_editor.sequences_all", oldname, seq->name+2);
}
static StructRNA* rna_Sequence_refine(struct PointerRNA *ptr)
@@ -315,7 +314,7 @@ static PointerRNA rna_SequenceEditor_meta_stack_get(CollectionPropertyIterator *
return rna_pointer_inherit_refine(&iter->parent, &RNA_Sequence, ms->parseq);
}
-static void rna_MovieSequence_filename_set(PointerRNA *ptr, const char *value)
+static void rna_Sequence_filepath_set(PointerRNA *ptr, const char *value)
{
Sequence *seq= (Sequence*)(ptr->data);
char dir[FILE_MAX], name[FILE_MAX];
@@ -325,6 +324,24 @@ static void rna_MovieSequence_filename_set(PointerRNA *ptr, const char *value)
BLI_strncpy(seq->strip->stripdata->name, name, sizeof(seq->strip->stripdata->name));
}
+static void rna_Sequence_filepath_get(PointerRNA *ptr, char *value)
+{
+ Sequence *seq= (Sequence*)(ptr->data);
+ char path[FILE_MAX];
+
+ BLI_join_dirfile(path, seq->strip->dir, seq->strip->stripdata->name);
+ BLI_strncpy(value, path, strlen(path)+1);
+}
+
+static int rna_Sequence_filepath_length(PointerRNA *ptr)
+{
+ Sequence *seq= (Sequence*)(ptr->data);
+ char path[FILE_MAX];
+
+ BLI_join_dirfile(path, seq->strip->dir, seq->strip->stripdata->name);
+ return strlen(path)+1;
+}
+
static void rna_SoundSequence_filename_set(PointerRNA *ptr, const char *value)
{
Sequence *seq= (Sequence*)(ptr->data);
@@ -351,14 +368,14 @@ static void rna_Sequence_update(Main *bmain, Scene *scene, PointerRNA *ptr)
free_imbuf_seq(scene, &ed->seqbase, FALSE);
if(RNA_struct_is_a(ptr->type, &RNA_SoundSequence))
- seq_update_sound(ptr->data);
+ seq_update_sound(scene, ptr->data);
}
static void rna_Sequence_mute_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
Editing *ed= seq_give_editing(scene, FALSE);
- seq_update_muting(ed);
+ seq_update_muting(scene, ed);
rna_Sequence_update(bmain, scene, ptr);
}
@@ -378,11 +395,12 @@ static void rna_def_strip_element(BlenderRNA *brna)
PropertyRNA *prop;
srna = RNA_def_struct(brna, "SequenceElement", NULL);
- RNA_def_struct_ui_text(srna, "Sequence Element", "Sequence strip data for a single frame.");
+ RNA_def_struct_ui_text(srna, "Sequence Element", "Sequence strip data for a single frame");
RNA_def_struct_sdna(srna, "StripElem");
- prop= RNA_def_property(srna, "filename", PROP_STRING, PROP_FILEPATH);
+ prop= RNA_def_property(srna, "filename", PROP_STRING, PROP_FILENAME);
RNA_def_property_string_sdna(prop, NULL, "name");
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Filename", "");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_SequenceElement_filename_set");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
@@ -394,7 +412,7 @@ static void rna_def_strip_crop(BlenderRNA *brna)
PropertyRNA *prop;
srna = RNA_def_struct(brna, "SequenceCrop", NULL);
- RNA_def_struct_ui_text(srna, "Sequence Crop", "Cropping parameters for a sequence strip.");
+ RNA_def_struct_ui_text(srna, "Sequence Crop", "Cropping parameters for a sequence strip");
RNA_def_struct_sdna(srna, "StripCrop");
prop= RNA_def_property(srna, "top", PROP_INT, PROP_UNSIGNED);
@@ -424,7 +442,7 @@ static void rna_def_strip_transform(BlenderRNA *brna)
PropertyRNA *prop;
srna = RNA_def_struct(brna, "SequenceTransform", NULL);
- RNA_def_struct_ui_text(srna, "Sequence Transform", "Transform parameters for a sequence strip.");
+ RNA_def_struct_ui_text(srna, "Sequence Transform", "Transform parameters for a sequence strip");
RNA_def_struct_sdna(srna, "StripTransform");
prop= RNA_def_property(srna, "offset_x", PROP_INT, PROP_NONE);
@@ -446,7 +464,7 @@ static void rna_def_strip_proxy(BlenderRNA *brna)
PropertyRNA *prop;
srna = RNA_def_struct(brna, "SequenceProxy", NULL);
- RNA_def_struct_ui_text(srna, "Sequence Proxy", "Proxy parameters for a sequence strip.");
+ RNA_def_struct_ui_text(srna, "Sequence Proxy", "Proxy parameters for a sequence strip");
RNA_def_struct_sdna(srna, "StripProxy");
prop= RNA_def_property(srna, "directory", PROP_STRING, PROP_DIRPATH);
@@ -466,19 +484,19 @@ static void rna_def_strip_color_balance(BlenderRNA *brna)
PropertyRNA *prop;
srna = RNA_def_struct(brna, "SequenceColorBalance", NULL);
- RNA_def_struct_ui_text(srna, "Sequence Color Balance", "Color balance parameters for a sequence strip.");
+ RNA_def_struct_ui_text(srna, "Sequence Color Balance", "Color balance parameters for a sequence strip");
RNA_def_struct_sdna(srna, "StripColorBalance");
prop= RNA_def_property(srna, "lift", PROP_FLOAT, PROP_COLOR);
- RNA_def_property_ui_text(prop, "Lift", "Color balance lift (shadows).");
+ RNA_def_property_ui_text(prop, "Lift", "Color balance lift (shadows)");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
prop= RNA_def_property(srna, "gamma", PROP_FLOAT, PROP_COLOR);
- RNA_def_property_ui_text(prop, "Gamma", "Color balance gamma (midtones).");
+ RNA_def_property_ui_text(prop, "Gamma", "Color balance gamma (midtones)");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
prop= RNA_def_property(srna, "gain", PROP_FLOAT, PROP_COLOR);
- RNA_def_property_ui_text(prop, "Gain", "Color balance gain (highlights).");
+ RNA_def_property_ui_text(prop, "Gain", "Color balance gain (highlights)");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
prop= RNA_def_property(srna, "inverse_gain", PROP_BOOLEAN, PROP_NONE);
@@ -549,7 +567,7 @@ static void rna_def_sequence(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
srna = RNA_def_struct(brna, "Sequence", NULL);
- RNA_def_struct_ui_text(srna, "Sequence", "Sequence strip in the sequence editor.");
+ 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");
@@ -567,7 +585,7 @@ static void rna_def_sequence(BlenderRNA *brna)
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
//prop= RNA_def_property(srna, "ipo", PROP_POINTER, PROP_NONE);
- //RNA_def_property_ui_text(prop, "Ipo Curves", "Ipo curves used by this sequence.");
+ //RNA_def_property_ui_text(prop, "Ipo Curves", "Ipo curves used by this sequence");
/* flags */
@@ -593,12 +611,12 @@ static void rna_def_sequence(BlenderRNA *brna)
prop= RNA_def_property(srna, "frame_locked", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_IPO_FRAME_LOCKED);
- RNA_def_property_ui_text(prop, "Frame Locked", "Lock the animation curve to the global frame counter.");
+ RNA_def_property_ui_text(prop, "Frame Locked", "Lock the animation curve to the global frame counter");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
prop= RNA_def_property(srna, "lock", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_LOCK);
- RNA_def_property_ui_text(prop, "Lock", "Lock strip so that it can't be transformed.");
+ RNA_def_property_ui_text(prop, "Lock", "Lock strip so that it can't be transformed");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL);
/* strip positioning */
@@ -606,25 +624,29 @@ static void rna_def_sequence(BlenderRNA *brna)
prop= RNA_def_property(srna, "length", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "len");
RNA_def_property_range(prop, 1, MAXFRAME);
+ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Length", "The length of the contents of this strip before the handles are applied");
RNA_def_property_int_funcs(prop, "rna_Sequence_length_get", "rna_Sequence_length_set",NULL);
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
prop= RNA_def_property(srna, "start_frame", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "start");
+ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Start Frame", "");
RNA_def_property_int_funcs(prop, NULL, "rna_Sequence_start_frame_set",NULL); // overlap tests and calc_seq_disp
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
prop= RNA_def_property(srna, "start_frame_final", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "startdisp");
- RNA_def_property_ui_text(prop, "Start Frame", "Start frame displayed in the sequence editor after offsets are applied, setting this is equivilent to moving the handle, not the actual start frame.");
+ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
+ RNA_def_property_ui_text(prop, "Start Frame", "Start frame displayed in the sequence editor after offsets are applied, setting this is equivilent to moving the handle, not the actual start frame");
RNA_def_property_int_funcs(prop, NULL, "rna_Sequence_start_frame_final_set", NULL); // overlap tests and calc_seq_disp
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
prop= RNA_def_property(srna, "end_frame_final", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "enddisp");
- RNA_def_property_ui_text(prop, "End Frame", "End frame displayed in the sequence editor after offsets are applied.");
+ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
+ RNA_def_property_ui_text(prop, "End Frame", "End frame displayed in the sequence editor after offsets are applied");
RNA_def_property_int_funcs(prop, NULL, "rna_Sequence_end_frame_final_set", NULL); // overlap tests and calc_seq_disp
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
@@ -657,7 +679,7 @@ static void rna_def_sequence(BlenderRNA *brna)
prop= RNA_def_property(srna, "channel", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "machine");
RNA_def_property_range(prop, 0, MAXSEQ-1);
- RNA_def_property_ui_text(prop, "Channel", "Y position of the sequence strip.");
+ RNA_def_property_ui_text(prop, "Channel", "Y position of the sequence strip");
RNA_def_property_int_funcs(prop, NULL, "rna_Sequence_channel_set",NULL); // overlap test
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
@@ -682,7 +704,7 @@ static void rna_def_sequence(BlenderRNA *brna)
prop= RNA_def_property(srna, "use_effect_default_fade", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_USE_EFFECT_DEFAULT_FADE);
- RNA_def_property_ui_text(prop, "Use Default Fade", "Fade effect using the builtin default (usually make transition as long as effect strip).");
+ RNA_def_property_ui_text(prop, "Use Default Fade", "Fade effect using the builtin default (usually make transition as long as effect strip)");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
@@ -705,7 +727,7 @@ static void rna_def_editor(BlenderRNA *brna)
PropertyRNA *prop;
srna = RNA_def_struct(brna, "SequenceEditor", NULL);
- RNA_def_struct_ui_text(srna, "Sequence Editor", "Sequence editing data for a Scene datablock.");
+ RNA_def_struct_ui_text(srna, "Sequence Editor", "Sequence editing data for a Scene datablock");
RNA_def_struct_ui_icon(srna, ICON_SEQUENCE);
RNA_def_struct_sdna(srna, "Editing");
@@ -723,7 +745,7 @@ static void rna_def_editor(BlenderRNA *brna)
prop= RNA_def_property(srna, "meta_stack", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "metastack", NULL);
RNA_def_property_struct_type(prop, "Sequence");
- RNA_def_property_ui_text(prop, "Meta Stack", "Meta strip stack, last is currently edited meta strip.");
+ RNA_def_property_ui_text(prop, "Meta Stack", "Meta strip stack, last is currently edited meta strip");
RNA_def_property_collection_funcs(prop, 0, 0, 0, "rna_SequenceEditor_meta_stack_get", 0, 0, 0);
prop= RNA_def_property(srna, "active_strip", PROP_POINTER, PROP_NONE);
@@ -737,31 +759,31 @@ static void rna_def_filter_video(StructRNA *srna)
prop= RNA_def_property(srna, "de_interlace", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_FILTERY);
- RNA_def_property_ui_text(prop, "De-Interlace", "For video movies to remove fields.");
+ RNA_def_property_ui_text(prop, "De-Interlace", "For video movies to remove fields");
prop= RNA_def_property(srna, "premultiply", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_MAKE_PREMUL);
- RNA_def_property_ui_text(prop, "Premultiply", "Convert RGB from key alpha to premultiplied alpha.");
+ RNA_def_property_ui_text(prop, "Premultiply", "Convert RGB from key alpha to premultiplied alpha");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL);
prop= RNA_def_property(srna, "flip_x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_FLIPX);
- RNA_def_property_ui_text(prop, "Flip X", "Flip on the X axis.");
+ RNA_def_property_ui_text(prop, "Flip X", "Flip on the X axis");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
prop= RNA_def_property(srna, "flip_y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_FLIPY);
- RNA_def_property_ui_text(prop, "Flip Y", "Flip on the Y axis.");
+ RNA_def_property_ui_text(prop, "Flip Y", "Flip on the Y axis");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
prop= RNA_def_property(srna, "convert_float", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_MAKE_FLOAT);
- RNA_def_property_ui_text(prop, "Convert Float", "Convert input to float data.");
+ RNA_def_property_ui_text(prop, "Convert Float", "Convert input to float data");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
prop= RNA_def_property(srna, "reverse_frames", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_REVERSE_FRAMES);
- RNA_def_property_ui_text(prop, "Flip Time", "Reverse frame order.");
+ RNA_def_property_ui_text(prop, "Flip Time", "Reverse frame order");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
prop= RNA_def_property(srna, "multiply_colors", PROP_FLOAT, PROP_UNSIGNED);
@@ -772,12 +794,12 @@ static void rna_def_filter_video(StructRNA *srna)
prop= RNA_def_property(srna, "strobe", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 1.0f, 30.0f);
- RNA_def_property_ui_text(prop, "Strobe", "Only display every nth frame.");
+ RNA_def_property_ui_text(prop, "Strobe", "Only display every nth frame");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
prop= RNA_def_property(srna, "use_color_balance", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_USE_COLOR_BALANCE);
- RNA_def_property_ui_text(prop, "Use Color Balance", "(3-Way color correction) on input.");
+ RNA_def_property_ui_text(prop, "Use Color Balance", "(3-Way color correction) on input");
RNA_def_property_boolean_funcs(prop, NULL, "rna_Sequence_use_color_balance_set");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
@@ -787,7 +809,7 @@ static void rna_def_filter_video(StructRNA *srna)
prop= RNA_def_property(srna, "use_translation", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_USE_TRANSFORM);
- RNA_def_property_ui_text(prop, "Use Translation", "Translate image before processing.");
+ RNA_def_property_ui_text(prop, "Use Translation", "Translate image before processing");
RNA_def_property_boolean_funcs(prop, NULL, "rna_Sequence_use_translation_set");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
@@ -797,7 +819,7 @@ static void rna_def_filter_video(StructRNA *srna)
prop= RNA_def_property(srna, "use_crop", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_USE_CROP);
- RNA_def_property_ui_text(prop, "Use Crop", "Crop image before processing.");
+ RNA_def_property_ui_text(prop, "Use Crop", "Crop image before processing");
RNA_def_property_boolean_funcs(prop, NULL, "rna_Sequence_use_crop_set");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
@@ -812,7 +834,7 @@ static void rna_def_proxy(StructRNA *srna)
prop= RNA_def_property(srna, "use_proxy", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_USE_PROXY);
- RNA_def_property_ui_text(prop, "Use Proxy", "Use a preview proxy for this strip.");
+ RNA_def_property_ui_text(prop, "Use Proxy", "Use a preview proxy for this strip");
RNA_def_property_boolean_funcs(prop, NULL, "rna_Sequence_use_proxy_set");
prop= RNA_def_property(srna, "proxy", PROP_POINTER, PROP_NONE);
@@ -821,7 +843,7 @@ static void rna_def_proxy(StructRNA *srna)
prop= RNA_def_property(srna, "proxy_custom_directory", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_USE_PROXY_CUSTOM_DIR);
- RNA_def_property_ui_text(prop, "Proxy Custom Directory", "Use a custom directory to store data.");
+ RNA_def_property_ui_text(prop, "Proxy Custom Directory", "Use a custom directory to store data");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
}
@@ -832,13 +854,13 @@ static void rna_def_input(StructRNA *srna)
prop= RNA_def_property(srna, "animation_start_offset", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "anim_startofs");
RNA_def_property_clear_flag(prop, PROP_EDITABLE); // overlap test
- RNA_def_property_ui_text(prop, "Animation Start Offset", "Animation start offset (trim start).");
+ RNA_def_property_ui_text(prop, "Animation Start Offset", "Animation start offset (trim start)");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
prop= RNA_def_property(srna, "animation_end_offset", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "anim_endofs");
RNA_def_property_clear_flag(prop, PROP_EDITABLE); // overlap test
- RNA_def_property_ui_text(prop, "Animation End Offset", "Animation end offset (trim end).");
+ RNA_def_property_ui_text(prop, "Animation End Offset", "Animation end offset (trim end)");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
}
@@ -848,7 +870,7 @@ static void rna_def_image(BlenderRNA *brna)
PropertyRNA *prop;
srna = RNA_def_struct(brna, "ImageSequence", "Sequence");
- RNA_def_struct_ui_text(srna, "Image Sequence", "Sequence strip to load one or more images.");
+ RNA_def_struct_ui_text(srna, "Image Sequence", "Sequence strip to load one or more images");
RNA_def_struct_sdna(srna, "Sequence");
prop= RNA_def_property(srna, "directory", PROP_STRING, PROP_DIRPATH);
@@ -872,7 +894,7 @@ static void rna_def_meta(BlenderRNA *brna)
PropertyRNA *prop;
srna = RNA_def_struct(brna, "MetaSequence", "Sequence");
- RNA_def_struct_ui_text(srna, "Meta Sequence", "Sequence strip to group other strips as a single sequence strip.");
+ RNA_def_struct_ui_text(srna, "Meta Sequence", "Sequence strip to group other strips as a single sequence strip");
RNA_def_struct_sdna(srna, "Sequence");
prop = RNA_def_property(srna, "sequences", PROP_COLLECTION, PROP_NONE);
@@ -891,12 +913,12 @@ static void rna_def_scene(BlenderRNA *brna)
PropertyRNA *prop;
srna = RNA_def_struct(brna, "SceneSequence", "Sequence");
- RNA_def_struct_ui_text(srna, "Scene Sequence", "Sequence strip to used the rendered image of a scene.");
+ RNA_def_struct_ui_text(srna, "Scene Sequence", "Sequence strip to used the rendered image of a scene");
RNA_def_struct_sdna(srna, "Sequence");
prop= RNA_def_property(srna, "scene", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Scene", "Scene that this sequence uses.");
+ RNA_def_property_ui_text(prop, "Scene", "Scene that this sequence uses");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
rna_def_filter_video(srna);
@@ -910,24 +932,19 @@ static void rna_def_movie(BlenderRNA *brna)
PropertyRNA *prop;
srna = RNA_def_struct(brna, "MovieSequence", "Sequence");
- RNA_def_struct_ui_text(srna, "Movie Sequence", "Sequence strip to load a video.");
+ RNA_def_struct_ui_text(srna, "Movie Sequence", "Sequence strip to load a video");
RNA_def_struct_sdna(srna, "Sequence");
prop= RNA_def_property(srna, "mpeg_preseek", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "anim_preseek");
RNA_def_property_range(prop, 0, 50);
- RNA_def_property_ui_text(prop, "MPEG Preseek", "For MPEG movies, preseek this many frames.");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
-
- prop= RNA_def_property(srna, "filename", PROP_STRING, PROP_FILEPATH);
- RNA_def_property_string_sdna(prop, NULL, "strip->stripdata->name");
- RNA_def_property_ui_text(prop, "Filename", "");
- RNA_def_property_string_funcs(prop, NULL, NULL, "rna_MovieSequence_filename_set");
+ RNA_def_property_ui_text(prop, "MPEG Preseek", "For MPEG movies, preseek this many frames");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
- prop= RNA_def_property(srna, "directory", PROP_STRING, PROP_DIRPATH);
- RNA_def_property_string_sdna(prop, NULL, "strip->dir");
- RNA_def_property_ui_text(prop, "Directory", "");
+ prop= RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
+ RNA_def_property_ui_text(prop, "File", "");
+ RNA_def_property_string_funcs(prop, "rna_Sequence_filepath_get", "rna_Sequence_filepath_length",
+ "rna_Sequence_filepath_set");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
rna_def_filter_video(srna);
@@ -941,34 +958,27 @@ static void rna_def_sound(BlenderRNA *brna)
PropertyRNA *prop;
srna = RNA_def_struct(brna, "SoundSequence", "Sequence");
- RNA_def_struct_ui_text(srna, "Sound Sequence", "Sequence strip defining a sound to be played over a period of time.");
+ RNA_def_struct_ui_text(srna, "Sound Sequence", "Sequence strip defining a sound to be played over a period of time");
RNA_def_struct_sdna(srna, "Sequence");
prop= RNA_def_property(srna, "sound", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "Sound");
- RNA_def_property_ui_text(prop, "Sound", "Sound datablock used by this sequence.");
+ RNA_def_property_ui_text(prop, "Sound", "Sound datablock used by this sequence");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
- prop= RNA_def_property(srna, "filename", PROP_STRING, PROP_FILEPATH);
- RNA_def_property_string_sdna(prop, NULL, "strip->stripdata->name");
- RNA_def_property_ui_text(prop, "Filename", "");
- RNA_def_property_string_funcs(prop, NULL, NULL, "rna_SoundSequence_filename_set");
+ prop= RNA_def_property(srna, "volume", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "volume");
+ RNA_def_property_range(prop, 0.0f, 2.0f);
+ RNA_def_property_ui_text(prop, "Volume", "Playback volume of the sound");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
- prop= RNA_def_property(srna, "directory", PROP_STRING, PROP_DIRPATH);
- RNA_def_property_string_sdna(prop, NULL, "strip->dir");
- RNA_def_property_ui_text(prop, "Directory", "");
+ prop= RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
+ RNA_def_property_ui_text(prop, "File", "");
+ RNA_def_property_string_funcs(prop, "rna_Sequence_filepath_get", "rna_Sequence_filepath_length",
+ "rna_Sequence_filepath_set");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
rna_def_input(srna);
-
- RNA_def_struct_sdna_from(srna, "SoundHandle", "sound_handle");
-
- prop= RNA_def_property(srna, "volume", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "volume");
- RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Volume", "Playback volume of the sound");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
}
static void rna_def_effect(BlenderRNA *brna)
@@ -976,7 +986,7 @@ static void rna_def_effect(BlenderRNA *brna)
StructRNA *srna;
srna = RNA_def_struct(brna, "EffectSequence", "Sequence");
- RNA_def_struct_ui_text(srna, "Effect Sequence", "Sequence strip applying an effect on the images created by other strips.");
+ RNA_def_struct_ui_text(srna, "Effect Sequence", "Sequence strip applying an effect on the images created by other strips");
RNA_def_struct_sdna(srna, "Sequence");
rna_def_proxy(srna);
@@ -988,7 +998,7 @@ static void rna_def_plugin(BlenderRNA *brna)
PropertyRNA *prop;
srna = RNA_def_struct(brna, "PluginSequence", "EffectSequence");
- RNA_def_struct_ui_text(srna, "Plugin Sequence", "Sequence strip applying an effect, loaded from an external plugin.");
+ RNA_def_struct_ui_text(srna, "Plugin Sequence", "Sequence strip applying an effect, loaded from an external plugin");
RNA_def_struct_sdna_from(srna, "PluginSeq", "plugin");
prop= RNA_def_property(srna, "filename", PROP_STRING, PROP_FILEPATH);
@@ -1022,25 +1032,25 @@ static void rna_def_wipe(BlenderRNA *brna)
};
srna = RNA_def_struct(brna, "WipeSequence", "EffectSequence");
- RNA_def_struct_ui_text(srna, "Wipe Sequence", "Sequence strip creating a wipe transition.");
+ RNA_def_struct_ui_text(srna, "Wipe Sequence", "Sequence strip creating a wipe transition");
RNA_def_struct_sdna_from(srna, "WipeVars", "effectdata");
prop= RNA_def_property(srna, "blur_width", PROP_FLOAT, PROP_UNSIGNED);
RNA_def_property_float_sdna(prop, NULL, "edgeWidth");
RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Blur Width", "Width of the blur edge, in percentage relative to the image size.");
+ RNA_def_property_ui_text(prop, "Blur Width", "Width of the blur edge, in percentage relative to the image size");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
prop= RNA_def_property(srna, "angle", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "angle");
RNA_def_property_range(prop, -90.0f, 90.0f);
- RNA_def_property_ui_text(prop, "Angle", "Edge angle.");
+ RNA_def_property_ui_text(prop, "Angle", "Edge angle");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
prop= RNA_def_property(srna, "direction", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "forward");
RNA_def_property_enum_items(prop, wipe_direction_items);
- RNA_def_property_ui_text(prop, "Direction", "Wipe direction.");
+ RNA_def_property_ui_text(prop, "Direction", "Wipe direction");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
prop= RNA_def_property(srna, "transition_type", PROP_ENUM, PROP_NONE);
@@ -1056,7 +1066,7 @@ static void rna_def_glow(BlenderRNA *brna)
PropertyRNA *prop;
srna = RNA_def_struct(brna, "GlowSequence", "EffectSequence");
- RNA_def_struct_ui_text(srna, "Glow Sequence", "Sequence strip creating a glow effect.");
+ RNA_def_struct_ui_text(srna, "Glow Sequence", "Sequence strip creating a glow effect");
RNA_def_struct_sdna_from(srna, "GlowVars", "effectdata");
prop= RNA_def_property(srna, "threshold", PROP_FLOAT, PROP_NONE);
@@ -1068,30 +1078,30 @@ static void rna_def_glow(BlenderRNA *brna)
prop= RNA_def_property(srna, "clamp", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "fClamp");
RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Clamp", "rightness limit of intensity.");
+ RNA_def_property_ui_text(prop, "Clamp", "rightness limit of intensity");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
prop= RNA_def_property(srna, "boost_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "fBoost");
RNA_def_property_range(prop, 0.0f, 10.0f);
- RNA_def_property_ui_text(prop, "Boost Factor", "Brightness multiplier.");
+ RNA_def_property_ui_text(prop, "Boost Factor", "Brightness multiplier");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
prop= RNA_def_property(srna, "blur_distance", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "dDist");
RNA_def_property_range(prop, 0.5f, 20.0f);
- RNA_def_property_ui_text(prop, "Blur Distance", "Radius of glow effect.");
+ RNA_def_property_ui_text(prop, "Blur Distance", "Radius of glow effect");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
prop= RNA_def_property(srna, "quality", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "dQuality");
RNA_def_property_range(prop, 1, 5);
- RNA_def_property_ui_text(prop, "Quality", "Accuracy of the blur effect.");
+ RNA_def_property_ui_text(prop, "Quality", "Accuracy of the blur effect");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
prop= RNA_def_property(srna, "only_boost", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "bNoComp", 0);
- RNA_def_property_ui_text(prop, "Only Boost", "Show the glow buffer only.");
+ RNA_def_property_ui_text(prop, "Only Boost", "Show the glow buffer only");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
}
@@ -1101,9 +1111,9 @@ static void rna_def_transform(BlenderRNA *brna)
PropertyRNA *prop;
static const EnumPropertyItem interpolation_items[]= {
- {0, "NONE", 0, "None", "No interpolation."},
- {1, "BILINEAR", 0, "Bilinear", "Bilinear interpolation."},
- {2, "BICUBIC", 0, "Bicubic", "Bicubic interpolation."},
+ {0, "NONE", 0, "None", "No interpolation"},
+ {1, "BILINEAR", 0, "Bilinear", "Bilinear interpolation"},
+ {2, "BICUBIC", 0, "Bicubic", "Bicubic interpolation"},
{0, NULL, 0, NULL, NULL}
};
@@ -1114,7 +1124,7 @@ static void rna_def_transform(BlenderRNA *brna)
};
srna = RNA_def_struct(brna, "TransformSequence", "EffectSequence");
- RNA_def_struct_ui_text(srna, "Transform Sequence", "Sequence strip applying affine transformations to other strips.");
+ RNA_def_struct_ui_text(srna, "Transform Sequence", "Sequence strip applying affine transformations to other strips");
RNA_def_struct_sdna_from(srna, "TransformVars", "effectdata");
prop= RNA_def_property(srna, "scale_start_x", PROP_FLOAT, PROP_UNSIGNED);
@@ -1131,7 +1141,7 @@ static void rna_def_transform(BlenderRNA *brna)
prop= RNA_def_property(srna, "uniform_scale", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uniform_scale", 0);
- RNA_def_property_ui_text(prop, "Uniform Scale", "Scale uniformly, preserving aspect ratio.");
+ RNA_def_property_ui_text(prop, "Uniform Scale", "Scale uniformly, preserving aspect ratio");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
prop= RNA_def_property(srna, "translate_start_x", PROP_FLOAT, PROP_NONE);
@@ -1154,14 +1164,14 @@ static void rna_def_transform(BlenderRNA *brna)
prop= RNA_def_property(srna, "translation_unit", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "percent");
- RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE); /* not meant to be animated */
+ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); /* not meant to be animated */
RNA_def_property_enum_items(prop, translation_unit_items);
RNA_def_property_ui_text(prop, "Translation Unit", "");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
prop= RNA_def_property(srna, "interpolation", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, interpolation_items);
- RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE); /* not meant to be animated */
+ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); /* not meant to be animated */
RNA_def_property_ui_text(prop, "Interpolation", "");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
}
@@ -1172,7 +1182,7 @@ static void rna_def_solid_color(BlenderRNA *brna)
PropertyRNA *prop;
srna = RNA_def_struct(brna, "ColorSequence", "EffectSequence");
- RNA_def_struct_ui_text(srna, "Color Sequence", "Sequence strip creating an image filled with a single color.");
+ RNA_def_struct_ui_text(srna, "Color Sequence", "Sequence strip creating an image filled with a single color");
RNA_def_struct_sdna_from(srna, "SolidColorVars", "effectdata");
prop= RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR);
@@ -1187,29 +1197,29 @@ static void rna_def_speed_control(BlenderRNA *brna)
PropertyRNA *prop;
srna = RNA_def_struct(brna, "SpeedControlSequence", "EffectSequence");
- RNA_def_struct_ui_text(srna, "SpeedControl Sequence", "Sequence strip to control the speed of other strips.");
+ RNA_def_struct_ui_text(srna, "SpeedControl Sequence", "Sequence strip to control the speed of other strips");
RNA_def_struct_sdna_from(srna, "SpeedControlVars", "effectdata");
prop= RNA_def_property(srna, "global_speed", PROP_FLOAT, PROP_UNSIGNED);
RNA_def_property_float_sdna(prop, NULL, "globalSpeed");
- RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE); /* seq->facf0 is used to animate this */
+ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); /* seq->facf0 is used to animate this */
RNA_def_property_ui_text(prop, "Global Speed", "");
RNA_def_property_ui_range(prop, 0.0f, 100.0f, 1, 0);
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
prop= RNA_def_property(srna, "curve_velocity", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", SEQ_SPEED_INTEGRATE);
- RNA_def_property_ui_text(prop, "F-Curve Velocity", "Interpret the F-Curve value as a velocity instead of a frame number.");
+ RNA_def_property_ui_text(prop, "F-Curve Velocity", "Interpret the F-Curve value as a velocity instead of a frame number");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
prop= RNA_def_property(srna, "frame_blending", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", SEQ_SPEED_BLEND);
- RNA_def_property_ui_text(prop, "Frame Blending", "Blend two frames into the target for a smoother result.");
+ RNA_def_property_ui_text(prop, "Frame Blending", "Blend two frames into the target for a smoother result");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
prop= RNA_def_property(srna, "curve_compress_y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", SEQ_SPEED_COMPRESS_IPO_Y);
- RNA_def_property_ui_text(prop, "F-Curve Compress Y", "Scale F-Curve value to get the target frame number, F-Curve value runs from 0.0 to 1.0.");
+ RNA_def_property_ui_text(prop, "F-Curve Compress Y", "Scale F-Curve value to get the target frame number, F-Curve value runs from 0.0 to 1.0");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
}
diff --git a/source/blender/makesrna/intern/rna_smoke.c b/source/blender/makesrna/intern/rna_smoke.c
index 11b1e80865e..8d5b38d767d 100644
--- a/source/blender/makesrna/intern/rna_smoke.c
+++ b/source/blender/makesrna/intern/rna_smoke.c
@@ -15,7 +15,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor(s): Daniel Genrich
*
@@ -117,8 +117,13 @@ static void rna_def_smoke_domain_settings(BlenderRNA *brna)
/* {MOD_SMOKE_NOISECURL, "NOISECURL", 0, "Curl", ""}, */
{0, NULL, 0, NULL, NULL}};
+ static EnumPropertyItem smoke_cache_comp_items[] = {
+ {SM_CACHE_LIGHT, "CACHELIGHT", 0, "Light", "Fast but not so effective compression"},
+ {SM_CACHE_HEAVY, "CACHEHEAVY", 0, "Heavy", "Effective but slow compression"},
+ {0, NULL, 0, NULL, NULL}};
+
srna = RNA_def_struct(brna, "SmokeDomainSettings", NULL);
- RNA_def_struct_ui_text(srna, "Domain Settings", "Smoke domain settings.");
+ RNA_def_struct_ui_text(srna, "Domain Settings", "Smoke domain settings");
RNA_def_struct_sdna(srna, "SmokeDomainSettings");
RNA_def_struct_path_func(srna, "rna_SmokeDomainSettings_path");
@@ -126,24 +131,24 @@ static void rna_def_smoke_domain_settings(BlenderRNA *brna)
RNA_def_property_int_sdna(prop, NULL, "maxres");
RNA_def_property_range(prop, 24, 512);
RNA_def_property_ui_range(prop, 24, 512, 2, 0);
- RNA_def_property_ui_text(prop, "Max Res", "Maximal resolution used in the fluid domain.");
+ 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, "amplify", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "amplify");
RNA_def_property_range(prop, 1, 10);
RNA_def_property_ui_range(prop, 1, 10, 1, 0);
- RNA_def_property_ui_text(prop, "Amplification", "Enhance the resolution of smoke by this factor using noise.");
+ RNA_def_property_ui_text(prop, "Amplification", "Enhance the resolution of smoke by this factor using noise");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
prop= RNA_def_property(srna, "highres", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_SMOKE_HIGHRES);
- RNA_def_property_ui_text(prop, "High res", "Enable high resolution (using amplification).");
+ RNA_def_property_ui_text(prop, "High res", "Enable high resolution (using amplification)");
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_ui_text(prop, "Show High Resolution", "Show high resolution (using amplification).");
+ RNA_def_property_ui_text(prop, "Show High Resolution", "Show high resolution (using amplification)");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
prop= RNA_def_property(srna, "noise_type", PROP_ENUM, PROP_NONE);
@@ -163,28 +168,28 @@ static void rna_def_smoke_domain_settings(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "beta");
RNA_def_property_range(prop, -5.0, 5.0);
RNA_def_property_ui_range(prop, -5.0, 5.0, 0.02, 5);
- RNA_def_property_ui_text(prop, "Heat", "Higher value results in faster rising smoke.");
+ RNA_def_property_ui_text(prop, "Heat", "Higher value results in faster rising smoke");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
prop= RNA_def_property(srna, "coll_group", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "coll_group");
RNA_def_property_struct_type(prop, "Group");
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Collision Group", "Limit collisions to this group.");
+ RNA_def_property_ui_text(prop, "Collision Group", "Limit collisions to this group");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset_dependancy");
prop= RNA_def_property(srna, "fluid_group", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "fluid_group");
RNA_def_property_struct_type(prop, "Group");
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Fluid Group", "Limit fluid objects to this group.");
+ RNA_def_property_ui_text(prop, "Fluid Group", "Limit fluid objects to this group");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset_dependancy");
prop= RNA_def_property(srna, "eff_group", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "eff_group");
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_ui_text(prop, "Effector Group", "Limit effectors to this group");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset_dependancy");
prop= RNA_def_property(srna, "strength", PROP_FLOAT, PROP_NONE);
@@ -201,9 +206,14 @@ static void rna_def_smoke_domain_settings(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Dissolve Speed", "Dissolve Speed");
RNA_def_property_update(prop, 0, NULL);
+ prop= RNA_def_property(srna, "initial_velocity", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_SMOKE_INITVELOCITY);
+ RNA_def_property_ui_text(prop, "Initial Velocity", "Smoke inherits it's velocity from the emitter particle");
+ RNA_def_property_update(prop, 0, 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_ui_text(prop, "Dissolve Smoke", "Enable smoke to disappear over time");
RNA_def_property_update(prop, 0, NULL);
prop= RNA_def_property(srna, "dissolve_smoke_log", PROP_BOOLEAN, PROP_NONE);
@@ -221,10 +231,24 @@ static void rna_def_smoke_domain_settings(BlenderRNA *brna)
RNA_def_property_pointer_sdna(prop, NULL, "point_cache[1]");
RNA_def_property_ui_text(prop, "Point Cache", "");
+ prop= RNA_def_property(srna, "smoke_cache_comp", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "cache_comp");
+ RNA_def_property_enum_items(prop, smoke_cache_comp_items);
+ RNA_def_property_ui_text(prop, "Cache Compression", "Compression method to be used");
+ RNA_def_property_update(prop, 0, NULL);
+
+ prop= RNA_def_property(srna, "smoke_cache_high_comp", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "cache_high_comp");
+ RNA_def_property_enum_items(prop, smoke_cache_comp_items);
+ RNA_def_property_ui_text(prop, "Cache Compression", "Compression method to be used");
+ RNA_def_property_update(prop, 0, NULL);
+
+
prop= RNA_def_property(srna, "effector_weights", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "EffectorWeights");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Effector Weights", "");
+
}
static void rna_def_smoke_flow_settings(BlenderRNA *brna)
@@ -233,7 +257,7 @@ static void rna_def_smoke_flow_settings(BlenderRNA *brna)
PropertyRNA *prop;
srna = RNA_def_struct(brna, "SmokeFlowSettings", NULL);
- RNA_def_struct_ui_text(srna, "Flow Settings", "Smoke flow settings.");
+ RNA_def_struct_ui_text(srna, "Flow Settings", "Smoke flow settings");
RNA_def_struct_sdna(srna, "SmokeFlowSettings");
RNA_def_struct_path_func(srna, "rna_SmokeFlowSettings_path");
@@ -248,14 +272,14 @@ static void rna_def_smoke_flow_settings(BlenderRNA *brna)
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_ui_text(prop, "Temp. Diff.", "Temperature difference to ambientt temperature");
RNA_def_property_update(prop, 0, 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_ui_text(prop, "Particle Systems", "Particle systems emitted from the object");
RNA_def_property_update(prop, 0, "rna_Smoke_reset_dependancy");
prop= RNA_def_property(srna, "outflow", PROP_BOOLEAN, PROP_NONE);
@@ -269,7 +293,7 @@ static void rna_def_smoke_coll_settings(BlenderRNA *brna)
StructRNA *srna;
srna = RNA_def_struct(brna, "SmokeCollSettings", NULL);
- RNA_def_struct_ui_text(srna, "Collision Settings", "Smoke collision settings.");
+ RNA_def_struct_ui_text(srna, "Collision Settings", "Smoke collision settings");
RNA_def_struct_sdna(srna, "SmokeCollSettings");
RNA_def_struct_path_func(srna, "rna_SmokeCollSettings_path");
}
diff --git a/source/blender/makesrna/intern/rna_sound.c b/source/blender/makesrna/intern/rna_sound.c
index 7fc209bfc5f..584e3802db1 100644
--- a/source/blender/makesrna/intern/rna_sound.c
+++ b/source/blender/makesrna/intern/rna_sound.c
@@ -15,7 +15,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor(s): Campbell Barton, Roland Hess
*
@@ -66,14 +66,14 @@ static void rna_def_sound(BlenderRNA *brna)
srna= RNA_def_struct(brna, "Sound", "ID");
RNA_def_struct_sdna(srna, "bSound");
- RNA_def_struct_ui_text(srna, "Sound", "Sound datablock referencing an external or packed sound file.");
+ RNA_def_struct_ui_text(srna, "Sound", "Sound datablock referencing an external or packed sound file");
RNA_def_struct_ui_icon(srna, ICON_SOUND);
//rna_def_ipo_common(srna);
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_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);
@@ -82,7 +82,7 @@ static void rna_def_sound(BlenderRNA *brna)
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_ui_text(prop, "Caching", "The sound file is decoded and loaded into RAM");
RNA_def_property_update(prop, 0, "rna_Sound_filename_update");
}
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 35c8c7ac345..6f3faeeda35 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -15,7 +15,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor(s): Blender Foundation (2008)
*
@@ -65,12 +65,12 @@ EnumPropertyItem space_type_items[] = {
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem draw_channels_items[] = {
- {0, "COLOR", ICON_IMAGE_RGB, "Color", "Draw image with RGB colors."},
- {SI_USE_ALPHA, "COLOR_ALPHA", ICON_IMAGE_RGB_ALPHA, "Color and Alpha", "Draw image with RGB colors and alpha transparency."},
- {SI_SHOW_ALPHA, "ALPHA", ICON_IMAGE_ALPHA, "Alpha", "Draw alpha transparency channel."},
- {SI_SHOW_ZBUF, "Z_BUFFER", ICON_IMAGE_ZDEPTH, "Z-Buffer", "Draw Z-buffer associated with image (mapped from camera clip start to end)."},
+ {0, "COLOR", ICON_IMAGE_RGB, "Color", "Draw image with RGB colors"},
+ {SI_USE_ALPHA, "COLOR_ALPHA", ICON_IMAGE_RGB_ALPHA, "Color and Alpha", "Draw image with RGB colors and alpha transparency"},
+ {SI_SHOW_ALPHA, "ALPHA", ICON_IMAGE_ALPHA, "Alpha", "Draw alpha transparency channel"},
+ {SI_SHOW_ZBUF, "Z_BUFFER", ICON_IMAGE_ZDEPTH, "Z-Buffer", "Draw Z-buffer associated with image (mapped from camera clip start to end)"},
#ifdef WITH_LCMS
- {SI_COLOR_CORRECTION, "COLOR_CORRECTED", ICON_IMAGE_ALPHA, "Color Corrected", "Display color corrected image."},
+ {SI_COLOR_CORRECTION, "COLOR_CORRECTED", ICON_IMAGE_ALPHA, "Color Corrected", "Display color corrected image"},
#endif
{0, NULL, 0, NULL, NULL}};
@@ -85,9 +85,9 @@ static EnumPropertyItem transform_orientation_items[] = {
EnumPropertyItem autosnap_items[] = {
{SACTSNAP_OFF, "NONE", 0, "No Auto-Snap", ""},
- {SACTSNAP_STEP, "STEP", 0, "Time Step", "Snap to 1.0 frame/second intervals."},
- {SACTSNAP_FRAME, "FRAME", 0, "Nearest Frame", "Snap to actual frames/seconds (nla-action time)."},
- {SACTSNAP_MARKER, "MARKER", 0, "Nearest Marker", "Snap to nearest marker."},
+ {SACTSNAP_STEP, "STEP", 0, "Time Step", "Snap to 1.0 frame/second intervals"},
+ {SACTSNAP_FRAME, "FRAME", 0, "Nearest Frame", "Snap to actual frames/seconds (nla-action time)"},
+ {SACTSNAP_MARKER, "MARKER", 0, "Nearest Marker", "Snap to nearest marker"},
{0, NULL, 0, NULL, NULL}};
#ifdef RNA_RUNTIME
@@ -158,6 +158,40 @@ static StructRNA* rna_Space_refine(struct PointerRNA *ptr)
}
}
+static ScrArea *rna_area_from_space(PointerRNA *ptr)
+{
+ bScreen *sc = (bScreen*)ptr->id.data;
+ SpaceLink *link= (SpaceLink*)ptr->data;
+ ScrArea *sa;
+
+ for(sa=sc->areabase.first; sa; sa=sa->next)
+ if(BLI_findindex(&sa->spacedata, link) != -1)
+ return sa;
+
+ return NULL;
+}
+
+static void rna_area_region_from_regiondata(PointerRNA *ptr, ScrArea **sa_r, ARegion **ar_r)
+{
+ bScreen *sc = (bScreen*)ptr->id.data;
+ ScrArea *sa;
+ ARegion *ar;
+ void *regiondata= ptr->data;
+
+ *sa_r= NULL;
+ *ar_r= NULL;
+
+ for(sa=sc->areabase.first; sa; sa=sa->next) {
+ for(ar=sa->regionbase.first; ar; ar=ar->next) {
+ if(ar->regiondata == regiondata) {
+ *sa_r= sa;
+ *ar_r= ar;
+ return;
+ }
+ }
+ }
+}
+
static PointerRNA rna_CurrentOrientation_get(PointerRNA *ptr)
{
Scene *scene = ((bScreen*)ptr->id.data)->scene;
@@ -243,6 +277,38 @@ static void rna_Space3DView_layer_set(PointerRNA *ptr, const int *values)
v3d->lay= ED_view3d_scene_layer_set(v3d->lay, values);
}
+static PointerRNA rna_SpaceView3D_region_3d_get(PointerRNA *ptr)
+{
+ View3D *v3d= (View3D*)(ptr->data);
+ ScrArea *sa= rna_area_from_space(ptr);
+ ListBase *regionbase= (sa->spacedata.first == v3d)? &sa->regionbase: &v3d->regionbase;
+ ARegion *ar= regionbase->last; /* always last in list, weak .. */
+
+ return rna_pointer_inherit_refine(ptr, &RNA_Region3DView, ar->regiondata);
+}
+
+static PointerRNA rna_SpaceView3D_region_quadview_get(PointerRNA *ptr)
+{
+ View3D *v3d= (View3D*)(ptr->data);
+ ScrArea *sa= rna_area_from_space(ptr);
+ ListBase *regionbase= (sa->spacedata.first == v3d)? &sa->regionbase: &v3d->regionbase;
+ ARegion *ar= regionbase->last; /* always before last in list, weak .. */
+
+ ar= (ar->alignment == RGN_ALIGN_QSPLIT)? ar->prev: NULL;
+
+ return rna_pointer_inherit_refine(ptr, &RNA_Region3DView, (ar)? ar->regiondata: NULL);
+}
+
+static void rna_Region3DView_quadview_update(Main *main, Scene *scene, PointerRNA *ptr)
+{
+ ScrArea *sa;
+ ARegion *ar;
+
+ rna_area_region_from_regiondata(ptr, &sa, &ar);
+ if(sa && ar && ar->alignment==RGN_ALIGN_QSPLIT)
+ ED_view3d_quadview_update(sa, ar);
+}
+
/* Space Image Editor */
static PointerRNA rna_SpaceImageEditor_uvedit_get(PointerRNA *ptr)
@@ -333,6 +399,20 @@ static void rna_SpaceImageEditor_curves_update(Main *bmain, Scene *scene, Pointe
WM_main_add_notifier(NC_IMAGE, sima->image);
}
+static void rna_SpaceImageEditor_histogram_update(Main *bmain, Scene *scene, PointerRNA *ptr)
+{
+ SpaceImage *sima= (SpaceImage*)ptr->data;
+ ImBuf *ibuf;
+ void *lock;
+
+ ibuf= ED_space_image_acquire_buffer(sima, &lock);
+ if(ibuf) {
+ histogram_update(&sima->hist, ibuf);
+ WM_main_add_notifier(NC_IMAGE, sima->image);
+ }
+ ED_space_image_release_buffer(sima, lock);
+}
+
/* Space Text Editor */
@@ -412,22 +492,6 @@ static void rna_ConsoleLine_cursor_index_range(PointerRNA *ptr, int *min, int *m
*max= ci->len;
}
-static void rna_View3D_display_background_image_set(PointerRNA *ptr, int value)
-{
- View3D *vd= (View3D*)ptr->data;
-
- if(value) vd->flag |= V3D_DISPBGPIC;
- else vd->flag &= ~V3D_DISPBGPIC;
-
- if((vd->flag & V3D_DISPBGPIC) && vd->bgpic == NULL) {
- vd->bgpic= MEM_callocN(sizeof(BGpic), "bgpic");
- vd->bgpic->size= 5.0;
- vd->bgpic->blend= 0.5;
- vd->bgpic->iuser.fie_ima= 2;
- vd->bgpic->iuser.ok= 1;
- }
-}
-
/* Space Time */
static void rna_SpaceTime_redraw_update(Main *bmain, Scene *scene, PointerRNA *ptr)
@@ -452,7 +516,7 @@ static void rna_SpaceDopeSheetEditor_action_update(Main *bmain, Scene *scene, Po
Object *obact= (scene->basact)? scene->basact->object: NULL;
/* we must set this action to be the one used by active object (if not pinned) */
- if(obact && saction->pin == 0) {
+ if(obact/* && saction->pin == 0*/) {
AnimData *adt= BKE_id_add_animdata(&obact->id); /* this only adds if non-existant */
/* set action */
@@ -467,7 +531,7 @@ static void rna_SpaceDopeSheetEditor_action_update(Main *bmain, Scene *scene, Po
static void rna_SpaceDopeSheetEditor_mode_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
SpaceAction *saction= (SpaceAction*)(ptr->data);
-
+
/* special exception for ShapeKey Editor mode:
* enable 'show sliders' by default, since one of the main
* points of the ShapeKey Editor is to provide a one-stop shop
@@ -477,6 +541,19 @@ static void rna_SpaceDopeSheetEditor_mode_update(Main *bmain, Scene *scene, Poin
saction->flag |= SACTION_SLIDERS;
}
+/* Space Graph Editor */
+
+static void rna_SpaceGraphEditor_display_mode_update(bContext *C, PointerRNA *ptr)
+{
+ //SpaceIpo *sipo= (SpaceIpo*)(ptr->data);
+ ScrArea *sa= CTX_wm_area(C);
+
+ /* after changing view mode, must force recalculation of F-Curve colors
+ * which can only be achieved using refresh as opposed to redraw
+ */
+ ED_area_tag_refresh(sa);
+}
+
static int rna_SpaceGraphEditor_has_ghost_curves_get(PointerRNA *ptr)
{
SpaceIpo *sipo= (SpaceIpo*)(ptr->data);
@@ -499,14 +576,14 @@ static void rna_def_space(BlenderRNA *brna)
srna= RNA_def_struct(brna, "Space", NULL);
RNA_def_struct_sdna(srna, "SpaceLink");
- RNA_def_struct_ui_text(srna, "Space", "Space data for a screen area.");
+ RNA_def_struct_ui_text(srna, "Space", "Space data for a screen area");
RNA_def_struct_refine_func(srna, "rna_Space_refine");
prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "spacetype");
RNA_def_property_enum_items(prop, space_type_items);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Type", "Space data type.");
+ RNA_def_property_ui_text(prop, "Type", "Space data type");
}
static void rna_def_space_image_uv(BlenderRNA *brna)
@@ -515,21 +592,21 @@ static void rna_def_space_image_uv(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem sticky_mode_items[] = {
- {SI_STICKY_DISABLE, "DISABLED", ICON_STICKY_UVS_DISABLE, "Disabled", "Sticky vertex selection disabled."},
- {SI_STICKY_LOC, "SHARED_LOCATION", ICON_STICKY_UVS_LOC, "Shared Location", "Select UVs that are at the same location and share a mesh vertex."},
- {SI_STICKY_VERTEX, "SHARED_VERTEX", ICON_STICKY_UVS_VERT, "Shared Vertex", "Select UVs that share mesh vertex, irrespective if they are in the same location."},
+ {SI_STICKY_DISABLE, "DISABLED", ICON_STICKY_UVS_DISABLE, "Disabled", "Sticky vertex selection disabled"},
+ {SI_STICKY_LOC, "SHARED_LOCATION", ICON_STICKY_UVS_LOC, "Shared Location", "Select UVs that are at the same location and share a mesh vertex"},
+ {SI_STICKY_VERTEX, "SHARED_VERTEX", ICON_STICKY_UVS_VERT, "Shared Vertex", "Select UVs that share mesh vertex, irrespective if they are in the same location"},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem dt_uv_items[] = {
- {SI_UVDT_OUTLINE, "OUTLINE", 0, "Outline", "Draw white edges with black outline."},
- {SI_UVDT_DASH, "DASH", 0, "Dash", "Draw dashed black-white edges."},
- {SI_UVDT_BLACK, "BLACK", 0, "Black", "Draw black edges."},
- {SI_UVDT_WHITE, "WHITE", 0, "White", "Draw white edges."},
+ {SI_UVDT_OUTLINE, "OUTLINE", 0, "Outline", "Draw white edges with black outline"},
+ {SI_UVDT_DASH, "DASH", 0, "Dash", "Draw dashed black-white edges"},
+ {SI_UVDT_BLACK, "BLACK", 0, "Black", "Draw black edges"},
+ {SI_UVDT_WHITE, "WHITE", 0, "White", "Draw white edges"},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem dt_uvstretch_items[] = {
- {SI_UVDT_STRETCH_ANGLE, "ANGLE", 0, "Angle", "Angular distortion between UV and 3D angles."},
- {SI_UVDT_STRETCH_AREA, "AREA", 0, "Area", "Area distortion between UV and 3D faces."},
+ {SI_UVDT_STRETCH_ANGLE, "ANGLE", 0, "Angle", "Angular distortion between UV and 3D angles"},
+ {SI_UVDT_STRETCH_AREA, "AREA", 0, "Area", "Area distortion between UV and 3D faces"},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem pivot_items[] = {
@@ -541,74 +618,74 @@ static void rna_def_space_image_uv(BlenderRNA *brna)
srna= RNA_def_struct(brna, "SpaceUVEditor", NULL);
RNA_def_struct_sdna(srna, "SpaceImage");
RNA_def_struct_nested(brna, srna, "SpaceImageEditor");
- RNA_def_struct_ui_text(srna, "Space UV Editor", "UV editor data for the image editor space.");
+ RNA_def_struct_ui_text(srna, "Space UV Editor", "UV editor data for the image editor space");
/* selection */
prop= RNA_def_property(srna, "sticky_selection_mode", PROP_ENUM, PROP_NONE);
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_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);
/* 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_ui_text(prop, "Edge Draw Type", "Draw type for drawing UV edges");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, 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_ui_text(prop, "Draw Smooth Edges", "Draw UV edges anti-aliased");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, 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_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);
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_ui_text(prop, "Draw Stretch Type", "Type of stretch to draw");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, 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_ui_text(prop, "Draw Modified Edges", "Draw edges after modifiers are applied");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, 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_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);
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_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);
/* 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_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_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_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_ui_text(prop, "Pivot", "Rotation/Scaling Pivot");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
}
@@ -634,7 +711,7 @@ static void rna_def_space_outliner(BlenderRNA *brna)
srna= RNA_def_struct(brna, "SpaceOutliner", "Space");
RNA_def_struct_sdna(srna, "SpaceOops");
- RNA_def_struct_ui_text(srna, "Space Outliner", "Outliner space data.");
+ RNA_def_struct_ui_text(srna, "Space Outliner", "Outliner space data");
prop= RNA_def_property(srna, "display_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "outlinevis");
@@ -654,20 +731,39 @@ static void rna_def_background_image(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
+ /* note: combinations work but dont flip so arnt that useful */
+ static EnumPropertyItem bgpic_axis_items[] = {
+ {0, "", 0, "X Axis", ""},
+ {(1<<RV3D_VIEW_LEFT), "LEFT", 0, "Left", ""},
+ {(1<<RV3D_VIEW_RIGHT), "RIGHT", 0, "Right", ""},
+ /*{(1<<RV3D_VIEW_LEFT)|(1<<RV3D_VIEW_RIGHT), "LEFT_RIGHT", 0, "Left/Right", ""},*/
+ {0, "", 0, "Y Axis", ""},
+ {(1<<RV3D_VIEW_BACK), "BACK", 0, "Back", ""},
+ {(1<<RV3D_VIEW_FRONT), "FRONT", 0, "Front", ""},
+ /*{(1<<RV3D_VIEW_BACK)|(1<<RV3D_VIEW_FRONT), "BACK_FRONT", 0, "Back/Front", ""},*/
+ {0, "", 0, "Z Axis", ""},
+ {(1<<RV3D_VIEW_BOTTOM), "BOTTOM", 0, "Bottom", ""},
+ {(1<<RV3D_VIEW_TOP), "TOP", 0, "Top", ""},
+ /*{(1<<RV3D_VIEW_BOTTOM)|(1<<RV3D_VIEW_TOP), "BOTTOM_TOP", 0, "Top/Bottom", ""},*/
+ {0, "", 0, "Other", ""},
+ {0, "ALL", 0, "All Views", ""},
+ {(1<<RV3D_VIEW_CAMERA), "CAMERA", 0, "Camera", ""},
+ {0, NULL, 0, NULL, NULL}};
+
srna= RNA_def_struct(brna, "BackgroundImage", NULL);
RNA_def_struct_sdna(srna, "BGpic");
- RNA_def_struct_ui_text(srna, "Background Image", "Image and settings for display in the 3d View background.");
+ RNA_def_struct_ui_text(srna, "Background Image", "Image and settings for display in the 3d View background");
prop= RNA_def_property(srna, "image", PROP_POINTER, PROP_NONE);
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_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);
prop= RNA_def_property(srna, "image_user", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, 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_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);
prop= RNA_def_property(srna, "offset_x", PROP_FLOAT, PROP_NONE);
@@ -682,15 +778,27 @@ static void rna_def_background_image(BlenderRNA *brna)
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_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);
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_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);
+
+ prop= RNA_def_property(srna, "view_axis", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "view");
+ RNA_def_property_enum_items(prop, bgpic_axis_items);
+ RNA_def_property_ui_text(prop, "Image Axis", "The axis to display the image on");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+
+ prop= RNA_def_property(srna, "show_expanded", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", V3D_BGPIC_EXPANDED);
+ RNA_def_property_ui_text(prop, "Show Expanded", "Show the expanded in the user interface");
+ RNA_def_property_ui_icon(prop, ICON_TRIA_RIGHT, 1);
+
}
static void rna_def_space_3dview(BlenderRNA *brna)
@@ -721,7 +829,7 @@ static void rna_def_space_3dview(BlenderRNA *brna)
prop= RNA_def_property(srna, "camera", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_EDITABLE);
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_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);
@@ -734,90 +842,86 @@ static void rna_def_space_3dview(BlenderRNA *brna)
RNA_def_property_string_sdna(prop, NULL, "ob_centre_bone");
RNA_def_property_ui_text(prop, "Lock Bone", "3D View center is locked to this bone'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");
- RNA_def_property_ui_text(prop, "Background Image", "Image and settings to display in the 3D View background");
prop= RNA_def_property(srna, "viewport_shading", PROP_ENUM, PROP_NONE);
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_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, "local_view", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "localvd");
- RNA_def_property_ui_text(prop, "Local View", "Display an isolated sub-set of objects, apart from the scene visibility.");
+ RNA_def_property_ui_text(prop, "Local View", "Display an isolated sub-set of objects, apart from the scene visibility");
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_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);
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_ui_text(prop, "Clip Start", "3D View near clipping distance");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, 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_ui_text(prop, "Clip End", "3D View far clipping distance");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, 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_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);
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_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);
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_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);
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_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);
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_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);
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_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);
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_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);
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_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);
prop= RNA_def_property(srna, "all_object_origins", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", V3D_DRAW_CENTERS);
- RNA_def_property_ui_text(prop, "All Object Origins", "Show the object origin center dot for all (selected and unselected) objects.");
+ RNA_def_property_ui_text(prop, "All Object Origins", "Show the object origin center dot for all (selected and unselected) objects");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, 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_ui_text(prop, "Relationship Lines", "Show dashed lines indicating parent or constraint relationships");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
prop= RNA_def_property(srna, "textured_solid", PROP_BOOLEAN, PROP_NONE);
@@ -830,46 +934,51 @@ static void rna_def_space_3dview(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Occlude Geometry", "Limit selection to visible (clipped with depth buffer)");
RNA_def_property_ui_icon(prop, ICON_ORTHO, 0);
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, 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");
+
+ prop= RNA_def_property(srna, "background_images", PROP_COLLECTION, PROP_NONE);
+ RNA_def_property_collection_sdna(prop, NULL, "bgpicbase", NULL);
+ RNA_def_property_struct_type(prop, "BackgroundImage");
+ RNA_def_property_ui_text(prop, "Background Images", "List of background images");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
-
+
+ prop= RNA_def_property(srna, "display_background_images", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", V3D_DISPBGPICS);
+ RNA_def_property_ui_text(prop, "Display Background Images", "Display reference images behind objects in the 3D View");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, 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_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, "pivot_point_align", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", V3D_ALIGN);
- RNA_def_property_ui_text(prop, "Align", "Manipulate object centers only.");
+ RNA_def_property_ui_text(prop, "Align", "Manipulate object centers only");
RNA_def_property_ui_icon(prop, ICON_ALIGN, 0);
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_ui_text(prop, "Manipulator", "Use a 3D manipulator widget for controlling transforms");
RNA_def_property_ui_icon(prop, ICON_MANIPUL, 0);
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, 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_ui_text(prop, "Manipulator Translate", "Use the manipulator for movement transformations");
RNA_def_property_ui_icon(prop, ICON_MAN_TRANS, 0);
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, 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_ui_text(prop, "Manipulator Rotate", "Use the manipulator for rotation transformations");
RNA_def_property_ui_icon(prop, ICON_MAN_ROT, 0);
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, 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_ui_text(prop, "Manipulator Scale", "Use the manipulator for scale transformations");
RNA_def_property_ui_icon(prop, ICON_MAN_SCALE, 0);
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
@@ -877,33 +986,18 @@ static void rna_def_space_3dview(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "twmode");
RNA_def_property_enum_items(prop, transform_orientation_items);
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_TransformOrientation_itemf");
- RNA_def_property_ui_text(prop, "Transform Orientation", "Transformation orientation.");
+ RNA_def_property_ui_text(prop, "Transform Orientation", "Transformation orientation");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
prop= RNA_def_property(srna, "current_orientation", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "TransformOrientation");
RNA_def_property_pointer_funcs(prop, "rna_CurrentOrientation_get", NULL, NULL);
- RNA_def_property_ui_text(prop, "Current Transform Orientation", "Current Transformation orientation.");
-
- 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);
+ RNA_def_property_ui_text(prop, "Current Transform Orientation", "Current Transformation orientation");
prop= RNA_def_property(srna, "lock_camera_and_layers", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "scenelock", 1);
RNA_def_property_boolean_funcs(prop, NULL, "rna_Space3DView_lock_camera_and_layers_set");
- RNA_def_property_ui_text(prop, "Lock Camera and Layers", "Use the scene's active camera and layers in this view, rather than local layers.");
+ RNA_def_property_ui_text(prop, "Lock Camera and Layers", "Use the scene's active camera and layers in this view, rather than local layers");
RNA_def_property_ui_icon(prop, ICON_LOCKVIEW_OFF, 1);
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
@@ -911,14 +1005,45 @@ static void rna_def_space_3dview(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "lay", 1);
RNA_def_property_array(prop, 20);
RNA_def_property_boolean_funcs(prop, NULL, "rna_Space3DView_layer_set");
- RNA_def_property_ui_text(prop, "Visible Layers", "Layers visible in this 3D View.");
+ RNA_def_property_ui_text(prop, "Visible Layers", "Layers visible in this 3D View");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
prop= RNA_def_property(srna, "used_layers", PROP_BOOLEAN, PROP_LAYER_MEMBER);
RNA_def_property_boolean_sdna(prop, NULL, "lay_used", 1);
RNA_def_property_array(prop, 20);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Used Layers", "Layers that contain something.");
+ RNA_def_property_ui_text(prop, "Used Layers", "Layers that contain something");
+
+ prop= RNA_def_property(srna, "region_3d", PROP_POINTER, PROP_NONE);
+ RNA_def_property_struct_type(prop, "Region3DView");
+ RNA_def_property_pointer_funcs(prop, "rna_SpaceView3D_region_3d_get", NULL, NULL);
+ RNA_def_property_ui_text(prop, "3D Region", "3D region in this space, in case of quad view the camera region");
+
+ prop= RNA_def_property(srna, "region_quadview", PROP_POINTER, PROP_NONE);
+ RNA_def_property_struct_type(prop, "Region3DView");
+ RNA_def_property_pointer_funcs(prop, "rna_SpaceView3D_region_quadview_get", NULL, NULL);
+ RNA_def_property_ui_text(prop, "Quad View Region", "3D region that defines the quad view settings");
+
+ /* region */
+
+ srna= RNA_def_struct(brna, "Region3DView", "Region");
+ RNA_def_struct_sdna(srna, "RegionView3D");
+ RNA_def_struct_ui_text(srna, "3D View Region", "3D View region data");
+
+ prop= RNA_def_property(srna, "lock_rotation", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "viewlock", RV3D_LOCKED);
+ RNA_def_property_ui_text(prop, "Lock", "Lock view rotation in side views");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, "rna_Region3DView_quadview_update");
+
+ prop= RNA_def_property(srna, "box_preview", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "viewlock", RV3D_BOXVIEW);
+ RNA_def_property_ui_text(prop, "Box", "Sync view position between side views");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, "rna_Region3DView_quadview_update");
+
+ prop= RNA_def_property(srna, "box_clip", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "viewlock", RV3D_BOXCLIP);
+ RNA_def_property_ui_text(prop, "Clip", "Clip objects based on what's visible in other side views");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, "rna_Region3DView_quadview_update");
}
static void rna_def_space_buttons(BlenderRNA *brna)
@@ -954,19 +1079,19 @@ static void rna_def_space_buttons(BlenderRNA *brna)
prop= RNA_def_property(srna, "context", PROP_ENUM, PROP_NONE);
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_ui_text(prop, "Context", "Type of active data to display and edit");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_PROPERTIES, 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_ui_text(prop, "Align", "Arrangement of the panels");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_PROPERTIES, 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_ui_text(prop, "Brush Texture", "Show brush textures");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_PROPERTIES, NULL);
/* pinned data */
@@ -985,42 +1110,48 @@ static void rna_def_space_image(BlenderRNA *brna)
srna= RNA_def_struct(brna, "SpaceImageEditor", "Space");
RNA_def_struct_sdna(srna, "SpaceImage");
- RNA_def_struct_ui_text(srna, "Space Image Editor", "Image and UV editor space data.");
+ RNA_def_struct_ui_text(srna, "Space Image Editor", "Image and UV editor space data");
/* image */
prop= RNA_def_property(srna, "image", PROP_POINTER, PROP_NONE);
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_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);
prop= RNA_def_property(srna, "image_user", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, 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_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);
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_ui_text(prop, "Curves", "Color curve mapping to use for displaying the image");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, "rna_SpaceImageEditor_curves_update");
+
+ prop= RNA_def_property(srna, "histogram", PROP_POINTER, PROP_NONE);
+ RNA_def_property_pointer_sdna(prop, NULL, "hist");
+ RNA_def_property_struct_type(prop, "Histogram");
+ RNA_def_property_ui_text(prop, "Histogram", "Histogram for viewing image statistics");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, "rna_SpaceImageEditor_histogram_update");
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_ui_text(prop, "Image Pin", "Display current image regardless of object selection");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, 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_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);
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, draw_channels_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_ui_text(prop, "Draw Channels", "Channels of the image to draw");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
/* uv */
@@ -1028,12 +1159,12 @@ static void rna_def_space_image(BlenderRNA *brna)
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "SpaceUVEditor");
RNA_def_property_pointer_funcs(prop, "rna_SpaceImageEditor_uvedit_get", NULL, NULL);
- RNA_def_property_ui_text(prop, "UV Editor", "UV editor settings.");
+ RNA_def_property_ui_text(prop, "UV Editor", "UV editor settings");
/* paint */
prop= RNA_def_property(srna, "image_painting", PROP_BOOLEAN, PROP_NONE);
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_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");
@@ -1041,32 +1172,32 @@ static void rna_def_space_image(BlenderRNA *brna)
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_ui_text(prop, "Grease Pencil", "Grease pencil data for this space");
prop= RNA_def_property(srna, "use_grease_pencil", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_DISPGP);
- RNA_def_property_ui_text(prop, "Use Grease Pencil", "Display and edit the grease pencil freehand annotations overlay.");
+ RNA_def_property_ui_text(prop, "Use Grease Pencil", "Display and edit the grease pencil freehand annotations overlay");
/* update */
prop= RNA_def_property(srna, "update_automatically", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "lock", 0);
- RNA_def_property_ui_text(prop, "Update Automatically", "Update other affected window spaces automatically to reflect changes during interactive operations such as transform.");
+ RNA_def_property_ui_text(prop, "Update Automatically", "Update other affected window spaces automatically to reflect changes during interactive operations such as transform");
/* state */
prop= RNA_def_property(srna, "show_render", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_SpaceImageEditor_show_render_get", NULL);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Show Render", "Show render related properties.");
+ RNA_def_property_ui_text(prop, "Show Render", "Show render related properties");
prop= RNA_def_property(srna, "show_paint", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_SpaceImageEditor_show_paint_get", NULL);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Show Paint", "Show paint related properties.");
+ RNA_def_property_ui_text(prop, "Show Paint", "Show paint related properties");
prop= RNA_def_property(srna, "show_uvedit", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_SpaceImageEditor_show_uvedit_get", NULL);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Show UV Editor", "Show uv editing related properties.");
+ RNA_def_property_ui_text(prop, "Show UV Editor", "Show uv editing related properties");
rna_def_space_image_uv(brna);
}
@@ -1091,13 +1222,13 @@ static void rna_def_space_sequencer(BlenderRNA *brna)
srna= RNA_def_struct(brna, "SpaceSequenceEditor", "Space");
RNA_def_struct_sdna(srna, "SpaceSeq");
- RNA_def_struct_ui_text(srna, "Space Sequence Editor", "Sequence editor space data.");
+ RNA_def_struct_ui_text(srna, "Space Sequence Editor", "Sequence editor space data");
/* view type, fairly important */
prop= RNA_def_property(srna, "view_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "view");
RNA_def_property_enum_items(prop, view_type_items);
- RNA_def_property_ui_text(prop, "View Type", "The type of the Sequencere view (sequencer, preview or both).");
+ RNA_def_property_ui_text(prop, "View Type", "The type of the Sequencere view (sequencer, preview or both)");
RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
RNA_def_property_update(prop, 0, "rna_Sequencer_display_mode_update");
@@ -1105,56 +1236,56 @@ static void rna_def_space_sequencer(BlenderRNA *brna)
prop= RNA_def_property(srna, "display_mode", PROP_ENUM, PROP_NONE);
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_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);
/* flag's */
prop= RNA_def_property(srna, "show_cframe_indicator", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SEQ_NO_DRAW_CFRANUM);
- RNA_def_property_ui_text(prop, "Show Frame Number Indicator", "Show frame number beside the current frame indicator line.");
+ 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_SEQUENCER, NULL);
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_ui_text(prop, "Draw Frames", "Draw frames rather then seconds");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, 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_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, "separate_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_ui_text(prop, "Seperate Colors", "Seperate color channels in preview");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, 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_ui_text(prop, "Safe Margin", "Draw title safe margins in preview");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, 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_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);
/* 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_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_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_sequencer.h
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, 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_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);
@@ -1183,74 +1314,74 @@ static void rna_def_space_text(BlenderRNA *brna)
srna= RNA_def_struct(brna, "SpaceTextEditor", "Space");
RNA_def_struct_sdna(srna, "SpaceText");
- RNA_def_struct_ui_text(srna, "Space Text Editor", "Text editor space data.");
+ RNA_def_struct_ui_text(srna, "Space Text Editor", "Text editor space data");
/* text */
prop= RNA_def_property(srna, "text", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Text", "Text displayed and edited in this space.");
+ 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);
/* 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_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);
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_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);
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_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);
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_ui_text(prop, "Overwrite", "Overwrite characters when typing rather than inserting them");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, 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_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_ui_text(prop, "Tab Width", "Number of spaces to display tabs with");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, 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_ui_text(prop, "Font Size", "Font size to use for displaying the text");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, 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_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_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_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_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);
}
@@ -1269,56 +1400,61 @@ static void rna_def_space_dopesheet(BlenderRNA *brna)
srna= RNA_def_struct(brna, "SpaceDopeSheetEditor", "Space");
RNA_def_struct_sdna(srna, "SpaceAction");
- RNA_def_struct_ui_text(srna, "Space DopeSheet Editor", "DopeSheet space data.");
+ RNA_def_struct_ui_text(srna, "Space DopeSheet Editor", "DopeSheet space data");
/* data */
prop= RNA_def_property(srna, "action", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_pointer_funcs(prop, NULL, "rna_SpaceDopeSheetEditor_action_set", NULL);
- RNA_def_property_ui_text(prop, "Action", "Action displayed and edited in this space.");
+ RNA_def_property_ui_text(prop, "Action", "Action displayed and edited in this space");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, "rna_SpaceDopeSheetEditor_action_update");
/* mode */
prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
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_ui_text(prop, "Mode", "Editing context being displayed");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_DOPESHEET, "rna_SpaceDopeSheetEditor_mode_update");
/* 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_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_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_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_ui_text(prop, "AutoMerge Keyframes", "Show handles of Bezier control points");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_DOPESHEET, NULL);
+
+ prop= RNA_def_property(srna, "realtime_updates", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SACTION_NOREALTIMEUPDATES);
+ RNA_def_property_ui_text(prop, "Realtime Updates", "When transforming keyframes, changes to the animation data are flushed to other views");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_DOPESHEET, NULL);
/* dopesheet */
prop= RNA_def_property(srna, "dopesheet", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "DopeSheet");
RNA_def_property_pointer_sdna(prop, NULL, "ads");
- RNA_def_property_ui_text(prop, "DopeSheet", "Settings for filtering animation data.");
+ RNA_def_property_ui_text(prop, "DopeSheet", "Settings for filtering animation data");
/* autosnap */
prop= RNA_def_property(srna, "autosnap", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "autosnap");
RNA_def_property_enum_items(prop, autosnap_items);
- RNA_def_property_ui_text(prop, "Auto Snap", "Automatic time snapping settings for transformations.");
+ RNA_def_property_ui_text(prop, "Auto Snap", "Automatic time snapping settings for transformations");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_DOPESHEET, NULL);
}
@@ -1344,57 +1480,63 @@ static void rna_def_space_graph(BlenderRNA *brna)
srna= RNA_def_struct(brna, "SpaceGraphEditor", "Space");
RNA_def_struct_sdna(srna, "SpaceIpo");
- RNA_def_struct_ui_text(srna, "Space Graph Editor", "Graph Editor space data.");
+ RNA_def_struct_ui_text(srna, "Space Graph Editor", "Graph Editor space data");
/* mode */
prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
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); // XXX need to be able to flush channel types
+ RNA_def_property_ui_text(prop, "Mode", "Editing context being displayed");
+ RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, "rna_SpaceGraphEditor_display_mode_update");
/* 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_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_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_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_negative_sdna(prop, NULL, "flag", SIPO_NOHANDLES);
- RNA_def_property_ui_text(prop, "Show Handles", "Show handles of Bezier control points.");
+ 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_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);
prop= RNA_def_property(srna, "only_selected_keyframe_handles", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SIPO_SELVHANDLESONLY);
- RNA_def_property_ui_text(prop, "Only Selected Keyframes Handles", "Only show and edit handles of selected keyframes.");
+ RNA_def_property_ui_text(prop, "Only Selected Keyframes Handles", "Only show and edit handles of selected keyframes");
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_ui_text(prop, "AutoMerge Keyframes", "Show handles of Bezier control points");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
+
+ prop= RNA_def_property(srna, "realtime_updates", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SIPO_NOREALTIMEUPDATES);
+ RNA_def_property_ui_text(prop, "Realtime Updates", "When transforming keyframes, changes to the animation data are flushed to other views");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
/* cursor */
prop= RNA_def_property(srna, "show_cursor", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SIPO_NODRAWCURSOR);
- RNA_def_property_ui_text(prop, "Show Cursor", "Show 2D cursor.");
+ RNA_def_property_ui_text(prop, "Show Cursor", "Show 2D cursor");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
prop= RNA_def_property(srna, "cursor_value", PROP_FLOAT, PROP_NONE);
@@ -1405,27 +1547,27 @@ static void rna_def_space_graph(BlenderRNA *brna)
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, gpivot_items);
- RNA_def_property_ui_text(prop, "Pivot Point", "Pivot center for rotation/scaling.");
+ RNA_def_property_ui_text(prop, "Pivot Point", "Pivot center for rotation/scaling");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
/* dopesheet */
prop= RNA_def_property(srna, "dopesheet", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "DopeSheet");
RNA_def_property_pointer_sdna(prop, NULL, "ads");
- RNA_def_property_ui_text(prop, "DopeSheet", "Settings for filtering animation data.");
+ RNA_def_property_ui_text(prop, "DopeSheet", "Settings for filtering animation data");
/* autosnap */
prop= RNA_def_property(srna, "autosnap", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "autosnap");
RNA_def_property_enum_items(prop, autosnap_items);
- RNA_def_property_ui_text(prop, "Auto Snap", "Automatic time snapping settings for transformations.");
+ RNA_def_property_ui_text(prop, "Auto Snap", "Automatic time snapping settings for transformations");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
/* readonly state info */
prop= RNA_def_property(srna, "has_ghost_curves", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", 0); /* XXX: hack to make this compile, since this property doesn't actually exist*/
RNA_def_property_boolean_funcs(prop, "rna_SpaceGraphEditor_has_ghost_curves_get", NULL);
- RNA_def_property_ui_text(prop, "Has Ghost Curves", "Graph Editor instance has some ghost curves stored.");
+ RNA_def_property_ui_text(prop, "Has Ghost Curves", "Graph Editor instance has some ghost curves stored");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
}
@@ -1436,36 +1578,42 @@ static void rna_def_space_nla(BlenderRNA *brna)
srna= RNA_def_struct(brna, "SpaceNLA", "Space");
RNA_def_struct_sdna(srna, "SpaceNla");
- RNA_def_struct_ui_text(srna, "Space Nla Editor", "NLA editor space data.");
+ RNA_def_struct_ui_text(srna, "Space Nla Editor", "NLA editor space data");
/* display */
prop= RNA_def_property(srna, "show_seconds", PROP_BOOLEAN, PROP_NONE);
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_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_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_ui_text(prop, "Show Control Curves", "Show influence curves on strips");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NLA, NULL);
+
+ /* editing */
+ prop= RNA_def_property(srna, "realtime_updates", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SNLA_NOREALTIMEUPDATES);
+ RNA_def_property_ui_text(prop, "Realtime Updates", "When transforming strips, changes to the animation data are flushed to other views");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NLA, NULL);
/* dopesheet */
prop= RNA_def_property(srna, "dopesheet", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "DopeSheet");
RNA_def_property_pointer_sdna(prop, NULL, "ads");
- RNA_def_property_ui_text(prop, "DopeSheet", "Settings for filtering animation data.");
+ RNA_def_property_ui_text(prop, "DopeSheet", "Settings for filtering animation data");
/* autosnap */
prop= RNA_def_property(srna, "autosnap", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "autosnap");
RNA_def_property_enum_items(prop, autosnap_items);
- RNA_def_property_ui_text(prop, "Auto Snap", "Automatic time snapping settings for transformations.");
+ RNA_def_property_ui_text(prop, "Auto Snap", "Automatic time snapping settings for transformations");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NLA, NULL);
}
@@ -1476,7 +1624,7 @@ static void rna_def_space_time(BlenderRNA *brna)
srna= RNA_def_struct(brna, "SpaceTimeline", "Space");
RNA_def_struct_sdna(srna, "SpaceTime");
- RNA_def_struct_ui_text(srna, "Space Timeline Editor", "Timeline editor space data.");
+ RNA_def_struct_ui_text(srna, "Space Timeline Editor", "Timeline editor space data");
/* Define Anim Playback Areas */
prop= RNA_def_property(srna, "play_top_left", PROP_BOOLEAN, PROP_NONE);
@@ -1517,12 +1665,12 @@ static void rna_def_space_time(BlenderRNA *brna)
/* Other options */
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_ui_text(prop, "Only Selected channels", "Show keyframes for active Object and/or its selected channels only");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, NULL);
prop= RNA_def_property(srna, "show_cframe_indicator", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", TIME_CFRA_NUM);
- RNA_def_property_ui_text(prop, "Show Frame Number Indicator", "Show frame number beside the current frame indicator line.");
+ 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_TIME, NULL);
}
@@ -1532,12 +1680,12 @@ static void rna_def_console_line(BlenderRNA *brna)
PropertyRNA *prop;
srna = RNA_def_struct(brna, "ConsoleLine", NULL);
- RNA_def_struct_ui_text(srna, "Console Input", "Input line for the interactive console.");
+ 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_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 */
@@ -1558,19 +1706,19 @@ static void rna_def_space_console(BlenderRNA *brna)
srna= RNA_def_struct(brna, "SpaceConsole", "Space");
RNA_def_struct_sdna(srna, "SpaceConsole");
- RNA_def_struct_ui_text(srna, "Space Console", "Interactive python console.");
+ RNA_def_struct_ui_text(srna, "Space Console", "Interactive python console");
/* display */
prop= RNA_def_property(srna, "font_size", PROP_INT, PROP_NONE); /* copied from text editor */
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_ui_text(prop, "Font Size", "Font size to use for displaying the text");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_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_ui_text(prop, "Type", "Console type");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CONSOLE, NULL);
prop= RNA_def_property(srna, "selection_start", PROP_INT, PROP_UNSIGNED); /* copied from text editor */
@@ -1584,48 +1732,48 @@ static void rna_def_space_console(BlenderRNA *brna)
/* 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_ui_text(prop, "Show Debug", "Display debug reporting info");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_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_ui_text(prop, "Show Info", "Display general information");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_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_ui_text(prop, "Show Operator", "Display the operator log");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_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_ui_text(prop, "Show Warn", "Display warnings");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_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_ui_text(prop, "Show Error", "Display error text");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CONSOLE_REPORT, NULL);
prop= RNA_def_property(srna, "prompt", PROP_STRING, PROP_NONE);
- RNA_def_property_ui_text(prop, "Prompt", "Command line prompt.");
+ RNA_def_property_ui_text(prop, "Prompt", "Command line prompt");
RNA_def_struct_name_property(srna, prop);
prop= RNA_def_property(srna, "language", PROP_STRING, PROP_NONE);
- RNA_def_property_ui_text(prop, "Language", "Command line prompt language.");
+ RNA_def_property_ui_text(prop, "Language", "Command line prompt language");
RNA_def_struct_name_property(srna, prop);
prop= RNA_def_property(srna, "history", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "history", NULL);
RNA_def_property_struct_type(prop, "ConsoleLine");
- RNA_def_property_ui_text(prop, "History", "Command history.");
+ RNA_def_property_ui_text(prop, "History", "Command history");
prop= RNA_def_property(srna, "scrollback", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "scrollback", NULL);
RNA_def_property_struct_type(prop, "ConsoleLine");
- RNA_def_property_ui_text(prop, "Output", "Command output.");
+ RNA_def_property_ui_text(prop, "Output", "Command output");
}
static void rna_def_fileselect_params(BlenderRNA *brna)
@@ -1640,28 +1788,28 @@ static void rna_def_fileselect_params(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem file_sort_items[] = {
- {FILE_SORT_ALPHA, "FILE_SORT_ALPHA", ICON_SORTALPHA, "Sort alphabetically", "Sort the file list alphabetically."},
- {FILE_SORT_EXTENSION, "FILE_SORT_EXTENSION", ICON_SORTBYEXT, "Sort by extension", "Sort the file list by extension."},
- {FILE_SORT_TIME, "FILE_SORT_TIME", ICON_SORTTIME, "Sort by time", "Sort files by modification time."},
- {FILE_SORT_SIZE, "FILE_SORT_SIZE", ICON_SORTSIZE, "Sort by size", "Sort files by size."},
+ {FILE_SORT_ALPHA, "FILE_SORT_ALPHA", ICON_SORTALPHA, "Sort alphabetically", "Sort the file list alphabetically"},
+ {FILE_SORT_EXTENSION, "FILE_SORT_EXTENSION", ICON_SORTBYEXT, "Sort by extension", "Sort the file list by extension"},
+ {FILE_SORT_TIME, "FILE_SORT_TIME", ICON_SORTTIME, "Sort by time", "Sort files by modification time"},
+ {FILE_SORT_SIZE, "FILE_SORT_SIZE", ICON_SORTSIZE, "Sort by size", "Sort files by size"},
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "FileSelectParams", NULL);
- RNA_def_struct_ui_text(srna, "File Select Parameters", "File Select Parameters.");
+ RNA_def_struct_ui_text(srna, "File Select Parameters", "File Select Parameters");
prop= RNA_def_property(srna, "title", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "title");
- RNA_def_property_ui_text(prop, "Title", "Title for the file browser.");
+ RNA_def_property_ui_text(prop, "Title", "Title for the file browser");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
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_ui_text(prop, "Directory", "Directory displayed in the file browser");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_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_ui_text(prop, "File Name", "Active file in the file browser");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL);
prop= RNA_def_property(srna, "display", PROP_ENUM, PROP_NONE);
@@ -1672,12 +1820,12 @@ static void rna_def_fileselect_params(BlenderRNA *brna)
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_ui_text(prop, "Filter Files", "Enable filtering of files");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_LIST, 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_ui_text(prop, "Hide Dot Files", "Hide hidden dot files");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_LIST , NULL);
prop= RNA_def_property(srna, "sort", PROP_ENUM, PROP_NONE);
@@ -1688,49 +1836,49 @@ static void rna_def_fileselect_params(BlenderRNA *brna)
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_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);
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_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);
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_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);
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_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);
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_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);
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_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);
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_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);
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_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);
@@ -1744,11 +1892,11 @@ static void rna_def_space_filebrowser(BlenderRNA *brna)
srna= RNA_def_struct(brna, "SpaceFileBrowser", "Space");
RNA_def_struct_sdna(srna, "SpaceFile");
- RNA_def_struct_ui_text(srna, "Space File Browser", "File browser space data.");
+ RNA_def_struct_ui_text(srna, "Space File Browser", "File browser space data");
prop= RNA_def_property(srna, "params", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "params");
- RNA_def_property_ui_text(prop, "Filebrowser Parameter", "Parameters and Settings for the Filebrowser.");
+ RNA_def_property_ui_text(prop, "Filebrowser Parameter", "Parameters and Settings for the Filebrowser");
}
static void rna_def_space_info(BlenderRNA *brna)
@@ -1757,7 +1905,7 @@ static void rna_def_space_info(BlenderRNA *brna)
srna= RNA_def_struct(brna, "SpaceInfo", "Space");
RNA_def_struct_sdna(srna, "SpaceInfo");
- RNA_def_struct_ui_text(srna, "Space Info", "Info space data.");
+ RNA_def_struct_ui_text(srna, "Space Info", "Info space data");
}
static void rna_def_space_userpref(BlenderRNA *brna)
@@ -1766,7 +1914,7 @@ static void rna_def_space_userpref(BlenderRNA *brna)
srna= RNA_def_struct(brna, "SpaceUserPreferences", "Space");
RNA_def_struct_sdna(srna, "SpaceUserPref");
- RNA_def_struct_ui_text(srna, "Space User Preferences", "User preferences space data.");
+ RNA_def_struct_ui_text(srna, "Space User Preferences", "User preferences space data");
}
static void rna_def_space_node(BlenderRNA *brna)
@@ -1775,49 +1923,49 @@ static void rna_def_space_node(BlenderRNA *brna)
PropertyRNA *prop;
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_SHADER, "MATERIAL", ICON_MATERIAL, "Material", "Material nodes"},
+ {NTREE_TEXTURE, "TEXTURE", ICON_TEXTURE, "Texture", "Texture nodes"},
+ {NTREE_COMPOSIT, "COMPOSITING", ICON_RENDERLAYERS, "Compositing", "Compositing nodes"},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem texture_type_items[] = {
- {SNODE_TEX_OBJECT, "OBJECT", ICON_OBJECT_DATA, "Object", "Edit texture nodes from Object."},
- {SNODE_TEX_WORLD, "WORLD", ICON_WORLD_DATA, "World", "Edit texture nodes from World."},
- {SNODE_TEX_BRUSH, "BRUSH", ICON_BRUSH_DATA, "Brush", "Edit texture nodes from Brush."},
+ {SNODE_TEX_OBJECT, "OBJECT", ICON_OBJECT_DATA, "Object", "Edit texture nodes from Object"},
+ {SNODE_TEX_WORLD, "WORLD", ICON_WORLD_DATA, "World", "Edit texture nodes from World"},
+ {SNODE_TEX_BRUSH, "BRUSH", ICON_BRUSH_DATA, "Brush", "Edit texture nodes from Brush"},
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "SpaceNodeEditor", "Space");
RNA_def_struct_sdna(srna, "SpaceNode");
- RNA_def_struct_ui_text(srna, "Space Node Editor", "Node editor space data.");
+ RNA_def_struct_ui_text(srna, "Space Node Editor", "Node editor space data");
prop= RNA_def_property(srna, "tree_type", PROP_ENUM, PROP_NONE);
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_ui_text(prop, "Tree Type", "Node tree type to display and edit");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_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_ui_text(prop, "Texture Type", "Type of data to take texture from");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NODE, NULL);
prop= RNA_def_property(srna, "id", PROP_POINTER, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "ID", "Datablock whose nodes are being edited.");
+ RNA_def_property_ui_text(prop, "ID", "Datablock whose nodes are being edited");
prop= RNA_def_property(srna, "id_from", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "from");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "ID From", "Datablock from which the edited datablock is linked.");
+ RNA_def_property_ui_text(prop, "ID From", "Datablock from which the edited datablock is linked");
prop= RNA_def_property(srna, "nodetree", PROP_POINTER, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Node Tree", "Node tree being displayed and edited.");
+ RNA_def_property_ui_text(prop, "Node Tree", "Node tree being displayed and edited");
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_ui_text(prop, "Backdrop", "Use active Viewer Node output as backdrop for compositing nodes");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NODE_VIEW, NULL);
}
@@ -1827,7 +1975,7 @@ static void rna_def_space_logic(BlenderRNA *brna)
srna= RNA_def_struct(brna, "SpaceLogicEditor", "Space");
RNA_def_struct_sdna(srna, "SpaceLogic");
- RNA_def_struct_ui_text(srna, "Space Logic Editor", "Logic editor space data.");
+ RNA_def_struct_ui_text(srna, "Space Logic Editor", "Logic editor space data");
}
void RNA_def_space(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_test.c b/source/blender/makesrna/intern/rna_test.c
index 988c8f8a539..558ac00e3bf 100644
--- a/source/blender/makesrna/intern/rna_test.c
+++ b/source/blender/makesrna/intern/rna_test.c
@@ -15,7 +15,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor(s): Arystanbek Dyussenov
*
diff --git a/source/blender/makesrna/intern/rna_text.c b/source/blender/makesrna/intern/rna_text.c
index bed686ed360..b054b049fc9 100644
--- a/source/blender/makesrna/intern/rna_text.c
+++ b/source/blender/makesrna/intern/rna_text.c
@@ -15,7 +15,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor(s): Blender Foundation (2008)
*
@@ -117,11 +117,11 @@ static void rna_def_text_line(BlenderRNA *brna)
PropertyRNA *prop;
srna = RNA_def_struct(brna, "TextLine", NULL);
- RNA_def_struct_ui_text(srna, "Text Line", "Line of text in a Text datablock.");
+ RNA_def_struct_ui_text(srna, "Text Line", "Line of text in a Text datablock");
prop= RNA_def_property(srna, "line", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_TextLine_line_get", "rna_TextLine_line_length", "rna_TextLine_line_set");
- RNA_def_property_ui_text(prop, "Line", "Text in the line.");
+ RNA_def_property_ui_text(prop, "Line", "Text in the line");
RNA_def_property_update(prop, NC_TEXT|NA_EDITED, NULL);
}
@@ -131,20 +131,20 @@ static void rna_def_text_marker(BlenderRNA *brna)
PropertyRNA *prop;
srna = RNA_def_struct(brna, "TextMarker", NULL);
- RNA_def_struct_ui_text(srna, "Text Marker", "Marker highlighting a portion of text in a Text datablock.");
+ RNA_def_struct_ui_text(srna, "Text Marker", "Marker highlighting a portion of text in a Text datablock");
prop= RNA_def_property(srna, "line", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "lineno");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Line", "Line in which the marker is located.");
+ RNA_def_property_ui_text(prop, "Line", "Line in which the marker is located");
prop= RNA_def_property(srna, "start", PROP_INT, PROP_UNSIGNED);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Start", "Start position of the marker in the line.");
+ RNA_def_property_ui_text(prop, "Start", "Start position of the marker in the line");
prop= RNA_def_property(srna, "end", PROP_INT, PROP_UNSIGNED);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "End", "Start position of the marker in the line.");
+ RNA_def_property_ui_text(prop, "End", "Start position of the marker in the line");
prop= RNA_def_property(srna, "group", PROP_INT, PROP_UNSIGNED);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
@@ -154,15 +154,15 @@ static void rna_def_text_marker(BlenderRNA *brna)
prop= RNA_def_property(srna, "temporary", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", TMARK_TEMP);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Temporary", "Marker is temporary.");
+ RNA_def_property_ui_text(prop, "Temporary", "Marker is temporary");
prop= RNA_def_property(srna, "edit_all", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", TMARK_EDITALL);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Edit All", "Edit all markers of the same group as one.");
+ RNA_def_property_ui_text(prop, "Edit All", "Edit all markers of the same group as one");
prop= RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR);
- RNA_def_property_ui_text(prop, "Color", "Color to display the marker with.");
+ RNA_def_property_ui_text(prop, "Color", "Color to display the marker with");
}
static void rna_def_text(BlenderRNA *brna)
@@ -171,64 +171,68 @@ static void rna_def_text(BlenderRNA *brna)
PropertyRNA *prop;
srna = RNA_def_struct(brna, "Text", "ID");
- RNA_def_struct_ui_text(srna, "Text", "Text datablock referencing an external or packed text file.");
+ RNA_def_struct_ui_text(srna, "Text", "Text datablock referencing an external or packed text file");
RNA_def_struct_ui_icon(srna, ICON_TEXT);
RNA_def_struct_clear_flag(srna, STRUCT_ID_REFCOUNT);
prop= RNA_def_property(srna, "filename", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_Text_filename_get", "rna_Text_filename_length", "rna_Text_filename_set");
- RNA_def_property_ui_text(prop, "Filename", "Filename of the text file.");
+ RNA_def_property_ui_text(prop, "Filename", "Filename of the text file");
prop= RNA_def_property(srna, "dirty", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", TXT_ISDIRTY);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Dirty", "Text file has been edited since last save.");
+ RNA_def_property_ui_text(prop, "Dirty", "Text file has been edited since last save");
prop= RNA_def_property(srna, "modified", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_funcs(prop, "rna_Text_modified_get", NULL);
- RNA_def_property_ui_text(prop, "Modified", "Text file on disk is different than the one in memory.");
+ RNA_def_property_ui_text(prop, "Modified", "Text file on disk is different than the one in memory");
prop= RNA_def_property(srna, "memory", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", TXT_ISMEM);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Memory", "Text file is in memory, without a corresponding file on disk.");
+ RNA_def_property_ui_text(prop, "Memory", "Text file is in memory, without a corresponding file on disk");
prop= RNA_def_property(srna, "use_module", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", TXT_ISSCRIPT);
- RNA_def_property_ui_text(prop, "Register", "Register this text as a module on loading.");
+ RNA_def_property_ui_text(prop, "Register", "Register this text as a module on loading");
+
+ prop= RNA_def_property(srna, "tabs_as_spaces", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flags", TXT_TABSTOSPACES);
+ RNA_def_property_ui_text(prop, "Tabs as Spaces", "Automatically converts all new tabs into spaces");
prop= RNA_def_property(srna, "lines", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "TextLine");
- RNA_def_property_ui_text(prop, "Lines", "Lines of text.");
+ RNA_def_property_ui_text(prop, "Lines", "Lines of text");
prop= RNA_def_property(srna, "current_line", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "curl");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_struct_type(prop, "TextLine");
- RNA_def_property_ui_text(prop, "Current Line", "Current line, and start line of selection if one exists.");
+ RNA_def_property_ui_text(prop, "Current Line", "Current line, and start line of selection if one exists");
prop= RNA_def_property(srna, "current_character", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "curc");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Current Character", "Index of current character in current line, and also start index of character in selection if one exists.");
+ RNA_def_property_ui_text(prop, "Current Character", "Index of current character in current line, and also start index of character in selection if one exists");
prop= RNA_def_property(srna, "selection_end_line", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "sell");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_struct_type(prop, "TextLine");
- RNA_def_property_ui_text(prop, "Selection End Line", "End line of selection.");
+ RNA_def_property_ui_text(prop, "Selection End Line", "End line of selection");
prop= RNA_def_property(srna, "selection_end_character", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "selc");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Selection End Character", "Index of character after end of selection in the selection end line.");
+ RNA_def_property_ui_text(prop, "Selection End Character", "Index of character after end of selection in the selection end line");
prop= RNA_def_property(srna, "markers", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "TextMarker");
- RNA_def_property_ui_text(prop, "Markers", "Text markers highlighting part of the text.");
+ RNA_def_property_ui_text(prop, "Markers", "Text markers highlighting part of the text");
RNA_api_text(srna);
}
diff --git a/source/blender/makesrna/intern/rna_text_api.c b/source/blender/makesrna/intern/rna_text_api.c
index b048a6b59d0..0c446faf9af 100644
--- a/source/blender/makesrna/intern/rna_text_api.c
+++ b/source/blender/makesrna/intern/rna_text_api.c
@@ -14,7 +14,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor(s): Campbell Barton
*
diff --git a/source/blender/makesrna/intern/rna_texture.c b/source/blender/makesrna/intern/rna_texture.c
index 79a75c89a08..7d6547e1abb 100644
--- a/source/blender/makesrna/intern/rna_texture.c
+++ b/source/blender/makesrna/intern/rna_texture.c
@@ -15,7 +15,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor(s): Blender Foundation (2008).
*
@@ -51,6 +51,25 @@ static EnumPropertyItem texture_filter_items[] = {
{TXF_SAT, "SAT", 0, "SAT (4x mem)", ""},
{0, NULL, 0, NULL, NULL}};
+EnumPropertyItem texture_type_items[] = {
+ {0, "NONE", 0, "None", ""},
+ {TEX_BLEND, "BLEND", ICON_TEXTURE, "Blend", ""},
+ {TEX_CLOUDS, "CLOUDS", ICON_TEXTURE, "Clouds", ""},
+ {TEX_DISTNOISE, "DISTORTED_NOISE", ICON_TEXTURE, "Distorted Noise", ""},
+ {TEX_ENVMAP, "ENVIRONMENT_MAP", ICON_IMAGE_DATA, "Environment Map", ""},
+ {TEX_IMAGE, "IMAGE", ICON_IMAGE_DATA, "Image or Movie", ""},
+ {TEX_MAGIC, "MAGIC", ICON_TEXTURE, "Magic", ""},
+ {TEX_MARBLE, "MARBLE", ICON_TEXTURE, "Marble", ""},
+ {TEX_MUSGRAVE, "MUSGRAVE", ICON_TEXTURE, "Musgrave", ""},
+ {TEX_NOISE, "NOISE", ICON_TEXTURE, "Noise", ""},
+ {TEX_PLUGIN, "PLUGIN", ICON_PLUGIN, "Plugin", ""},
+ {TEX_POINTDENSITY, "POINT_DENSITY", ICON_TEXTURE, "Point Density", ""},
+ {TEX_STUCCI, "STUCCI", ICON_TEXTURE, "Stucci", ""},
+ {TEX_VORONOI, "VORONOI", ICON_TEXTURE, "Voronoi", ""},
+ {TEX_VOXELDATA, "VOXEL_DATA", ICON_TEXTURE, "Voxel Data", ""},
+ {TEX_WOOD, "WOOD", ICON_TEXTURE, "Wood", ""},
+ {0, NULL, 0, NULL, NULL}};
+
#ifdef RNA_RUNTIME
#include "MEM_guardedalloc.h"
@@ -176,22 +195,22 @@ char *rna_TextureSlot_path(PointerRNA *ptr)
/* find the 'textures' property of the ID-struct */
RNA_id_pointer_create(ptr->id.data, &id_ptr);
- prop= RNA_struct_find_property(&id_ptr, "textures");
+ prop= RNA_struct_find_property(&id_ptr, "texture_slots");
/* get an iterator for this property, and try to find the relevant index */
if (prop) {
int index= RNA_property_collection_lookup_index(&id_ptr, prop, ptr);
if (index >= 0)
- return BLI_sprintfN("textures[%d]", index);
+ return BLI_sprintfN("texture_slots[%d]", index);
}
}
/* this is a compromise for the remaining cases... */
if (mtex->tex)
- return BLI_sprintfN("textures[\"%s\"]", mtex->tex->id.name+2);
+ return BLI_sprintfN("texture_slots[\"%s\"]", mtex->tex->id.name+2);
else
- return BLI_strdup("textures[0]");
+ return BLI_strdup("texture_slots[0]");
}
static int rna_TextureSlot_name_length(PointerRNA *ptr)
@@ -451,7 +470,7 @@ static void rna_def_color_ramp_element(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ColorRampElement", NULL);
RNA_def_struct_sdna(srna, "CBData");
RNA_def_struct_path_func(srna, "rna_ColorRampElement_path");
- RNA_def_struct_ui_text(srna, "Color Ramp Element", "Element defining a color at a position in the color ramp.");
+ RNA_def_struct_ui_text(srna, "Color Ramp Element", "Element defining a color at a position in the color ramp");
prop= RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "r");
@@ -482,7 +501,7 @@ static void rna_def_color_ramp(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ColorRamp", NULL);
RNA_def_struct_sdna(srna, "ColorBand");
RNA_def_struct_path_func(srna, "rna_ColorRamp_path");
- RNA_def_struct_ui_text(srna, "Color Ramp", "Color ramp mapping a scalar value to a color.");
+ RNA_def_struct_ui_text(srna, "Color Ramp", "Color ramp mapping a scalar value to a color");
prop= RNA_def_property(srna, "elements", PROP_COLLECTION, PROP_COLOR);
RNA_def_property_collection_sdna(prop, NULL, "data", "tot");
@@ -571,7 +590,7 @@ static void rna_def_mtex(BlenderRNA *brna)
srna= RNA_def_struct(brna, "TextureSlot", NULL);
RNA_def_struct_sdna(srna, "MTex");
- RNA_def_struct_ui_text(srna, "Texture Slot", "Texture slot defining the mapping and influence of a texture.");
+ RNA_def_struct_ui_text(srna, "Texture Slot", "Texture slot defining the mapping and influence of a texture");
RNA_def_struct_path_func(srna, "rna_TextureSlot_path");
RNA_def_struct_ui_icon(srna, ICON_TEXTURE_DATA);
@@ -579,12 +598,12 @@ static void rna_def_mtex(BlenderRNA *brna)
RNA_def_property_pointer_sdna(prop, NULL, "tex");
RNA_def_property_struct_type(prop, "Texture");
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Texture", "Texture datablock used by this texture slot.");
+ RNA_def_property_ui_text(prop, "Texture", "Texture datablock used by this texture slot");
RNA_def_property_update(prop, 0, "rna_TextureSlot_update");
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_TextureSlot_name_get", "rna_TextureSlot_name_length", NULL);
- RNA_def_property_ui_text(prop, "Name", "Texture slot name.");
+ RNA_def_property_ui_text(prop, "Name", "Texture slot name");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_struct_name_property(srna, prop);
RNA_def_property_update(prop, 0, "rna_TextureSlot_update");
@@ -593,18 +612,18 @@ static void rna_def_mtex(BlenderRNA *brna)
prop= RNA_def_property(srna, "offset", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "ofs");
RNA_def_property_ui_range(prop, -10, 10, 10, 2);
- RNA_def_property_ui_text(prop, "Offset", "Fine tunes texture mapping X, Y and Z locations.");
+ RNA_def_property_ui_text(prop, "Offset", "Fine tunes texture mapping X, Y and Z locations");
RNA_def_property_update(prop, 0, "rna_TextureSlot_update");
prop= RNA_def_property(srna, "size", PROP_FLOAT, PROP_XYZ);
RNA_def_property_ui_range(prop, -100, 100, 10, 2);
- RNA_def_property_ui_text(prop, "Size", "Sets scaling for the texture's X, Y and Z sizes.");
+ RNA_def_property_ui_text(prop, "Size", "Sets scaling for the texture's X, Y and Z sizes");
RNA_def_property_update(prop, 0, "rna_TextureSlot_update");
prop= RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "r");
RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "Color", "The default color for textures that don't return RGB.");
+ RNA_def_property_ui_text(prop, "Color", "The default color for textures that don't return RGB");
RNA_def_property_update(prop, 0, "rna_TextureSlot_update");
prop= RNA_def_property(srna, "blend_type", PROP_ENUM, PROP_NONE);
@@ -615,30 +634,30 @@ static void rna_def_mtex(BlenderRNA *brna)
prop= RNA_def_property(srna, "stencil", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "texflag", MTEX_STENCIL);
- RNA_def_property_ui_text(prop, "Stencil", "Use this texture as a blending value on the next texture.");
+ RNA_def_property_ui_text(prop, "Stencil", "Use this texture as a blending value on the next texture");
RNA_def_property_update(prop, 0, "rna_TextureSlot_update");
prop= RNA_def_property(srna, "negate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "texflag", MTEX_NEGATIVE);
- RNA_def_property_ui_text(prop, "Negate", "Inverts the values of the texture to reverse its effect.");
+ RNA_def_property_ui_text(prop, "Negate", "Inverts the values of the texture to reverse its effect");
RNA_def_property_update(prop, 0, "rna_TextureSlot_update");
prop= RNA_def_property(srna, "rgb_to_intensity", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "texflag", MTEX_RGBTOINT);
- RNA_def_property_ui_text(prop, "RGB to Intensity", "Converts texture RGB values to intensity (gray) values.");
+ RNA_def_property_ui_text(prop, "RGB to Intensity", "Converts texture RGB values to intensity (gray) values");
RNA_def_property_update(prop, 0, "rna_TextureSlot_update");
prop= RNA_def_property(srna, "default_value", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "def_var");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
- RNA_def_property_ui_text(prop, "Default Value", "Value to use for Ref, Spec, Amb, Emit, Alpha, RayMir, TransLu and Hard.");
+ RNA_def_property_ui_text(prop, "Default Value", "Value to use for Ref, Spec, Amb, Emit, Alpha, RayMir, TransLu and Hard");
RNA_def_property_update(prop, 0, "rna_TextureSlot_update");
prop= RNA_def_property(srna, "output_node", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "which_output");
RNA_def_property_enum_items(prop, output_node_items);
RNA_def_property_enum_funcs(prop, "rna_TextureSlot_output_node_get", NULL, "rna_TextureSlot_output_node_itemf");
- RNA_def_property_ui_text(prop, "Output Node", "Which output node to use, for node-based textures.");
+ RNA_def_property_ui_text(prop, "Output Node", "Which output node to use, for node-based textures");
RNA_def_property_update(prop, 0, "rna_TextureSlot_update");
}
@@ -689,13 +708,13 @@ static void rna_def_environment_map(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem prop_type_items[] = {
- {ENV_CUBE, "CUBE", 0, "Cube", "Use environment map with six cube sides."},
- {ENV_PLANE, "PLANE", 0, "Plane", "Only one side is rendered, with Z axis pointing in direction of image."},
+ {ENV_CUBE, "CUBE", 0, "Cube", "Use environment map with six cube sides"},
+ {ENV_PLANE, "PLANE", 0, "Plane", "Only one side is rendered, with Z axis pointing in direction of image"},
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "EnvironmentMap", NULL);
RNA_def_struct_sdna(srna, "EnvMap");
- RNA_def_struct_ui_text(srna, "EnvironmentMap", "Environment map created by the renderer and cached for subsequent renders.");
+ RNA_def_struct_ui_text(srna, "EnvironmentMap", "Environment map created by the renderer and cached for subsequent renders");
rna_def_environment_map_common(srna);
@@ -709,14 +728,14 @@ static void rna_def_environment_map(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "clipsta");
RNA_def_property_range(prop, 0.01, FLT_MAX);
RNA_def_property_ui_range(prop, 0.01, 50, 100, 2);
- RNA_def_property_ui_text(prop, "Clip Start", "Objects nearer than this are not visible to map.");
+ RNA_def_property_ui_text(prop, "Clip Start", "Objects nearer than this are not visible to map");
RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "clip_end", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "clipend");
RNA_def_property_range(prop, 0.01, FLT_MAX);
RNA_def_property_ui_range(prop, 0.10, 20000, 100, 2);
- RNA_def_property_ui_text(prop, "Clip End", "Objects further than this are not visible to map.");
+ RNA_def_property_ui_text(prop, "Clip End", "Objects further than this are not visible to map");
RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "zoom", PROP_FLOAT, PROP_NONE);
@@ -731,7 +750,7 @@ static void rna_def_environment_map(BlenderRNA *brna)
prop= RNA_def_property(srna, "resolution", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "cuberes");
RNA_def_property_range(prop, 50, 4096);
- RNA_def_property_ui_text(prop, "Resolution", "Pixel resolution of the rendered environment map.");
+ RNA_def_property_ui_text(prop, "Resolution", "Pixel resolution of the rendered environment map");
RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "depth", PROP_INT, PROP_NONE);
@@ -770,7 +789,7 @@ static void rna_def_texture_clouds(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "CloudsTexture", "Texture");
- RNA_def_struct_ui_text(srna, "Clouds Texture", "Procedural noise texture.");
+ RNA_def_struct_ui_text(srna, "Clouds Texture", "Procedural noise texture");
RNA_def_struct_sdna(srna, "Tex");
prop= RNA_def_property(srna, "noise_size", PROP_FLOAT, PROP_NONE);
@@ -831,7 +850,7 @@ static void rna_def_texture_wood(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "WoodTexture", "Texture");
- RNA_def_struct_ui_text(srna, "Wood Texture", "Procedural noise texture.");
+ RNA_def_struct_ui_text(srna, "Wood Texture", "Procedural noise texture");
RNA_def_struct_sdna(srna, "Tex");
prop= RNA_def_property(srna, "noise_size", PROP_FLOAT, PROP_NONE);
@@ -875,7 +894,7 @@ static void rna_def_texture_wood(BlenderRNA *brna)
prop= RNA_def_property(srna, "nabla", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.001, 0.1);
RNA_def_property_ui_range(prop, 0.001, 0.1, 1, 2);
- RNA_def_property_ui_text(prop, "Nabla", "Size of derivative offset used for calculating normal.");
+ RNA_def_property_ui_text(prop, "Nabla", "Size of derivative offset used for calculating normal");
RNA_def_property_update(prop, 0, "rna_Texture_update");
}
@@ -898,7 +917,7 @@ static void rna_def_texture_marble(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "MarbleTexture", "Texture");
- RNA_def_struct_ui_text(srna, "Marble Texture", "Procedural noise texture.");
+ RNA_def_struct_ui_text(srna, "Marble Texture", "Procedural noise texture");
RNA_def_struct_sdna(srna, "Tex");
prop= RNA_def_property(srna, "noise_size", PROP_FLOAT, PROP_NONE);
@@ -949,7 +968,7 @@ static void rna_def_texture_marble(BlenderRNA *brna)
prop= RNA_def_property(srna, "nabla", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.001, 0.1);
RNA_def_property_ui_range(prop, 0.001, 0.1, 1, 2);
- RNA_def_property_ui_text(prop, "Nabla", "Size of derivative offset used for calculating normal.");
+ RNA_def_property_ui_text(prop, "Nabla", "Size of derivative offset used for calculating normal");
RNA_def_property_update(prop, 0, "rna_Texture_update");
}
@@ -960,7 +979,7 @@ static void rna_def_texture_magic(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "MagicTexture", "Texture");
- RNA_def_struct_ui_text(srna, "Magic Texture", "Procedural noise texture.");
+ RNA_def_struct_ui_text(srna, "Magic Texture", "Procedural noise texture");
RNA_def_struct_sdna(srna, "Tex");
prop= RNA_def_property(srna, "turbulence", PROP_FLOAT, PROP_NONE);
@@ -999,7 +1018,7 @@ static void rna_def_texture_blend(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "BlendTexture", "Texture");
- RNA_def_struct_ui_text(srna, "Blend Texture", "Procedural color blending texture.");
+ RNA_def_struct_ui_text(srna, "Blend Texture", "Procedural color blending texture");
RNA_def_struct_sdna(srna, "Tex");
prop= RNA_def_property(srna, "progression", PROP_ENUM, PROP_NONE);
@@ -1028,7 +1047,7 @@ static void rna_def_texture_stucci(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "StucciTexture", "Texture");
- RNA_def_struct_ui_text(srna, "Stucci Texture", "Procedural noise texture.");
+ RNA_def_struct_ui_text(srna, "Stucci Texture", "Procedural noise texture");
RNA_def_struct_sdna(srna, "Tex");
prop= RNA_def_property(srna, "turbulence", PROP_FLOAT, PROP_NONE);
@@ -1069,7 +1088,7 @@ static void rna_def_texture_noise(BlenderRNA *brna)
StructRNA *srna;
srna= RNA_def_struct(brna, "NoiseTexture", "Texture");
- RNA_def_struct_ui_text(srna, "Noise Texture", "Procedural noise texture.");
+ RNA_def_struct_ui_text(srna, "Noise Texture", "Procedural noise texture");
RNA_def_struct_sdna(srna, "Tex");
}
@@ -1232,7 +1251,7 @@ static void rna_def_texture_image(BlenderRNA *brna)
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_ui_text(prop, "Image User", "Parameters defining which layer, pass and frame of the image is displayed");
RNA_def_property_update(prop, 0, "rna_Texture_update");
/* filtering */
@@ -1240,19 +1259,19 @@ static void rna_def_texture_image(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "texfilter");
RNA_def_property_enum_items(prop, texture_filter_items);
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_ImageTexture_filter_itemf");
- RNA_def_property_ui_text(prop, "Filter", "Texture filter to use for sampling image.");
+ RNA_def_property_ui_text(prop, "Filter", "Texture filter to use for sampling image");
RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "filter_probes", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "afmax");
RNA_def_property_range(prop, 1, 256);
- RNA_def_property_ui_text(prop, "Filter Probes", "Maximum number of samples. Higher gives less blur at distant/oblique angles, but is also slower.");
+ RNA_def_property_ui_text(prop, "Filter Probes", "Maximum number of samples. Higher gives less blur at distant/oblique angles, but is also slower");
RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "filter_eccentricity", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "afmax");
RNA_def_property_range(prop, 1, 256);
- RNA_def_property_ui_text(prop, "Filter Eccentricity", "Maximum eccentricity. Higher gives less blur at distant/oblique angles, but is also slower.");
+ RNA_def_property_ui_text(prop, "Filter Eccentricity", "Maximum eccentricity. Higher gives less blur at distant/oblique angles, but is also slower");
RNA_def_property_update(prop, 0, "rna_Texture_update");
/* Normal Map */
@@ -1267,7 +1286,7 @@ static void rna_def_texture_image(BlenderRNA *brna)
prop= RNA_def_property(srna, "normal_space", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "normapspace");
RNA_def_property_enum_items(prop, prop_normal_space);
- RNA_def_property_ui_text(prop, "Normal Space", "Sets space of normal map image.");
+ RNA_def_property_ui_text(prop, "Normal Space", "Sets space of normal map image");
RNA_def_property_update(prop, 0, "rna_Texture_update");
}
@@ -1276,7 +1295,7 @@ static void rna_def_texture_plugin(BlenderRNA *brna)
StructRNA *srna;
srna= RNA_def_struct(brna, "PluginTexture", "Texture");
- RNA_def_struct_ui_text(srna, "Plugin", "External plugin texture.");
+ RNA_def_struct_ui_text(srna, "Plugin", "External plugin texture");
RNA_def_struct_sdna(srna, "Tex");
/* XXX: todo */
@@ -1288,14 +1307,14 @@ static void rna_def_texture_environment_map(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "EnvironmentMapTexture", "Texture");
- RNA_def_struct_ui_text(srna, "Environment Map", "Environment map texture.");
+ RNA_def_struct_ui_text(srna, "Environment Map", "Environment map texture");
RNA_def_struct_sdna(srna, "Tex");
rna_def_environment_map_common(srna);
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_ui_text(prop, "Image User", "Parameters defining which layer, pass and frame of the image is displayed");
RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "environment_map", PROP_POINTER, PROP_NONE);
@@ -1321,7 +1340,7 @@ static void rna_def_texture_musgrave(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "MusgraveTexture", "Texture");
- RNA_def_struct_ui_text(srna, "Musgrave", "Procedural musgrave texture.");
+ RNA_def_struct_ui_text(srna, "Musgrave", "Procedural musgrave texture");
RNA_def_struct_sdna(srna, "Tex");
prop= RNA_def_property(srna, "musgrave_type", PROP_ENUM, PROP_NONE);
@@ -1403,14 +1422,14 @@ static void rna_def_texture_voronoi(BlenderRNA *brna)
static EnumPropertyItem prop_coloring_items[] = {
/* XXX: OK names / descriptions? */
- {TEX_INTENSITY, "INTENSITY", 0, "Intensity", "Only calculate intensity."},
- {TEX_COL1, "POSITION", 0, "Position", "Color cells by position."},
+ {TEX_INTENSITY, "INTENSITY", 0, "Intensity", "Only calculate intensity"},
+ {TEX_COL1, "POSITION", 0, "Position", "Color cells by position"},
{TEX_COL2, "POSITION_OUTLINE", 0, "Position and Outline", "Use position plus an outline based on F2-F.1"},
- {TEX_COL3, "POSITION_OUTLINE_INTENSITY", 0, "Position, Outline, and Intensity", "Multiply position and outline by intensity."},
+ {TEX_COL3, "POSITION_OUTLINE_INTENSITY", 0, "Position, Outline, and Intensity", "Multiply position and outline by intensity"},
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "VoronoiTexture", "Texture");
- RNA_def_struct_ui_text(srna, "Voronoi", "Procedural voronoi texture.");
+ RNA_def_struct_ui_text(srna, "Voronoi", "Procedural voronoi texture");
RNA_def_struct_sdna(srna, "Tex");
prop= RNA_def_property(srna, "weight_1", PROP_FLOAT, PROP_NONE);
@@ -1481,7 +1500,7 @@ static void rna_def_texture_distorted_noise(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "DistortedNoiseTexture", "Texture");
- RNA_def_struct_ui_text(srna, "Distorted Noise", "Procedural distorted noise texture.");
+ 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);
@@ -1563,7 +1582,7 @@ static void rna_def_texture_pointdensity(BlenderRNA *brna)
srna= RNA_def_struct(brna, "PointDensity", NULL);
RNA_def_struct_sdna(srna, "PointDensity");
- RNA_def_struct_ui_text(srna, "PointDensity", "Point density settings.");
+ 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");
@@ -1686,7 +1705,7 @@ static void rna_def_texture_voxeldata(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem interpolation_type_items[] = {
- {TEX_VD_NEARESTNEIGHBOR, "NEREASTNEIGHBOR", 0, "Nearest Neighbor", "No interpolation, fast but blocky and low quality."},
+ {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"},
@@ -1707,15 +1726,27 @@ static void rna_def_texture_voxeldata(BlenderRNA *brna)
{TEX_REPEAT, "REPEAT", 0, "Repeat", "Causes the image to repeat horizontally and vertically"},
{0, NULL, 0, NULL, NULL}};
+ static EnumPropertyItem smoked_type_items[] = {
+ {TEX_VD_SMOKEDENSITY, "SMOKEDENSITY", 0, "Density", "Use smoke density as texture data"},
+ {TEX_VD_SMOKEHEAT, "SMOKEHEAT", 0, "Heat", "Use smoke heat as texture data. Values from -2.0 to 2.0 are used"},
+ {TEX_VD_SMOKEVEL, "SMOKEVEL", 0, "Velocity", "Use smoke velocity as texture data"},
+ {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.");
+ 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, 0, "rna_Texture_update");
+
+ prop= RNA_def_property(srna, "smoke_data_type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "smoked_type");
+ RNA_def_property_enum_items(prop, smoked_type_items);
+ RNA_def_property_ui_text(prop, "Source", "Simulation value to be used as a texture");
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "extension", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "extend");
@@ -1742,7 +1773,7 @@ static void rna_def_texture_voxeldata(BlenderRNA *brna)
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_ui_text(prop, "Resolution", "Resolution of the voxel grid");
RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "still", PROP_BOOLEAN, PROP_NONE);
@@ -1772,6 +1803,18 @@ static void rna_def_texture_voxeldata(BlenderRNA *brna)
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, 0, "rna_Texture_update");
+
+ prop= RNA_def_property(srna, "image", PROP_POINTER, PROP_NONE);
+ RNA_def_property_pointer_sdna(prop, NULL, "ima");
+ RNA_def_property_struct_type(prop, "Image");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Image", "");
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
+
+ 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, 0, "rna_Texture_update");
}
static void rna_def_texture(BlenderRNA *brna)
@@ -1779,35 +1822,16 @@ static void rna_def_texture(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_type_items[] = {
- {0, "NONE", 0, "None", ""},
- {TEX_BLEND, "BLEND", ICON_TEXTURE, "Blend", ""},
- {TEX_CLOUDS, "CLOUDS", ICON_TEXTURE, "Clouds", ""},
- {TEX_DISTNOISE, "DISTORTED_NOISE", ICON_TEXTURE, "Distorted Noise", ""},
- {TEX_ENVMAP, "ENVIRONMENT_MAP", ICON_IMAGE_DATA, "Environment Map", ""},
- {TEX_IMAGE, "IMAGE", ICON_IMAGE_DATA, "Image or Movie", ""},
- {TEX_MAGIC, "MAGIC", ICON_TEXTURE, "Magic", ""},
- {TEX_MARBLE, "MARBLE", ICON_TEXTURE, "Marble", ""},
- {TEX_MUSGRAVE, "MUSGRAVE", ICON_TEXTURE, "Musgrave", ""},
- {TEX_NOISE, "NOISE", ICON_TEXTURE, "Noise", ""},
- {TEX_PLUGIN, "PLUGIN", ICON_PLUGIN, "Plugin", ""},
- {TEX_POINTDENSITY, "POINT_DENSITY", ICON_TEXTURE, "Point Density", ""},
- {TEX_STUCCI, "STUCCI", ICON_TEXTURE, "Stucci", ""},
- {TEX_VORONOI, "VORONOI", ICON_TEXTURE, "Voronoi", ""},
- {TEX_VOXELDATA, "VOXEL_DATA", ICON_TEXTURE, "Voxel Data", ""},
- {TEX_WOOD, "WOOD", ICON_TEXTURE, "Wood", ""},
- {0, NULL, 0, NULL, NULL}};
-
srna= RNA_def_struct(brna, "Texture", "ID");
RNA_def_struct_sdna(srna, "Tex");
- RNA_def_struct_ui_text(srna, "Texture", "Texture datablock used by materials, lamps, worlds and brushes.");
+ RNA_def_struct_ui_text(srna, "Texture", "Texture datablock used by materials, lamps, worlds and brushes");
RNA_def_struct_ui_icon(srna, ICON_TEXTURE_DATA);
RNA_def_struct_refine_func(srna, "rna_Texture_refine");
prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
//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_items(prop, texture_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, 0, "rna_Texture_update");
@@ -1815,7 +1839,7 @@ static void rna_def_texture(BlenderRNA *brna)
prop= RNA_def_property(srna, "use_color_ramp", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", TEX_COLORBAND);
RNA_def_property_boolean_funcs(prop, NULL, "rna_Texture_use_color_ramp_set");
- RNA_def_property_ui_text(prop, "Use Color Ramp", "Toggle color ramp operations.");
+ RNA_def_property_ui_text(prop, "Use Color Ramp", "Toggle color ramp operations");
RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "color_ramp", PROP_POINTER, PROP_NEVER_NULL);
diff --git a/source/blender/makesrna/intern/rna_timeline.c b/source/blender/makesrna/intern/rna_timeline.c
index 5e20fca15f0..895cae6b51b 100644
--- a/source/blender/makesrna/intern/rna_timeline.c
+++ b/source/blender/makesrna/intern/rna_timeline.c
@@ -15,7 +15,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor(s): Blender Foundation (2008), Roland Hess
*
@@ -31,6 +31,8 @@
#include "DNA_scene_types.h"
+#include "WM_types.h"
+
#ifdef RNA_RUNTIME
#else
@@ -42,15 +44,29 @@ static void rna_def_timeline_marker(BlenderRNA *brna)
srna= RNA_def_struct(brna, "TimelineMarker", NULL);
RNA_def_struct_sdna(srna, "TimeMarker");
- RNA_def_struct_ui_text(srna, "Marker", "Marker for noting points in the timeline.");
+ RNA_def_struct_ui_text(srna, "Marker", "Marker for noting points in the timeline");
/* String values */
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_ui_text(prop, "Name", "");
RNA_def_struct_name_property(srna, prop);
+ RNA_def_property_update(prop, NC_ANIMATION, NULL);
prop= RNA_def_property(srna, "frame", PROP_INT, PROP_TIME);
- RNA_def_property_ui_text(prop, "Frame", "The frame on which the timeline marker appears.");
+ RNA_def_property_ui_text(prop, "Frame", "The frame on which the timeline marker appears");
+ RNA_def_property_update(prop, NC_ANIMATION, NULL);
+
+ prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", 1 /*SELECT*/);
+ RNA_def_property_ui_text(prop, "Selected", "Marker selection state");
+ RNA_def_property_update(prop, NC_ANIMATION, NULL);
+
+#ifdef DURIAN_CAMERA_SWITCH
+ prop= RNA_def_property(srna, "camera", PROP_POINTER, PROP_NONE);
+ RNA_def_property_struct_type(prop, "Object");
+ RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK);
+ RNA_def_property_ui_text(prop, "Camera", "Camera this timeline sets to active");
+#endif
}
void RNA_def_timeline_marker(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_ui.c b/source/blender/makesrna/intern/rna_ui.c
index 695eb76cb53..f204efb88c5 100644
--- a/source/blender/makesrna/intern/rna_ui.c
+++ b/source/blender/makesrna/intern/rna_ui.c
@@ -15,7 +15,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor(s): Blender Foundation (2009)
*
@@ -36,6 +36,22 @@
#include "WM_types.h"
+/* see WM_types.h */
+EnumPropertyItem operator_context_items[] = {
+ {WM_OP_INVOKE_DEFAULT, "INVOKE_DEFAULT", 0, "Invoke Default", ""},
+ {WM_OP_INVOKE_REGION_WIN, "INVOKE_REGION_WIN", 0, "Invoke Region Window", ""},
+ {WM_OP_INVOKE_REGION_CHANNELS, "INVOKE_REGION_CHANNELS", 0, "Invoke Region Channels", ""},
+ {WM_OP_INVOKE_REGION_PREVIEW, "INVOKE_REGION_PREVIEW", 0, "Invoke Region Preview", ""},
+ {WM_OP_INVOKE_AREA, "INVOKE_AREA", 0, "Invoke Area", ""},
+ {WM_OP_INVOKE_SCREEN, "INVOKE_SCREEN", 0, "Invoke Screen", ""},
+ {WM_OP_EXEC_DEFAULT, "EXEC_DEFAULT", 0, "Exec Default", ""},
+ {WM_OP_EXEC_REGION_WIN, "EXEC_REGION_WIN", 0, "Exec Region Window", ""},
+ {WM_OP_EXEC_REGION_CHANNELS, "EXEC_REGION_CHANNELS", 0, "Exec Region Channels", ""},
+ {WM_OP_EXEC_REGION_PREVIEW, "EXEC_REGION_PREVIEW", 0, "Exec Region Preview", ""},
+ {WM_OP_EXEC_AREA, "EXEC_AREA", 0, "Exec Area", ""},
+ {WM_OP_EXEC_SCREEN, "EXEC_SCREEN", 0, "Exec Screen", ""},
+ {0, NULL, 0, NULL, NULL}};
+
#ifdef RNA_RUNTIME
#include "MEM_guardedalloc.h"
@@ -517,24 +533,12 @@ static void rna_def_ui_layout(BlenderRNA *brna)
{UI_LAYOUT_ALIGN_CENTER, "CENTER", 0, "Center", ""},
{UI_LAYOUT_ALIGN_RIGHT, "RIGHT", 0, "Right", ""},
{0, NULL, 0, NULL, NULL}};
-
- /* see WM_types.h */
- static EnumPropertyItem operator_context_items[] = {
- {WM_OP_INVOKE_DEFAULT, "INVOKE_DEFAULT", 0, "Invoke Default", ""},
- {WM_OP_INVOKE_REGION_WIN, "INVOKE_REGION_WIN", 0, "Invoke Region Window", ""},
- {WM_OP_INVOKE_AREA, "INVOKE_AREA", 0, "Invoke Area", ""},
- {WM_OP_INVOKE_SCREEN, "INVOKE_SCREEN", 0, "Invoke Screen", ""},
- {WM_OP_EXEC_DEFAULT, "EXEC_DEFAULT", 0, "Exec Default", ""},
- {WM_OP_EXEC_REGION_WIN, "EXEC_REGION_WIN", 0, "Exec Region Window", ""},
- {WM_OP_EXEC_AREA, "EXEC_AREA", 0, "Exec Area", ""},
- {WM_OP_EXEC_SCREEN, "EXEC_SCREEN", 0, "Exec Screen", ""},
- {0, NULL, 0, NULL, NULL}};
/* layout */
srna= RNA_def_struct(brna, "UILayout", NULL);
RNA_def_struct_sdna(srna, "uiLayout");
- RNA_def_struct_ui_text(srna, "UI Layout", "User interface layout in a panel or header.");
+ RNA_def_struct_ui_text(srna, "UI Layout", "User interface layout in a panel or header");
prop= RNA_def_property(srna, "active", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_UILayout_active_get", "rna_UILayout_active_set");
@@ -577,7 +581,7 @@ static void rna_def_panel(BlenderRNA *brna)
FunctionRNA *func;
srna= RNA_def_struct(brna, "Panel", NULL);
- RNA_def_struct_ui_text(srna, "Panel", "Panel containing buttons.");
+ RNA_def_struct_ui_text(srna, "Panel", "Panel containing buttons");
RNA_def_struct_sdna(srna, "Panel");
RNA_def_struct_refine_func(srna, "rna_Panel_refine");
RNA_def_struct_register_funcs(srna, "rna_Panel_register", "rna_Panel_unregister");
@@ -649,7 +653,7 @@ static void rna_def_header(BlenderRNA *brna)
FunctionRNA *func;
srna= RNA_def_struct(brna, "Header", NULL);
- RNA_def_struct_ui_text(srna, "Header", "Editor header containing buttons.");
+ RNA_def_struct_ui_text(srna, "Header", "Editor header containing buttons");
RNA_def_struct_sdna(srna, "Header");
RNA_def_struct_refine_func(srna, "rna_Header_refine");
RNA_def_struct_register_funcs(srna, "rna_Header_register", "rna_Header_unregister");
@@ -688,7 +692,7 @@ static void rna_def_menu(BlenderRNA *brna)
FunctionRNA *func;
srna= RNA_def_struct(brna, "Menu", NULL);
- RNA_def_struct_ui_text(srna, "Menu", "Editor menu containing buttons.");
+ RNA_def_struct_ui_text(srna, "Menu", "Editor menu containing buttons");
RNA_def_struct_sdna(srna, "Menu");
RNA_def_struct_refine_func(srna, "rna_Menu_refine");
RNA_def_struct_register_funcs(srna, "rna_Menu_register", "rna_Menu_unregister");
diff --git a/source/blender/makesrna/intern/rna_ui_api.c b/source/blender/makesrna/intern/rna_ui_api.c
index 011235c862f..07c4d9c826e 100644
--- a/source/blender/makesrna/intern/rna_ui_api.c
+++ b/source/blender/makesrna/intern/rna_ui_api.c
@@ -15,7 +15,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* The Original Code is Copyright (C) 2009 Blender Foundation.
* All rights reserved.
@@ -79,7 +79,7 @@ static void api_ui_item_common(FunctionRNA *func)
prop= RNA_def_property(func, "icon", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, icon_items);
- RNA_def_property_ui_text(prop, "Icon", "Override automatic icon of the item.");
+ RNA_def_property_ui_text(prop, "Icon", "Override automatic icon of the item");
}
@@ -299,10 +299,12 @@ void RNA_api_ui_layout(StructRNA *srna)
parm= RNA_def_string(func, "text", "", 0, "", "Custom label to display in UI.");
func= RNA_def_function(srna, "template_modifier", "uiTemplateModifier");
+ RNA_def_function_flag(func, FUNC_USE_CONTEXT);
parm= RNA_def_pointer(func, "data", "Modifier", "", "Modifier data.");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL);
parm= RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in.");
RNA_def_function_return(func, parm);
+ RNA_def_boolean(func, "compact", 0, "", "Show a smaller version of the template, split on two lines.");
func= RNA_def_function(srna, "template_constraint", "uiTemplateConstraint");
parm= RNA_def_pointer(func, "data", "Constraint", "", "Constraint data.");
@@ -326,6 +328,10 @@ void RNA_api_ui_layout(StructRNA *srna)
api_ui_item_rna_common(func);
RNA_def_boolean(func, "expand", 0, "", "Expand button to show more detail.");
+ func= RNA_def_function(srna, "template_histogram", "uiTemplateHistogram");
+ api_ui_item_rna_common(func);
+ RNA_def_boolean(func, "expand", 0, "", "Expand button to show more detail.");
+
func= RNA_def_function(srna, "template_layers", "uiTemplateLayers");
api_ui_item_rna_common(func);
parm= RNA_def_pointer(func, "used_layers_data", "AnyType", "", "Data from which to take property.");
@@ -338,6 +344,7 @@ void RNA_api_ui_layout(StructRNA *srna)
func= RNA_def_function(srna, "template_color_wheel", "uiTemplateColorWheel");
api_ui_item_rna_common(func);
RNA_def_boolean(func, "value_slider", 0, "", "Display the value slider to the right of the color wheel");
+ RNA_def_boolean(func, "lock", 0, "", "Lock the color wheel display to value 1.0 regardless of actual color");
func= RNA_def_function(srna, "template_triColorSet", "uiTemplateTriColorSet");
api_ui_item_rna_common(func);
@@ -377,6 +384,11 @@ 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, "template_reports_banner", "uiTemplateReportsBanner");
+ RNA_def_function_flag(func, FUNC_USE_CONTEXT);
+ parm= RNA_def_pointer(func, "operator", "Operator", "", "");
+ RNA_def_property_flag(parm, PROP_REQUIRED);
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index 807bbdf16e1..abf83f33c8b 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -15,7 +15,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor(s): Blender Foundation (2008).
*
@@ -46,13 +46,29 @@
#include "BKE_DerivedMesh.h"
#include "BKE_depsgraph.h"
#include "DNA_object_types.h"
-// #include "GPU_draw.h"
+#include "GPU_draw.h"
+#include "BKE_global.h"
+
+#include "MEM_guardedalloc.h"
static void rna_userdef_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
WM_main_add_notifier(NC_WINDOW, NULL);
}
+static void rna_userdef_script_autoexec_update(Main *bmain, Scene *scene, PointerRNA *ptr)
+{
+ UserDef *userdef = (UserDef*)ptr->data;
+ if (userdef->flag & USER_SCRIPT_AUTOEXEC_DISABLE) G.f &= ~G_SCRIPT_AUTOEXEC;
+ else G.f |= G_SCRIPT_AUTOEXEC;
+}
+
+static void rna_userdef_mipmap_update(Main *bmain, Scene *scene, PointerRNA *ptr)
+{
+ GPU_set_mipmap(!(U.gameflags & USER_DISABLE_MIPMAP));
+ rna_userdef_update(bmain, scene, ptr);
+}
+
#if 0
static void rna_userdef_lmb_select_set(PointerRNA *ptr,int value)
{
@@ -107,6 +123,40 @@ static void rna_userdef_autokeymode_set(PointerRNA *ptr,int value)
}
}
+static void rna_userdef_timecode_style_set(PointerRNA *ptr, int value)
+{
+ UserDef *userdef = (UserDef*)ptr->data;
+ int required_size = userdef->v2d_min_gridsize;
+
+ /* set the timecode style */
+ userdef->timecode_style= value;
+
+ /* adjust the v2d gridsize if needed so that timecodes don't overlap
+ * NOTE: most of these have been hand-picked to avoid overlaps while still keeping
+ * things from getting too blown out
+ */
+ switch (value) {
+ case USER_TIMECODE_MINIMAL:
+ case USER_TIMECODE_SECONDS_ONLY:
+ /* 35 is great most of the time, but not that great for full-blown */
+ required_size= 35;
+ break;
+ case USER_TIMECODE_SMPTE_MSF:
+ required_size= 50;
+ break;
+ case USER_TIMECODE_SMPTE_FULL:
+ /* the granddaddy! */
+ required_size= 65;
+ break;
+ case USER_TIMECODE_MILLISECONDS:
+ required_size= 45;
+ break;
+ }
+
+ if (U.v2d_min_gridsize < required_size)
+ U.v2d_min_gridsize= required_size;
+}
+
static PointerRNA rna_UserDef_view_get(PointerRNA *ptr)
{
return rna_pointer_inherit_refine(ptr, &RNA_UserPreferencesView, ptr->data);
@@ -134,7 +184,7 @@ static PointerRNA rna_UserDef_system_get(PointerRNA *ptr)
static void rna_UserDef_audio_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- sound_init();
+ sound_init(bmain);
}
static void rna_UserDef_weight_color_update(Main *bmain, Scene *scene, PointerRNA *ptr)
@@ -169,6 +219,20 @@ static void rna_userdef_autosave_update(Main *bmain, Scene *scene, PointerRNA *p
rna_userdef_update(bmain, scene, ptr);
}
+static bAddon *rna_userdef_addon_new(void)
+{
+ bAddon *bext= MEM_callocN(sizeof(bAddon), "bAddon");
+ BLI_addtail(&U.addons, bext);
+ return bext;
+}
+
+static void rna_userdef_addon_remove(bAddon *bext)
+{
+ BLI_freelinkN(&U.addons, bext);
+}
+
+
+
#else
static void rna_def_userdef_theme_ui_font_style(BlenderRNA *brna)
@@ -177,13 +241,13 @@ static void rna_def_userdef_theme_ui_font_style(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem font_kerning_style[] = {
- {0, "UNFITTED", 0, "Unfitted", "Use scaled but un-grid-fitted kerning distances."},
- {1, "DEFAULT", 0, "Default", "Use scaled and grid-fitted kerning distances."},
+ {0, "UNFITTED", 0, "Unfitted", "Use scaled but un-grid-fitted kerning distances"},
+ {1, "DEFAULT", 0, "Default", "Use scaled and grid-fitted kerning distances"},
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "ThemeFontStyle", NULL);
RNA_def_struct_sdna(srna, "uiFontStyle");
- RNA_def_struct_ui_text(srna, "Font Style", "Theme settings for Font.");
+ RNA_def_struct_ui_text(srna, "Font Style", "Theme settings for Font");
prop= RNA_def_property(srna, "points", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 6, 48);
@@ -193,7 +257,7 @@ static void rna_def_userdef_theme_ui_font_style(BlenderRNA *brna)
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_ui_text(prop, "Kerning Style", "Which style to use for font kerning");
RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "shadow", PROP_INT, PROP_NONE);
@@ -231,11 +295,11 @@ static void rna_def_userdef_theme_ui_style(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ThemeStyle", NULL);
RNA_def_struct_sdna(srna, "uiStyle");
- RNA_def_struct_ui_text(srna, "Style", "Theme settings for style sets.");
+ RNA_def_struct_ui_text(srna, "Style", "Theme settings for style sets");
prop= RNA_def_property(srna, "panelzoom", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.5, 2.0);
- RNA_def_property_ui_text(prop, "Panel Zoom", "Default zoom level for panel areas.");
+ RNA_def_property_ui_text(prop, "Panel Zoom", "Default zoom level for panel areas");
prop= RNA_def_property(srna, "paneltitle", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
@@ -274,7 +338,7 @@ static void rna_def_userdef_theme_ui_wcol(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ThemeWidgetColors", NULL);
RNA_def_struct_sdna(srna, "uiWidgetColors");
- RNA_def_struct_ui_text(srna, "Theme Widget Color Set", "Theme settings for widget color sets.");
+ RNA_def_struct_ui_text(srna, "Theme Widget Color Set", "Theme settings for widget color sets");
prop= RNA_def_property(srna, "outline", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
@@ -329,7 +393,7 @@ static void rna_def_userdef_theme_ui_wcol_state(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ThemeWidgetStateColors", NULL);
RNA_def_struct_sdna(srna, "uiWidgetStateColors");
- RNA_def_struct_ui_text(srna, "Theme Widget State Color", "Theme settings for widget state colors.");
+ RNA_def_struct_ui_text(srna, "Theme Widget State Color", "Theme settings for widget state colors");
prop= RNA_def_property(srna, "inner_anim", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
@@ -376,7 +440,7 @@ static void rna_def_userdef_theme_ui(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ThemeUserInterface", NULL);
RNA_def_struct_sdna(srna, "ThemeUI");
- RNA_def_struct_ui_text(srna, "Theme User Interface", "Theme settings for user interface elements.");
+ RNA_def_struct_ui_text(srna, "Theme User Interface", "Theme settings for user interface elements");
prop= RNA_def_property(srna, "wcol_regular", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
@@ -663,7 +727,7 @@ static void rna_def_userdef_theme_space_view3d(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ThemeView3D", NULL);
RNA_def_struct_sdna(srna, "ThemeSpace");
- RNA_def_struct_ui_text(srna, "Theme 3D View", "Theme settings for the 3D View.");
+ RNA_def_struct_ui_text(srna, "Theme 3D View", "Theme settings for the 3D View");
rna_def_userdef_theme_spaces_main(srna, SPACE_VIEW3D);
@@ -727,7 +791,12 @@ static void rna_def_userdef_theme_space_view3d(BlenderRNA *brna)
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_ui_text(prop, "Face Normal", "");
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
+
+ prop= RNA_def_property(srna, "vertex_normal", PROP_FLOAT, PROP_COLOR);
+ RNA_def_property_array(prop, 3);
+ RNA_def_property_ui_text(prop, "Vertex Normal", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "bone_solid", PROP_FLOAT, PROP_COLOR);
@@ -766,7 +835,7 @@ static void rna_def_userdef_theme_space_graph(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ThemeGraphEditor", NULL);
RNA_def_struct_sdna(srna, "ThemeSpace");
- RNA_def_struct_ui_text(srna, "Theme Graph Editor", "Theme settings for the graph editor.");
+ RNA_def_struct_ui_text(srna, "Theme Graph Editor", "Theme settings for the graph editor");
rna_def_userdef_theme_spaces_main(srna, SPACE_IPO);
@@ -849,7 +918,7 @@ static void rna_def_userdef_theme_space_file(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ThemeFileBrowser", NULL);
RNA_def_struct_sdna(srna, "ThemeSpace");
- RNA_def_struct_ui_text(srna, "Theme File Browser", "Theme settings for the File Browser.");
+ RNA_def_struct_ui_text(srna, "Theme File Browser", "Theme settings for the File Browser");
rna_def_userdef_theme_spaces_main(srna, SPACE_FILE);
@@ -898,7 +967,7 @@ static void rna_def_userdef_theme_space_outliner(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ThemeOutliner", NULL);
RNA_def_struct_sdna(srna, "ThemeSpace");
- RNA_def_struct_ui_text(srna, "Theme Outliner", "Theme settings for the Outliner.");
+ RNA_def_struct_ui_text(srna, "Theme Outliner", "Theme settings for the Outliner");
rna_def_userdef_theme_spaces_main(srna, SPACE_OUTLINER);
}
@@ -911,11 +980,55 @@ static void rna_def_userdef_theme_space_userpref(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ThemeUserPreferences", NULL);
RNA_def_struct_sdna(srna, "ThemeSpace");
- RNA_def_struct_ui_text(srna, "Theme User Preferences", "Theme settings for the User Preferences.");
+ RNA_def_struct_ui_text(srna, "Theme User Preferences", "Theme settings for the User Preferences");
rna_def_userdef_theme_spaces_main(srna, SPACE_USERPREF);
}
+static void rna_def_userdef_theme_space_console(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ /* space_console */
+
+ srna= RNA_def_struct(brna, "ThemeConsole", NULL);
+ RNA_def_struct_sdna(srna, "ThemeSpace");
+ RNA_def_struct_ui_text(srna, "Theme Console", "Theme settings for the Console");
+
+ rna_def_userdef_theme_spaces_main(srna, SPACE_CONSOLE);
+
+ prop= RNA_def_property(srna, "line_output", PROP_FLOAT, PROP_COLOR);
+ RNA_def_property_float_sdna(prop, NULL, "console_output");
+ RNA_def_property_array(prop, 3);
+ RNA_def_property_ui_text(prop, "Line Output", "");
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
+
+ prop= RNA_def_property(srna, "line_input", PROP_FLOAT, PROP_COLOR);
+ RNA_def_property_float_sdna(prop, NULL, "console_input");
+ RNA_def_property_array(prop, 3);
+ RNA_def_property_ui_text(prop, "Line Input", "");
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
+
+ prop= RNA_def_property(srna, "line_info", PROP_FLOAT, PROP_COLOR);
+ RNA_def_property_float_sdna(prop, NULL, "console_info");
+ RNA_def_property_array(prop, 3);
+ RNA_def_property_ui_text(prop, "Line Info", "");
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
+
+ prop= RNA_def_property(srna, "line_error", PROP_FLOAT, PROP_COLOR);
+ RNA_def_property_float_sdna(prop, NULL, "console_error");
+ RNA_def_property_array(prop, 3);
+ RNA_def_property_ui_text(prop, "Line Error", "");
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
+
+ prop= RNA_def_property(srna, "cursor", PROP_FLOAT, PROP_COLOR);
+ RNA_def_property_float_sdna(prop, NULL, "console_cursor");
+ RNA_def_property_array(prop, 3);
+ RNA_def_property_ui_text(prop, "Cursor", "");
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
+}
+
static void rna_def_userdef_theme_space_info(BlenderRNA *brna)
{
StructRNA *srna;
@@ -924,7 +1037,7 @@ static void rna_def_userdef_theme_space_info(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ThemeInfo", NULL);
RNA_def_struct_sdna(srna, "ThemeSpace");
- RNA_def_struct_ui_text(srna, "Theme Info", "Theme settings for Info.");
+ RNA_def_struct_ui_text(srna, "Theme Info", "Theme settings for Info");
rna_def_userdef_theme_spaces_main(srna, SPACE_INFO);
}
@@ -939,7 +1052,7 @@ static void rna_def_userdef_theme_space_text(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ThemeTextEditor", NULL);
RNA_def_struct_sdna(srna, "ThemeSpace");
- RNA_def_struct_ui_text(srna, "Theme Text Editor", "Theme settings for the Text Editor.");
+ RNA_def_struct_ui_text(srna, "Theme Text Editor", "Theme settings for the Text Editor");
rna_def_userdef_theme_spaces_main(srna, SPACE_TEXT);
@@ -1007,7 +1120,7 @@ static void rna_def_userdef_theme_space_node(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ThemeNodeEditor", NULL);
RNA_def_struct_sdna(srna, "ThemeSpace");
- RNA_def_struct_ui_text(srna, "Theme Node Editor", "Theme settings for the Node Editor.");
+ RNA_def_struct_ui_text(srna, "Theme Node Editor", "Theme settings for the Node Editor");
rna_def_userdef_theme_spaces_main(srna, SPACE_NODE);
@@ -1069,7 +1182,7 @@ static void rna_def_userdef_theme_space_logic(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ThemeLogicEditor", NULL);
RNA_def_struct_sdna(srna, "ThemeSpace");
- RNA_def_struct_ui_text(srna, "Theme Logic Editor", "Theme settings for the Logic Editor.");
+ RNA_def_struct_ui_text(srna, "Theme Logic Editor", "Theme settings for the Logic Editor");
rna_def_userdef_theme_spaces_main(srna, SPACE_LOGIC);
@@ -1089,7 +1202,7 @@ static void rna_def_userdef_theme_space_buts(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ThemeProperties", NULL);
RNA_def_struct_sdna(srna, "ThemeSpace");
- RNA_def_struct_ui_text(srna, "Theme Properties", "Theme settings for the Properties.");
+ RNA_def_struct_ui_text(srna, "Theme Properties", "Theme settings for the Properties");
rna_def_userdef_theme_spaces_main(srna, SPACE_BUTS);
@@ -1108,7 +1221,7 @@ static void rna_def_userdef_theme_space_time(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ThemeTimeline", NULL);
RNA_def_struct_sdna(srna, "ThemeSpace");
- RNA_def_struct_ui_text(srna, "Theme Timeline", "Theme settings for the Timeline.");
+ RNA_def_struct_ui_text(srna, "Theme Timeline", "Theme settings for the Timeline");
rna_def_userdef_theme_spaces_main(srna, SPACE_TIME);
@@ -1133,7 +1246,7 @@ static void rna_def_userdef_theme_space_sound(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ThemeAudioWindow", NULL);
RNA_def_struct_sdna(srna, "ThemeSpace");
- RNA_def_struct_ui_text(srna, "Theme Audio Window", "Theme settings for the Audio Window.");
+ RNA_def_struct_ui_text(srna, "Theme Audio Window", "Theme settings for the Audio Window");
rna_def_userdef_theme_spaces_main(srna, SPACE_SOUND);
@@ -1164,7 +1277,7 @@ static void rna_def_userdef_theme_space_image(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ThemeImageEditor", NULL);
RNA_def_struct_sdna(srna, "ThemeSpace");
- RNA_def_struct_ui_text(srna, "Theme Image Editor", "Theme settings for the Image Editor.");
+ RNA_def_struct_ui_text(srna, "Theme Image Editor", "Theme settings for the Image Editor");
rna_def_userdef_theme_spaces_main(srna, SPACE_IMAGE);
rna_def_userdef_theme_spaces_vertex(srna);
@@ -1174,6 +1287,12 @@ static void rna_def_userdef_theme_space_image(BlenderRNA *brna)
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");
+
+ prop= RNA_def_property(srna, "scope_back", PROP_FLOAT, PROP_COLOR);
+ RNA_def_property_float_sdna(prop, NULL, "preview_back");
+ RNA_def_property_array(prop, 4);
+ RNA_def_property_ui_text(prop, "Scope region background color", "");
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
}
static void rna_def_userdef_theme_space_seq(BlenderRNA *brna)
@@ -1185,7 +1304,7 @@ static void rna_def_userdef_theme_space_seq(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ThemeSequenceEditor", NULL);
RNA_def_struct_sdna(srna, "ThemeSpace");
- RNA_def_struct_ui_text(srna, "Theme Sequence Editor", "Theme settings for the Sequence Editor.");
+ RNA_def_struct_ui_text(srna, "Theme Sequence Editor", "Theme settings for the Sequence Editor");
rna_def_userdef_theme_spaces_main(srna, SPACE_IMAGE);
@@ -1276,7 +1395,7 @@ static void rna_def_userdef_theme_space_action(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ThemeDopeSheet", NULL);
RNA_def_struct_sdna(srna, "ThemeSpace");
- RNA_def_struct_ui_text(srna, "Theme DopeSheet", "Theme settings for the DopeSheet.");
+ RNA_def_struct_ui_text(srna, "Theme DopeSheet", "Theme settings for the DopeSheet");
rna_def_userdef_theme_spaces_main(srna, SPACE_ACTION);
@@ -1361,7 +1480,7 @@ static void rna_def_userdef_theme_space_nla(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ThemeNLAEditor", NULL);
RNA_def_struct_sdna(srna, "ThemeSpace");
- RNA_def_struct_ui_text(srna, "Theme NLA Editor", "Theme settings for the NLA Editor.");
+ RNA_def_struct_ui_text(srna, "Theme NLA Editor", "Theme settings for the NLA Editor");
rna_def_userdef_theme_spaces_main(srna, SPACE_NLA);
@@ -1414,28 +1533,28 @@ static void rna_def_userdef_theme_colorset(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ThemeBoneColorSet", NULL);
RNA_def_struct_sdna(srna, "ThemeWireColor");
- RNA_def_struct_ui_text(srna, "Theme Bone Color Set", "Theme settings for bone color sets.");
+ RNA_def_struct_ui_text(srna, "Theme Bone Color Set", "Theme settings for bone color sets");
prop= RNA_def_property(srna, "normal", PROP_FLOAT, PROP_COLOR);
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_ui_text(prop, "Normal", "Color used for the surface of bones");
RNA_def_property_update(prop, 0, "rna_userdef_update");
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_ui_text(prop, "Selected", "Color used for selected bones");
RNA_def_property_update(prop, 0, "rna_userdef_update");
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_ui_text(prop, "Active", "Color used for active bones");
RNA_def_property_update(prop, 0, "rna_userdef_update");
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_ui_text(prop, "Colored Constraints", "Allow the use of colors indicating constraints/keyed status");
RNA_def_property_update(prop, 0, "rna_userdef_update");
}
@@ -1466,10 +1585,10 @@ static void rna_def_userdef_themes(BlenderRNA *brna)
srna= RNA_def_struct(brna, "Theme", NULL);
RNA_def_struct_sdna(srna, "bTheme");
- RNA_def_struct_ui_text(srna, "Theme", "Theme settings defining draw style and colors in the user interface.");
+ RNA_def_struct_ui_text(srna, "Theme", "Theme settings defining draw style and colors in the user interface");
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
- RNA_def_property_ui_text(prop, "Name", "Name of the theme.");
+ RNA_def_property_ui_text(prop, "Name", "Name of the theme");
RNA_def_struct_name_property(srna, prop);
prop= RNA_def_property(srna, "theme_area", PROP_ENUM, PROP_NONE);
@@ -1572,6 +1691,12 @@ static void rna_def_userdef_themes(BlenderRNA *brna)
RNA_def_property_pointer_sdna(prop, NULL, "tuserpref");
RNA_def_property_struct_type(prop, "ThemeUserPreferences");
RNA_def_property_ui_text(prop, "User Preferences", "");
+
+ prop= RNA_def_property(srna, "console", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
+ RNA_def_property_pointer_sdna(prop, NULL, "tconsole");
+ RNA_def_property_struct_type(prop, "ThemeConsole");
+ RNA_def_property_ui_text(prop, "Console", "");
prop= RNA_def_property(srna, "bone_color_sets", PROP_COLLECTION, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
@@ -1580,6 +1705,21 @@ static void rna_def_userdef_themes(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Bone Color Sets", "");
}
+static void rna_def_userdef_addon(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ srna= RNA_def_struct(brna, "Addon", NULL);
+ RNA_def_struct_sdna(srna, "bAddon");
+ RNA_def_struct_ui_text(srna, "Addon", "Python addons to be loaded automatically");
+
+ prop= RNA_def_property(srna, "module", PROP_STRING, PROP_NONE);
+ RNA_def_property_ui_text(prop, "Module", "Module name");
+ RNA_def_struct_name_property(srna, prop);
+}
+
+
static void rna_def_userdef_dothemes(BlenderRNA *brna)
{
@@ -1600,6 +1740,7 @@ static void rna_def_userdef_dothemes(BlenderRNA *brna)
rna_def_userdef_theme_space_outliner(brna);
rna_def_userdef_theme_space_info(brna);
rna_def_userdef_theme_space_userpref(brna);
+ rna_def_userdef_theme_space_console(brna);
rna_def_userdef_theme_space_sound(brna);
rna_def_userdef_theme_space_logic(brna);
rna_def_userdef_theme_colorset(brna);
@@ -1613,34 +1754,42 @@ static void rna_def_userdef_solidlight(BlenderRNA *brna)
srna= RNA_def_struct(brna, "UserSolidLight", NULL);
RNA_def_struct_sdna(srna, "SolidLight");
- RNA_def_struct_ui_text(srna, "Solid Light", "Light used for OpenGL lighting in solid draw mode.");
+ RNA_def_struct_ui_text(srna, "Solid Light", "Light used for OpenGL lighting in solid draw mode");
prop= RNA_def_property(srna, "enabled", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", 1);
- RNA_def_property_ui_text(prop, "Enabled", "Enable this OpenGL light in solid draw mode.");
+ RNA_def_property_ui_text(prop, "Enabled", "Enable this OpenGL light in solid draw mode");
RNA_def_property_update(prop, 0, "rna_UserDef_viewport_lights_update");
prop= RNA_def_property(srna, "direction", PROP_FLOAT, PROP_DIRECTION);
RNA_def_property_float_sdna(prop, NULL, "vec");
RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "Direction", "The direction that the OpenGL light is shining.");
+ RNA_def_property_ui_text(prop, "Direction", "The direction that the OpenGL light is shining");
RNA_def_property_update(prop, 0, "rna_UserDef_viewport_lights_update");
prop= RNA_def_property(srna, "diffuse_color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "col");
RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "Diffuse Color", "The diffuse color of the OpenGL light.");
+ RNA_def_property_ui_text(prop, "Diffuse Color", "The diffuse color of the OpenGL light");
RNA_def_property_update(prop, 0, "rna_UserDef_viewport_lights_update");
prop= RNA_def_property(srna, "specular_color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "spec");
RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "Specular Color", "The color of the lights specular highlight.");
+ RNA_def_property_ui_text(prop, "Specular Color", "The color of the lights specular highlight");
RNA_def_property_update(prop, 0, "rna_UserDef_viewport_lights_update");
}
static void rna_def_userdef_view(BlenderRNA *brna)
{
+ static EnumPropertyItem timecode_styles[] = {
+ {USER_TIMECODE_MINIMAL, "MINIMAL", 0, "Minimal Info", "Most compact representation. Uses '+' as separator for sub-second frame numbers, with left and right truncation of the timecode as necessary"},
+ {USER_TIMECODE_SMPTE_FULL, "SMPTE", 0, "SMPTE (Full)", "Full SMPTE timecode. Format is HH:MM:SS:FF"},
+ {USER_TIMECODE_SMPTE_MSF, "SMPTE_COMPACT", 0, "SMPTE (Compact)", "SMPTE timecode showing minutes, seconds, and frames only. Hours are also shown if necessary, but not by default"},
+ {USER_TIMECODE_MILLISECONDS, "MILLISECONDS", 0, "Compact with Milliseconds", "Similar to SMPTE (Compact), except that instead of frames, milliseconds are shown instead"},
+ {USER_TIMECODE_SECONDS_ONLY, "SECONDS_ONLY", 0, "Only Seconds", "Direct conversion of frame numbers to seconds"},
+ {0, NULL, 0, NULL, NULL}};
+
PropertyRNA *prop;
StructRNA *srna;
@@ -1654,172 +1803,177 @@ static void rna_def_userdef_view(BlenderRNA *brna)
/* display */
prop= RNA_def_property(srna, "tooltips", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_TOOLTIPS);
- RNA_def_property_ui_text(prop, "Tooltips", "Display tooltips.");
+ RNA_def_property_ui_text(prop, "Tooltips", "Display tooltips");
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_ui_text(prop, "Display Object Info", "Display objects name and frame number in 3D view");
RNA_def_property_update(prop, 0, "rna_userdef_update");
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_ui_text(prop, "Global Scene", "Forces the current Scene to be displayed in all Screens");
RNA_def_property_update(prop, 0, "rna_userdef_update");
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_ui_text(prop, "Large Cursors", "Use large mouse cursors when available");
RNA_def_property_update(prop, 0, "rna_userdef_update");
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_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");
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_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");
/* menus */
prop= RNA_def_property(srna, "open_mouse_over", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_MENUOPENAUTO);
- RNA_def_property_ui_text(prop, "Open On Mouse Over", "Open menu buttons and pulldowns automatically when the mouse is hovering.");
+ RNA_def_property_ui_text(prop, "Open On Mouse Over", "Open menu buttons and pulldowns automatically when the mouse is hovering");
prop= RNA_def_property(srna, "open_toplevel_delay", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "menuthreshold1");
RNA_def_property_range(prop, 1, 40);
- RNA_def_property_ui_text(prop, "Top Level Menu Open Delay", "Time delay in 1/10 seconds before automatically opening top level menus.");
+ RNA_def_property_ui_text(prop, "Top Level Menu Open Delay", "Time delay in 1/10 seconds before automatically opening top level menus");
prop= RNA_def_property(srna, "open_sublevel_delay", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "menuthreshold2");
RNA_def_property_range(prop, 1, 40);
- RNA_def_property_ui_text(prop, "Sub Level Menu Open Delay", "Time delay in 1/10 seconds before automatically opening sub level menus.");
+ RNA_def_property_ui_text(prop, "Sub Level Menu Open Delay", "Time delay in 1/10 seconds before automatically opening sub level menus");
/* Toolbox click-hold delay */
prop= RNA_def_property(srna, "open_left_mouse_delay", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "tb_leftmouse");
RNA_def_property_range(prop, 1, 40);
- RNA_def_property_ui_text(prop, "Hold LMB Open Toolbox Delay", "Time in 1/10 seconds to hold the Left Mouse Button before opening the toolbox.");
+ RNA_def_property_ui_text(prop, "Hold LMB Open Toolbox Delay", "Time in 1/10 seconds to hold the Left Mouse Button before opening the toolbox");
prop= RNA_def_property(srna, "open_right_mouse_delay", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "tb_rightmouse");
RNA_def_property_range(prop, 1, 40);
- RNA_def_property_ui_text(prop, "Hold RMB Open Toolbox Delay", "Time in 1/10 seconds to hold the Right Mouse Button before opening the toolbox.");
+ RNA_def_property_ui_text(prop, "Hold RMB Open Toolbox Delay", "Time in 1/10 seconds to hold the Right Mouse Button before opening the toolbox");
prop= RNA_def_property(srna, "pin_floating_panels", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_PANELPINNED);
- RNA_def_property_ui_text(prop, "Pin Floating Panels", "Make floating panels invoked by a hotkey (eg. N Key) open at the previous location.");
+ RNA_def_property_ui_text(prop, "Pin Floating Panels", "Make floating panels invoked by a hotkey (eg. N Key) open at the previous location");
prop= RNA_def_property(srna, "use_column_layout", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_PLAINMENUS);
- RNA_def_property_ui_text(prop, "Toolbox Column Layout", "Use a column layout for toolbox.");
+ RNA_def_property_ui_text(prop, "Toolbox Column Layout", "Use a column layout for toolbox");
prop= RNA_def_property(srna, "directional_menus", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "uiflag", USER_MENUFIXEDORDER);
- RNA_def_property_ui_text(prop, "Contents Follow Opening Direction", "Otherwise menus, etc will always be top to bottom, left to right, no matter opening direction.");
+ RNA_def_property_ui_text(prop, "Contents Follow Opening Direction", "Otherwise menus, etc will always be top to bottom, left to right, no matter opening direction");
prop= RNA_def_property(srna, "global_pivot", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_LOCKAROUND);
- RNA_def_property_ui_text(prop, "Global Pivot", "Lock the same rotation/scaling pivot in all 3D Views.");
+ RNA_def_property_ui_text(prop, "Global Pivot", "Lock the same rotation/scaling pivot in all 3D Views");
prop= RNA_def_property(srna, "auto_depth", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_ORBIT_ZBUF);
- RNA_def_property_ui_text(prop, "Auto Depth", "Use the depth under the mouse to improve view pan/rotate/zoom functionality.");
+ RNA_def_property_ui_text(prop, "Auto Depth", "Use the depth under the mouse to improve view pan/rotate/zoom functionality");
/* view zoom */
-
prop= RNA_def_property(srna, "zoom_to_mouse", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_ZOOM_TO_MOUSEPOS);
- RNA_def_property_ui_text(prop, "Zoom To Mouse Position", "Zoom in towards the mouse pointer's position in the 3D view, rather than the 2D window center.");
+ RNA_def_property_ui_text(prop, "Zoom To Mouse Position", "Zoom in towards the mouse pointer's position in the 3D view, rather than the 2D window center");
/* view rotation */
-
prop= RNA_def_property(srna, "auto_perspective", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_AUTOPERSP);
- RNA_def_property_ui_text(prop, "Auto Perspective", "Automatically switch between orthographic and perspective when changing from top/front/side views.");
+ RNA_def_property_ui_text(prop, "Auto Perspective", "Automatically switch between orthographic and perspective when changing from top/front/side views");
prop= RNA_def_property(srna, "rotate_around_selection", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_ORBIT_SELECTION);
- RNA_def_property_ui_text(prop, "Rotate Around Selection", "Use selection as the pivot point.");
-
- /* select with */
-
-
-
-
+ RNA_def_property_ui_text(prop, "Rotate Around Selection", "Use selection as the pivot point");
- prop= RNA_def_property(srna, "use_middle_mouse_paste", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_MMB_PASTE);
- RNA_def_property_ui_text(prop, "Middle Mouse Paste", "In text window, paste with middle mouse button instead of panning.");
-
+ /* mini axis */
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_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_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_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, "use_middle_mouse_paste", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_MMB_PASTE);
+ RNA_def_property_ui_text(prop, "Middle Mouse Paste", "In text window, paste with middle mouse button instead of panning");
-
-
prop= RNA_def_property(srna, "wheel_invert_zoom", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_WHEELZOOMDIR);
- RNA_def_property_ui_text(prop, "Wheel Invert Zoom", "Swap the Mouse Wheel zoom direction.");
+ RNA_def_property_ui_text(prop, "Wheel Invert Zoom", "Swap the Mouse Wheel zoom direction");
prop= RNA_def_property(srna, "wheel_scroll_lines", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "wheellinescroll");
RNA_def_property_range(prop, 0, 32);
- RNA_def_property_ui_text(prop, "Wheel Scroll Lines", "The number of lines scrolled at a time with the mouse wheel.");
+ RNA_def_property_ui_text(prop, "Wheel Scroll Lines", "The number of lines scrolled at a time with the mouse wheel");
prop= RNA_def_property(srna, "smooth_view", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "smooth_viewtx");
RNA_def_property_range(prop, 0, 1000);
- RNA_def_property_ui_text(prop, "Smooth View", "The time to animate the view in milliseconds, zero to disable.");
+ RNA_def_property_ui_text(prop, "Smooth View", "The time to animate the view in milliseconds, zero to disable");
prop= RNA_def_property(srna, "rotation_angle", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "pad_rot_angle");
RNA_def_property_range(prop, 0, 90);
- RNA_def_property_ui_text(prop, "Rotation Angle", "The rotation step for numerical pad keys (2 4 6 8).");
+ RNA_def_property_ui_text(prop, "Rotation Angle", "The rotation step for numerical pad keys (2 4 6 8)");
/* 3D transform widget */
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_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_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_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");
RNA_def_property_range(prop, 4, 40);
- RNA_def_property_ui_text(prop, "Manipulator Hotspot", "Hotspot in pixels for clicking widget handles.");
+ RNA_def_property_ui_text(prop, "Manipulator Hotspot", "Hotspot in pixels for clicking widget handles");
prop= RNA_def_property(srna, "object_origin_size", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "obcenter_dia");
RNA_def_property_range(prop, 4, 10);
- RNA_def_property_ui_text(prop, "Object Origin Size", "Diameter in Pixels for Object/Lamp origin display.");
+ RNA_def_property_ui_text(prop, "Object Origin Size", "Diameter in Pixels for Object/Lamp origin display");
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
+
+ /* View2D Grid Displays */
+ prop= RNA_def_property(srna, "view2d_grid_minimum_spacing", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "v2d_min_gridsize");
+ RNA_def_property_range(prop, 1, 500); // XXX: perhaps the lower range should only go down to 5?
+ RNA_def_property_ui_text(prop, "2D View Minimum Grid Spacing", "Minimum number of pixels between each gridline in 2D Viewports");
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
+
+ // TODO: add a setter for this, so that we can bump up the minimum size as necessary...
+ prop= RNA_def_property(srna, "timecode_style", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_items(prop, timecode_styles);
+ RNA_def_property_enum_sdna(prop, NULL, "timecode_style");
+ RNA_def_property_enum_funcs(prop, NULL, "rna_userdef_timecode_style_set", NULL);
+ RNA_def_property_ui_text(prop, "TimeCode Style", "Format of Time Codes displayed when not displaying timing in terms of frames");
RNA_def_property_update(prop, 0, "rna_userdef_update");
}
@@ -1832,7 +1986,8 @@ static void rna_def_userdef_edit(BlenderRNA *brna)
{AUTOKEY_MODE_NORMAL, "ADD_REPLACE_KEYS", 0, "Add/Replace", ""},
{AUTOKEY_MODE_EDITKEYS, "REPLACE_KEYS", 0, "Replace", ""},
{0, NULL, 0, NULL, NULL}};
-
+
+ // XXX: we could just use the one that is defined in rna_curve.h
static EnumPropertyItem new_interpolation_types[] = {
{BEZT_IPO_CONST, "CONSTANT", 0, "Constant", ""},
{BEZT_IPO_LIN, "LINEAR", 0, "Linear", ""},
@@ -1840,8 +1995,8 @@ static void rna_def_userdef_edit(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
static const EnumPropertyItem material_link_items[]= {
- {0, "OBDATA", 0, "ObData", "Toggle whether the material is linked to object data or the object block."},
- {USER_MAT_ON_OB, "OBJECT", 0, "Object", "Toggle whether the material is linked to object data or the object block."},
+ {0, "OBDATA", 0, "ObData", "Toggle whether the material is linked to object data or the object block"},
+ {USER_MAT_ON_OB, "OBJECT", 0, "Object", "Toggle whether the material is linked to object data or the object block"},
{0, NULL, 0, NULL, NULL}};
static const EnumPropertyItem object_align_items[]= {
@@ -1852,7 +2007,7 @@ static void rna_def_userdef_edit(BlenderRNA *brna)
srna= RNA_def_struct(brna, "UserPreferencesEdit", NULL);
RNA_def_struct_sdna(srna, "UserDef");
RNA_def_struct_nested(brna, srna, "UserPreferences");
- RNA_def_struct_ui_text(srna, "Edit Methods", "Settings for interacting with Blender data.");
+ RNA_def_struct_ui_text(srna, "Edit Methods", "Settings for interacting with Blender data");
/* Edit Methods */
@@ -1868,143 +2023,154 @@ static void rna_def_userdef_edit(BlenderRNA *brna)
prop= RNA_def_property(srna, "enter_edit_mode", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_ADD_EDITMODE);
- RNA_def_property_ui_text(prop, "Enter Edit Mode", "Enter Edit Mode automatically after adding a new object.");
+ RNA_def_property_ui_text(prop, "Enter Edit Mode", "Enter Edit Mode automatically after adding a new object");
prop= RNA_def_property(srna, "drag_immediately", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_DRAGIMMEDIATE);
- RNA_def_property_ui_text(prop, "Drag Immediately", "Moving things with a mouse drag doesn't require a click to confirm (Best for tablet users).");
-
+ RNA_def_property_ui_text(prop, "Drag Immediately", "Moving things with a mouse drag doesn't require a click to confirm (Best for tablet users)");
+
+ /* Undo */
prop= RNA_def_property(srna, "undo_steps", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "undosteps");
RNA_def_property_range(prop, 0, 64);
- RNA_def_property_ui_text(prop, "Undo Steps", "Number of undo steps available (smaller values conserve memory).");
+ RNA_def_property_ui_text(prop, "Undo Steps", "Number of undo steps available (smaller values conserve memory)");
prop= RNA_def_property(srna, "undo_memory_limit", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "undomemory");
RNA_def_property_range(prop, 0, 32767);
- RNA_def_property_ui_text(prop, "Undo Memory Size", "Maximum memory usage in megabytes (0 means unlimited).");
+ RNA_def_property_ui_text(prop, "Undo Memory Size", "Maximum memory usage in megabytes (0 means unlimited)");
prop= RNA_def_property(srna, "global_undo", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_GLOBALUNDO);
- RNA_def_property_ui_text(prop, "Global Undo", "Global undo works by keeping a full copy of the file itself in memory, so takes extra memory.");
+ RNA_def_property_ui_text(prop, "Global Undo", "Global undo works by keeping a full copy of the file itself in memory, so takes extra memory");
- /* snap to grid */
+ /* snapping */
prop= RNA_def_property(srna, "snap_translate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_AUTOGRABGRID);
- RNA_def_property_ui_text(prop, "Enable Translation Snap", "Snap objects and sub-objects to grid units when moving.");
+ RNA_def_property_ui_text(prop, "Enable Translation Snap", "Snap objects and sub-objects to grid units when moving");
prop= RNA_def_property(srna, "snap_rotate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_AUTOROTGRID);
- RNA_def_property_ui_text(prop, "Enable Rotation Snap", "Snap objects and sub-objects to grid units when rotating.");
+ RNA_def_property_ui_text(prop, "Enable Rotation Snap", "Snap objects and sub-objects to grid units when rotating");
prop= RNA_def_property(srna, "snap_scale", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_AUTOSIZEGRID);
- RNA_def_property_ui_text(prop, "Enable Scaling Snap", "Snap objects and sub-objects to grid units when scaling.");
-
- prop= RNA_def_property(srna, "auto_keying_enable", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_ui_text(prop, "Enable Scaling Snap", "Snap objects and sub-objects to grid units when scaling");
+
+ /* auto keyframing */
+ prop= RNA_def_property(srna, "use_auto_keying", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "autokey_mode", AUTOKEY_ON);
- RNA_def_property_ui_text(prop, "Auto Keying Enable", "Automatic keyframe insertion for Objects and Bones.");
+ RNA_def_property_ui_text(prop, "Auto Keying Enable", "Automatic keyframe insertion for Objects and Bones");
prop= RNA_def_property(srna, "auto_keying_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, auto_key_modes);
RNA_def_property_enum_funcs(prop, "rna_userdef_autokeymode_get", "rna_userdef_autokeymode_set", NULL);
- RNA_def_property_ui_text(prop, "Auto Keying Mode", "Mode of automatic keyframe insertion for Objects and Bones.");
+ RNA_def_property_ui_text(prop, "Auto Keying Mode", "Mode of automatic keyframe insertion for Objects and Bones");
prop= RNA_def_property(srna, "auto_keyframe_insert_available", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "autokey_flag", AUTOKEY_FLAG_INSERTAVAIL);
- RNA_def_property_ui_text(prop, "Auto Keyframe Insert Available", "Automatic keyframe insertion in available curves.");
+ RNA_def_property_ui_text(prop, "Auto Keyframe Insert Available", "Automatic keyframe insertion in available curves");
prop= RNA_def_property(srna, "auto_keyframe_insert_keyingset", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "autokey_flag", AUTOKEY_FLAG_ONLYKEYINGSET);
- RNA_def_property_ui_text(prop, "Auto Keyframe Insert Keying Set", "Automatic keyframe insertion using active Keying Set.");
+ RNA_def_property_ui_text(prop, "Auto Keyframe Insert Keying Set", "Automatic keyframe insertion using active Keying Set");
+ /* keyframing settings */
prop= RNA_def_property(srna, "keyframe_insert_needed", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "autokey_flag", AUTOKEY_FLAG_INSERTNEEDED);
- RNA_def_property_ui_text(prop, "Keyframe Insert Needed", "Keyframe insertion only when keyframe needed.");
+ RNA_def_property_ui_text(prop, "Keyframe Insert Needed", "Keyframe insertion only when keyframe needed");
prop= RNA_def_property(srna, "use_visual_keying", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "autokey_flag", AUTOKEY_FLAG_AUTOMATKEY);
- RNA_def_property_ui_text(prop, "Visual Keying", "Use Visual keying automatically for constrained objects.");
+ RNA_def_property_ui_text(prop, "Visual Keying", "Use Visual keying automatically for constrained objects");
prop= RNA_def_property(srna, "insertkey_xyz_to_rgb", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "autokey_flag", AUTOKEY_FLAG_XYZ2RGB);
- RNA_def_property_ui_text(prop, "New F-Curve Colors - XYZ to RGB", "Color for newly added transformation F-Curves (Location, Rotation, Scale) and also Color is based on the transform axis.");
+ RNA_def_property_ui_text(prop, "New F-Curve Colors - XYZ to RGB", "Color for newly added transformation F-Curves (Location, Rotation, Scale) and also Color is based on the transform axis");
prop= RNA_def_property(srna, "new_interpolation_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, new_interpolation_types);
RNA_def_property_enum_sdna(prop, NULL, "ipo_new");
RNA_def_property_ui_text(prop, "New Interpolation Type", "");
+ /* frame numbers */
+ prop= RNA_def_property(srna, "use_negative_frames", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", USER_NONEGFRAMES);
+ RNA_def_property_ui_text(prop, "Allow Negative Frames", "Current frame number can be manually set to a negative value");
+
+ /* grease pencil */
prop= RNA_def_property(srna, "grease_pencil_manhattan_distance", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "gp_manhattendist");
RNA_def_property_range(prop, 0, 100);
- RNA_def_property_ui_text(prop, "Grease Pencil Manhattan Distance", "Pixels moved by mouse per axis when drawing stroke.");
+ RNA_def_property_ui_text(prop, "Grease Pencil Manhattan Distance", "Pixels moved by mouse per axis when drawing stroke");
prop= RNA_def_property(srna, "grease_pencil_euclidean_distance", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "gp_euclideandist");
RNA_def_property_range(prop, 0, 100);
- RNA_def_property_ui_text(prop, "Grease Pencil Euclidean Distance", "Distance moved by mouse when drawing stroke (in pixels) to include.");
+ RNA_def_property_ui_text(prop, "Grease Pencil Euclidean Distance", "Distance moved by mouse when drawing stroke (in pixels) to include");
prop= RNA_def_property(srna, "grease_pencil_smooth_stroke", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gp_settings", GP_PAINT_DOSMOOTH);
- RNA_def_property_ui_text(prop, "Grease Pencil Smooth Stroke", "Smooth the final stroke.");
+ RNA_def_property_ui_text(prop, "Grease Pencil Smooth Stroke", "Smooth the final stroke");
prop= RNA_def_property(srna, "grease_pencil_simplify_stroke", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gp_settings", GP_PAINT_DOSIMPLIFY);
- RNA_def_property_ui_text(prop, "Grease Pencil Simplify Stroke", "Simplify the final stroke.");
+ RNA_def_property_ui_text(prop, "Grease Pencil Simplify Stroke", "Simplify the final stroke");
prop= RNA_def_property(srna, "grease_pencil_eraser_radius", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "gp_eraser");
RNA_def_property_range(prop, 0, 100);
- RNA_def_property_ui_text(prop, "Grease Pencil Eraser Radius", "Radius of eraser 'brush'.");
-
+ RNA_def_property_ui_text(prop, "Grease Pencil Eraser Radius", "Radius of eraser 'brush'");
+
+ /* duplication linking */
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 the object");
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 the object");
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 the object");
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 the object");
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 the object");
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 the object");
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 the object");
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 the object");
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 the object");
+
+ // xxx
prop= RNA_def_property(srna, "duplicate_fcurve", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_IPO);
- RNA_def_property_ui_text(prop, "Duplicate F-Curve", "Causes F-curve data to be duplicated with the object.");
-
+ RNA_def_property_ui_text(prop, "Duplicate F-Curve", "Causes F-curve data to be duplicated with the object");
+ // xxx
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.");
+ 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 Particle", "Causes particle systems to be duplicated with the object");
}
static void rna_def_userdef_system(BlenderRNA *brna)
@@ -2035,52 +2201,54 @@ static void rna_def_userdef_system(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem audio_device_items[] = {
- {0, "NONE", 0, "None", "Null device - there will be no audio output."},
+ {0, "NONE", 0, "None", "Null device - there will be no audio output"},
#ifdef WITH_SDL
- {1, "SDL", 0, "SDL", "SDL device - simple direct media layer, recommended for sequencer usage."},
+ {1, "SDL", 0, "SDL", "SDL device - simple direct media layer, recommended for sequencer usage"},
#endif
#ifdef WITH_OPENAL
- {2, "OPENAL", 0, "OpenAL", "OpenAL device - supports 3D audio, recommended for game engine usage."},
+ {2, "OPENAL", 0, "OpenAL", "OpenAL device - supports 3D audio, recommended for game engine usage"},
#endif
#ifdef WITH_JACK
- {3, "JACK", 0, "Jack", "Jack device - open source pro audio, recommended for pro audio users."},
+ {3, "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[] = {
-// {8000, "RATE_8000", 0, "8 kHz", "Set audio sampling rate to 8000 samples per second."},
-// {11025, "RATE_11025", 0, "11.025 kHz", "Set audio sampling rate to 11025 samples per second."},
-// {16000, "RATE_16000", 0, "16 kHz", "Set audio sampling rate to 16000 samples per second."},
-// {22050, "RATE_22050", 0, "22.05 kHz", "Set audio sampling rate to 22050 samples per second."},
-// {32000, "RATE_32000", 0, "32 kHz", "Set audio sampling rate to 32000 samples per second."},
- {44100, "RATE_44100", 0, "44.1 kHz", "Set audio sampling rate to 44100 samples per second."},
- {48000, "RATE_48000", 0, "48 kHz", "Set audio sampling rate to 48000 samples per second."},
-// {88200, "RATE_88200", 0, "88.2 kHz", "Set audio sampling rate to 88200 samples per second."},
- {96000, "RATE_96000", 0, "96 kHz", "Set audio sampling rate to 96000 samples per second."},
- {192000, "RATE_192000", 0, "192 kHz", "Set audio sampling rate to 192000 samples per second."},
+// {8000, "RATE_8000", 0, "8 kHz", "Set audio sampling rate to 8000 samples per second"},
+// {11025, "RATE_11025", 0, "11.025 kHz", "Set audio sampling rate to 11025 samples per second"},
+// {16000, "RATE_16000", 0, "16 kHz", "Set audio sampling rate to 16000 samples per second"},
+// {22050, "RATE_22050", 0, "22.05 kHz", "Set audio sampling rate to 22050 samples per second"},
+// {32000, "RATE_32000", 0, "32 kHz", "Set audio sampling rate to 32000 samples per second"},
+ {44100, "RATE_44100", 0, "44.1 kHz", "Set audio sampling rate to 44100 samples per second"},
+ {48000, "RATE_48000", 0, "48 kHz", "Set audio sampling rate to 48000 samples per second"},
+// {88200, "RATE_88200", 0, "88.2 kHz", "Set audio sampling rate to 88200 samples per second"},
+ {96000, "RATE_96000", 0, "96 kHz", "Set audio sampling rate to 96000 samples per second"},
+ {192000, "RATE_192000", 0, "192 kHz", "Set audio sampling rate to 192000 samples per second"},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem audio_format_items[] = {
- {0x01, "U8", 0, "8-bit Unsigned", "Set audio sample format to 8 bit unsigned integer."},
- {0x12, "S16", 0, "16-bit Signed", "Set audio sample format to 16 bit signed integer."},
- {0x13, "S24", 0, "24-bit Signed", "Set audio sample format to 24 bit signed integer."},
- {0x14, "S32", 0, "32-bit Signed", "Set audio sample format to 32 bit signed integer."},
- {0x24, "FLOAT", 0, "32-bit Float", "Set audio sample format to 32 bit float."},
- {0x28, "DOUBLE", 0, "64-bit Float", "Set audio sample format to 64 bit float."},
+ {0x01, "U8", 0, "8-bit Unsigned", "Set audio sample format to 8 bit unsigned integer"},
+ {0x12, "S16", 0, "16-bit Signed", "Set audio sample format to 16 bit signed integer"},
+ {0x13, "S24", 0, "24-bit Signed", "Set audio sample format to 24 bit signed integer"},
+ {0x14, "S32", 0, "32-bit Signed", "Set audio sample format to 32 bit signed integer"},
+ {0x24, "FLOAT", 0, "32-bit Float", "Set audio sample format to 32 bit float"},
+ {0x28, "DOUBLE", 0, "64-bit Float", "Set audio sample format to 64 bit float"},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem audio_channel_items[] = {
- {1, "MONO", 0, "Mono", "Set audio channels to mono."},
- {2, "STEREO", 0, "Stereo", "Set audio channels to stereo."},
- {4, "SURROUND4", 0, "4 Channels", "Set audio channels to 4 channels."},
- {6, "SURROUND51", 0, "5.1 Surround", "Set audio channels to 5.1 surround sound."},
- {8, "SURROUND71", 0, "7.1 Surround", "Set audio channels to 7.1 surround sound."},
+ {1, "MONO", 0, "Mono", "Set audio channels to mono"},
+ {2, "STEREO", 0, "Stereo", "Set audio channels to stereo"},
+ {4, "SURROUND4", 0, "4 Channels", "Set audio channels to 4 channels"},
+ {6, "SURROUND51", 0, "5.1 Surround", "Set audio channels to 5.1 surround sound"},
+ {8, "SURROUND71", 0, "7.1 Surround", "Set audio channels to 7.1 surround sound"},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem draw_method_items[] = {
- {USER_DRAW_TRIPLE, "TRIPLE_BUFFER", 0, "Triple Buffer", "Use a third buffer for minimal redraws at the cost of more memory."},
- {USER_DRAW_OVERLAP, "OVERLAP", 0, "Overlap", "Redraw all overlapping regions, minimal memory usage but more redraws."},
- {USER_DRAW_FULL, "FULL", 0, "Full", "Do a full redraw each time, slow, only use for reference or when all else fails."},
+ {USER_DRAW_AUTOMATIC, "AUTOMATIC", 0, "Automatic", "Automatically set based on graphics card and driver"},
+ {USER_DRAW_TRIPLE, "TRIPLE_BUFFER", 0, "Triple Buffer", "Use a third buffer for minimal redraws at the cost of more memory"},
+ {USER_DRAW_OVERLAP, "OVERLAP", 0, "Overlap", "Redraw all overlapping regions, minimal memory usage but more redraws"},
+ {USER_DRAW_OVERLAP_FLIP, "OVERLAP_FLIP", 0, "Overlap Flip", "Redraw all overlapping regions, minimal memory usage but more redraws (for graphics drivers that do flipping)"},
+ {USER_DRAW_FULL, "FULL", 0, "Full", "Do a full redraw each time, slow, only use for reference or when all else fails"},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem color_picker_types[] = {
@@ -2120,51 +2288,51 @@ static void rna_def_userdef_system(BlenderRNA *brna)
srna= RNA_def_struct(brna, "UserPreferencesSystem", NULL);
RNA_def_struct_sdna(srna, "UserDef");
RNA_def_struct_nested(brna, srna, "UserPreferences");
- RNA_def_struct_ui_text(srna, "System & OpenGL", "Graphics driver and operating system settings.");
+ RNA_def_struct_ui_text(srna, "System & OpenGL", "Graphics driver and operating system settings");
/* Language */
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_ui_text(prop, "International Fonts", "Use international fonts");
RNA_def_property_update(prop, 0, "rna_userdef_update");
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_ui_text(prop, "DPI", "Font size and resolution for display");
RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "scrollback", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "scrollback");
RNA_def_property_range(prop, 32, 32768);
- RNA_def_property_ui_text(prop, "Scrollback", "Maximum number of lines to store for the console buffer.");
+ RNA_def_property_ui_text(prop, "Scrollback", "Maximum number of lines to store for the console buffer");
/* Language Selection */
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_ui_text(prop, "Language", "Language use for translation");
RNA_def_property_update(prop, 0, "rna_userdef_update");
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_ui_text(prop, "Translate Tooltips", "Translate Tooltips");
RNA_def_property_update(prop, 0, "rna_userdef_update");
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_ui_text(prop, "Translate Buttons", "Translate button labels");
RNA_def_property_update(prop, 0, "rna_userdef_update");
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_ui_text(prop, "Translate Toolbox", "Translate toolbox menu");
RNA_def_property_update(prop, 0, "rna_userdef_update");
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_ui_text(prop, "Textured Fonts", "Use textures for drawing international fonts");
RNA_def_property_update(prop, 0, "rna_userdef_update");
/* System & OpenGL */
@@ -2172,18 +2340,18 @@ static void rna_def_userdef_system(BlenderRNA *brna)
prop= RNA_def_property(srna, "solid_lights", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "light", "");
RNA_def_property_struct_type(prop, "UserSolidLight");
- RNA_def_property_ui_text(prop, "Solid Lights", "Lights user to display objects in solid draw mode.");
+ RNA_def_property_ui_text(prop, "Solid Lights", "Lights user to display objects in solid draw mode");
prop= RNA_def_property(srna, "use_weight_color_range", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_CUSTOM_RANGE);
- RNA_def_property_ui_text(prop, "Use Weight Color Range", "Enable color range used for weight visualization in weight painting mode.");
+ RNA_def_property_ui_text(prop, "Use Weight Color Range", "Enable color range used for weight visualization in weight painting mode");
RNA_def_property_update(prop, 0, "rna_UserDef_weight_color_update");
prop= RNA_def_property(srna, "weight_color_range", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "coba_weight");
RNA_def_property_struct_type(prop, "ColorRamp");
- RNA_def_property_ui_text(prop, "Weight Color Range", "Color range used for weight visualization in weight painting mode.");
+ RNA_def_property_ui_text(prop, "Weight Color Range", "Color range used for weight visualization in weight painting mode");
RNA_def_property_update(prop, 0, "rna_UserDef_weight_color_update");
prop= RNA_def_property(srna, "color_picker_type", PROP_ENUM, PROP_NONE);
@@ -2193,39 +2361,42 @@ static void rna_def_userdef_system(BlenderRNA *brna)
prop= RNA_def_property(srna, "enable_all_codecs", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_ALLWINCODECS);
- RNA_def_property_ui_text(prop, "Enable All Codecs", "Enables automatic saving of preview images in the .blend file (Windows only).");
+ RNA_def_property_ui_text(prop, "Enable All Codecs", "Enables automatic saving of preview images in the .blend file (Windows only)");
- prop= RNA_def_property(srna, "auto_run_python_scripts", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_DONT_DOSCRIPTLINKS);
- RNA_def_property_ui_text(prop, "Auto Run Python Scripts", "Allow any .blend file to run scripts automatically (unsafe with blend files from an untrusted source).");
+ prop= RNA_def_property(srna, "auto_execute_scripts", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", USER_SCRIPT_AUTOEXEC_DISABLE);
+ RNA_def_property_ui_text(prop, "Auto Run Python Scripts", "Allow any .blend file to run scripts automatically (unsafe with blend files from an untrusted source)");
+ RNA_def_property_update(prop, 0, "rna_userdef_script_autoexec_update");
prop= RNA_def_property(srna, "prefetch_frames", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "prefetchframes");
RNA_def_property_range(prop, 0, 500);
- RNA_def_property_ui_text(prop, "Prefetch Frames", "Number of frames to render ahead during playback.");
+ RNA_def_property_ui_text(prop, "Prefetch Frames", "Number of frames to render ahead during playback");
prop= RNA_def_property(srna, "memory_cache_limit", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "memcachelimit");
RNA_def_property_range(prop, 0, (sizeof(void *) ==8)? 1024*16: 1024); /* 32 bit 2 GB, 64 bit 16 GB */
- RNA_def_property_ui_text(prop, "Memory Cache Limit", "Memory cache limit in sequencer (megabytes).");
+ RNA_def_property_ui_text(prop, "Memory Cache Limit", "Memory cache limit in sequencer (megabytes)");
prop= RNA_def_property(srna, "frame_server_port", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "frameserverport");
RNA_def_property_range(prop, 0, 32727);
- RNA_def_property_ui_text(prop, "Frame Server Port", "Frameserver Port for Framserver-Rendering.");
+ RNA_def_property_ui_text(prop, "Frame Server Port", "Frameserver Port for Framserver-Rendering");
prop= RNA_def_property(srna, "clip_alpha", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "glalphaclip");
RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Clip Alpha", "Clip alpha below this threshold in the 3d textured view.");
+ RNA_def_property_ui_text(prop, "Clip Alpha", "Clip alpha below this threshold in the 3D textured view");
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "use_mipmaps", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "gameflags", USER_DISABLE_MIPMAP);
- RNA_def_property_ui_text(prop, "Mipmaps", "Scale textures for the 3d View (looks nicer but uses more memory and slows image reloading.)");
+ RNA_def_property_ui_text(prop, "Mipmaps", "Scale textures for the 3D View (looks nicer but uses more memory and slows image reloading)");
+ RNA_def_property_update(prop, 0, "rna_userdef_mipmap_update");
prop= RNA_def_property(srna, "use_vbos", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "gameflags", USER_DISABLE_VBO);
- RNA_def_property_ui_text(prop, "VBOs", "Use Vertex Buffer Objects (or Vertex Arrays, if unsupported) for viewport rendering.");
+ RNA_def_property_ui_text(prop, "VBOs", "Use Vertex Buffer Objects (or Vertex Arrays, if unsupported) for viewport rendering");
prop= RNA_def_property(srna, "use_antialiasing", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "gameflags", USER_DISABLE_AA);
@@ -2234,7 +2405,8 @@ static void rna_def_userdef_system(BlenderRNA *brna)
prop= RNA_def_property(srna, "gl_texture_limit", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "glreslimit");
RNA_def_property_enum_items(prop, gl_texture_clamp_items);
- RNA_def_property_ui_text(prop, "GL Texture Limit", "Limit the texture size to save graphics memory.");
+ RNA_def_property_ui_text(prop, "GL Texture Limit", "Limit the texture size to save graphics memory");
+ RNA_def_property_update(prop, 0, "rna_userdef_mipmap_update");
prop= RNA_def_property(srna, "texture_time_out", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "textimeout");
@@ -2244,43 +2416,54 @@ static void rna_def_userdef_system(BlenderRNA *brna)
prop= RNA_def_property(srna, "texture_collection_rate", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "texcollectrate");
RNA_def_property_range(prop, 1, 3600);
- RNA_def_property_ui_text(prop, "Texture Collection Rate", "Number of seconds between each run of the GL texture garbage collector.");
+ RNA_def_property_ui_text(prop, "Texture Collection Rate", "Number of seconds between each run of the GL texture garbage collector");
prop= RNA_def_property(srna, "window_draw_method", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "wmdrawmethod");
RNA_def_property_enum_items(prop, draw_method_items);
- RNA_def_property_ui_text(prop, "Window Draw Method", "Drawing method used by the window manager.");
+ RNA_def_property_ui_text(prop, "Window Draw Method", "Drawing method used by the window manager");
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "audio_mixing_buffer", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "mixbufsize");
RNA_def_property_enum_items(prop, audio_mixing_samples_items);
- RNA_def_property_ui_text(prop, "Audio Mixing Buffer", "Sets the number of samples used by the audio mixing buffer.");
+ RNA_def_property_ui_text(prop, "Audio Mixing Buffer", "Sets the number of samples used by the audio mixing buffer");
RNA_def_property_update(prop, 0, "rna_UserDef_audio_update");
prop= RNA_def_property(srna, "audio_device", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "audiodevice");
RNA_def_property_enum_items(prop, audio_device_items);
- RNA_def_property_ui_text(prop, "Audio Device", "Sets the audio output device.");
+ RNA_def_property_ui_text(prop, "Audio Device", "Sets the audio output device");
RNA_def_property_update(prop, 0, "rna_UserDef_audio_update");
prop= RNA_def_property(srna, "audio_sample_rate", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "audiorate");
RNA_def_property_enum_items(prop, audio_rate_items);
- RNA_def_property_ui_text(prop, "Audio Sample Rate", "Sets the audio sample rate.");
+ RNA_def_property_ui_text(prop, "Audio Sample Rate", "Sets the audio sample rate");
RNA_def_property_update(prop, 0, "rna_UserDef_audio_update");
prop= RNA_def_property(srna, "audio_sample_format", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "audioformat");
RNA_def_property_enum_items(prop, audio_format_items);
- RNA_def_property_ui_text(prop, "Audio Sample Format", "Sets the audio sample format.");
+ RNA_def_property_ui_text(prop, "Audio Sample Format", "Sets the audio sample format");
RNA_def_property_update(prop, 0, "rna_UserDef_audio_update");
prop= RNA_def_property(srna, "audio_channels", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "audiochannels");
RNA_def_property_enum_items(prop, audio_channel_items);
- RNA_def_property_ui_text(prop, "Audio Channels", "Sets the audio channel count.");
+ RNA_def_property_ui_text(prop, "Audio Channels", "Sets the audio channel count");
RNA_def_property_update(prop, 0, "rna_UserDef_audio_update");
+ prop= RNA_def_property(srna, "screencast_fps", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "scrcastfps");
+ RNA_def_property_range(prop, 10, 50);
+ RNA_def_property_ui_text(prop, "FPS", "Frame rate for the screencast to be played back");
+
+ prop= RNA_def_property(srna, "screencast_wait_time", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "scrcastwait");
+ RNA_def_property_range(prop, 50, 1000);
+ RNA_def_property_ui_text(prop, "Wait Timer (ms)", "Time in milliseconds between each frame recorded for screencast");
+
#if 0
prop= RNA_def_property(srna, "verse_master", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "versemaster");
@@ -2298,45 +2481,45 @@ static void rna_def_userdef_input(BlenderRNA *brna)
StructRNA *srna;
static EnumPropertyItem select_mouse_items[] = {
- {USER_LMOUSESELECT, "LEFT", 0, "Left", "Use left Mouse Button for selection."},
- {0, "RIGHT", 0, "Right", "Use Right Mouse Button for selection."},
+ {USER_LMOUSESELECT, "LEFT", 0, "Left", "Use left Mouse Button for selection"},
+ {0, "RIGHT", 0, "Right", "Use Right Mouse Button for selection"},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem view_rotation_items[] = {
- {0, "TURNTABLE", 0, "Turntable", "Use turntable style rotation in the viewport."},
- {USER_TRACKBALL, "TRACKBALL", 0, "Trackball", "Use trackball style rotation in the viewport."},
+ {0, "TURNTABLE", 0, "Turntable", "Use turntable style rotation in the viewport"},
+ {USER_TRACKBALL, "TRACKBALL", 0, "Trackball", "Use trackball style rotation in the viewport"},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem view_zoom_styles[] = {
- {USER_ZOOM_CONT, "CONTINUE", 0, "Continue", "Old style zoom, continues while moving mouse up or down."},
- {USER_ZOOM_DOLLY, "DOLLY", 0, "Dolly", "Zooms in and out based on vertical mouse movement."},
- {USER_ZOOM_SCALE, "SCALE", 0, "Scale", "Zooms in and out like scaling the view, mouse movements relative to center."},
+ {USER_ZOOM_CONT, "CONTINUE", 0, "Continue", "Old style zoom, continues while moving mouse up or down"},
+ {USER_ZOOM_DOLLY, "DOLLY", 0, "Dolly", "Zooms in and out based on vertical mouse movement"},
+ {USER_ZOOM_SCALE, "SCALE", 0, "Scale", "Zooms in and out like scaling the view, mouse movements relative to center"},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem view_zoom_axes[] = {
- {0, "VERTICAL", 0, "Vertical", "Zooms in and out based on vertical mouse movement."},
- {USER_ZOOM_DOLLY_HORIZ, "HORIZONTAL", 0, "Horizontal", "Zooms in and out based on horizontal mouse movement."},
+ {0, "VERTICAL", 0, "Vertical", "Zooms in and out based on vertical mouse movement"},
+ {USER_ZOOM_DOLLY_HORIZ, "HORIZONTAL", 0, "Horizontal", "Zooms in and out based on horizontal mouse movement"},
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "UserPreferencesInput", NULL);
RNA_def_struct_sdna(srna, "UserDef");
RNA_def_struct_nested(brna, srna, "UserPreferences");
- RNA_def_struct_ui_text(srna, "Input", "Settings for input devices.");
+ RNA_def_struct_ui_text(srna, "Input", "Settings for input devices");
prop= RNA_def_property(srna, "select_mouse", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
RNA_def_property_enum_items(prop, select_mouse_items);
- RNA_def_property_ui_text(prop, "Select Mouse", "The mouse button used for selection.");
+ RNA_def_property_ui_text(prop, "Select Mouse", "The mouse button used for selection");
prop= RNA_def_property(srna, "viewport_zoom_style", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "viewzoom");
RNA_def_property_enum_items(prop, view_zoom_styles);
- RNA_def_property_ui_text(prop, "Viewport Zoom Style", "Which style to use for viewport scaling.");
+ RNA_def_property_ui_text(prop, "Viewport Zoom Style", "Which style to use for viewport scaling");
prop= RNA_def_property(srna, "zoom_axis", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "uiflag");
RNA_def_property_enum_items(prop, view_zoom_axes);
- RNA_def_property_ui_text(prop, "Zoom Axis", "Axis of mouse movement to zoom in or out on.");
+ RNA_def_property_ui_text(prop, "Zoom Axis", "Axis of mouse movement to zoom in or out on");
prop= RNA_def_property(srna, "invert_zoom_direction", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_ZOOM_INVERT);
@@ -2345,35 +2528,35 @@ static void rna_def_userdef_input(BlenderRNA *brna)
prop= RNA_def_property(srna, "view_rotation", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
RNA_def_property_enum_items(prop, view_rotation_items);
- RNA_def_property_ui_text(prop, "View Rotation", "Rotation style in the viewport.");
+ RNA_def_property_ui_text(prop, "View Rotation", "Rotation style in the viewport");
prop= RNA_def_property(srna, "continuous_mouse", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_CONTINUOUS_MOUSE);
- RNA_def_property_ui_text(prop, "Continuous Grab", "Allow moving the mouse outside the view on some manipulations (transform, ui control drag).");
+ RNA_def_property_ui_text(prop, "Continuous Grab", "Allow moving the mouse outside the view on some manipulations (transform, ui control drag)");
prop= RNA_def_property(srna, "ndof_pan_speed", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "ndof_pan");
RNA_def_property_range(prop, 0, 200);
- RNA_def_property_ui_text(prop, "NDof Pan Speed", "The overall panning speed of an NDOF device, as percent of standard.");
+ RNA_def_property_ui_text(prop, "NDof Pan Speed", "The overall panning speed of an NDOF device, as percent of standard");
prop= RNA_def_property(srna, "ndof_rotate_speed", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "ndof_rotate");
RNA_def_property_range(prop, 0, 200);
- RNA_def_property_ui_text(prop, "NDof Rotation Speed", "The overall rotation speed of an NDOF device, as percent of standard.");
+ RNA_def_property_ui_text(prop, "NDof Rotation Speed", "The overall rotation speed of an NDOF device, as percent of standard");
prop= RNA_def_property(srna, "double_click_time", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "dbl_click_time");
RNA_def_property_range(prop, 1, 1000);
- RNA_def_property_ui_text(prop, "Double Click Timeout", "The time (in ms) for a double click.");
+ RNA_def_property_ui_text(prop, "Double Click Timeout", "The time (in ms) for a double click");
prop= RNA_def_property(srna, "emulate_3_button_mouse", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_TWOBUTTONMOUSE);
RNA_def_property_boolean_funcs(prop, NULL, "rna_userdef_emulate_set");
- RNA_def_property_ui_text(prop, "Emulate 3 Button Mouse", "Emulates Middle Mouse with Alt+LeftMouse (doesnt work with Left Mouse Select option.)");
+ RNA_def_property_ui_text(prop, "Emulate 3 Button Mouse", "Emulates Middle Mouse with Alt+LeftMouse (doesnt work with Left Mouse Select option)");
prop= RNA_def_property(srna, "emulate_numpad", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_NONUMPAD);
- RNA_def_property_ui_text(prop, "Emulate Numpad", "Causes the 1 to 0 keys to act as the numpad (useful for laptops).");
+ RNA_def_property_ui_text(prop, "Emulate Numpad", "Causes the 1 to 0 keys to act as the numpad (useful for laptops)");
}
static void rna_def_userdef_filepaths(BlenderRNA *brna)
@@ -2393,7 +2576,7 @@ static void rna_def_userdef_filepaths(BlenderRNA *brna)
srna= RNA_def_struct(brna, "UserPreferencesFilePaths", NULL);
RNA_def_struct_sdna(srna, "UserDef");
RNA_def_struct_nested(brna, srna, "UserPreferences");
- RNA_def_struct_ui_text(srna, "File Paths", "Default paths for external files.");
+ RNA_def_struct_ui_text(srna, "File Paths", "Default paths for external files");
prop= RNA_def_property(srna, "hide_dot_files_datablocks", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_HIDE_DOT);
@@ -2401,55 +2584,55 @@ static void rna_def_userdef_filepaths(BlenderRNA *brna)
prop= RNA_def_property(srna, "filter_file_extensions", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_FILTERFILEEXTS);
- RNA_def_property_ui_text(prop, "Filter File Extensions", "Display only files with extensions in the image select window.");
+ RNA_def_property_ui_text(prop, "Filter File Extensions", "Display only files with extensions in the image select window");
prop= RNA_def_property(srna, "use_relative_paths", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_RELPATHS);
- RNA_def_property_ui_text(prop, "Relative Paths", "Default relative path option for the file selector.");
+ RNA_def_property_ui_text(prop, "Relative Paths", "Default relative path option for the file selector");
prop= RNA_def_property(srna, "compress_file", PROP_BOOLEAN, PROP_NONE);
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.");
+ 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.");
+ 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.");
+ RNA_def_property_ui_text(prop, "Fonts Directory", "The default directory to search for loading fonts");
prop= RNA_def_property(srna, "textures_directory", PROP_STRING, PROP_DIRPATH);
RNA_def_property_string_sdna(prop, NULL, "textudir");
- RNA_def_property_ui_text(prop, "Textures Directory", "The default directory to search for textures.");
+ RNA_def_property_ui_text(prop, "Textures Directory", "The default directory to search for textures");
prop= RNA_def_property(srna, "texture_plugin_directory", PROP_STRING, PROP_DIRPATH);
RNA_def_property_string_sdna(prop, NULL, "plugtexdir");
- RNA_def_property_ui_text(prop, "Texture Plugin Directory", "The default directory to search for texture plugins.");
+ RNA_def_property_ui_text(prop, "Texture Plugin Directory", "The default directory to search for texture plugins");
prop= RNA_def_property(srna, "sequence_plugin_directory", PROP_STRING, PROP_DIRPATH);
RNA_def_property_string_sdna(prop, NULL, "plugseqdir");
- RNA_def_property_ui_text(prop, "Sequence Plugin Directory", "The default directory to search for sequence plugins.");
+ RNA_def_property_ui_text(prop, "Sequence Plugin Directory", "The default directory to search for sequence plugins");
prop= RNA_def_property(srna, "render_output_directory", PROP_STRING, PROP_DIRPATH);
RNA_def_property_string_sdna(prop, NULL, "renderdir");
- RNA_def_property_ui_text(prop, "Render Output Directory", "The default directory for rendering output.");
+ RNA_def_property_ui_text(prop, "Render Output Directory", "The default directory for rendering output");
prop= RNA_def_property(srna, "python_scripts_directory", PROP_STRING, PROP_DIRPATH);
RNA_def_property_string_sdna(prop, NULL, "pythondir");
- RNA_def_property_ui_text(prop, "Python Scripts Directory", "The default directory to search for Python scripts (resets python module search path: sys.path).");
+ RNA_def_property_ui_text(prop, "Python Scripts Directory", "The default directory to search for Python scripts (resets python module search path: sys.path)");
prop= RNA_def_property(srna, "sounds_directory", PROP_STRING, PROP_DIRPATH);
RNA_def_property_string_sdna(prop, NULL, "sounddir");
- RNA_def_property_ui_text(prop, "Sounds Directory", "The default directory to search for sounds.");
+ RNA_def_property_ui_text(prop, "Sounds Directory", "The default directory to search for sounds");
prop= RNA_def_property(srna, "temporary_directory", PROP_STRING, PROP_DIRPATH);
RNA_def_property_string_sdna(prop, NULL, "tempdir");
- RNA_def_property_ui_text(prop, "Temporary Directory", "The directory for storing temporary save files.");
+ RNA_def_property_ui_text(prop, "Temporary Directory", "The directory for storing temporary save files");
prop= RNA_def_property(srna, "animation_player", PROP_STRING, PROP_DIRPATH);
RNA_def_property_string_sdna(prop, NULL, "anim_player");
- RNA_def_property_ui_text(prop, "Animation Player", "Path to a custom animation/frame sequence player.");
+ RNA_def_property_ui_text(prop, "Animation Player", "Path to a custom animation/frame sequence player");
prop= RNA_def_property(srna, "animation_player_preset", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "anim_player_preset");
@@ -2462,28 +2645,51 @@ static void rna_def_userdef_filepaths(BlenderRNA *brna)
prop= RNA_def_property(srna, "save_version", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "versions");
RNA_def_property_range(prop, 0, 32);
- RNA_def_property_ui_text(prop, "Save Versions", "The number of old versions to maintain in the current directory, when manually saving.");
+ RNA_def_property_ui_text(prop, "Save Versions", "The number of old versions to maintain in the current directory, when manually saving");
prop= RNA_def_property(srna, "auto_save_temporary_files", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_AUTOSAVE);
- RNA_def_property_ui_text(prop, "Auto Save Temporary Files", "Automatic saving of temporary files.");
+ RNA_def_property_ui_text(prop, "Auto Save Temporary Files", "Automatic saving of temporary files");
RNA_def_property_update(prop, 0, "rna_userdef_autosave_update");
prop= RNA_def_property(srna, "auto_save_time", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "savetime");
RNA_def_property_range(prop, 1, 60);
- RNA_def_property_ui_text(prop, "Auto Save Time", "The time (in minutes) to wait between automatic temporary saves.");
+ RNA_def_property_ui_text(prop, "Auto Save Time", "The time (in minutes) to wait between automatic temporary saves");
RNA_def_property_update(prop, 0, "rna_userdef_autosave_update");
prop= RNA_def_property(srna, "recent_files", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 0, 30);
- RNA_def_property_ui_text(prop, "Recent Files", "Maximum number of recently opened files to remember.");
+ RNA_def_property_ui_text(prop, "Recent Files", "Maximum number of recently opened files to remember");
prop= RNA_def_property(srna, "save_preview_images", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_SAVE_PREVIEWS);
- RNA_def_property_ui_text(prop, "Save Preview Images", "Enables automatic saving of preview images in the .blend file.");
+ RNA_def_property_ui_text(prop, "Save Preview Images", "Enables automatic saving of preview images in the .blend file");
}
+void rna_def_userdef_addon_collection(BlenderRNA *brna, PropertyRNA *cprop)
+{
+ StructRNA *srna;
+ FunctionRNA *func;
+ PropertyRNA *parm;
+
+ RNA_def_property_srna(cprop, "Addons");
+ srna= RNA_def_struct(brna, "Addons", NULL);
+ RNA_def_struct_ui_text(srna, "User Add-Ons", "Collection of add-ons");
+
+ func= RNA_def_function(srna, "new", "rna_userdef_addon_new");
+ RNA_def_function_flag(func, FUNC_NO_SELF);
+ RNA_def_function_ui_description(func, "Add a new addon");
+ /* return type */
+ parm= RNA_def_pointer(func, "addon", "Addon", "", "Addon datablock.");
+ RNA_def_function_return(func, parm);
+
+ func= RNA_def_function(srna, "remove", "rna_userdef_addon_remove");
+ RNA_def_function_flag(func, FUNC_NO_SELF);
+ RNA_def_function_ui_description(func, "Remove addon.");
+ parm= RNA_def_pointer(func, "addon", "Addon", "", "Addon to remove.");
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+}
void RNA_def_userdef(BlenderRNA *brna)
{
@@ -2494,6 +2700,7 @@ void RNA_def_userdef(BlenderRNA *brna)
{USER_SECTION_INTERFACE, "INTERFACE", 0, "Interface", ""},
{USER_SECTION_EDIT, "EDITING", 0, "Editing", ""},
{USER_SECTION_INPUT, "INPUT", 0, "Input", ""},
+ {USER_SECTION_ADDONS, "ADDONS", 0, "Add-Ons", ""},
{USER_SECTION_THEME, "THEMES", 0, "Themes", ""},
{USER_SECTION_FILE, "FILES", 0, "File", ""},
{USER_SECTION_SYSTEM, "SYSTEM", 0, "System", ""},
@@ -2504,12 +2711,12 @@ void RNA_def_userdef(BlenderRNA *brna)
srna= RNA_def_struct(brna, "UserPreferences", NULL);
RNA_def_struct_sdna(srna, "UserDef");
- RNA_def_struct_ui_text(srna, "User Preferences", "Global user preferences.");
+ RNA_def_struct_ui_text(srna, "User Preferences", "Global user preferences");
prop= RNA_def_property(srna, "active_section", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "userpref");
RNA_def_property_enum_items(prop, user_pref_sections);
- RNA_def_property_ui_text(prop, "Active Section", "Active section of the user preferences shown in the user interface.");
+ RNA_def_property_ui_text(prop, "Active Section", "Active section of the user preferences shown in the user interface");
RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "themes", PROP_COLLECTION, PROP_NONE);
@@ -2522,42 +2729,50 @@ void RNA_def_userdef(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "ThemeStyle");
RNA_def_property_ui_text(prop, "Styles", "");
+ prop= RNA_def_property(srna, "addons", PROP_COLLECTION, PROP_NONE);
+ RNA_def_property_collection_sdna(prop, NULL, "addons", NULL);
+ RNA_def_property_struct_type(prop, "Addon");
+ RNA_def_property_ui_text(prop, "Addon", "");
+ rna_def_userdef_addon_collection(brna, prop);
+
+
/* nested structs */
prop= RNA_def_property(srna, "view", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "UserPreferencesView");
RNA_def_property_pointer_funcs(prop, "rna_UserDef_view_get", NULL, NULL);
- RNA_def_property_ui_text(prop, "View & Controls", "Preferences related to viewing data.");
+ RNA_def_property_ui_text(prop, "View & Controls", "Preferences related to viewing data");
prop= RNA_def_property(srna, "edit", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "UserPreferencesEdit");
RNA_def_property_pointer_funcs(prop, "rna_UserDef_edit_get", NULL, NULL);
- RNA_def_property_ui_text(prop, "Edit Methods", "Settings for interacting with Blender data.");
+ RNA_def_property_ui_text(prop, "Edit Methods", "Settings for interacting with Blender data");
prop= RNA_def_property(srna, "inputs", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "UserPreferencesInput");
RNA_def_property_pointer_funcs(prop, "rna_UserDef_input_get", NULL, NULL);
- RNA_def_property_ui_text(prop, "Inputs", "Settings for input devices.");
+ RNA_def_property_ui_text(prop, "Inputs", "Settings for input devices");
prop= RNA_def_property(srna, "filepaths", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "UserPreferencesFilePaths");
RNA_def_property_pointer_funcs(prop, "rna_UserDef_filepaths_get", NULL, NULL);
- RNA_def_property_ui_text(prop, "File Paths", "Default paths for external files.");
+ RNA_def_property_ui_text(prop, "File Paths", "Default paths for external files");
prop= RNA_def_property(srna, "system", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "UserPreferencesSystem");
RNA_def_property_pointer_funcs(prop, "rna_UserDef_system_get", NULL, NULL);
- RNA_def_property_ui_text(prop, "System & OpenGL", "Graphics driver and operating system settings.");
+ RNA_def_property_ui_text(prop, "System & OpenGL", "Graphics driver and operating system settings");
rna_def_userdef_view(brna);
rna_def_userdef_edit(brna);
rna_def_userdef_input(brna);
rna_def_userdef_filepaths(brna);
rna_def_userdef_system(brna);
+ rna_def_userdef_addon(brna);
}
diff --git a/source/blender/makesrna/intern/rna_vfont.c b/source/blender/makesrna/intern/rna_vfont.c
index db576207eae..d0098e7b216 100644
--- a/source/blender/makesrna/intern/rna_vfont.c
+++ b/source/blender/makesrna/intern/rna_vfont.c
@@ -15,7 +15,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor(s): Blender Foundation (2008), Juho Vepsäläinen
*
@@ -41,7 +41,7 @@ void RNA_def_vfont(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "VectorFont", "ID");
- RNA_def_struct_ui_text(srna, "Vector Font", "Vector font for Text objects.");
+ RNA_def_struct_ui_text(srna, "Vector Font", "Vector font for Text objects");
RNA_def_struct_sdna(srna, "VFont");
RNA_def_struct_ui_icon(srna, ICON_FILE_FONT);
diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c
index a3a2bc35dc1..cda7fca1073 100644
--- a/source/blender/makesrna/intern/rna_wm.c
+++ b/source/blender/makesrna/intern/rna_wm.c
@@ -15,7 +15,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor(s): Blender Foundation (2008).
*
@@ -64,7 +64,7 @@ EnumPropertyItem event_value_items[] = {
{KM_PRESS, "PRESS", 0, "Press", ""},
{KM_RELEASE, "RELEASE", 0, "Release", ""},
{KM_CLICK, "CLICK", 0, "Click", ""},
- {KM_DBL_CLICK, "DOUBLECLICK", 0, "Double Click", ""},
+ {KM_DBL_CLICK, "DOUBLE_CLICK", 0, "Double Click", ""},
{0, NULL, 0, NULL, NULL}};
EnumPropertyItem event_tweak_type_items[]= {
@@ -252,6 +252,14 @@ EnumPropertyItem keymap_modifiers_items[] = {
{2, "SECOND", 0, "Second", ""},
{0, NULL, 0, NULL, NULL}};
+EnumPropertyItem operator_flag_items[] = {
+ {OPTYPE_REGISTER, "REGISTER", 0, "Register", ""},
+ {OPTYPE_UNDO, "UNDO", 0, "Undo", ""},
+ {OPTYPE_BLOCKING, "BLOCKING", 0, "Finished", ""},
+ {OPTYPE_MACRO, "MACRO", 0, "Macro", ""},
+ {OPTYPE_GRAB_POINTER, "GRAB_POINTER", 0, "Grab Pointer", ""},
+ {0, NULL, 0, NULL, NULL}};
+
EnumPropertyItem operator_return_items[] = {
{OPERATOR_RUNNING_MODAL, "RUNNING_MODAL", 0, "Running Modal", ""},
{OPERATOR_CANCELLED, "CANCELLED", 0, "Cancelled", ""},
@@ -331,6 +339,12 @@ static int rna_Operator_name_length(PointerRNA *ptr)
return strlen(op->type->name);
}
+static int rna_Operator_has_reports_get(PointerRNA *ptr)
+{
+ wmOperator *op= (wmOperator*)ptr->data;
+ return (op->reports && op->reports->list.first);
+}
+
static PointerRNA rna_Operator_properties_get(PointerRNA *ptr)
{
wmOperator *op= (wmOperator*)ptr->data;
@@ -605,7 +619,8 @@ static void rna_Operator_unregister(const bContext *C, StructRNA *type)
WM_operatortype_remove(ot->idname);
MEM_freeN(idname);
- // RNA_struct_free(&BLENDER_RNA, type); // WM_operatortype_remove calls this
+ /* not to be confused with the RNA_struct_free that WM_operatortype_remove calls, they are 2 different srna's */
+ RNA_struct_free(&BLENDER_RNA, type);
/* update while blender is running */
if(C)
@@ -682,6 +697,31 @@ static int operator_invoke(bContext *C, wmOperator *op, wmEvent *event)
return result;
}
+/* same as invoke */
+static int operator_modal(bContext *C, wmOperator *op, wmEvent *event)
+{
+ PointerRNA opr;
+ ParameterList list;
+ FunctionRNA *func;
+ void *ret;
+ int result;
+
+ RNA_pointer_create(&CTX_wm_screen(C)->id, op->type->ext.srna, op, &opr);
+ func= RNA_struct_find_function(&opr, "modal");
+
+ RNA_parameter_list_create(&list, &opr, func);
+ RNA_parameter_set_lookup(&list, "context", &C);
+ RNA_parameter_set_lookup(&list, "event", &event);
+ op->type->ext.call(&opr, func, &list);
+
+ RNA_parameter_get_lookup(&list, "result", &ret);
+ result= *(int*)ret;
+
+ RNA_parameter_list_free(&list);
+
+ return result;
+}
+
static void operator_draw(bContext *C, wmOperator *op)
{
PointerRNA opr;
@@ -698,6 +738,7 @@ static void operator_draw(bContext *C, wmOperator *op)
RNA_parameter_list_free(&list);
}
+#ifndef DISABLE_PYTHON
void operator_wrapper(wmOperatorType *ot, void *userdata);
void macro_wrapper(wmOperatorType *ot, void *userdata);
@@ -709,7 +750,7 @@ static StructRNA *rna_Operator_register(const bContext *C, ReportList *reports,
wmOperatorType dummyot = {0};
wmOperator dummyop= {0};
PointerRNA dummyotr;
- int have_function[4];
+ int have_function[5];
/* setup dummy operator & operator type to store static properties in */
dummyop.type= &dummyot;
@@ -760,7 +801,8 @@ static StructRNA *rna_Operator_register(const bContext *C, ReportList *reports,
dummyot.pyop_poll= (have_function[0])? operator_poll: NULL;
dummyot.exec= (have_function[1])? operator_exec: NULL;
dummyot.invoke= (have_function[2])? operator_invoke: NULL;
- dummyot.ui= (have_function[3])? operator_draw: NULL;
+ dummyot.modal= (have_function[3])? operator_modal: NULL;
+ dummyot.ui= (have_function[4])? operator_draw: NULL;
WM_operatortype_append_ptr(operator_wrapper, (void *)&dummyot);
@@ -836,6 +878,7 @@ static StructRNA *rna_MacroOperator_register(const bContext *C, ReportList *repo
return dummyot.ext.srna;
}
+#endif
static StructRNA* rna_Operator_refine(PointerRNA *opr)
{
@@ -857,10 +900,12 @@ static void rna_def_operator(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "Operator", NULL);
- RNA_def_struct_ui_text(srna, "Operator", "Storage of an operator being executed, or registered after execution.");
+ RNA_def_struct_ui_text(srna, "Operator", "Storage of an operator being executed, or registered after execution");
RNA_def_struct_sdna(srna, "wmOperator");
RNA_def_struct_refine_func(srna, "rna_Operator_refine");
+#ifndef DISABLE_PYTHON
RNA_def_struct_register_funcs(srna, "rna_Operator_register", "rna_Operator_unregister");
+#endif
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
@@ -873,7 +918,12 @@ static void rna_def_operator(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "OperatorProperties");
RNA_def_property_ui_text(prop, "Properties", "");
RNA_def_property_pointer_funcs(prop, "rna_Operator_properties_get", NULL, NULL);
-
+
+ prop= RNA_def_property(srna, "has_reports", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* this is 'virtual' property */
+ RNA_def_property_boolean_funcs(prop, "rna_Operator_has_reports_get", NULL);
+ RNA_def_property_ui_text(prop, "Has Reports", "Operator has a set of reports (warnings and errors) from last execution");
+
prop= RNA_def_property(srna, "layout", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "UILayout");
@@ -893,18 +943,16 @@ static void rna_def_operator(BlenderRNA *brna)
RNA_def_property_string_maxlength(prop, 1024); /* else it uses the pointer size! */
RNA_def_property_flag(prop, PROP_REGISTER);
- prop= RNA_def_property(srna, "bl_register", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "type->flag", OPTYPE_REGISTER);
- RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL);
-
- prop= RNA_def_property(srna, "bl_undo", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "type->flag", OPTYPE_UNDO);
- RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL);
+ prop= RNA_def_property(srna, "bl_options", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "type->flag");
+ RNA_def_property_enum_items(prop, operator_flag_items);
+ RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL|PROP_ENUM_FLAG);
+ RNA_def_property_ui_text(prop, "Options", "Options for this operator type");
RNA_api_operator(srna);
srna= RNA_def_struct(brna, "OperatorProperties", NULL);
- RNA_def_struct_ui_text(srna, "Operator Properties", "Input properties of an Operator.");
+ RNA_def_struct_ui_text(srna, "Operator Properties", "Input properties of an Operator");
RNA_def_struct_refine_func(srna, "rna_OperatorProperties_refine");
RNA_def_struct_idproperties_func(srna, "rna_OperatorProperties_idproperties");
}
@@ -915,11 +963,13 @@ static void rna_def_macro_operator(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "Macro", NULL);
- RNA_def_struct_ui_text(srna, "Macro Operator", "Storage of a macro operator being executed, or registered after execution.");
+ RNA_def_struct_ui_text(srna, "Macro Operator", "Storage of a macro operator being executed, or registered after execution");
RNA_def_struct_sdna(srna, "wmOperator");
RNA_def_struct_refine_func(srna, "rna_MacroOperator_refine");
+#ifndef DISABLE_PYTHON
RNA_def_struct_register_funcs(srna, "rna_MacroOperator_register", "rna_Operator_unregister");
-
+#endif
+
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_string_funcs(prop, "rna_Operator_name_get", "rna_Operator_name_length", NULL);
@@ -948,13 +998,11 @@ static void rna_def_macro_operator(BlenderRNA *brna)
RNA_def_property_string_maxlength(prop, 1024); /* else it uses the pointer size! */
RNA_def_property_flag(prop, PROP_REGISTER);
- prop= RNA_def_property(srna, "bl_register", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "type->flag", OPTYPE_REGISTER);
- RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL);
-
- prop= RNA_def_property(srna, "bl_undo", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "type->flag", OPTYPE_UNDO);
- RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL);
+ prop= RNA_def_property(srna, "bl_options", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "type->flag");
+ RNA_def_property_enum_items(prop, operator_flag_items);
+ RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL|PROP_ENUM_FLAG);
+ RNA_def_property_ui_text(prop, "Options", "Options for this operator type");
RNA_api_macro(srna);
}
@@ -965,13 +1013,13 @@ static void rna_def_operator_type_macro(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "OperatorTypeMacro", NULL);
- RNA_def_struct_ui_text(srna, "OperatorTypeMacro", "Storage of a sub operator in a macro after it has been added.");
+ RNA_def_struct_ui_text(srna, "OperatorTypeMacro", "Storage of a sub operator in a macro after it has been added");
RNA_def_struct_sdna(srna, "wmOperatorTypeMacro");
// prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
// RNA_def_property_clear_flag(prop, PROP_EDITABLE);
// RNA_def_property_string_sdna(prop, NULL, "idname");
-// RNA_def_property_ui_text(prop, "Name", "Name of the sub operator.");
+// RNA_def_property_ui_text(prop, "Name", "Name of the sub operator");
// RNA_def_struct_name_property(srna, prop);
prop= RNA_def_property(srna, "properties", PROP_POINTER, PROP_NONE);
@@ -987,16 +1035,16 @@ static void rna_def_operator_utils(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "OperatorMousePath", "IDPropertyGroup");
- RNA_def_struct_ui_text(srna, "Operator Mouse Path", "Mouse path values for operators that record such paths.");
+ RNA_def_struct_ui_text(srna, "Operator Mouse Path", "Mouse path values for operators that record such paths");
prop= RNA_def_property(srna, "loc", PROP_FLOAT, PROP_XYZ);
RNA_def_property_flag(prop, PROP_IDPROPERTY);
RNA_def_property_array(prop, 2);
- RNA_def_property_ui_text(prop, "Location", "Mouse location.");
+ RNA_def_property_ui_text(prop, "Location", "Mouse location");
prop= RNA_def_property(srna, "time", PROP_FLOAT, PROP_NONE);
RNA_def_property_flag(prop, PROP_IDPROPERTY);
- RNA_def_property_ui_text(prop, "Time", "Time of mouse location.");
+ RNA_def_property_ui_text(prop, "Time", "Time of mouse location");
}
static void rna_def_operator_filelist_element(BlenderRNA *brna)
@@ -1028,7 +1076,7 @@ static void rna_def_event(BlenderRNA *brna)
prop= RNA_def_property(srna, "ascii", PROP_STRING, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_string_funcs(prop, "rna_Event_ascii_get", "rna_Event_ascii_length", NULL);
- RNA_def_property_ui_text(prop, "ASCII", "Single ASCII character for this event.");
+ RNA_def_property_ui_text(prop, "ASCII", "Single ASCII character for this event");
/* enums */
@@ -1036,7 +1084,7 @@ static void rna_def_event(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "val");
RNA_def_property_enum_items(prop, event_value_items);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Value", "The type of event, only applies to some.");
+ RNA_def_property_ui_text(prop, "Value", "The type of event, only applies to some");
prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "type");
@@ -1049,44 +1097,54 @@ static void rna_def_event(BlenderRNA *brna)
prop= RNA_def_property(srna, "mouse_x", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "x");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Mouse X Position", "The window relative vertical location of the mouse.");
+ RNA_def_property_ui_text(prop, "Mouse X Position", "The window relative vertical location of the mouse");
prop= RNA_def_property(srna, "mouse_y", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "y");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Mouse Y Position", "The window relative horizontal location of the mouse.");
+ RNA_def_property_ui_text(prop, "Mouse Y Position", "The window relative horizontal location of the mouse");
+
+ prop= RNA_def_property(srna, "mouse_region_x", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "mval[0]");
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Mouse X Position", "The region relative vertical location of the mouse");
+
+ prop= RNA_def_property(srna, "mouse_region_y", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "mval[1]");
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Mouse Y Position", "The region relative horizontal location of the mouse");
prop= RNA_def_property(srna, "mouse_prev_x", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "prevx");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Mouse Previous X Position", "The window relative vertical location of the mouse.");
+ RNA_def_property_ui_text(prop, "Mouse Previous X Position", "The window relative vertical location of the mouse");
prop= RNA_def_property(srna, "mouse_prev_y", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "prevy");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Mouse Previous Y Position", "The window relative horizontal location of the mouse.");
+ RNA_def_property_ui_text(prop, "Mouse Previous Y Position", "The window relative horizontal location of the mouse");
/* modifiers */
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 Ctrl 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 Alt/Option 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 Cmd key is held");
RNA_define_verify_sdna(1); // not in sdna
}
@@ -1097,13 +1155,13 @@ static void rna_def_window(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "Window", NULL);
- RNA_def_struct_ui_text(srna, "Window", "Open window.");
+ RNA_def_struct_ui_text(srna, "Window", "Open window");
RNA_def_struct_sdna(srna, "wmWindow");
prop= RNA_def_property(srna, "screen", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "Screen");
- RNA_def_property_ui_text(prop, "Screen", "Active screen showing in the window.");
+ RNA_def_property_ui_text(prop, "Screen", "Active screen showing in the window");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_pointer_funcs(prop, NULL, "rna_Window_screen_set", NULL);
RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
@@ -1116,21 +1174,21 @@ static void rna_def_windowmanager(BlenderRNA *brna)
PropertyRNA *prop;
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_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);
RNA_def_property_struct_type(prop, "Operator");
- RNA_def_property_ui_text(prop, "Operators", "Operator registry.");
+ RNA_def_property_ui_text(prop, "Operators", "Operator registry");
prop= RNA_def_property(srna, "windows", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "Window");
- RNA_def_property_ui_text(prop, "Windows", "Open windows.");
+ RNA_def_property_ui_text(prop, "Windows", "Open windows");
prop= RNA_def_property(srna, "keyconfigs", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "KeyConfig");
- RNA_def_property_ui_text(prop, "Key Configurations", "Registered key configurations.");
+ RNA_def_property_ui_text(prop, "Key Configurations", "Registered key configurations");
prop= RNA_def_property(srna, "active_keyconfig", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "KeyConfig");
@@ -1164,67 +1222,72 @@ static void rna_def_keyconfig(BlenderRNA *brna)
/* KeyConfig */
srna= RNA_def_struct(brna, "KeyConfig", NULL);
RNA_def_struct_sdna(srna, "wmKeyConfig");
- RNA_def_struct_ui_text(srna, "Key Configuration", "Input configuration, including keymaps.");
+ RNA_def_struct_ui_text(srna, "Key Configuration", "Input configuration, including keymaps");
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "idname");
- RNA_def_property_ui_text(prop, "Name", "Name of the key configuration.");
+ RNA_def_property_ui_text(prop, "Name", "Name of the key configuration");
RNA_def_struct_name_property(srna, prop);
prop= RNA_def_property(srna, "filter", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "filter");
- RNA_def_property_ui_text(prop, "Filter", "Search term for filtering in the UI.");
+ RNA_def_property_ui_text(prop, "Filter", "Search term for filtering in the UI");
prop= RNA_def_property(srna, "keymaps", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "KeyMap");
- RNA_def_property_ui_text(prop, "Key Maps", "Key maps configured as part of this configuration.");
+ RNA_def_property_ui_text(prop, "Key Maps", "Key maps configured as part of this configuration");
+
+ prop= RNA_def_property(srna, "user_defined", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", KEYCONF_USER);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "User Defined", "Indicates that a keyconfig was defined by the user");
RNA_api_keyconfig(srna);
/* KeyMap */
srna= RNA_def_struct(brna, "KeyMap", NULL);
RNA_def_struct_sdna(srna, "wmKeyMap");
- RNA_def_struct_ui_text(srna, "Key Map", "Input configuration, including keymaps.");
+ RNA_def_struct_ui_text(srna, "Key Map", "Input configuration, including keymaps");
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "idname");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Name", "Name of the key map.");
+ RNA_def_property_ui_text(prop, "Name", "Name of the key map");
RNA_def_struct_name_property(srna, prop);
prop= RNA_def_property(srna, "space_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "spaceid");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_enum_items(prop, space_type_items);
- RNA_def_property_ui_text(prop, "Space Type", "Optional space type keymap is associated with.");
+ RNA_def_property_ui_text(prop, "Space Type", "Optional space type keymap is associated with");
prop= RNA_def_property(srna, "region_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "regionid");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_enum_items(prop, region_type_items);
- RNA_def_property_ui_text(prop, "Region Type", "Optional region type keymap is associated with.");
+ RNA_def_property_ui_text(prop, "Region Type", "Optional region type keymap is associated with");
prop= RNA_def_property(srna, "items", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "KeyMapItem");
- RNA_def_property_ui_text(prop, "Items", "Items in the keymap, linking an operator to an input event.");
+ RNA_def_property_ui_text(prop, "Items", "Items in the keymap, linking an operator to an input event");
prop= RNA_def_property(srna, "user_defined", PROP_BOOLEAN, PROP_NEVER_NULL);
RNA_def_property_boolean_sdna(prop, NULL, "flag", KEYMAP_USER);
- RNA_def_property_ui_text(prop, "User Defined", "Keymap is defined by the user.");
+ RNA_def_property_ui_text(prop, "User Defined", "Keymap is defined by the user");
prop= RNA_def_property(srna, "modal", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", KEYMAP_MODAL);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Modal Keymap", "Indicates that a keymap is used for translate modal events for an operator.");
+ RNA_def_property_ui_text(prop, "Modal Keymap", "Indicates that a keymap is used for translate modal events for an operator");
prop= RNA_def_property(srna, "items_expanded", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", KEYMAP_EXPANDED);
- RNA_def_property_ui_text(prop, "Items Expanded", "Expanded in the user interface.");
+ RNA_def_property_ui_text(prop, "Items Expanded", "Expanded in the user interface");
RNA_def_property_ui_icon(prop, ICON_TRIA_RIGHT, 1);
prop= RNA_def_property(srna, "children_expanded", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", KEYMAP_CHILDREN_EXPANDED);
- RNA_def_property_ui_text(prop, "Children Expanded", "Children expanded in the user interface.");
+ RNA_def_property_ui_text(prop, "Children Expanded", "Children expanded in the user interface");
RNA_def_property_ui_icon(prop, ICON_TRIA_RIGHT, 1);
@@ -1233,35 +1296,35 @@ static void rna_def_keyconfig(BlenderRNA *brna)
/* KeyMapItem */
srna= RNA_def_struct(brna, "KeyMapItem", NULL);
RNA_def_struct_sdna(srna, "wmKeyMapItem");
- RNA_def_struct_ui_text(srna, "Key Map Item", "Item in a Key Map.");
+ RNA_def_struct_ui_text(srna, "Key Map Item", "Item in a Key Map");
prop= RNA_def_property(srna, "idname", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "idname");
- RNA_def_property_ui_text(prop, "Identifier", "Identifier of operator to call on input event.");
+ RNA_def_property_ui_text(prop, "Identifier", "Identifier of operator to call on input event");
RNA_def_property_string_funcs(prop, "rna_wmKeyMapItem_idname_get", "rna_wmKeyMapItem_idname_length", "rna_wmKeyMapItem_idname_set");
RNA_def_struct_name_property(srna, prop);
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Name", "Name of operator to call on input event.");
+ RNA_def_property_ui_text(prop, "Name", "Name of operator to call on input event");
RNA_def_property_string_funcs(prop, "rna_wmKeyMapItem_name_get", "rna_wmKeyMapItem_name_length", NULL);
prop= RNA_def_property(srna, "properties", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "OperatorProperties");
RNA_def_property_pointer_funcs(prop, "rna_KeyMapItem_properties_get", NULL, NULL);
- RNA_def_property_ui_text(prop, "Properties", "Properties to set when the operator is called.");
+ RNA_def_property_ui_text(prop, "Properties", "Properties to set when the operator is called");
prop= RNA_def_property(srna, "map_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "maptype");
RNA_def_property_enum_items(prop, map_type_items);
RNA_def_property_enum_funcs(prop, "rna_wmKeyMapItem_map_type_get", "rna_wmKeyMapItem_map_type_set", NULL);
- RNA_def_property_ui_text(prop, "Map Type", "Type of event mapping.");
+ RNA_def_property_ui_text(prop, "Map Type", "Type of event mapping");
prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "type");
RNA_def_property_enum_items(prop, event_type_items);
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_KeyMapItem_type_itemf");
- RNA_def_property_ui_text(prop, "Type", "Type of event.");
+ RNA_def_property_ui_text(prop, "Type", "Type of event");
prop= RNA_def_property(srna, "value", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "val");
@@ -1272,55 +1335,55 @@ static void rna_def_keyconfig(BlenderRNA *brna)
prop= RNA_def_property(srna, "id", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "id");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "id", "ID of the item.");
+ RNA_def_property_ui_text(prop, "id", "ID of the item");
prop= RNA_def_property(srna, "any", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_KeyMapItem_any_getf", "rna_KeyMapItem_any_setf");
- RNA_def_property_ui_text(prop, "Any", "Any modifier keys pressed.");
+ RNA_def_property_ui_text(prop, "Any", "Any modifier keys pressed");
prop= RNA_def_property(srna, "shift", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "shift", 0);
// RNA_def_property_enum_sdna(prop, NULL, "shift");
// RNA_def_property_enum_items(prop, keymap_modifiers_items);
- RNA_def_property_ui_text(prop, "Shift", "Shift key pressed.");
+ RNA_def_property_ui_text(prop, "Shift", "Shift key pressed");
prop= RNA_def_property(srna, "ctrl", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "ctrl", 0);
// RNA_def_property_enum_sdna(prop, NULL, "ctrl");
// RNA_def_property_enum_items(prop, keymap_modifiers_items);
- RNA_def_property_ui_text(prop, "Ctrl", "Control key pressed.");
+ RNA_def_property_ui_text(prop, "Ctrl", "Control key pressed");
prop= RNA_def_property(srna, "alt", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "alt", 0);
// RNA_def_property_enum_sdna(prop, NULL, "alt");
// RNA_def_property_enum_items(prop, keymap_modifiers_items);
- RNA_def_property_ui_text(prop, "Alt", "Alt key pressed.");
+ RNA_def_property_ui_text(prop, "Alt", "Alt key pressed");
prop= RNA_def_property(srna, "oskey", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "oskey", 0);
// RNA_def_property_enum_sdna(prop, NULL, "oskey");
// RNA_def_property_enum_items(prop, keymap_modifiers_items);
- RNA_def_property_ui_text(prop, "OS Key", "Operating system key pressed.");
+ RNA_def_property_ui_text(prop, "OS Key", "Operating system key pressed");
prop= RNA_def_property(srna, "key_modifier", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "keymodifier");
RNA_def_property_enum_items(prop, event_type_items);
- RNA_def_property_ui_text(prop, "Key Modifier", "Regular key pressed as a modifier.");
+ RNA_def_property_ui_text(prop, "Key Modifier", "Regular key pressed as a modifier");
prop= RNA_def_property(srna, "expanded", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", KMI_EXPANDED);
- RNA_def_property_ui_text(prop, "Expanded", "Show key map event and property details in the user interface.");
+ RNA_def_property_ui_text(prop, "Expanded", "Show key map event and property details in the user interface");
RNA_def_property_ui_icon(prop, ICON_TRIA_RIGHT, 1);
prop= RNA_def_property(srna, "propvalue", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "propvalue");
RNA_def_property_enum_items(prop, keymap_propvalue_items);
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_KeyMapItem_propvalue_itemf");
- RNA_def_property_ui_text(prop, "Property Value", "The value this event translates to in a modal keymap.");
+ RNA_def_property_ui_text(prop, "Property Value", "The value this event translates to in a modal keymap");
prop= RNA_def_property(srna, "active", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", KMI_INACTIVE);
- RNA_def_property_ui_text(prop, "Active", "Activate or deactivate item.");
+ RNA_def_property_ui_text(prop, "Active", "Activate or deactivate item");
RNA_def_property_ui_icon(prop, ICON_CHECKBOX_DEHLT, 1);
RNA_api_keymapitem(srna);
diff --git a/source/blender/makesrna/intern/rna_wm_api.c b/source/blender/makesrna/intern/rna_wm_api.c
index d57b76a00e1..07146b95e6b 100644
--- a/source/blender/makesrna/intern/rna_wm_api.c
+++ b/source/blender/makesrna/intern/rna_wm_api.c
@@ -15,7 +15,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* The Original Code is Copyright (C) 2009 Blender Foundation.
* All rights reserved.
@@ -144,45 +144,78 @@ static void rna_Operator_report(wmOperator *op, int type, char *msg)
BKE_report(op->reports, type, msg);
}
+/* since event isnt needed... */
+static void rna_Operator_enum_search_invoke(bContext *C, wmOperator *op)
+{
+ WM_enum_search_invoke(C, op, NULL);
+
+}
+
+static int rna_event_add_modal_handler(struct bContext *C, struct wmOperator *operator)
+{
+ return WM_event_add_modal_handler(C, operator) != NULL;
+}
+
#else
+static void rna_generic_op_invoke(FunctionRNA *func, int use_event, int use_ret)
+{
+ PropertyRNA *parm;
+
+ RNA_def_function_flag(func, FUNC_NO_SELF|FUNC_USE_CONTEXT);
+ parm= RNA_def_pointer(func, "operator", "Operator", "", "Operator to call.");
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+
+ if(use_event) {
+ parm= RNA_def_pointer(func, "event", "Event", "", "Event.");
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+ }
+
+ if(use_ret) {
+ parm= RNA_def_enum(func, "result", operator_return_items, 0, "result", "");
+ RNA_def_property_flag(parm, PROP_ENUM_FLAG);
+ RNA_def_function_return(func, parm);
+ }
+}
+
void RNA_api_wm(StructRNA *srna)
{
FunctionRNA *func;
PropertyRNA *parm;
func= RNA_def_function(srna, "add_fileselect", "WM_event_add_fileselect");
- RNA_def_function_flag(func, FUNC_NO_SELF|FUNC_USE_CONTEXT);
RNA_def_function_ui_description(func, "Show up the file selector.");
- parm= RNA_def_pointer(func, "operator", "Operator", "", "Operator to call.");
- RNA_def_property_flag(parm, PROP_REQUIRED);
+ rna_generic_op_invoke(func, 0, 0);
- func= RNA_def_function(srna, "add_keyconfig", "WM_keyconfig_add");
+ func= RNA_def_function(srna, "add_keyconfig", "WM_keyconfig_add_user");
parm= RNA_def_string(func, "name", "", 0, "Name", "");
RNA_def_property_flag(parm, PROP_REQUIRED);
parm= RNA_def_pointer(func, "keyconfig", "KeyConfig", "Key Configuration", "Added key configuration.");
RNA_def_function_return(func, parm);
- /* invoke functions, for use with python */
- func= RNA_def_function(srna, "invoke_props_popup", "WM_operator_props_popup");
+ func= RNA_def_function(srna, "remove_keyconfig", "WM_keyconfig_remove");
+ parm= RNA_def_pointer(func, "keyconfig", "KeyConfig", "Key Configuration", "Removed key configuration.");
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+
+ func= RNA_def_function(srna, "add_modal_handler", "rna_event_add_modal_handler");
RNA_def_function_flag(func, FUNC_NO_SELF|FUNC_USE_CONTEXT);
- RNA_def_function_ui_description(func, "Operator popup invoke.");
parm= RNA_def_pointer(func, "operator", "Operator", "", "Operator to call.");
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_pointer(func, "event", "Event", "", "Event.");
- RNA_def_property_flag(parm, PROP_REQUIRED);
+ RNA_def_function_return(func, RNA_def_boolean(func, "handle", 1, "", ""));
- parm= RNA_def_enum(func, "result", operator_return_items, 0, "result", ""); // better name?
- RNA_def_property_flag(parm, PROP_ENUM_FLAG);
- RNA_def_function_return(func, parm);
+ /* invoke functions, for use with python */
+ func= RNA_def_function(srna, "invoke_props_popup", "WM_operator_props_popup");
+ RNA_def_function_ui_description(func, "Operator popup invoke.");
+ rna_generic_op_invoke(func, 1, 1);
+ /* invoke enum */
+ func= RNA_def_function(srna, "invoke_search_popup", "rna_Operator_enum_search_invoke");
+ rna_generic_op_invoke(func, 0, 0);
/* invoke functions, for use with python */
func= RNA_def_function(srna, "invoke_popup", "WM_operator_ui_popup");
- RNA_def_function_flag(func, FUNC_NO_SELF|FUNC_USE_CONTEXT);
RNA_def_function_ui_description(func, "Operator popup invoke.");
- parm= RNA_def_pointer(func, "operator", "Operator", "", "Operator to call.");
- RNA_def_property_flag(parm, PROP_REQUIRED);
+ rna_generic_op_invoke(func, 0, 0);
parm= RNA_def_int(func, "width", 300, 0, INT_MAX, "", "Width of the popup.", 0, INT_MAX);
parm= RNA_def_int(func, "height", 20, 0, INT_MAX, "", "Height of the popup.", 0, INT_MAX);
}
@@ -230,6 +263,16 @@ void RNA_api_operator(StructRNA *srna)
RNA_def_property_flag(parm, PROP_ENUM_FLAG);
RNA_def_function_return(func, parm);
+ func= RNA_def_function(srna, "modal", NULL); /* same as invoke */
+ RNA_def_function_ui_description(func, "Modal operator function.");
+ RNA_def_function_flag(func, FUNC_REGISTER_OPTIONAL);
+ RNA_def_pointer(func, "context", "Context", "", "");
+ RNA_def_pointer(func, "event", "Event", "", "");
+
+ parm= RNA_def_enum(func, "result", operator_return_items, 0, "result", ""); // better name?
+ RNA_def_property_flag(parm, PROP_ENUM_FLAG);
+ RNA_def_function_return(func, parm);
+
/* draw */
func= RNA_def_function(srna, "draw", NULL);
RNA_def_function_ui_description(func, "Draw function for the operator.");
@@ -343,6 +386,13 @@ void RNA_api_keymap(StructRNA *srna)
parm= RNA_def_pointer(func, "item", "KeyMapItem", "Item", "");
RNA_def_property_flag(parm, PROP_REQUIRED);
+ func= RNA_def_function(srna, "item_from_id", "WM_keymap_item_find_id");
+ parm= RNA_def_property(func, "id", PROP_INT, PROP_NONE);
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+ RNA_def_property_ui_text(parm, "id", "ID of the item");
+ parm= RNA_def_pointer(func, "item", "KeyMapItem", "Item", "");
+ RNA_def_function_return(func, parm);
+
func= RNA_def_function(srna, "copy_to_user", "WM_keymap_copy_to_user");
parm= RNA_def_pointer(func, "keymap", "KeyMap", "Key Map", "User editable key map.");
RNA_def_function_return(func, parm);
@@ -352,7 +402,7 @@ void RNA_api_keymap(StructRNA *srna)
func= RNA_def_function(srna, "restore_item_to_default", "rna_keymap_restore_item_to_default");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
parm= RNA_def_pointer(func, "item", "KeyMapItem", "Item", "");
- RNA_def_property_flag(parm, PROP_REQUIRED);
+ RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
}
void RNA_api_keymapitem(StructRNA *srna)
diff --git a/source/blender/makesrna/intern/rna_world.c b/source/blender/makesrna/intern/rna_world.c
index 4046fc266da..903b3aa521c 100644
--- a/source/blender/makesrna/intern/rna_world.c
+++ b/source/blender/makesrna/intern/rna_world.c
@@ -15,7 +15,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor(s): Blender Foundation (2008).
*
@@ -45,9 +45,9 @@
#include "WM_api.h"
#include "WM_types.h"
-static PointerRNA rna_World_ambient_occlusion_get(PointerRNA *ptr)
+static PointerRNA rna_World_lighting_get(PointerRNA *ptr)
{
- return rna_pointer_inherit_refine(ptr, &RNA_WorldAmbientOcclusion, ptr->id.data);
+ return rna_pointer_inherit_refine(ptr, &RNA_WorldLighting, ptr->id.data);
}
static PointerRNA rna_World_stars_get(PointerRNA *ptr)
@@ -106,165 +106,222 @@ static void rna_def_world_mtex(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem texco_items[] = {
- {TEXCO_VIEW, "VIEW", 0, "View", "Uses view vector for the texture coordinates."},
- {TEXCO_GLOB, "GLOBAL", 0, "Global", "Uses global coordinates for the texture coordinates (interior mist)."},
- {TEXCO_ANGMAP, "ANGMAP", 0, "AngMap", "Uses 360 degree angular coordinates, e.g. for spherical light probes."},
- {TEXCO_H_SPHEREMAP, "SPHERE", 0, "Sphere", "For 360 degree panorama sky, spherical mapped, only top half."},
- {TEXCO_H_TUBEMAP, "TUBE", 0, "Tube", "For 360 degree panorama sky, cylindrical mapped, only top half."},
- {TEXCO_OBJECT, "OBJECT", 0, "Object", "Uses linked object's coordinates for texture coordinates."},
+ {TEXCO_VIEW, "VIEW", 0, "View", "Uses view vector for the texture coordinates"},
+ {TEXCO_GLOB, "GLOBAL", 0, "Global", "Uses global coordinates for the texture coordinates (interior mist)"},
+ {TEXCO_ANGMAP, "ANGMAP", 0, "AngMap", "Uses 360 degree angular coordinates, e.g. for spherical light probes"},
+ {TEXCO_H_SPHEREMAP, "SPHERE", 0, "Sphere", "For 360 degree panorama sky, spherical mapped, only top half"},
+ {TEXCO_H_TUBEMAP, "TUBE", 0, "Tube", "For 360 degree panorama sky, cylindrical mapped, only top half"},
+ {TEXCO_OBJECT, "OBJECT", 0, "Object", "Uses linked object's coordinates for texture coordinates"},
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "WorldTextureSlot", "TextureSlot");
RNA_def_struct_sdna(srna, "MTex");
- RNA_def_struct_ui_text(srna, "World Texture Slot", "Texture slot for textures in a World datablock.");
+ RNA_def_struct_ui_text(srna, "World Texture Slot", "Texture slot for textures in a World datablock");
/* map to */
prop= RNA_def_property(srna, "map_blend", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", WOMAP_BLEND);
- RNA_def_property_ui_text(prop, "Blend", "Affect the color progression of the background.");
+ RNA_def_property_ui_text(prop, "Blend", "Affect the color progression of the background");
RNA_def_property_update(prop, 0, "rna_World_update");
prop= RNA_def_property(srna, "map_horizon", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", WOMAP_HORIZ);
- RNA_def_property_ui_text(prop, "Horizon", "Affect the color of the horizon.");
+ RNA_def_property_ui_text(prop, "Horizon", "Affect the color of the horizon");
RNA_def_property_update(prop, 0, "rna_World_update");
prop= RNA_def_property(srna, "map_zenith_up", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", WOMAP_ZENUP);
- RNA_def_property_ui_text(prop, "Zenith Up", "Affect the color of the zenith above.");
+ RNA_def_property_ui_text(prop, "Zenith Up", "Affect the color of the zenith above");
RNA_def_property_update(prop, 0, "rna_World_update");
prop= RNA_def_property(srna, "map_zenith_down", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", WOMAP_ZENDOWN);
- RNA_def_property_ui_text(prop, "Zenith Down", "Affect the color of the zenith below.");
+ RNA_def_property_ui_text(prop, "Zenith Down", "Affect the color of the zenith below");
RNA_def_property_update(prop, 0, "rna_World_update");
/* unused
prop= RNA_def_property(srna, "map_mist", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", WOMAP_MIST);
- RNA_def_property_ui_text(prop, "Mist", "Causes the texture to affect the intensity of the mist.");*/
+ RNA_def_property_ui_text(prop, "Mist", "Causes the texture to affect the intensity of the mist");*/
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, texco_items);
- RNA_def_property_ui_text(prop, "Texture Coordinates", "Texture coordinates used to map the texture onto the background.");
+ RNA_def_property_ui_text(prop, "Texture Coordinates", "Texture coordinates used to map the texture onto the background");
RNA_def_property_update(prop, 0, "rna_World_update");
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");
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Object", "Object to use for mapping with Object texture coordinates.");
+ RNA_def_property_ui_text(prop, "Object", "Object to use for mapping with Object texture coordinates");
RNA_def_property_update(prop, 0, "rna_World_update");
prop= RNA_def_property(srna, "blend_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "blendfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
- RNA_def_property_ui_text(prop, "Blend Factor", "Amount texture affects color progression of the background.");
+ RNA_def_property_ui_text(prop, "Blend Factor", "Amount texture affects color progression of the background");
RNA_def_property_update(prop, 0, "rna_World_update");
prop= RNA_def_property(srna, "horizon_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, "Horizon Factor", "Amount texture affects color of the horizon.");
+ RNA_def_property_ui_text(prop, "Horizon Factor", "Amount texture affects color of the horizon");
RNA_def_property_update(prop, 0, "rna_World_update");
prop= RNA_def_property(srna, "zenith_up_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "zenupfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
- RNA_def_property_ui_text(prop, "Zenith Up Factor", "Amount texture affects color of the zenith above.");
+ RNA_def_property_ui_text(prop, "Zenith Up Factor", "Amount texture affects color of the zenith above");
RNA_def_property_update(prop, 0, "rna_World_update");
prop= RNA_def_property(srna, "zenith_down_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "zendownfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
- RNA_def_property_ui_text(prop, "Zenith Down Factor", "Amount texture affects color of the zenith below.");
+ RNA_def_property_ui_text(prop, "Zenith Down Factor", "Amount texture affects color of the zenith below");
RNA_def_property_update(prop, 0, "rna_World_update");
}
-static void rna_def_ambient_occlusion(BlenderRNA *brna)
+static void rna_def_lighting(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
static EnumPropertyItem blend_mode_items[] = {
- {WO_AOADD, "ADD", 0, "Add", "Add light and shadow."},
- {WO_AOSUB, "SUBTRACT", 0, "Subtract", "Subtract light and shadow (needs a normal light to make anything visible.)"},
- {WO_AOADDSUB, "BOTH", 0, "Both", "Both lighten and darken."},
+ {WO_AOMUL, "MULTIPLY", 0, "Multiply", "Multiply direct lighting with ambient occlusion, darkening the result"},
+ {WO_AOADD, "ADD", 0, "Add", "Add light and shadow"},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem prop_color_items[] = {
{WO_AOPLAIN, "PLAIN", 0, "White", "Plain diffuse energy (white.)"},
- {WO_AOSKYCOL, "SKY_COLOR", 0, "Sky Color", "Use horizon and zenith color for diffuse energy."},
- {WO_AOSKYTEX, "SKY_TEXTURE", 0, "Sky Texture", "Does full Sky texture render for diffuse energy."},
+ {WO_AOSKYCOL, "SKY_COLOR", 0, "Sky Color", "Use horizon and zenith color for diffuse energy"},
+ {WO_AOSKYTEX, "SKY_TEXTURE", 0, "Sky Texture", "Does full Sky texture render for diffuse energy"},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem prop_sample_method_items[] = {
{WO_AOSAMP_CONSTANT, "CONSTANT_JITTERED", 0, "Constant Jittered", ""},
- {WO_AOSAMP_HALTON, "ADAPTIVE_QMC", 0, "Adaptive QMC", "Fast in high-contrast areas."},
- {WO_AOSAMP_HAMMERSLEY, "CONSTANT_QMC", 0, "Constant QMC", "Best quality."},
+ {WO_AOSAMP_HALTON, "ADAPTIVE_QMC", 0, "Adaptive QMC", "Fast in high-contrast areas"},
+ {WO_AOSAMP_HAMMERSLEY, "CONSTANT_QMC", 0, "Constant QMC", "Best quality"},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem prop_gather_method_items[] = {
- {WO_AOGATHER_RAYTRACE, "RAYTRACE", 0, "Raytrace", "Accurate, but slow when noise-free results are required."},
- {WO_AOGATHER_APPROX, "APPROXIMATE", 0, "Approximate", "Inaccurate, but faster and without noise."},
+ {WO_AOGATHER_RAYTRACE, "RAYTRACE", 0, "Raytrace", "Accurate, but slow when noise-free results are required"},
+ {WO_AOGATHER_APPROX, "APPROXIMATE", 0, "Approximate", "Inaccurate, but faster and without noise"},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "WorldAmbientOcclusion", NULL);
+ srna= RNA_def_struct(brna, "WorldLighting", NULL);
RNA_def_struct_sdna(srna, "World");
RNA_def_struct_nested(brna, srna, "World");
- RNA_def_struct_ui_text(srna, "Ambient Occlusion", "Ambient occlusion settings for a World datablock.");
+ RNA_def_struct_ui_text(srna, "Lighting", "Lighting for a World datablock");
- prop= RNA_def_property(srna, "enabled", PROP_BOOLEAN, PROP_NONE);
+ /* ambient occlusion */
+ prop= RNA_def_property(srna, "use_ambient_occlusion", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", WO_AMB_OCC);
- RNA_def_property_ui_text(prop, "Enabled", "Use Ambient Occlusion to add light based on distance between elements, creating the illusion of omnipresent light");
+ RNA_def_property_ui_text(prop, "Use Ambient Occlusion", "Use Ambient Occlusion to add shadowing based on distance between objects");
+ RNA_def_property_update(prop, 0, "rna_World_update");
+
+ prop= RNA_def_property(srna, "ao_factor", PROP_FLOAT, PROP_FACTOR);
+ RNA_def_property_float_sdna(prop, NULL, "aoenergy");
+ RNA_def_property_range(prop, 0, INT_MAX);
+ RNA_def_property_ui_range(prop, 0, 1, 0.1, 2);
+ RNA_def_property_ui_text(prop, "Factor", "Factor for ambient occlusion blending");
+ RNA_def_property_update(prop, 0, "rna_World_update");
+
+ prop= RNA_def_property(srna, "ao_blend_mode", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "aomix");
+ RNA_def_property_enum_items(prop, blend_mode_items);
+ RNA_def_property_ui_text(prop, "Blend Mode", "Defines how AO mixes with material shading");
+ RNA_def_property_update(prop, 0, "rna_World_update");
+
+ /* environment lighting */
+ prop= RNA_def_property(srna, "use_environment_lighting", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "mode", WO_ENV_LIGHT);
+ RNA_def_property_ui_text(prop, "Use Environment Lighting", "Add light coming from the environment");
+ RNA_def_property_update(prop, 0, "rna_World_update");
+
+ prop= RNA_def_property(srna, "environment_energy", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "ao_env_energy");
+ RNA_def_property_ui_range(prop, 0, FLT_MAX, 0.1, 2);
+ RNA_def_property_ui_text(prop, "Environment Color", "Defines the strength of environment light");
+ RNA_def_property_update(prop, 0, "rna_World_update");
+
+ prop= RNA_def_property(srna, "environment_color", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "aocolor");
+ RNA_def_property_enum_items(prop, prop_color_items);
+ RNA_def_property_ui_text(prop, "Environment Color", "Defines where the color of the environment light comes from");
+ RNA_def_property_update(prop, 0, "rna_World_update");
+
+ /* indirect lighting */
+ prop= RNA_def_property(srna, "use_indirect_lighting", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "mode", WO_INDIRECT_LIGHT);
+ RNA_def_property_ui_text(prop, "Use Indirect Lighting", "Add indirect light bouncing of surrounding objects");
+ RNA_def_property_update(prop, 0, "rna_World_update");
+
+ prop= RNA_def_property(srna, "indirect_factor", PROP_FLOAT, PROP_FACTOR);
+ RNA_def_property_float_sdna(prop, NULL, "ao_indirect_energy");
+ RNA_def_property_range(prop, 0, INT_MAX);
+ RNA_def_property_ui_range(prop, 0, 1, 0.1, 2);
+ RNA_def_property_ui_text(prop, "Indirect Factor", "Factor for how much surrounding objects contribute to light");
+ RNA_def_property_update(prop, 0, "rna_World_update");
+
+ prop= RNA_def_property(srna, "indirect_bounces", PROP_INT, PROP_UNSIGNED);
+ RNA_def_property_int_sdna(prop, NULL, "ao_indirect_bounces");
+ RNA_def_property_range(prop, 1, INT_MAX);
+ RNA_def_property_ui_text(prop, "Bounces", "Number of indirect diffuse light bounces to use for approximate ambient occlusion");
+ RNA_def_property_update(prop, 0, "rna_World_update");
+
+ /* gathering parameters */
+ prop= RNA_def_property(srna, "gather_method", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "ao_gather_method");
+ RNA_def_property_enum_items(prop, prop_gather_method_items);
+ RNA_def_property_ui_text(prop, "Gather Method", "");
+ RNA_def_property_update(prop, 0, "rna_World_update");
+
+ prop= RNA_def_property(srna, "passes", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "ao_approx_passes");
+ RNA_def_property_range(prop, 0, 10);
+ RNA_def_property_ui_text(prop, "Passes", "Number of preprocessing passes to reduce overocclusion (for approximate ambient occlusion)");
RNA_def_property_update(prop, 0, "rna_World_update");
prop= RNA_def_property(srna, "distance", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "aodist");
- RNA_def_property_ui_text(prop, "Distance", "Length of rays, defines how far away other faces give occlusion effect.");
+ RNA_def_property_ui_text(prop, "Distance", "Length of rays, defines how far away other faces give occlusion effect");
RNA_def_property_update(prop, 0, "rna_World_update");
prop= RNA_def_property(srna, "falloff_strength", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "aodistfac");
- RNA_def_property_ui_text(prop, "Strength", "Distance attenuation factor, the higher, the 'shorter' the shadows.");
- RNA_def_property_update(prop, 0, "rna_World_update");
-
- prop= RNA_def_property(srna, "energy", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "aoenergy");
- RNA_def_property_ui_range(prop, 0, 10, 0.1, 3);
- RNA_def_property_ui_text(prop, "Energy", "Amount of enerygy generated by ambient occlusion.");
+ RNA_def_property_ui_text(prop, "Strength", "Distance attenuation factor, the higher, the 'shorter' the shadows");
RNA_def_property_update(prop, 0, "rna_World_update");
prop= RNA_def_property(srna, "bias", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "aobias");
RNA_def_property_range(prop, 0, 0.5);
- RNA_def_property_ui_text(prop, "Bias", "Bias (in radians) to prevent smoothed faces from showing banding (for Raytrace Constant Jittered).");
+ RNA_def_property_ui_text(prop, "Bias", "Bias (in radians) to prevent smoothed faces from showing banding (for Raytrace Constant Jittered)");
RNA_def_property_update(prop, 0, "rna_World_update");
prop= RNA_def_property(srna, "threshold", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ao_adapt_thresh");
RNA_def_property_range(prop, 0, 1);
- RNA_def_property_ui_text(prop, "Threshold", "Samples below this threshold will be considered fully shadowed/unshadowed and skipped (for Raytrace Adaptive QMC).");
+ RNA_def_property_ui_text(prop, "Threshold", "Samples below this threshold will be considered fully shadowed/unshadowed and skipped (for Raytrace Adaptive QMC)");
RNA_def_property_update(prop, 0, "rna_World_update");
prop= RNA_def_property(srna, "adapt_to_speed", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ao_adapt_speed_fac");
RNA_def_property_range(prop, 0, 1);
- RNA_def_property_ui_text(prop, "Adapt To Speed", "Use the speed vector pass to reduce AO samples in fast moving pixels. Higher values result in more aggressive sample reduction. Requires Vec pass enabled (for Raytrace Adaptive QMC).");
+ RNA_def_property_ui_text(prop, "Adapt To Speed", "Use the speed vector pass to reduce AO samples in fast moving pixels. Higher values result in more aggressive sample reduction. Requires Vec pass enabled (for Raytrace Adaptive QMC)");
RNA_def_property_update(prop, 0, "rna_World_update");
prop= RNA_def_property(srna, "error_tolerance", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ao_approx_error");
RNA_def_property_range(prop, 0.0001, 10);
- RNA_def_property_ui_text(prop, "Error Tolerance", "Low values are slower and higher quality (for Approximate).");
+ RNA_def_property_ui_text(prop, "Error Tolerance", "Low values are slower and higher quality (for Approximate)");
RNA_def_property_update(prop, 0, "rna_World_update");
prop= RNA_def_property(srna, "correction", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ao_approx_correction");
RNA_def_property_range(prop, 0, 1);
RNA_def_property_ui_range(prop, 0, 1, 0.1, 2);
- RNA_def_property_ui_text(prop, "Correction", "Ad-hoc correction for over-occlusion due to the approximation (for Approximate).");
+ RNA_def_property_ui_text(prop, "Correction", "Ad-hoc correction for over-occlusion due to the approximation (for Approximate)");
RNA_def_property_update(prop, 0, "rna_World_update");
prop= RNA_def_property(srna, "falloff", PROP_BOOLEAN, PROP_NONE);
@@ -274,7 +331,7 @@ static void rna_def_ambient_occlusion(BlenderRNA *brna)
prop= RNA_def_property(srna, "pixel_cache", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "aomode", WO_AOCACHE);
- RNA_def_property_ui_text(prop, "Pixel Cache", "Cache AO results in pixels and interpolate over neighbouring pixels for speedup (for Approximate).");
+ RNA_def_property_ui_text(prop, "Pixel Cache", "Cache AO results in pixels and interpolate over neighbouring pixels for speedup (for Approximate)");
RNA_def_property_update(prop, 0, "rna_World_update");
prop= RNA_def_property(srna, "samples", PROP_INT, PROP_NONE);
@@ -283,45 +340,10 @@ static void rna_def_ambient_occlusion(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Samples", "Amount of ray samples. Higher values give smoother results and longer rendering times");
RNA_def_property_update(prop, 0, "rna_World_update");
- prop= RNA_def_property(srna, "blend_mode", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "aomix");
- RNA_def_property_enum_items(prop, blend_mode_items);
- RNA_def_property_ui_text(prop, "Blend Mode", "Defines how AO mixes with material shading.");
- RNA_def_property_update(prop, 0, "rna_World_update");
-
- prop= RNA_def_property(srna, "color", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "aocolor");
- RNA_def_property_enum_items(prop, prop_color_items);
- RNA_def_property_ui_text(prop, "Color", "Defines the color of the AO light");
- RNA_def_property_update(prop, 0, "rna_World_update");
-
prop= RNA_def_property(srna, "sample_method", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "ao_samp_method");
RNA_def_property_enum_items(prop, prop_sample_method_items);
- RNA_def_property_ui_text(prop, "Sample Method", "Method for generating shadow samples (for Raytrace).");
- RNA_def_property_update(prop, 0, "rna_World_update");
-
- prop= RNA_def_property(srna, "gather_method", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "ao_gather_method");
- RNA_def_property_enum_items(prop, prop_gather_method_items);
- RNA_def_property_ui_text(prop, "Gather Method", "");
- RNA_def_property_update(prop, 0, "rna_World_update");
-
- prop= RNA_def_property(srna, "passes", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "ao_approx_passes");
- RNA_def_property_range(prop, 0, 10);
- RNA_def_property_ui_text(prop, "Passes", "Number of preprocessing passes to reduce overocclusion (for Approximate).");
- RNA_def_property_update(prop, 0, "rna_World_update");
-
- prop= RNA_def_property(srna, "indirect_energy", PROP_FLOAT, PROP_UNSIGNED);
- RNA_def_property_float_sdna(prop, NULL, "ao_indirect_energy");
- RNA_def_property_ui_range(prop, 0, 10, 0.1, 3);
- RNA_def_property_ui_text(prop, "Indirect", "Use approximate ambient occlusion for indirect diffuse lighting.");
- RNA_def_property_update(prop, 0, "rna_World_update");
-
- prop= RNA_def_property(srna, "indirect_bounces", PROP_INT, PROP_UNSIGNED);
- RNA_def_property_int_sdna(prop, NULL, "ao_indirect_bounces");
- RNA_def_property_ui_text(prop, "Bounces", "Number of indirect diffuse light bounces to use for approximate ambient occlusion.");
+ RNA_def_property_ui_text(prop, "Sample Method", "Method for generating shadow samples (for Raytrace)");
RNA_def_property_update(prop, 0, "rna_World_update");
}
@@ -331,25 +353,25 @@ static void rna_def_world_mist(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem falloff_items[] = {
- {0, "QUADRATIC", 0, "Quadratic", "Mist uses quadratic progression."},
- {1, "LINEAR", 0, "Linear", "Mist uses linear progression."},
- {2, "INVERSE_QUADRATIC", 0, "Inverse Quadratic", "Mist uses inverse quadratic progression."},
+ {0, "QUADRATIC", 0, "Quadratic", "Mist uses quadratic progression"},
+ {1, "LINEAR", 0, "Linear", "Mist uses linear progression"},
+ {2, "INVERSE_QUADRATIC", 0, "Inverse Quadratic", "Mist uses inverse quadratic progression"},
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "WorldMistSettings", NULL);
RNA_def_struct_sdna(srna, "World");
RNA_def_struct_nested(brna, srna, "World");
- RNA_def_struct_ui_text(srna, "World Mist", "Mist settings for a World data-block.");
+ RNA_def_struct_ui_text(srna, "World Mist", "Mist settings for a World data-block");
prop= RNA_def_property(srna, "enabled", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", WO_MIST);
- RNA_def_property_ui_text(prop, "Enabled", "Occlude objects with the environment color as they are further away.");
+ RNA_def_property_ui_text(prop, "Enabled", "Occlude objects with the environment color as they are further away");
RNA_def_property_update(prop, 0, "rna_World_draw_update");
prop= RNA_def_property(srna, "intensity", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "misi");
RNA_def_property_range(prop, 0, 1);
- RNA_def_property_ui_text(prop, "Intensity", "Intensity of the mist effect.");
+ RNA_def_property_ui_text(prop, "Intensity", "Intensity of the mist effect");
RNA_def_property_update(prop, 0, "rna_World_update");
prop= RNA_def_property(srna, "start", PROP_FLOAT, PROP_DISTANCE);
@@ -387,42 +409,42 @@ static void rna_def_world_stars(BlenderRNA *brna)
srna= RNA_def_struct(brna, "WorldStarsSettings", NULL);
RNA_def_struct_sdna(srna, "World");
RNA_def_struct_nested(brna, srna, "World");
- RNA_def_struct_ui_text(srna, "World Stars", "Stars setting for a World data-block.");
+ RNA_def_struct_ui_text(srna, "World Stars", "Stars setting for a World data-block");
prop= RNA_def_property(srna, "enabled", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", WO_STARS);
- RNA_def_property_ui_text(prop, "Enabled", "Enable starfield generation.");
+ RNA_def_property_ui_text(prop, "Enabled", "Enable starfield generation");
RNA_def_property_update(prop, 0, "rna_World_update");
prop= RNA_def_property(srna, "size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "starsize");
RNA_def_property_range(prop, 0, 10);
- RNA_def_property_ui_text(prop, "Size", "Average screen dimension of stars.");
+ RNA_def_property_ui_text(prop, "Size", "Average screen dimension of stars");
RNA_def_property_update(prop, 0, "rna_World_update");
prop= RNA_def_property(srna, "min_distance", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "starmindist");
RNA_def_property_range(prop, 0, 1000);
- RNA_def_property_ui_text(prop, "Minimum Distance", "Minimum distance to the camera for stars.");
+ RNA_def_property_ui_text(prop, "Minimum Distance", "Minimum distance to the camera for stars");
RNA_def_property_update(prop, 0, "rna_World_update");
prop= RNA_def_property(srna, "average_separation", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "stardist");
RNA_def_property_range(prop, 2, 1000);
- RNA_def_property_ui_text(prop, "Average Separation", "Average distance between any two stars.");
+ RNA_def_property_ui_text(prop, "Average Separation", "Average distance between any two stars");
RNA_def_property_update(prop, 0, "rna_World_update");
prop= RNA_def_property(srna, "color_randomization", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "starcolnoise");
RNA_def_property_range(prop, 0, 1);
- RNA_def_property_ui_text(prop, "Color Randomization", "Randomize star colors.");
+ RNA_def_property_ui_text(prop, "Color Randomization", "Randomize star colors");
RNA_def_property_update(prop, 0, "rna_World_update");
/* unused
prop= RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "starr");
RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "Color", "Stars color.");
+ RNA_def_property_ui_text(prop, "Color", "Stars color");
RNA_def_property_update(prop, 0, "rna_World_update");*/
}
@@ -443,7 +465,7 @@ void RNA_def_world(BlenderRNA *brna)
*/
srna= RNA_def_struct(brna, "World", "ID");
- RNA_def_struct_ui_text(srna, "World", "World datablock describing the environment and ambient lighting of a scene.");
+ RNA_def_struct_ui_text(srna, "World", "World datablock describing the environment and ambient lighting of a scene");
RNA_def_struct_ui_icon(srna, ICON_WORLD_DATA);
rna_def_animdata_common(srna);
@@ -454,13 +476,13 @@ void RNA_def_world(BlenderRNA *brna)
prop= RNA_def_property(srna, "horizon_color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "horr");
RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "Horizon Color", "Color at the horizon.");
+ RNA_def_property_ui_text(prop, "Horizon Color", "Color at the horizon");
RNA_def_property_update(prop, 0, "rna_World_update");
prop= RNA_def_property(srna, "zenith_color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "zenr");
RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "Zenith Color", "Color at the zenith.");
+ RNA_def_property_ui_text(prop, "Zenith Color", "Color at the zenith");
RNA_def_property_update(prop, 0, "rna_World_update");
prop= RNA_def_property(srna, "ambient_color", PROP_FLOAT, PROP_COLOR);
@@ -473,51 +495,51 @@ void RNA_def_world(BlenderRNA *brna)
prop= RNA_def_property(srna, "exposure", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "exp");
RNA_def_property_range(prop, 0.0, 1.0);
- RNA_def_property_ui_text(prop, "Exposure", "Amount of exponential color correction for light.");
+ RNA_def_property_ui_text(prop, "Exposure", "Amount of exponential color correction for light");
RNA_def_property_update(prop, 0, "rna_World_update");
prop= RNA_def_property(srna, "range", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "range");
RNA_def_property_range(prop, 0.2, 5.0);
- RNA_def_property_ui_text(prop, "Range", "The color range that will be mapped to 0-1.");
+ RNA_def_property_ui_text(prop, "Range", "The color range that will be mapped to 0-1");
RNA_def_property_update(prop, 0, "rna_World_update");
/* sky type */
prop= RNA_def_property(srna, "blend_sky", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "skytype", WO_SKYBLEND);
- RNA_def_property_ui_text(prop, "Blend Sky", "Render background with natural progression from horizon to zenith.");
+ RNA_def_property_ui_text(prop, "Blend Sky", "Render background with natural progression from horizon to zenith");
RNA_def_property_update(prop, 0, "rna_World_update");
prop= RNA_def_property(srna, "paper_sky", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "skytype", WO_SKYPAPER);
- RNA_def_property_ui_text(prop, "Paper Sky", "Flatten blend or texture coordinates.");
+ RNA_def_property_ui_text(prop, "Paper Sky", "Flatten blend or texture coordinates");
RNA_def_property_update(prop, 0, "rna_World_update");
prop= RNA_def_property(srna, "real_sky", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "skytype", WO_SKYREAL);
- RNA_def_property_ui_text(prop, "Real Sky", "Render background with a real horizon, relative to the camera angle.");
+ RNA_def_property_ui_text(prop, "Real Sky", "Render background with a real horizon, relative to the camera angle");
RNA_def_property_update(prop, 0, "rna_World_update");
/* nested structs */
- prop= RNA_def_property(srna, "ambient_occlusion", PROP_POINTER, PROP_NONE);
+ prop= RNA_def_property(srna, "lighting", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
- RNA_def_property_struct_type(prop, "WorldAmbientOcclusion");
- RNA_def_property_pointer_funcs(prop, "rna_World_ambient_occlusion_get", NULL, NULL);
- RNA_def_property_ui_text(prop, "Ambient Occlusion", "World ambient occlusion settings.");
+ RNA_def_property_struct_type(prop, "WorldLighting");
+ RNA_def_property_pointer_funcs(prop, "rna_World_lighting_get", NULL, NULL);
+ RNA_def_property_ui_text(prop, "Lighting", "World lighting settings");
prop= RNA_def_property(srna, "mist", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "WorldMistSettings");
RNA_def_property_pointer_funcs(prop, "rna_World_mist_get", NULL, NULL);
- RNA_def_property_ui_text(prop, "Mist", "World mist settings.");
+ RNA_def_property_ui_text(prop, "Mist", "World mist settings");
prop= RNA_def_property(srna, "stars", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "WorldStarsSettings");
RNA_def_property_pointer_funcs(prop, "rna_World_stars_get", NULL, NULL);
- RNA_def_property_ui_text(prop, "Stars", "World stars settings.");
+ RNA_def_property_ui_text(prop, "Stars", "World stars settings");
- rna_def_ambient_occlusion(brna);
+ rna_def_lighting(brna);
rna_def_world_mist(brna);
rna_def_world_stars(brna);
rna_def_world_mtex(brna);