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:
authorCampbell Barton <ideasman42@gmail.com>2011-11-22 15:51:42 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-11-22 15:51:42 +0400
commitf9e00b5c99ba8dfc5bf19a59ab73d8be8f125bf3 (patch)
treecea447f44b698dcf9a69fc45db887dce638aa89e /source/blender/makesrna
parent33e74e9f938bc4e8a733b82c33b9a1113dfb5904 (diff)
parentfd742566a62151c1f2ed1f009782fc8a881fbf5a (diff)
svn merge ^/trunk/blender -r42009:42053
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/RNA_access.h1
-rw-r--r--source/blender/makesrna/RNA_enum_types.h1
-rw-r--r--source/blender/makesrna/intern/rna_armature.c6
-rw-r--r--source/blender/makesrna/intern/rna_brush.c12
-rw-r--r--source/blender/makesrna/intern/rna_define.c3
-rw-r--r--source/blender/makesrna/intern/rna_fcurve.c22
-rw-r--r--source/blender/makesrna/intern/rna_fluidsim.c32
-rw-r--r--source/blender/makesrna/intern/rna_image.c10
-rw-r--r--source/blender/makesrna/intern/rna_image_api.c8
-rw-r--r--source/blender/makesrna/intern/rna_nodetree.c51
-rw-r--r--source/blender/makesrna/intern/rna_property.c2
-rw-r--r--source/blender/makesrna/intern/rna_scene.c540
-rw-r--r--source/blender/makesrna/intern/rna_scene_api.c4
-rw-r--r--source/blender/makesrna/intern/rna_space.c6
-rw-r--r--source/blender/makesrna/intern/rna_texture_api.c2
-rw-r--r--source/blender/makesrna/intern/rna_ui_api.c8
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c2
17 files changed, 437 insertions, 273 deletions
diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h
index a0bdd819744..c0faed69885 100644
--- a/source/blender/makesrna/RNA_access.h
+++ b/source/blender/makesrna/RNA_access.h
@@ -255,6 +255,7 @@ extern StructRNA RNA_HookModifier;
extern StructRNA RNA_ID;
extern StructRNA RNA_IKParam;
extern StructRNA RNA_Image;
+extern StructRNA RNA_ImageFormatSettings;
extern StructRNA RNA_ImagePaint;
extern StructRNA RNA_ImageSequence;
extern StructRNA RNA_ImageTexture;
diff --git a/source/blender/makesrna/RNA_enum_types.h b/source/blender/makesrna/RNA_enum_types.h
index a4866238caa..91e5d06fe5e 100644
--- a/source/blender/makesrna/RNA_enum_types.h
+++ b/source/blender/makesrna/RNA_enum_types.h
@@ -53,6 +53,7 @@ extern EnumPropertyItem boidrule_type_items[];
extern EnumPropertyItem image_type_items[];
extern EnumPropertyItem image_color_mode_items[];
+extern EnumPropertyItem image_depth_mode_items[];
extern EnumPropertyItem beztriple_keyframe_type_items[];
extern EnumPropertyItem beztriple_handle_type_items[];
diff --git a/source/blender/makesrna/intern/rna_armature.c b/source/blender/makesrna/intern/rna_armature.c
index 6785f1f4caf..18ba3936e44 100644
--- a/source/blender/makesrna/intern/rna_armature.c
+++ b/source/blender/makesrna/intern/rna_armature.c
@@ -820,8 +820,8 @@ static void rna_def_armature(BlenderRNA *brna)
{ARM_WIRE, "WIRE", 0, "Wire", "Display bones as thin wires, showing subdivision and B-Splines"},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem prop_vdeformer[] = {
- {ARM_VDEF_BLENDER, "BLENDER", 0, "Blender", "Uses Blender's armature vertex deformation"},
- {ARM_VDEF_BGE_CPU, "BGE_CPU", 0, "BGE", "Uses vertex deformation code optimized for the BGE"},
+ {ARM_VDEF_BLENDER, "BLENDER", 0, "Blender", "Use Blender's armature vertex deformation"},
+ {ARM_VDEF_BGE_CPU, "BGE_CPU", 0, "BGE", "Use vertex deformation code optimized for the BGE"},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem prop_ghost_type_items[] = {
{ARM_GHOST_CUR, "CURRENT_FRAME", 0, "Around Frame",
@@ -831,7 +831,7 @@ static void rna_def_armature(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
static const EnumPropertyItem prop_pose_position_items[]= {
{0, "POSE", 0, "Pose Position", "Show armature in posed state"},
- {ARM_RESTPOS, "REST", 0, "Rest Position", "Show Armature in binding pose state. No posing possible"},
+ {ARM_RESTPOS, "REST", 0, "Rest Position", "Show Armature in binding pose state (no posing possible)"},
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "Armature", "ID");
diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c
index d4b0372d24f..60658e98c8d 100644
--- a/source/blender/makesrna/intern/rna_brush.c
+++ b/source/blender/makesrna/intern/rna_brush.c
@@ -511,14 +511,14 @@ static void rna_def_brush(BlenderRNA *brna)
RNA_def_property_float_default(prop, 0);
RNA_def_property_range(prop, -2.0f, 2.0f);
RNA_def_property_ui_range(prop, -0.5f, 0.5f, 0.001, 0.001);
- RNA_def_property_ui_text(prop, "Plane Offset", "Adjusts plane on which the brush acts towards or away from the object surface");
+ RNA_def_property_ui_text(prop, "Plane Offset", "Adjust plane on which the brush acts towards or away from the object surface");
RNA_def_property_update(prop, 0, "rna_Brush_update");
prop= RNA_def_property(srna, "plane_trim", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "plane_trim");
RNA_def_property_float_default(prop, 0.5f);
RNA_def_property_range(prop, 0, 1.0f);
- RNA_def_property_ui_text(prop, "Plane Trim", "If a vertex is further from offset plane than this then it is not affected");
+ RNA_def_property_ui_text(prop, "Plane Trim", "If a vertex is further away from offset plane than this, then it is not affected");
RNA_def_property_update(prop, 0, "rna_Brush_update");
prop= RNA_def_property(srna, "height", PROP_FLOAT, PROP_DISTANCE);
@@ -648,17 +648,17 @@ static void rna_def_brush(BlenderRNA *brna)
prop= RNA_def_property(srna, "use_persistent", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_PERSISTENT);
- RNA_def_property_ui_text(prop, "Persistent", "Sculpts on a persistent layer of the mesh");
+ RNA_def_property_ui_text(prop, "Persistent", "Sculpt on a persistent layer of the mesh");
RNA_def_property_update(prop, 0, "rna_Brush_update");
prop= RNA_def_property(srna, "use_accumulate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_ACCUMULATE);
- RNA_def_property_ui_text(prop, "Accumulate", "Accumulate stroke dabs on top of each other");
+ RNA_def_property_ui_text(prop, "Accumulate", "Accumulate stroke daubs on top of each other");
RNA_def_property_update(prop, 0, "rna_Brush_update");
prop= RNA_def_property(srna, "use_space_atten", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_SPACE_ATTEN);
- RNA_def_property_ui_text(prop, "Use Automatic Strength Adjustment", "Automatically adjusts strength to give consistent results for different spacings");
+ RNA_def_property_ui_text(prop, "Use Automatic Strength Adjustment", "Automatically adjust strength to give consistent results for different spacings");
RNA_def_property_update(prop, 0, "rna_Brush_update");
/* adaptive space is not implemented yet */
@@ -685,7 +685,7 @@ static void rna_def_brush(BlenderRNA *brna)
prop= RNA_def_property(srna, "use_restore_mesh", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_RESTORE_MESH);
- RNA_def_property_ui_text(prop, "Restore Mesh", "Allows a single dot to be carefully positioned");
+ RNA_def_property_ui_text(prop, "Restore Mesh", "Allow a single dot to be carefully positioned");
RNA_def_property_update(prop, 0, "rna_Brush_update");
prop= RNA_def_property(srna, "use_fixed_texture", PROP_BOOLEAN, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c
index 48274ffbd7a..abaeb202ffa 100644
--- a/source/blender/makesrna/intern/rna_define.c
+++ b/source/blender/makesrna/intern/rna_define.c
@@ -1504,7 +1504,8 @@ static PropertyDefRNA *rna_def_property_sdna(PropertyRNA *prop, const char *stru
return dp;
}
else {
- fprintf(stderr, "%s: \"%s.%s\" not found.\n", __func__, structname, propname);
+ fprintf(stderr, "%s: \"%s.%s\" (identifier \"%s\") not found.\n",
+ __func__, structname, propname, prop->identifier);
DefRNA.error= 1;
return NULL;
}
diff --git a/source/blender/makesrna/intern/rna_fcurve.c b/source/blender/makesrna/intern/rna_fcurve.c
index c651dca4b31..56f1efe3fed 100644
--- a/source/blender/makesrna/intern/rna_fcurve.c
+++ b/source/blender/makesrna/intern/rna_fcurve.c
@@ -637,7 +637,7 @@ static void rna_def_fmodifier_generator(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "FModifierGenerator", "FModifier");
- RNA_def_struct_ui_text(srna, "Generator F-Curve Modifier", "Deterministically generates values for the modified F-Curve");
+ RNA_def_struct_ui_text(srna, "Generator F-Modifier", "Deterministically generate values for the modified F-Curve");
RNA_def_struct_sdna_from(srna, "FMod_Generator", "data");
/* define common props */
@@ -659,7 +659,7 @@ static void rna_def_fmodifier_generator(BlenderRNA *brna)
// XXX this has a special validation func
prop= RNA_def_property(srna, "poly_order", PROP_INT, PROP_NONE);
RNA_def_property_ui_text(prop, "Polynomial Order",
- "The highest power of 'x' for this polynomial. (number of coefficients - 1)");
+ "The highest power of 'x' for this polynomial (number of coefficients - 1)");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
/* coefficients array */
@@ -689,7 +689,7 @@ static void rna_def_fmodifier_function_generator(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "FModifierFunctionGenerator", "FModifier");
- RNA_def_struct_ui_text(srna, "Built-In Function F-Modifier", "Generates values using a Built-In Function");
+ RNA_def_struct_ui_text(srna, "Built-In Function F-Modifier", "Generate values using a Built-In Function");
RNA_def_struct_sdna_from(srna, "FMod_FunctionGenerator", "data");
/* coefficients */
@@ -765,7 +765,7 @@ static void rna_def_fmodifier_envelope(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "FModifierEnvelope", "FModifier");
- RNA_def_struct_ui_text(srna, "Envelope F-Modifier", "Scales the values of the modified F-Curve");
+ RNA_def_struct_ui_text(srna, "Envelope F-Modifier", "Scale the values of the modified F-Curve");
RNA_def_struct_sdna_from(srna, "FMod_Envelope", "data");
/* Collections */
@@ -802,13 +802,13 @@ static void rna_def_fmodifier_cycles(BlenderRNA *brna)
{FCM_EXTRAPOLATE_NONE, "NONE", 0, "No Cycles", "Don't do anything"},
{FCM_EXTRAPOLATE_CYCLIC, "REPEAT", 0, "Repeat Motion", "Repeat keyframe range as-is"},
{FCM_EXTRAPOLATE_CYCLIC_OFFSET, "REPEAT_OFFSET", 0, "Repeat with Offset",
- "Repeat keyframe range, but with offset based on gradient between values"},
+ "Repeat keyframe range, but with offset based on gradient between start and end values"},
{FCM_EXTRAPOLATE_MIRROR, "MIRROR", 0, "Repeat Mirrored",
"Alternate between forward and reverse playback of keyframe range"},
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "FModifierCycles", "FModifier");
- RNA_def_struct_ui_text(srna, "Cycles F-Modifier", "Repeats the values of the modified F-Curve");
+ RNA_def_struct_ui_text(srna, "Cycles F-Modifier", "Repeat the values of the modified F-Curve");
RNA_def_struct_sdna_from(srna, "FMod_Cycles", "data");
/* before */
@@ -820,7 +820,7 @@ static void rna_def_fmodifier_cycles(BlenderRNA *brna)
prop= RNA_def_property(srna, "cycles_before", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "before_cycles");
- RNA_def_property_ui_text(prop, "Before Cycles", "Maximum number of cycles to allow before first keyframe. (0 = infinite)");
+ RNA_def_property_ui_text(prop, "Before Cycles", "Maximum number of cycles to allow before first keyframe (0 = infinite)");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
/* after */
@@ -832,7 +832,7 @@ static void rna_def_fmodifier_cycles(BlenderRNA *brna)
prop= RNA_def_property(srna, "cycles_after", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "after_cycles");
- RNA_def_property_ui_text(prop, "After Cycles", "Maximum number of cycles to allow after last keyframe. (0 = infinite)");
+ RNA_def_property_ui_text(prop, "After Cycles", "Maximum number of cycles to allow after last keyframe (0 = infinite)");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
}
@@ -844,7 +844,7 @@ static void rna_def_fmodifier_python(BlenderRNA *brna)
//PropertyRNA *prop;
srna= RNA_def_struct(brna, "FModifierPython", "FModifier");
- RNA_def_struct_ui_text(srna, "Python F-Modifier", "Performs user-defined operation on the modified F-Curve");
+ RNA_def_struct_ui_text(srna, "Python F-Modifier", "Perform user-defined operation on the modified F-Curve");
RNA_def_struct_sdna_from(srna, "FMod_Python", "data");
}
@@ -856,7 +856,7 @@ static void rna_def_fmodifier_limits(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "FModifierLimits", "FModifier");
- RNA_def_struct_ui_text(srna, "Limits F-Modifier", "Limits the time/value ranges of the modified F-Curve");
+ RNA_def_struct_ui_text(srna, "Limit F-Modifier", "Limit the time/value ranges of the modified F-Curve");
RNA_def_struct_sdna_from(srna, "FMod_Limits", "data");
prop= RNA_def_property(srna, "use_min_x", PROP_BOOLEAN, PROP_NONE);
@@ -919,7 +919,7 @@ static void rna_def_fmodifier_noise(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "FModifierNoise", "FModifier");
- RNA_def_struct_ui_text(srna, "Noise F-Modifier", "Gives randomness to the modified F-Curve");
+ RNA_def_struct_ui_text(srna, "Noise F-Modifier", "Give randomness to the modified F-Curve");
RNA_def_struct_sdna_from(srna, "FMod_Noise", "data");
prop= RNA_def_property(srna, "blend_type", PROP_ENUM, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_fluidsim.c b/source/blender/makesrna/intern/rna_fluidsim.c
index 09f339fa7db..428f56b5130 100644
--- a/source/blender/makesrna/intern/rna_fluidsim.c
+++ b/source/blender/makesrna/intern/rna_fluidsim.c
@@ -218,9 +218,9 @@ static void rna_def_fluidsim_slip(StructRNA *srna)
PropertyRNA *prop;
static EnumPropertyItem slip_items[] = {
- {OB_FSBND_NOSLIP, "NOSLIP", 0, "No Slip", "Obstacle causes zero normal and tangential velocity (=sticky). Default for all. Only option for moving objects"},
- {OB_FSBND_PARTSLIP, "PARTIALSLIP", 0, "Partial Slip", "Mix between no-slip and free-slip. Non moving objects only!"},
- {OB_FSBND_FREESLIP, "FREESLIP", 0, "Free Slip", "Obstacle only causes zero normal velocity (=not sticky). Non moving objects only!"},
+ {OB_FSBND_NOSLIP, "NOSLIP", 0, "No Slip", "Obstacle causes zero normal and tangential velocity (=sticky), default for all (only option for moving objects)"},
+ {OB_FSBND_PARTSLIP, "PARTIALSLIP", 0, "Partial Slip", "Mix between no-slip and free-slip (non moving objects only!)"},
+ {OB_FSBND_FREESLIP, "FREESLIP", 0, "Free Slip", "Obstacle only causes zero normal velocity (=not sticky, non moving objects only!)"},
{0, NULL, 0, NULL, NULL}};
prop= RNA_def_property(srna, "slip_type", PROP_ENUM, PROP_NONE);
@@ -353,7 +353,7 @@ static void rna_def_fluidsim_domain(BlenderRNA *brna)
prop= RNA_def_property(srna, "viscosity_exponent", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "viscosityExponent");
RNA_def_property_range(prop, 0, 10);
- RNA_def_property_ui_text(prop, "Viscosity Exponent", "Negative exponent for the viscosity value (to simplify entering small values e.g. 5*10^-6.)");
+ RNA_def_property_ui_text(prop, "Viscosity Exponent", "Negative exponent for the viscosity value (to simplify entering small values e.g. 5*10^-6)");
prop= RNA_def_property(srna, "grid_levels", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "maxRefine");
@@ -365,7 +365,7 @@ static void rna_def_fluidsim_domain(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "gstar");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 0.001, 0.1);
- RNA_def_property_ui_text(prop, "Compressibility", "Allowed compressibility due to gravitational force for standing fluid. (directly affects simulation step size)");
+ RNA_def_property_ui_text(prop, "Compressibility", "Allowed compressibility due to gravitational force for standing fluid (directly affects simulation step size)");
/* domain boundary settings */
@@ -375,13 +375,13 @@ static void rna_def_fluidsim_domain(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "surfaceSmoothing");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 0.0, 5.0);
- RNA_def_property_ui_text(prop, "Surface Smoothing", "Amount of surface smoothing. A value of 0 is off, 1 is normal smoothing and more than 1 is extra smoothing");
+ RNA_def_property_ui_text(prop, "Surface Smoothing", "Amount of surface smoothing (a value of 0 is off, 1 is normal smoothing and more than 1 is extra smoothing)");
prop= RNA_def_property(srna, "surface_subdivisions", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "surfaceSubdivs");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 0, 5);
- RNA_def_property_ui_text(prop, "Surface Subdivisions", "Number of isosurface subdivisions. This is necessary for the inclusion of particles into the surface generation. Warning - can lead to longer computation times!");
+ RNA_def_property_ui_text(prop, "Surface Subdivisions", "Number of isosurface subdivisions (this is necessary for the inclusion of particles into the surface generation - WARNING: can lead to longer computation times !)");
prop= RNA_def_property(srna, "use_speed_vectors", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "domainNovecgen", 0);
@@ -435,7 +435,7 @@ static void rna_def_fluidsim_volume(StructRNA *srna)
prop= RNA_def_property(srna, "use_animated_mesh", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "domainNovecgen", 0);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
- RNA_def_property_ui_text(prop, "Export Animated Mesh", "Export this mesh as an animated one. Slower, only use if really necessary (e.g. armatures or parented objects), animated pos/rot/scale IPOs do not require it");
+ RNA_def_property_ui_text(prop, "Export Animated Mesh", "Export this mesh as an animated one (slower, only use if really necessary [e.g. armatures or parented objects], animated pos/rot/scale F-Curves do not require it)");
}
static void rna_def_fluidsim_active(StructRNA *srna)
@@ -483,7 +483,7 @@ static void rna_def_fluidsim_obstacle(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "surfaceSmoothing");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, -2.0, 10.0);
- RNA_def_property_ui_text(prop, "Impact Factor", "This is an unphysical value for moving objects - it controls the impact an obstacle has on the fluid, =0 behaves a bit like outflow (deleting fluid), =1 is default, while >1 results in high forces. Can be used to tweak total mass");
+ RNA_def_property_ui_text(prop, "Impact Factor", "This is an unphysical value for moving objects - it controls the impact an obstacle has on the fluid, =0 behaves a bit like outflow (deleting fluid), =1 is default, while >1 results in high forces (can be used to tweak total mass)");
}
static void rna_def_fluidsim_inflow(BlenderRNA *brna)
@@ -507,7 +507,7 @@ static void rna_def_fluidsim_inflow(BlenderRNA *brna)
prop= RNA_def_property(srna, "use_local_coords", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_boolean_sdna(prop, NULL, "typeFlags", OB_FSINFLOW_LOCALCOORD);
- RNA_def_property_ui_text(prop, "Local Coordinates", "Use local coordinates for inflow. (e.g. for rotating objects)");
+ RNA_def_property_ui_text(prop, "Local Coordinates", "Use local coordinates for inflow (e.g. for rotating objects)");
}
static void rna_def_fluidsim_outflow(BlenderRNA *brna)
@@ -551,7 +551,7 @@ static void rna_def_fluidsim_particle(BlenderRNA *brna)
prop= RNA_def_property(srna, "alpha_influence", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "particleInfAlpha");
RNA_def_property_range(prop, 0.0, 2.0);
- RNA_def_property_ui_text(prop, "Alpha Influence", "Amount of particle alpha change, inverse of size influence: 0=off (all same alpha), 1=full. (large particles get lower alphas, smaller ones higher values)");
+ RNA_def_property_ui_text(prop, "Alpha Influence", "Amount of particle alpha change, inverse of size influence: 0=off (all same alpha), 1=full (large particles get lower alphas, smaller ones higher values)");
prop= RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
RNA_def_property_string_maxlength(prop, 240);
@@ -574,12 +574,12 @@ static void rna_def_fluidsim_control(BlenderRNA *brna)
prop= RNA_def_property(srna, "start_time", PROP_FLOAT, PROP_TIME);
RNA_def_property_float_sdna(prop, NULL, "cpsTimeStart");
RNA_def_property_range(prop, 0.0, 100.0);
- RNA_def_property_ui_text(prop, "Start Time", "Specifies time when the control particles are activated");
+ RNA_def_property_ui_text(prop, "Start Time", "Time when the control particles are activated");
prop= RNA_def_property(srna, "end_time", PROP_FLOAT, PROP_TIME);
RNA_def_property_float_sdna(prop, NULL, "cpsTimeEnd");
RNA_def_property_range(prop, 0.0, 100.0);
- RNA_def_property_ui_text(prop, "End Time", "Specifies time when the control particles are deactivated");
+ RNA_def_property_ui_text(prop, "End Time", "Time when the control particles are deactivated");
prop= RNA_def_property(srna, "attraction_strength", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "attractforceStrength");
@@ -589,7 +589,7 @@ static void rna_def_fluidsim_control(BlenderRNA *brna)
prop= RNA_def_property(srna, "attraction_radius", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "attractforceRadius");
RNA_def_property_range(prop, 0.0, 10.0);
- RNA_def_property_ui_text(prop, "Attraction Radius", "Specifies the force field radius around the control object");
+ RNA_def_property_ui_text(prop, "Attraction Radius", "Force field radius around the control object");
prop= RNA_def_property(srna, "velocity_strength", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "velocityforceStrength");
@@ -599,13 +599,13 @@ static void rna_def_fluidsim_control(BlenderRNA *brna)
prop= RNA_def_property(srna, "velocity_radius", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "velocityforceRadius");
RNA_def_property_range(prop, 0.0, 10.0);
- RNA_def_property_ui_text(prop, "Velocity Radius", "Specifies the force field radius around the control object");
+ RNA_def_property_ui_text(prop, "Velocity Radius", "Force field radius around the control object");
prop= RNA_def_property(srna, "quality", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "cpsQuality");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 5.0, 100.0);
- RNA_def_property_ui_text(prop, "Quality", "Specifies the quality which is used for object sampling. (higher = better but slower)");
+ RNA_def_property_ui_text(prop, "Quality", "Quality which is used for object sampling (higher = better but slower)");
prop= RNA_def_property(srna, "use_reverse_frames", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", OB_FLUIDSIM_REVERSE);
diff --git a/source/blender/makesrna/intern/rna_image.c b/source/blender/makesrna/intern/rna_image.c
index ad6f459f851..737ce73ff1d 100644
--- a/source/blender/makesrna/intern/rna_image.c
+++ b/source/blender/makesrna/intern/rna_image.c
@@ -258,20 +258,20 @@ static int rna_Image_depth_get(PointerRNA *ptr)
Image *im= (Image*)ptr->data;
ImBuf *ibuf;
void *lock;
- int depth;
+ int planes;
ibuf= BKE_image_acquire_ibuf(im, NULL, &lock);
if(!ibuf)
- depth= 0;
+ planes= 0;
else if(ibuf->rect_float)
- depth= ibuf->depth * 4;
+ planes= ibuf->planes * 4;
else
- depth= ibuf->depth;
+ planes= ibuf->planes;
BKE_image_release_ibuf(im, lock);
- return depth;
+ return planes;
}
static int rna_Image_pixels_get_length(PointerRNA *ptr, int length[RNA_MAX_ARRAY_DIMENSION])
diff --git a/source/blender/makesrna/intern/rna_image_api.c b/source/blender/makesrna/intern/rna_image_api.c
index 07271cb1aca..91aa9daac25 100644
--- a/source/blender/makesrna/intern/rna_image_api.c
+++ b/source/blender/makesrna/intern/rna_image_api.c
@@ -82,14 +82,14 @@ static void rna_Image_save_render(Image *image, bContext *C, ReportList *reports
}
else {
/* temp swap out the color */
- const unsigned char imb_depth_back= ibuf->depth;
+ const unsigned char imb_planes_back= ibuf->planes;
const float dither_back= ibuf->dither;
- ibuf->depth= scene->r.planes;
+ ibuf->planes= scene->r.im_format.planes;
ibuf->dither= scene->r.dither_intensity;
- if (!BKE_write_ibuf(ibuf, path, scene->r.imtype, scene->r.subimtype, scene->r.quality)) {
+ if (!BKE_write_ibuf(ibuf, path, &scene->r.im_format)) {
BKE_reportf(reports, RPT_ERROR, "Couldn't write image: %s", path);
}
- ibuf->depth= imb_depth_back;
+ ibuf->planes= imb_planes_back;
ibuf->dither= dither_back;
}
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index 30889bb25f6..cd1b74f2b38 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -1688,30 +1688,6 @@ static void def_cmp_output_file(StructRNA *srna)
{
PropertyRNA *prop;
- static EnumPropertyItem type_items[] = {
- {R_TARGA, "TARGA", 0, "Targa", ""},
- {R_RAWTGA, "RAW_TARGA", 0, "Targa Raw", ""},
- {R_PNG, "PNG", 0, "PNG", ""},
-#ifdef WITH_DDS
- {R_DDS, "DDS", 0, "DirectDraw Surface", ""},
-#endif
- {R_BMP, "BMP", 0, "BMP", ""},
- {R_JPEG90, "JPEG", 0, "JPEG", ""},
- {R_IRIS, "IRIS", 0, "IRIS", ""},
- {R_RADHDR, "RADIANCE_HDR", 0, "Radiance HDR", ""},
- {R_CINEON, "CINEON", 0, "Cineon", ""},
- {R_DPX, "DPX", 0, "DPX", ""},
- {R_OPENEXR, "OPENEXR", 0, "OpenEXR", ""},
- {0, NULL, 0, NULL, NULL}};
-
- static EnumPropertyItem openexr_codec_items[] = {
- {0, "NONE", 0, "None", ""},
- {1, "PXR24", 0, "Pxr24 (lossy)", ""},
- {2, "ZIP", 0, "ZIP (lossless)", ""},
- {3, "PIZ", 0, "PIZ (lossless)", ""},
- {4, "RLE", 0, "RLE (lossless)", ""},
- {0, NULL, 0, NULL, NULL}};
-
RNA_def_struct_sdna_from(srna, "NodeImageFile", "storage");
prop = RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
@@ -1719,28 +1695,11 @@ static void def_cmp_output_file(StructRNA *srna)
RNA_def_property_ui_text(prop, "File Path", "Output path for the image, same functionality as render output");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
- prop = RNA_def_property(srna, "image_type", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "imtype");
- RNA_def_property_enum_items(prop, type_items);
- RNA_def_property_ui_text(prop, "Image Type", "");
- RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
-
- prop = RNA_def_property(srna, "use_exr_half", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "subimtype", R_OPENEXR_HALF);
- RNA_def_property_ui_text(prop, "Half", "");
- RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
-
- prop = RNA_def_property(srna, "exr_codec", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "codec");
- RNA_def_property_enum_items(prop, openexr_codec_items);
- RNA_def_property_ui_text(prop, "Codec", "");
- RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
-
- prop = RNA_def_property(srna, "quality", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "quality");
- RNA_def_property_range(prop, 1, 100);
- RNA_def_property_ui_text(prop, "Quality", "");
- RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
+ prop= RNA_def_property(srna, "image_settings", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
+ RNA_def_property_pointer_sdna(prop, NULL, "im_format");
+ RNA_def_property_struct_type(prop, "ImageFormatSettings");
+ RNA_def_property_ui_text(prop, "Image Format", "");
prop = RNA_def_property(srna, "frame_start", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "sfra");
diff --git a/source/blender/makesrna/intern/rna_property.c b/source/blender/makesrna/intern/rna_property.c
index 3566197659c..e8ef61b6d74 100644
--- a/source/blender/makesrna/intern/rna_property.c
+++ b/source/blender/makesrna/intern/rna_property.c
@@ -153,7 +153,7 @@ void RNA_def_gameproperty(BlenderRNA *brna)
/* GameFloatProperty */
srna= RNA_def_struct(brna, "GameFloatProperty", "GameProperty");
- RNA_def_struct_ui_text(srna, "Game Float Property", "Game engine user defined floating pointer number property");
+ RNA_def_struct_ui_text(srna, "Game Float Property", "Game engine user defined floating point number property");
RNA_def_struct_sdna(srna, "bProperty");
prop= RNA_def_property(srna, "value", PROP_FLOAT, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index ee3193b5429..f9b88e19248 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -104,65 +104,124 @@ EnumPropertyItem snap_element_items[] = {
{SCE_SNAP_MODE_VOLUME, "VOLUME", ICON_SNAP_VOLUME, "Volume", "Snap to volume"},
{0, NULL, 0, NULL, NULL}};
+
+/* note on duplicate block, perhaps we should use some trick to avoid
+ * the duplicate, but with the inline defines it becomes very tricky
+ * this awaits someone who has very good preprocessor-fu.
+ * for now just make sure they stay in sync - campbell */
+
+EnumPropertyItem image_only_type_items[] = {
+
+
+ /* --- duplicate block warning (see below) --- */
+#define IMAGE_TYPE_ITEMS_IMAGE_ONLY
+ {R_IMF_IMTYPE_BMP, "BMP", ICON_FILE_IMAGE, "BMP", "Output image in bitmap format"},
+#ifdef WITH_DDS
+ {R_IMF_IMTYPE_DDS, "DDS", ICON_FILE_IMAGE, "DDS", "Output image in DDS format"},
+#endif
+ {R_IMF_IMTYPE_IRIS, "IRIS", ICON_FILE_IMAGE, "Iris", "Output image in (old!) SGI IRIS format"},
+ {R_IMF_IMTYPE_PNG, "PNG", ICON_FILE_IMAGE, "PNG", "Output image in PNG format"},
+ {R_IMF_IMTYPE_JPEG90, "JPEG", ICON_FILE_IMAGE, "JPEG", "Output image in JPEG format"},
+#ifdef WITH_OPENJPEG
+ {R_IMF_IMTYPE_JP2, "JPEG2000", ICON_FILE_IMAGE, "JPEG 2000", "Output image in JPEG 2000 format"},
+#endif
+ {R_IMF_IMTYPE_TARGA, "TARGA", ICON_FILE_IMAGE, "Targa", "Output image in Targa format"},
+ {R_IMF_IMTYPE_RAWTGA, "TARGA_RAW", ICON_FILE_IMAGE, "Targa Raw", "Output image in uncompressed Targa format"},
+ {0, "", 0, " ", NULL},
+#ifdef WITH_CINEON
+ {R_IMF_IMTYPE_CINEON, "CINEON", ICON_FILE_IMAGE, "Cineon", "Output image in Cineon format"},
+ {R_IMF_IMTYPE_DPX, "DPX",ICON_FILE_IMAGE, "DPX", "Output image in DPX format"},
+#endif
+#ifdef WITH_OPENEXR
+ {R_IMF_IMTYPE_MULTILAYER, "MULTILAYER", ICON_FILE_IMAGE, "MultiLayer", "Output image in multilayer OpenEXR format"},
+ {R_IMF_IMTYPE_OPENEXR, "OPEN_EXR", ICON_FILE_IMAGE, "OpenEXR", "Output image in OpenEXR format"},
+#endif
+#ifdef WITH_HDR
+ {R_IMF_IMTYPE_RADHDR, "HDR", ICON_FILE_IMAGE, "Radiance HDR", "Output image in Radiance HDR format"},
+#endif
+#ifdef WITH_TIFF
+ {R_IMF_IMTYPE_TIFF, "TIFF", ICON_FILE_IMAGE, "TIFF", "Output image in TIFF format"},
+#endif
+ /* --- end duplicate block (see below) --- */
+
+
+ {0, NULL, 0, NULL, NULL}};
+
EnumPropertyItem image_type_items[] = {
{0, "", 0, "Image", NULL},
- {R_BMP, "BMP", ICON_FILE_IMAGE, "BMP", "Output image in bitmap format"},
+
+
+ /* --- duplicate block warning (see above) --- */
+#define IMAGE_TYPE_ITEMS_IMAGE_ONLY
+ {R_IMF_IMTYPE_BMP, "BMP", ICON_FILE_IMAGE, "BMP", "Output image in bitmap format"},
#ifdef WITH_DDS
- {R_DDS, "DDS", ICON_FILE_IMAGE, "DDS", "Output image in DDS format"},
+ {R_IMF_IMTYPE_DDS, "DDS", ICON_FILE_IMAGE, "DDS", "Output image in DDS format"},
#endif
- {R_IRIS, "IRIS", ICON_FILE_IMAGE, "Iris", "Output image in (old!) SGI IRIS format"},
- {R_PNG, "PNG", ICON_FILE_IMAGE, "PNG", "Output image in PNG format"},
- {R_JPEG90, "JPEG", ICON_FILE_IMAGE, "JPEG", "Output image in JPEG format"},
+ {R_IMF_IMTYPE_IRIS, "IRIS", ICON_FILE_IMAGE, "Iris", "Output image in (old!) SGI IRIS format"},
+ {R_IMF_IMTYPE_PNG, "PNG", ICON_FILE_IMAGE, "PNG", "Output image in PNG format"},
+ {R_IMF_IMTYPE_JPEG90, "JPEG", ICON_FILE_IMAGE, "JPEG", "Output image in JPEG format"},
#ifdef WITH_OPENJPEG
- {R_JP2, "JPEG2000", ICON_FILE_IMAGE, "JPEG 2000", "Output image in JPEG 2000 format"},
+ {R_IMF_IMTYPE_JP2, "JPEG2000", ICON_FILE_IMAGE, "JPEG 2000", "Output image in JPEG 2000 format"},
#endif
- {R_TARGA, "TARGA", ICON_FILE_IMAGE, "Targa", "Output image in Targa format"},
- {R_RAWTGA, "TARGA_RAW", ICON_FILE_IMAGE, "Targa Raw", "Output image in uncompressed Targa format"},
+ {R_IMF_IMTYPE_TARGA, "TARGA", ICON_FILE_IMAGE, "Targa", "Output image in Targa format"},
+ {R_IMF_IMTYPE_RAWTGA, "TARGA_RAW", ICON_FILE_IMAGE, "Targa Raw", "Output image in uncompressed Targa format"},
{0, "", 0, " ", NULL},
#ifdef WITH_CINEON
- {R_CINEON, "CINEON", ICON_FILE_IMAGE, "Cineon", "Output image in Cineon format"},
- {R_DPX, "DPX",ICON_FILE_IMAGE, "DPX", "Output image in DPX format"},
+ {R_IMF_IMTYPE_CINEON, "CINEON", ICON_FILE_IMAGE, "Cineon", "Output image in Cineon format"},
+ {R_IMF_IMTYPE_DPX, "DPX",ICON_FILE_IMAGE, "DPX", "Output image in DPX format"},
#endif
#ifdef WITH_OPENEXR
- {R_MULTILAYER, "MULTILAYER", ICON_FILE_IMAGE, "MultiLayer", "Output image in multilayer OpenEXR format"},
- {R_OPENEXR, "OPEN_EXR", ICON_FILE_IMAGE, "OpenEXR", "Output image in OpenEXR format"},
+ {R_IMF_IMTYPE_MULTILAYER, "MULTILAYER", ICON_FILE_IMAGE, "MultiLayer", "Output image in multilayer OpenEXR format"},
+ {R_IMF_IMTYPE_OPENEXR, "OPEN_EXR", ICON_FILE_IMAGE, "OpenEXR", "Output image in OpenEXR format"},
#endif
#ifdef WITH_HDR
- {R_RADHDR, "HDR", ICON_FILE_IMAGE, "Radiance HDR", "Output image in Radiance HDR format"},
+ {R_IMF_IMTYPE_RADHDR, "HDR", ICON_FILE_IMAGE, "Radiance HDR", "Output image in Radiance HDR format"},
#endif
#ifdef WITH_TIFF
- {R_TIFF, "TIFF", ICON_FILE_IMAGE, "TIFF", "Output image in TIFF format"},
+ {R_IMF_IMTYPE_TIFF, "TIFF", ICON_FILE_IMAGE, "TIFF", "Output image in TIFF format"},
#endif
+ /* --- end duplicate block (see above) --- */
+
+
{0, "", 0, "Movie", NULL},
#ifdef _WIN32
- {R_AVICODEC, "AVICODEC", ICON_FILE_MOVIE, "AVI Codec", "Output video in AVI format"}, // XXX Missing codec menu
+ {R_IMF_IMTYPE_AVICODEC, "AVICODEC", ICON_FILE_MOVIE, "AVI Codec", "Output video in AVI format"}, // XXX Missing codec menu
#endif
- {R_AVIJPEG, "AVI_JPEG", ICON_FILE_MOVIE, "AVI JPEG", "Output video in AVI JPEG format"},
- {R_AVIRAW, "AVI_RAW", ICON_FILE_MOVIE, "AVI Raw", "Output video in AVI Raw format"},
+ {R_IMF_IMTYPE_AVIJPEG, "AVI_JPEG", ICON_FILE_MOVIE, "AVI JPEG", "Output video in AVI JPEG format"},
+ {R_IMF_IMTYPE_AVIRAW, "AVI_RAW", ICON_FILE_MOVIE, "AVI Raw", "Output video in AVI Raw format"},
#ifdef WITH_FRAMESERVER
- {R_FRAMESERVER, "FRAMESERVER", ICON_FILE_SCRIPT, "Frame Server", "Output image to a frameserver"},
+ {R_IMF_IMTYPE_FRAMESERVER, "FRAMESERVER", ICON_FILE_SCRIPT, "Frame Server", "Output image to a frameserver"},
#endif
#ifdef WITH_FFMPEG
- {R_H264, "H264", ICON_FILE_MOVIE, "H.264", "Output video in H.264 format"},
- {R_FFMPEG, "FFMPEG", ICON_FILE_MOVIE, "MPEG", "Output video in MPEG format"},
- {R_THEORA, "THEORA", ICON_FILE_MOVIE, "Ogg Theora", "Output video in Ogg format"},
+ {R_IMF_IMTYPE_H264, "H264", ICON_FILE_MOVIE, "H.264", "Output video in H.264 format"},
+ {R_IMF_IMTYPE_FFMPEG, "FFMPEG", ICON_FILE_MOVIE, "MPEG", "Output video in MPEG format"},
+ {R_IMF_IMTYPE_THEORA, "THEORA", ICON_FILE_MOVIE, "Ogg Theora", "Output video in Ogg format"},
#endif
#ifdef WITH_QUICKTIME
# ifdef USE_QTKIT
- {R_QUICKTIME, "QUICKTIME_QTKIT", ICON_FILE_MOVIE, "QuickTime", "Output video in Quicktime format"},
+ {R_IMF_IMTYPE_QUICKTIME, "QUICKTIME_QTKIT", ICON_FILE_MOVIE, "QuickTime", "Output video in Quicktime format"},
# else
- {R_QUICKTIME, "QUICKTIME_CARBON", ICON_FILE_MOVIE, "QuickTime", "Output video in Quicktime format"},
+ {R_IMF_IMTYPE_QUICKTIME, "QUICKTIME_CARBON", ICON_FILE_MOVIE, "QuickTime", "Output video in Quicktime format"},
# endif
#endif
#ifdef WITH_FFMPEG
- {R_XVID, "XVID", ICON_FILE_MOVIE, "Xvid", "Output video in Xvid format"},
+ {R_IMF_IMTYPE_XVID, "XVID", ICON_FILE_MOVIE, "Xvid", "Output video in Xvid format"},
#endif
{0, NULL, 0, NULL, NULL}};
EnumPropertyItem image_color_mode_items[] ={
- {R_PLANESBW, "BW", 0, "BW", "Images get saved in 8 bits grayscale (only PNG, JPEG, TGA, TIF)"},
- {R_PLANES24, "RGB", 0, "RGB", "Images are saved with RGB (color) data"},
- {R_PLANES32, "RGBA", 0, "RGBA", "Images are saved with RGB and Alpha data (if supported)"},
+ {R_IMF_PLANES_BW, "BW", 0, "BW", "Images get saved in 8 bits grayscale (only PNG, JPEG, TGA, TIF)"},
+ {R_IMF_PLANES_RGB, "RGB", 0, "RGB", "Images are saved with RGB (color) data"},
+ {R_IMF_PLANES_RGBA, "RGBA", 0, "RGBA", "Images are saved with RGB and Alpha data (if supported)"},
+ {0, NULL, 0, NULL, NULL}};
+
+EnumPropertyItem image_color_depth_items[] = {
+ /* 1 (monochrome) not used */
+ {R_IMF_CHAN_DEPTH_8, "8", 0, "8", "8 bit color channels"},
+ {R_IMF_CHAN_DEPTH_12, "12", 0, "12", "12 bit color channels"},
+ {R_IMF_CHAN_DEPTH_16, "16", 0, "16", "16 bit color channels"},
+ /* 24 not used */
+ {R_IMF_CHAN_DEPTH_32, "32", 0, "32", "32 bit color channels"},
{0, NULL, 0, NULL, NULL}};
#ifdef RNA_RUNTIME
@@ -531,7 +590,7 @@ static int rna_RenderSettings_threads_get(PointerRNA *ptr)
static int rna_RenderSettings_is_movie_fomat_get(PointerRNA *ptr)
{
RenderData *rd= (RenderData*)ptr->data;
- return BKE_imtype_is_movie(rd->imtype);
+ return BKE_imtype_is_movie(rd->im_format.imtype);
}
static int rna_RenderSettings_save_buffers_get(PointerRNA *ptr)
@@ -550,71 +609,156 @@ static int rna_RenderSettings_full_sample_get(PointerRNA *ptr)
return (rd->scemode & R_FULL_SAMPLE) && !(rd->mode & R_BORDER);
}
-static void rna_RenderSettings_file_format_set(PointerRNA *ptr, int value)
+static void rna_ImageFormatSettings_file_format_set(PointerRNA *ptr, int value)
{
- RenderData *rd= (RenderData*)ptr->data;
+ ImageFormatData *imf= (ImageFormatData *)ptr->data;
+ ID *id= ptr->id.data;
+
+ imf->imtype= value;
+
+ /* ensure depth and color settings match */
+ if (!BKE_imtype_supports_alpha(imf->imtype)) {
+ imf->planes= R_IMF_PLANES_RGB;
+ }
+
+ /* ensure usable depth */
+ {
+ const int depth_ok= BKE_imtype_valid_depths(imf->imtype);
+ if ((imf->depth & depth_ok) == 0) {
+ /* set first available depth */
+ char depth_ls[]= {R_IMF_CHAN_DEPTH_32,
+ R_IMF_CHAN_DEPTH_24,
+ R_IMF_CHAN_DEPTH_16,
+ R_IMF_CHAN_DEPTH_12,
+ R_IMF_CHAN_DEPTH_8,
+ R_IMF_CHAN_DEPTH_1,
+ 0};
+ int i;
+
+ for (i= 0; depth_ls[i]; i++) {
+ if (depth_ok & depth_ls[i]) {
+ imf->depth= depth_ls[i];
+ break;
+ }
+ }
+ }
+ }
- rd->imtype= value;
+ if (id && GS(id->name) == ID_SCE) {
+ Scene *scene= ptr->id.data;
+ RenderData *rd= &scene->r;
#ifdef WITH_FFMPEG
- ffmpeg_verify_image_type(rd);
+ ffmpeg_verify_image_type(rd);
#endif
#ifdef WITH_QUICKTIME
- quicktime_verify_image_type(rd);
+ quicktime_verify_image_type(rd);
#endif
+ (void)rd;
+ }
}
-static int rna_SceneRender_file_ext_length(PointerRNA *ptr)
+static EnumPropertyItem *rna_ImageFormatSettings_file_format_itemf(bContext *C, PointerRNA *ptr,
+ PropertyRNA *UNUSED(prop), int *free)
{
- RenderData *rd= (RenderData*)ptr->data;
- char ext[8];
- ext[0]= '\0';
- BKE_add_image_extension(ext, rd->imtype);
- return strlen(ext);
+ ID *id= ptr->id.data;
+ if (id && GS(id->name) == ID_SCE) {
+ return image_type_items;
+ }
+ else {
+ return image_only_type_items;
+ }
}
-static void rna_SceneRender_file_ext_get(PointerRNA *ptr, char *str)
+static EnumPropertyItem *rna_ImageFormatSettings_color_mode_itemf(bContext *C, PointerRNA *ptr,
+ PropertyRNA *UNUSED(prop), int *free)
{
- RenderData *rd= (RenderData*)ptr->data;
- str[0]= '\0';
- BKE_add_image_extension(str, rd->imtype);
+ ImageFormatData *imf= (ImageFormatData *)ptr->data;
+
+ if ((imf == NULL) || BKE_imtype_supports_alpha(imf->imtype)) {
+ return image_color_mode_items;
+ }
+ else {
+ static EnumPropertyItem color_mode_items[] ={
+ {R_IMF_PLANES_BW, "BW", 0, "BW", "Images get saved in 8 bits grayscale (only PNG, JPEG, TGA, TIF)"},
+ {R_IMF_PLANES_RGB, "RGB", 0, "RGB", "Images are saved with RGB (color) data"},
+ {0, NULL, 0, NULL, NULL}};
+ return color_mode_items;
+ }
}
-void rna_RenderSettings_jpeg2k_preset_update(RenderData *rd)
+static EnumPropertyItem *rna_ImageFormatSettings_color_depth_itemf(bContext *C, PointerRNA *ptr,
+ PropertyRNA *UNUSED(prop), int *free)
{
- rd->subimtype &= ~(R_JPEG2K_12BIT|R_JPEG2K_16BIT | R_JPEG2K_CINE_PRESET|R_JPEG2K_CINE_48FPS);
-
- switch(rd->jp2_depth) {
- case 8: break;
- case 12: rd->subimtype |= R_JPEG2K_12BIT; break;
- case 16: rd->subimtype |= R_JPEG2K_16BIT; break;
+ ImageFormatData *imf= (ImageFormatData *)ptr->data;
+
+ if (imf == NULL) {
+ return image_color_depth_items;
}
-
- switch(rd->jp2_preset) {
- case 1: rd->subimtype |= R_JPEG2K_CINE_PRESET; break;
- case 2: rd->subimtype |= R_JPEG2K_CINE_PRESET|R_JPEG2K_CINE_48FPS; break;
- case 3: rd->subimtype |= R_JPEG2K_CINE_PRESET; break;
- case 4: rd->subimtype |= R_JPEG2K_CINE_PRESET; break;
- case 5: rd->subimtype |= R_JPEG2K_CINE_PRESET|R_JPEG2K_CINE_48FPS; break;
- case 6: rd->subimtype |= R_JPEG2K_CINE_PRESET; break;
- case 7: rd->subimtype |= R_JPEG2K_CINE_PRESET|R_JPEG2K_CINE_48FPS; break;
+ else {
+ const int depth_ok= BKE_imtype_valid_depths(imf->imtype);
+ const int is_float= ELEM3(imf->imtype, R_IMF_IMTYPE_RADHDR, R_IMF_IMTYPE_OPENEXR, R_IMF_IMTYPE_MULTILAYER);
+
+ EnumPropertyItem *item_8bit= &image_color_depth_items[0];
+ EnumPropertyItem *item_12bit= &image_color_depth_items[1];
+ EnumPropertyItem *item_16bit= &image_color_depth_items[2];
+ EnumPropertyItem *item_32bit= &image_color_depth_items[3];
+
+ int totitem= 0;
+ EnumPropertyItem *item= NULL;
+ EnumPropertyItem tmp = {0, "", 0, "", ""};
+
+ if (depth_ok & R_IMF_CHAN_DEPTH_8) {
+ RNA_enum_item_add(&item, &totitem, item_8bit);
+ }
+
+ if (depth_ok & R_IMF_CHAN_DEPTH_12) {
+ RNA_enum_item_add(&item, &totitem, item_12bit);
+ }
+
+ if (depth_ok & R_IMF_CHAN_DEPTH_16) {
+ if (is_float) {
+ tmp= *item_16bit;
+ tmp.name= "Float (Half)";
+ RNA_enum_item_add(&item, &totitem, &tmp);
+ }
+ else {
+ RNA_enum_item_add(&item, &totitem, item_16bit);
+ }
+ }
+
+ if (depth_ok & R_IMF_CHAN_DEPTH_32) {
+ if (is_float) {
+ tmp= *item_32bit;
+ tmp.name= "Float (Full)";
+ RNA_enum_item_add(&item, &totitem, &tmp);
+ }
+ else {
+ RNA_enum_item_add(&item, &totitem, item_32bit);
+ }
+ }
+
+ RNA_enum_item_end(&item, &totitem);
+ *free= 1;
+
+ return item;
}
}
-#ifdef WITH_OPENJPEG
-static void rna_RenderSettings_jpeg2k_preset_set(PointerRNA *ptr, int value)
+static int rna_SceneRender_file_ext_length(PointerRNA *ptr)
{
RenderData *rd= (RenderData*)ptr->data;
- rd->jp2_preset= value;
- rna_RenderSettings_jpeg2k_preset_update(rd);
+ char ext[8];
+ ext[0]= '\0';
+ BKE_add_image_extension(ext, rd->im_format.imtype);
+ return strlen(ext);
}
-static void rna_RenderSettings_jpeg2k_depth_set(PointerRNA *ptr, int value)
+static void rna_SceneRender_file_ext_get(PointerRNA *ptr, char *str)
{
RenderData *rd= (RenderData*)ptr->data;
- rd->jp2_depth= value;
- rna_RenderSettings_jpeg2k_preset_update(rd);
+ str[0]= '\0';
+ BKE_add_image_extension(str, rd->im_format.imtype);
}
-#endif
#ifdef WITH_QUICKTIME
static int rna_RenderSettings_qtcodecsettings_codecType_get(PointerRNA *ptr)
@@ -2248,6 +2392,138 @@ static void rna_def_render_layers(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
}
+/* use for render output and image save operator,
+ * note: there are some cases where the members act differently when this is
+ * used from a scene, video formats can only be selected for render output
+ * for example, this is checked by seeing if the ptr->id.data is a Scene id */
+
+static void rna_def_scene_image_format_data(BlenderRNA *brna)
+{
+#ifdef WITH_OPENEXR
+ static EnumPropertyItem exr_codec_items[] = {
+ {R_IMF_EXR_CODEC_NONE, "NONE", 0, "None", ""},
+ {R_IMF_EXR_CODEC_PXR24, "PXR24", 0, "Pxr24 (lossy)", ""},
+ {R_IMF_EXR_CODEC_ZIP, "ZIP", 0, "ZIP (lossless)", ""},
+ {R_IMF_EXR_CODEC_PIZ, "PIZ", 0, "PIZ (lossless)", ""},
+ {R_IMF_EXR_CODEC_RLE, "RLE", 0, "RLE (lossless)", ""},
+ {0, NULL, 0, NULL, NULL}};
+#endif
+
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ srna= RNA_def_struct(brna, "ImageFormatSettings", NULL);
+ RNA_def_struct_sdna(srna, "ImageFormatData");
+ RNA_def_struct_nested(brna, srna, "Scene");
+ // RNA_def_struct_path_func(srna, "rna_RenderSettings_path"); // no need for the path, its not animated!
+ RNA_def_struct_ui_text(srna, "Image Format", "Settings for image formats");
+
+ prop= RNA_def_property(srna, "file_format", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "imtype");
+ RNA_def_property_enum_items(prop, image_type_items);
+ RNA_def_property_enum_funcs(prop, NULL, "rna_ImageFormatSettings_file_format_set", "rna_ImageFormatSettings_file_format_itemf");
+ RNA_def_property_ui_text(prop, "File Format", "File format to save the rendered images as");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "color_mode", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_bitflag_sdna(prop, NULL, "planes");
+ RNA_def_property_enum_items(prop, image_color_mode_items);
+ RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_ImageFormatSettings_color_mode_itemf");
+ RNA_def_property_ui_text(prop, "Color Mode",
+ "Choose BW for saving greyscale images, RGB for saving red, green and blue channels, "
+ "and RGBA for saving red, green, blue and alpha channels");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "color_depth", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_bitflag_sdna(prop, NULL, "depth");
+ RNA_def_property_enum_items(prop, image_color_depth_items);
+ RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_ImageFormatSettings_color_depth_itemf");
+ RNA_def_property_ui_text(prop, "Color Depth", "Bit depth per channel");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ /* was 'file_quality' */
+ prop= RNA_def_property(srna, "quality", PROP_INT, PROP_PERCENTAGE);
+ RNA_def_property_int_sdna(prop, NULL, "quality");
+ RNA_def_property_range(prop, 0, 100); /* 0 is needed for compression. */
+ RNA_def_property_ui_text(prop, "Quality", "Quality for image formats that support lossy compression");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ /* was shared with file_quality */
+ prop= RNA_def_property(srna, "compression", PROP_INT, PROP_PERCENTAGE);
+ RNA_def_property_int_sdna(prop, NULL, "compress");
+ RNA_def_property_range(prop, 0, 100); /* 0 is needed for compression. */
+ RNA_def_property_ui_text(prop, "Compression", "Compression level for formats that support lossless compression");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ /* flag */
+ prop= RNA_def_property(srna, "use_zbuffer", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", R_IMF_FLAG_ZBUF);
+ RNA_def_property_ui_text(prop, "Z Buffer", "Save the z-depth per pixel (32 bit unsigned int z-buffer)Save the z-depth per pixel (32 bit unsigned int z-buffer)");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "use_preview", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", R_IMF_FLAG_PREVIEW_JPG);
+ RNA_def_property_ui_text(prop, "Preview", "When rendering animations, save JPG preview images in same directory");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ /* format spesific */
+
+#ifdef WITH_OPENEXR
+ /* OpenEXR */
+
+ prop= RNA_def_property(srna, "exr_codec", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "exr_codec");
+ RNA_def_property_enum_items(prop, exr_codec_items);
+ RNA_def_property_ui_text(prop, "Codec", "Codec settings for OpenEXR");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+#endif
+
+
+#ifdef WITH_OPENJPEG
+ /* Jpeg 2000 */
+ prop= RNA_def_property(srna, "use_jpeg2k_ycc", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "jp2_flag", R_IMF_JP2_FLAG_YCC);
+ RNA_def_property_ui_text(prop, "YCC", "Save luminance-chrominance-chrominance channels instead of RGB colors");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "use_jpeg2k_cinema_preset", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "jp2_flag", R_IMF_JP2_FLAG_CINE_PRESET);
+ RNA_def_property_ui_text(prop, "Cinema", "Use Openjpeg Cinema Preset");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "use_jpeg2k_cinema_48", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "jp2_flag", R_IMF_JP2_FLAG_CINE_48);
+ RNA_def_property_ui_text(prop, "Cinema (48)", "Use Openjpeg Cinema Preset (48fps)");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+#endif
+
+ /* Cineon and DPX */
+
+ prop= RNA_def_property(srna, "use_cineon_log", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "cineon_flag", R_CINEON_LOG);
+ RNA_def_property_ui_text(prop, "Log", "Convert to logarithmic color space");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "cineon_black", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "cineon_black");
+ RNA_def_property_range(prop, 0, 1024);
+ RNA_def_property_ui_text(prop, "B", "Log conversion reference blackpoint");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "cineon_white", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "cineon_white");
+ RNA_def_property_range(prop, 0, 1024);
+ RNA_def_property_ui_text(prop, "W", "Log conversion reference whitepoint");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "cineon_gamma", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "cineon_gamma");
+ RNA_def_property_range(prop, 0.0f, 10.0f);
+ RNA_def_property_ui_text(prop, "G", "Log conversion gamma");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+}
+
static void rna_def_scene_render_data(BlenderRNA *brna)
{
StructRNA *srna;
@@ -2338,35 +2614,6 @@ 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_OPENEXR
- static EnumPropertyItem exr_codec_items[] = {
- {0, "NONE", 0, "None", ""},
- {1, "PXR24", 0, "Pxr24 (lossy)", ""},
- {2, "ZIP", 0, "ZIP (lossless)", ""},
- {3, "PIZ", 0, "PIZ (lossless)", ""},
- {4, "RLE", 0, "RLE (lossless)", ""},
- {0, NULL, 0, NULL, NULL}};
-#endif
-
-#ifdef WITH_OPENJPEG
- static EnumPropertyItem jp2_preset_items[] = {
- {0, "NO_PRESET", 0, "No Preset", ""},
- {1, "CINE_24FPS", 0, "Cinema 24fps 2048x1080", ""},
- {2, "CINE_48FPS", 0, "Cinema 48fps 2048x1080", ""},
- {3, "CINE_24FPS_4K", 0, "Cinema 24fps 4096x2160", ""},
- {4, "CINE_SCOPE_24FPS", 0, "Cine-Scope 24fps 2048x858", ""},
- {5, "CINE_SCOPE_48FPS", 0, "Cine-Scope 48fps 2048x858", ""},
- {6, "CINE_FLAT_24FPS", 0, "Cine-Flat 24fps 1998x1080", ""},
- {7, "CINE_FLAT_48FPS", 0, "Cine-Flat 48fps 1998x1080", ""},
- {0, NULL, 0, NULL, NULL}};
-
- static EnumPropertyItem jp2_depth_items[] = {
- {8, "8", 0, "8", "8 bit color channels"},
- {12, "12", 0, "12", "12 bit color channels"},
- {16, "16", 0, "16", "16 bit color channels"},
- {0, NULL, 0, NULL, NULL}};
-#endif
#ifdef WITH_QUICKTIME
static EnumPropertyItem quicktime_codec_type_items[] = {
@@ -2462,7 +2709,9 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
RNA_def_struct_nested(brna, srna, "Scene");
RNA_def_struct_path_func(srna, "rna_RenderSettings_path");
RNA_def_struct_ui_text(srna, "Render Data", "Rendering settings for a Scene datablock");
-
+
+#if 0 /* moved */
+
prop= RNA_def_property(srna, "color_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "planes");
RNA_def_property_enum_items(prop, image_color_mode_items);
@@ -2471,6 +2720,15 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
"and RGBA for saving red, green, blue and alpha channels");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+#endif
+
+ /* Render Data */
+ prop= RNA_def_property(srna, "image_settings", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
+ RNA_def_property_pointer_sdna(prop, NULL, "im_format");
+ RNA_def_property_struct_type(prop, "ImageFormatSettings");
+ RNA_def_property_ui_text(prop, "Image Format", "");
+
prop= RNA_def_property(srna, "resolution_x", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "xsch");
RNA_def_property_range(prop, 4, 10000);
@@ -2515,90 +2773,23 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneCamera_update");
/* JPEG and AVI JPEG */
-
+
+#if 0 /* moved */
+
prop= RNA_def_property(srna, "file_quality", PROP_INT, PROP_PERCENTAGE);
RNA_def_property_int_sdna(prop, NULL, "quality");
RNA_def_property_range(prop, 0, 100); /* 0 is needed for compression. */
RNA_def_property_ui_text(prop, "Quality", "Quality of JPEG images, AVI Jpeg and SGI movies, compression for PNG's");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
-
- /* Tiff */
-
- prop= RNA_def_property(srna, "use_tiff_16bit", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "subimtype", R_TIFF_16BIT);
- RNA_def_property_ui_text(prop, "16 Bit", "Save TIFF with 16 bits per channel");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
-
- /* Cineon and DPX */
-
- prop= RNA_def_property(srna, "use_cineon_log", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "subimtype", R_CINEON_LOG);
- RNA_def_property_ui_text(prop, "Log", "Convert to logarithmic color space");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
-
- prop= RNA_def_property(srna, "cineon_black", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "cineonblack");
- RNA_def_property_range(prop, 0, 1024);
- RNA_def_property_ui_text(prop, "B", "Log conversion reference blackpoint");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
-
- prop= RNA_def_property(srna, "cineon_white", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "cineonwhite");
- RNA_def_property_range(prop, 0, 1024);
- RNA_def_property_ui_text(prop, "W", "Log conversion reference whitepoint");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
-
- prop= RNA_def_property(srna, "cineon_gamma", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "cineongamma");
- RNA_def_property_range(prop, 0.0f, 10.0f);
- RNA_def_property_ui_text(prop, "G", "Log conversion gamma");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
-
-#ifdef WITH_OPENEXR
- /* OpenEXR */
- prop= RNA_def_property(srna, "exr_codec", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_bitflag_sdna(prop, NULL, "quality");
- RNA_def_property_enum_items(prop, exr_codec_items);
- RNA_def_property_ui_text(prop, "Codec", "Codec settings for OpenEXR");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
-
- prop= RNA_def_property(srna, "use_exr_half", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "subimtype", R_OPENEXR_HALF);
- RNA_def_property_ui_text(prop, "Half", "Use 16 bit floats instead of 32 bit floats per channel");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
-
- prop= RNA_def_property(srna, "exr_zbuf", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "subimtype", R_OPENEXR_ZBUF);
- RNA_def_property_ui_text(prop, "Zbuf", "Save the z-depth per pixel (32 bit unsigned int z-buffer)");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
-
- prop= RNA_def_property(srna, "exr_preview", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "subimtype", R_PREVIEW_JPG);
- RNA_def_property_ui_text(prop, "Preview", "When rendering animations, save JPG preview images in same directory");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
#endif
-#ifdef WITH_OPENJPEG
- /* Jpeg 2000 */
-
- prop= RNA_def_property(srna, "jpeg2k_preset", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "jp2_preset");
- RNA_def_property_enum_items(prop, jp2_preset_items);
- RNA_def_property_enum_funcs(prop, NULL, "rna_RenderSettings_jpeg2k_preset_set", NULL);
- RNA_def_property_ui_text(prop, "Preset", "Use a DCI Standard preset for saving jpeg2000");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
-
- prop= RNA_def_property(srna, "jpeg2k_depth", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_bitflag_sdna(prop, NULL, "jp2_depth");
- RNA_def_property_enum_items(prop, jp2_depth_items);
- RNA_def_property_enum_funcs(prop, NULL, "rna_RenderSettings_jpeg2k_depth_set", NULL);
- RNA_def_property_ui_text(prop, "Depth", "Bit depth per channel");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ /* Tiff */
- prop= RNA_def_property(srna, "jpeg2k_ycc", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "subimtype", R_JPEG2K_YCC);
- RNA_def_property_ui_text(prop, "YCC", "Save luminance-chrominance-chrominance channels instead of RGB colors");
+#if 0 /* replaced, use generic */
+ prop= def_property(srna, "use_tiff_16bit", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "subimtype", R_TIFF_16BIT);
+ RNA_def_property_ui_text(prop, "16 Bit", "Save TIFF with 16 bits per channel");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
#endif
@@ -3023,13 +3214,15 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "File Extensions",
"Add the file format extensions to the rendered file name (eg: filename + .jpg)");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
-
+
+#if 0 /* moved */
prop= RNA_def_property(srna, "file_format", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "imtype");
RNA_def_property_enum_items(prop, image_type_items);
RNA_def_property_enum_funcs(prop, NULL, "rna_RenderSettings_file_format_set", NULL);
RNA_def_property_ui_text(prop, "File Format", "File format to save the rendered images as");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+#endif
prop= RNA_def_property(srna, "file_extension", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_SceneRender_file_ext_get", "rna_SceneRender_file_ext_length", NULL);
@@ -3810,6 +4003,7 @@ void RNA_def_scene(BlenderRNA *brna)
/* Nestled Data */
rna_def_tool_settings(brna);
rna_def_unit_settings(brna);
+ rna_def_scene_image_format_data(brna);
rna_def_scene_render_data(brna);
rna_def_scene_game_data(brna);
rna_def_scene_render_layer(brna);
diff --git a/source/blender/makesrna/intern/rna_scene_api.c b/source/blender/makesrna/intern/rna_scene_api.c
index 6816903090d..9d0149726c3 100644
--- a/source/blender/makesrna/intern/rna_scene_api.c
+++ b/source/blender/makesrna/intern/rna_scene_api.c
@@ -74,10 +74,10 @@ static void rna_Scene_update_tagged(Scene *scene)
static void rna_SceneRender_get_frame_path(RenderData *rd, int frame, char *name)
{
- if(BKE_imtype_is_movie(rd->imtype))
+ if(BKE_imtype_is_movie(rd->im_format.imtype))
BKE_makeanimstring(name, rd);
else
- BKE_makepicstring(name, rd->pic, G.main->name, (frame==INT_MIN) ? rd->cfra : frame, rd->imtype, rd->scemode & R_EXTENSION, TRUE);
+ BKE_makepicstring(name, rd->pic, G.main->name, (frame==INT_MIN) ? rd->cfra : frame, rd->im_format.imtype, rd->scemode & R_EXTENSION, TRUE);
}
#ifdef WITH_COLLADA
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index a33622cf8a1..9f6f0bb7802 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -1612,9 +1612,9 @@ static void rna_def_space_view3d(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Show Camera Path", "Show reconstructed camera path");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
- prop= RNA_def_property(srna, "show_tracks_name", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "show_bundle_names", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag2", V3D_SHOW_BUNDLENAME);
- RNA_def_property_ui_text(prop, "Show Track Names", "Show names for tracks objects");
+ RNA_def_property_ui_text(prop, "Show 3D Marker Names", "Show names for reconstructed tracks objects");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
/* region */
@@ -2915,7 +2915,7 @@ static void rna_def_space_clip(BlenderRNA *brna)
/* show bundles */
prop= RNA_def_property(srna, "show_bundles", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_ui_text(prop, "Show Bundles", "Show projection of bundles into footage");
+ RNA_def_property_ui_text(prop, "Show Bundles", "Show projection of 3D markers into footage");
RNA_def_property_boolean_sdna(prop, NULL, "flag", SC_SHOW_BUNDLES);
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, NULL);
diff --git a/source/blender/makesrna/intern/rna_texture_api.c b/source/blender/makesrna/intern/rna_texture_api.c
index f1a6bb1b921..88ea78cd0da 100644
--- a/source/blender/makesrna/intern/rna_texture_api.c
+++ b/source/blender/makesrna/intern/rna_texture_api.c
@@ -49,7 +49,7 @@ void save_envmap(struct EnvMap *env, bContext *C, ReportList *reports, const cha
scene = CTX_data_scene(C);
}
- RE_WriteEnvmapResult(reports, scene, env, filepath, scene->r.imtype, layout);
+ RE_WriteEnvmapResult(reports, scene, env, filepath, scene->r.im_format.imtype, layout);
}
void clear_envmap(struct EnvMap *env, bContext *C)
diff --git a/source/blender/makesrna/intern/rna_ui_api.c b/source/blender/makesrna/intern/rna_ui_api.c
index e52a0f830dc..d0f25fcb60c 100644
--- a/source/blender/makesrna/intern/rna_ui_api.c
+++ b/source/blender/makesrna/intern/rna_ui_api.c
@@ -397,6 +397,14 @@ void RNA_api_ui_layout(StructRNA *srna)
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL);
RNA_def_boolean(func, "compact", 0, "", "Use more compact layout");
+ func= RNA_def_function(srna, "template_image_settings", "uiTemplateImageSettings");
+ RNA_def_function_ui_description(func, "User interface for setting image format options");
+ // RNA_def_function_flag(func, FUNC_USE_CONTEXT);
+ // api_ui_item_rna_common(func);
+ parm= RNA_def_pointer(func, "image_settings", "ImageFormatSettings", "", "");
+ RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL);
+ // RNA_def_boolean(func, "compact", 0, "", "Use more compact layout");
+
func= RNA_def_function(srna, "template_movieclip", "uiTemplateMovieClip");
RNA_def_function_ui_description(func, "Item(s). User interface for selecting movie clips and their source paths");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index 34ee95c2962..f7ad47b4ad9 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -2636,7 +2636,7 @@ static void rna_def_userdef_system(BlenderRNA *brna)
{22, "BULGARIAN", 0, "Bulgarian (Български)", "bg_BG"},
{23, "GREEK", 0, "Greek (Ελληνικά)", "el_GR"},
{24, "KOREAN", 0, "Korean (한국 언어)", "ko_KR"},
- /*{25, "NEPALI", 0, "Nepali (नेपाली)", "ne_NP"},*/
+ {25, "NEPALI", 0, "Nepali (नेपाली)", "ne_NP"},
/* using the utf8 flipped form of Persian (فارسی) */
{26, "PERSIAN", 0, "Persian (ﯽﺳﺭﺎﻓ)", "fa_PE"},
{27, "INDONESIAN", 0, "Indonesian (Bahasa indonesia)", "id_ID"},