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:
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2012-05-27 02:22:45 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2012-05-27 02:22:45 +0400
commitb6a9a953bc6aa7d81921a796e8ce1123fdedefc7 (patch)
tree44c587b017c6915bb750560fb56a0a7782358c07 /source/blender/makesrna/intern
parenta5152b7ca0d6d7f340b1955c0e8a15ba23fda336 (diff)
parenteda0f3b1863e2e41b9913e16af82407b63e145bf (diff)
Merged changes in the trunk up to revision 47056.
Conflicts resolved: source/blender/bmesh/bmesh_class.h source/blender/bmesh/intern/bmesh_construct.c source/blender/editors/interface/resources.c source/blender/render/intern/source/convertblender.c
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r--source/blender/makesrna/intern/makesrna.c8
-rw-r--r--source/blender/makesrna/intern/rna_access.c3
-rw-r--r--source/blender/makesrna/intern/rna_action.c6
-rw-r--r--source/blender/makesrna/intern/rna_dynamicpaint.c3
-rw-r--r--source/blender/makesrna/intern/rna_image.c15
-rw-r--r--source/blender/makesrna/intern/rna_image_api.c24
-rw-r--r--source/blender/makesrna/intern/rna_internal.h3
-rw-r--r--source/blender/makesrna/intern/rna_key.c18
-rw-r--r--source/blender/makesrna/intern/rna_lamp.c14
-rw-r--r--source/blender/makesrna/intern/rna_lattice.c14
-rw-r--r--source/blender/makesrna/intern/rna_mesh.c122
-rw-r--r--source/blender/makesrna/intern/rna_modifier.c47
-rw-r--r--source/blender/makesrna/intern/rna_nodetree.c123
-rw-r--r--source/blender/makesrna/intern/rna_nodetree_types.h5
-rw-r--r--source/blender/makesrna/intern/rna_object_api.c3
-rw-r--r--source/blender/makesrna/intern/rna_particle.c1
-rw-r--r--source/blender/makesrna/intern/rna_pose.c97
-rw-r--r--source/blender/makesrna/intern/rna_rna.c11
-rw-r--r--source/blender/makesrna/intern/rna_scene.c37
-rw-r--r--source/blender/makesrna/intern/rna_scene_api.c11
-rw-r--r--source/blender/makesrna/intern/rna_screen.c3
-rw-r--r--source/blender/makesrna/intern/rna_sculpt_paint.c5
-rw-r--r--source/blender/makesrna/intern/rna_sequencer.c6
-rw-r--r--source/blender/makesrna/intern/rna_space.c17
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c21
-rw-r--r--source/blender/makesrna/intern/rna_wm.c2
26 files changed, 467 insertions, 152 deletions
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c
index e83173eb8bc..1452616bcf9 100644
--- a/source/blender/makesrna/intern/makesrna.c
+++ b/source/blender/makesrna/intern/makesrna.c
@@ -420,7 +420,8 @@ static const char *rna_parameter_type_name(PropertyRNA *parm)
return type;
switch (parm->type) {
- case PROP_POINTER: {
+ case PROP_POINTER:
+ {
PointerPropertyRNA *pparm = (PointerPropertyRNA *)parm;
if (parm->flag & PROP_RNAPTR)
@@ -428,7 +429,8 @@ static const char *rna_parameter_type_name(PropertyRNA *parm)
else
return rna_find_dna_type((const char *)pparm->type);
}
- case PROP_COLLECTION: {
+ case PROP_COLLECTION:
+ {
return "ListBase";
}
default:
@@ -819,7 +821,7 @@ static char *rna_def_property_set_func(FILE *f, StructRNA *srna, PropertyRNA *pr
if (prop->flag & PROP_ID_SELF_CHECK) {
rna_print_id_get(f, dp);
- fprintf(f, " if (id==value.data) return;\n\n");
+ fprintf(f, " if (id == value.data) return;\n\n");
}
if (prop->flag & PROP_ID_REFCOUNT) {
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index 70f6afd664d..7676f4a5866 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -4793,7 +4793,8 @@ char *RNA_property_as_string(bContext *C, PointerRNA *ptr, PropertyRNA *prop)
BLI_dynstr_append(dynstr, "[");
for (RNA_property_collection_begin(ptr, prop, &collect_iter); collect_iter.valid;
- RNA_property_collection_next(&collect_iter)) {
+ RNA_property_collection_next(&collect_iter))
+ {
PointerRNA itemptr = collect_iter.ptr;
if (first_time == 0)
diff --git a/source/blender/makesrna/intern/rna_action.c b/source/blender/makesrna/intern/rna_action.c
index 5c9457bb8e2..49c459adc76 100644
--- a/source/blender/makesrna/intern/rna_action.c
+++ b/source/blender/makesrna/intern/rna_action.c
@@ -486,10 +486,8 @@ static void rna_def_action_group(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Expanded", "Action Group is expanded");
RNA_def_property_update(prop, NC_ANIMATION | ND_ANIMCHAN | NA_EDITED, 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_update(prop, NC_ANIMATION | ND_ANIMCHAN | NA_EDITED, NULL);
+ /* color set */
+ rna_def_actionbone_group_common(srna, NC_ANIMATION | ND_ANIMCHAN | NA_EDITED, NULL);
}
/* fcurve.keyframe_points */
diff --git a/source/blender/makesrna/intern/rna_dynamicpaint.c b/source/blender/makesrna/intern/rna_dynamicpaint.c
index a38c769c26a..4bfcabc935b 100644
--- a/source/blender/makesrna/intern/rna_dynamicpaint.c
+++ b/source/blender/makesrna/intern/rna_dynamicpaint.c
@@ -243,7 +243,8 @@ static EnumPropertyItem *rna_DynamicPaint_surface_type_itemf(bContext *C, Pointe
/* Displace */
if (surface->format == MOD_DPAINT_SURFACE_F_VERTEX ||
- surface->format == MOD_DPAINT_SURFACE_F_IMAGESEQ) {
+ surface->format == MOD_DPAINT_SURFACE_F_IMAGESEQ)
+ {
tmp.value = MOD_DPAINT_SURFACE_T_DISPLACE;
tmp.identifier = "DISPLACE";
tmp.name = "Displace";
diff --git a/source/blender/makesrna/intern/rna_image.c b/source/blender/makesrna/intern/rna_image.c
index b022da97630..03e446c9d91 100644
--- a/source/blender/makesrna/intern/rna_image.c
+++ b/source/blender/makesrna/intern/rna_image.c
@@ -53,6 +53,7 @@ static EnumPropertyItem image_source_items[] = {
#ifdef RNA_RUNTIME
+#include "IMB_imbuf.h"
#include "IMB_imbuf_types.h"
static void rna_Image_animated_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
@@ -287,6 +288,15 @@ static int rna_Image_depth_get(PointerRNA *ptr)
return planes;
}
+static int rna_Image_frame_duration_get(PointerRNA *ptr)
+{
+ Image *im = (Image *)ptr->data;
+
+ if (im->anim)
+ return IMB_anim_get_duration(im->anim, IMB_TC_RECORD_RUN);
+ return 1;
+}
+
static int rna_Image_pixels_get_length(PointerRNA *ptr, int length[RNA_MAX_ARRAY_DIMENSION])
{
Image *ima = ptr->id.data;
@@ -629,6 +639,11 @@ static void rna_def_image(BlenderRNA *brna)
prop = RNA_def_float_vector(srna, "resolution", 2, NULL, 0, 0, "Resolution", "X/Y pixels per meter", 0, 0);
RNA_def_property_float_funcs(prop, "rna_Image_resolution_get", "rna_Image_resolution_set", NULL);
+ prop = RNA_def_property(srna, "frame_duration", PROP_INT, PROP_UNSIGNED);
+ RNA_def_property_int_funcs(prop, "rna_Image_frame_duration_get", NULL, NULL);
+ RNA_def_property_ui_text(prop, "Duration", "Duration (in frames) of the image (1 when not a video/sequence)");
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+
prop = RNA_def_property(srna, "pixels", PROP_FLOAT, PROP_NONE);
RNA_def_property_flag(prop, PROP_DYNAMIC);
RNA_def_property_multi_array(prop, 1, NULL);
diff --git a/source/blender/makesrna/intern/rna_image_api.c b/source/blender/makesrna/intern/rna_image_api.c
index 3d937fc561d..cf19002f44e 100644
--- a/source/blender/makesrna/intern/rna_image_api.c
+++ b/source/blender/makesrna/intern/rna_image_api.c
@@ -224,6 +224,19 @@ static int rna_Image_gl_load(Image *image, ReportList *reports, int filter, int
return error;
}
+static int rna_Image_gl_touch(Image *image, ReportList *reports, int filter, int mag)
+{
+ unsigned int *bind = &image->bindcode;
+ int error = GL_NO_ERROR;
+
+ BKE_image_tag_time(image);
+
+ if (*bind == 0)
+ error = rna_Image_gl_load(image, reports, GL_LINEAR_MIPMAP_NEAREST, GL_LINEAR);
+
+ return error;
+}
+
static void rna_Image_gl_free(Image *image)
{
GPU_free_image(image);
@@ -274,6 +287,17 @@ void RNA_api_image(StructRNA *srna)
parm = RNA_def_int(func, "height", 0, 1, 10000, "", "Height", 1, 10000);
RNA_def_property_flag(parm, PROP_REQUIRED);
+ func = RNA_def_function(srna, "gl_touch", "rna_Image_gl_touch");
+ RNA_def_function_ui_description(func, "Delay the image from being cleaned from the cache due inactivity");
+ RNA_def_function_flag(func, FUNC_USE_REPORTS);
+ RNA_def_int(func, "filter", GL_LINEAR_MIPMAP_NEAREST, -INT_MAX, INT_MAX, "Filter",
+ "The texture minifying function to use if the image wan't loaded", -INT_MAX, INT_MAX);
+ RNA_def_int(func, "mag", GL_LINEAR, -INT_MAX, INT_MAX, "Magnification",
+ "The texture magnification function to use if the image wan't loaded", -INT_MAX, INT_MAX);
+ /* return value */
+ parm = RNA_def_int(func, "error", 0, -INT_MAX, INT_MAX, "Error", "OpenGL error value", -INT_MAX, INT_MAX);
+ RNA_def_function_return(func, parm);
+
func = RNA_def_function(srna, "gl_load", "rna_Image_gl_load");
RNA_def_function_ui_description(func, "Load the image into OpenGL graphics memory");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
diff --git a/source/blender/makesrna/intern/rna_internal.h b/source/blender/makesrna/intern/rna_internal.h
index 62feda4053b..daa307e77c2 100644
--- a/source/blender/makesrna/intern/rna_internal.h
+++ b/source/blender/makesrna/intern/rna_internal.h
@@ -194,6 +194,9 @@ void rna_def_mtex_common(struct BlenderRNA *brna, struct StructRNA *srna, const
const char *structname_slots, const char *update);
void rna_def_render_layer_common(struct StructRNA *srna, int scene);
+void rna_def_actionbone_group_common(struct StructRNA *srna, int update_flag, const char *update_cb);
+void rna_ActionGroup_colorset_set(struct PointerRNA *ptr, int value);
+
void rna_ID_name_get(struct PointerRNA *ptr, char *value);
int rna_ID_name_length(struct PointerRNA *ptr);
void rna_ID_name_set(struct PointerRNA *ptr, const char *value);
diff --git a/source/blender/makesrna/intern/rna_key.c b/source/blender/makesrna/intern/rna_key.c
index 5a56518e498..c2d730f5ed9 100644
--- a/source/blender/makesrna/intern/rna_key.c
+++ b/source/blender/makesrna/intern/rna_key.c
@@ -445,6 +445,13 @@ static char *rna_ShapeKeyPoint_path(PointerRNA *ptr)
#else
+EnumPropertyItem keyblock_type_items[] = {
+ {KEY_LINEAR, "KEY_LINEAR", 0, "Linear", ""},
+ {KEY_CARDINAL, "KEY_CARDINAL", 0, "Cardinal", ""},
+ {KEY_BSPLINE, "KEY_BSPLINE", 0, "BSpline", ""},
+ {0, NULL, 0, NULL, NULL}
+};
+
static void rna_def_keydata(BlenderRNA *brna)
{
StructRNA *srna;
@@ -515,13 +522,6 @@ static void rna_def_keyblock(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_keyblock_type_items[] = {
- {KEY_LINEAR, "KEY_LINEAR", 0, "Linear", ""},
- {KEY_CARDINAL, "KEY_CARDINAL", 0, "Cardinal", ""},
- {KEY_BSPLINE, "KEY_BSPLINE", 0, "BSpline", ""},
- {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_sdna(srna, "KeyBlock");
@@ -551,8 +551,8 @@ static void rna_def_keyblock(BlenderRNA *brna)
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_enum_items(prop, keyblock_type_items);
+ RNA_def_property_ui_text(prop, "Interpolation", "Interpolation type for absolute shape keys");
RNA_def_property_update(prop, 0, "rna_Key_update_data");
prop = RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_lamp.c b/source/blender/makesrna/intern/rna_lamp.c
index 7adee6fd95f..fdad91165c4 100644
--- a/source/blender/makesrna/intern/rna_lamp.c
+++ b/source/blender/makesrna/intern/rna_lamp.c
@@ -758,20 +758,6 @@ static void rna_def_spot_lamp(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- 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"},
- {0, NULL, 0, NULL, NULL}
- };
-
- static EnumPropertyItem prop_numbuffer_items[] = {
- {1, "BUFFERS_1", 0, "1", "Only one buffer rendered"},
- {4, "BUFFERS_4", 0, "4", "Render 4 buffers for better AA, this quadruples memory usage"},
- {9, "BUFFERS_9", 0, "9", "Render 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");
diff --git a/source/blender/makesrna/intern/rna_lattice.c b/source/blender/makesrna/intern/rna_lattice.c
index a50389f01c1..6e42b47afce 100644
--- a/source/blender/makesrna/intern/rna_lattice.c
+++ b/source/blender/makesrna/intern/rna_lattice.c
@@ -28,6 +28,7 @@
#include <stdlib.h>
#include "RNA_define.h"
+#include "RNA_enum_types.h"
#include "rna_internal.h"
@@ -248,13 +249,6 @@ static void rna_def_lattice(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_keyblock_type_items[] = {
- {KEY_LINEAR, "KEY_LINEAR", 0, "Linear", ""},
- {KEY_CARDINAL, "KEY_CARDINAL", 0, "Cardinal", ""},
- {KEY_BSPLINE, "KEY_BSPLINE", 0, "BSpline", ""},
- {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_icon(srna, ICON_LATTICE_DATA);
@@ -285,19 +279,19 @@ static void rna_def_lattice(BlenderRNA *brna)
prop = RNA_def_property(srna, "interpolation_type_u", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "typeu");
- RNA_def_property_enum_items(prop, prop_keyblock_type_items);
+ RNA_def_property_enum_items(prop, keyblock_type_items);
RNA_def_property_ui_text(prop, "Interpolation Type U", "");
RNA_def_property_update(prop, 0, "rna_Lattice_update_data");
prop = RNA_def_property(srna, "interpolation_type_v", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "typev");
- RNA_def_property_enum_items(prop, prop_keyblock_type_items);
+ RNA_def_property_enum_items(prop, keyblock_type_items);
RNA_def_property_ui_text(prop, "Interpolation Type V", "");
RNA_def_property_update(prop, 0, "rna_Lattice_update_data");
prop = RNA_def_property(srna, "interpolation_type_w", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "typew");
- RNA_def_property_enum_items(prop, prop_keyblock_type_items);
+ RNA_def_property_enum_items(prop, keyblock_type_items);
RNA_def_property_ui_text(prop, "Interpolation Type W", "");
RNA_def_property_update(prop, 0, "rna_Lattice_update_data");
diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c
index c122b8f262b..936ccf97724 100644
--- a/source/blender/makesrna/intern/rna_mesh.c
+++ b/source/blender/makesrna/intern/rna_mesh.c
@@ -76,6 +76,11 @@ static Mesh *rna_mesh(PointerRNA *ptr)
return me;
}
+static CustomData *rna_mesh_vdata_helper(Mesh *me)
+{
+ return (me->edit_btmesh) ? &me->edit_btmesh->bm->vdata : &me->vdata;
+}
+
static CustomData *rna_mesh_pdata_helper(Mesh *me)
{
return (me->edit_btmesh) ? &me->edit_btmesh->bm->pdata : &me->pdata;
@@ -91,6 +96,11 @@ static CustomData *rna_mesh_fdata_helper(Mesh *me)
return (me->edit_btmesh) ? NULL : &me->fdata;
}
+static CustomData *rna_mesh_vdata(PointerRNA *ptr)
+{
+ Mesh *me = rna_mesh(ptr);
+ return rna_mesh_vdata_helper(me);
+}
static CustomData *rna_mesh_pdata(PointerRNA *ptr)
{
Mesh *me = rna_mesh(ptr);
@@ -856,6 +866,42 @@ static int rna_Mesh_polygon_string_layers_length(PointerRNA *ptr)
return CustomData_number_of_layers(rna_mesh_pdata(ptr), CD_PROP_STR);
}
+/* Skin vertices */
+DEFINE_CUSTOMDATA_LAYER_COLLECTION(skin_vertice, vdata, CD_MVERT_SKIN);
+
+static char *rna_MeshSkinVertexLayer_path(PointerRNA *ptr)
+{
+ return BLI_sprintfN("skin_vertices[\"%s\"]", ((CustomDataLayer *)ptr->data)->name);
+}
+
+static char *rna_VertCustomData_data_path(PointerRNA *ptr, char *collection, int type);
+static char *rna_MeshSkinVertex_path(PointerRNA *ptr)
+{
+ return rna_VertCustomData_data_path(ptr, "skin_vertices", CD_MVERT_SKIN);
+}
+
+static void rna_MeshSkinVertexLayer_data_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
+{
+ Mesh *me = rna_mesh(ptr);
+ CustomDataLayer *layer = (CustomDataLayer *)ptr->data;
+ rna_iterator_array_begin(iter, layer->data, sizeof(MVertSkin), me->totvert, 0, NULL);
+}
+
+static int rna_MeshSkinVertexLayer_data_length(PointerRNA *ptr)
+{
+ Mesh *me = rna_mesh(ptr);
+ return me->totvert;
+}
+
+static void rna_MeshSkinVertexLayer_name_set(PointerRNA *ptr, const char *value)
+{
+ CustomDataLayer *cdl = (CustomDataLayer *)ptr->data;
+ BLI_strncpy_utf8(cdl->name, value, sizeof(cdl->name));
+ CustomData_set_layer_unique_name(rna_mesh_vdata(ptr), cdl - rna_mesh_vdata(ptr)->layers);
+}
+
+/* End skin vertices */
+
static void rna_TexturePoly_image_set(PointerRNA *ptr, PointerRNA value)
{
MTexPoly *tf = (MTexPoly *)ptr->data;
@@ -1056,6 +1102,24 @@ static char *rna_MeshTexturePolyLayer_path(PointerRNA *ptr)
return BLI_sprintfN("uv_textures[\"%s\"]", ((CustomDataLayer *)ptr->data)->name);
}
+static char *rna_VertCustomData_data_path(PointerRNA *ptr, char *collection, int type)
+{
+ CustomDataLayer *cdl;
+ Mesh *me = rna_mesh(ptr);
+ CustomData *vdata = rna_mesh_vdata(ptr);
+ int a, b, totvert = (me->edit_btmesh) ? 0 : me->totvert;
+
+ for (cdl = vdata->layers, a = 0; a < vdata->totlayer; cdl++, a++) {
+ if (cdl->type == type) {
+ b = ((char *)ptr->data - ((char *)cdl->data)) / CustomData_sizeof(type);
+ if (b >= 0 && b < totvert)
+ return BLI_sprintfN("%s[\"%s\"].data[%d]", collection, cdl->name, b);
+ }
+ }
+
+ return NULL;
+}
+
static char *rna_PolyCustomData_data_path(PointerRNA *ptr, char *collection, int type)
{
CustomDataLayer *cdl;
@@ -2514,6 +2578,54 @@ static void rna_def_uv_textures(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
}
+static void rna_def_skin_vertices(BlenderRNA *brna, PropertyRNA *cprop)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ srna = RNA_def_struct(brna, "MeshSkinVertexLayer", NULL);
+ RNA_def_struct_ui_text(srna, "Mesh Skin Vertex Layer", "Per-vertex skin data for use with the Skin modifier");
+ RNA_def_struct_sdna(srna, "CustomDataLayer");
+ RNA_def_struct_path_func(srna, "rna_MeshSkinVertexLayer_path");
+
+ prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
+ RNA_def_struct_name_property(srna, prop);
+ RNA_def_property_string_funcs(prop, NULL, NULL, "rna_MeshSkinVertexLayer_name_set");
+ RNA_def_property_ui_text(prop, "Name", "Name of skin layer");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
+
+ prop = RNA_def_property(srna, "data", PROP_COLLECTION, PROP_NONE);
+ RNA_def_property_struct_type(prop, "MeshSkinVertex");
+ RNA_def_property_ui_text(prop, "Data", "");
+ RNA_def_property_collection_funcs(prop, "rna_MeshSkinVertexLayer_data_begin", "rna_iterator_array_next",
+ "rna_iterator_array_end", "rna_iterator_array_get",
+ "rna_MeshSkinVertexLayer_data_length", NULL, NULL, NULL);
+
+ /* SkinVertex struct */
+ srna = RNA_def_struct(brna, "MeshSkinVertex", NULL);
+ RNA_def_struct_sdna(srna, "MVertSkin");
+ RNA_def_struct_ui_text(srna, "Skin Vertex", "Per-vertex skin data for use with the Skin modifier");
+ RNA_def_struct_path_func(srna, "rna_MeshSkinVertex_path");
+
+ prop = RNA_def_property(srna, "radius", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_array(prop, 2);
+ RNA_def_property_ui_range(prop, 0.001, 100, 1, 3);
+ RNA_def_property_ui_text(prop, "Radius", "Radius of the skin");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
+
+ /* Flags */
+
+ prop = RNA_def_property(srna, "use_root", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", MVERT_SKIN_ROOT);
+ RNA_def_property_ui_text(prop, "Root", "Vertex is a root for rotation calculations and armature generation");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
+
+ prop = RNA_def_property(srna, "use_loose", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", MVERT_SKIN_LOOSE);
+ RNA_def_property_ui_text(prop, "Loose", "If vertex has multiple adjacent edges, it is hulled to them directly");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
+}
+
static void rna_def_mesh(BlenderRNA *brna)
{
StructRNA *srna;
@@ -2686,6 +2798,16 @@ static void rna_def_mesh(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "String Property Layers", "");
rna_def_polygon_string_layers(brna, prop);
+ /* Skin vertices */
+ prop = RNA_def_property(srna, "skin_vertices", PROP_COLLECTION, PROP_NONE);
+ RNA_def_property_collection_sdna(prop, NULL, "vdata.layers", "vdata.totlayer");
+ RNA_def_property_collection_funcs(prop, "rna_Mesh_skin_vertices_begin", NULL, NULL, NULL,
+ "rna_Mesh_skin_vertices_length", NULL, NULL, NULL);
+ RNA_def_property_struct_type(prop, "MeshSkinVertexLayer");
+ RNA_def_property_ui_text(prop, "Skin Vertices", "All skin vertices");
+ rna_def_skin_vertices(brna, prop);
+ /* End skin vertices */
+
prop = RNA_def_property(srna, "use_auto_smooth", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ME_AUTOSMOOTH);
RNA_def_property_ui_text(prop, "Auto Smooth",
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index 4a7050b47e9..21a01cf43a8 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -75,6 +75,7 @@ EnumPropertyItem modifier_type_items[] = {
{eModifierType_Multires, "MULTIRES", ICON_MOD_MULTIRES, "Multiresolution", ""},
{eModifierType_Remesh, "REMESH", ICON_MOD_REMESH, "Remesh", ""},
{eModifierType_Screw, "SCREW", ICON_MOD_SCREW, "Screw", ""},
+ {eModifierType_Skin, "SKIN", ICON_MOD_SKIN, "Skin", ""},
{eModifierType_Solidify, "SOLIDIFY", ICON_MOD_SOLIDIFY, "Solidify", ""},
{eModifierType_Subsurf, "SUBSURF", ICON_MOD_SUBSURF, "Subdivision Surface", ""},
{0, "", 0, N_("Deform"), ""},
@@ -207,6 +208,8 @@ static StructRNA *rna_Modifier_refine(struct PointerRNA *ptr)
return &RNA_DynamicPaintModifier;
case eModifierType_Remesh:
return &RNA_RemeshModifier;
+ case eModifierType_Skin:
+ return &RNA_SkinModifier;
default:
return &RNA_Modifier;
}
@@ -2550,8 +2553,11 @@ static void rna_def_modifier_solidify(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_SOLIDIFY_VGROUP_INV);
RNA_def_property_ui_text(prop, "Vertex Group Invert", "Invert the vertex group influence");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
-
-
+
+ prop = RNA_def_property(srna, "use_flip_normals", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_SOLIDIFY_FLIP);
+ RNA_def_property_ui_text(prop, "Flip Normals", "Invert the face direction");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
}
static void rna_def_modifier_screw(BlenderRNA *brna)
@@ -3196,6 +3202,42 @@ static void rna_def_modifier_ocean(BlenderRNA *brna)
/* XXX how to update? */
}
+static void rna_def_modifier_skin(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ srna= RNA_def_struct(brna, "SkinModifier", "Modifier");
+ RNA_def_struct_ui_text(srna, "Skin Modifier", "Generate Skin");
+ RNA_def_struct_sdna(srna, "SkinModifierData");
+ RNA_def_struct_ui_icon(srna, ICON_MOD_SKIN);
+
+ prop = RNA_def_property(srna, "branch_smoothing", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_ui_text(prop, "Branch Smoothing", "Smooth complex geometry around branches");
+ RNA_def_property_ui_range(prop, 0, 1, 1, 0);
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
+
+ prop = RNA_def_property(srna, "use_smooth_shade", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_SKIN_SMOOTH_SHADING);
+ RNA_def_property_ui_text(prop, "Smooth Shading", "Output faces with smooth shading rather than flat shaded");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
+
+ prop = RNA_def_property(srna, "use_x_symmetry", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "symmetry_axes", MOD_SKIN_SYMM_X);
+ RNA_def_property_ui_text(prop, "X", "Avoid making unsymmetric quads across the X axis");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
+
+ prop = RNA_def_property(srna, "use_y_symmetry", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "symmetry_axes", MOD_SKIN_SYMM_Y);
+ RNA_def_property_ui_text(prop, "Y", "Avoid making unsymmetric quads across the Y axis");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
+
+ prop = RNA_def_property(srna, "use_z_symmetry", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "symmetry_axes", MOD_SKIN_SYMM_Z);
+ RNA_def_property_ui_text(prop, "Z", "Avoid making unsymmetric quads across the Z axis");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
+}
+
void RNA_def_modifier(BlenderRNA *brna)
{
StructRNA *srna;
@@ -3301,6 +3343,7 @@ void RNA_def_modifier(BlenderRNA *brna)
rna_def_modifier_dynamic_paint(brna);
rna_def_modifier_ocean(brna);
rna_def_modifier_remesh(brna);
+ rna_def_modifier_skin(brna);
}
#endif
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index 9dcdce61cea..8b7e7f7a5d9 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -205,6 +205,8 @@ static StructRNA *rna_Node_refine(struct PointerRNA *ptr)
return &RNA_NodeForLoop;
case NODE_WHILELOOP:
return &RNA_NodeWhileLoop;
+ case NODE_FRAME:
+ return &RNA_NodeFrame;
default:
return &RNA_Node;
@@ -1123,8 +1125,20 @@ static void def_whileloop(StructRNA *srna)
static void def_frame(StructRNA *srna)
{
-/* PropertyRNA *prop; */
+ PropertyRNA *prop;
+ RNA_def_struct_sdna_from(srna, "NodeFrame", "storage");
+
+ prop = RNA_def_property(srna, "shrink", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", NODE_FRAME_SHRINK);
+ RNA_def_property_ui_text(prop, "Shrink", "Shrink the frame to minimal bounding box");
+ RNA_def_property_update(prop, NC_NODE|ND_DISPLAY, NULL);
+
+ prop = RNA_def_property(srna, "label_size", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "label_size");
+ RNA_def_property_range(prop, 8, 64);
+ RNA_def_property_ui_text(prop, "Label Font Size", "Font size to use for displaying the label");
+ RNA_def_property_update(prop, NC_NODE|ND_DISPLAY, NULL);
}
static void def_math(StructRNA *srna)
@@ -1962,12 +1976,29 @@ static void def_cmp_output_file(StructRNA *srna)
static void def_cmp_dilate_erode(StructRNA *srna)
{
PropertyRNA *prop;
+
+ static EnumPropertyItem type_items[] = {
+ {CMP_NODE_DILATEERODE_STEP, "STEP", 0, "Step", ""},
+ {CMP_NODE_DILATEERODE_DISTANCE, "DISTANCE", 0, "Distance", ""},
+ {0, NULL, 0, NULL, NULL}};
+
+ prop = RNA_def_property(srna, "type", 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, "Distance", "Distance to grow/shrink (number of iterations)");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "distance", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "custom2");
RNA_def_property_range(prop, -100, 100);
RNA_def_property_ui_text(prop, "Distance", "Distance to grow/shrink (number of iterations)");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
+
+ prop = RNA_def_property(srna, "edge", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "custom3");
+ RNA_def_property_range(prop, -100, 100);
+ RNA_def_property_ui_text(prop, "Edge", "Edge to inset");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
}
static void def_cmp_scale(StructRNA *srna)
@@ -2410,7 +2441,7 @@ static void def_cmp_defocus(StructRNA *srna)
prop = RNA_def_property(srna, "blur_max", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "maxblur");
RNA_def_property_range(prop, 0.0f, 10000.0f);
- RNA_def_property_ui_text(prop, "Max Blur", "Blur limit, maximum CoC radius, 0=no limit");
+ RNA_def_property_ui_text(prop, "Max Blur", "Blur limit, maximum CoC radius");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "threshold", PROP_FLOAT, PROP_NONE);
@@ -3006,35 +3037,35 @@ static void def_cmp_boxmask(StructRNA *srna)
RNA_def_property_float_sdna(prop, NULL, "x");
RNA_def_property_float_default(prop, 0.5f);
RNA_def_property_range(prop, -1.0f, 2.0f);
- RNA_def_property_ui_text(prop, "X position", "X position of the middle of the box");
+ RNA_def_property_ui_text(prop, "X", "X position of the middle of the box");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "y");
RNA_def_property_float_default(prop, 0.5f);
RNA_def_property_range(prop, -1.0f, 2.0f);
- RNA_def_property_ui_text(prop, "Y position", "Y position of the middle of the box");
+ RNA_def_property_ui_text(prop, "Y", "Y position of the middle of the box");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "width", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "width");
RNA_def_property_float_default(prop, 0.3f);
RNA_def_property_range(prop, 0.0f, 2.0f);
- RNA_def_property_ui_text(prop, "Width of the box", "Width of the box");
+ RNA_def_property_ui_text(prop, "Width", "Width of the box");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "height", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "height");
RNA_def_property_float_default(prop, 0.2f);
RNA_def_property_range(prop, 0.0f, 2.0f);
- RNA_def_property_ui_text(prop, "Height of the box", "Height of the box");
+ RNA_def_property_ui_text(prop, "Height", "Height of the box");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "rotation", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "rotation");
RNA_def_property_float_default(prop, 0.0f);
RNA_def_property_range(prop, -1000.0f, 1000.0f);
- RNA_def_property_ui_text(prop, "Rotation", "Rotationangle of the box");
+ RNA_def_property_ui_text(prop, "Rotation", "Rotation angle of the box");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
}
@@ -3053,28 +3084,28 @@ static void def_cmp_ellipsemask(StructRNA *srna)
RNA_def_property_float_sdna(prop, NULL, "x");
RNA_def_property_float_default(prop, 0.5f);
RNA_def_property_range(prop, -1.0f, 2.0f);
- RNA_def_property_ui_text(prop, "X position", "X position of the middle of the box");
+ RNA_def_property_ui_text(prop, "X", "X position of the middle of the box");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "y");
RNA_def_property_float_default(prop, 0.5f);
RNA_def_property_range(prop, -1.0f, 2.0f);
- RNA_def_property_ui_text(prop, "Y position", "Y position of the middle of the box");
+ RNA_def_property_ui_text(prop, "Y", "Y position of the middle of the box");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "width", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "width");
RNA_def_property_float_default(prop, 0.3f);
RNA_def_property_range(prop, 0.0f, 2.0f);
- RNA_def_property_ui_text(prop, "Width of the box", "Width of the box");
+ RNA_def_property_ui_text(prop, "Width", "Width of the box");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "height", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "height");
RNA_def_property_float_default(prop, 0.2f);
RNA_def_property_range(prop, 0.0f, 2.0f);
- RNA_def_property_ui_text(prop, "Height of the box", "Height of the box");
+ RNA_def_property_ui_text(prop, "Height", "Height of the box");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "rotation", PROP_FLOAT, PROP_NONE);
@@ -3094,7 +3125,7 @@ static void def_cmp_bokehimage(StructRNA *srna)
prop = RNA_def_property(srna, "angle", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "angle");
RNA_def_property_float_default(prop, 0.0f);
- RNA_def_property_range(prop, -0.0f, 360.0f);
+ RNA_def_property_range(prop, -720.0f, 720.0f);
RNA_def_property_ui_text(prop, "Angle", "Angle of the bokeh");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
@@ -3123,7 +3154,7 @@ static void def_cmp_bokehimage(StructRNA *srna)
RNA_def_property_float_sdna(prop, NULL, "lensshift");
RNA_def_property_float_default(prop, 0.0f);
RNA_def_property_range(prop, -1.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Lens shift", "Shift of the lens.");
+ RNA_def_property_ui_text(prop, "Lens shift", "Shift of the lens components");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
}
@@ -3165,49 +3196,49 @@ static void def_cmp_colorcorrection(StructRNA *srna)
RNA_def_property_float_sdna(prop, NULL, "startmidtones");
RNA_def_property_float_default(prop, 0.2f);
RNA_def_property_range(prop, 0, 1);
- RNA_def_property_ui_text(prop, "Start of midtones", "Start of midtones");
+ RNA_def_property_ui_text(prop, "Midtones Start", "Start of midtones");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "midtones_end", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "endmidtones");
RNA_def_property_float_default(prop, 0.7f);
RNA_def_property_range(prop, 0, 1);
- RNA_def_property_ui_text(prop, "End of midtones", "end of midtones");
+ RNA_def_property_ui_text(prop, "Midtones End", "End of midtones");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "master_saturation", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "master.saturation");
RNA_def_property_float_default(prop, 1.0f);
RNA_def_property_range(prop, 0, 4);
- RNA_def_property_ui_text(prop, "Master saturation", "Master saturation");
+ RNA_def_property_ui_text(prop, "Master Saturation", "Master saturation");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "master_contrast", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "master.contrast");
RNA_def_property_float_default(prop, 1.0f);
RNA_def_property_range(prop, 0, 4);
- RNA_def_property_ui_text(prop, "Master contrast", "Master contrast");
+ RNA_def_property_ui_text(prop, "Master Contrast", "Master contrast");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "master_gamma", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "master.gamma");
RNA_def_property_float_default(prop, 1.0f);
RNA_def_property_range(prop, 0, 4);
- RNA_def_property_ui_text(prop, "Master gamma", "Master gamma");
+ RNA_def_property_ui_text(prop, "Master Gamma", "Master gamma");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "master_gain", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "master.gain");
RNA_def_property_float_default(prop, 1.0f);
RNA_def_property_range(prop, 0, 4);
- RNA_def_property_ui_text(prop, "Master gain", "Master gain");
+ RNA_def_property_ui_text(prop, "Master Gain", "Master gain");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "master_lift", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "master.lift");
RNA_def_property_float_default(prop, 0.0f);
RNA_def_property_range(prop, -1, 1);
- RNA_def_property_ui_text(prop, "Master lift", "Master lift");
+ RNA_def_property_ui_text(prop, "Master Lift", "Master lift");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
//
@@ -3215,105 +3246,105 @@ static void def_cmp_colorcorrection(StructRNA *srna)
RNA_def_property_float_sdna(prop, NULL, "shadows.saturation");
RNA_def_property_float_default(prop, 1.0f);
RNA_def_property_range(prop, 0, 4);
- RNA_def_property_ui_text(prop, "Shadows saturation", "Shadows saturation");
+ RNA_def_property_ui_text(prop, "Shadows Saturation", "Shadows saturation");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "shadows_contrast", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "shadows.contrast");
RNA_def_property_float_default(prop, 1.0f);
RNA_def_property_range(prop, 0, 4);
- RNA_def_property_ui_text(prop, "Shadows contrast", "Shadows contrast");
+ RNA_def_property_ui_text(prop, "Shadows Contrast", "Shadows contrast");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "shadows_gamma", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "shadows.gamma");
RNA_def_property_float_default(prop, 1.0f);
RNA_def_property_range(prop, 0, 4);
- RNA_def_property_ui_text(prop, "Shadows gamma", "Shadows gamma");
+ RNA_def_property_ui_text(prop, "Shadows Gamma", "Shadows gamma");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "shadows_gain", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "shadows.gain");
RNA_def_property_float_default(prop, 1.0f);
RNA_def_property_range(prop, 0, 4);
- RNA_def_property_ui_text(prop, "Shadows gain", "Shadows gain");
+ RNA_def_property_ui_text(prop, "Shadows Gain", "Shadows gain");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "shadows_lift", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "shadows.lift");
RNA_def_property_float_default(prop, 0.0f);
RNA_def_property_range(prop, -1, 1);
- RNA_def_property_ui_text(prop, "Shadows lift", "Shadows lift");
+ RNA_def_property_ui_text(prop, "Shadows Lift", "Shadows lift");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
//
prop = RNA_def_property(srna, "midtones_saturation", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "midtones.saturation");
RNA_def_property_float_default(prop, 1.0f);
RNA_def_property_range(prop, 0, 4);
- RNA_def_property_ui_text(prop, "Midtones saturation", "Midtones saturation");
+ RNA_def_property_ui_text(prop, "Midtones Saturation", "Midtones saturation");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "midtones_contrast", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "midtones.contrast");
RNA_def_property_float_default(prop, 1.0f);
RNA_def_property_range(prop, 0, 4);
- RNA_def_property_ui_text(prop, "Midtones contrast", "Midtones contrast");
+ RNA_def_property_ui_text(prop, "Midtones Contrast", "Midtones contrast");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "midtones_gamma", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "midtones.gamma");
RNA_def_property_float_default(prop, 1.0f);
RNA_def_property_range(prop, 0, 4);
- RNA_def_property_ui_text(prop, "Midtones gamma", "Midtones gamma");
+ RNA_def_property_ui_text(prop, "Midtones Gamma", "Midtones gamma");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "midtones_gain", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "midtones.gain");
RNA_def_property_float_default(prop, 1.0f);
RNA_def_property_range(prop, 0, 4);
- RNA_def_property_ui_text(prop, "Midtones gain", "Midtones gain");
+ RNA_def_property_ui_text(prop, "Midtones Gain", "Midtones gain");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "midtones_lift", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "midtones.lift");
RNA_def_property_float_default(prop, 0.0f);
RNA_def_property_range(prop, -1, 1);
- RNA_def_property_ui_text(prop, "Midtones lift", "Midtones lift");
+ RNA_def_property_ui_text(prop, "Midtones Lift", "Midtones lift");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
//
prop = RNA_def_property(srna, "highlights_saturation", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "highlights.saturation");
RNA_def_property_float_default(prop, 1.0f);
RNA_def_property_range(prop, 0, 4);
- RNA_def_property_ui_text(prop, "Highlights saturation", "Highlights saturation");
+ RNA_def_property_ui_text(prop, "Highlights Saturation", "Highlights saturation");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "highlights_contrast", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "highlights.contrast");
RNA_def_property_float_default(prop, 1.0f);
RNA_def_property_range(prop, 0, 4);
- RNA_def_property_ui_text(prop, "Highlights contrast", "Highlights contrast");
+ RNA_def_property_ui_text(prop, "Highlights Contrast", "Highlights contrast");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "highlights_gamma", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "highlights.gamma");
RNA_def_property_float_default(prop, 1.0f);
RNA_def_property_range(prop, 0, 4);
- RNA_def_property_ui_text(prop, "Highlights gamma", "Highlights gamma");
+ RNA_def_property_ui_text(prop, "Highlights Gamma", "Highlights gamma");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "highlights_gain", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "highlights.gain");
RNA_def_property_float_default(prop, 1.0f);
RNA_def_property_range(prop, 0, 4);
- RNA_def_property_ui_text(prop, "Highlights gain", "Highlights gain");
+ RNA_def_property_ui_text(prop, "Highlights Gain", "Highlights gain");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "highlights_lift", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "highlights.lift");
RNA_def_property_float_default(prop, 0.0f);
RNA_def_property_range(prop, -1, 1);
- RNA_def_property_ui_text(prop, "Highlights lift", "Highlights lift");
+ RNA_def_property_ui_text(prop, "Highlights Lift", "Highlights lift");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
}
@@ -3330,7 +3361,7 @@ static void def_cmp_viewer(StructRNA *srna)
prop = RNA_def_property(srna, "tile_order", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "custom1");
RNA_def_property_enum_items(prop, tileorder_items);
- RNA_def_property_ui_text(prop, "Tile order", "tile order");
+ RNA_def_property_ui_text(prop, "Tile order", "Tile order");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "center_x", PROP_FLOAT, PROP_NONE);
@@ -3640,7 +3671,7 @@ static void rna_def_node_socket_subtype(BlenderRNA *brna, int type, int subtype,
PropertyRNA *prop = NULL;
PropertySubType propsubtype = PROP_NONE;
- #define SUBTYPE(socktype, stypename, id, idname) { PROP_##id, #socktype "_" #id, 0, #idname, ""},
+ #define SUBTYPE(socktype, stypename, id, idname) { PROP_##id, #socktype "_" #id, 0, #idname, ""},
static EnumPropertyItem subtype_items[] = {
NODE_DEFINE_SUBTYPES
{0, NULL, 0, NULL, NULL}
@@ -3770,6 +3801,18 @@ static void rna_def_node(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "Node");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Parent", "Parent this node is attached to");
+
+ prop = RNA_def_property(srna, "use_custom_color", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", NODE_CUSTOM_COLOR);
+ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
+ RNA_def_property_ui_text(prop, "Custom Color", "Use custom color for the node");
+ RNA_def_property_update(prop, NC_NODE|ND_DISPLAY, NULL);
+
+ prop = RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR);
+ RNA_def_property_array(prop, 3);
+ RNA_def_property_range(prop, 0.0f, 1.0f);
+ RNA_def_property_ui_text(prop, "Color", "Custom color of the node body");
+ RNA_def_property_update(prop, NC_NODE|ND_DISPLAY, NULL);
prop = RNA_def_property(srna, "show_texture", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", NODE_ACTIVE_TEXTURE);
@@ -3908,16 +3951,16 @@ static void rna_def_composite_nodetree(BlenderRNA *brna)
prop= RNA_def_property(srna, "render_quality", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "render_quality");
RNA_def_property_enum_items(prop, node_quality_items);
- RNA_def_property_ui_text(prop, "Render quality", "Quality when rendering");
+ RNA_def_property_ui_text(prop, "Render Quality", "Quality when rendering");
prop= RNA_def_property(srna, "edit_quality", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "edit_quality");
RNA_def_property_enum_items(prop, node_quality_items);
- RNA_def_property_ui_text(prop, "Edit quality", "Quality when editing");
+ RNA_def_property_ui_text(prop, "Edit Quality", "Quality when editing");
prop= RNA_def_property(srna, "chunksize", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "chunksize");
- RNA_def_property_ui_text(prop, "Chunksize", "Max size of a chunk during calculation");
+ RNA_def_property_ui_text(prop, "Chunksize", "Max size of a tile. Smaller values gives better distribution of multiple threads, but more overhead.");
RNA_def_property_range(prop, 32, 1024);
prop= RNA_def_property(srna, "use_opencl", PROP_BOOLEAN, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_nodetree_types.h b/source/blender/makesrna/intern/rna_nodetree_types.h
index 2da06d5dea7..351c6d93514 100644
--- a/source/blender/makesrna/intern/rna_nodetree_types.h
+++ b/source/blender/makesrna/intern/rna_nodetree_types.h
@@ -77,8 +77,9 @@ DefNode( ShaderNode, SH_NODE_VOLUME_TRANSPARENT, 0, "VO
DefNode( ShaderNode, SH_NODE_VOLUME_ISOTROPIC, 0, "VOLUME_ISOTROPIC", VolumeIsotropic, "Isotropic Volume", "" )
DefNode( ShaderNode, SH_NODE_EMISSION, 0, "EMISSION", Emission, "Emission", "" )
DefNode( ShaderNode, SH_NODE_NEW_GEOMETRY, 0, "NEW_GEOMETRY", NewGeometry, "Geometry", "" )
-DefNode( ShaderNode, SH_NODE_LIGHT_PATH, 0, "LIGHT_PATH", LightPath, "Light Path", "" )
-DefNode( ShaderNode, SH_NODE_LIGHT_FALLOFF, 0, "LIGHT_FALLOFF", LightFalloff, "Light Falloff", "" )
+DefNode( ShaderNode, SH_NODE_LIGHT_PATH, 0, "LIGHT_PATH", LightPath, "Light Path", "" )
+DefNode( ShaderNode, SH_NODE_LIGHT_FALLOFF, 0, "LIGHT_FALLOFF", LightFalloff, "Light Falloff", "" )
+DefNode( ShaderNode, SH_NODE_OBJECT_INFO, 0, "OBJECT_INFO", ObjectInfo, "Object Info", "" )
DefNode( ShaderNode, SH_NODE_TEX_IMAGE, def_sh_tex_image, "TEX_IMAGE", TexImage, "Image Texture", "" )
DefNode( ShaderNode, SH_NODE_TEX_ENVIRONMENT, def_sh_tex_environment, "TEX_ENVIRONMENT", TexEnvironment, "Environment Texture","" )
DefNode( ShaderNode, SH_NODE_TEX_SKY, def_sh_tex_sky, "TEX_SKY", TexSky, "Sky Texture", "" )
diff --git a/source/blender/makesrna/intern/rna_object_api.c b/source/blender/makesrna/intern/rna_object_api.c
index 4d7ecc9350f..a3e538da9b1 100644
--- a/source/blender/makesrna/intern/rna_object_api.c
+++ b/source/blender/makesrna/intern/rna_object_api.c
@@ -411,7 +411,8 @@ void rna_Object_ray_cast(Object *ob, ReportList *reports, float ray_start[3], fl
hit.index = -1;
if (BLI_bvhtree_ray_cast(treeData.tree, ray_start, ray_nor, 0.0f, &hit,
- treeData.raycast_callback, &treeData) != -1) {
+ treeData.raycast_callback, &treeData) != -1)
+ {
if (hit.dist <= dist) {
copy_v3_v3(r_location, hit.co);
copy_v3_v3(r_normal, hit.no);
diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c
index d179612ae04..8cf3b718c30 100644
--- a/source/blender/makesrna/intern/rna_particle.c
+++ b/source/blender/makesrna/intern/rna_particle.c
@@ -1754,7 +1754,6 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "distr");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_enum_items(prop, part_dist_items);
- RNA_def_property_enum_items(prop, part_draw_as_items);
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_Particle_dist_itemf");
RNA_def_property_ui_text(prop, "Distribution", "How to distribute particles on selected element");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
diff --git a/source/blender/makesrna/intern/rna_pose.c b/source/blender/makesrna/intern/rna_pose.c
index 6ec0932dba8..83d40b26cd0 100644
--- a/source/blender/makesrna/intern/rna_pose.c
+++ b/source/blender/makesrna/intern/rna_pose.c
@@ -60,6 +60,33 @@ EnumPropertyItem posebone_rotmode_items[] = {
{0, NULL, 0, NULL, NULL}
};
+/* Bone and Group Color Sets */
+EnumPropertyItem color_sets_items[] = {
+ {0, "DEFAULT", 0, "Default Colors", ""},
+ {1, "THEME01", 0, "01 - Theme Color Set", ""},
+ {2, "THEME02", 0, "02 - Theme Color Set", ""},
+ {3, "THEME03", 0, "03 - Theme Color Set", ""},
+ {4, "THEME04", 0, "04 - Theme Color Set", ""},
+ {5, "THEME05", 0, "05 - Theme Color Set", ""},
+ {6, "THEME06", 0, "06 - Theme Color Set", ""},
+ {7, "THEME07", 0, "07 - Theme Color Set", ""},
+ {8, "THEME08", 0, "08 - Theme Color Set", ""},
+ {9, "THEME09", 0, "09 - Theme Color Set", ""},
+ {10, "THEME10", 0, "10 - Theme Color Set", ""},
+ {11, "THEME11", 0, "11 - Theme Color Set", ""},
+ {12, "THEME12", 0, "12 - Theme Color Set", ""},
+ {13, "THEME13", 0, "13 - Theme Color Set", ""},
+ {14, "THEME14", 0, "14 - Theme Color Set", ""},
+ {15, "THEME15", 0, "15 - Theme Color Set", ""},
+ {16, "THEME16", 0, "16 - Theme Color Set", ""},
+ {17, "THEME17", 0, "17 - Theme Color Set", ""},
+ {18, "THEME18", 0, "18 - Theme Color Set", ""},
+ {19, "THEME19", 0, "19 - Theme Color Set", ""},
+ {20, "THEME20", 0, "20 - Theme Color Set", ""},
+ {-1, "CUSTOM", 0, "Custom Color Set", ""},
+ {0, NULL, 0, NULL, NULL}
+};
+
#ifdef RNA_RUNTIME
#include "BIK_api.h"
@@ -107,7 +134,8 @@ static char *rna_PoseBone_path(PointerRNA *ptr)
return BLI_sprintfN("pose.bones[\"%s\"]", ((bPoseChannel *)ptr->data)->name);
}
-static void rna_BoneGroup_color_set_set(PointerRNA *ptr, int value)
+/* shared for actions groups and bone groups */
+void rna_ActionGroup_colorset_set(PointerRNA *ptr, int value)
{
bActionGroup *grp = ptr->data;
@@ -622,34 +650,31 @@ static void rna_PoseChannel_matrix_set(PointerRNA *ptr, const float *values)
#else
-static void rna_def_bone_group(BlenderRNA *brna)
+/* common properties for Action/Bone Groups - related to color */
+void rna_def_actionbone_group_common(StructRNA *srna, int update_flag, const char *update_cb)
{
- static EnumPropertyItem prop_colorSets_items[] = {
- {0, "DEFAULT", 0, "Default Colors", ""},
- {1, "THEME01", 0, "01 - Theme Color Set", ""},
- {2, "THEME02", 0, "02 - Theme Color Set", ""},
- {3, "THEME03", 0, "03 - Theme Color Set", ""},
- {4, "THEME04", 0, "04 - Theme Color Set", ""},
- {5, "THEME05", 0, "05 - Theme Color Set", ""},
- {6, "THEME06", 0, "06 - Theme Color Set", ""},
- {7, "THEME07", 0, "07 - Theme Color Set", ""},
- {8, "THEME08", 0, "08 - Theme Color Set", ""},
- {9, "THEME09", 0, "09 - Theme Color Set", ""},
- {10, "THEME10", 0, "10 - Theme Color Set", ""},
- {11, "THEME11", 0, "11 - Theme Color Set", ""},
- {12, "THEME12", 0, "12 - Theme Color Set", ""},
- {13, "THEME13", 0, "13 - Theme Color Set", ""},
- {14, "THEME14", 0, "14 - Theme Color Set", ""},
- {15, "THEME15", 0, "15 - Theme Color Set", ""},
- {16, "THEME16", 0, "16 - Theme Color Set", ""},
- {17, "THEME17", 0, "17 - Theme Color Set", ""},
- {18, "THEME18", 0, "18 - Theme Color Set", ""},
- {19, "THEME19", 0, "19 - Theme Color Set", ""},
- {20, "THEME20", 0, "20 - Theme Color Set", ""},
- {-1, "CUSTOM", 0, "Custom Color Set", ""},
- {0, NULL, 0, NULL, NULL}
- };
+ PropertyRNA *prop;
+ /* color set + colors */
+ prop = RNA_def_property(srna, "color_set", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "customCol");
+ RNA_def_property_enum_items(prop, color_sets_items);
+ RNA_def_property_enum_funcs(prop, NULL, "rna_ActionGroup_colorset_set", NULL);
+ RNA_def_property_ui_text(prop, "Color Set", "Custom color set to use");
+ RNA_def_property_update(prop, update_flag, update_cb);
+
+ /* TODO: editing the colors for this should result in changes to the color type... */
+ prop = RNA_def_property(srna, "colors", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
+ RNA_def_property_struct_type(prop, "ThemeBoneColorSet");
+ /* NOTE: the DNA data is not really a pointer, but this code works :) */
+ RNA_def_property_pointer_sdna(prop, NULL, "cs");
+ RNA_def_property_ui_text(prop, "Colors", "Copy of the colors associated with the group's color set");
+ RNA_def_property_update(prop, update_flag, update_cb);
+}
+
+static void rna_def_bone_group(BlenderRNA *brna)
+{
StructRNA *srna;
PropertyRNA *prop;
@@ -667,22 +692,8 @@ static void rna_def_bone_group(BlenderRNA *brna)
/* TODO: add some runtime-collections stuff to access grouped bones */
- /* color set + colors */
- prop = RNA_def_property(srna, "color_set", PROP_ENUM, PROP_NONE);
- 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_update(prop, NC_OBJECT | ND_POSE, "rna_Pose_update");
-
- /* TODO: editing the colors for this should result in changes to the color type... */
- prop = RNA_def_property(srna, "colors", PROP_POINTER, PROP_NONE);
- RNA_def_property_flag(prop, PROP_NEVER_NULL);
- RNA_def_property_struct_type(prop, "ThemeBoneColorSet");
- /* NOTE: the DNA data is not really a pointer, but this code works :) */
- RNA_def_property_pointer_sdna(prop, NULL, "cs");
- 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");
+ /* color set */
+ rna_def_actionbone_group_common(srna, NC_OBJECT | ND_POSE, "rna_Pose_update");
}
static EnumPropertyItem prop_iksolver_items[] = {
diff --git a/source/blender/makesrna/intern/rna_rna.c b/source/blender/makesrna/intern/rna_rna.c
index 38fbe708038..aab3483e29b 100644
--- a/source/blender/makesrna/intern/rna_rna.c
+++ b/source/blender/makesrna/intern/rna_rna.c
@@ -577,6 +577,12 @@ static int rna_Property_is_enum_flag_get(PointerRNA *ptr)
return prop->flag & PROP_ENUM_FLAG ? 1 : 0;
}
+static int rna_Property_is_library_editable_flag_get(PointerRNA *ptr)
+{
+ PropertyRNA *prop = (PropertyRNA *)ptr->data;
+ return prop->flag & PROP_LIB_EXCEPTION ? 1 : 0;
+}
+
static int rna_Property_array_length_get(PointerRNA *ptr)
{
PropertyRNA *prop = (PropertyRNA *)ptr->data;
@@ -1174,6 +1180,11 @@ static void rna_def_property(BlenderRNA *brna)
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_funcs(prop, "rna_Property_is_enum_flag_get", NULL);
RNA_def_property_ui_text(prop, "Enum Flag", "True when multiple enums ");
+
+ prop = RNA_def_property(srna, "is_library_editable", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_boolean_funcs(prop, "rna_Property_is_library_editable_flag_get", NULL);
+ RNA_def_property_ui_text(prop, "Library Editable", "Property is editable from linked instances (changes not saved)");
}
static void rna_def_function(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index c26620168ff..511354c78a6 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -2747,7 +2747,7 @@ static void rna_def_scene_game_data(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem aasamples_items[] = {
+ static EnumPropertyItem aasamples_items[] = {
{0, "SAMPLES_0", 0, "Off", ""},
{2, "SAMPLES_2", 0, "2x", ""},
{4, "SAMPLES_4", 0, "4x", ""},
@@ -4167,65 +4167,78 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
RNA_def_property_enum_bitflag_sdna(prop, NULL, "bake_mode");
RNA_def_property_enum_items(prop, bake_mode_items);
RNA_def_property_ui_text(prop, "Bake Mode", "Choose shading information to bake into the image");
-
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
+
prop = RNA_def_property(srna, "bake_normal_space", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "bake_normal_space");
RNA_def_property_enum_items(prop, bake_normal_space_items);
RNA_def_property_ui_text(prop, "Normal Space", "Choose normal space for baking");
-
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
+
prop = RNA_def_property(srna, "bake_quad_split", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, bake_qyad_split_items);
RNA_def_property_ui_text(prop, "Quad Split", "Choose the method used to split a quad into 2 triangles for baking");
-
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
+
prop = RNA_def_property(srna, "bake_aa_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "bake_osa");
RNA_def_property_enum_items(prop, fixed_oversample_items);
RNA_def_property_ui_text(prop, "Anti-Aliasing Level", "");
-
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
+
prop = RNA_def_property(srna, "use_bake_selected_to_active", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "bake_flag", R_BAKE_TO_ACTIVE);
RNA_def_property_ui_text(prop, "Selected to Active",
"Bake shading on the surface of selected objects to the active object");
-
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
+
prop = RNA_def_property(srna, "use_bake_normalize", 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_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
+
prop = RNA_def_property(srna, "use_bake_clear", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "bake_flag", R_BAKE_CLEAR);
RNA_def_property_ui_text(prop, "Clear", "Clear Images before baking");
-
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
+
prop = RNA_def_property(srna, "use_bake_antialiasing", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "bake_flag", R_BAKE_OSA);
RNA_def_property_ui_text(prop, "Anti-Aliasing", "Enables Anti-aliasing");
-
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
+
prop = RNA_def_property(srna, "bake_margin", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "bake_filter");
RNA_def_property_range(prop, 0, 64);
RNA_def_property_ui_text(prop, "Margin",
"Amount of pixels to extend the baked result with, as post process filter");
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "bake_distance", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "bake_maxdist");
RNA_def_property_range(prop, 0.0, 1000.0);
RNA_def_property_ui_text(prop, "Distance",
"Maximum distance from active object to other object (in blender units)");
-
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
+
prop = RNA_def_property(srna, "bake_bias", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "bake_biasdist");
RNA_def_property_range(prop, 0.0, 1000.0);
RNA_def_property_ui_text(prop, "Bias", "Bias towards faces further away from the object (in blender units)");
-
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
+
prop = RNA_def_property(srna, "use_bake_multires", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "bake_flag", R_BAKE_MULTIRES);
RNA_def_property_ui_text(prop, "Bake from Multires", "Bake directly from multires object");
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "use_bake_lores_mesh", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "bake_flag", R_BAKE_LORES_MESH);
RNA_def_property_ui_text(prop, "Low Resolution Mesh",
"Calculate heights against unsubdivided low resolution mesh");
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
/* stamp */
@@ -4654,7 +4667,7 @@ void RNA_def_scene(BlenderRNA *brna)
RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_SELF_CHECK);
RNA_def_property_pointer_funcs(prop, NULL, "rna_Scene_set_set", NULL, NULL);
RNA_def_property_ui_text(prop, "Background Scene", "Background set scene");
- RNA_def_property_update(prop, NC_SCENE | NA_EDITED, NULL);
+ RNA_def_property_update(prop, NC_SCENE | NA_EDITED, "rna_Scene_glsl_update");
prop = RNA_def_property(srna, "world", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_EDITABLE);
diff --git a/source/blender/makesrna/intern/rna_scene_api.c b/source/blender/makesrna/intern/rna_scene_api.c
index 429f1d48df3..439335e69b4 100644
--- a/source/blender/makesrna/intern/rna_scene_api.c
+++ b/source/blender/makesrna/intern/rna_scene_api.c
@@ -85,9 +85,15 @@ static void rna_SceneRender_get_frame_path(RenderData *rd, int frame, char *name
/* don't remove this, as COLLADA exporting cannot be done through operators in render() callback. */
#include "../../collada/collada.h"
-static void rna_Scene_collada_export(Scene *scene, const char *filepath, int selected, int apply_modifiers, int second_life)
+static void rna_Scene_collada_export(
+ Scene *scene,
+ const char *filepath,
+ int selected,
+ int apply_modifiers,
+ int include_bone_children,
+ int second_life)
{
- collada_export(scene, filepath, selected, apply_modifiers, second_life);
+ collada_export(scene, filepath, selected, apply_modifiers, include_bone_children, second_life);
}
#endif
@@ -117,6 +123,7 @@ void RNA_api_scene(StructRNA *srna)
RNA_def_property_subtype(parm, PROP_FILEPATH); /* allow non utf8 */
parm = RNA_def_boolean(func, "selected", 0, "Selection Only", "Export only selected elements");
parm = RNA_def_boolean(func, "apply_modifiers", 0, "Apply Modifiers", "Apply modifiers (in Preview resolution)");
+ parm = RNA_def_boolean(func, "include_bone_children", 0, "Include Bone Children", "Include all objects attached to bones of selected Armature(s)");
parm = RNA_def_boolean(func, "second_life", 0, "Export for Second Life", "Compatibility mode for Second Life");
RNA_def_function_ui_description(func, "Export to collada file");
#endif
diff --git a/source/blender/makesrna/intern/rna_screen.c b/source/blender/makesrna/intern/rna_screen.c
index e442de6fc7c..71133634a96 100644
--- a/source/blender/makesrna/intern/rna_screen.c
+++ b/source/blender/makesrna/intern/rna_screen.c
@@ -94,8 +94,7 @@ static void rna_Screen_redraw_update(Main *UNUSED(bmain), Scene *UNUSED(scene),
static int rna_Screen_is_animation_playing_get(PointerRNA *ptr)
{
- bScreen *sc = (bScreen *)ptr->data;
- return (sc->animtimer != NULL);
+ return (ED_screen_animation_playing(G.main->wm.first) != NULL);
}
static int rna_Screen_fullscreen_get(PointerRNA *ptr)
diff --git a/source/blender/makesrna/intern/rna_sculpt_paint.c b/source/blender/makesrna/intern/rna_sculpt_paint.c
index ad40e71eb71..58d676555c1 100644
--- a/source/blender/makesrna/intern/rna_sculpt_paint.c
+++ b/source/blender/makesrna/intern/rna_sculpt_paint.c
@@ -234,6 +234,11 @@ static void rna_def_paint(BlenderRNA *brna)
prop = RNA_def_property(srna, "show_low_resolution", 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");
+
+ prop = RNA_def_property(srna, "input_samples", PROP_INT, PROP_UNSIGNED);
+ RNA_def_property_int_sdna(prop, NULL, "num_input_samples");
+ RNA_def_property_ui_range(prop, 1, PAINT_MAX_INPUT_SAMPLES, 0, 0);
+ RNA_def_property_ui_text(prop, "Input Samples", "Average multiple input samples together to smooth the brush stroke");
}
static void rna_def_sculpt(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c
index e7b648377e9..a3c309625f3 100644
--- a/source/blender/makesrna/intern/rna_sequencer.c
+++ b/source/blender/makesrna/intern/rna_sequencer.c
@@ -1374,12 +1374,14 @@ static void rna_def_effect_inputs(StructRNA *srna, int count)
RNA_def_property_ui_text(prop, "Input 2", "Second input for the effect strip");
}
- if (count == 3) { /* not used by any effects ...except maybe plugins? */
+ /*
+ if (count == 3) { // not used by any effects ...except maybe plugins?
prop = RNA_def_property(srna, "input_3", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "seq3");
RNA_def_property_flag(prop, PROP_EDITABLE | PROP_NEVER_NULL);
RNA_def_property_ui_text(prop, "Input 3", "Third input for the effect strip");
}
+ */
}
static void rna_def_image(BlenderRNA *brna)
@@ -1472,7 +1474,7 @@ static void rna_def_movie(BlenderRNA *brna)
prop = RNA_def_property(srna, "stream_index", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "streamindex");
RNA_def_property_range(prop, 0, 20);
- RNA_def_property_ui_text(prop, "Streamindex",
+ RNA_def_property_ui_text(prop, "Stream Index",
"For files with several movie streams, use the stream with the given index");
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update_reopen_files");
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 0e2fc6e8f11..9b4dcd03c79 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -1567,6 +1567,11 @@ static void rna_def_space_view3d(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Textured Solid", "Display face-assigned textures in solid view");
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
+ prop = RNA_def_property(srna, "show_backface_culling", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag2", V3D_BACKFACE_CULLING);
+ RNA_def_property_ui_text(prop, "Backface Culling", "Use back face culling to hide the back side of faces");
+ RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
+
prop = RNA_def_property(srna, "lock_camera", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag2", V3D_LOCK_CAMERA);
RNA_def_property_ui_text(prop, "Lock Camera to View", "Enable view navigation within the camera view");
@@ -2262,6 +2267,12 @@ static void rna_def_space_dopesheet(BlenderRNA *brna)
"(Action and Shape Key Editors only)");
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_DOPESHEET, NULL);
+ prop = RNA_def_property(srna, "show_group_colors", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SACTION_NODRAWGCOLORS);
+ RNA_def_property_ui_text(prop, "Show Group Colors",
+ "Draw groups and channels with colours matching their corresponding groups");
+ RNA_def_property_update(prop, NC_SPACE | ND_SPACE_DOPESHEET, NULL);
+
/* editing */
prop = RNA_def_property(srna, "use_auto_merge_keyframes", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SACTION_NOTRANSKEYCULL);
@@ -2367,6 +2378,12 @@ static void rna_def_space_graph(BlenderRNA *brna)
"(disable for better performance)");
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_GRAPH, NULL);
+ prop = RNA_def_property(srna, "show_group_colors", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SIPO_NODRAWGCOLORS);
+ RNA_def_property_ui_text(prop, "Show Group Colors",
+ "Draw groups and channels with colours matching their corresponding groups");
+ RNA_def_property_update(prop, NC_SPACE | ND_SPACE_GRAPH, NULL);
+
/* editing */
prop = RNA_def_property(srna, "use_auto_merge_keyframes", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SIPO_NOTRANSKEYCULL);
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index fa3473ca7e7..4835ec20163 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -1209,6 +1209,11 @@ static void rna_def_userdef_theme_space_view3d(BlenderRNA *brna)
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Camera Path", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
+
+ prop = RNA_def_property(srna, "skin_root", PROP_FLOAT, PROP_COLOR_GAMMA);
+ RNA_def_property_array(prop, 3);
+ RNA_def_property_ui_text(prop, "Skin Root", "");
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
}
@@ -1536,6 +1541,18 @@ static void rna_def_userdef_theme_space_node(BlenderRNA *brna)
rna_def_userdef_theme_spaces_main(srna);
rna_def_userdef_theme_spaces_list_main(srna);
+ prop = RNA_def_property(srna, "node_selected", PROP_FLOAT, PROP_COLOR_GAMMA);
+ RNA_def_property_float_sdna(prop, NULL, "select");
+ RNA_def_property_array(prop, 3);
+ RNA_def_property_ui_text(prop, "Node Selected", "");
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
+
+ prop = RNA_def_property(srna, "node_active", PROP_FLOAT, PROP_COLOR_GAMMA);
+ RNA_def_property_float_sdna(prop, NULL, "active");
+ RNA_def_property_array(prop, 3);
+ RNA_def_property_ui_text(prop, "Active Node", "");
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
+
prop = RNA_def_property(srna, "wire", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "wire");
RNA_def_property_array(prop, 3);
@@ -2802,7 +2819,7 @@ static void rna_def_userdef_system(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem anisotropic_items[] = {
+ static EnumPropertyItem anisotropic_items[] = {
{1, "FILTER_0", 0, "Off", ""},
{2, "FILTER_2", 0, "2x", ""},
{4, "FILTER_4", 0, "4x", ""},
@@ -3046,7 +3063,7 @@ static void rna_def_userdef_system(BlenderRNA *brna)
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_range(prop, 0, (sizeof(void *) == 8) ? 1024 * 32 : 1024); /* 32 bit 2 GB, 64 bit 32 GB */
RNA_def_property_ui_text(prop, "Memory Cache Limit", "Memory cache limit (in megabytes)");
RNA_def_property_update(prop, 0, "rna_Userdef_memcache_update");
diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c
index 993d1e20bc5..194f48bd32a 100644
--- a/source/blender/makesrna/intern/rna_wm.c
+++ b/source/blender/makesrna/intern/rna_wm.c
@@ -1783,7 +1783,7 @@ static void rna_def_keyconfig(BlenderRNA *brna)
RNA_def_struct_name_property(srna, prop);
RNA_def_property_update(prop, 0, "rna_KeyMapItem_update");
- /* this is infact the operator name, but if the operator can't be found we
+ /* this is in fact the operator name, but if the operator can't be found we
* fallback on the operator ID */
prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);