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-01-16 03:13:12 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2012-01-16 03:13:12 +0400
commite0df491d1e465588cc018c6f6d00f72739b71516 (patch)
treefe4cbcdaa4633545bbc817c28eb780b551e5ac05 /source/blender/makesrna
parent76a211d80947a453f594e4cf0a1e0acc6786eddf (diff)
parent23806a2b7d50082d70a0e4ecab22aafb8433708a (diff)
Merged changes in the trunk up to revision 43404.
Conflicts resolved: source/blender/python/SConscript
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/RNA_access.h10
-rw-r--r--source/blender/makesrna/SConscript8
-rw-r--r--source/blender/makesrna/intern/CMakeLists.txt4
-rw-r--r--source/blender/makesrna/intern/SConscript8
-rw-r--r--source/blender/makesrna/intern/rna_access.c53
-rw-r--r--source/blender/makesrna/intern/rna_actuator.c8
-rw-r--r--source/blender/makesrna/intern/rna_brush.c115
-rw-r--r--source/blender/makesrna/intern/rna_image.c13
-rw-r--r--source/blender/makesrna/intern/rna_modifier.c2
-rw-r--r--source/blender/makesrna/intern/rna_nodetree.c51
-rw-r--r--source/blender/makesrna/intern/rna_nodetree_types.h2
-rw-r--r--source/blender/makesrna/intern/rna_object.c9
-rw-r--r--source/blender/makesrna/intern/rna_scene.c643
-rw-r--r--source/blender/makesrna/intern/rna_sculpt_paint.c9
-rw-r--r--source/blender/makesrna/intern/rna_space.c30
-rw-r--r--source/blender/makesrna/intern/rna_tracking.c135
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c252
-rw-r--r--source/blender/makesrna/intern/rna_wm.c2
18 files changed, 882 insertions, 472 deletions
diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h
index a6e3d16a5f5..3996e109b2c 100644
--- a/source/blender/makesrna/RNA_access.h
+++ b/source/blender/makesrna/RNA_access.h
@@ -136,6 +136,7 @@ extern StructRNA RNA_CompositorNodeGamma;
extern StructRNA RNA_CompositorNodeGlare;
extern StructRNA RNA_CompositorNodeHueSat;
extern StructRNA RNA_CompositorNodeIDMask;
+extern StructRNA RNA_CompositorNodeDoubleEdgeMask;
extern StructRNA RNA_CompositorNodeImage;
extern StructRNA RNA_CompositorNodeInvert;
extern StructRNA RNA_CompositorNodeLensdist;
@@ -214,6 +215,7 @@ extern StructRNA RNA_ExplodeModifier;
extern StructRNA RNA_ExpressionController;
extern StructRNA RNA_FCurve;
extern StructRNA RNA_FCurveSample;
+extern StructRNA RNA_FFmpegSettings;
extern StructRNA RNA_FModifier;
extern StructRNA RNA_FModifierCycles;
extern StructRNA RNA_FModifierEnvelope;
@@ -428,6 +430,7 @@ extern StructRNA RNA_PropertyGroupItem;
extern StructRNA RNA_PropertySensor;
extern StructRNA RNA_PythonConstraint;
extern StructRNA RNA_PythonController;
+extern StructRNA RNA_QuickTimeSettings;
extern StructRNA RNA_RadarSensor;
extern StructRNA RNA_RandomSensor;
extern StructRNA RNA_RaySensor;
@@ -578,6 +581,8 @@ extern StructRNA RNA_ThemeNodeEditor;
extern StructRNA RNA_ThemeOutliner;
extern StructRNA RNA_ThemeProperties;
extern StructRNA RNA_ThemeSequenceEditor;
+extern StructRNA RNA_ThemeSpaceGeneric;
+extern StructRNA RNA_ThemeSpaceListGeneric;
extern StructRNA RNA_ThemeStyle;
extern StructRNA RNA_ThemeTextEditor;
extern StructRNA RNA_ThemeTimeline;
@@ -967,7 +972,8 @@ void RNA_collection_clear(PointerRNA *ptr, const char *name);
}
/* check if the idproperty exists, for operators */
-int RNA_property_is_set(PointerRNA *ptr, const char *name);
+int RNA_property_is_set(PointerRNA *ptr, PropertyRNA *prop);
+int RNA_struct_property_is_set(PointerRNA *ptr, const char *identifier);
int RNA_property_is_idprop(PropertyRNA *prop);
/* python compatible string representation of this property, (must be freed!) */
@@ -1029,7 +1035,7 @@ StructRNA *ID_code_to_RNA_type(short idcode);
/* macro which inserts the function name */
-#ifdef __GNUC__
+#if defined __GNUC__ || defined __sun
# define RNA_warning(format, args...) _RNA_warning("%s: " format "\n", __func__, ##args)
#else
# define RNA_warning(format, ...) _RNA_warning("%s: " format "\n", __FUNCTION__, __VA_ARGS__)
diff --git a/source/blender/makesrna/SConscript b/source/blender/makesrna/SConscript
index 72c2f9a1caf..2df5d29fcae 100644
--- a/source/blender/makesrna/SConscript
+++ b/source/blender/makesrna/SConscript
@@ -8,7 +8,7 @@ objs += o
incs = '#/intern/guardedalloc #/intern/memutil #/intern/audaspace/intern ../blenkernel ../blenlib ../makesdna intern .'
incs += ' ../windowmanager ../editors/include ../gpu ../imbuf ../ikplugin ../blenfont ../blenloader'
-incs += ' ../render/extern/include'
+incs += ' ../render/extern/include #/intern/cycles/blender'
incs += ' ../nodes'
incs += ' #/extern/glew/include'
incs += ' ../freestyle'
@@ -37,9 +37,6 @@ if env['WITH_BF_FFMPEG']:
defs.append('WITH_FFMPEG')
incs += ' ' + env['BF_FFMPEG_INC']
-if env['WITH_BF_OGG']:
- defs.append('WITH_OGG')
-
if env['WITH_BF_QUICKTIME']:
defs.append('WITH_QUICKTIME')
incs += ' ../quicktime'
@@ -59,6 +56,9 @@ if env['WITH_BF_COLLADA']:
if env['WITH_BF_OCEANSIM']:
defs.append('WITH_OCEANSIM')
+if env['WITH_BF_CYCLES']:
+ defs.append('WITH_CYCLES')
+
if env['OURPLATFORM'] == 'linux':
cflags='-pthread'
incs += ' ../../../extern/binreloc/include'
diff --git a/source/blender/makesrna/intern/CMakeLists.txt b/source/blender/makesrna/intern/CMakeLists.txt
index 24db4e80c2b..4aa90bf93ea 100644
--- a/source/blender/makesrna/intern/CMakeLists.txt
+++ b/source/blender/makesrna/intern/CMakeLists.txt
@@ -144,6 +144,9 @@ set(INC_SYS
)
+if(WITH_CYCLES)
+ add_definitions(-DWITH_CYCLES)
+endif()
if(WITH_PYTHON)
add_definitions(-DWITH_PYTHON)
@@ -248,6 +251,7 @@ blender_include_dirs(
../../render/extern/include
../../freestyle
../../../../intern/audaspace/intern
+ ../../../../intern/cycles/blender
../../../../intern/guardedalloc
../../../../intern/memutil
)
diff --git a/source/blender/makesrna/intern/SConscript b/source/blender/makesrna/intern/SConscript
index d710dd06a17..b74972b204c 100644
--- a/source/blender/makesrna/intern/SConscript
+++ b/source/blender/makesrna/intern/SConscript
@@ -33,7 +33,7 @@ incs = '#/intern/guardedalloc ../../blenlib ../../blenkernel ../../blenloader'
incs += ' ../../imbuf ../../makesdna ../../makesrna ../../ikplugin'
incs += ' ../../windowmanager ../../editors/include ../../blenfont'
incs += ' ../../render/extern/include'
-incs += ' #/intern/audaspace/intern '
+incs += ' #/intern/audaspace/intern #/intern/cycles/blender'
incs += ' #/extern/glew/include '
if env['WITH_BF_OPENEXR']:
@@ -60,9 +60,6 @@ if env['WITH_BF_FFMPEG']:
defs.append('WITH_FFMPEG')
incs += ' ' + env['BF_FFMPEG_INC']
-if env['WITH_BF_OGG']:
- defs.append('WITH_OGG')
-
if env['WITH_BF_QUICKTIME']:
defs.append('WITH_QUICKTIME')
incs += ' ../../quicktime'
@@ -91,6 +88,9 @@ if env['WITH_BF_PYTHON']:
if env['WITH_BF_COLLADA']:
defs.append('WITH_COLLADA')
+if env['WITH_BF_CYCLES']:
+ defs.append('WITH_CYCLES')
+
if env['OURPLATFORM'] == 'linux':
cflags='-pthread'
incs += ' ../../../extern/binreloc/include'
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index c50e233c43f..4eebfc52920 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -226,6 +226,12 @@ void RNA_pointer_recast(PointerRNA *ptr, PointerRNA *r_ptr)
/* ID Properties */
+static void rna_idproperty_touch(IDProperty *idprop)
+{
+ /* so the property is seen as 'set' by rna */
+ idprop->flag &= ~IDP_FLAG_GHOST;
+}
+
/* return a UI local ID prop definition for this prop */
IDProperty *rna_idproperty_ui(PropertyRNA *prop)
{
@@ -1621,8 +1627,10 @@ void RNA_property_boolean_set(PointerRNA *ptr, PropertyRNA *prop, int value)
/* just incase other values are passed */
if(value) value= 1;
- if((idprop=rna_idproperty_check(&prop, ptr)))
+ if((idprop=rna_idproperty_check(&prop, ptr))) {
IDP_Int(idprop)= value;
+ rna_idproperty_touch(idprop);
+ }
else if(bprop->set)
bprop->set(ptr, value);
else if(prop->flag & PROP_EDITABLE) {
@@ -1698,6 +1706,8 @@ void RNA_property_boolean_set_array(PointerRNA *ptr, PropertyRNA *prop, const in
IDP_Int(idprop)= values[0];
else
memcpy(IDP_Array(idprop), values, sizeof(int)*idprop->len);
+
+ rna_idproperty_touch(idprop);
}
else if(prop->arraydimension == 0)
RNA_property_boolean_set(ptr, prop, values[0]);
@@ -1818,8 +1828,10 @@ void RNA_property_int_set(PointerRNA *ptr, PropertyRNA *prop, int value)
/* useful to check on bad values but set function should clamp */
/* BLI_assert(RNA_property_int_clamp(ptr, prop, &value) == 0); */
- if((idprop=rna_idproperty_check(&prop, ptr)))
+ if((idprop=rna_idproperty_check(&prop, ptr))) {
IDP_Int(idprop)= value;
+ rna_idproperty_touch(idprop);
+ }
else if(iprop->set)
iprop->set(ptr, value);
else if(prop->flag & PROP_EDITABLE) {
@@ -1931,7 +1943,9 @@ void RNA_property_int_set_array(PointerRNA *ptr, PropertyRNA *prop, const int *v
if(prop->arraydimension == 0)
IDP_Int(idprop)= values[0];
else
- memcpy(IDP_Array(idprop), values, sizeof(int)*idprop->len);\
+ memcpy(IDP_Array(idprop), values, sizeof(int)*idprop->len);
+
+ rna_idproperty_touch(idprop);
}
else if(prop->arraydimension == 0)
RNA_property_int_set(ptr, prop, values[0]);
@@ -2054,6 +2068,8 @@ void RNA_property_float_set(PointerRNA *ptr, PropertyRNA *prop, float value)
IDP_Float(idprop)= value;
else
IDP_Double(idprop)= value;
+
+ rna_idproperty_touch(idprop);
}
else if(fprop->set) {
fprop->set(ptr, value);
@@ -2185,6 +2201,8 @@ void RNA_property_float_set_array(PointerRNA *ptr, PropertyRNA *prop, const floa
for(i=0; i<idprop->len; i++)
((double*)IDP_Array(idprop))[i]= values[i];
}
+
+ rna_idproperty_touch(idprop);
}
else if(prop->arraydimension == 0)
RNA_property_float_set(ptr, prop, values[0]);
@@ -2372,9 +2390,11 @@ void RNA_property_string_set(PointerRNA *ptr, PropertyRNA *prop, const char *val
BLI_assert(RNA_property_type(prop) == PROP_STRING);
- if((idprop=rna_idproperty_check(&prop, ptr)))
+ if((idprop=rna_idproperty_check(&prop, ptr))) {
/* both IDP_STRING_SUB_BYTE / IDP_STRING_SUB_UTF8 */
IDP_AssignString(idprop, value, RNA_property_string_maxlength(prop) - 1);
+ rna_idproperty_touch(idprop);
+ }
else if(sprop->set)
sprop->set(ptr, value); /* set function needs to clamp its self */
else if(prop->flag & PROP_EDITABLE) {
@@ -2446,8 +2466,10 @@ void RNA_property_enum_set(PointerRNA *ptr, PropertyRNA *prop, int value)
BLI_assert(RNA_property_type(prop) == PROP_ENUM);
- if((idprop=rna_idproperty_check(&prop, ptr)))
+ if((idprop=rna_idproperty_check(&prop, ptr))) {
IDP_Int(idprop)= value;
+ rna_idproperty_touch(idprop);
+ }
else if(eprop->set) {
eprop->set(ptr, value);
}
@@ -2516,6 +2538,7 @@ void RNA_property_pointer_set(PointerRNA *ptr, PropertyRNA *prop, PointerRNA ptr
if((/*idprop=*/ rna_idproperty_check(&prop, ptr))) {
/* not supported */
+ /* rna_idproperty_touch(idprop); */
}
else {
PointerPropertyRNA *pprop= (PointerPropertyRNA*)prop;
@@ -4412,15 +4435,23 @@ int RNA_collection_length(PointerRNA *ptr, const char *name)
}
}
-int RNA_property_is_set(PointerRNA *ptr, const char *name)
+int RNA_property_is_set(PointerRNA *ptr, PropertyRNA *prop)
{
- PropertyRNA *prop= RNA_struct_find_property(ptr, name);
+ if(prop->flag & PROP_IDPROPERTY) {
+ IDProperty *idprop = rna_idproperty_find(ptr, prop->identifier);
+ return ((idprop != NULL) && !(idprop->flag & IDP_FLAG_GHOST));
+ }
+ else {
+ return 1;
+ }
+}
+
+int RNA_struct_property_is_set(PointerRNA *ptr, const char *identifier)
+{
+ PropertyRNA *prop= RNA_struct_find_property(ptr, identifier);
if(prop) {
- if(prop->flag & PROP_IDPROPERTY)
- return (rna_idproperty_find(ptr, name) != NULL);
- else
- return 1;
+ return RNA_property_is_set(ptr, prop);
}
else {
/* python raises an error */
diff --git a/source/blender/makesrna/intern/rna_actuator.c b/source/blender/makesrna/intern/rna_actuator.c
index 612c34d1c92..6098e885df5 100644
--- a/source/blender/makesrna/intern/rna_actuator.c
+++ b/source/blender/makesrna/intern/rna_actuator.c
@@ -867,8 +867,10 @@ static void rna_def_camera_actuator(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem prop_axis_items[] ={
- {ACT_CAMERA_X, "X", 0, "X", "Camera tries to get behind the X axis"},
- {ACT_CAMERA_Y, "Y", 0, "Y", "Camera tries to get behind the Y axis"},
+ {OB_POSX, "POS_X", 0, "+X", "Camera tries to get behind the X axis"},
+ {OB_POSY, "POS_Y", 0, "+Y", "Camera tries to get behind the Y axis"},
+ {OB_NEGX, "NEG_X", 0, "-X", "Camera tries to get behind the -X axis"},
+ {OB_NEGY, "NEG_Y", 0, "-Y", "Camera tries to get behind the -Y axis"},
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "CameraActuator", "Actuator");
@@ -905,7 +907,7 @@ static void rna_def_camera_actuator(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Damping", "Strength of the constraint that drives the camera behind the target");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- /* x/y */
+ /* +x/+y/-x/-y */
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);
diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c
index 4fb672fd203..c1f87240e77 100644
--- a/source/blender/makesrna/intern/rna_brush.c
+++ b/source/blender/makesrna/intern/rna_brush.c
@@ -69,13 +69,13 @@ EnumPropertyItem brush_sculpt_tool_items[] = {
EnumPropertyItem brush_vertex_tool_items[] = {
- {0, "MIX", ICON_BRUSH_MIX, "Mix", "Use mix blending mode while painting"},
- {1, "ADD", ICON_BRUSH_ADD, "Add", "Use add blending mode while painting"},
- {2, "SUB", ICON_BRUSH_SUBTRACT, "Subtract", "Use subtract blending mode while painting"},
- {3, "MUL", ICON_BRUSH_MULTIPLY, "Multiply", "Use multiply blending mode while painting"},
- {4, "BLUR", ICON_BRUSH_BLUR, "Blur", "Blur the color with surrounding values"},
- {5, "LIGHTEN", ICON_BRUSH_LIGHTEN, "Lighten", "Use lighten blending mode while painting"},
- {6, "DARKEN", ICON_BRUSH_DARKEN, "Darken", "Use darken blending mode while painting"},
+ {PAINT_BLEND_MIX, "MIX", ICON_BRUSH_MIX, "Mix", "Use mix blending mode while painting"},
+ {PAINT_BLEND_ADD, "ADD", ICON_BRUSH_ADD, "Add", "Use add blending mode while painting"},
+ {PAINT_BLEND_SUB, "SUB", ICON_BRUSH_SUBTRACT, "Subtract", "Use subtract blending mode while painting"},
+ {PAINT_BLEND_MUL, "MUL", ICON_BRUSH_MULTIPLY, "Multiply", "Use multiply blending mode while painting"},
+ {PAINT_BLEND_BLUR, "BLUR", ICON_BRUSH_BLUR, "Blur", "Blur the color with surrounding values"},
+ {PAINT_BLEND_LIGHTEN, "LIGHTEN", ICON_BRUSH_LIGHTEN, "Lighten", "Use lighten blending mode while painting"},
+ {PAINT_BLEND_DARKEN, "DARKEN", ICON_BRUSH_DARKEN, "Darken", "Use darken blending mode while painting"},
{0, NULL, 0, NULL, NULL}};
EnumPropertyItem brush_image_tool_items[] = {
@@ -164,96 +164,21 @@ static void rna_Brush_icon_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Poi
static void rna_Brush_set_size(PointerRNA *ptr, int value)
{
- Brush* me = (Brush*)(ptr->data);
+ Brush* brush = ptr->data;
- float size= (float)brush_size(me);
- float unprojected_radius;
-
- // paranoia: previous checks should make sure we don't divide by zero
- assert(size != 0);
-
- // set unprojected radius, so it remains consistent with size
- unprojected_radius= (float)(brush_unprojected_radius(me) * value / size);
- brush_set_unprojected_radius(me, unprojected_radius);
-
- brush_set_size(me, value);
-}
-
-static int rna_Brush_get_size(PointerRNA *ptr)
-{
- Brush* me = (Brush*)(ptr->data);
- return brush_size(me);
-}
-
-static void rna_Brush_set_use_locked_size(PointerRNA *ptr, int value)
-{
- Brush* me = (Brush*)(ptr->data);
- brush_set_use_locked_size(me, value);
-}
-
-static int rna_Brush_get_use_locked_size(PointerRNA *ptr)
-{
- Brush* me = (Brush*)(ptr->data);
- return brush_use_locked_size(me);
-}
-
-static void rna_Brush_set_use_size_pressure(PointerRNA *ptr, int value)
-{
- Brush* me = (Brush*)(ptr->data);
- brush_set_use_size_pressure(me, value);
-}
-
-static int rna_Brush_get_use_size_pressure(PointerRNA *ptr)
-{
- Brush* me = (Brush*)(ptr->data);
- return brush_use_size_pressure(me);
-}
-
-static void rna_Brush_set_use_alpha_pressure(PointerRNA *ptr, int value)
-{
- Brush* me = (Brush*)(ptr->data);
- brush_set_use_alpha_pressure(me, value);
-}
-
-static int rna_Brush_get_use_alpha_pressure(PointerRNA *ptr)
-{
- Brush* me = (Brush*)(ptr->data);
- return brush_use_alpha_pressure(me);
+ /* scale unprojected radius so it stays consistent with brush size */
+ brush_scale_unprojected_radius(&brush->unprojected_radius,
+ value, brush->size);
+ brush->size= value;
}
static void rna_Brush_set_unprojected_radius(PointerRNA *ptr, float value)
{
- Brush* me = (Brush*)(ptr->data);
-
- float unprojected_radius= brush_unprojected_radius(me);
- int size;
-
- // paranoia: previous checks should make sure we don't divide by zero
- assert(unprojected_radius != 0.0f);
-
- // set size, so that it is consistent with unprojected_radius
- size= (int)((float)brush_size(me) * value / unprojected_radius);
- brush_set_size(me, size);
-
- brush_set_unprojected_radius(me, value);
-}
-
-static float rna_Brush_get_unprojected_radius(PointerRNA *ptr)
-{
- Brush* me = (Brush*)(ptr->data);
- return brush_unprojected_radius(me);
-}
+ Brush* brush = ptr->data;
-static void rna_Brush_set_alpha(PointerRNA *ptr, float value)
-{
- Brush* me = (Brush*)(ptr->data);
- brush_set_alpha(me, value);
-}
-
-static float rna_Brush_get_alpha(PointerRNA *ptr)
-{
- Brush* me = (Brush*)(ptr->data);
- return brush_alpha(me);
+ /* scale brush size so it stays consistent with unprojected_radius */
+ brush_scale_size(&brush->size, value, brush->unprojected_radius);
+ brush->unprojected_radius= value;
}
static EnumPropertyItem *rna_Brush_direction_itemf(bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), int *UNUSED(free))
@@ -448,14 +373,14 @@ static void rna_def_brush(BlenderRNA *brna)
/* number values */
prop= RNA_def_property(srna, "size", PROP_INT, PROP_DISTANCE);
- RNA_def_property_int_funcs(prop, "rna_Brush_get_size", "rna_Brush_set_size", NULL);
+ RNA_def_property_int_funcs(prop, NULL, "rna_Brush_set_size", NULL);
RNA_def_property_range(prop, 1, MAX_BRUSH_PIXEL_RADIUS*10);
RNA_def_property_ui_range(prop, 1, MAX_BRUSH_PIXEL_RADIUS, 1, 0);
RNA_def_property_ui_text(prop, "Radius", "Radius of the brush in pixels");
RNA_def_property_update(prop, 0, "rna_Brush_update");
prop= RNA_def_property(srna, "unprojected_radius", PROP_FLOAT, PROP_DISTANCE);
- RNA_def_property_float_funcs(prop, "rna_Brush_get_unprojected_radius", "rna_Brush_set_unprojected_radius", NULL);
+ RNA_def_property_float_funcs(prop, NULL, "rna_Brush_set_unprojected_radius", NULL);
RNA_def_property_range(prop, 0.001, FLT_MAX);
RNA_def_property_ui_range(prop, 0.001, 1, 0, 0);
RNA_def_property_ui_text(prop, "Unprojected Radius", "Radius of brush in Blender units");
@@ -499,7 +424,6 @@ static void rna_def_brush(BlenderRNA *brna)
prop= RNA_def_property(srna, "strength", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "alpha");
- RNA_def_property_float_funcs(prop, "rna_Brush_get_alpha", "rna_Brush_set_alpha", NULL);
RNA_def_property_float_default(prop, 0.5f);
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.001, 0.001);
@@ -575,7 +499,6 @@ static void rna_def_brush(BlenderRNA *brna)
prop= RNA_def_property(srna, "use_pressure_strength", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_ALPHA_PRESSURE);
- RNA_def_property_boolean_funcs(prop, "rna_Brush_get_use_alpha_pressure", "rna_Brush_set_use_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_update(prop, 0, "rna_Brush_update");
@@ -588,7 +511,6 @@ static void rna_def_brush(BlenderRNA *brna)
prop= RNA_def_property(srna, "use_pressure_size", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_SIZE_PRESSURE);
- RNA_def_property_boolean_funcs(prop, "rna_Brush_get_use_size_pressure", "rna_Brush_set_use_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_update(prop, 0, "rna_Brush_update");
@@ -668,7 +590,6 @@ static void rna_def_brush(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_Brush_update");
prop= RNA_def_property(srna, "use_locked_size", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_funcs(prop, "rna_Brush_get_use_locked_size", "rna_Brush_set_use_locked_size");
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_LOCK_SIZE);
RNA_def_property_ui_text(prop, "Use Blender Units", "When locked brush stays same size relative to object; when unlocked brush size is given in pixels");
RNA_def_property_update(prop, 0, "rna_Brush_update");
diff --git a/source/blender/makesrna/intern/rna_image.c b/source/blender/makesrna/intern/rna_image.c
index 9e7f4a349e7..7059c001283 100644
--- a/source/blender/makesrna/intern/rna_image.c
+++ b/source/blender/makesrna/intern/rna_image.c
@@ -107,6 +107,15 @@ static void rna_Image_fields_update(Main *UNUSED(bmain), Scene *UNUSED(scene), P
BKE_image_release_ibuf(ima, lock);
}
+static void rna_Image_free_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
+{
+ Image *ima= ptr->id.data;
+ BKE_image_signal(ima, NULL, IMA_SIGNAL_FREE);
+ WM_main_add_notifier(NC_IMAGE|NA_EDITED, &ima->id);
+ DAG_id_tag_update(&ima->id, 0);
+}
+
+
static void rna_Image_reload_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
Image *ima= ptr->id.data;
@@ -476,12 +485,12 @@ static void rna_def_image(BlenderRNA *brna)
prop= RNA_def_property(srna, "use_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, "rna_Image_reload_update");
+ RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, "rna_Image_free_update");
prop= RNA_def_property(srna, "use_color_unpremultiply", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", IMA_CM_PREDIVIDE);
RNA_def_property_ui_text(prop, "Color Unpremultiply", "For premultiplied alpha images, do color space conversion on colors without alpha, to avoid fringing for images with light backgrounds");
- RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, "rna_Image_reload_update");
+ RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, "rna_Image_free_update");
prop= RNA_def_property(srna, "is_dirty", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_Image_dirty_get", NULL);
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index 3a7d453fa79..3f3ac6ce906 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -1969,7 +1969,7 @@ static void rna_def_modifier_explode(BlenderRNA *brna)
prop= RNA_def_property(srna, "particle_uv", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "uvname");
- RNA_def_property_string_maxlength(prop, 32);
+ RNA_def_property_string_maxlength(prop, MAX_CUSTOMDATA_LAYER_NAME);
RNA_def_property_ui_text(prop, "Particle UV", "UV map to change with particle age");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
}
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index c15758eed1f..a04ddec2098 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -369,6 +369,15 @@ static void rna_Node_update(Main *bmain, Scene *scene, PointerRNA *ptr)
node_update(bmain, scene, ntree, node);
}
+static void rna_Node_image_update(Main *bmain, Scene *scene, PointerRNA *ptr)
+{
+ bNodeTree *ntree= (bNodeTree*)ptr->id.data;
+ bNode *node= (bNode*)ptr->data;
+
+ node_update(bmain, scene, ntree, node);
+ WM_main_add_notifier(NC_IMAGE, NULL);
+}
+
static void rna_Node_material_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
bNodeTree *ntree= (bNodeTree*)ptr->id.data;
@@ -1268,7 +1277,7 @@ static void def_sh_tex_environment(StructRNA *srna)
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, NC_NODE|NA_EDITED, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_image_update");
RNA_def_struct_sdna_from(srna, "NodeTexImage", "storage");
def_sh_tex(srna);
@@ -1293,7 +1302,7 @@ static void def_sh_tex_image(StructRNA *srna)
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, NC_NODE|NA_EDITED, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_image_update");
RNA_def_struct_sdna_from(srna, "NodeTexImage", "storage");
def_sh_tex(srna);
@@ -1333,6 +1342,12 @@ static void def_sh_tex_noise(StructRNA *srna)
def_sh_tex(srna);
}
+static void def_sh_tex_checker(StructRNA *srna)
+{
+ RNA_def_struct_sdna_from(srna, "NodeTexChecker", "storage");
+ def_sh_tex(srna);
+}
+
static void def_sh_tex_magic(StructRNA *srna)
{
PropertyRNA *prop;
@@ -2119,6 +2134,35 @@ static void def_cmp_id_mask(StructRNA *srna)
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
}
+static void def_cmp_double_edge_mask(StructRNA * srna)
+{
+ PropertyRNA *prop;
+
+ static EnumPropertyItem BufEdgeMode_items[] = {
+ {0, "BLEED_OUT", 0, "Bleed Out", "Allow mask pixels to bleed along edges"},
+ {1, "KEEP_IN", 0, "Keep In", "Restrict mask pixels from touching edges"},
+ {0, NULL, 0, NULL, NULL}
+ };
+
+ static EnumPropertyItem InnerEdgeMode_items[] = {
+ {0, "ALL", 0, "All", "All pixels on inner mask edge are considered during mask calculation"},
+ {1, "ADJACENT_ONLY", 0, "Adjacent Only", "Only inner mask pixels adjacent to outer mask pixels are considered during mask calculation"},
+ {0, NULL, 0, NULL, NULL}
+ };
+
+ prop = RNA_def_property(srna, "inner_mode", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "custom2");
+ RNA_def_property_enum_items(prop, InnerEdgeMode_items);
+ RNA_def_property_ui_text(prop, "Inner Edge Mode", "");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
+
+ prop = RNA_def_property(srna, "edge_mode", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "custom1");
+ RNA_def_property_enum_items(prop, BufEdgeMode_items);
+ RNA_def_property_ui_text(prop, "Buffer Edge Mode", "");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
+}
+
static void def_cmp_map_uv(StructRNA *srna)
{
PropertyRNA *prop;
@@ -3199,7 +3243,7 @@ static void rna_def_group_sockets_api(BlenderRNA *brna, PropertyRNA *cprop, int
func= RNA_def_function(srna, "new", (in_out==SOCK_IN ? "rna_NodeTree_input_new" : "rna_NodeTree_output_new"));
RNA_def_function_ui_description(func, "Add a socket to the group tree");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- RNA_def_string(func, "name", "Socket", 32, "Name", "Name of the socket");
+ RNA_def_string(func, "name", "Socket", MAX_NAME, "Name", "Name of the socket");
RNA_def_enum(func, "type", node_socket_type_items, SOCK_FLOAT, "Type", "Type of socket");
/* return value */
parm= RNA_def_pointer(func, "socket", "NodeSocket", "", "New socket");
@@ -3369,4 +3413,3 @@ void RNA_def_nodetree(BlenderRNA *brna)
#undef NODE_DEFINE_SUBTYPES
#endif
-
diff --git a/source/blender/makesrna/intern/rna_nodetree_types.h b/source/blender/makesrna/intern/rna_nodetree_types.h
index 19082ea4689..5ab907c87dc 100644
--- a/source/blender/makesrna/intern/rna_nodetree_types.h
+++ b/source/blender/makesrna/intern/rna_nodetree_types.h
@@ -85,6 +85,7 @@ DefNode( ShaderNode, SH_NODE_TEX_MAGIC, def_sh_tex_magic, "TE
DefNode( ShaderNode, SH_NODE_TEX_WAVE, def_sh_tex_wave, "TEX_WAVE", TexWave, "Wave Texture", "" )
DefNode( ShaderNode, SH_NODE_TEX_MUSGRAVE, def_sh_tex_musgrave, "TEX_MUSGRAVE", TexMusgrave, "Musgrave Texture", "" )
DefNode( ShaderNode, SH_NODE_TEX_VORONOI, def_sh_tex_voronoi, "TEX_VORONOI", TexVoronoi, "Voronoi Texture", "" )
+DefNode( ShaderNode, SH_NODE_TEX_CHECKER, def_sh_tex_checker, "TEX_CHECKER", TexChecker, "Checker Texture", "" )
DefNode( ShaderNode, SH_NODE_TEX_COORD, 0, "TEX_COORD", TexCoord, "Texture Coordinate","")
DefNode( CompositorNode, CMP_NODE_VIEWER, 0, "VIEWER", Viewer, "Viewer", "" )
@@ -129,6 +130,7 @@ DefNode( CompositorNode, CMP_NODE_FLIP, def_cmp_flip, "FLIP"
DefNode( CompositorNode, CMP_NODE_SPLITVIEWER, def_cmp_splitviewer, "SPLITVIEWER", SplitViewer, "Split Viewer", "" )
DefNode( CompositorNode, CMP_NODE_MAP_UV, def_cmp_map_uv, "MAP_UV", MapUV, "Map UV", "" )
DefNode( CompositorNode, CMP_NODE_ID_MASK, def_cmp_id_mask, "ID_MASK", IDMask, "ID Mask", "" )
+DefNode( CompositorNode, CMP_NODE_DOUBLEEDGEMASK, def_cmp_double_edge_mask,"DOUBLEEDGEMASK", DoubleEdgeMask, "Double Edge Mask", "" )
DefNode( CompositorNode, CMP_NODE_DEFOCUS, def_cmp_defocus, "DEFOCUS", Defocus, "Defocus", "" )
DefNode( CompositorNode, CMP_NODE_DISPLACE, 0, "DISPLACE", Displace, "Displace", "" )
DefNode( CompositorNode, CMP_NODE_COMBHSVA, 0, "COMBHSVA", CombHSVA, "Combine HSVA", "" )
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index f9bb0b36a3f..3ec01e56ab3 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -2447,15 +2447,20 @@ static void rna_def_dupli_object(BlenderRNA *brna)
prop= RNA_def_property(srna, "matrix_original", PROP_FLOAT, PROP_MATRIX);
RNA_def_property_float_sdna(prop, NULL, "omat");
RNA_def_property_multi_array(prop, 2, rna_matrix_dimsize_4x4);
- RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
+ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE|PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Object Matrix", "The original matrix of this object before it was duplicated");
prop= RNA_def_property(srna, "matrix", PROP_FLOAT, PROP_MATRIX);
RNA_def_property_float_sdna(prop, NULL, "mat");
RNA_def_property_multi_array(prop, 2, rna_matrix_dimsize_4x4);
- RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
+ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE|PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Object Duplicate Matrix", "Object duplicate transformation matrix");
+ prop= RNA_def_property(srna, "hide", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "no_draw", 0);
+ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE|PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Hide", "Don't show dupli object in viewport or render");
+
/* TODO: DupliObject has more properties that can be wrapped */
}
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 0d7a7195b44..e8b6e9e05d3 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -24,7 +24,6 @@
* \ingroup RNA
*/
-
#include <stdlib.h>
#include "RNA_define.h"
@@ -32,6 +31,7 @@
#include "rna_internal.h"
+#include "DNA_brush_types.h"
#include "DNA_group_types.h"
#include "DNA_modifier_types.h"
#include "DNA_particle_types.h"
@@ -137,7 +137,7 @@ EnumPropertyItem snap_element_items[] = {
#endif
#ifdef WITH_OPENEXR
-# define R_IMF_ENUM_EXR_MULTI {R_IMF_IMTYPE_MULTILAYER, "MULTILAYER", ICON_FILE_IMAGE, "MultiLayer", "Output image in multilayer OpenEXR format"},
+# define R_IMF_ENUM_EXR_MULTI {R_IMF_IMTYPE_MULTILAYER, "OPEN_EXR_MULTILAYER", ICON_FILE_IMAGE, "OpenEXR MultiLayer", "Output image in multilayer OpenEXR format"},
# define R_IMF_ENUM_EXR {R_IMF_IMTYPE_OPENEXR, "OPEN_EXR", ICON_FILE_IMAGE, "OpenEXR", "Output image in OpenEXR format"},
#else
# define R_IMF_ENUM_EXR_MULTI
@@ -245,6 +245,7 @@ EnumPropertyItem image_color_depth_items[] = {
#include "BLI_threads.h"
#include "BLI_editVert.h"
+#include "BKE_brush.h"
#include "BKE_context.h"
#include "BKE_global.h"
#include "BKE_image.h"
@@ -871,6 +872,20 @@ static EnumPropertyItem *rna_RenderSettings_qtcodecsettings_audiocodecType_itemf
#endif
#endif
+static void rna_FFmpegSettings_lossless_output_set(PointerRNA *ptr, int value)
+{
+ Scene *scene = (Scene *) ptr->id.data;
+ RenderData *rd = &scene->r;
+
+ if (value)
+ rd->ffcodecdata.flags |= FFMPEG_LOSSLESS_OUTPUT;
+ else
+ rd->ffcodecdata.flags &= ~FFMPEG_LOSSLESS_OUTPUT;
+#ifdef WITH_FFMPEG
+ ffmpeg_verify_lossless_format(rd, &rd->im_format);
+#endif
+}
+
static int rna_RenderSettings_active_layer_index_get(PointerRNA *ptr)
{
RenderData *rd= (RenderData*)ptr->data;
@@ -1002,7 +1017,7 @@ static void rna_RenderSettings_color_management_update(Main *bmain, Scene *UNUSE
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);
+ BKE_image_signal((Image *)node->id, NULL, IMA_SIGNAL_FREE);
}
}
}
@@ -1277,7 +1292,24 @@ static KeyingSet *rna_Scene_keying_set_new(Scene *sce, ReportList *reports, cons
}
}
+static void rna_UnifiedPaintSettings_size_set(PointerRNA *ptr, int value)
+{
+ UnifiedPaintSettings* ups = ptr->data;
+
+ /* scale unprojected radius so it stays consistent with brush size */
+ brush_scale_unprojected_radius(&ups->unprojected_radius,
+ value, ups->size);
+ ups->size= value;
+}
+static void rna_UnifiedPaintSettings_unprojected_radius_set(PointerRNA *ptr, float value)
+{
+ UnifiedPaintSettings* ups = ptr->data;
+
+ /* scale brush size so it stays consistent with unprojected_radius */
+ brush_scale_size(&ups->size, value, ups->unprojected_radius);
+ ups->unprojected_radius= value;
+}
/* note: without this, when Multi-Paint is activated/deactivated, the colors
* will not change right away when multiple bones are selected, this function
@@ -1660,20 +1692,68 @@ static void rna_def_tool_settings(BlenderRNA *brna)
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);
- /* Sculpt/Paint Unified Size and Strength */
+ /* Unified Paint Settings */
+ prop= RNA_def_property(srna, "unified_paint_settings", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
+ RNA_def_property_struct_type(prop, "UnifiedPaintSettings");
+ RNA_def_property_ui_text(prop, "Unified Paint Settings", NULL);
+}
- prop= RNA_def_property(srna, "sculpt_paint_use_unified_size", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "sculpt_paint_settings", SCULPT_PAINT_USE_UNIFIED_SIZE);
- RNA_def_property_ui_text(prop, "Sculpt/Paint Use Unified Radius",
- "Instead of per brush radius, the radius is shared across brushes");
+static void rna_def_unified_paint_settings(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
- prop= RNA_def_property(srna, "sculpt_paint_use_unified_strength", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "sculpt_paint_settings", SCULPT_PAINT_USE_UNIFIED_ALPHA);
- RNA_def_property_ui_text(prop, "Sculpt/Paint Use Unified Strength",
- "Instead of per brush strength, the strength is shared across brushes");
+ srna= RNA_def_struct(brna, "UnifiedPaintSettings", NULL);
+ RNA_def_struct_ui_text(srna, "Unified Paint Settings", "Overrides for some of the active brush's settings");
+
+ /* high-level flags to enable or disable unified paint settings */
+ prop= RNA_def_property(srna, "use_unified_size", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", UNIFIED_PAINT_SIZE);
+ RNA_def_property_ui_text(prop, "Use Unified Radius",
+ "Instead of per-brush radius, the radius is shared across brushes");
+
+ prop= RNA_def_property(srna, "use_unified_strength", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", UNIFIED_PAINT_ALPHA);
+ RNA_def_property_ui_text(prop, "Use Unified Strength",
+ "Instead of per-brush strength, the strength is shared across brushes");
+
+ /* unified paint settings that override the equivalent settings
+ from the active brush */
+ prop= RNA_def_property(srna, "size", PROP_INT, PROP_DISTANCE);
+ RNA_def_property_int_funcs(prop, NULL, "rna_UnifiedPaintSettings_size_set", NULL);
+ RNA_def_property_range(prop, 1, MAX_BRUSH_PIXEL_RADIUS*10);
+ RNA_def_property_ui_range(prop, 1, MAX_BRUSH_PIXEL_RADIUS, 1, 0);
+ RNA_def_property_ui_text(prop, "Radius", "Radius of the brush in pixels");
+
+ prop= RNA_def_property(srna, "unprojected_radius", PROP_FLOAT, PROP_DISTANCE);
+ RNA_def_property_float_funcs(prop, NULL, "rna_UnifiedPaintSettings_unprojected_radius_set", NULL);
+ RNA_def_property_range(prop, 0.001, FLT_MAX);
+ RNA_def_property_ui_range(prop, 0.001, 1, 0, 0);
+ RNA_def_property_ui_text(prop, "Unprojected Radius", "Radius of brush in Blender units");
+
+ prop= RNA_def_property(srna, "strength", PROP_FLOAT, PROP_FACTOR);
+ RNA_def_property_float_sdna(prop, NULL, "alpha");
+ RNA_def_property_float_default(prop, 0.5f);
+ RNA_def_property_range(prop, 0.0f, 10.0f);
+ RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.001, 0.001);
+ RNA_def_property_ui_text(prop, "Strength", "How powerful the effect of the brush is when applied");
+
+ prop= RNA_def_property(srna, "use_pressure_size", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", UNIFIED_PAINT_BRUSH_SIZE_PRESSURE);
+ RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0);
+ RNA_def_property_ui_text(prop, "Size Pressure", "Enable tablet pressure sensitivity for size");
+
+ prop= RNA_def_property(srna, "use_pressure_strength", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", UNIFIED_PAINT_BRUSH_ALPHA_PRESSURE);
+ RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0);
+ RNA_def_property_ui_text(prop, "Strength Pressure", "Enable tablet pressure sensitivity for strength");
+
+ prop= RNA_def_property(srna, "use_locked_size", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", UNIFIED_PAINT_BRUSH_LOCK_SIZE);
+ RNA_def_property_ui_text(prop, "Use Blender Units", "When locked brush stays same size relative to object; when unlocked brush size is given in pixels");
}
-
static void rna_def_unit_settings(BlenderRNA *brna)
{
StructRNA *srna;
@@ -2463,6 +2543,14 @@ static void rna_def_scene_game_data(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
+ static EnumPropertyItem aasamples_items[] ={
+ {0, "SAMPLES_0", 0, "Off", ""},
+ {2, "SAMPLES_2", 0, "2x", ""},
+ {4, "SAMPLES_4", 0, "4x", ""},
+ {8, "SAMPLES_8", 0, "8x", ""},
+ {16, "SAMPLES_16", 0, "16x", ""},
+ {0, NULL, 0, NULL, NULL}};
+
static EnumPropertyItem framing_types_items[] ={
{SCE_GAMEFRAMING_BARS, "LETTERBOX", 0, "Letterbox",
"Show the entire viewport in the display window, using bar horizontally or vertically"},
@@ -2532,6 +2620,11 @@ static void rna_def_scene_game_data(BlenderRNA *brna)
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, "samples", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "aasamples");
+ RNA_def_property_enum_items(prop, aasamples_items);
+ RNA_def_property_ui_text(prop, "AA Samples", "The number of AA Samples to use for MSAA");
+
prop= RNA_def_property(srna, "depth", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "depth");
RNA_def_property_range(prop, 8, 32);
@@ -2553,10 +2646,15 @@ static void rna_def_scene_game_data(BlenderRNA *brna)
RNA_def_property_update(prop, NC_SCENE, NULL);
prop= RNA_def_property(srna, "show_fullscreen", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "fullscreen", 1.0);
+ RNA_def_property_boolean_sdna(prop, NULL, "playerflag", GAME_PLAYER_FULLSCREEN);
RNA_def_property_ui_text(prop, "Fullscreen", "Start player in a new fullscreen display");
RNA_def_property_update(prop, NC_SCENE, NULL);
+ prop= RNA_def_property(srna, "use_desktop", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "playerflag", GAME_PLAYER_DESKTOP_RESOLUTION);
+ RNA_def_property_ui_text(prop, "Desktop", "Uses the current desktop resultion in fullscreen mode");
+ RNA_def_property_update(prop, NC_SCENE, NULL);
+
/* Framing */
prop= RNA_def_property(srna, "frame_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "framing.type");
@@ -3016,6 +3114,269 @@ static void rna_def_scene_image_format_data(BlenderRNA *brna)
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
}
+static void rna_def_scene_ffmpeg_settings(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+#ifdef WITH_FFMPEG
+ static EnumPropertyItem ffmpeg_format_items[] = {
+ {FFMPEG_MPEG1, "MPEG1", 0, "MPEG-1", ""},
+ {FFMPEG_MPEG2, "MPEG2", 0, "MPEG-2", ""},
+ {FFMPEG_MPEG4, "MPEG4", 0, "MPEG-4", ""},
+ {FFMPEG_AVI, "AVI", 0, "AVI", ""},
+ {FFMPEG_MOV, "QUICKTIME", 0, "Quicktime", ""},
+ {FFMPEG_DV, "DV", 0, "DV", ""},
+ {FFMPEG_H264, "H264", 0, "H.264", ""},
+ {FFMPEG_XVID, "XVID", 0, "Xvid", ""},
+ {FFMPEG_OGG, "OGG", 0, "Ogg", ""},
+ {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)", ""},
+ {CODEC_ID_HUFFYUV, "HUFFYUV", 0, "HuffYUV", ""},
+ {CODEC_ID_DVVIDEO, "DV", 0, "DV", ""},
+ {CODEC_ID_H264, "H264", 0, "H.264", ""},
+ {CODEC_ID_THEORA, "THEORA", 0, "Theora", ""},
+ {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
+
+ 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"},
+ {0, NULL, 0, NULL, NULL}};
+
+ srna = RNA_def_struct(brna, "FFmpegSettings", NULL);
+ RNA_def_struct_sdna(srna, "FFMpegCodecData");
+ RNA_def_struct_ui_text(srna, "FFmpeg Settings", "FFmpeg related settings for the scene");
+
+#ifdef WITH_FFMPEG
+ prop = RNA_def_property(srna, "format", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_bitflag_sdna(prop, NULL, "type");
+ RNA_def_property_enum_items(prop, ffmpeg_format_items);
+ RNA_def_property_ui_text(prop, "Format", "Output file format");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop = RNA_def_property(srna, "codec", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_bitflag_sdna(prop, NULL, "codec");
+ RNA_def_property_enum_items(prop, ffmpeg_codec_items);
+ RNA_def_property_ui_text(prop, "Codec", "FFmpeg codec to use");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop = RNA_def_property(srna, "video_bitrate", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "video_bitrate");
+ RNA_def_property_range(prop, 1, 14000);
+ RNA_def_property_ui_text(prop, "Bitrate", "Video bitrate (kb/s)");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop = RNA_def_property(srna, "minrate", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "rc_min_rate");
+ RNA_def_property_range(prop, 0, 9000);
+ RNA_def_property_ui_text(prop, "Min Rate", "Rate control: min rate (kb/s)");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop = RNA_def_property(srna, "maxrate", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "rc_max_rate");
+ RNA_def_property_range(prop, 1, 14000);
+ RNA_def_property_ui_text(prop, "Max Rate", "Rate control: max rate (kb/s)");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "muxrate", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "mux_rate");
+ RNA_def_property_range(prop, 0, 100000000);
+ RNA_def_property_ui_text(prop, "Mux Rate", "Mux rate (bits/s(!))");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop = RNA_def_property(srna, "gopsize", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "gop_size");
+ RNA_def_property_range(prop, 0, 100);
+ RNA_def_property_ui_text(prop, "GOP Size", "Distance between key frames");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop = RNA_def_property(srna, "buffersize", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "rc_buffer_size");
+ RNA_def_property_range(prop, 0, 2000);
+ RNA_def_property_ui_text(prop, "Buffersize", "Rate control: buffer size (kb)");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop = RNA_def_property(srna, "packetsize", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "mux_packet_size");
+ RNA_def_property_range(prop, 0, 16384);
+ RNA_def_property_ui_text(prop, "Mux Packet Size", "Mux packet size (byte)");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "use_autosplit", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flags", FFMPEG_AUTOSPLIT_OUTPUT);
+ RNA_def_property_ui_text(prop, "Autosplit Output", "Autosplit output at 2GB boundary");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop = RNA_def_property(srna, "use_lossless_output", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flags", FFMPEG_LOSSLESS_OUTPUT);
+ RNA_def_property_boolean_funcs(prop, NULL, "rna_FFmpegSettings_lossless_output_set");
+ RNA_def_property_ui_text(prop, "Lossless Output", "Use lossless output for video streams");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ /* FFMPEG Audio*/
+ prop = RNA_def_property(srna, "audio_codec", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_bitflag_sdna(prop, NULL, "audio_codec");
+ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
+ RNA_def_property_enum_items(prop, ffmpeg_audio_codec_items);
+ RNA_def_property_ui_text(prop, "Audio Codec", "FFmpeg audio codec to use");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop = RNA_def_property(srna, "audio_bitrate", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "audio_bitrate");
+ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
+ RNA_def_property_range(prop, 32, 384);
+ 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, "audio_volume", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "audio_volume");
+ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
+ RNA_def_property_range(prop, 0.0f, 1.0f);
+ RNA_def_property_ui_text(prop, "Volume", "Audio volume");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+#endif
+
+ // the following two "ffmpeg" settings are general audio settings
+ prop= RNA_def_property(srna, "audio_mixrate", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "audio_mixrate");
+ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
+ RNA_def_property_range(prop, 8000, 192000);
+ RNA_def_property_ui_text(prop, "Samplerate", "Audio samplerate(samples/s)");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "audio_channels", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "audio_channels");
+ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
+ RNA_def_property_enum_items(prop, audio_channel_items);
+ RNA_def_property_ui_text(prop, "Audio Channels", "Audio channel count");
+}
+
+#ifdef WITH_QUICKTIME
+static void rna_def_scene_quicktime_settings(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ static EnumPropertyItem quicktime_codec_type_items[] = {
+ {0, "codec", 0, "codec", ""},
+ {0, NULL, 0, NULL, NULL}};
+
+#ifdef USE_QTKIT
+ static EnumPropertyItem quicktime_audio_samplerate_items[] = {
+ {22050, "22050", 0, "22kHz", ""},
+ {44100, "44100", 0, "44.1kHz", ""},
+ {48000, "48000", 0, "48kHz", ""},
+ {88200, "88200", 0, "88.2kHz", ""},
+ {96000, "96000", 0, "96kHz", ""},
+ {192000, "192000", 0, "192kHz", ""},
+ {0, NULL, 0, NULL, NULL}};
+
+ static EnumPropertyItem quicktime_audio_bitdepth_items[] = {
+ {AUD_FORMAT_U8, "8BIT", 0, "8bit", ""},
+ {AUD_FORMAT_S16, "16BIT", 0, "16bit", ""},
+ {AUD_FORMAT_S24, "24BIT", 0, "24bit", ""},
+ {AUD_FORMAT_S32, "32BIT", 0, "32bit", ""},
+ {AUD_FORMAT_FLOAT32, "FLOAT32", 0, "float32", ""},
+ {AUD_FORMAT_FLOAT64, "FLOAT64", 0, "float64", ""},
+ {0, NULL, 0, NULL, NULL}};
+
+ static EnumPropertyItem quicktime_audio_bitrate_items[] = {
+ {64000, "64000", 0, "64kbps", ""},
+ {112000, "112000", 0, "112kpbs", ""},
+ {128000, "128000", 0, "128kbps", ""},
+ {192000, "192000", 0, "192kbps", ""},
+ {256000, "256000", 0, "256kbps", ""},
+ {320000, "320000", 0, "320kbps", ""},
+ {0, NULL, 0, NULL, NULL}};
+#endif
+
+ /* QuickTime */
+ srna = RNA_def_struct(brna, "QuickTimeSettings", NULL);
+ RNA_def_struct_sdna(srna, "QuicktimeCodecSettings");
+ RNA_def_struct_ui_text(srna, "QuickTime Settings", "QuickTime related settings for the scene");
+
+ prop = RNA_def_property(srna, "codec_type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_bitflag_sdna(prop, NULL, "codecType");
+ RNA_def_property_enum_items(prop, quicktime_codec_type_items);
+ 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);
+
+ prop = RNA_def_property(srna, "codec_spatial_quality", PROP_INT, PROP_PERCENTAGE);
+ RNA_def_property_int_sdna(prop, NULL, "codecSpatialQuality");
+ RNA_def_property_range(prop, 0, 100);
+ RNA_def_property_ui_text(prop, "Spatial quality", "Intra-frame spatial quality level");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+#ifdef USE_QTKIT
+ prop = RNA_def_property(srna, "audiocodec_type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_bitflag_sdna(prop, NULL, "audiocodecType");
+ RNA_def_property_enum_items(prop, quicktime_codec_type_items);
+ RNA_def_property_enum_funcs(prop, "rna_RenderSettings_qtcodecsettings_audiocodecType_get",
+ "rna_RenderSettings_qtcodecsettings_audiocodecType_set",
+ "rna_RenderSettings_qtcodecsettings_audiocodecType_itemf");
+ RNA_def_property_ui_text(prop, "Audio Codec", "QuickTime audio codec type");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop = RNA_def_property(srna, "audio_samplerate", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_bitflag_sdna(prop, NULL, "audioSampleRate");
+ RNA_def_property_enum_items(prop, quicktime_audio_samplerate_items);
+ RNA_def_property_ui_text(prop, "Smp Rate", "Sample Rate");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop = RNA_def_property(srna, "audio_bitdepth", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_bitflag_sdna(prop, NULL, "audioBitDepth");
+ RNA_def_property_enum_items(prop, quicktime_audio_bitdepth_items);
+ RNA_def_property_ui_text(prop, "Bit Depth", "Bit Depth");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop = RNA_def_property(srna, "audio_resampling_hq", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "audioCodecFlags", QTAUDIO_FLAG_RESAMPLE_NOHQ);
+ RNA_def_property_ui_text(prop, "HQ", "Use High Quality resampling algorithm");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "audio_codec_isvbr", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "audioCodecFlags", QTAUDIO_FLAG_CODEC_ISCBR);
+ RNA_def_property_ui_text(prop, "VBR", "Use Variable Bit Rate compression (improves quality at same bitrate)");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "audio_bitrate", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_bitflag_sdna(prop, NULL, "audioBitRate");
+ RNA_def_property_enum_items(prop, quicktime_audio_bitrate_items);
+ RNA_def_property_ui_text(prop, "Bitrate", "Compressed audio bitrate");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+#endif
+}
+#endif
+
static void rna_def_scene_render_data(BlenderRNA *brna)
{
StructRNA *srna;
@@ -3106,96 +3467,16 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
{0, "AUTO", 0, "Auto-detect", "Automatically determine the number of threads, based on CPUs"},
{R_FIXED_THREADS, "FIXED", 0, "Fixed", "Manually determine the number of threads"},
{0, NULL, 0, NULL, NULL}};
-
-#ifdef WITH_QUICKTIME
- static EnumPropertyItem quicktime_codec_type_items[] = {
- {0, "codec", 0, "codec", ""},
- {0, NULL, 0, NULL, NULL}};
-
-#ifdef USE_QTKIT
- static EnumPropertyItem quicktime_audio_samplerate_items[] = {
- {22050, "22050", 0, "22kHz", ""},
- {44100, "44100", 0, "44.1kHz", ""},
- {48000, "48000", 0, "48kHz", ""},
- {88200, "88200", 0, "88.2kHz", ""},
- {96000, "96000", 0, "96kHz", ""},
- {192000, "192000", 0, "192kHz", ""},
- {0, NULL, 0, NULL, NULL}};
-
- static EnumPropertyItem quicktime_audio_bitdepth_items[] = {
- {AUD_FORMAT_U8, "8BIT", 0, "8bit", ""},
- {AUD_FORMAT_S16, "16BIT", 0, "16bit", ""},
- {AUD_FORMAT_S24, "24BIT", 0, "24bit", ""},
- {AUD_FORMAT_S32, "32BIT", 0, "32bit", ""},
- {AUD_FORMAT_FLOAT32, "FLOAT32", 0, "float32", ""},
- {AUD_FORMAT_FLOAT64, "FLOAT64", 0, "float64", ""},
- {0, NULL, 0, NULL, NULL}};
-
- static EnumPropertyItem quicktime_audio_bitrate_items[] = {
- {64000, "64000", 0, "64kbps", ""},
- {112000, "112000", 0, "112kpbs", ""},
- {128000, "128000", 0, "128kbps", ""},
- {192000, "192000", 0, "192kbps", ""},
- {256000, "256000", 0, "256kbps", ""},
- {320000, "320000", 0, "320kbps", ""},
- {0, NULL, 0, NULL, NULL}};
-#endif
-#endif
-
-#ifdef WITH_FFMPEG
- static EnumPropertyItem ffmpeg_format_items[] = {
- {FFMPEG_MPEG1, "MPEG1", 0, "MPEG-1", ""},
- {FFMPEG_MPEG2, "MPEG2", 0, "MPEG-2", ""},
- {FFMPEG_MPEG4, "MPEG4", 0, "MPEG-4", ""},
- {FFMPEG_AVI, "AVI", 0, "AVI", ""},
- {FFMPEG_MOV, "QUICKTIME", 0, "Quicktime", ""},
- {FFMPEG_DV, "DV", 0, "DV", ""},
- {FFMPEG_H264, "H264", 0, "H.264", ""},
- {FFMPEG_XVID, "XVID", 0, "Xvid", ""},
- {FFMPEG_OGG, "OGG", 0, "Ogg", ""},
- {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)", ""},
- {CODEC_ID_HUFFYUV, "HUFFYUV", 0, "HuffYUV", ""},
- {CODEC_ID_DVVIDEO, "DV", 0, "DV", ""},
- {CODEC_ID_H264, "H264", 0, "H.264", ""},
- {CODEC_ID_THEORA, "THEORA", 0, "Theora", ""},
- {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
-
- 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"},
- {0, NULL, 0, NULL, NULL}};
static EnumPropertyItem engine_items[] = {
{0, "BLENDER_RENDER", 0, "Blender Render", "Use the Blender internal rendering engine for rendering"},
{0, NULL, 0, NULL, NULL}};
+ rna_def_scene_ffmpeg_settings(brna);
+#ifdef WITH_QUICKTIME
+ rna_def_scene_quicktime_settings(brna);
+#endif
+
srna= RNA_def_struct(brna, "RenderSettings", NULL);
RNA_def_struct_sdna(srna, "RenderData");
RNA_def_struct_nested(brna, srna, "Scene");
@@ -3253,161 +3534,18 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneCamera_update");
#ifdef WITH_QUICKTIME
- /* QuickTime */
-
- 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_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);
-
- prop= RNA_def_property(srna, "quicktime_codec_spatial_quality", PROP_INT, PROP_PERCENTAGE);
- RNA_def_property_int_sdna(prop, NULL, "qtcodecsettings.codecSpatialQuality");
- RNA_def_property_range(prop, 0, 100);
- RNA_def_property_ui_text(prop, "Spatial quality", "Intra-frame spatial quality level");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
-
-#ifdef USE_QTKIT
- prop= RNA_def_property(srna, "quicktime_audiocodec_type", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_bitflag_sdna(prop, NULL, "qtcodecsettings.audiocodecType");
- RNA_def_property_enum_items(prop, quicktime_codec_type_items);
- RNA_def_property_enum_funcs(prop, "rna_RenderSettings_qtcodecsettings_audiocodecType_get",
- "rna_RenderSettings_qtcodecsettings_audiocodecType_set",
- "rna_RenderSettings_qtcodecsettings_audiocodecType_itemf");
- RNA_def_property_ui_text(prop, "Audio Codec", "QuickTime audio codec type");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
-
- prop= RNA_def_property(srna, "quicktime_audio_samplerate", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_bitflag_sdna(prop, NULL, "qtcodecsettings.audioSampleRate");
- RNA_def_property_enum_items(prop, quicktime_audio_samplerate_items);
- RNA_def_property_ui_text(prop, "Smp Rate", "Sample Rate");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
-
- prop= RNA_def_property(srna, "quicktime_audio_bitdepth", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_bitflag_sdna(prop, NULL, "qtcodecsettings.audioBitDepth");
- RNA_def_property_enum_items(prop, quicktime_audio_bitdepth_items);
- RNA_def_property_ui_text(prop, "Bit Depth", "Bit Depth");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
-
- prop= RNA_def_property(srna, "quicktime_audio_resampling_hq", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_negative_sdna(prop, NULL, "qtcodecsettings.audioCodecFlags", QTAUDIO_FLAG_RESAMPLE_NOHQ);
- RNA_def_property_ui_text(prop, "HQ", "Use High Quality resampling algorithm");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
-
- prop= RNA_def_property(srna, "quicktime_audio_codec_isvbr", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_negative_sdna(prop, NULL, "qtcodecsettings.audioCodecFlags", QTAUDIO_FLAG_CODEC_ISCBR);
- RNA_def_property_ui_text(prop, "VBR", "Use Variable Bit Rate compression (improves quality at same bitrate)");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
-
- prop= RNA_def_property(srna, "quicktime_audio_bitrate", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_bitflag_sdna(prop, NULL, "qtcodecsettings.audioBitRate");
- RNA_def_property_enum_items(prop, quicktime_audio_bitrate_items);
- RNA_def_property_ui_text(prop, "Bitrate", "Compressed audio bitrate");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
-#endif
-#endif
-
-#ifdef WITH_FFMPEG
- /* FFMPEG Video*/
-
- prop= RNA_def_property(srna, "ffmpeg_format", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_bitflag_sdna(prop, NULL, "ffcodecdata.type");
- RNA_def_property_enum_items(prop, ffmpeg_format_items);
- RNA_def_property_ui_text(prop, "Format", "Output file format");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
-
- prop= RNA_def_property(srna, "ffmpeg_codec", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_bitflag_sdna(prop, NULL, "ffcodecdata.codec");
- RNA_def_property_enum_items(prop, ffmpeg_codec_items);
- RNA_def_property_ui_text(prop, "Codec", "FFMpeg codec to use");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
-
- prop= RNA_def_property(srna, "ffmpeg_video_bitrate", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "ffcodecdata.video_bitrate");
- RNA_def_property_range(prop, 1, 14000);
- RNA_def_property_ui_text(prop, "Bitrate", "Video bitrate (kb/s)");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
-
- prop= RNA_def_property(srna, "ffmpeg_minrate", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "ffcodecdata.rc_min_rate");
- RNA_def_property_range(prop, 0, 9000);
- RNA_def_property_ui_text(prop, "Min Rate", "Rate control: min rate (kb/s)");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
-
- prop= RNA_def_property(srna, "ffmpeg_maxrate", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "ffcodecdata.rc_max_rate");
- RNA_def_property_range(prop, 1, 14000);
- RNA_def_property_ui_text(prop, "Max Rate", "Rate control: max rate (kb/s)");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
-
- prop= RNA_def_property(srna, "ffmpeg_muxrate", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "ffcodecdata.mux_rate");
- RNA_def_property_range(prop, 0, 100000000);
- RNA_def_property_ui_text(prop, "Mux Rate", "Mux rate (bits/s(!))");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
-
- prop= RNA_def_property(srna, "ffmpeg_gopsize", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "ffcodecdata.gop_size");
- RNA_def_property_range(prop, 0, 100);
- RNA_def_property_ui_text(prop, "GOP Size", "Distance between key frames");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
-
- prop= RNA_def_property(srna, "ffmpeg_buffersize", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "ffcodecdata.rc_buffer_size");
- RNA_def_property_range(prop, 0, 2000);
- RNA_def_property_ui_text(prop, "Buffersize", "Rate control: buffer size (kb)");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
-
- prop= RNA_def_property(srna, "ffmpeg_packetsize", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "ffcodecdata.mux_packet_size");
- RNA_def_property_range(prop, 0, 16384);
- RNA_def_property_ui_text(prop, "Mux Packet Size", "Mux packet size (byte)");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
-
- 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_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_clear_flag(prop, PROP_ANIMATABLE);
- RNA_def_property_enum_items(prop, ffmpeg_audio_codec_items);
- RNA_def_property_ui_text(prop, "Audio Codec", "FFMpeg audio codec to use");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
-
- prop= RNA_def_property(srna, "ffmpeg_audio_bitrate", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "ffcodecdata.audio_bitrate");
- RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
- RNA_def_property_range(prop, 32, 384);
- 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_audio_volume", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "ffcodecdata.audio_volume");
- RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
- RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Volume", "Audio volume");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ prop= RNA_def_property(srna, "quicktime", PROP_POINTER, PROP_NONE);
+ RNA_def_property_struct_type(prop, "QuickTimeSettings");
+ RNA_def_property_pointer_sdna(prop, NULL, "qtcodecsettings");
+ RNA_def_property_flag(prop, PROP_NEVER_UNLINK);
+ RNA_def_property_ui_text(prop, "QuickTime Settings", "QuickTime related settings for the scene");
#endif
- // the following two "ffmpeg" settings are general audio settings
- 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_clear_flag(prop, PROP_ANIMATABLE);
- RNA_def_property_range(prop, 8000, 192000);
- RNA_def_property_ui_text(prop, "Samplerate", "Audio samplerate(samples/s)");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
-
- prop= RNA_def_property(srna, "ffmpeg_audio_channels", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "ffcodecdata.audio_channels");
- RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
- RNA_def_property_enum_items(prop, audio_channel_items);
- RNA_def_property_ui_text(prop, "Audio Channels", "Audio channel count");
+ prop= RNA_def_property(srna, "ffmpeg", PROP_POINTER, PROP_NONE);
+ RNA_def_property_struct_type(prop, "FFmpegSettings");
+ RNA_def_property_pointer_sdna(prop, NULL, "ffcodecdata");
+ RNA_def_property_flag(prop, PROP_NEVER_UNLINK);
+ RNA_def_property_ui_text(prop, "FFmpeg Settings", "FFmpeg related settings for the scene");
prop= RNA_def_property(srna, "fps", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "frs_sec");
@@ -4473,6 +4611,7 @@ void RNA_def_scene(BlenderRNA *brna)
/* Nestled Data */
rna_def_tool_settings(brna);
+ rna_def_unified_paint_settings(brna);
rna_def_unit_settings(brna);
rna_def_scene_image_format_data(brna);
rna_def_scene_render_data(brna);
diff --git a/source/blender/makesrna/intern/rna_sculpt_paint.c b/source/blender/makesrna/intern/rna_sculpt_paint.c
index a15ca5de5c1..cd929d3aeda 100644
--- a/source/blender/makesrna/intern/rna_sculpt_paint.c
+++ b/source/blender/makesrna/intern/rna_sculpt_paint.c
@@ -289,6 +289,7 @@ static void rna_def_sculpt(BlenderRNA *brna)
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Sculpt_update");
}
+/* use for weight paint too */
static void rna_def_vertex_paint(BlenderRNA *brna)
{
StructRNA *srna;
@@ -297,7 +298,8 @@ static void rna_def_vertex_paint(BlenderRNA *brna)
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");
-
+
+ /* vertex paint only */
prop= RNA_def_property(srna, "use_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");
@@ -309,6 +311,11 @@ static void rna_def_vertex_paint(BlenderRNA *brna)
prop= RNA_def_property(srna, "use_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");
+
+ /* weight paint only */
+ prop= RNA_def_property(srna, "use_group_restrict", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", VP_ONLYVGROUP);
+ RNA_def_property_ui_text(prop, "Restrict", "Restrict painting to verts already apart of the vertex group");
}
static void rna_def_image_paint(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index a7f45d867dd..d7f1c375a21 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -35,6 +35,7 @@
#include "rna_internal.h"
#include "BKE_key.h"
+#include "BKE_movieclip.h"
#include "DNA_action_types.h"
#include "DNA_key_types.h"
@@ -2139,7 +2140,6 @@ static void rna_def_space_dopesheet(BlenderRNA *brna)
/* display */
prop= RNA_def_property(srna, "show_seconds", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SACTION_DRAWTIME);
- RNA_def_property_clear_flag(prop, PROP_EDITABLE); // XXX for now, only set with operator
RNA_def_property_ui_text(prop, "Show Seconds", "Show timing in seconds not frames");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_DOPESHEET, NULL);
@@ -2224,7 +2224,6 @@ static void rna_def_space_graph(BlenderRNA *brna)
/* display */
prop= RNA_def_property(srna, "show_seconds", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SIPO_DRAWTIME);
- RNA_def_property_clear_flag(prop, PROP_EDITABLE); // XXX for now, only set with operator
RNA_def_property_ui_text(prop, "Show Seconds", "Show timing in seconds not frames");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
@@ -2322,7 +2321,6 @@ static void rna_def_space_nla(BlenderRNA *brna)
/* 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_update(prop, NC_SPACE|ND_SPACE_NLA, NULL);
@@ -2987,6 +2985,32 @@ static void rna_def_space_clip(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "flag", SC_SHOW_GRAPH_TRACKS);
RNA_def_property_ui_text(prop, "Show Tracks", "Display the speed curves (in \"x\" direction red, in \"y\" direction green) for the selected tracks");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, NULL);
+
+ /* ** channels ** */
+
+ /* show_red_channel */
+ prop= RNA_def_property(srna, "show_red_channel", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "postproc_flag", MOVIECLIP_DISABLE_RED);
+ RNA_def_property_ui_text(prop, "Show Red Channel", "Show red channel in the frame");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, NULL);
+
+ /* show_green_channel */
+ prop= RNA_def_property(srna, "show_green_channel", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "postproc_flag", MOVIECLIP_DISABLE_GREEN);
+ RNA_def_property_ui_text(prop, "Show Green Channel", "Show green channel in the frame");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, NULL);
+
+ /* show_blue_channel */
+ prop= RNA_def_property(srna, "show_blue_channel", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "postproc_flag", MOVIECLIP_DISABLE_BLUE);
+ RNA_def_property_ui_text(prop, "Show Blue Channel", "Show blue channel in the frame");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, NULL);
+
+ /* preview_grayscale */
+ prop= RNA_def_property(srna, "use_grayscale_preview", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "postproc_flag", MOVIECLIP_PREVIEW_GRAYSCALE);
+ RNA_def_property_ui_text(prop, "Grayscale", "Display frame in grayscale mode");
+ RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, NULL);
}
diff --git a/source/blender/makesrna/intern/rna_tracking.c b/source/blender/makesrna/intern/rna_tracking.c
index c29d655feb2..01f3889d684 100644
--- a/source/blender/makesrna/intern/rna_tracking.c
+++ b/source/blender/makesrna/intern/rna_tracking.c
@@ -31,6 +31,7 @@
#include "MEM_guardedalloc.h"
+#include "BLI_math.h"
#include "BKE_movieclip.h"
#include "BKE_tracking.h"
@@ -87,14 +88,14 @@ static void rna_tracking_defaultSettings_searchUpdate(Main *UNUSED(bmain), Scene
settings->default_pattern_size= settings->default_search_size;
}
-static void rna_tracking_tracks_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
+static void rna_trackingTracks_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
MovieClip *clip= (MovieClip*)ptr->id.data;
rna_iterator_listbase_begin(iter, &clip->tracking.tracks, NULL);
}
-static void rna_tracking_objects_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
+static void rna_trackingObjects_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
MovieClip *clip= (MovieClip*)ptr->id.data;
@@ -351,6 +352,31 @@ static void rna_trackingObject_flushUpdate(Main *UNUSED(bmain), Scene *scene, Po
DAG_id_tag_update(&clip->id, 0);
}
+static void rna_trackingMarker_frame_set(PointerRNA *ptr, int value)
+{
+ MovieClip *clip = (MovieClip *) ptr->id.data;
+ MovieTracking *tracking = &clip->tracking;
+ MovieTrackingTrack *track;
+ MovieTrackingMarker *marker = (MovieTrackingMarker *) ptr->data;
+
+ track = tracking->tracks.first;
+ while (track) {
+ if (marker >= track->markers && marker < track->markers+track->markersnr) {
+ break;
+ }
+
+ track = track->next;
+ }
+
+ if (track) {
+ MovieTrackingMarker new_marker = *marker;
+ new_marker.framenr = value;
+
+ BKE_tracking_delete_marker(track, marker->framenr);
+ BKE_tracking_insert_marker(track, &new_marker);
+ }
+}
+
/* API */
static void add_tracks_to_base(MovieClip *clip, MovieTracking *tracking, ListBase *tracksbase, int frame, int number)
@@ -366,13 +392,13 @@ static void add_tracks_to_base(MovieClip *clip, MovieTracking *tracking, ListBas
BKE_tracking_add_track(tracking, tracksbase, 0, 0, frame, width, height);
}
-static void rna_tracking_tracks_add(ID *id, MovieTracking *tracking, int frame, int number)
+static void rna_trackingTracks_add(ID *id, MovieTracking *tracking, int frame, int number)
{
MovieClip *clip= (MovieClip *) id;
add_tracks_to_base(clip, tracking, &tracking->tracks, frame, number);
- WM_main_add_notifier(NC_MOVIECLIP|NA_EDITED, NULL);
+ WM_main_add_notifier(NC_MOVIECLIP|NA_EDITED, clip);
}
static void rna_trackingObject_tracks_add(ID *id, MovieTrackingObject *object, int frame, int number)
@@ -388,7 +414,7 @@ static void rna_trackingObject_tracks_add(ID *id, MovieTrackingObject *object, i
WM_main_add_notifier(NC_MOVIECLIP|NA_EDITED, NULL);
}
-static MovieTrackingObject *rna_tracking_object_new(MovieTracking *tracking, const char *name)
+static MovieTrackingObject *rna_trackingObject_new(MovieTracking *tracking, const char *name)
{
MovieTrackingObject *object= BKE_tracking_new_object(tracking, name);
@@ -397,16 +423,41 @@ static MovieTrackingObject *rna_tracking_object_new(MovieTracking *tracking, con
return object;
}
-void rna_tracking_object_remove(MovieTracking *tracking, MovieTrackingObject *object)
+void rna_trackingObject_remove(MovieTracking *tracking, MovieTrackingObject *object)
{
BKE_tracking_remove_object(tracking, object);
WM_main_add_notifier(NC_MOVIECLIP|NA_EDITED, NULL);
}
-static MovieTrackingMarker *rna_trackingTrack_marker_find_frame(MovieTrackingTrack *track, int framenr)
+static MovieTrackingMarker *rna_trackingMarkers_find_frame(MovieTrackingTrack *track, int framenr)
{
- return BKE_tracking_get_marker(track, framenr);
+ return BKE_tracking_exact_marker(track, framenr);
+}
+
+static MovieTrackingMarker* rna_trackingMarkers_insert_frame(MovieTrackingTrack *track, int framenr, float *co)
+{
+ MovieTrackingMarker marker, *new_marker;
+
+ memset(&marker, 0, sizeof(marker));
+ marker.framenr = framenr;
+ copy_v2_v2(marker.pos, co);
+
+ new_marker = BKE_tracking_insert_marker(track, &marker);
+
+ WM_main_add_notifier(NC_MOVIECLIP|NA_EDITED, NULL);
+
+ return new_marker;
+}
+
+void rna_trackingMarkers_delete_frame(MovieTrackingTrack *track, int framenr)
+{
+ if(track->markersnr==1)
+ return;
+
+ BKE_tracking_delete_marker(track, framenr);
+
+ WM_main_add_notifier(NC_MOVIECLIP|NA_EDITED, NULL);
}
#else
@@ -692,10 +743,10 @@ static void rna_def_trackingMarker(BlenderRNA *brna)
/* frame */
prop= RNA_def_property(srna, "frame", PROP_INT, PROP_NONE);
- RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* can't be safty edited for now, need to re-sort markers array after change */
RNA_def_property_int_sdna(prop, NULL, "framenr");
RNA_def_property_ui_text(prop, "Frame", "Frame number marker is keyframed on");
- RNA_def_property_update(prop, NC_MOVIECLIP|NA_EDITED, NULL);
+ RNA_def_property_int_funcs(prop, NULL, "rna_trackingMarker_frame_set", NULL);
+ RNA_def_property_update(prop, NC_MOVIECLIP|NA_EDITED, 0);
/* enable */
prop= RNA_def_property(srna, "mute", PROP_BOOLEAN, PROP_NONE);
@@ -704,14 +755,48 @@ static void rna_def_trackingMarker(BlenderRNA *brna)
RNA_def_property_update(prop, NC_MOVIECLIP|NA_EDITED, NULL);
}
-static void rna_def_trackingTrack(BlenderRNA *brna)
+static void rna_def_trackingMarkers(BlenderRNA *brna, PropertyRNA *cprop)
{
StructRNA *srna;
- PropertyRNA *prop;
-
FunctionRNA *func;
PropertyRNA *parm;
+ RNA_def_property_srna(cprop, "MovieTrackingMarkers");
+ srna= RNA_def_struct(brna, "MovieTrackingMarkers", NULL);
+ RNA_def_struct_sdna(srna, "MovieTrackingTrack");
+ RNA_def_struct_ui_text(srna, "Movie Tracking Markers", "Collection of markers for movie tracking track");
+
+ func= RNA_def_function(srna, "find_frame", "rna_trackingMarkers_find_frame");
+ RNA_def_function_ui_description(func, "Get marker for specified frame");
+ parm= RNA_def_int(func, "frame", 1, MINFRAME, MAXFRAME, "Frame",
+ "Frame number to find marker for", MINFRAME, MAXFRAME);
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+ parm= RNA_def_pointer(func, "marker", "MovieTrackingMarker", "", "Marker for specified frame");
+ RNA_def_function_return(func, parm);
+
+ func= RNA_def_function(srna, "insert_frame", "rna_trackingMarkers_insert_frame");
+ RNA_def_function_ui_description(func, "Add a number of tracks to this movie clip");
+ parm= RNA_def_int(func, "frame", 1, MINFRAME, MAXFRAME, "Frame",
+ "Frame number to insert marker to", MINFRAME, MAXFRAME);
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+ RNA_def_float_vector(func, "co", 2, 0, -1.0, 1.0, "Coordinate",
+ "Place new marker at the given frame using specified in normalized space coordinates", -1.0, 1.0);
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+ parm= RNA_def_pointer(func, "marker", "MovieTrackingMarker", "", "Newly created marker");
+ RNA_def_function_return(func, parm);
+
+ func= RNA_def_function(srna, "delete_frame", "rna_trackingMarkers_delete_frame");
+ RNA_def_function_ui_description(func, "Delete marker at specified frame");
+ parm= RNA_def_int(func, "frame", 1, MINFRAME, MAXFRAME, "Frame",
+ "Frame number to delete marker from", MINFRAME, MAXFRAME);
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+}
+
+static void rna_def_trackingTrack(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
rna_def_trackingMarker(brna);
srna= RNA_def_struct(brna, "MovieTrackingTrack", NULL);
@@ -722,7 +807,7 @@ static void rna_def_trackingTrack(BlenderRNA *brna)
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_ui_text(prop, "Name", "Unique name of track");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_trackingTrack_name_set");
- RNA_def_property_string_maxlength(prop, MAX_ID_NAME);
+ RNA_def_property_string_maxlength(prop, MAX_ID_NAME-2);
RNA_def_property_update(prop, NC_MOVIECLIP|NA_EDITED, NULL);
RNA_def_struct_name_property(srna, prop);
@@ -805,6 +890,7 @@ static void rna_def_trackingTrack(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "MovieTrackingMarker");
RNA_def_property_collection_sdna(prop, NULL, "markers", "markersnr");
RNA_def_property_ui_text(prop, "Markers", "Collection of markers in track");
+ rna_def_trackingMarkers(brna, prop);
/* ** channels ** */
@@ -899,15 +985,6 @@ static void rna_def_trackingTrack(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "error");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Average Error", "Average error of re-projection");
-
- /* ** api ** */
-
- func= RNA_def_function(srna, "marker_find_frame", "rna_trackingTrack_marker_find_frame");
- RNA_def_function_ui_description(func, "Get marker for specified frame");
- parm= RNA_def_int(func, "frame", 1, MINFRAME, MAXFRAME, "Frame", "type for the new spline", MINFRAME, MAXFRAME);
- RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_pointer(func, "marker", "MovieTrackingMarker", "", "Marker for specified frame");
- RNA_def_function_return(func, parm);
}
static void rna_def_trackingStabilization(BlenderRNA *brna)
@@ -1052,7 +1129,7 @@ static void rna_def_trackingTracks(BlenderRNA *brna)
RNA_def_struct_sdna(srna, "MovieTracking");
RNA_def_struct_ui_text(srna, "Movie Tracks", "Collection of movie tracking tracks");
- func= RNA_def_function(srna, "add", "rna_tracking_tracks_add");
+ func= RNA_def_function(srna, "add", "rna_trackingTracks_add");
RNA_def_function_flag(func, FUNC_USE_SELF_ID);
RNA_def_function_ui_description(func, "Add a number of tracks to this movie clip");
RNA_def_int(func, "frame", 1, MINFRAME, MAXFRAME, "Frame", "Frame number to add tracks on", MINFRAME, MAXFRAME);
@@ -1102,7 +1179,7 @@ static void rna_def_trackingObject(BlenderRNA *brna)
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_ui_text(prop, "Name", "Unique name of object");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_trackingObject_name_set");
- RNA_def_property_string_maxlength(prop, MAX_ID_NAME);
+ RNA_def_property_string_maxlength(prop, MAX_ID_NAME-2);
RNA_def_property_update(prop, NC_MOVIECLIP|NA_EDITED, NULL);
RNA_def_struct_name_property(srna, prop);
@@ -1147,13 +1224,13 @@ static void rna_def_trackingObjects(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_struct_sdna(srna, "MovieTracking");
RNA_def_struct_ui_text(srna, "Movie Objects", "Collection of movie trackingobjects");
- func= RNA_def_function(srna, "new", "rna_tracking_object_new");
+ func= RNA_def_function(srna, "new", "rna_trackingObject_new");
RNA_def_function_ui_description(func, "Add tracking object to this movie clip");
RNA_def_string(func, "name", "", 0, "", "Name of new object");
parm= RNA_def_pointer(func, "object", "MovieTrackingObject", "", "New motion tracking object");
RNA_def_function_return(func, parm);
- func= RNA_def_function(srna, "remove", "rna_tracking_object_remove");
+ func= RNA_def_function(srna, "remove", "rna_trackingObject_remove");
RNA_def_function_ui_description(func, "Remove tracking object from this movie clip");
parm= RNA_def_pointer(func, "object", "MovieTrackingObject", "", "Motion tracking object to be removed");
@@ -1192,7 +1269,7 @@ static void rna_def_tracking(BlenderRNA *brna)
/* tracks */
prop= RNA_def_property(srna, "tracks", PROP_COLLECTION, PROP_NONE);
- RNA_def_property_collection_funcs(prop, "rna_tracking_tracks_begin", "rna_iterator_listbase_next", "rna_iterator_listbase_end", "rna_iterator_listbase_get", 0, 0, 0, 0);
+ RNA_def_property_collection_funcs(prop, "rna_trackingTracks_begin", "rna_iterator_listbase_next", "rna_iterator_listbase_end", "rna_iterator_listbase_get", 0, 0, 0, 0);
RNA_def_property_struct_type(prop, "MovieTrackingTrack");
RNA_def_property_ui_text(prop, "Tracks", "Collection of tracks in this tracking data object");
RNA_def_property_srna(prop, "MovieTrackingTracks");
@@ -1207,7 +1284,7 @@ static void rna_def_tracking(BlenderRNA *brna)
/* objects */
prop= RNA_def_property(srna, "objects", PROP_COLLECTION, PROP_NONE);
- RNA_def_property_collection_funcs(prop, "rna_tracking_objects_begin", "rna_iterator_listbase_next", "rna_iterator_listbase_end", "rna_iterator_listbase_get", 0, 0, 0, 0);
+ RNA_def_property_collection_funcs(prop, "rna_trackingObjects_begin", "rna_iterator_listbase_next", "rna_iterator_listbase_end", "rna_iterator_listbase_get", 0, 0, 0, 0);
RNA_def_property_struct_type(prop, "MovieTrackingObject");
RNA_def_property_ui_text(prop, "Objects", "Collection of objects in this tracking data object");
rna_def_trackingObjects(brna, prop);
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index d080a7b08dd..160787556ed 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -46,6 +46,14 @@
#include "BKE_sound.h"
+#ifdef WITH_CYCLES
+static EnumPropertyItem compute_device_type_items[] = {
+ {USER_COMPUTE_DEVICE_NONE, "NONE", 0, "None", "Don't use compute device"},
+ {USER_COMPUTE_DEVICE_CUDA, "CUDA", 0, "CUDA", "Use CUDA for GPU acceleration"},
+ {USER_COMPUTE_DEVICE_OPENCL, "OPENCL", 0, "OpenCL", "Use OpenCL for GPU acceleration"},
+ { 0, NULL, 0, NULL, NULL}};
+#endif
+
#ifdef RNA_RUNTIME
#include "DNA_object_types.h"
@@ -65,6 +73,8 @@
#include "UI_interface.h"
+#include "CCL_api.h"
+
static void rna_userdef_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *UNUSED(ptr))
{
WM_main_add_notifier(NC_WINDOW, NULL);
@@ -302,6 +312,79 @@ static void rna_userdef_text_update(Main *UNUSED(bmain), Scene *UNUSED(scene), P
WM_main_add_notifier(NC_WINDOW, NULL);
}
+static PointerRNA rna_Theme_space_generic_get(PointerRNA *ptr)
+{
+ return rna_pointer_inherit_refine(ptr, &RNA_ThemeSpaceGeneric, ptr->data);
+}
+
+static PointerRNA rna_Theme_space_list_generic_get(PointerRNA *ptr)
+{
+ return rna_pointer_inherit_refine(ptr, &RNA_ThemeSpaceListGeneric, ptr->data);
+}
+
+
+#ifdef WITH_CYCLES
+static EnumPropertyItem *rna_userdef_compute_device_type_itemf(bContext *UNUSED(C), PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), int *free)
+{
+ EnumPropertyItem *item= NULL;
+ int totitem= 0;
+
+ /* add supported device types */
+ RNA_enum_items_add_value(&item, &totitem, compute_device_type_items, USER_COMPUTE_DEVICE_NONE);
+ if(CCL_compute_device_list(0))
+ RNA_enum_items_add_value(&item, &totitem, compute_device_type_items, USER_COMPUTE_DEVICE_CUDA);
+ if(CCL_compute_device_list(1))
+ RNA_enum_items_add_value(&item, &totitem, compute_device_type_items, USER_COMPUTE_DEVICE_OPENCL);
+
+ RNA_enum_item_end(&item, &totitem);
+ *free = 1;
+
+ return item;
+}
+
+static int rna_userdef_compute_device_get(PointerRNA *UNUSED(ptr))
+{
+ if(U.compute_device_type == USER_COMPUTE_DEVICE_NONE)
+ return 0;
+
+ return U.compute_device_id;
+}
+
+static EnumPropertyItem *rna_userdef_compute_device_itemf(bContext *UNUSED(C), PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), int *free)
+{
+ EnumPropertyItem tmp= {0, "", 0, "", ""};
+ EnumPropertyItem *item= NULL;
+ int totitem= 0;
+
+ if(U.compute_device_type == USER_COMPUTE_DEVICE_NONE) {
+ /* only add a single CPU device */
+ tmp.value = 0;
+ tmp.name = "CPU";
+ tmp.identifier = "CPU";
+ RNA_enum_item_add(&item, &totitem, &tmp);
+ }
+ else {
+ /* get device list from cycles. it would be good to make this generic
+ once we have more subsystems using opencl, for now this is easiest */
+ int opencl = (U.compute_device_type == USER_COMPUTE_DEVICE_OPENCL);
+ CCLDeviceInfo *devices = CCL_compute_device_list(opencl);
+ int a;
+
+ for(a = 0; devices[a].name; a++) {
+ tmp.value = devices[a].value;
+ tmp.identifier = devices[a].identifier;
+ tmp.name = devices[a].name;
+ RNA_enum_item_add(&item, &totitem, &tmp);
+ }
+ }
+
+ RNA_enum_item_end(&item, &totitem);
+ *free = 1;
+
+ return item;
+}
+#endif
+
#else
static void rna_def_userdef_theme_ui_font_style(BlenderRNA *brna)
@@ -639,10 +722,15 @@ static void rna_def_userdef_theme_ui(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_userdef_update");
}
-static void rna_def_userdef_theme_spaces_main(StructRNA *srna, int spacetype)
+static void rna_def_userdef_theme_space_generic(BlenderRNA *brna)
{
+ StructRNA *srna;
PropertyRNA *prop;
+ srna= RNA_def_struct(brna, "ThemeSpaceGeneric", NULL);
+ RNA_def_struct_sdna(srna, "ThemeSpace");
+ RNA_def_struct_ui_text(srna, "Theme Space Settings", "");
+
/* window */
prop= RNA_def_property(srna, "back", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
@@ -653,7 +741,7 @@ static void rna_def_userdef_theme_spaces_main(StructRNA *srna, int spacetype)
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Title", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
-
+
prop= RNA_def_property(srna, "text", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Text", "");
@@ -674,57 +762,87 @@ static void rna_def_userdef_theme_spaces_main(StructRNA *srna, int spacetype)
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Header Text", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
-
+
prop= RNA_def_property(srna, "header_text_hi", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Header Text Highlight", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
-
+
/* buttons */
// if(! ELEM(spacetype, SPACE_BUTS, SPACE_OUTLINER)) {
prop= RNA_def_property(srna, "button", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Region Background", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
-
+
prop= RNA_def_property(srna, "button_title", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Region Text Titles", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
-
+
prop= RNA_def_property(srna, "button_text", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Region Text", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
-
+
prop= RNA_def_property(srna, "button_text_hi", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Region Text Highlight", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
// }
-
- /* list/channels */
- if(ELEM5(spacetype, SPACE_IPO, SPACE_ACTION, SPACE_NLA, SPACE_NODE, SPACE_FILE)) {
- prop= RNA_def_property(srna, "list", PROP_FLOAT, PROP_COLOR_GAMMA);
- RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "Source List", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
-
- prop= RNA_def_property(srna, "list_title", PROP_FLOAT, PROP_COLOR_GAMMA);
- RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "Source List Title", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
-
- prop= RNA_def_property(srna, "list_text", PROP_FLOAT, PROP_COLOR_GAMMA);
- RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "Source List Text", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
-
- prop= RNA_def_property(srna, "list_text_hi", PROP_FLOAT, PROP_COLOR_GAMMA);
- RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "Source List Text Highlight", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
- }
+}
+
+/* list / channels */
+static void rna_def_userdef_theme_space_list_generic(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ srna= RNA_def_struct(brna, "ThemeSpaceListGeneric", NULL);
+ RNA_def_struct_sdna(srna, "ThemeSpace");
+ RNA_def_struct_ui_text(srna, "Theme Space List Settings", "");
+
+ prop= RNA_def_property(srna, "list", PROP_FLOAT, PROP_COLOR_GAMMA);
+ RNA_def_property_array(prop, 3);
+ RNA_def_property_ui_text(prop, "Source List", "");
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
+
+ prop= RNA_def_property(srna, "list_title", PROP_FLOAT, PROP_COLOR_GAMMA);
+ RNA_def_property_array(prop, 3);
+ RNA_def_property_ui_text(prop, "Source List Title", "");
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
+
+ prop= RNA_def_property(srna, "list_text", PROP_FLOAT, PROP_COLOR_GAMMA);
+ RNA_def_property_array(prop, 3);
+ RNA_def_property_ui_text(prop, "Source List Text", "");
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
+
+ prop= RNA_def_property(srna, "list_text_hi", PROP_FLOAT, PROP_COLOR_GAMMA);
+ RNA_def_property_array(prop, 3);
+ RNA_def_property_ui_text(prop, "Source List Text Highlight", "");
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
+}
+
+static void rna_def_userdef_theme_spaces_main(StructRNA *srna)
+{
+ PropertyRNA *prop;
+
+ prop= RNA_def_property(srna, "space", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
+ RNA_def_property_struct_type(prop, "ThemeSpaceGeneric");
+ RNA_def_property_pointer_funcs(prop, "rna_Theme_space_generic_get", NULL, NULL, NULL);
+ RNA_def_property_ui_text(prop, "Theme Space", "Settings for space");
+}
+
+static void rna_def_userdef_theme_spaces_list_main(StructRNA *srna)
+{
+ PropertyRNA *prop;
+
+ prop= RNA_def_property(srna, "space_list", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
+ RNA_def_property_struct_type(prop, "ThemeSpaceListGeneric");
+ RNA_def_property_pointer_funcs(prop, "rna_Theme_space_list_generic_get", NULL, NULL, NULL);
+ RNA_def_property_ui_text(prop, "Theme Space List", "Settings for space list");
}
static void rna_def_userdef_theme_spaces_vertex(StructRNA *srna)
@@ -930,7 +1048,7 @@ static void rna_def_userdef_theme_space_view3d(BlenderRNA *brna)
RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Theme 3D View", "Theme settings for the 3D View");
- rna_def_userdef_theme_spaces_main(srna, SPACE_VIEW3D);
+ rna_def_userdef_theme_spaces_main(srna);
prop= RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
@@ -1068,7 +1186,8 @@ static void rna_def_userdef_theme_space_graph(BlenderRNA *brna)
RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Theme Graph Editor", "Theme settings for the graph editor");
- rna_def_userdef_theme_spaces_main(srna, SPACE_IPO);
+ rna_def_userdef_theme_spaces_main(srna);
+ rna_def_userdef_theme_spaces_list_main(srna);
prop= RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
@@ -1153,7 +1272,8 @@ static void rna_def_userdef_theme_space_file(BlenderRNA *brna)
RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Theme File Browser", "Theme settings for the File Browser");
- rna_def_userdef_theme_spaces_main(srna, SPACE_FILE);
+ rna_def_userdef_theme_spaces_main(srna);
+ rna_def_userdef_theme_spaces_list_main(srna);
prop= RNA_def_property(srna, "selected_file", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "hilite");
@@ -1203,7 +1323,7 @@ static void rna_def_userdef_theme_space_outliner(BlenderRNA *brna)
RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Theme Outliner", "Theme settings for the Outliner");
- rna_def_userdef_theme_spaces_main(srna, SPACE_OUTLINER);
+ rna_def_userdef_theme_spaces_main(srna);
}
static void rna_def_userdef_theme_space_userpref(BlenderRNA *brna)
@@ -1217,7 +1337,7 @@ static void rna_def_userdef_theme_space_userpref(BlenderRNA *brna)
RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Theme User Preferences", "Theme settings for the User Preferences");
- rna_def_userdef_theme_spaces_main(srna, SPACE_USERPREF);
+ rna_def_userdef_theme_spaces_main(srna);
}
static void rna_def_userdef_theme_space_console(BlenderRNA *brna)
@@ -1232,7 +1352,7 @@ static void rna_def_userdef_theme_space_console(BlenderRNA *brna)
RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Theme Console", "Theme settings for the Console");
- rna_def_userdef_theme_spaces_main(srna, SPACE_CONSOLE);
+ rna_def_userdef_theme_spaces_main(srna);
prop= RNA_def_property(srna, "line_output", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "console_output");
@@ -1276,7 +1396,7 @@ static void rna_def_userdef_theme_space_info(BlenderRNA *brna)
RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Theme Info", "Theme settings for Info");
- rna_def_userdef_theme_spaces_main(srna, SPACE_INFO);
+ rna_def_userdef_theme_spaces_main(srna);
}
@@ -1292,7 +1412,7 @@ static void rna_def_userdef_theme_space_text(BlenderRNA *brna)
RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Theme Text Editor", "Theme settings for the Text Editor");
- rna_def_userdef_theme_spaces_main(srna, SPACE_TEXT);
+ rna_def_userdef_theme_spaces_main(srna);
prop= RNA_def_property(srna, "line_numbers_background", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "grid");
@@ -1361,7 +1481,8 @@ static void rna_def_userdef_theme_space_node(BlenderRNA *brna)
RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Theme Node Editor", "Theme settings for the Node Editor");
- rna_def_userdef_theme_spaces_main(srna, SPACE_NODE);
+ rna_def_userdef_theme_spaces_main(srna);
+ rna_def_userdef_theme_spaces_list_main(srna);
prop= RNA_def_property(srna, "wire", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "wire");
@@ -1431,7 +1552,7 @@ static void rna_def_userdef_theme_space_logic(BlenderRNA *brna)
RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Theme Logic Editor", "Theme settings for the Logic Editor");
- rna_def_userdef_theme_spaces_main(srna, SPACE_LOGIC);
+ rna_def_userdef_theme_spaces_main(srna);
prop= RNA_def_property(srna, "panel", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
@@ -1452,7 +1573,7 @@ static void rna_def_userdef_theme_space_buts(BlenderRNA *brna)
RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Theme Properties", "Theme settings for the Properties");
- rna_def_userdef_theme_spaces_main(srna, SPACE_BUTS);
+ rna_def_userdef_theme_spaces_main(srna);
prop= RNA_def_property(srna, "panel", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
@@ -1472,7 +1593,7 @@ static void rna_def_userdef_theme_space_time(BlenderRNA *brna)
RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Theme Timeline", "Theme settings for the Timeline");
- rna_def_userdef_theme_spaces_main(srna, SPACE_TIME);
+ rna_def_userdef_theme_spaces_main(srna);
prop= RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
@@ -1498,7 +1619,7 @@ static void rna_def_userdef_theme_space_image(BlenderRNA *brna)
RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
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_main(srna);
rna_def_userdef_theme_spaces_vertex(srna);
rna_def_userdef_theme_spaces_face(srna);
@@ -1526,7 +1647,7 @@ static void rna_def_userdef_theme_space_seq(BlenderRNA *brna)
RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Theme Sequence Editor", "Theme settings for the Sequence Editor");
- rna_def_userdef_theme_spaces_main(srna, SPACE_IMAGE);
+ rna_def_userdef_theme_spaces_main(srna);
prop= RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
@@ -1618,7 +1739,8 @@ static void rna_def_userdef_theme_space_action(BlenderRNA *brna)
RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Theme DopeSheet", "Theme settings for the DopeSheet");
- rna_def_userdef_theme_spaces_main(srna, SPACE_ACTION);
+ rna_def_userdef_theme_spaces_main(srna);
+ rna_def_userdef_theme_spaces_list_main(srna);
prop= RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
@@ -1704,7 +1826,8 @@ static void rna_def_userdef_theme_space_nla(BlenderRNA *brna)
RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Theme NLA Editor", "Theme settings for the NLA Editor");
- rna_def_userdef_theme_spaces_main(srna, SPACE_NLA);
+ rna_def_userdef_theme_spaces_main(srna);
+ rna_def_userdef_theme_spaces_list_main(srna);
prop= RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
@@ -1793,7 +1916,7 @@ static void rna_def_userdef_theme_space_clip(BlenderRNA *brna)
RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Theme Clip Editor", "Theme settings for the Movie Clip Editor");
- rna_def_userdef_theme_spaces_main(srna, SPACE_CLIP);
+ rna_def_userdef_theme_spaces_main(srna);
prop= RNA_def_property(srna, "marker_outline", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "marker_outline");
@@ -1908,6 +2031,7 @@ static void rna_def_userdef_themes(BlenderRNA *brna)
prop= RNA_def_property(srna, "theme_area", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "active_theme_area");
+ RNA_def_property_flag(prop, PROP_SKIP_SAVE);
RNA_def_property_enum_items(prop, active_theme_area);
RNA_def_property_ui_text(prop, "Active Theme Area", "");
@@ -2047,6 +2171,9 @@ static void rna_def_userdef_dothemes(BlenderRNA *brna)
rna_def_userdef_theme_ui_style(brna);
rna_def_userdef_theme_ui(brna);
+
+ rna_def_userdef_theme_space_generic(brna);
+ rna_def_userdef_theme_space_list_generic(brna);
rna_def_userdef_theme_space_view3d(brna);
rna_def_userdef_theme_space_graph(brna);
@@ -2618,7 +2745,7 @@ static void rna_def_userdef_system(BlenderRNA *brna)
/* locale according to http://www.roseindia.net/tutorials/I18N/locales-list.shtml */
/* if you edit here, please also edit the source/blender/blenfont/intern/blf_lang.c 's locales */
/* Note: As this list is in alphabetical order, and not defined order,
- * here is the highest define currently in use: 28 (serbian latin). */
+ * here is the highest define currently in use: 29 (kyrgyz). */
static EnumPropertyItem language_items[] = {
{ 0, "", 0, "Nearly done", ""},
{ 0, "DEFAULT", 0, "Default (Default)", ""},
@@ -2643,6 +2770,7 @@ static void rna_def_userdef_system(BlenderRNA *brna)
{23, "GREEK", 0, "Greek (Ελληνικά)", "el_GR"},
{27, "INDONESIAN", 0, "Indonesian (Bahasa indonesia)", "id_ID"},
{ 2, "JAPANESE", 0, "Japanese (日本語)", "ja_JP"},
+ {29, "KYRGYZ", 0, "Kyrgyz (Kyrgyz tili)", "ki"},
{24, "KOREAN", 0, "Korean (한국 언어)", "ko_KR"},
{25, "NEPALI", 0, "Nepali (नेपाली)", "ne_NP"},
/* using the utf8 flipped form of Persian (فارسی) */
@@ -2655,6 +2783,12 @@ static void rna_def_userdef_system(BlenderRNA *brna)
{18, "UKRAINIAN", 0, "Ukrainian (Український)", "uk_UA"},
{ 0, NULL, 0, NULL, NULL}};
+#ifdef WITH_CYCLES
+ static EnumPropertyItem compute_device_items[] = {
+ {0, "CPU", 0, "CPU", ""},
+ { 0, NULL, 0, NULL, NULL}};
+#endif
+
srna= RNA_def_struct(brna, "UserPreferencesSystem", NULL);
RNA_def_struct_sdna(srna, "UserDef");
RNA_def_struct_nested(brna, srna, "UserPreferences");
@@ -2863,14 +2997,20 @@ static void rna_def_userdef_system(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Text Anti-aliasing", "Draw user interface text anti-aliased");
RNA_def_property_update(prop, 0, "rna_userdef_text_update");
-#if 0
- prop= RNA_def_property(srna, "verse_master", PROP_STRING, PROP_NONE);
- RNA_def_property_string_sdna(prop, NULL, "versemaster");
- RNA_def_property_ui_text(prop, "Verse Master", "Verse Master-server IP");
-
- prop= RNA_def_property(srna, "verse_username", PROP_STRING, PROP_NONE);
- RNA_def_property_string_sdna(prop, NULL, "verseuser");
- RNA_def_property_ui_text(prop, "Verse Username", "Verse user name");
+#ifdef WITH_CYCLES
+ prop= RNA_def_property(srna, "compute_device_type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_ENUM_NO_CONTEXT);
+ RNA_def_property_enum_sdna(prop, NULL, "compute_device_type");
+ RNA_def_property_enum_items(prop, compute_device_type_items);
+ RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_userdef_compute_device_type_itemf");
+ RNA_def_property_ui_text(prop, "Compute Device Type", "Device to use for computation (rendering with Cycles)");
+
+ prop= RNA_def_property(srna, "compute_device", PROP_ENUM, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_ENUM_NO_CONTEXT);
+ RNA_def_property_enum_sdna(prop, NULL, "compute_device_id");
+ RNA_def_property_enum_items(prop, compute_device_items);
+ RNA_def_property_enum_funcs(prop, "rna_userdef_compute_device_get", NULL, "rna_userdef_compute_device_itemf");
+ RNA_def_property_ui_text(prop, "Compute Device", "Device to use for computation");
#endif
}
diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c
index 8e05e43b48f..52a4a1db36b 100644
--- a/source/blender/makesrna/intern/rna_wm.c
+++ b/source/blender/makesrna/intern/rna_wm.c
@@ -371,7 +371,7 @@ EnumPropertyItem wm_report_items[] = {
{RPT_OPERATOR, "OPERATOR", 0, "Operator", ""},
{RPT_WARNING, "WARNING", 0, "Warning", ""},
{RPT_ERROR, "ERROR", 0, "Error", ""},
- {RPT_ERROR_INVALID_INPUT, "ERROR_INVALID_INPUT", 0, "Invalid Input", ""},\
+ {RPT_ERROR_INVALID_INPUT, "ERROR_INVALID_INPUT", 0, "Invalid Input", ""},
{RPT_ERROR_INVALID_CONTEXT, "ERROR_INVALID_CONTEXT", 0, "Invalid Context", ""},
{RPT_ERROR_OUT_OF_MEMORY, "ERROR_OUT_OF_MEMORY", 0, "Out of Memory", ""},
{0, NULL, 0, NULL, NULL}};