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:
-rw-r--r--source/blender/editors/space_outliner/outliner.c22
-rw-r--r--source/blender/makesrna/RNA_access.h48
-rw-r--r--source/blender/makesrna/RNA_define.h2
-rw-r--r--source/blender/makesrna/RNA_types.h3
-rw-r--r--source/blender/makesrna/intern/makesrna.c7
-rw-r--r--source/blender/makesrna/intern/rna_ID.c19
-rw-r--r--source/blender/makesrna/intern/rna_access.c10
-rwxr-xr-xsource/blender/makesrna/intern/rna_action.c38
-rw-r--r--source/blender/makesrna/intern/rna_actuator.c11
-rw-r--r--source/blender/makesrna/intern/rna_armature.c15
-rw-r--r--source/blender/makesrna/intern/rna_brush.c25
-rw-r--r--source/blender/makesrna/intern/rna_camera.c2
-rw-r--r--source/blender/makesrna/intern/rna_cloth.c16
-rw-r--r--source/blender/makesrna/intern/rna_color.c6
-rw-r--r--source/blender/makesrna/intern/rna_constraint.c2
-rw-r--r--source/blender/makesrna/intern/rna_controller.c32
-rw-r--r--source/blender/makesrna/intern/rna_curve.c196
-rw-r--r--source/blender/makesrna/intern/rna_define.c40
-rw-r--r--source/blender/makesrna/intern/rna_fluidsim.c69
-rw-r--r--source/blender/makesrna/intern/rna_group.c2
-rw-r--r--source/blender/makesrna/intern/rna_image.c8
-rw-r--r--source/blender/makesrna/intern/rna_internal.h7
-rw-r--r--source/blender/makesrna/intern/rna_internal_types.h4
-rw-r--r--source/blender/makesrna/intern/rna_ipo.c30
-rw-r--r--source/blender/makesrna/intern/rna_key.c18
-rw-r--r--source/blender/makesrna/intern/rna_lamp.c621
-rw-r--r--source/blender/makesrna/intern/rna_lattice.c7
-rw-r--r--source/blender/makesrna/intern/rna_main.c2
-rw-r--r--source/blender/makesrna/intern/rna_material.c545
-rw-r--r--source/blender/makesrna/intern/rna_mesh.c240
-rw-r--r--source/blender/makesrna/intern/rna_meta.c4
-rw-r--r--source/blender/makesrna/intern/rna_modifier.c119
-rw-r--r--source/blender/makesrna/intern/rna_nodetree.c26
-rw-r--r--source/blender/makesrna/intern/rna_object.c36
-rw-r--r--source/blender/makesrna/intern/rna_object_force.c4
-rw-r--r--source/blender/makesrna/intern/rna_packedfile.c4
-rw-r--r--source/blender/makesrna/intern/rna_particle.c2
-rwxr-xr-xsource/blender/makesrna/intern/rna_pose.c8
-rw-r--r--source/blender/makesrna/intern/rna_property.c20
-rw-r--r--source/blender/makesrna/intern/rna_radio.c2
-rw-r--r--source/blender/makesrna/intern/rna_rna.c41
-rw-r--r--source/blender/makesrna/intern/rna_scene.c2
-rw-r--r--source/blender/makesrna/intern/rna_screen.c118
-rw-r--r--source/blender/makesrna/intern/rna_scriptlink.c2
-rw-r--r--source/blender/makesrna/intern/rna_sensor.c33
-rw-r--r--source/blender/makesrna/intern/rna_sequence.c54
-rw-r--r--source/blender/makesrna/intern/rna_sound.c118
-rw-r--r--source/blender/makesrna/intern/rna_text.c10
-rw-r--r--source/blender/makesrna/intern/rna_texture.c140
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c68
-rw-r--r--source/blender/makesrna/intern/rna_vfont.c2
-rw-r--r--source/blender/makesrna/intern/rna_wm.c10
-rw-r--r--source/blender/makesrna/intern/rna_world.c321
-rw-r--r--source/blender/python/epy_doc_gen.py4
54 files changed, 1777 insertions, 1418 deletions
diff --git a/source/blender/editors/space_outliner/outliner.c b/source/blender/editors/space_outliner/outliner.c
index fad19f6a023..f4a3a9770cd 100644
--- a/source/blender/editors/space_outliner/outliner.c
+++ b/source/blender/editors/space_outliner/outliner.c
@@ -3183,7 +3183,9 @@ static int tselem_rna_icon(PointerRNA *ptr)
return ICON_FACESEL;
else if(rnatype == &RNA_MeshTextureFace)
return ICON_FACESEL_HLT;
- else if(rnatype == &RNA_MeshVertexGroup)
+ else if(rnatype == &RNA_VertexGroup)
+ return ICON_VGROUP;
+ else if(rnatype == &RNA_VertexGroupElement)
return ICON_VGROUP;
else if(rnatype == &RNA_Curve)
return ICON_CURVE;
@@ -3199,6 +3201,16 @@ static int tselem_rna_icon(PointerRNA *ptr)
return ICON_BONE_DEHLT;
else if(rnatype == &RNA_Camera)
return ICON_CAMERA;
+ else if(rnatype == &RNA_LocalLamp)
+ return ICON_LAMP;
+ else if(rnatype == &RNA_AreaLamp)
+ return ICON_LAMP;
+ else if(rnatype == &RNA_SpotLamp)
+ return ICON_LAMP;
+ else if(rnatype == &RNA_SunLamp)
+ return ICON_LAMP;
+ else if(rnatype == &RNA_HemiLamp)
+ return ICON_LAMP;
else if(rnatype == &RNA_Lamp)
return ICON_LAMP;
else if(rnatype == &RNA_Group)
@@ -3211,6 +3223,12 @@ static int tselem_rna_icon(PointerRNA *ptr)
return ICON_MATERIAL;
else if(rnatype == &RNA_Texture)
return ICON_TEXTURE;
+ else if(rnatype == &RNA_TextureSlot)
+ return ICON_TEXTURE;
+ else if(rnatype == &RNA_WorldTextureSlot)
+ return ICON_TEXTURE;
+ else if(rnatype == &RNA_MaterialTextureSlot)
+ return ICON_TEXTURE;
else if(rnatype == &RNA_Image)
return ICON_TEXTURE;
else if(rnatype == &RNA_Screen)
@@ -3253,7 +3271,7 @@ static int tselem_rna_icon(PointerRNA *ptr)
return ICON_RNA;
else if(rnatype == &RNA_CollectionProperty)
return ICON_RNA;
- else if(rnatype == &RNA_ObjectGameSettings)
+ else if(rnatype == &RNA_GameObjectSettings)
return ICON_GAME;
else if(rnatype == &RNA_ScriptLink)
return ICON_PYTHON;
diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h
index f6a568d8e93..1e343bea223 100644
--- a/source/blender/makesrna/RNA_access.h
+++ b/source/blender/makesrna/RNA_access.h
@@ -42,12 +42,13 @@ extern StructRNA RNA_Actuator;
extern StructRNA RNA_ActuatorSensor;
extern StructRNA RNA_AlwaysSensor;
extern StructRNA RNA_AndController;
+extern StructRNA RNA_Area;
+extern StructRNA RNA_AreaLamp;
extern StructRNA RNA_Armature;
extern StructRNA RNA_ArmatureModifier;
extern StructRNA RNA_ArrayModifier;
-extern StructRNA RNA_BPoint;
extern StructRNA RNA_BevelModifier;
-extern StructRNA RNA_BezTriple;
+extern StructRNA RNA_BezierCurvePoint;
extern StructRNA RNA_BlenderRNA;
extern StructRNA RNA_Bone;
extern StructRNA RNA_BooleanModifier;
@@ -56,7 +57,6 @@ extern StructRNA RNA_Brush;
extern StructRNA RNA_BuildModifier;
extern StructRNA RNA_Camera;
extern StructRNA RNA_CastModifier;
-extern StructRNA RNA_CharInfo;
extern StructRNA RNA_ClothCollisionSettings;
extern StructRNA RNA_ClothModifier;
extern StructRNA RNA_ClothSettings;
@@ -75,6 +75,7 @@ extern StructRNA RNA_CurveMap;
extern StructRNA RNA_CurveMapPoint;
extern StructRNA RNA_CurveMapping;
extern StructRNA RNA_CurveModifier;
+extern StructRNA RNA_CurvePoint;
extern StructRNA RNA_DecimateModifier;
extern StructRNA RNA_DelaySensor;
extern StructRNA RNA_DisplaceModifier;
@@ -94,12 +95,14 @@ extern StructRNA RNA_FluidSimulationModifier;
extern StructRNA RNA_GameBooleanProperty;
extern StructRNA RNA_GameFloatProperty;
extern StructRNA RNA_GameIntProperty;
+extern StructRNA RNA_GameObjectSettings;
extern StructRNA RNA_GameProperty;
extern StructRNA RNA_GameSoftBodySettings;
extern StructRNA RNA_GameStringProperty;
-extern StructRNA RNA_GameTimeProperty;
+extern StructRNA RNA_GameTimerProperty;
extern StructRNA RNA_GlowSequence;
extern StructRNA RNA_Group;
+extern StructRNA RNA_HemiLamp;
extern StructRNA RNA_HookModifier;
extern StructRNA RNA_ID;
extern StructRNA RNA_IDProperty;
@@ -116,35 +119,39 @@ extern StructRNA RNA_JoystickSensor;
extern StructRNA RNA_Key;
extern StructRNA RNA_KeyboardSensor;
extern StructRNA RNA_Lamp;
+extern StructRNA RNA_LampSkySettings;
+extern StructRNA RNA_LampTextureSlot;
extern StructRNA RNA_Lattice;
extern StructRNA RNA_LatticeModifier;
extern StructRNA RNA_LatticePoint;
extern StructRNA RNA_Library;
-extern StructRNA RNA_MCol;
-extern StructRNA RNA_MColLayer;
-extern StructRNA RNA_MFloatProperty;
-extern StructRNA RNA_MFloatPropertyLayer;
-extern StructRNA RNA_MIntProperty;
-extern StructRNA RNA_MIntPropertyLayer;
-extern StructRNA RNA_MSticky;
-extern StructRNA RNA_MStringProperty;
-extern StructRNA RNA_MStringPropertyLayer;
+extern StructRNA RNA_LocalLamp;
extern StructRNA RNA_Main;
extern StructRNA RNA_MaskModifier;
extern StructRNA RNA_Material;
extern StructRNA RNA_MaterialHalo;
extern StructRNA RNA_MaterialRaytraceMirror;
extern StructRNA RNA_MaterialRaytraceTransparency;
+extern StructRNA RNA_MaterialStrand;
extern StructRNA RNA_MaterialSubsurfaceScattering;
+extern StructRNA RNA_MaterialTextureSlot;
extern StructRNA RNA_Mesh;
+extern StructRNA RNA_MeshColor;
+extern StructRNA RNA_MeshColorLayer;
extern StructRNA RNA_MeshDeformModifier;
extern StructRNA RNA_MeshEdge;
extern StructRNA RNA_MeshFace;
+extern StructRNA RNA_MeshFloatProperty;
+extern StructRNA RNA_MeshFloatPropertyLayer;
+extern StructRNA RNA_MeshIntProperty;
+extern StructRNA RNA_MeshIntPropertyLayer;
extern StructRNA RNA_MeshMultires;
+extern StructRNA RNA_MeshSticky;
+extern StructRNA RNA_MeshStringProperty;
+extern StructRNA RNA_MeshStringPropertyLayer;
extern StructRNA RNA_MeshTextureFace;
extern StructRNA RNA_MeshTextureFaceLayer;
extern StructRNA RNA_MeshVertex;
-extern StructRNA RNA_MeshVertexGroup;
extern StructRNA RNA_MessageSensor;
extern StructRNA RNA_MetaBall;
extern StructRNA RNA_MetaElement;
@@ -160,7 +167,6 @@ extern StructRNA RNA_Node;
extern StructRNA RNA_NodeTree;
extern StructRNA RNA_NorController;
extern StructRNA RNA_Object;
-extern StructRNA RNA_ObjectGameSettings;
extern StructRNA RNA_ObstacleFluidSettings;
extern StructRNA RNA_Operator;
extern StructRNA RNA_OperatorMousePath;
@@ -189,9 +195,6 @@ extern StructRNA RNA_RaySensor;
extern StructRNA RNA_Region;
extern StructRNA RNA_Scene;
extern StructRNA RNA_SceneSequence;
-extern StructRNA RNA_ScrArea;
-extern StructRNA RNA_ScrEdge;
-extern StructRNA RNA_ScrVert;
extern StructRNA RNA_Screen;
extern StructRNA RNA_ScriptLink;
extern StructRNA RNA_Sensor;
@@ -212,15 +215,16 @@ extern StructRNA RNA_SmoothModifier;
extern StructRNA RNA_SoftBodySettings;
extern StructRNA RNA_SoftbodyModifier;
extern StructRNA RNA_Sound;
-extern StructRNA RNA_SoundListener;
extern StructRNA RNA_SoundSequence;
extern StructRNA RNA_SpeedControlSequence;
+extern StructRNA RNA_SpotLamp;
extern StructRNA RNA_StringProperty;
extern StructRNA RNA_Struct;
extern StructRNA RNA_SubsurfModifier;
-extern StructRNA RNA_SunskySettings;
+extern StructRNA RNA_SunLamp;
extern StructRNA RNA_Text;
extern StructRNA RNA_TextBox;
+extern StructRNA RNA_TextCharacterFormat;
extern StructRNA RNA_TextLine;
extern StructRNA RNA_TextMarker;
extern StructRNA RNA_Texture;
@@ -250,11 +254,15 @@ extern StructRNA RNA_UserPreferences;
extern StructRNA RNA_UserSolidLight;
extern StructRNA RNA_VectorFont;
extern StructRNA RNA_VertexGroup;
+extern StructRNA RNA_VertexGroupElement;
extern StructRNA RNA_WaveModifier;
extern StructRNA RNA_WindowManager;
extern StructRNA RNA_WipeSequence;
extern StructRNA RNA_World;
extern StructRNA RNA_WorldAmbientOcclusion;
+extern StructRNA RNA_WorldMistSettings;
+extern StructRNA RNA_WorldStarsSettings;
+extern StructRNA RNA_WorldTextureSlot;
extern StructRNA RNA_XnorController;
extern StructRNA RNA_XorController;
diff --git a/source/blender/makesrna/RNA_define.h b/source/blender/makesrna/RNA_define.h
index 72891ddb06e..0ea769088bc 100644
--- a/source/blender/makesrna/RNA_define.h
+++ b/source/blender/makesrna/RNA_define.h
@@ -43,7 +43,7 @@ StructRNA *RNA_def_struct(BlenderRNA *brna, const char *identifier, const char *
void RNA_def_struct_sdna(StructRNA *srna, const char *structname);
void RNA_def_struct_sdna_from(StructRNA *srna, const char *structname, const char *propname);
void RNA_def_struct_name_property(StructRNA *srna, PropertyRNA *prop);
-void RNA_def_struct_parent(StructRNA *srna, StructRNA *parent);
+void RNA_def_struct_nested(BlenderRNA *brna, StructRNA *srna, const char *structname);
void RNA_def_struct_flag(StructRNA *srna, int flag);
void RNA_def_struct_refine_func(StructRNA *srna, const char *refine);
void RNA_def_struct_identifier(StructRNA *srna, const char *identifier);
diff --git a/source/blender/makesrna/RNA_types.h b/source/blender/makesrna/RNA_types.h
index fc98a0ad594..51f177b74cf 100644
--- a/source/blender/makesrna/RNA_types.h
+++ b/source/blender/makesrna/RNA_types.h
@@ -66,7 +66,8 @@ typedef enum PropertySubType {
PROP_COLOR = 4,
PROP_VECTOR = 5,
PROP_MATRIX = 6,
- PROP_ROTATION = 7
+ PROP_ROTATION = 7,
+ PROP_NEVER_NULL = 8
} PropertySubType;
typedef enum PropertyFlag {
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c
index 32024ceefdf..9025f3f0eae 100644
--- a/source/blender/makesrna/intern/makesrna.c
+++ b/source/blender/makesrna/intern/makesrna.c
@@ -647,6 +647,7 @@ static const char *rna_property_subtypename(PropertyType type)
case PROP_VECTOR: return "PROP_VECTOR";
case PROP_MATRIX: return "PROP_MATRIX";
case PROP_ROTATION: return "PROP_ROTATION";
+ case PROP_NEVER_NULL: return "PROP_NEVER_NULL";
default: return "PROP_UNKNOWN";
}
}
@@ -880,10 +881,10 @@ static void rna_generate_struct(BlenderRNA *brna, StructRNA *srna, FILE *f)
fprintf(f, "(PropertyRNA*)&rna_%s_rna_properties,\n", srna->identifier);
- if(srna->from) fprintf(f, "\t&RNA_%s,\n", (char*)srna->from);
+ if(srna->base) fprintf(f, "\t&RNA_%s,\n", srna->base->identifier);
else fprintf(f, "\tNULL,\n");
- if(srna->parent) fprintf(f, "\t&RNA_%s,\n", (char*)srna->parent);
+ if(srna->nested) fprintf(f, "\t&RNA_%s,\n", srna->nested->identifier);
else fprintf(f, "\tNULL,\n");
fprintf(f, "\t%s,\n", rna_function_string(srna->refine));
@@ -908,6 +909,7 @@ typedef struct RNAProcessItem {
RNAProcessItem PROCESS_ITEMS[]= {
{"rna_ID.c", RNA_def_ID},
+ {"rna_texture.c", RNA_def_texture},
{"rna_action.c", RNA_def_action},
{"rna_actuator.c", RNA_def_actuator},
{"rna_armature.c", RNA_def_armature},
@@ -945,7 +947,6 @@ RNAProcessItem PROCESS_ITEMS[]= {
{"rna_sensor.c", RNA_def_sensor},
{"rna_sequence.c", RNA_def_sequence},
{"rna_text.c", RNA_def_text},
- {"rna_texture.c", RNA_def_texture},
{"rna_sound.c", RNA_def_sound},
{"rna_userdef.c", RNA_def_userdef},
{"rna_vfont.c", RNA_def_vfont},
diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c
index 7ea2952d9fc..ea2b052b7fd 100644
--- a/source/blender/makesrna/intern/rna_ID.c
+++ b/source/blender/makesrna/intern/rna_ID.c
@@ -111,7 +111,7 @@ static void rna_def_ID_properties(BlenderRNA *brna)
/* this is struct is used for holding the virtual
* PropertyRNA's for ID properties */
srna= RNA_def_struct(brna, "IDProperty", NULL);
- RNA_def_struct_ui_text(srna, "ID Property", "stores arbitrary properties");
+ RNA_def_struct_ui_text(srna, "ID Property", "Property that stores arbitrary, user defined properties.");
/* IDP_STRING */
prop= RNA_def_property(srna, "string", PROP_STRING, PROP_NONE);
@@ -121,7 +121,7 @@ static void rna_def_ID_properties(BlenderRNA *brna)
prop= RNA_def_property(srna, "int", PROP_INT, PROP_NONE);
RNA_def_property_flag(prop, PROP_EXPORT|PROP_IDPROPERTY);
- prop= RNA_def_property(srna, "intarray", PROP_INT, PROP_NONE);
+ prop= RNA_def_property(srna, "int_array", PROP_INT, PROP_NONE);
RNA_def_property_flag(prop, PROP_EXPORT|PROP_IDPROPERTY);
RNA_def_property_array(prop, 1);
@@ -129,7 +129,7 @@ static void rna_def_ID_properties(BlenderRNA *brna)
prop= RNA_def_property(srna, "float", PROP_FLOAT, PROP_NONE);
RNA_def_property_flag(prop, PROP_EXPORT|PROP_IDPROPERTY);
- prop= RNA_def_property(srna, "floatarray", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "float_array", PROP_FLOAT, PROP_NONE);
RNA_def_property_flag(prop, PROP_EXPORT|PROP_IDPROPERTY);
RNA_def_property_array(prop, 1);
@@ -137,7 +137,7 @@ static void rna_def_ID_properties(BlenderRNA *brna)
prop= RNA_def_property(srna, "double", PROP_FLOAT, PROP_NONE);
RNA_def_property_flag(prop, PROP_EXPORT|PROP_IDPROPERTY);
- prop= RNA_def_property(srna, "doublearray", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "double_array", PROP_FLOAT, PROP_NONE);
RNA_def_property_flag(prop, PROP_EXPORT|PROP_IDPROPERTY);
RNA_def_property_array(prop, 1);
@@ -156,7 +156,7 @@ static void rna_def_ID_properties(BlenderRNA *brna)
* with native RNA properties. the builtin_properties will take
* care of the properties here */
srna= RNA_def_struct(brna, "IDPropertyGroup", NULL);
- RNA_def_struct_ui_text(srna, "ID Property Group", "a collection of properties");
+ RNA_def_struct_ui_text(srna, "ID Property Group", "Group of ID properties.");
}
static void rna_def_ID(BlenderRNA *brna)
@@ -165,8 +165,7 @@ static void rna_def_ID(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "ID", NULL);
- RNA_def_struct_ui_text(srna, "ID", "Used as a basis for dealing with many types with unique names, garbage collection and linked libraries");
-
+ RNA_def_struct_ui_text(srna, "ID", "Base type for datablocks, defining a unique name, linking from other libraries and garbage collection.");
RNA_def_struct_flag(srna, STRUCT_ID);
RNA_def_struct_refine_func(srna, "rna_ID_refine");
@@ -199,7 +198,7 @@ static void rna_def_library(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "Library", "ID");
- RNA_def_struct_ui_text(srna, "Library", "reference to an external blend file");
+ RNA_def_struct_ui_text(srna, "Library", "External .blend file from which data is linked.");
prop= RNA_def_property(srna, "filename", PROP_STRING, PROP_FILEPATH);
RNA_def_property_string_sdna(prop, NULL, "name");
@@ -209,10 +208,10 @@ static void rna_def_library(BlenderRNA *brna)
void RNA_def_ID(BlenderRNA *brna)
{
StructRNA *srna;
+
/* simple built-in unknown type */
srna= RNA_def_struct(brna, "UnknownType", NULL);
- RNA_def_struct_ui_text(srna, "Unknown Type", "");
-
+ RNA_def_struct_ui_text(srna, "Unknown Type", "Stub RNA type used for pointers to unknown or internal data.");
rna_def_ID(brna);
rna_def_ID_properties(brna);
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index a56980c96b2..34d90c4a063 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -121,9 +121,9 @@ IDProperty *rna_idproperties_get(PointerRNA *ptr, int create)
{
if(ptr->type->flag & STRUCT_ID)
return IDP_GetProperties(ptr->data, create);
- else if(ptr->type == &RNA_IDPropertyGroup || ptr->type->from == &RNA_IDPropertyGroup)
+ else if(ptr->type == &RNA_IDPropertyGroup || ptr->type->base == &RNA_IDPropertyGroup)
return ptr->data;
- else if(ptr->type->from == &RNA_OperatorProperties) {
+ else if(ptr->type->base == &RNA_OperatorProperties) {
if(create && !ptr->data) {
IDPropertyTemplate val;
val.i = 0; /* silence MSVC warning about uninitialized var when debugging */
@@ -234,11 +234,11 @@ IDProperty *rna_idproperty_check(PropertyRNA **prop, PointerRNA *ptr)
(PropertyRNA*)&rna_IDProperty_double};
static PropertyRNA *arraytypemap[IDP_NUMTYPES] =
- {NULL, (PropertyRNA*)&rna_IDProperty_intarray,
- (PropertyRNA*)&rna_IDProperty_floatarray,
+ {NULL, (PropertyRNA*)&rna_IDProperty_int_array,
+ (PropertyRNA*)&rna_IDProperty_float_array,
NULL, NULL, NULL,
(PropertyRNA*)&rna_IDProperty_collection, NULL,
- (PropertyRNA*)&rna_IDProperty_doublearray};
+ (PropertyRNA*)&rna_IDProperty_double_array};
IDProperty *idprop= (IDProperty*)(*prop);
diff --git a/source/blender/makesrna/intern/rna_action.c b/source/blender/makesrna/intern/rna_action.c
index 84c6af0a509..8c088b29334 100755
--- a/source/blender/makesrna/intern/rna_action.c
+++ b/source/blender/makesrna/intern/rna_action.c
@@ -51,13 +51,13 @@ void rna_def_action_channel(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Name", "");
RNA_def_struct_name_property(srna, prop);
- prop= RNA_def_property(srna, "action_group", PROP_POINTER, PROP_NONE);
+ prop= RNA_def_property(srna, "group", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "grp");
RNA_def_property_struct_type(prop, "ActionGroup");
RNA_def_property_flag(prop, PROP_NOT_EDITABLE);
- RNA_def_property_ui_text(prop, "Action Group", "Action Group that this Action Channel belongs to.");
+ RNA_def_property_ui_text(prop, "Group", "Action Group that this Action Channel belongs to.");
- prop= RNA_def_property(srna, "ipo", PROP_POINTER, PROP_NONE);
+ prop= RNA_def_property(srna, "ipo", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "Ipo");
RNA_def_property_flag(prop, PROP_NOT_EDITABLE);
RNA_def_property_ui_text(prop, "Ipo", "Ipo block this Action Channel uses.");
@@ -68,31 +68,31 @@ void rna_def_action_channel(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "ConstraintChannel");
RNA_def_property_ui_text(prop, "Constraint Channels", "Ipos of Constraints attached to this object or bone."); */
- prop= RNA_def_property(srna, "action_channel_selected", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ACHAN_SELECTED);
RNA_def_property_ui_text(prop, "Selected", "Action Channel is selected.");
- prop= RNA_def_property(srna, "action_channel_highlighted", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "highlighted", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ACHAN_HILIGHTED);
RNA_def_property_ui_text(prop, "Highlighted", "Action Channel is highlighted.");
- prop= RNA_def_property(srna, "action_channel_hidden", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "hidden", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ACHAN_HIDDEN);
RNA_def_property_ui_text(prop, "Hidden", "Action Channel is hidden.");
- prop= RNA_def_property(srna, "action_channel_protected", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "protected", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ACHAN_PROTECTED);
RNA_def_property_ui_text(prop, "Protected", "Action Channel is protected.");
- prop= RNA_def_property(srna, "action_channel_expanded", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "expanded", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ACHAN_EXPANDED);
RNA_def_property_ui_text(prop, "Expanded", "Action Channel is expanded.");
- prop= RNA_def_property(srna, "action_channel_show_ipo", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "show_ipo", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ACHAN_SHOWIPO);
RNA_def_property_ui_text(prop, "Show Ipo", "Action Channel's Ipos are visible.");
- prop= RNA_def_property(srna, "action_channel_show_constraints", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "show_constraints", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ACHAN_SHOWCONS);
RNA_def_property_ui_text(prop, "Show Constraints", "Action Channel's constraints are visible.");
}
@@ -113,20 +113,20 @@ void rna_def_action_group(BlenderRNA *brna)
/* dna warns not to treat the Action Channel listbase in the Action Group struct like a
normal listbase. I'll leave this here but comment out, for Joshua to review. He can
probably shed some more light on why this is */
- /*prop= RNA_def_property(srna, "action_channels", PROP_COLLECTION, PROP_NONE);
+ /*prop= RNA_def_property(srna, "channels", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "channels", NULL);
RNA_def_property_struct_type(prop, "ActionChannel");
- RNA_def_property_ui_text(prop, "Action Channels", "DOC_BROKEN");*/
+ RNA_def_property_ui_text(prop, "Channels", "Action channels in this action.");*/
- prop= RNA_def_property(srna, "action_group_selected", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", AGRP_SELECTED);
RNA_def_property_ui_text(prop, "Selected", "Action Group is selected.");
- prop= RNA_def_property(srna, "action_group_protected", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "protected", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", AGRP_PROTECTED);
RNA_def_property_ui_text(prop, "Protected", "Action Group is protected.");
- prop= RNA_def_property(srna, "action_group_expanded", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "expanded", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", AGRP_EXPANDED);
RNA_def_property_ui_text(prop, "Expanded", "Action Group is expanded.");
@@ -147,15 +147,15 @@ void RNA_def_action(BlenderRNA *brna)
RNA_def_struct_sdna(srna, "bAction");
RNA_def_struct_ui_text(srna, "Action", "A collection of Ipos for animation.");
- prop= RNA_def_property(srna, "action_channels", PROP_COLLECTION, PROP_NONE);
+ prop= RNA_def_property(srna, "channels", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "chanbase", NULL);
RNA_def_property_struct_type(prop, "ActionChannel");
- RNA_def_property_ui_text(prop, "Action Channels", "The individual animation channels that make up the Action.");
+ RNA_def_property_ui_text(prop, "Channels", "The individual animation channels that make up the Action.");
- prop= RNA_def_property(srna, "action_groups", PROP_COLLECTION, PROP_NONE);
+ prop= RNA_def_property(srna, "groups", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "groups", NULL);
RNA_def_property_struct_type(prop, "ActionGroup");
- RNA_def_property_ui_text(prop, "Action Groups", "Convenient groupings of Action Channels.");
+ RNA_def_property_ui_text(prop, "Groups", "Convenient groupings of Action Channels.");
prop= RNA_def_property(srna, "pose_markers", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "markers", NULL);
diff --git a/source/blender/makesrna/intern/rna_actuator.c b/source/blender/makesrna/intern/rna_actuator.c
index a6e359a6585..4ed4fe1d72e 100644
--- a/source/blender/makesrna/intern/rna_actuator.c
+++ b/source/blender/makesrna/intern/rna_actuator.c
@@ -47,7 +47,7 @@ void RNA_def_actuator(BlenderRNA *brna)
{ACT_SOUND, "SOUND", "Sound", ""},
{ACT_PROPERTY, "PROPERTY", "Property", ""},
{ACT_CONSTRAINT, "CONSTRAINT", "Constraint", ""},
- {ACT_EDIT_OBJECT, "EDITOBJECT", "Edit Object", ""},
+ {ACT_EDIT_OBJECT, "EDIT_OBJECT", "Edit Object", ""},
{ACT_SCENE, "SCENE", "Scene", ""},
{ACT_RANDOM, "RANDOM", "Random", ""},
{ACT_MESSAGE, "MESSAGE", "Message", ""},
@@ -55,19 +55,18 @@ void RNA_def_actuator(BlenderRNA *brna)
{ACT_CD, "CD", "CD", ""},
{ACT_GAME, "GAME", "Game", ""},
{ACT_VISIBILITY, "VISIBILITY", "Visibility", ""},
- {ACT_2DFILTER, "TWODFILTER", "2D Filter", ""},
+ {ACT_2DFILTER, "FILTER_2D", "2D Filter", ""},
{ACT_PARENT, "PARENT", "Parent", ""},
- {ACT_SHAPEACTION, "SHAPEACTION", "Shape Action", ""},
+ {ACT_SHAPEACTION, "SHAPE_ACTION", "Shape Action", ""},
{ACT_STATE, "STATE", "State", ""},
{0, NULL, NULL, NULL}};
srna= RNA_def_struct(brna, "Actuator", NULL);
- RNA_def_struct_ui_text(srna, "Actuator", "logic brick to apply actions in the game engine");
+ RNA_def_struct_ui_text(srna, "Actuator", "Game engine logic brick to apply actions in the game engine.");
RNA_def_struct_sdna(srna, "bActuator");
- prop= RNA_def_property(srna, "actuator_name", PROP_STRING, PROP_NONE);
- RNA_def_property_string_sdna(prop, NULL, "name");
+ prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_ui_text(prop, "Name", "");
/* type is not editable, would need to do proper data free/alloc */
diff --git a/source/blender/makesrna/intern/rna_armature.c b/source/blender/makesrna/intern/rna_armature.c
index 4a1a7ea2551..c378d8becb7 100644
--- a/source/blender/makesrna/intern/rna_armature.c
+++ b/source/blender/makesrna/intern/rna_armature.c
@@ -97,7 +97,7 @@ static void rna_def_bone(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "Bone", NULL);
- RNA_def_struct_ui_text(srna, "Bone", "member of the 'Armature' type");
+ RNA_def_struct_ui_text(srna, "Bone", "Bone in an Armature datablock.");
/* pointers/collections */
/* parent (pointer) */
@@ -144,7 +144,7 @@ static void rna_def_bone(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Connected", "When bone has a parent, bone's head is struck to the parent's tail.");
// XXX should we define this in PoseChannel wrapping code instead? but PoseChannels directly get some of their flags from here...
- prop= RNA_def_property(srna, "posechannel_hidden", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "pose_channel_hidden", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BONE_HIDDEN_P);
RNA_def_property_ui_text(prop, "Pose Channel Hidden", "Bone is not visible when it is not in Edit Mode (i.e. in Object or Pose Modes).");
@@ -246,14 +246,14 @@ void rna_def_armature(BlenderRNA *brna)
{ARM_B_BONE, "BBONE", "B-Bone", "Draw bones as boxes, showing subdivision and B-Splines"},
{ARM_ENVELOPE, "ENVELOPE", "Envelope", "Draw bones as extruded spheres, showing defomation influence volume."},
{0, NULL, NULL, NULL}};
- static EnumPropertyItem prop_ghosttype_items[] = {
- {ARM_GHOST_CUR, "CURRENTFRAME", "Around Current Frame", "Draw Ghosts of poses within a fixed number of frames around the current frame."},
+ static EnumPropertyItem prop_ghost_type_items[] = {
+ {ARM_GHOST_CUR, "CURRENT_FRAME", "Around Current Frame", "Draw Ghosts of poses within a fixed number of frames around the current frame."},
{ARM_GHOST_RANGE, "RANGE", "In Range", "Draw Ghosts of poses within specified range."},
{ARM_GHOST_KEYS, "KEYS", "On Keyframes", "Draw Ghosts of poses on Keyframes."},
{0, NULL, NULL, NULL}};
srna= RNA_def_struct(brna, "Armature", "ID");
- RNA_def_struct_ui_text(srna, "Armature", "'Object' containing a hierarchy of 'Bones', often used to rig characters");
+ RNA_def_struct_ui_text(srna, "Armature", "Armature datablock containing a hierarchy of bones, usually used for rigging characters.");
RNA_def_struct_sdna(srna, "bArmature");
@@ -268,8 +268,9 @@ void rna_def_armature(BlenderRNA *brna)
RNA_def_property_enum_items(prop, prop_drawtype_items);
RNA_def_property_ui_text(prop, "Draw Type", "");
- prop= RNA_def_property(srna, "ghosttype", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_items(prop, prop_ghosttype_items);
+ prop= RNA_def_property(srna, "ghost_type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "ghosttype");
+ RNA_def_property_enum_items(prop, prop_ghost_type_items);
RNA_def_property_ui_text(prop, "Ghost Drawing", "Method of Onion-skinning for active Action");
/* Boolean values */
diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c
index 44d386e7cb8..c129b08a192 100644
--- a/source/blender/makesrna/intern/rna_brush.c
+++ b/source/blender/makesrna/intern/rna_brush.c
@@ -30,9 +30,22 @@
#include "rna_internal.h"
#include "DNA_brush_types.h"
+#include "DNA_texture_types.h"
#ifdef RNA_RUNTIME
+static void rna_Brush_mtex_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
+{
+ Brush *brush= (Brush*)ptr->data;
+ rna_iterator_array_begin(iter, (void*)brush->mtex, sizeof(MTex*), MAX_MTEX, NULL);
+}
+
+static void *rna_Brush_active_texture_get(PointerRNA *ptr)
+{
+ Brush *brush= (Brush*)ptr->data;
+ return brush->mtex[(int)brush->texact];
+}
+
#else
void rna_def_brush(BlenderRNA *brna)
@@ -51,7 +64,7 @@ void rna_def_brush(BlenderRNA *brna)
{0, NULL, NULL, NULL}};
srna= RNA_def_struct(brna, "Brush", "ID");
- RNA_def_struct_ui_text(srna, "Brush", "stores brush setting for painting in the image view, sculpting and projection painting");
+ RNA_def_struct_ui_text(srna, "Brush", "Brush datablock for storing brush settings for painting and sculpting.");
/* enums */
prop= RNA_def_property(srna, "blend", PROP_ENUM, PROP_NONE);
@@ -118,15 +131,7 @@ void rna_def_brush(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Fixed Texture", "Keep texture origin in fixed position.");*/
/* texture */
- prop= RNA_def_property(srna, "texture_slots", PROP_COLLECTION, PROP_NONE);
- RNA_def_property_collection_sdna(prop, NULL, "mtex", "");
- RNA_def_property_struct_type(prop, "UnknownType");
- RNA_def_property_ui_text(prop, "Textures Slots", "");
-
- prop= RNA_def_property(srna, "active_texture", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "texact");
- RNA_def_property_range(prop, 0, MAX_MTEX-1);
- RNA_def_property_ui_text(prop, "Active Texture", "Active texture index.");
+ rna_def_mtex_common(srna, "rna_Brush_mtex_begin", "rna_Brush_active_texture_get", "TextureSlot");
/* clone tool */
prop= RNA_def_property(srna, "clone_image", PROP_POINTER, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_camera.c b/source/blender/makesrna/intern/rna_camera.c
index 41b8872a6d1..71ecbbe5517 100644
--- a/source/blender/makesrna/intern/rna_camera.c
+++ b/source/blender/makesrna/intern/rna_camera.c
@@ -51,7 +51,7 @@ void RNA_def_camera(BlenderRNA *brna)
{0, NULL, NULL, NULL}};
srna= RNA_def_struct(brna, "Camera", "ID");
- RNA_def_struct_ui_text(srna, "Camera", "'Object' data where camera settings are stored and animated");
+ RNA_def_struct_ui_text(srna, "Camera", "Camera datablock for storing camera settings.");
/* Enums */
prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_cloth.c b/source/blender/makesrna/intern/rna_cloth.c
index 3e0e0235072..aa2643fa484 100644
--- a/source/blender/makesrna/intern/rna_cloth.c
+++ b/source/blender/makesrna/intern/rna_cloth.c
@@ -136,12 +136,12 @@ static void rna_def_cloth_sim_settings(BlenderRNA *brna)
/* goal */
- prop= RNA_def_property(srna, "goal_minimum", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "goal_min", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "mingoal");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Goal Minimum", "Goal minimum, vertex group weights are scaled to match this range.");
- prop= RNA_def_property(srna, "goal_maximum", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "goal_max", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "maxgoal");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Goal Maximum", "Goal maximum, vertex group weights are scaled to match this range.");
@@ -214,7 +214,7 @@ static void rna_def_cloth_sim_settings(BlenderRNA *brna)
RNA_def_property_range(prop, 1.0f, 10000.0f);
RNA_def_property_ui_text(prop, "Structural Stiffness", "Overall stiffness of structure.");
- prop= RNA_def_property(srna, "structural_stiffness_maximum", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "structural_stiffness_max", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "max_struct");
RNA_def_property_range(prop, 0.0f, 10000.0f);
RNA_def_property_float_funcs(prop, NULL, "rna_ClothSettings_max_struct_set", NULL);
@@ -229,7 +229,7 @@ static void rna_def_cloth_sim_settings(BlenderRNA *brna)
RNA_def_property_range(prop, 0.0f, 10000.0f);
RNA_def_property_ui_text(prop, "Bending Stiffness", "Wrinkle coefficient (higher = less smaller but more big wrinkles).");
- prop= RNA_def_property(srna, "bending_stiffness_maximum", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "bending_stiffness_max", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "max_bend");
RNA_def_property_range(prop, 0.0f, 10000.0f);
RNA_def_property_float_funcs(prop, NULL, "rna_ClothSettings_max_bend_set", NULL);
@@ -248,7 +248,7 @@ static void rna_def_cloth_sim_settings(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Shear Stiffness", "Shear spring stiffness."); */
/* unused still
- prop= RNA_def_property(srna, "shear_stiffness_maximum", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "shear_stiffness_max", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "max_shear");
RNA_def_property_range(prop, 0.0f, upperLimitf);
RNA_def_property_ui_text(prop, "Shear Stiffness Maximum", "Maximum shear scaling value."); */
@@ -289,7 +289,7 @@ static void rna_def_cloth_collision_settings(BlenderRNA *brna)
PropertyRNA *prop;
srna = RNA_def_struct(brna, "ClothCollisionSettings", NULL);
- RNA_def_struct_ui_text(srna, "Cloth Collision Settings", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Cloth Collision Settings", "Cloth simulation settings for self collision and collision with other objects.");
RNA_def_struct_sdna(srna, "ClothCollSettings");
/* general collision */
@@ -298,7 +298,7 @@ static void rna_def_cloth_collision_settings(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "flags", CLOTH_COLLSETTINGS_FLAG_ENABLED);
RNA_def_property_ui_text(prop, "Enable Collision", "Enable collisions with other objects.");
- prop= RNA_def_property(srna, "minimum_distance", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "min_distance", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "epsilon");
RNA_def_property_range(prop, 0.001f, 1.0f);
RNA_def_property_ui_text(prop, "Minimum Distance", "Minimum distance between collision objects before collision response takes in, can be changed for each frame.");
@@ -318,7 +318,7 @@ static void rna_def_cloth_collision_settings(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "flags", CLOTH_COLLSETTINGS_FLAG_SELF);
RNA_def_property_ui_text(prop, "Enable Self Collision", "Enable self collisions.");
- prop= RNA_def_property(srna, "self_minimum_distance", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "self_min_distance", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "selfepsilon");
RNA_def_property_range(prop, 0.5f, 1.0f);
RNA_def_property_ui_text(prop, "Self Minimum Distance", "0.5 means no distance at all, 1.0 is maximum distance");
diff --git a/source/blender/makesrna/intern/rna_color.c b/source/blender/makesrna/intern/rna_color.c
index e38264548cd..e1be99365fe 100644
--- a/source/blender/makesrna/intern/rna_color.c
+++ b/source/blender/makesrna/intern/rna_color.c
@@ -122,7 +122,7 @@ static void rna_def_curvemappoint(BlenderRNA *brna)
};
srna= RNA_def_struct(brna, "CurveMapPoint", NULL);
- RNA_def_struct_ui_text(srna, "CurveMapPoint", "member of 'CurveMap' where these points make up a curve");
+ RNA_def_struct_ui_text(srna, "CurveMapPoint", "Point of a curve used for a curve mapping.");
/* not editable for now, need to have CurveMapping to do curvemapping_changed */
@@ -154,7 +154,7 @@ static void rna_def_curvemap(BlenderRNA *brna)
};
srna= RNA_def_struct(brna, "CurveMap", NULL);
- RNA_def_struct_ui_text(srna, "CurveMap", "User editable curve, member of 'CurveMapping'");
+ RNA_def_struct_ui_text(srna, "CurveMap", "Curve in a curve mapping.");
/* not editable for now, need to have CurveMapping to do curvemapping_changed */
@@ -176,7 +176,7 @@ static void rna_def_curvemapping(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "CurveMapping", NULL);
- RNA_def_struct_ui_text(srna, "CurveMapping", "Curve used to alter color or intensity of one or more inputs");
+ RNA_def_struct_ui_text(srna, "CurveMapping", "Curve mapping to map color, vector and scalar values to other values using a user defined curve.");
prop= RNA_def_property(srna, "clip", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CUMA_DO_CLIP);
diff --git a/source/blender/makesrna/intern/rna_constraint.c b/source/blender/makesrna/intern/rna_constraint.c
index 6e32bd7ac44..6e3e393296e 100644
--- a/source/blender/makesrna/intern/rna_constraint.c
+++ b/source/blender/makesrna/intern/rna_constraint.c
@@ -83,7 +83,7 @@ void rna_def_constraint_basedata(BlenderRNA *brna)
/* data */
srna= RNA_def_struct(brna, "Constraint", NULL );
- RNA_def_struct_ui_text(srna, "Constraint", "alter the transformation of 'Objects' or 'Bones' from a number of predefined constraints");
+ RNA_def_struct_ui_text(srna, "Constraint", "Constraint modifying the transformation of objects and bones.");
RNA_def_struct_refine_func(srna, "rna_Constraint_refine");
RNA_def_struct_sdna(srna, "bConstraint");
diff --git a/source/blender/makesrna/intern/rna_controller.c b/source/blender/makesrna/intern/rna_controller.c
index f9766e30db8..c08233b9584 100644
--- a/source/blender/makesrna/intern/rna_controller.c
+++ b/source/blender/makesrna/intern/rna_controller.c
@@ -66,21 +66,21 @@ void RNA_def_controller(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
static EnumPropertyItem controller_type_items[] ={
- {CONT_LOGIC_AND, "LOGICAND", "Logic And", ""},
- {CONT_LOGIC_OR, "LOGICOR", "Logic Or", ""},
- {CONT_LOGIC_NAND, "LOGICNAND", "Logic Nand", ""},
- {CONT_LOGIC_NOR, "LOGICNOR", "Logic Nor", ""},
- {CONT_LOGIC_XOR, "LOGICXOR", "Logic Xor", ""},
- {CONT_LOGIC_XNOR, "LOGICXNOR", "Logic Xnor", ""},
+ {CONT_LOGIC_AND, "LOGIC_AND", "Logic And", ""},
+ {CONT_LOGIC_OR, "LOGIC_OR", "Logic Or", ""},
+ {CONT_LOGIC_NAND, "LOGIC_NAND", "Logic Nand", ""},
+ {CONT_LOGIC_NOR, "LOGIC_NOR", "Logic Nor", ""},
+ {CONT_LOGIC_XOR, "LOGIC_XOR", "Logic Xor", ""},
+ {CONT_LOGIC_XNOR, "LOGIC_XNOR", "Logic Xnor", ""},
{CONT_EXPRESSION, "EXPRESSION", "Expression", ""},
{CONT_PYTHON, "PYTHON", "Python Script", ""},
{0, NULL, NULL, NULL}};
/* Controller */
srna= RNA_def_struct(brna, "Controller", NULL);
- RNA_def_struct_ui_text(srna, "Controller", "logic brick to connect 'Sensors' to 'Actuators'");
RNA_def_struct_sdna(srna, "bController");
RNA_def_struct_refine_func(srna, "rna_Controller_refine");
+ RNA_def_struct_ui_text(srna, "Controller", "Game engine logic brick to process events, connecting sensors to actuators.");
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_ui_text(prop, "Name", "");
@@ -94,8 +94,8 @@ void RNA_def_controller(BlenderRNA *brna)
/* Expression Controller */
srna= RNA_def_struct(brna, "ExpressionController", "Controller");
- RNA_def_struct_ui_text(srna, "Expression Controller", "DOC_BROKEN");
RNA_def_struct_sdna_from(srna, "bExpressionCont", "data");
+ RNA_def_struct_ui_text(srna, "Expression Controller", "Controller passing on events based on the evaluation of an expression.");
prop= RNA_def_property(srna, "expression", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "str");
@@ -104,31 +104,31 @@ void RNA_def_controller(BlenderRNA *brna)
/* Python Controller */
srna= RNA_def_struct(brna, "PythonController", "Controller" );
- RNA_def_struct_ui_text(srna, "Python Controller", "DOC_BROKEN");
RNA_def_struct_sdna_from(srna, "bPythonCont", "data");
+ RNA_def_struct_ui_text(srna, "Python Controller", "Controller executing a python script.");
prop= RNA_def_property(srna, "text", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "ID");
- RNA_def_property_ui_text(prop, "Python Text", "");
+ RNA_def_property_ui_text(prop, "Text", "Text datablock with the python script.");
/* Other Controllers */
srna= RNA_def_struct(brna, "AndController", "Controller");
- RNA_def_struct_ui_text(srna, "And Controller", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "And Controller", "Controller passing on events based on a logical AND operation.");
srna= RNA_def_struct(brna, "OrController", "Controller");
- RNA_def_struct_ui_text(srna, "Or Controller", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Or Controller", "Controller passing on events based on a logical OR operation.");
srna= RNA_def_struct(brna, "NorController", "Controller");
- RNA_def_struct_ui_text(srna, "Nor Controller", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Nor Controller", "Controller passing on events based on a logical NOR operation.");
srna= RNA_def_struct(brna, "NandController", "Controller");
- RNA_def_struct_ui_text(srna, "Nand Controller", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Nand Controller", "Controller passing on events based on a logical NAND operation.");
srna= RNA_def_struct(brna, "XorController", "Controller");
- RNA_def_struct_ui_text(srna, "Xor Controller", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Xor Controller", "Controller passing on events based on a logical XOR operation.");
srna= RNA_def_struct(brna, "XnorController", "Controller");
- RNA_def_struct_ui_text(srna, "Xnor Controller", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Xnor Controller", "Controller passing on events based on a logical XNOR operation.");
}
#endif
diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c
index 0d8df10f2a0..9e6dc4e8173 100644
--- a/source/blender/makesrna/intern/rna_curve.c
+++ b/source/blender/makesrna/intern/rna_curve.c
@@ -41,96 +41,6 @@ static int rna_Curve_texspace_editable(PointerRNA *ptr)
#else
-static void rna_def_path(BlenderRNA *brna, StructRNA *srna);
-static void rna_def_nurbs(BlenderRNA *brna, StructRNA *srna);
-static void rna_def_font(BlenderRNA *brna, StructRNA *srna);
-
-void rna_def_curve(BlenderRNA *brna)
-{
- StructRNA *srna;
- PropertyRNA *prop;
-
- srna= RNA_def_struct(brna, "Curve", "ID");
- RNA_def_struct_ui_text(srna, "Curve", "Curve Object Data for storing any number of bezier splines, nurbs or poly lines");
-
- rna_def_ipo_common(srna);
- rna_def_texmat_common(srna, "rna_Curve_texspace_editable");
-
- prop= RNA_def_property(srna, "key", PROP_POINTER, PROP_NONE);
- RNA_def_property_ui_text(prop, "Shape Keys", "");
-
- rna_def_path(brna, srna);
- rna_def_nurbs(brna, srna);
- rna_def_font(brna, srna);
-
- /* Number values */
- prop= RNA_def_property(srna, "bevel_resolution", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "bevresol");
- RNA_def_property_range(prop, 0, 32);
- RNA_def_property_ui_text(prop, "Bevel Resolution", "Bevel resolution when depth is non-zero and no specific bevel object has been defined.");
-
- prop= RNA_def_property(srna, "width", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "width");
- RNA_def_property_range(prop, 0.0f, 2.0f);
- RNA_def_property_ui_text(prop, "Width", "Scale the original width (1.0) based on given factor.");
-
- prop= RNA_def_property(srna, "extrude", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "ext1");
- RNA_def_property_range(prop, 0.0f, 100.0f);
- RNA_def_property_ui_text(prop, "Extrude", "Amount of curve extrusion when not using a bevel object.");
-
- prop= RNA_def_property(srna, "bevel_depth", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "ext2");
- RNA_def_property_range(prop, 0.0f, 2.0f);
- RNA_def_property_ui_text(prop, "Bevel Depth", "Bevel depth when not using a bevel object.");
-
- prop= RNA_def_property(srna, "resolution_u", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "resolu");
- RNA_def_property_range(prop, 1, 1024);
- RNA_def_property_ui_text(prop, "U Resolution", "Surface resolution in U direction.");
-
- prop= RNA_def_property(srna, "resolution_v", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "resolv");
- RNA_def_property_range(prop, 1, 1024);
- RNA_def_property_ui_text(prop, "V Resolution", "Surface resolution in V direction.");
-
- prop= RNA_def_property(srna, "resolution_u_rendering", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "resolu_ren");
- RNA_def_property_range(prop, 0, 1024);
- RNA_def_property_ui_text(prop, "U Resolution (Rendering)", "Surface resolution in U direction used while rendering. Zero skips this property.");
-
- prop= RNA_def_property(srna, "resolution_v_rendering", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "resolv_ren");
- RNA_def_property_range(prop, 0, 1024);
- RNA_def_property_ui_text(prop, "V Resolution (Rendering)", "Surface resolution in V direction used while rendering. Zero skips this property.");
-
- /* pointers */
- prop= RNA_def_property(srna, "bevel_object", PROP_POINTER, PROP_NONE);
- RNA_def_property_pointer_sdna(prop, NULL, "bevobj");
- RNA_def_property_ui_text(prop, "Bevel Object", "Curve object name that defines the bevel shape.");
-
- prop= RNA_def_property(srna, "taper_object", PROP_POINTER, PROP_NONE);
- RNA_def_property_pointer_sdna(prop, NULL, "taperobj");
- RNA_def_property_ui_text(prop, "Taper Object", "Curve object name that defines the taper (width).");
-
- /* Flags */
- prop= RNA_def_property(srna, "planar", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", CU_3D);
- RNA_def_property_ui_text(prop, "2D Curve", "Define curve in two dimensions only. Note that fill only works when this is enabled.");
-
- prop= RNA_def_property(srna, "front", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_FRONT);
- RNA_def_property_ui_text(prop, "Front", "Draw filled front for extruded/beveled curves.");
-
- prop= RNA_def_property(srna, "back", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_BACK);
- RNA_def_property_ui_text(prop, "Back", "Draw filled back for extruded/beveled curves.");
-
- prop= RNA_def_property(srna, "retopo", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_RETOPO);
- RNA_def_property_ui_text(prop, "Retopo", "Turn on the re-topology tool.");
-}
-
static void rna_def_path(BlenderRNA *brna, StructRNA *srna)
{
PropertyRNA *prop;
@@ -253,16 +163,9 @@ static void rna_def_font(BlenderRNA *brna, StructRNA *srna)
RNA_def_property_pointer_sdna(prop, NULL, "tb");
RNA_def_property_ui_text(prop, "Textbox", "");
- /*
- TODO: struct CharInfo curinfo;
-
- Obviously a pointer won't work in this case.
- */
- /*
- prop= RNA_def_property(srna, "curinfo", PROP_POINTER, PROP_NONE);
+ prop= RNA_def_property(srna, "edit_format", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "curinfo");
- RNA_def_property_ui_text(prop, "curinfo", "");
- */
+ RNA_def_property_ui_text(prop, "Edit Format", "Editing settings character formatting.");
/* flags */
prop= RNA_def_property(srna, "fast", PROP_BOOLEAN, PROP_NONE);
@@ -296,7 +199,7 @@ void rna_def_textbox(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "TextBox", NULL);
- RNA_def_struct_ui_text(srna, "Text Box", "Bounding box for text layout");
+ RNA_def_struct_ui_text(srna, "Text Box", "Text bounding box for layout.");
/* number values */
prop= RNA_def_property(srna, "x", PROP_FLOAT, PROP_NONE);
@@ -325,8 +228,9 @@ void rna_def_charinfo(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "CharInfo", NULL);
- RNA_def_struct_ui_text(srna, "Character Info", "Specific properties per character");
+ srna= RNA_def_struct(brna, "TextCharacterFormat", NULL);
+ RNA_def_struct_sdna(srna, "CharInfo");
+ RNA_def_struct_ui_text(srna, "Text Character Format", "Text character formatting settings.");
/* flags */
prop= RNA_def_property(srna, "style", PROP_BOOLEAN, PROP_NONE);
@@ -350,6 +254,93 @@ void rna_def_charinfo(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Wrap", "");
}
+void rna_def_curve(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ srna= RNA_def_struct(brna, "Curve", "ID");
+ RNA_def_struct_ui_text(srna, "Curve", "Curve datablock storing curves, splines and NURBS.");
+
+ rna_def_ipo_common(srna);
+ rna_def_texmat_common(srna, "rna_Curve_texspace_editable");
+
+ prop= RNA_def_property(srna, "shape_keys", PROP_POINTER, PROP_NONE);
+ RNA_def_property_pointer_sdna(prop, NULL, "key");
+ RNA_def_property_ui_text(prop, "Shape Keys", "");
+
+ rna_def_path(brna, srna);
+ rna_def_nurbs(brna, srna);
+ rna_def_font(brna, srna);
+
+ /* Number values */
+ prop= RNA_def_property(srna, "bevel_resolution", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "bevresol");
+ RNA_def_property_range(prop, 0, 32);
+ RNA_def_property_ui_text(prop, "Bevel Resolution", "Bevel resolution when depth is non-zero and no specific bevel object has been defined.");
+
+ prop= RNA_def_property(srna, "width", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "width");
+ RNA_def_property_range(prop, 0.0f, 2.0f);
+ RNA_def_property_ui_text(prop, "Width", "Scale the original width (1.0) based on given factor.");
+
+ prop= RNA_def_property(srna, "extrude", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "ext1");
+ RNA_def_property_range(prop, 0.0f, 100.0f);
+ RNA_def_property_ui_text(prop, "Extrude", "Amount of curve extrusion when not using a bevel object.");
+
+ prop= RNA_def_property(srna, "bevel_depth", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "ext2");
+ RNA_def_property_range(prop, 0.0f, 2.0f);
+ RNA_def_property_ui_text(prop, "Bevel Depth", "Bevel depth when not using a bevel object.");
+
+ prop= RNA_def_property(srna, "resolution_u", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "resolu");
+ RNA_def_property_range(prop, 1, 1024);
+ RNA_def_property_ui_text(prop, "Resolution U", "Surface resolution in U direction.");
+
+ prop= RNA_def_property(srna, "resolution_v", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "resolv");
+ RNA_def_property_range(prop, 1, 1024);
+ RNA_def_property_ui_text(prop, "Resolution V", "Surface resolution in V direction.");
+
+ prop= RNA_def_property(srna, "render_resolution_u", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "resolu_ren");
+ RNA_def_property_range(prop, 0, 1024);
+ RNA_def_property_ui_text(prop, "Render Resolution U", "Surface resolution in U direction used while rendering. Zero skips this property.");
+
+ prop= RNA_def_property(srna, "render_resolution_v", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "resolv_ren");
+ RNA_def_property_range(prop, 0, 1024);
+ RNA_def_property_ui_text(prop, "Render Resolution V", "Surface resolution in V direction used while rendering. Zero skips this property.");
+
+ /* pointers */
+ prop= RNA_def_property(srna, "bevel_object", PROP_POINTER, PROP_NONE);
+ RNA_def_property_pointer_sdna(prop, NULL, "bevobj");
+ RNA_def_property_ui_text(prop, "Bevel Object", "Curve object name that defines the bevel shape.");
+
+ prop= RNA_def_property(srna, "taper_object", PROP_POINTER, PROP_NONE);
+ RNA_def_property_pointer_sdna(prop, NULL, "taperobj");
+ RNA_def_property_ui_text(prop, "Taper Object", "Curve object name that defines the taper (width).");
+
+ /* Flags */
+ prop= RNA_def_property(srna, "curve_2d", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", CU_3D);
+ RNA_def_property_ui_text(prop, "2D Curve", "Define curve in two dimensions only. Note that fill only works when this is enabled.");
+
+ prop= RNA_def_property(srna, "front", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_FRONT);
+ RNA_def_property_ui_text(prop, "Front", "Draw filled front for extruded/beveled curves.");
+
+ prop= RNA_def_property(srna, "back", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_BACK);
+ RNA_def_property_ui_text(prop, "Back", "Draw filled back for extruded/beveled curves.");
+
+ prop= RNA_def_property(srna, "retopo", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_RETOPO);
+ RNA_def_property_ui_text(prop, "Retopo", "Turn on the re-topology tool.");
+}
+
void RNA_def_curve(BlenderRNA *brna)
{
rna_def_curve(brna);
@@ -358,3 +349,4 @@ void RNA_def_curve(BlenderRNA *brna)
}
#endif
+
diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c
index 36b62f5030b..cd852a39538 100644
--- a/source/blender/makesrna/intern/rna_define.c
+++ b/source/blender/makesrna/intern/rna_define.c
@@ -166,7 +166,7 @@ static int rna_find_sdna_member(SDNA *sdna, const char *structname, const char *
return 0;
}
-static int rna_validate_identifier(const char *identifier, char *error)
+static int rna_validate_identifier(const char *identifier, char *error, int property)
{
int a=0;
@@ -188,11 +188,18 @@ static int rna_validate_identifier(const char *identifier, char *error)
return 0;
}
- for(a=1; identifier[a] != '\0'; a++) {
+ for(a=0; identifier[a]; a++) {
+ if(DefRNA.preprocess && property) {
+ if(isalpha(identifier[a]) && isupper(identifier[a])) {
+ strcpy(error, "property names must contain lower case characters only");
+ return 0;
+ }
+ }
+
if (identifier[a]=='_') {
continue;
}
-
+
if (isalnum(identifier[a])==0) {
strcpy(error, "one of the characters failed an isalnum() check and is not an underscore");
return 0;
@@ -327,7 +334,8 @@ StructRNA *RNA_def_struct(BlenderRNA *brna, const char *identifier, const char *
if(DefRNA.preprocess) {
char error[512];
- if (rna_validate_identifier(identifier, error) == 0) {
+
+ if (rna_validate_identifier(identifier, error, 0) == 0) {
fprintf(stderr, "RNA_def_struct: struct identifier \"%s\" error - %s\n", identifier, error);
DefRNA.error= 1;
}
@@ -355,11 +363,11 @@ StructRNA *RNA_def_struct(BlenderRNA *brna, const char *identifier, const char *
srna->properties.first= srna->properties.last= NULL;
if(DefRNA.preprocess) {
- srna->from= (StructRNA*)from;
+ srna->base= srnafrom;
dsfrom= rna_find_def_struct(srnafrom);
}
else
- srna->from= srnafrom;
+ srna->base= srnafrom;
}
srna->identifier= identifier;
@@ -516,13 +524,21 @@ void RNA_def_struct_name_property(struct StructRNA *srna, struct PropertyRNA *pr
srna->nameproperty= prop;
}
-void RNA_def_struct_parent(StructRNA *srna, StructRNA *parent)
+void RNA_def_struct_nested(BlenderRNA *brna, StructRNA *srna, const char *structname)
{
+ StructRNA *srnafrom;
- if(DefRNA.preprocess)
- srna->parent= (StructRNA*)parent->identifier;
- else
- srna->parent= parent;
+ /* find struct to derive from */
+ for(srnafrom= brna->structs.first; srnafrom; srnafrom=srnafrom->next)
+ if(strcmp(srnafrom->identifier, structname) == 0)
+ break;
+
+ if(!srnafrom) {
+ fprintf(stderr, "RNA_def_struct_nested: struct %s not found.\n", structname);
+ DefRNA.error= 1;
+ }
+
+ srna->nested= srnafrom;
}
void RNA_def_struct_flag(StructRNA *srna, int flag)
@@ -573,7 +589,7 @@ PropertyRNA *RNA_def_property(StructRNA *srna, const char *identifier, int type,
if(DefRNA.preprocess) {
char error[512];
- if (rna_validate_identifier(identifier, error) == 0) {
+ if (rna_validate_identifier(identifier, error, 1) == 0) {
fprintf(stderr, "RNA_def_property: property identifier \"%s\" - %s\n", identifier, error);
DefRNA.error= 1;
}
diff --git a/source/blender/makesrna/intern/rna_fluidsim.c b/source/blender/makesrna/intern/rna_fluidsim.c
index c986fed93f1..fe5ad51d06f 100644
--- a/source/blender/makesrna/intern/rna_fluidsim.c
+++ b/source/blender/makesrna/intern/rna_fluidsim.c
@@ -80,7 +80,7 @@ static void rna_def_fluidsim_slip(StructRNA *srna)
RNA_def_property_ui_text(prop, "Partial Slip Amount", "Amount of mixing between no- and free-slip, 0 is no slip and 1 is free slip.");
}
-static void rna_def_fluidsim_domain(BlenderRNA *brna, StructRNA *parent)
+static void rna_def_fluidsim_domain(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
@@ -98,10 +98,9 @@ static void rna_def_fluidsim_domain(BlenderRNA *brna, StructRNA *parent)
{4, "HONEY", "Honey", "Viscosity of 2.0 * 10^-3."},
{0, NULL, NULL, NULL}};
- srna= RNA_def_struct(brna, "DomainFluidSettings", NULL);
+ srna= RNA_def_struct(brna, "DomainFluidSettings", "FluidSettings");
RNA_def_struct_sdna(srna, "FluidsimSettings");
- RNA_def_struct_parent(srna, parent);
- RNA_def_struct_ui_text(srna, "Domain Fluid Simulation Settings", "");
+ RNA_def_struct_ui_text(srna, "Domain Fluid Simulation Settings", "Fluid simulation settings for the domain of a fluid simulation.");
/* standard settings */
@@ -233,15 +232,14 @@ static void rna_def_fluidsim_volume(StructRNA *srna)
RNA_def_property_ui_text(prop, "Export Animated Mesh", "Export this mesh as an animated one. Slower, only use if really necessary (e.g. armatures or parented objects), animated pos/rot/scale IPOs do not require it.");
}
-static void rna_def_fluidsim_fluid(BlenderRNA *brna, StructRNA *parent)
+static void rna_def_fluidsim_fluid(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "FluidFluidSettings", NULL);
+ srna= RNA_def_struct(brna, "FluidFluidSettings", "FluidSettings");
RNA_def_struct_sdna(srna, "FluidsimSettings");
- RNA_def_struct_parent(srna, parent);
- RNA_def_struct_ui_text(srna, "Fluid Fluid Simulation Settings", "");
+ RNA_def_struct_ui_text(srna, "Fluid Fluid Simulation Settings", "Fluid simulation settings for the fluid in the simulation.");
rna_def_fluidsim_volume(srna);
@@ -252,15 +250,14 @@ static void rna_def_fluidsim_fluid(BlenderRNA *brna, StructRNA *parent)
RNA_def_property_ui_text(prop, "Initial Velocity", "Initial velocity of fluid.");
}
-static void rna_def_fluidsim_obstacle(BlenderRNA *brna, StructRNA *parent)
+static void rna_def_fluidsim_obstacle(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "ObstacleFluidSettings", NULL);
+ srna= RNA_def_struct(brna, "ObstacleFluidSettings", "FluidSettings");
RNA_def_struct_sdna(srna, "FluidsimSettings");
- RNA_def_struct_parent(srna, parent);
- RNA_def_struct_ui_text(srna, "Obstacle Fluid Simulation Settings", "");
+ RNA_def_struct_ui_text(srna, "Obstacle Fluid Simulation Settings", "Fluid simulation settings for obstacles in the simulation.");
rna_def_fluidsim_volume(srna);
rna_def_fluidsim_slip(srna);
@@ -271,15 +268,14 @@ static void rna_def_fluidsim_obstacle(BlenderRNA *brna, StructRNA *parent)
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, StructRNA *parent)
+static void rna_def_fluidsim_inflow(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "InflowFluidSettings", NULL);
+ srna= RNA_def_struct(brna, "InflowFluidSettings", "FluidSettings");
RNA_def_struct_sdna(srna, "FluidsimSettings");
- RNA_def_struct_parent(srna, parent);
- RNA_def_struct_ui_text(srna, "Inflow Fluid Simulation Settings", "");
+ RNA_def_struct_ui_text(srna, "Inflow Fluid Simulation Settings", "Fluid simulation settings for objects adding fluids in the simulation.");
rna_def_fluidsim_volume(srna);
@@ -294,27 +290,25 @@ static void rna_def_fluidsim_inflow(BlenderRNA *brna, StructRNA *parent)
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, StructRNA *parent)
+static void rna_def_fluidsim_outflow(BlenderRNA *brna)
{
StructRNA *srna;
- srna= RNA_def_struct(brna, "OutflowFluidSettings", NULL);
+ srna= RNA_def_struct(brna, "OutflowFluidSettings", "FluidSettings");
RNA_def_struct_sdna(srna, "FluidsimSettings");
- RNA_def_struct_parent(srna, parent);
- RNA_def_struct_ui_text(srna, "Outflow Fluid Simulation Settings", "");
+ RNA_def_struct_ui_text(srna, "Outflow Fluid Simulation Settings", "Fluid simulation settings for objects removing fluids from the simulation.");
rna_def_fluidsim_volume(srna);
}
-static void rna_def_fluidsim_particle(BlenderRNA *brna, StructRNA *parent)
+static void rna_def_fluidsim_particle(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "ParticleFluidSettings", NULL);
+ srna= RNA_def_struct(brna, "ParticleFluidSettings", "FluidSettings");
RNA_def_struct_sdna(srna, "FluidsimSettings");
- RNA_def_struct_parent(srna, parent);
- RNA_def_struct_ui_text(srna, "Particle Fluid Simulation Settings", "");
+ RNA_def_struct_ui_text(srna, "Particle Fluid Simulation Settings", "Fluid simulation settings for objects storing fluid particles generated by the simulation.");
prop= RNA_def_property(srna, "drops", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "typeFlags", OB_FSPART_DROP);
@@ -344,15 +338,14 @@ static void rna_def_fluidsim_particle(BlenderRNA *brna, StructRNA *parent)
RNA_def_property_ui_text(prop, "Path", "Directory (and/or filename prefix) to store and load particles from.");
}
-static void rna_def_fluidsim_control(BlenderRNA *brna, StructRNA *parent)
+static void rna_def_fluidsim_control(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "ControlFluidSettings", NULL);
+ srna= RNA_def_struct(brna, "ControlFluidSettings", "FluidSettings");
RNA_def_struct_sdna(srna, "FluidsimSettings");
- RNA_def_struct_parent(srna, parent);
- RNA_def_struct_ui_text(srna, "Control Fluid Simulation Settings", "");
+ RNA_def_struct_ui_text(srna, "Control Fluid Simulation Settings", "Fluid simulation settings for objects controlling the motion of fluid in the simulation.");
prop= RNA_def_property(srna, "start_time", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "cpsTimeStart");
@@ -414,14 +407,14 @@ void RNA_def_fluidsim(BlenderRNA *brna)
srna= RNA_def_struct(brna, "FluidSettings", NULL);
RNA_def_struct_sdna(srna, "FluidsimSettings");
RNA_def_struct_refine_func(srna, "rna_FluidSettings_refine");
- RNA_def_struct_ui_text(srna, "Fluid Simulation Settings", "");
+ RNA_def_struct_ui_text(srna, "Fluid Simulation Settings", "Fluid simulation settings for an object taking part in the simulation.");
/* enable and type */
- prop= RNA_def_property(srna, "enable", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "enabled", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "type", OB_FLUIDSIM_ENABLE);
RNA_def_property_flag(prop, PROP_NOT_EDITABLE); // needs to create modifier
- RNA_def_property_ui_text(prop, "Enable", "Sets object to participate in fluid simulation.");
+ RNA_def_property_ui_text(prop, "Enabled", "Sets object to participate in fluid simulation.");
prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "type");
@@ -434,13 +427,13 @@ void RNA_def_fluidsim(BlenderRNA *brna)
/* types */
- rna_def_fluidsim_domain(brna, srna);
- rna_def_fluidsim_fluid(brna, srna);
- rna_def_fluidsim_obstacle(brna, srna);
- rna_def_fluidsim_inflow(brna, srna);
- rna_def_fluidsim_outflow(brna, srna);
- rna_def_fluidsim_particle(brna, srna);
- rna_def_fluidsim_control(brna, srna);
+ rna_def_fluidsim_domain(brna);
+ rna_def_fluidsim_fluid(brna);
+ rna_def_fluidsim_obstacle(brna);
+ rna_def_fluidsim_inflow(brna);
+ rna_def_fluidsim_outflow(brna);
+ rna_def_fluidsim_particle(brna);
+ rna_def_fluidsim_control(brna);
}
diff --git a/source/blender/makesrna/intern/rna_group.c b/source/blender/makesrna/intern/rna_group.c
index 1125482d966..b4ff9479243 100644
--- a/source/blender/makesrna/intern/rna_group.c
+++ b/source/blender/makesrna/intern/rna_group.c
@@ -49,7 +49,7 @@ void RNA_def_group(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "Group", "ID");
- RNA_def_struct_ui_text(srna, "Group", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Group", "Group of Object datablocks.");
prop= RNA_def_property(srna, "dupli_offset", PROP_FLOAT, PROP_VECTOR);
RNA_def_property_float_sdna(prop, NULL, "dupli_ofs");
diff --git a/source/blender/makesrna/intern/rna_image.c b/source/blender/makesrna/intern/rna_image.c
index de81ff10ae8..c98a936030a 100644
--- a/source/blender/makesrna/intern/rna_image.c
+++ b/source/blender/makesrna/intern/rna_image.c
@@ -44,7 +44,7 @@ static void rna_def_imageuser(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "ImageUser", NULL);
- RNA_def_struct_ui_text(srna, "Image User", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Image User", "Parameters defining how an Image datablock is used by another datablock.");
prop= RNA_def_property(srna, "auto_refresh", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", IMA_ANIM_ALWAYS);
@@ -73,12 +73,12 @@ static void rna_def_imageuser(BlenderRNA *brna)
RNA_def_property_range(prop, -MAXFRAMEF, MAXFRAMEF);
RNA_def_property_ui_text(prop, "Fields per Frame", "The number of fields per rendered frame (2 fields is 1 image).");
- prop= RNA_def_property(srna, "renderLayer", PROP_INT, PROP_UNSIGNED);
+ prop= RNA_def_property(srna, "multilayer_layer", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "layer");
RNA_def_property_flag(prop, PROP_NOT_EDITABLE); /* image_multi_cb */
RNA_def_property_ui_text(prop, "Layer", "Layer in multilayer image.");
- prop= RNA_def_property(srna, "renderPass", PROP_INT, PROP_UNSIGNED);
+ prop= RNA_def_property(srna, "multilayer_pass", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "pass");
RNA_def_property_flag(prop, PROP_NOT_EDITABLE); /* image_multi_cb */
RNA_def_property_ui_text(prop, "Pass", "Pass in multilayer image.");
@@ -112,7 +112,7 @@ static void rna_def_image(BlenderRNA *brna)
{0, NULL, NULL, NULL}};
srna= RNA_def_struct(brna, "Image", "ID");
- RNA_def_struct_ui_text(srna, "Image", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Image", "Image datablock referencing an external or packed image.");
prop= RNA_def_property(srna, "filename", PROP_STRING, PROP_FILEPATH);
RNA_def_property_string_sdna(prop, NULL, "name");
diff --git a/source/blender/makesrna/intern/rna_internal.h b/source/blender/makesrna/intern/rna_internal.h
index 32c545131ba..814bc0f3733 100644
--- a/source/blender/makesrna/intern/rna_internal.h
+++ b/source/blender/makesrna/intern/rna_internal.h
@@ -142,6 +142,7 @@ void RNA_def_world(struct BlenderRNA *brna);
void rna_def_ipo_common(struct StructRNA *srna);
void rna_def_texmat_common(struct StructRNA *srna, const char *texspace_editable);
+void rna_def_mtex_common(struct StructRNA *srna, const char *begin, const char *activeget, const char *structname);
void rna_ID_name_get(struct PointerRNA *ptr, char *value);
int rna_ID_name_length(struct PointerRNA *ptr);
@@ -160,13 +161,13 @@ void rna_object_vcollayer_name_set(struct PointerRNA *ptr, const char *value, ch
extern StringPropertyRNA rna_IDProperty_string;
extern IntPropertyRNA rna_IDProperty_int;
-extern IntPropertyRNA rna_IDProperty_intarray;
+extern IntPropertyRNA rna_IDProperty_int_array;
extern FloatPropertyRNA rna_IDProperty_float;
-extern FloatPropertyRNA rna_IDProperty_floatarray;
+extern FloatPropertyRNA rna_IDProperty_float_array;
extern PointerPropertyRNA rna_IDProperty_group;
extern CollectionPropertyRNA rna_IDProperty_collection;
extern FloatPropertyRNA rna_IDProperty_double;
-extern FloatPropertyRNA rna_IDProperty_doublearray;
+extern FloatPropertyRNA rna_IDProperty_double_array;
extern StructRNA RNA_IDProperty;
extern StructRNA RNA_IDPropertyGroup;
diff --git a/source/blender/makesrna/intern/rna_internal_types.h b/source/blender/makesrna/intern/rna_internal_types.h
index 45b122b2ae5..4b7577673b8 100644
--- a/source/blender/makesrna/intern/rna_internal_types.h
+++ b/source/blender/makesrna/intern/rna_internal_types.h
@@ -227,13 +227,13 @@ struct StructRNA {
PropertyRNA *iteratorproperty;
/* struct this is derivedfrom */
- struct StructRNA *from;
+ struct StructRNA *base;
/* only use for nested structs, where both the parent and child access
* the same C Struct but nesting is used for grouping properties.
* The parent property is used so we know NULL checks are not needed,
* and that this struct will never exist without its parent */
- struct StructRNA *parent;
+ struct StructRNA *nested;
/* function to give the more specific type */
StructRefineFunc refine;
diff --git a/source/blender/makesrna/intern/rna_ipo.c b/source/blender/makesrna/intern/rna_ipo.c
index 96ab63b4312..01aff0348b6 100644
--- a/source/blender/makesrna/intern/rna_ipo.c
+++ b/source/blender/makesrna/intern/rna_ipo.c
@@ -76,8 +76,9 @@ void rna_def_bpoint(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "BPoint", NULL);
- RNA_def_struct_ui_text(srna, "BPoint", "DOC_BROKEN");
+ srna= RNA_def_struct(brna, "CurvePoint", NULL);
+ RNA_def_struct_sdna(srna, "BPoint");
+ RNA_def_struct_ui_text(srna, "CurvePoint", "Curve point without handles.");
/* Boolean values */
prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE);
@@ -128,8 +129,9 @@ void rna_def_beztriple(BlenderRNA *brna)
{IPO_BEZ, "BEZIER", "Bezier", ""},
{0, NULL, NULL, NULL}};
- srna= RNA_def_struct(brna, "BezTriple", NULL);
- RNA_def_struct_ui_text(srna, "Bezier Triple", "DOC_BROKEN");
+ srna= RNA_def_struct(brna, "BezierCurvePoint", NULL);
+ RNA_def_struct_sdna(srna, "BezTriple");
+ RNA_def_struct_ui_text(srna, "Bezier Curve Point", "Bezier curve point with two handles.");
/* Boolean values */
prop= RNA_def_property(srna, "selected_handle1", PROP_BOOLEAN, PROP_NONE);
@@ -208,7 +210,7 @@ void rna_def_ipodriver(BlenderRNA *brna)
{0, NULL, NULL, NULL}};
srna= RNA_def_struct(brna, "IpoDriver", NULL);
- RNA_def_struct_ui_text(srna, "Ipo Driver", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Ipo Driver", "Driver for the ipo curve value based on an external value.");
/* Enums */
prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
@@ -242,7 +244,7 @@ void rna_def_ipocurve(BlenderRNA *brna)
{0, NULL, NULL, NULL}};
srna= RNA_def_struct(brna, "IpoCurve", NULL);
- RNA_def_struct_ui_text(srna, "Ipo Curve", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Ipo Curve", "Ipo curve defining values of a period of time.");
/* Enums */
prop= RNA_def_property(srna, "interpolation", PROP_ENUM, PROP_NONE);
@@ -262,16 +264,16 @@ void rna_def_ipocurve(BlenderRNA *brna)
RNA_def_property_pointer_sdna(prop, NULL, "driver");
RNA_def_property_ui_text(prop, "Ipo Driver", "");
- /* Collections */
- prop= RNA_def_property(srna, "bpoints", PROP_COLLECTION, PROP_NONE);
+ /* Collections XXX */
+ prop= RNA_def_property(srna, "points", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "bp", "totvert");
- RNA_def_property_struct_type(prop, "BPoint");
- RNA_def_property_ui_text(prop, "BPoints", "");
+ RNA_def_property_struct_type(prop, "CurvePoint");
+ RNA_def_property_ui_text(prop, "Points", "");
- prop= RNA_def_property(srna, "bezier_triples", PROP_COLLECTION, PROP_NONE);
+ prop= RNA_def_property(srna, "bezier_points", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "bezt", "totvert");
- RNA_def_property_struct_type(prop, "BezTriple");
- RNA_def_property_ui_text(prop, "Bezier Triples", "");
+ RNA_def_property_struct_type(prop, "BezierCurvePoint");
+ RNA_def_property_ui_text(prop, "Bezier Points", "");
}
void rna_def_ipo(BlenderRNA *brna)
@@ -296,7 +298,7 @@ void rna_def_ipo(BlenderRNA *brna)
{0, NULL, NULL, NULL}};
srna= RNA_def_struct(brna, "Ipo", "ID");
- RNA_def_struct_ui_text(srna, "Ipo", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Ipo", "Ipo datablock containing Ipo curves for animation of a datablock.");
/* Enums */
prop= RNA_def_property(srna, "block_type", PROP_ENUM, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_key.c b/source/blender/makesrna/intern/rna_key.c
index bf328388836..cd133793500 100644
--- a/source/blender/makesrna/intern/rna_key.c
+++ b/source/blender/makesrna/intern/rna_key.c
@@ -201,7 +201,7 @@ static void rna_def_keydata(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "ShapeKeyPoint", NULL);
- RNA_def_struct_ui_text(srna, "Shape Key Point", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Shape Key Point", "Point in a shape key.");
prop= RNA_def_property(srna, "co", PROP_FLOAT, PROP_VECTOR);
RNA_def_property_array(prop, 3);
@@ -209,7 +209,7 @@ static void rna_def_keydata(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Location", "");
srna= RNA_def_struct(brna, "ShapeKeyCurvePoint", NULL);
- RNA_def_struct_ui_text(srna, "Shape Key Curve Point", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Shape Key Curve Point", "Point in a shape key for curves.");
prop= RNA_def_property(srna, "co", PROP_FLOAT, PROP_VECTOR);
RNA_def_property_array(prop, 3);
@@ -221,7 +221,7 @@ static void rna_def_keydata(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Tilt", "");
srna= RNA_def_struct(brna, "ShapeKeyBezierPoint", NULL);
- RNA_def_struct_ui_text(srna, "Shape Key Bezier Point", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Shape Key Bezier Point", "Point in a shape key for bezier curves.");
prop= RNA_def_property(srna, "co", PROP_FLOAT, PROP_VECTOR);
RNA_def_property_array(prop, 3);
@@ -256,7 +256,7 @@ static void rna_def_keyblock(BlenderRNA *brna)
{0, NULL, NULL, NULL}};
srna= RNA_def_struct(brna, "ShapeKey", NULL);
- RNA_def_struct_ui_text(srna, "Shape Key", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Shape Key", "Shape key in a shape keys datablock.");
RNA_def_struct_sdna(srna, "KeyBlock");
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
@@ -317,21 +317,21 @@ static void rna_def_key(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "Key", "ID");
- RNA_def_struct_ui_text(srna, "Key", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Key", "Shape keys datablock containing different shapes of geometric datablocks.");
- prop= RNA_def_property(srna, "reference_key", PROP_POINTER, PROP_NONE);
+ prop= RNA_def_property(srna, "reference_key", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_flag(prop, PROP_NOT_EDITABLE);
RNA_def_property_pointer_sdna(prop, NULL, "refkey");
RNA_def_property_ui_text(prop, "Reference Key", "");
- prop= RNA_def_property(srna, "shape_keys", PROP_COLLECTION, PROP_NONE);
+ prop= RNA_def_property(srna, "keys", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "block", NULL);
RNA_def_property_struct_type(prop, "ShapeKey");
- RNA_def_property_ui_text(prop, "Shape Keys", "");
+ RNA_def_property_ui_text(prop, "Keys", "Shape keys.");
rna_def_ipo_common(srna);
- prop= RNA_def_property(srna, "user", PROP_POINTER, PROP_NONE);
+ prop= RNA_def_property(srna, "user", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "from");
RNA_def_property_ui_text(prop, "User", "Datablock using these shape keys.");
diff --git a/source/blender/makesrna/intern/rna_lamp.c b/source/blender/makesrna/intern/rna_lamp.c
index 3b943f807ad..0f3612e2049 100644
--- a/source/blender/makesrna/intern/rna_lamp.c
+++ b/source/blender/makesrna/intern/rna_lamp.c
@@ -30,6 +30,8 @@
#include "rna_internal.h"
#include "DNA_lamp_types.h"
+#include "DNA_material_types.h"
+#include "DNA_texture_types.h"
#include "WM_types.h"
@@ -44,15 +46,80 @@ static void rna_Lamp_buffer_size_set(PointerRNA *ptr, int value)
la->bufsize &= (~15); /* round to multiple of 16 */
}
-static void *rna_Lamp_sunsky_settings_get(PointerRNA *ptr)
+static void *rna_Lamp_sky_settings_get(PointerRNA *ptr)
{
return ptr->id.data;
}
+static void rna_Lamp_mtex_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
+{
+ Lamp *la= (Lamp*)ptr->data;
+ rna_iterator_array_begin(iter, (void*)la->mtex, sizeof(MTex*), MAX_MTEX, NULL);
+}
+
+static void *rna_Lamp_active_texture_get(PointerRNA *ptr)
+{
+ Lamp *la= (Lamp*)ptr->data;
+ return la->mtex[(int)la->texact];
+}
+
+static StructRNA* rna_Lamp_refine(struct PointerRNA *ptr)
+{
+ Lamp *la= (Lamp*)ptr->data;
+
+ switch(la->type) {
+ case LA_LOCAL:
+ return &RNA_LocalLamp;
+ case LA_SUN:
+ return &RNA_SunLamp;
+ case LA_SPOT:
+ return &RNA_SpotLamp;
+ case LA_HEMI:
+ return &RNA_HemiLamp;
+ case LA_AREA:
+ return &RNA_AreaLamp;
+ default:
+ return &RNA_Lamp;
+ }
+}
#else
-static void rna_def_lamp_sunsky_settings(BlenderRNA *brna, StructRNA *parent)
+static void rna_def_lamp_mtex(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ static EnumPropertyItem prop_texture_coordinates_items[] = {
+ {TEXCO_GLOB, "GLOBAL", "Global", "Uses global coordinates for the texture coordinates."},
+ {TEXCO_VIEW, "VIEW", "View", "Uses view coordinates for the texture coordinates."},
+ {TEXCO_OBJECT, "OBJECT", "Object", "Uses linked object's coordinates for texture coordinates."},
+ {0, NULL, NULL, NULL}};
+
+ srna= RNA_def_struct(brna, "LampTextureSlot", "TextureSlot");
+ RNA_def_struct_sdna(srna, "MTex");
+ RNA_def_struct_ui_text(srna, "Lamp Texture Slot", "Texture slot for textures in a Lamp datablock.");
+
+ prop= RNA_def_property(srna, "texture_coordinates", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "texco");
+ RNA_def_property_enum_items(prop, prop_texture_coordinates_items);
+ RNA_def_property_ui_text(prop, "Texture Coordinates", "");
+
+ prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
+ RNA_def_property_pointer_sdna(prop, NULL, "object");
+ RNA_def_property_struct_type(prop, "Object");
+ RNA_def_property_ui_text(prop, "Object", "Object to use for mapping with Object texture coordinates.");
+
+ prop= RNA_def_property(srna, "map_to_color", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "mapto", LAMAP_COL);
+ RNA_def_property_ui_text(prop, "Map To Color", "Lets the texture affect the basic color of the lamp.");
+
+ prop= RNA_def_property(srna, "map_to_shadow", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "mapto", LAMAP_SHAD);
+ RNA_def_property_ui_text(prop, "Map To Shadow", "Lets the texture affect the shadow color of the lamp.");
+}
+
+static void rna_def_lamp_sky_settings(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
@@ -82,78 +149,83 @@ static void rna_def_lamp_sunsky_settings(BlenderRNA *brna, StructRNA *parent)
{15, "COLOR", "Color", ""},
{0, NULL, NULL, NULL}};
- srna= RNA_def_struct(brna, "SunskySettings", NULL);
+ srna= RNA_def_struct(brna, "LampSkySettings", NULL);
RNA_def_struct_sdna(srna, "Lamp");
- RNA_def_struct_parent(srna, parent);
- RNA_def_struct_ui_text(srna, "Sun/Sky Settings", "Sun/Sky related settings for the lamp.");
+ RNA_def_struct_nested(brna, srna, "SunLamp");
+ RNA_def_struct_ui_text(srna, "Lamp Sky Settings", "Sky related settings for a sun lamp.");
- prop= RNA_def_property(srna, "sky_colorspace", PROP_ENUM, PROP_NONE);
+ prop= RNA_def_property(srna, "sky_color_space", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "sky_colorspace");
RNA_def_property_enum_items(prop, prop_skycolorspace_items);
- RNA_def_property_ui_text(prop, "Sky Color Space", "Color space to use for internal XYZ->RGB color conversion");
+ RNA_def_property_ui_text(prop, "Sky Color Space", "Color space to use for internal XYZ->RGB color conversion.");
RNA_def_property_update(prop, NC_LAMP|ND_SKY, NULL);
prop= RNA_def_property(srna, "sky_blend_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "skyblendtype");
RNA_def_property_enum_items(prop, prop_blendmode_items);
- RNA_def_property_ui_text(prop, "Sky Blend Mode", "Blend mode for combining sun sky with world sky");
+ RNA_def_property_ui_text(prop, "Sky Blend Mode", "Blend mode for combining sun sky with world sky.");
RNA_def_property_update(prop, NC_LAMP|ND_SKY, NULL);
/* Number values */
prop= RNA_def_property(srna, "horizon_brightness", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 20.0f);
- RNA_def_property_ui_text(prop, "Horizon Brightness", "horizon brightness");
+ RNA_def_property_ui_text(prop, "Horizon Brightness", "Horizon brightness.");
RNA_def_property_update(prop, NC_LAMP|ND_SKY, NULL);
prop= RNA_def_property(srna, "spread", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 10.0f);
- RNA_def_property_ui_text(prop, "Horizon Spread", "horizon Spread");
+ RNA_def_property_ui_text(prop, "Horizon Spread", "Horizon Spread.");
RNA_def_property_update(prop, NC_LAMP|ND_SKY, NULL);
prop= RNA_def_property(srna, "sun_brightness", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 10.0f);
- RNA_def_property_ui_text(prop, "Sun Brightness", "Sun Brightness");
+ RNA_def_property_ui_text(prop, "Sun Brightness", "Sun brightness.");
RNA_def_property_update(prop, NC_LAMP|ND_SKY, NULL);
prop= RNA_def_property(srna, "sun_size", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 10.0f);
- RNA_def_property_ui_text(prop, "Sun Size", "Sun Size");
+ RNA_def_property_ui_text(prop, "Sun Size", "Sun size.");
RNA_def_property_update(prop, NC_LAMP|ND_SKY, NULL);
prop= RNA_def_property(srna, "backscattered_light", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Back Light", "Backscatter Light");
+ RNA_def_property_ui_text(prop, "Backscattered Light", "Backscattered light.");
RNA_def_property_update(prop, NC_LAMP|ND_SKY, NULL);
prop= RNA_def_property(srna, "sun_intensity", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 10.0f);
- RNA_def_property_ui_text(prop, "Sun Intensity", "Sun Intensity");
+ RNA_def_property_ui_text(prop, "Sun Intensity", "Sun intensity.");
RNA_def_property_update(prop, NC_LAMP|ND_SKY, NULL);
- prop= RNA_def_property(srna, "atm_turbidity", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "atmosphere_turbidity", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "atm_turbidity");
RNA_def_property_range(prop, 0.0f, 30.0f);
- RNA_def_property_ui_text(prop, "Turbidity", "Sky Turbidity");
+ RNA_def_property_ui_text(prop, "Atmosphere Turbidity", "Sky turbidity.");
RNA_def_property_update(prop, NC_LAMP|ND_SKY, NULL);
- prop= RNA_def_property(srna, "atm_inscattering_factor", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "atmosphere_inscattering", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "atm_inscattering_factor");
RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Inscatter", "Scatter contribution factor");
+ RNA_def_property_ui_text(prop, "Atmosphere Inscatter", "Scatter contribution factor.");
RNA_def_property_update(prop, NC_LAMP|ND_SKY, NULL);
- prop= RNA_def_property(srna, "atm_extinction_factor", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "atmosphere_extinction", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "atm_extinction_factor");
RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Extinction", "Extinction scattering contribution factor");
+ RNA_def_property_ui_text(prop, "Atmosphere Extinction", "Extinction scattering contribution factor.");
RNA_def_property_update(prop, NC_LAMP|ND_SKY, NULL);
- prop= RNA_def_property(srna, "atm_distance_factor", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "atmosphere_distance_factor", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "atm_distance_factor");
RNA_def_property_range(prop, 0.0f, 500.0f);
- RNA_def_property_ui_text(prop, "Distance", "Multiplier to convert blender units to physical distance");
+ RNA_def_property_ui_text(prop, "Atmosphere Distance Factor", "Multiplier to convert blender units to physical distance.");
RNA_def_property_update(prop, NC_LAMP|ND_SKY, NULL);
- prop= RNA_def_property(srna, "sky_blend_factor", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "sky_blend", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "skyblendfac");
RNA_def_property_range(prop, 0.0f, 2.0f);
- RNA_def_property_ui_text(prop, "Sky Blend Factor", "Blend factor with sky");
+ RNA_def_property_ui_text(prop, "Sky Blend", "Blend factor with sky.");
RNA_def_property_update(prop, NC_LAMP|ND_SKY, NULL);
prop= RNA_def_property(srna, "sky_exposure", PROP_FLOAT, PROP_NONE);
@@ -165,99 +237,96 @@ static void rna_def_lamp_sunsky_settings(BlenderRNA *brna, StructRNA *parent)
prop= RNA_def_property(srna, "sky", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "sun_effect_type", LA_SUN_EFFECT_SKY);
- RNA_def_property_ui_text(prop, "Sky", "Apply sun effect on sky");
+ RNA_def_property_ui_text(prop, "Sky", "Apply sun effect on sky.");
RNA_def_property_update(prop, NC_LAMP|ND_SKY, NULL);
prop= RNA_def_property(srna, "atmosphere", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "sun_effect_type", LA_SUN_EFFECT_AP);
- RNA_def_property_ui_text(prop, "Atmosphere", "Apply sun effect on Atmosphere");
+ RNA_def_property_ui_text(prop, "Atmosphere", "Apply sun effect on atmosphere.");
RNA_def_property_update(prop, NC_LAMP|ND_SKY, NULL);
}
-static StructRNA *rna_def_lamp(BlenderRNA *brna)
+static void rna_def_lamp(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
+
static EnumPropertyItem prop_type_items[] = {
- {LA_LOCAL, "OMNI", "Omni", "Light cast evenly in all directions from a point source"},
- {LA_SUN, "SUN", "Sun", "Light cast in a single direction from a distant source"},
- {LA_SPOT, "SPOT", "Spot", "Light cast in a cone shape from a point"},
- {LA_HEMI, "HEMI", "Hemi", "Light cast from a hemispherical direction"},
- {LA_AREA, "AREA", "Area", "Light case from an area surface"},
- {0, NULL, NULL, NULL}};
- static EnumPropertyItem prop_shadow_items[] = {
- {0, "NOSHADOW", "No Shadow", ""},
- {LA_SHAD_BUF, "BUFSHADOW", "Buffer Shadow", "Lets spotlight produce shadows using shadow buffer."},
- {LA_SHAD_RAY, "RAYSHADOW", "Ray Shadow", "Use ray tracing for shadow."},
- {0, NULL, NULL, NULL}};
- static EnumPropertyItem prop_raysampmethod_items[] = {
- {LA_SAMP_CONSTANT, "CONSTANT_JITTERED", "Constant Jittered", ""},
- {LA_SAMP_HALTON, "ADAPTIVE_QMC", "Adaptive QMC", ""},
- {LA_SAMP_HAMMERSLEY, "CONSTANT_QMC", "Constant QMC", ""},
- {0, NULL, NULL, NULL}};
- static EnumPropertyItem prop_areashape_items[] = {
- {LA_AREA_SQUARE, "SQUARE", "Square", ""},
- {LA_AREA_RECT, "RECTANGLE", "Rectangle", ""},
- {0, NULL, NULL, NULL}};
- static EnumPropertyItem prop_shadbuftype_items[] = {
- {LA_SHADBUF_REGULAR , "REGULAR", "Classical", "Use the Classic Buffer type"},
- {LA_SHADBUF_IRREGULAR, "IRREGULAR", "Irregular", "Use the Irregular Shadow Buffer type."},
- {LA_SHADBUF_HALFWAY, "HALFWAY", "Classic-Halfway", "Use the Classic-Halfway Buffer type."},
- {0, NULL, NULL, NULL}};
- static EnumPropertyItem prop_shadbuffiltertype_items[] = {
- {LA_SHADBUF_BOX , "BOX", "Box", "Use the Box filter"},
- {LA_SHADBUF_TENT, "TENT", "Tent", "Use the Tent Filter."},
- {LA_SHADBUF_GAUSS, "GAUSS", "Gauss", "Use the Gauss filter."},
- {0, NULL, NULL, NULL}};
- static EnumPropertyItem prop_numbuffer_items[] = {
- {1, "1BUFF", "1", "Sample 1 Shadow Buffer."},
- {4, "4BUFF", "4", "Sample 4 Shadow Buffers."},
- {9, "9BUFF", "9", "Sample 9 Shadow Buffers."},
- {0, NULL, NULL, NULL}};
- static EnumPropertyItem prop_fallofftype_items[] = {
- {LA_FALLOFF_CONSTANT, "CONSTANT", "Constant", ""},
- {LA_FALLOFF_INVLINEAR, "INVLINEAR", "Inverse Linear", ""},
- {LA_FALLOFF_INVSQUARE, "INVSQUARE", "Inverse Square", ""},
- {LA_FALLOFF_CURVE, "CURVE", "Custom Curve", ""},
- {LA_FALLOFF_SLIDERS, "SLIDERS", "Lin/Quad Weighted", ""},
+ {LA_LOCAL, "LOCAL", "Local", "Omnidirectional point light source."},
+ {LA_SUN, "SUN", "Sun", "Constant direction parallel ray light source."},
+ {LA_SPOT, "SPOT", "Spot", "Directional cone light source."},
+ {LA_HEMI, "HEMI", "Hemi", "180 degree constant light source."},
+ {LA_AREA, "AREA", "Area", "Directional area light source."},
{0, NULL, NULL, NULL}};
srna= RNA_def_struct(brna, "Lamp", "ID");
- RNA_def_struct_ui_text(srna, "Lamp", "DOC_BROKEN");
+ RNA_def_struct_refine_func(srna, "rna_Lamp_refine");
+ RNA_def_struct_ui_text(srna, "Lamp", "Lamp datablock for lighting a scene.");
- /* Enums */
prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_type_items);
RNA_def_property_ui_text(prop, "Type", "Type of Lamp.");
RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING_DRAW, NULL);
- prop= RNA_def_property(srna, "area_shape", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_items(prop, prop_areashape_items);
- RNA_def_property_ui_text(prop, "Area Shape", "Shape of the Area lamp");
+ prop= RNA_def_property(srna, "distance", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "dist");
+ RNA_def_property_range(prop, 0.0f, 9999.0f);
+ RNA_def_property_ui_text(prop, "Distance", "Falloff distance - the light is at half the original intensity at this point.");
RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING_DRAW, NULL);
- prop= RNA_def_property(srna, "ray_samp_method", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_items(prop, prop_raysampmethod_items);
- RNA_def_property_ui_text(prop, "Ray Sample Method", "The Method in how rays are sampled");
+ prop= RNA_def_property(srna, "energy", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_range(prop, 0.0f, 10.0f);
+ RNA_def_property_ui_text(prop, "Energy", "Amount of light that the lamp emits.");
RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
- prop= RNA_def_property(srna, "buffer_type", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "buftype");
- RNA_def_property_enum_items(prop, prop_shadbuftype_items);
- RNA_def_property_ui_text(prop, "Buffer Type", "Type of Shadow Buffer.");
+ prop= RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR);
+ RNA_def_property_float_sdna(prop, NULL, "r");
+ RNA_def_property_array(prop, 3);
+ RNA_def_property_ui_text(prop, "Color", "Light color.");
RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
- prop= RNA_def_property(srna, "filter_type", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "filtertype");
- RNA_def_property_enum_items(prop, prop_shadbuffiltertype_items);
- RNA_def_property_ui_text(prop, "Filter Type", "Type of Shadow Buffer Filter.");
+ prop= RNA_def_property(srna, "layer", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "mode", LA_LAYER);
+ RNA_def_property_ui_text(prop, "Layer", "Illuminates objects only on the same layer the lamp is on.");
RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
- prop= RNA_def_property(srna, "buffers", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_items(prop, prop_numbuffer_items);
- RNA_def_property_ui_text(prop, "Sample Buffers", "Number of Buffers to sample.");
+ prop= RNA_def_property(srna, "negative", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "mode", LA_NEG);
+ RNA_def_property_ui_text(prop, "Negative", "Lamp casts negative light.");
RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
+ prop= RNA_def_property(srna, "specular", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "mode", LA_NO_SPEC);
+ RNA_def_property_ui_text(prop, "Specular", "Lamp creates specular highlights.");
+ RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
+
+ prop= RNA_def_property(srna, "diffuse", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "mode", LA_NO_DIFF);
+ RNA_def_property_ui_text(prop, "Diffuse", "Lamp does diffuse shading.");
+ RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
+
+ /* textures */
+ rna_def_mtex_common(srna, "rna_Lamp_mtex_begin", "rna_Lamp_active_texture_get", "LampTextureSlot");
+
+ /* script link */
+ prop= RNA_def_property(srna, "script_link", PROP_POINTER, PROP_NEVER_NULL);
+ RNA_def_property_pointer_sdna(prop, NULL, "scriptlink");
+ RNA_def_property_flag(prop, PROP_NOT_EDITABLE);
+ RNA_def_property_ui_text(prop, "Script Link", "Scripts linked to this lamp.");
+}
+
+static void rna_def_lamp_falloff(StructRNA *srna)
+{
+ PropertyRNA *prop;
+
+ static EnumPropertyItem prop_fallofftype_items[] = {
+ {LA_FALLOFF_CONSTANT, "CONSTANT", "Constant", ""},
+ {LA_FALLOFF_INVLINEAR, "INVERSE_LINEAR", "Inverse Linear", ""},
+ {LA_FALLOFF_INVSQUARE, "INVERSE_SQUARE", "Inverse Square", ""},
+ {LA_FALLOFF_CURVE, "CUSTOM_CURVE", "Custom Curve", ""},
+ {LA_FALLOFF_SLIDERS, "LINEAR_QUADRATIC_WEIGHTED", "Lin/Quad Weighted", ""},
+ {0, NULL, NULL, NULL}};
+
prop= RNA_def_property(srna, "falloff_type", PROP_ENUM, PROP_NONE);
RNA_def_property_flag(prop, PROP_NOT_EDITABLE); /* needs to be able to create curve mapping */
RNA_def_property_enum_items(prop, prop_fallofftype_items);
@@ -269,11 +338,9 @@ static StructRNA *rna_def_lamp(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Falloff Curve", "Custom Lamp Falloff Curve");
RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
- /* Number values */
- prop= RNA_def_property(srna, "distance", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "dist");
- RNA_def_property_range(prop, 0.0f, 9999.0f);
- RNA_def_property_ui_text(prop, "Distance", "Falloff distance - the light is at half the original intensity at this point.");
+ prop= RNA_def_property(srna, "sphere", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "mode", LA_SPHERE);
+ RNA_def_property_ui_text(prop, "Sphere", "Sets light intensity to zero beyond lamp distance.");
RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING_DRAW, NULL);
prop= RNA_def_property(srna, "linear_attenuation", PROP_FLOAT, PROP_NONE);
@@ -287,194 +354,320 @@ static StructRNA *rna_def_lamp(BlenderRNA *brna)
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Quadratic Attenuation", "Quadratic distance attentuation.");
RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
+}
- prop= RNA_def_property(srna, "spot_blend", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "spotblend");
- RNA_def_property_range(prop, 0.0f ,1.0f);
- RNA_def_property_ui_text(prop, "Spot Blend", "The softness of the spotlight edge.");
- RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING_DRAW, NULL);
+static void rna_def_lamp_shadow(StructRNA *srna, int spot, int area)
+{
+ PropertyRNA *prop;
- prop= RNA_def_property(srna, "spot_size", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "spotsize");
- RNA_def_property_range(prop, 1.0f ,180.0f);
- RNA_def_property_ui_text(prop, "Spot Size", "The angle of the spotlight beam in degrees.");
- RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING_DRAW, NULL);
+ static EnumPropertyItem prop_shadow_items[] = {
+ {0, "NOSHADOW", "No Shadow", ""},
+ {LA_SHAD_RAY, "RAY_SHADOW", "Ray Shadow", "Use ray tracing for shadow."},
+ {0, NULL, NULL, NULL}};
- prop= RNA_def_property(srna, "clip_start", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "clipsta");
- RNA_def_property_range(prop, 0.0f, 9999.0f);
- RNA_def_property_ui_text(prop, "Clip Start", "Distance that the buffer calculations start.");
- RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING_DRAW, NULL);
+ static EnumPropertyItem prop_spot_shadow_items[] = {
+ {0, "NOSHADOW", "No Shadow", ""},
+ {LA_SHAD_BUF, "BUFFER_SHADOW", "Buffer Shadow", "Lets spotlight produce shadows using shadow buffer."},
+ {LA_SHAD_RAY, "RAY_SHADOW", "Ray Shadow", "Use ray tracing for shadow."},
+ {0, NULL, NULL, NULL}};
- prop= RNA_def_property(srna, "clip_end", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "clipend");
- RNA_def_property_range(prop, 0.0f, 9999.0f);
- RNA_def_property_ui_text(prop, "Clip End", "Distance that the buffer calculations finish.");
- RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING_DRAW, NULL);
+ static EnumPropertyItem prop_ray_sampling_method_items[] = {
+ {LA_SAMP_CONSTANT, "CONSTANT_JITTERED", "Constant Jittered", ""},
+ {LA_SAMP_HALTON, "ADAPTIVE_QMC", "Adaptive QMC", ""},
+ {LA_SAMP_HAMMERSLEY, "CONSTANT_QMC", "Constant QMC", ""},
+ {0, NULL, NULL, NULL}};
- prop= RNA_def_property(srna, "bias", PROP_FLOAT, PROP_NONE);
- RNA_def_property_range(prop, 0.0f, 5.0f);
- RNA_def_property_ui_text(prop, "Bias", "Shadow Map sampling bias.");
+
+ prop= RNA_def_property(srna, "shadow_method", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_bitflag_sdna(prop, NULL, "mode");
+ RNA_def_property_enum_items(prop, (spot)? prop_spot_shadow_items: prop_shadow_items);
+ RNA_def_property_ui_text(prop, "Shadow Method", "Method to compute lamp shadow with.");
RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
- prop= RNA_def_property(srna, "soft", PROP_FLOAT, PROP_NONE);
- RNA_def_property_range(prop, 0.0f, 100.0f);
- RNA_def_property_ui_text(prop, "Soft", "Size of shadow sampling area.");
+ prop= RNA_def_property(srna, "shadow_color", PROP_FLOAT, PROP_COLOR);
+ RNA_def_property_float_sdna(prop, NULL, "shdwr");
+ RNA_def_property_array(prop, 3);
+ RNA_def_property_ui_text(prop, "Shadow Color", "Color of shadows casted by the lamp.");
RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
- prop= RNA_def_property(srna, "samples", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "samp");
- RNA_def_property_range(prop, 1,16);
- RNA_def_property_ui_text(prop, "Samples", "Number of shadow map samples.");
+ prop= RNA_def_property(srna, "only_shadow", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "mode", LA_ONLYSHADOW);
+ RNA_def_property_ui_text(prop, "Only Shadow", "Causes light to cast shadows only without illuminating objects.");
RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
- prop= RNA_def_property(srna, "energy", PROP_FLOAT, PROP_NONE);
- RNA_def_property_range(prop, 0.0f, 10.0f);
- RNA_def_property_ui_text(prop, "Energy", "Amount of light that the lamp emits.");
+ prop= RNA_def_property(srna, "shadow_ray_sampling_method", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "ray_samp_method");
+ RNA_def_property_enum_items(prop, prop_ray_sampling_method_items);
+ RNA_def_property_ui_text(prop, "Shadow Ray Sampling Method", "Method for generating shadow samples: Adaptive QMC is fastest, Constant QMC is less noisy but slower.");
RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
- prop= RNA_def_property(srna, "ray_samples", PROP_INT, PROP_NONE);
+ prop= RNA_def_property(srna, (area)? "shadow_ray_samples_x": "shadow_ray_samples", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "ray_samp");
RNA_def_property_range(prop, 1, 16);
- RNA_def_property_ui_text(prop, "Ray Samples", "Amount of samples taken extra (samples x samples).");
- RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
-
- prop= RNA_def_property(srna, "ray_sampy", PROP_INT, PROP_NONE);
- RNA_def_property_range(prop, 1,16);
- RNA_def_property_ui_text(prop, "Ray Samples Y", "Amount of samples taken extra (samples x samples).");
+ RNA_def_property_ui_text(prop, (area)? "Shadow Ray Samples": "Shadow Ray Samples X","Amount of samples taken extra (samples x samples).");
RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
- prop= RNA_def_property(srna, "area_size", PROP_FLOAT, PROP_NONE);
- RNA_def_property_range(prop, 0.0f, 100.0f);
- RNA_def_property_ui_text(prop, "Area Size", "Size of the area of the Area Lamp.");
- RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING_DRAW, NULL);
-
- prop= RNA_def_property(srna, "area_sizey", PROP_FLOAT, PROP_NONE);
- RNA_def_property_range(prop, 0.0f, 100.0f);
- RNA_def_property_ui_text(prop, "Area Size Y", "Size of the area of the Area Lamp.");
- RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING_DRAW, NULL);
+ if(area) {
+ prop= RNA_def_property(srna, "shadow_ray_samples_y", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "ray_sampy");
+ RNA_def_property_range(prop, 1, 16);
+ RNA_def_property_ui_text(prop, "Shadow Ray Samples Y", "Amount of samples taken extra (samples x samples).");
+ RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
+ }
- prop= RNA_def_property(srna, "adapt_thresh", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "shadow_adaptive_threshold", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "adapt_thresh");
RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Adapt Threshold", "Threshold for Adaptive Sampling.");
+ RNA_def_property_ui_text(prop, "Shadow Adaptive Threshold", "Threshold for Adaptive Sampling (Raytraced shadows).");
RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
- prop= RNA_def_property(srna, "buffer_size", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "bufsize");
- RNA_def_property_range(prop, 512, 10240);
- RNA_def_property_ui_text(prop, "Buffer Size", "Resolution of the buffer, higher values give crisper shadows but use more memory");
- RNA_def_property_int_funcs(prop, NULL, "rna_Lamp_buffer_size_set", NULL);
+ prop= RNA_def_property(srna, "shadow_soft_size", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "soft");
+ RNA_def_property_range(prop, 0.0f, 100.0f);
+ RNA_def_property_ui_text(prop, "Shadow Soft Size", "Light size for ray shadow sampling (Raytraced shadows).");
RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
- prop= RNA_def_property(srna, "halo_intensity", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "haint");
- RNA_def_property_range(prop, 0.0f, 5.0f);
- RNA_def_property_ui_text(prop, "Halo Intensity", "Brightness of the spotlight's halo cone.");
+ prop= RNA_def_property(srna, "shadow_layer", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "mode", LA_LAYER_SHADOW);
+ RNA_def_property_ui_text(prop, "Shadow Layer", "Causes only objects on the same layer to cast shadows.");
RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
+}
- /*short sky_colorspace, pad4;*/
+static void rna_def_local_lamp(BlenderRNA *brna)
+{
+ StructRNA *srna;
- /* Colors */
- prop= RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR);
- RNA_def_property_float_sdna(prop, NULL, "r");
- RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "Color", "");
- RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
+ srna= RNA_def_struct(brna, "LocalLamp", "Lamp");
+ RNA_def_struct_sdna(srna, "Lamp");
+ RNA_def_struct_ui_text(srna, "Local Lamp", "Omnidirectional point lamp.");
- prop= RNA_def_property(srna, "shadow_color", PROP_FLOAT, PROP_COLOR);
- RNA_def_property_float_sdna(prop, NULL, "shdwr");
- RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "Shadow Color", "");
- RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
+ rna_def_lamp_falloff(srna);
+ rna_def_lamp_shadow(srna, 0, 0);
+}
- /* Booleans */
- prop= RNA_def_property(srna, "auto_clip_start", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "bufflag", LA_SHADBUF_AUTO_START);
- RNA_def_property_ui_text(prop, "Autoclip Start", "Automatically Sets Clip start to the nearest pixel.");
- RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING_DRAW, NULL);
+static void rna_def_area_lamp(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
- prop= RNA_def_property(srna, "auto_clip_end", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "bufflag", LA_SHADBUF_AUTO_END);
- RNA_def_property_ui_text(prop, "Autoclip End", "Automatically Sets Clip end to the farthest away pixel.");
- RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING_DRAW, NULL);
+ static EnumPropertyItem prop_areashape_items[] = {
+ {LA_AREA_SQUARE, "SQUARE", "Square", ""},
+ {LA_AREA_RECT, "RECTANGLE", "Rectangle", ""},
+ {0, NULL, NULL, NULL}};
+
+ srna= RNA_def_struct(brna, "AreaLamp", "Lamp");
+ RNA_def_struct_sdna(srna, "Lamp");
+ RNA_def_struct_ui_text(srna, "Area Lamp", "Directional area lamp.");
+
+ rna_def_lamp_shadow(srna, 0, 1);
prop= RNA_def_property(srna, "umbra", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "ray_samp_type", LA_SAMP_UMBRA);
- RNA_def_property_ui_text(prop, "Umbra", "Emphasise parts in full shadow.");
+ RNA_def_property_ui_text(prop, "Umbra", "Emphasize parts that are fully shadowed (Constant Jittered sampling).");
RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
prop= RNA_def_property(srna, "dither", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "ray_samp_type", LA_SAMP_DITHER);
- RNA_def_property_ui_text(prop, "Dither", "Use 2x2 dithering for sampling.");
+ RNA_def_property_ui_text(prop, "Dither", "Use 2x2 dithering for sampling (Constant Jittered sampling).");
RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
prop= RNA_def_property(srna, "jitter", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "ray_samp_type", LA_SAMP_JITTER);
- RNA_def_property_ui_text(prop, "Jitter", "Use noise for sampling.");
+ RNA_def_property_ui_text(prop, "Jitter", "Use noise for sampling (Constant Jittered sampling).");
RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
- /* mode */
+ prop= RNA_def_property(srna, "shape", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "area_shape");
+ RNA_def_property_enum_items(prop, prop_areashape_items);
+ RNA_def_property_ui_text(prop, "Shape", "Shape of the area lamp.");
+ RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING_DRAW, NULL);
+
+ prop= RNA_def_property(srna, "size", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "area_size");
+ RNA_def_property_range(prop, 0.0f, 100.0f);
+ RNA_def_property_ui_text(prop, "Size", "Size of the area of the area Lamp, X direction size for Rectangle shapes.");
+ RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING_DRAW, NULL);
+
+ prop= RNA_def_property(srna, "size_y", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "area_sizey");
+ RNA_def_property_range(prop, 0.0f, 100.0f);
+ RNA_def_property_ui_text(prop, "Size Y", "Size of the area of the area Lamp in the Y direction for Rectangle shapes.");
+ RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING_DRAW, NULL);
+
+ prop= RNA_def_property(srna, "gamma", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "k");
+ RNA_def_property_range(prop, 0.001f, 2.0f);
+ RNA_def_property_ui_text(prop, "Gamma", "Light gamma correction value.");
+ RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING_DRAW, NULL);
+}
+
+static void rna_def_spot_lamp(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ static EnumPropertyItem prop_shadbuftype_items[] = {
+ {LA_SHADBUF_REGULAR , "REGULAR", "Classical", "Classic shadow buffer."},
+ {LA_SHADBUF_IRREGULAR, "IRREGULAR", "Irregular", "Irregular buffer produces sharp shadow always, but it doesn't show up for raytracing."},
+ {LA_SHADBUF_HALFWAY, "HALFWAY", "Classic-Halfway", "Regular buffer, averaging the closest and 2nd closest Z value to reducing bias artifaces."},
+ {0, NULL, NULL, NULL}};
+
+ static EnumPropertyItem prop_shadbuffiltertype_items[] = {
+ {LA_SHADBUF_BOX , "BOX", "Box", "Apply the Box filter to shadow buffer samples."},
+ {LA_SHADBUF_TENT, "TENT", "Tent", "Apply the Tent Filter to shadow buffer samples."},
+ {LA_SHADBUF_GAUSS, "GAUSS", "Gauss", "Apply the Gauss filter to shadow buffer samples."},
+ {0, NULL, NULL, NULL}};
+
+ static EnumPropertyItem prop_numbuffer_items[] = {
+ {1, "BUFFERS_1", "1", "Only one buffer rendered."},
+ {4, "BUFFERS_4", "4", "Renders 4 buffers for better AA, this quadruples memory usage."},
+ {9, "BUFFERS_9", "9", "Renders 9 buffers for better AA, this uses nine times more memory."},
+ {0, NULL, NULL, NULL}};
+
+ srna= RNA_def_struct(brna, "SpotLamp", "Lamp");
+ RNA_def_struct_sdna(srna, "Lamp");
+ RNA_def_struct_ui_text(srna, "Spot Lamp", "Directional cone lamp.");
+
+ rna_def_lamp_falloff(srna);
+ rna_def_lamp_shadow(srna, 1, 0);
+
+ prop= RNA_def_property(srna, "square", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "mode", LA_SQUARE);
+ RNA_def_property_ui_text(prop, "Square", "Casts a square spot light shape.");
+ RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING_DRAW, NULL);
+
prop= RNA_def_property(srna, "halo", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", LA_HALO);
- RNA_def_property_ui_text(prop, "Halo", "Lamp creates a halo.");
+ RNA_def_property_ui_text(prop, "Halo", "Renders spotlight with a volumetric halo (Buffer Shadows).");
RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
- prop= RNA_def_property(srna, "layer", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mode", LA_LAYER);
- RNA_def_property_ui_text(prop, "Layer", "Lamp is only used on the Scene layer the lamp is on.");
+ prop= RNA_def_property(srna, "halo_intensity", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "haint");
+ RNA_def_property_range(prop, 0.0f, 5.0f);
+ RNA_def_property_ui_text(prop, "Halo Intensity", "Brightness of the spotlight's halo cone (Buffer Shadows).");
RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
- prop= RNA_def_property(srna, "negative", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mode", LA_NEG);
- RNA_def_property_ui_text(prop, "Negative", "Lamp casts negative light.");
+ prop= RNA_def_property(srna, "halo_step", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "shadhalostep");
+ RNA_def_property_range(prop, 0, 12);
+ RNA_def_property_ui_text(prop, "Halo Step", "Volumetric halo sampling frequency.");
RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
- prop= RNA_def_property(srna, "specular", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_negative_sdna(prop, NULL, "mode", LA_NO_SPEC);
- RNA_def_property_ui_text(prop, "Specular", "Lamp creates specular highlights.");
+ prop= RNA_def_property(srna, "shadow_buffer_size", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "bufsize");
+ RNA_def_property_range(prop, 512, 10240);
+ RNA_def_property_ui_text(prop, "Shadow Buffer Size", "Resolution of the shadow buffer, higher values give crisper shadows but use more memory");
+ RNA_def_property_int_funcs(prop, NULL, "rna_Lamp_buffer_size_set", NULL);
RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
- prop= RNA_def_property(srna, "diffuse", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_negative_sdna(prop, NULL, "mode", LA_NO_DIFF);
- RNA_def_property_ui_text(prop, "Diffuse", "Lamp does diffuse shading.");
+ prop= RNA_def_property(srna, "shadow_filter_type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "filtertype");
+ RNA_def_property_enum_items(prop, prop_shadbuffiltertype_items);
+ RNA_def_property_ui_text(prop, "Shadow Filter Type", "Type of shadow filter (Buffer Shadows).");
RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
- prop= RNA_def_property(srna, "only_shadow", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mode", LA_ONLYSHADOW);
- RNA_def_property_ui_text(prop, "Only Shadow", "Lamp only creates shadows.");
+ prop= RNA_def_property(srna, "shadow_sample_buffers", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "buffers");
+ RNA_def_property_enum_items(prop, prop_numbuffer_items);
+ RNA_def_property_ui_text(prop, "Shadow Sample Buffers", "Number of shadow buffers to render for better AA, this increases memory usage.");
RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
- prop= RNA_def_property(srna, "shadow", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_bitflag_sdna(prop, NULL, "mode");
- RNA_def_property_enum_items(prop, prop_shadow_items);
- RNA_def_property_ui_text(prop, "Shadow", "Method to compute lamp shadow.");
+ prop= RNA_def_property(srna, "spot_blend", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "spotblend");
+ RNA_def_property_range(prop, 0.0f ,1.0f);
+ RNA_def_property_ui_text(prop, "Spot Blend", "The softness of the spotlight edge.");
+ RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING_DRAW, NULL);
+
+ prop= RNA_def_property(srna, "spot_size", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "spotsize");
+ RNA_def_property_range(prop, 1.0f ,180.0f);
+ RNA_def_property_ui_text(prop, "Spot Size", "Angle of the spotlight beam in degrees.");
+ RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING_DRAW, NULL);
+
+ prop= RNA_def_property(srna, "shadow_buffer_clip_start", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "clipsta");
+ RNA_def_property_range(prop, 0.0f, 9999.0f);
+ RNA_def_property_ui_text(prop, "Shadow Buffer Clip Start", "Shadow map clip start: objects closer will not generate shadows");
+ RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING_DRAW, NULL);
+
+ prop= RNA_def_property(srna, "shadow_buffer_clip_end", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "clipend");
+ RNA_def_property_range(prop, 0.0f, 9999.0f);
+ RNA_def_property_ui_text(prop, "Shadow Buffer Clip End", "Shadow map clip end beyond which objects will not generate shadows.");
+ RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING_DRAW, NULL);
+
+ prop= RNA_def_property(srna, "shadow_buffer_bias", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "bias");
+ RNA_def_property_range(prop, 0.0f, 5.0f);
+ RNA_def_property_ui_text(prop, "Shadow Buffer Bias", "Shadow buffer sampling bias.");
RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
- prop= RNA_def_property(srna, "sphere", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mode", LA_SPHERE);
- RNA_def_property_ui_text(prop, "Sphere", "Sets light intensity to zero beyond lamp distance.");
+ prop= RNA_def_property(srna, "shadow_buffer_soft", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "soft");
+ RNA_def_property_range(prop, 0.0f, 100.0f);
+ RNA_def_property_ui_text(prop, "Shadow Buffer Soft", "Size of shadow buffer sampling area.");
+ RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
+
+ prop= RNA_def_property(srna, "shadow_buffer_samples", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "samp");
+ RNA_def_property_range(prop, 1, 16);
+ RNA_def_property_ui_text(prop, "Samples", "Number of shadow buffer samples.");
+ RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
+
+ prop= RNA_def_property(srna, "shadow_buffer_type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "buftype");
+ RNA_def_property_enum_items(prop, prop_shadbuftype_items);
+ RNA_def_property_ui_text(prop, "Shadow Buffer Type", "Type of shadow buffer.");
+ RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
+
+ prop= RNA_def_property(srna, "auto_clip_start", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "bufflag", LA_SHADBUF_AUTO_START);
+ RNA_def_property_ui_text(prop, "Autoclip Start", "Automatic calculation of clipping-start, based on visible vertices.");
RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING_DRAW, NULL);
- prop= RNA_def_property(srna, "square", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mode", LA_SQUARE);
- RNA_def_property_ui_text(prop, "Square", "Casts a square spot light shape");
+ prop= RNA_def_property(srna, "auto_clip_end", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "bufflag", LA_SHADBUF_AUTO_END);
+ RNA_def_property_ui_text(prop, "Autoclip End", "Automatic calculation of clipping-end, based on visible vertices.");
RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING_DRAW, NULL);
-
- /* sun/sky */
- prop= RNA_def_property(srna, "sunsky", PROP_POINTER, PROP_NONE);
- RNA_def_property_struct_type(prop, "SunskySettings");
- RNA_def_property_pointer_funcs(prop, "rna_Lamp_sunsky_settings_get", NULL, NULL);
- RNA_def_property_ui_text(prop, "Sun/Sky Settings", "Sun/Sky related settings for the lamp.");
+}
+
+static void rna_def_sun_lamp(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ srna= RNA_def_struct(brna, "SunLamp", "Lamp");
+ RNA_def_struct_sdna(srna, "Lamp");
+ RNA_def_struct_ui_text(srna, "Sun Lamp", "Constant direction parallel ray lamp.");
- return srna;
+ rna_def_lamp_shadow(srna, 0, 0);
+
+ /* sky */
+ prop= RNA_def_property(srna, "sky", PROP_POINTER, PROP_NEVER_NULL);
+ RNA_def_property_struct_type(prop, "LampSkySettings");
+ RNA_def_property_pointer_funcs(prop, "rna_Lamp_sky_settings_get", NULL, NULL);
+ RNA_def_property_ui_text(prop, "Sky Settings", "Sky related settings for sun lamps.");
}
-void RNA_def_lamp(BlenderRNA *brna)
+static void rna_def_hemi_lamp(BlenderRNA *brna)
{
StructRNA *srna;
-
- srna= rna_def_lamp(brna);
- rna_def_lamp_sunsky_settings(brna, srna);
+
+ srna= RNA_def_struct(brna, "HemiLamp", "Lamp");
+ RNA_def_struct_sdna(srna, "Lamp");
+ RNA_def_struct_ui_text(srna, "Hemi Lamp", "180 degree constant lamp.");
+}
+
+void RNA_def_lamp(BlenderRNA *brna)
+{
+ rna_def_lamp(brna);
+ rna_def_local_lamp(brna);
+ rna_def_area_lamp(brna);
+ rna_def_spot_lamp(brna);
+ rna_def_sun_lamp(brna);
+ rna_def_hemi_lamp(brna);
+ rna_def_lamp_sky_settings(brna);
+ rna_def_lamp_mtex(brna);
}
#endif
diff --git a/source/blender/makesrna/intern/rna_lattice.c b/source/blender/makesrna/intern/rna_lattice.c
index 6610cf895b4..5fb4d37c5d4 100644
--- a/source/blender/makesrna/intern/rna_lattice.c
+++ b/source/blender/makesrna/intern/rna_lattice.c
@@ -106,7 +106,7 @@ static void rna_def_latticepoint(BlenderRNA *brna)
prop= RNA_def_property(srna, "groups", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_funcs(prop, "rna_LatticePoint_groups_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", 0, 0, 0, 0);
- RNA_def_property_struct_type(prop, "MeshVertexGroup");
+ RNA_def_property_struct_type(prop, "VertexGroupElement");
RNA_def_property_ui_text(prop, "Groups", "Weights for the vertex groups this point is member of.");
}
@@ -122,7 +122,7 @@ static void rna_def_lattice(BlenderRNA *brna)
{0, NULL, NULL, NULL}};
srna= RNA_def_struct(brna, "Lattice", "ID");
- RNA_def_struct_ui_text(srna, "Lattice", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Lattice", "Lattice datablock defining a grid for deforming other objects.");
prop= RNA_def_property(srna, "points_u", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "pntsu");
@@ -160,7 +160,8 @@ static void rna_def_lattice(BlenderRNA *brna)
rna_def_ipo_common(srna);
- prop= RNA_def_property(srna, "key", PROP_POINTER, PROP_NONE);
+ prop= RNA_def_property(srna, "shape_keys", PROP_POINTER, PROP_NONE);
+ RNA_def_property_pointer_sdna(prop, NULL, "key");
RNA_def_property_ui_text(prop, "Shape Keys", "");
prop= RNA_def_property(srna, "points", PROP_COLLECTION, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_main.c b/source/blender/makesrna/intern/rna_main.c
index d3ee72a4b70..150b4e290ef 100644
--- a/source/blender/makesrna/intern/rna_main.c
+++ b/source/blender/makesrna/intern/rna_main.c
@@ -252,7 +252,7 @@ void RNA_def_main(BlenderRNA *brna)
int i;
srna= RNA_def_struct(brna, "Main", NULL);
- RNA_def_struct_ui_text(srna, "Main", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Main", "Main data structure representing a .blend file and all its datablocks.");
prop= RNA_def_property(srna, "filename", PROP_STRING, PROP_FILEPATH);
RNA_def_property_string_maxlength(prop, 240);
diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c
index 6ace02710b7..62c8d33c28f 100644
--- a/source/blender/makesrna/intern/rna_material.c
+++ b/source/blender/makesrna/intern/rna_material.c
@@ -44,36 +44,157 @@ static void *rna_Material_self_get(PointerRNA *ptr)
static void rna_Material_mode_halo_set(PointerRNA *ptr, int value)
{
- Material *mat= (Material*)ptr->data;
+ Material *ma= (Material*)ptr->data;
if(value)
- mat->mode |= MA_HALO;
+ ma->mode |= MA_HALO;
else
- mat->mode &= ~(MA_HALO|MA_STAR|MA_HALO_XALPHA|MA_ZINV|MA_ENV);
+ ma->mode &= ~(MA_HALO|MA_STAR|MA_HALO_XALPHA|MA_ZINV|MA_ENV);
}
static void rna_Material_mtex_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
- Material *mat= (Material*)ptr->data;
- rna_iterator_array_begin(iter, (void*)mat->mtex, sizeof(MTex*), MAX_MTEX, NULL);
+ Material *ma= (Material*)ptr->data;
+ rna_iterator_array_begin(iter, (void*)ma->mtex, sizeof(MTex*), MAX_MTEX, NULL);
+}
+
+static void *rna_Material_active_texture_get(PointerRNA *ptr)
+{
+ Material *ma= (Material*)ptr->data;
+ return ma->mtex[(int)ma->texact];
+}
+
+static void rna_MaterialStrand_start_size_range(PointerRNA *ptr, float *min, float *max)
+{
+ Material *ma= (Material*)ptr->id.data;
+
+ if(ma->mode & MA_STR_B_UNITS) {
+ *min= 0.0001f;
+ *max= 2.0f;
+ }
+ else {
+ *min= 0.25f;
+ *max= 20.0f;
+ }
+}
+
+static void rna_MaterialStrand_end_size_range(PointerRNA *ptr, float *min, float *max)
+{
+ Material *ma= (Material*)ptr->id.data;
+
+ if(ma->mode & MA_STR_B_UNITS) {
+ *min= 0.0001f;
+ *max= 1.0f;
+ }
+ else {
+ *min= 0.25f;
+ *max= 10.0f;
+ }
}
#else
-static void rna_def_material_colors(StructRNA *srna, PropertyRNA *prop)
+static void rna_def_material_mtex(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ static EnumPropertyItem prop_texture_coordinates_items[] = {
+ {TEXCO_GLOB, "GLOBAL", "Global", "Uses global coordinates for the texture coordinates."},
+ {TEXCO_OBJECT, "OBJECT", "Object", "Uses linked object's coordinates for texture coordinates."},
+ {TEXCO_UV, "UV", "UV", "Uses UV coordinates for texture coordinates."},
+ {TEXCO_ORCO, "ORCO", "Orco", "Uses the original undeformed coordinates of the object."},
+ {TEXCO_STRAND, "STRAND", "Strand", "Uses normalized strand texture coordinate (1D)."},
+ {TEXCO_STICKY, "STICKY", "Sticky", "Uses mesh's sticky coordinates for the texture coordinates."},
+ {TEXCO_WINDOW, "WINDOW", "Window", "Uses screen coordinates as texture coordinates."},
+ {TEXCO_NORM, "NORMAL", "Normal", "Uses normal vector as texture coordinates."},
+ {TEXCO_REFL, "REFLECTION", "Reflection", "Uses reflection vector as texture coordinates."},
+ {TEXCO_STRESS, "STRESS", "Stress", "Uses the difference of edge lengths compared to original coordinates of the mesh."},
+ {TEXCO_SPEED, "TANGENT", "Tangent", "Uses the optional tangent vector as texture coordinates."},
+
+ {0, NULL, NULL, NULL}};
+
+ static EnumPropertyItem prop_mapping_items[] = {
+ {MTEX_FLAT, "FLAT", "Flat", "Maps X and Y coordinates directly."},
+ {MTEX_CUBE, "CUBE", "Cube", "Maps using the normal vector."},
+ {MTEX_TUBE, "TUBE", "Tube", "Maps with Z as central axis."},
+ {MTEX_SPHERE, "SPHERE", "Sphere", "Maps with Z as central axis."},
+ {0, NULL, NULL, NULL}};
+
+ static EnumPropertyItem prop_normal_map_space_items[] = {
+ {MTEX_NSPACE_CAMERA, "CAMERA", "Camera", ""},
+ {MTEX_NSPACE_WORLD, "WORLD", "World", ""},
+ {MTEX_NSPACE_OBJECT, "OBJECT", "Object", ""},
+ {MTEX_NSPACE_TANGENT, "TANGENT", "Tangent", ""},
+ {0, NULL, NULL, NULL}};
+
+ srna= RNA_def_struct(brna, "MaterialTextureSlot", "TextureSlot");
+ RNA_def_struct_sdna(srna, "MTex");
+ RNA_def_struct_ui_text(srna, "Material Texture Slot", "Texture slot for textures in a Material datablock.");
+
+ prop= RNA_def_property(srna, "texture_coordinates", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "texco");
+ RNA_def_property_enum_items(prop, prop_texture_coordinates_items);
+ RNA_def_property_ui_text(prop, "Texture Coordinates", "");
+
+ prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
+ RNA_def_property_pointer_sdna(prop, NULL, "object");
+ RNA_def_property_struct_type(prop, "Object");
+ RNA_def_property_ui_text(prop, "Object", "Object to use for mapping with Object texture coordinates.");
+
+ prop= RNA_def_property(srna, "uv_layer", PROP_STRING, PROP_NONE);
+ RNA_def_property_string_sdna(prop, NULL, "uvname");
+ RNA_def_property_ui_text(prop, "UV Layer", "UV layer to use for mapping with UV texture coordinates.");
+
+ prop= RNA_def_property(srna, "from_dupli", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "texflag", MTEX_DUPLI_MAPTO);
+ RNA_def_property_ui_text(prop, "From Dupli", "Dupli's instanced from verts, faces or particles, inherit texture coordinate from their parent (only for UV and Orco texture coordinates).");
+
+ /* XXX: MTex.mapto and MTex.maptoneg */
+
+ /* XXX: MTex.proj[xyz] */
+
+ prop= RNA_def_property(srna, "mapping", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_items(prop, prop_mapping_items);
+ RNA_def_property_ui_text(prop, "Mapping", "");
+
+ /* XXX: MTex.colormodel, pmapto, pmaptoneg */
+
+ prop= RNA_def_property(srna, "normal_map_space", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "normapspace");
+ RNA_def_property_enum_items(prop, prop_normal_map_space_items);
+ RNA_def_property_ui_text(prop, "Normal Map Space", "");
+
+ /* XXX: MTex.which_output */
+
+ /* XXX: MTex.k */
+
+ prop= RNA_def_property(srna, "displacement_factor", PROP_FLOAT, PROP_VECTOR);
+ RNA_def_property_float_sdna(prop, NULL, "dispfac");
+ RNA_def_property_range(prop, 0, 1);
+ RNA_def_property_ui_text(prop, "Displacement Factor", "Amount texture displaces the surface.");
+
+ prop= RNA_def_property(srna, "warp_factor", PROP_FLOAT, PROP_VECTOR);
+ RNA_def_property_float_sdna(prop, NULL, "warpfac");
+ RNA_def_property_range(prop, 0, 1);
+ RNA_def_property_ui_text(prop, "Warp Factor", "Amount texture affects color values.");
+}
+
+static void rna_def_material_colors(StructRNA *srna)
{
+ PropertyRNA *prop;
+
static EnumPropertyItem prop_type_items[] = {
{MA_RGB, "RGB", "RGB", ""},
- /* not used in blender yet
- {MA_CMYK, "CMYK", "CMYK", ""},
- {MA_YUV, "YUV", "YUV", ""}, */
+ // {MA_CMYK, "CMYK", "CMYK", ""},
+ // {MA_YUV, "YUV", "YUV", ""},
{MA_HSV, "HSV", "HSV", ""},
{0, NULL, NULL, NULL}};
prop= RNA_def_property(srna, "color_model", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "colormodel");
RNA_def_property_enum_items(prop, prop_type_items);
- RNA_def_property_ui_text(prop, "Color Model", "");
+ RNA_def_property_ui_text(prop, "Color Model", "Color model to display color values with in the user interface.");
prop= RNA_def_property(srna, "diffuse_color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "r");
@@ -84,46 +205,42 @@ static void rna_def_material_colors(StructRNA *srna, PropertyRNA *prop)
prop= RNA_def_property(srna, "specular_color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "specr");
RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "Specular Color", "");
+ RNA_def_property_ui_text(prop, "Specular Color", "Specular color of the material.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING_DRAW, NULL);
prop= RNA_def_property(srna, "mirror_color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "mirr");
RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "Mirror Color", "");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
-
- prop= RNA_def_property(srna, "ambient_color", PROP_FLOAT, PROP_COLOR);
- RNA_def_property_float_sdna(prop, NULL, "ambr");
- RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "Ambient Color", "");
+ RNA_def_property_ui_text(prop, "Mirror Color", "Mirror color of the material.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "alpha", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Alpha", "");
+ RNA_def_property_ui_text(prop, "Alpha", "Alpha transparency of the material.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING_DRAW, NULL);
/* Color bands */
- prop= RNA_def_property(srna, "color_ramp", PROP_POINTER, PROP_NONE);
+ prop= RNA_def_property(srna, "diffuse_ramp", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "ramp_col");
RNA_def_property_struct_type(prop, "ColorRamp");
- RNA_def_property_ui_text(prop, "Color Ramp", "");
+ RNA_def_property_ui_text(prop, "Diffuse Ramp", "Color ramp used to affect diffuse shading.");
- prop= RNA_def_property(srna, "specularity_ramp", PROP_POINTER, PROP_NONE);
+ prop= RNA_def_property(srna, "specular_ramp", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "ramp_spec");
RNA_def_property_struct_type(prop, "ColorRamp");
- RNA_def_property_ui_text(prop, "Specularity Ramp", "");
+ RNA_def_property_ui_text(prop, "Specular Ramp", "Color ramp used to affect specular shading.");
}
-static void rna_def_material_diffuse(StructRNA *srna, PropertyRNA *prop)
+static void rna_def_material_diffuse(StructRNA *srna)
{
+ PropertyRNA *prop;
+
static EnumPropertyItem prop_diff_shader_items[] = {
- {MA_DIFF_LAMBERT, "DIFF_LAMBERT", "Lambert", ""},
- {MA_DIFF_ORENNAYAR, "DIFF_ORENNAYAR", "Oren-Nayar", ""},
- {MA_DIFF_TOON, "DIFF_TOON", "Toon", ""},
- {MA_DIFF_MINNAERT, "DIFF_MINNAERT", "Minnaert", ""},
- {MA_DIFF_FRESNEL, "DIFF_FRESNEL", "Fresnel", ""},
+ {MA_DIFF_LAMBERT, "LAMBERT", "Lambert", ""},
+ {MA_DIFF_ORENNAYAR, "OREN_NAYAR", "Oren-Nayar", ""},
+ {MA_DIFF_TOON, "TOON", "Toon", ""},
+ {MA_DIFF_MINNAERT, "MINNAERT", "Minnaert", ""},
+ {MA_DIFF_FRESNEL, "FRESNEL", "Fresnel", ""},
{0, NULL, NULL, NULL}};
prop= RNA_def_property(srna, "diffuse_shader", PROP_ENUM, PROP_NONE);
@@ -156,335 +273,314 @@ static void rna_def_material_diffuse(StructRNA *srna, PropertyRNA *prop)
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
}
-static void rna_def_material_raymirror(BlenderRNA *brna, StructRNA *parent)
+static void rna_def_material_raymirror(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
static EnumPropertyItem prop_fadeto_mir_items[] = {
- {MA_RAYMIR_FADETOSKY, "RAYMIR_FADETOSKY", "Fade to sky color", ""},
- {MA_RAYMIR_FADETOMAT, "RAYMIR_FADETOMAT", "Fade to material color", ""},
+ {MA_RAYMIR_FADETOSKY, "FADE_TO_SKY", "Fade to Sky Color", ""},
+ {MA_RAYMIR_FADETOMAT, "FADE_TO_MATERIAL", "Fade to Material Color", ""},
{0, NULL, NULL, NULL}};
srna= RNA_def_struct(brna, "MaterialRaytraceMirror", NULL);
RNA_def_struct_sdna(srna, "Material");
- RNA_def_struct_parent(srna, parent);
- RNA_def_struct_ui_text(srna, "Raytrace Mirror", "");
+ RNA_def_struct_nested(brna, srna, "Material");
+ RNA_def_struct_ui_text(srna, "Material Raytrace Mirror", "Raytraced reflection settings for a Material datablock.");
- prop= RNA_def_property(parent, "raytrace_mirror", PROP_POINTER, PROP_NONE);
- RNA_def_property_struct_type(prop, "MaterialRaytraceMirror");
- RNA_def_property_pointer_funcs(prop, "rna_Material_self_get", NULL, NULL);
- RNA_def_property_ui_text(prop, "Raytrace Mirror", "");
-
- prop= RNA_def_property(srna, "enable", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "enabled", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_RAYMIRROR); /* use bitflags */
- RNA_def_property_ui_text(prop, "Ray Mirror Mode", "Toggle raytrace mirror.");
+ RNA_def_property_ui_text(prop, "Enabled", "Enable raytraced reflections.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "reflect", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ray_mirror");
RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Ray Mirror", "Sets the amount mirror reflection for raytrace.");
+ RNA_def_property_ui_text(prop, "", "Sets the amount mirror reflection for raytrace.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "fresnel", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "fresnel_mir");
RNA_def_property_range(prop, 0.0f, 5.0f);
- RNA_def_property_ui_text(prop, "Ray Mirror Fresnel", "Power of Fresnel for mirror reflection.");
+ RNA_def_property_ui_text(prop, "Fresnel", "Power of Fresnel for mirror reflection.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "fresnel_fac", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "fresnel_mir_i");
RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Ray Mirror Fresnel Factor", "Blending factor for Fresnel.");
+ RNA_def_property_ui_text(prop, "Fresnel Factor", "Blending factor for Fresnel.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "gloss", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "gloss_mir");
RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Ray Mirror Gloss", "The shininess of the reflection. Values < 1.0 give diffuse, blurry reflections.");
+ RNA_def_property_ui_text(prop, "Gloss", "The shininess of the reflection. Values < 1.0 give diffuse, blurry reflections.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
- prop= RNA_def_property(srna, "gloss_aniso", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "gloss_anisotropic", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "aniso_gloss_mir");
RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Ray Mirror Gloss Aniso", "The shape of the reflection, from 0.0 (circular) to 1.0 (fully stretched along the tangent.");
+ RNA_def_property_ui_text(prop, "Gloss Anisotropic", "The shape of the reflection, from 0.0 (circular) to 1.0 (fully stretched along the tangent.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "gloss_samples", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "samp_gloss_mir");
RNA_def_property_range(prop, 0, 1024);
- RNA_def_property_ui_text(prop, "Ray Mirror Gloss Samples", "Number of cone samples averaged for blurry reflections.");
+ RNA_def_property_ui_text(prop, "Gloss Samples", "Number of cone samples averaged for blurry reflections.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
- prop= RNA_def_property(srna, "adapt_thresh", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "gloss_threshold", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "adapt_thresh_mir");
RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Ray Mirror Gloss Threshold", "Threshold for adaptive sampling. If a sample contributes less than this amount (as a percentage), sampling is stopped.");
+ RNA_def_property_ui_text(prop, "Gloss Threshold", "Threshold for adaptive sampling. If a sample contributes less than this amount (as a percentage), sampling is stopped.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "depth", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "ray_depth");
RNA_def_property_range(prop, 0, 10);
- RNA_def_property_ui_text(prop, "Ray Mirror Depth", "Maximum allowed number of light inter-reflections.");
+ RNA_def_property_ui_text(prop, "Depth", "Maximum allowed number of light inter-reflections.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "distance", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "dist_mir");
RNA_def_property_range(prop, 0.0f, 10000.0f);
- RNA_def_property_ui_text(prop, "Ray Mirror Max Dist", "Maximum distance of reflected rays. Reflections further than this range fade to sky color or material color.");
+ RNA_def_property_ui_text(prop, "Max Dist", "Maximum distance of reflected rays. Reflections further than this range fade to sky color or material color.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "fade_to", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "fadeto_mir");
RNA_def_property_enum_items(prop, prop_fadeto_mir_items);
- RNA_def_property_ui_text(prop, "Ray Mirror End Fade-out", "The color that rays with no intersection within the Max Distance take. Material color can be best for indoor scenes, sky color for outdoor.");
+ RNA_def_property_ui_text(prop, "End Fade-out", "The color that rays with no intersection within the Max Distance take. Material color can be best for indoor scenes, sky color for outdoor.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
}
-static void rna_def_material_raytra(BlenderRNA *brna, StructRNA *parent)
+static void rna_def_material_raytra(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
srna= RNA_def_struct(brna, "MaterialRaytraceTransparency", NULL);
RNA_def_struct_sdna(srna, "Material");
- RNA_def_struct_parent(srna, parent);
- RNA_def_struct_ui_text(srna, "Raytrace Transparency", "");
-
- prop= RNA_def_property(parent, "raytrace_transparency", PROP_POINTER, PROP_NONE);
- RNA_def_property_struct_type(prop, "MaterialRaytraceTransparency");
- RNA_def_property_pointer_funcs(prop, "rna_Material_self_get", NULL, NULL);
- RNA_def_property_ui_text(prop, "Raytrace Transparency", "");
+ RNA_def_struct_nested(brna, srna, "Material");
+ RNA_def_struct_ui_text(srna, "Material Raytrace Transparency", "Raytraced refraction settings for a Material datablock.");
- prop= RNA_def_property(srna, "enable", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "enabled", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_RAYTRANSP); /* use bitflags */
- RNA_def_property_ui_text(prop, "Ray Transparency Mode", "Enables raytracing for transparent refraction rendering.");
+ RNA_def_property_ui_text(prop, "Enabled", "Enables raytracing for transparent refraction rendering.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "ior", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ang");
RNA_def_property_range(prop, 1.0f, 3.0f);
- RNA_def_property_ui_text(prop, "Ray Transparency IOR", "Sets angular index of refraction for raytraced refraction.");
+ RNA_def_property_ui_text(prop, "IOR", "Sets angular index of refraction for raytraced refraction.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "fresnel", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "fresnel_tra");
RNA_def_property_range(prop, 0.0f, 5.0f);
- RNA_def_property_ui_text(prop, "Ray Transparency Fresnel", "Power of Fresnel for transparency (Ray or ZTransp).");
+ RNA_def_property_ui_text(prop, "Fresnel", "Power of Fresnel for transparency (Ray or ZTransp).");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "fresnel_fac", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "fresnel_tra_i");
RNA_def_property_range(prop, 1.0f, 5.0f);
- RNA_def_property_ui_text(prop, "Ray Transparency Fresnel Factor", "Blending factor for Fresnel.");
+ RNA_def_property_ui_text(prop, "Fresnel Factor", "Blending factor for Fresnel.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "gloss", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "gloss_tra");
RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Ray Transparency Gloss", "The clarity of the refraction. Values < 1.0 give diffuse, blurry refractions.");
+ RNA_def_property_ui_text(prop, "Gloss", "The clarity of the refraction. Values < 1.0 give diffuse, blurry refractions.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "gloss_samples", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "samp_gloss_tra");
RNA_def_property_range(prop, 0, 1024);
- RNA_def_property_ui_text(prop, "Ray Transparency Gloss Samples", "Number of cone samples averaged for blurry refractions.");
+ RNA_def_property_ui_text(prop, "Gloss Samples", "Number of cone samples averaged for blurry refractions.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
- prop= RNA_def_property(srna, "adapt_thresh", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "gloss_threshold", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "adapt_thresh_tra");
RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Ray Transparency Gloss Threshold", "Threshold for adaptive sampling. If a sample contributes less than this amount (as a percentage), sampling is stopped.");
+ RNA_def_property_ui_text(prop, "Gloss Threshold", "Threshold for adaptive sampling. If a sample contributes less than this amount (as a percentage), sampling is stopped.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "depth", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "ray_depth_tra");
RNA_def_property_range(prop, 0, 10);
- RNA_def_property_ui_text(prop, "Ray Transparency Depth", "Maximum allowed number of light inter-refractions.");
+ RNA_def_property_ui_text(prop, "Depth", "Maximum allowed number of light inter-refractions.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "filter", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "filter");
RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Ray Transparency Filter", "Amount to blend in the material's diffuse color in raytraced transparency (simulating absorption).");
+ RNA_def_property_ui_text(prop, "Filter", "Amount to blend in the material's diffuse color in raytraced transparency (simulating absorption).");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "limit", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "tx_limit");
RNA_def_property_range(prop, 0.0f, 100.0f);
- RNA_def_property_ui_text(prop, "Ray Transparency Limit", "Maximum depth for light to travel through the transparent material before becoming fully filtered (0.0 is disabled).");
+ RNA_def_property_ui_text(prop, "Limit", "Maximum depth for light to travel through the transparent material before becoming fully filtered (0.0 is disabled).");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "falloff", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "tx_falloff");
RNA_def_property_range(prop, 0.1f, 10.0f);
- RNA_def_property_ui_text(prop, "Ray Transparency Falloff", "Falloff power for transmissivity filter effect (1.0 is linear).");
+ RNA_def_property_ui_text(prop, "Falloff", "Falloff power for transmissivity filter effect (1.0 is linear).");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "specular_opacity", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "spectra");
RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Ray Transparency Specular Opacity", "Makes specular areas opaque on transparent materials.");
+ RNA_def_property_ui_text(prop, "Specular Opacity", "Makes specular areas opaque on transparent materials.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
}
-static void rna_def_material_halo(BlenderRNA *brna, StructRNA *parent)
+static void rna_def_material_halo(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
srna= RNA_def_struct(brna, "MaterialHalo", NULL);
RNA_def_struct_sdna(srna, "Material");
- RNA_def_struct_parent(srna, parent);
- RNA_def_struct_ui_text(srna, "Halo", "");
-
- prop= RNA_def_property(parent, "halo", PROP_POINTER, PROP_NONE);
- RNA_def_property_struct_type(prop, "MaterialHalo");
- RNA_def_property_pointer_funcs(prop, "rna_Material_self_get", NULL, NULL);
- RNA_def_property_ui_text(prop, "Halo", "");
+ RNA_def_struct_nested(brna, srna, "Material");
+ RNA_def_struct_ui_text(srna, "Material Halo", "Halo particle effect settings for a Material datablock.");
- prop= RNA_def_property(srna, "enable", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "enabled", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_HALO); /* use bitflags */
- RNA_def_property_ui_text(prop, "Halo Mode", "Enables halo rendering of material.");
+ RNA_def_property_ui_text(prop, "Enabled", "Enables halo rendering of material.");
RNA_def_property_boolean_funcs(prop, NULL, "rna_Material_mode_halo_set");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING_DRAW, NULL);
prop= RNA_def_property(srna, "size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "hasize");
RNA_def_property_range(prop, 0.0f, 100.0f);
- RNA_def_property_ui_text(prop, "Halo Size", "Sets the dimension of the halo.");
+ RNA_def_property_ui_text(prop, "Size", "Sets the dimension of the halo.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "hardness", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "har");
RNA_def_property_range(prop, 0, 127);
- RNA_def_property_ui_text(prop, "Halo Hardness", "Sets the hardness of the halo.");
+ RNA_def_property_ui_text(prop, "Hardness", "Sets the hardness of the halo.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "add", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "add");
RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Halo Add", "Sets the strength of the add effect.");
+ RNA_def_property_ui_text(prop, "Add", "Sets the strength of the add effect.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "rings", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "ringc");
RNA_def_property_range(prop, 0, 24);
- RNA_def_property_ui_text(prop, "Halo Rings", "Sets the number of rings rendered over the halo.");
+ RNA_def_property_ui_text(prop, "Rings", "Sets the number of rings rendered over the halo.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
- prop= RNA_def_property(srna, "lines", PROP_INT, PROP_NONE);
+ prop= RNA_def_property(srna, "line_number", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "linec");
RNA_def_property_range(prop, 0, 250);
- RNA_def_property_ui_text(prop, "Halo Lines", "Sets the number of star shaped lines rendered over the halo.");
+ RNA_def_property_ui_text(prop, "Line Number", "Sets the number of star shaped lines rendered over the halo.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "star_tips", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "starc");
RNA_def_property_range(prop, 3, 50);
- RNA_def_property_ui_text(prop, "Halo Star Tips", "Sets the number of points on the star shaped halo.");
+ RNA_def_property_ui_text(prop, "Star Tips", "Sets the number of points on the star shaped halo.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "seed", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "seed1");
RNA_def_property_range(prop, 0, 255);
- RNA_def_property_ui_text(prop, "Halo Seed", "Randomizes ring dimension and line location.");
+ RNA_def_property_ui_text(prop, "Seed", "Randomizes ring dimension and line location.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "flare_mode", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_HALO_FLARE); /* use bitflags */
- RNA_def_property_ui_text(prop, "Halo Mode Flare", "Renders halo as a lensflare.");
+ RNA_def_property_ui_text(prop, "Flare", "Renders halo as a lensflare.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "flare_size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "flaresize");
RNA_def_property_range(prop, 0.1f, 25.0f);
- RNA_def_property_ui_text(prop, "Halo Flare Size", "Sets the factor by which the flare is larger than the halo.");
+ RNA_def_property_ui_text(prop, "Flare Size", "Sets the factor by which the flare is larger than the halo.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "flare_subsize", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "subsize");
RNA_def_property_range(prop, 0.1f, 25.0f);
- RNA_def_property_ui_text(prop, "Halo Flare Subsize", "Sets the dimension of the subflares, dots and circles.");
+ RNA_def_property_ui_text(prop, "Flare Subsize", "Sets the dimension of the subflares, dots and circles.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "flare_boost", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "flareboost");
RNA_def_property_range(prop, 0.1f, 10.0f);
- RNA_def_property_ui_text(prop, "Halo Flare Boost", "Gives the flare extra strength.");
+ RNA_def_property_ui_text(prop, "Flare Boost", "Gives the flare extra strength.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "flare_seed", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "seed2");
RNA_def_property_range(prop, 0, 255);
- RNA_def_property_ui_text(prop, "Halo Flare Seed", "Specifies an offset in the flare seed table.");
+ RNA_def_property_ui_text(prop, "Flare Seed", "Specifies an offset in the flare seed table.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "flares_sub", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "flarec");
RNA_def_property_range(prop, 1, 32);
- RNA_def_property_ui_text(prop, "Halo Flares Sub", "Sets the number of subflares.");
+ RNA_def_property_ui_text(prop, "Flares Sub", "Sets the number of subflares.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
- prop= RNA_def_property(srna, "rings_mode", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "ring", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_HALO_RINGS); /* use bitflags */
- RNA_def_property_ui_text(prop, "Halo Mode Rings", "Renders rings over halo.");
+ RNA_def_property_ui_text(prop, "Rings", "Renders rings over halo.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
- prop= RNA_def_property(srna, "lines_mode", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "lines", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_HALO_LINES); /* use bitflags */
- RNA_def_property_ui_text(prop, "Halo Mode Lines", "Renders star shaped lines over halo.");
+ RNA_def_property_ui_text(prop, "Lines", "Renders star shaped lines over halo.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
- prop= RNA_def_property(srna, "star_mode", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "star", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_STAR); /* use bitflags */
- RNA_def_property_ui_text(prop, "Halo Mode Star", "Renders halo as a star.");
+ RNA_def_property_ui_text(prop, "Star", "Renders halo as a star.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
- prop= RNA_def_property(srna, "texture_mode", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "use_texture", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_HALOTEX); /* use bitflags */
- RNA_def_property_ui_text(prop, "Halo Mode Texture", "Gives halo a texture.");
+ RNA_def_property_ui_text(prop, "Use Texture", "Gives halo a texture.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
- prop= RNA_def_property(srna, "puno_mode", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "use_vertex_normal", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_HALOPUNO); /* use bitflags */
- RNA_def_property_ui_text(prop, "Halo Mode Puno", "Uses the vertex normal to specify the dimension of the halo.");
+ RNA_def_property_ui_text(prop, "Use Vertex Normal", "Uses the vertex normal to specify the dimension of the halo.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
- prop= RNA_def_property(srna, "xalpha_mode", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "xalpha", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_HALO_XALPHA); /* use bitflags */
- RNA_def_property_ui_text(prop, "Halo Mode Extreme Alpha", "Uses extreme alpha.");
+ RNA_def_property_ui_text(prop, "Extreme Alpha", "Uses extreme alpha.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
- prop= RNA_def_property(srna, "shaded_mode", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "shaded", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_HALO_SHADE); /* use bitflags */
- RNA_def_property_ui_text(prop, "Halo Mode Shaded", "Lets halo receive light and shadows.");
+ RNA_def_property_ui_text(prop, "Shaded", "Lets halo receive light and shadows.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
- prop= RNA_def_property(srna, "soft_mode", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "soft", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_HALO_SOFT); /* use bitflags */
- RNA_def_property_ui_text(prop, "Halo Mode Soft", "Softens the halo.");
+ RNA_def_property_ui_text(prop, "Soft", "Softens the halo.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
}
-static void rna_def_material_sss(BlenderRNA *brna, StructRNA *parent)
+static void rna_def_material_sss(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
srna= RNA_def_struct(brna, "MaterialSubsurfaceScattering", NULL);
RNA_def_struct_sdna(srna, "Material");
- RNA_def_struct_parent(srna, parent);
- RNA_def_struct_ui_text(srna, "Subsurface Scattering", "");
-
- prop= RNA_def_property(parent, "subsurface_scattering", PROP_POINTER, PROP_NONE);
- RNA_def_property_struct_type(prop, "MaterialSubsurfaceScattering");
- RNA_def_property_pointer_funcs(prop, "rna_Material_self_get", NULL, NULL);
- RNA_def_property_ui_text(prop, "Subsurface Scattering", "");
+ RNA_def_struct_nested(brna, srna, "Material");
+ RNA_def_struct_ui_text(srna, "Material Subsurface Scattering", "Diffuse subsurface scattering settings for a Material datablock.");
- /* XXX: The labels for the array elements should really be R, G, B */
- prop= RNA_def_property(srna, "radius", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "radius", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "sss_radius");
RNA_def_property_range(prop, 0.001, FLT_MAX);
RNA_def_property_ui_range(prop, 0.001, 10000, 1, 3);
@@ -497,45 +593,47 @@ static void rna_def_material_sss(BlenderRNA *brna, StructRNA *parent)
prop= RNA_def_property(srna, "error_tolerance", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "sss_error");
RNA_def_property_ui_range(prop, 0.0001, 10, 1, 3);
- RNA_def_property_ui_text(prop, "Error tolerance", "");
+ RNA_def_property_ui_text(prop, "Error Tolerance", "Error tolerance (low values are slower and higher quality).");
- prop= RNA_def_property(srna, "object_scale", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "scale", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "sss_scale");
RNA_def_property_ui_range(prop, 0.001, 1000, 1, 3);
- RNA_def_property_ui_text(prop, "Object Scale", "");
+ RNA_def_property_ui_text(prop, "Scale", "Object scale factor.");
- prop= RNA_def_property(srna, "index_of_refraction", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "ior", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "sss_ior");
RNA_def_property_ui_range(prop, 0.1, 2, 1, 3);
- RNA_def_property_ui_text(prop, "Index of Refraction", "");
+ RNA_def_property_ui_text(prop, "IOR", "Index of refraction (higher values are denser).");
- prop= RNA_def_property(srna, "blend_factor", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "color_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "sss_colfac");
RNA_def_property_range(prop, 0, 1);
- RNA_def_property_ui_text(prop, "Blend Factor", "");
+ RNA_def_property_ui_text(prop, "Color Factor", "Blend factor for SSS colors.");
- prop= RNA_def_property(srna, "texture_scattering_factor", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "texture_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "sss_texfac");
RNA_def_property_range(prop, 0, 1);
- RNA_def_property_ui_text(prop, "Texture Scattering Factor", "");
+ RNA_def_property_ui_text(prop, "Texture Factor", "Texture scatting blend factor.");
- prop= RNA_def_property(srna, "front_weight", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "front", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "sss_front");
RNA_def_property_range(prop, 0, 2);
- RNA_def_property_ui_text(prop, "Front Weight", "");
+ RNA_def_property_ui_text(prop, "Front", "Front scattering weight.");
- prop= RNA_def_property(srna, "back_weight", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "back", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "sss_back");
RNA_def_property_range(prop, 0, 10);
- RNA_def_property_ui_text(prop, "Back Weight", "");
+ RNA_def_property_ui_text(prop, "Back", "Back scattering weight.");
- prop= RNA_def_property(srna, "enable", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "enabled", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "sss_flag", MA_DIFF_SSS);
- RNA_def_property_ui_text(prop, "Enable", "");
+ RNA_def_property_ui_text(prop, "Enabled", "Enable diffuse subsurface scatting effects in a material.");
}
-void rna_def_material_specularity(StructRNA *srna, PropertyRNA *prop)
+void rna_def_material_specularity(StructRNA *srna)
{
+ PropertyRNA *prop;
+
prop= RNA_def_property(srna, "specularity", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "spec");
RNA_def_property_range(prop, 0, 1);
@@ -560,53 +658,61 @@ void rna_def_material_specularity(StructRNA *srna, PropertyRNA *prop)
RNA_def_property_ui_text(prop, "Specular Slope", "The standard deviation of surface slope.");
}
-void rna_def_material_strand(StructRNA *srna, PropertyRNA *prop)
+void rna_def_material_strand(BlenderRNA *brna)
{
- prop= RNA_def_property(srna, "strand_tangent_shading", PROP_BOOLEAN, PROP_NONE);
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ srna= RNA_def_struct(brna, "MaterialStrand", NULL);
+ RNA_def_struct_sdna(srna, "Material");
+ RNA_def_struct_nested(brna, srna, "Material");
+ RNA_def_struct_ui_text(srna, "Material Strand", "Strand settings for a Material datablock.");
+
+ prop= RNA_def_property(srna, "tangent_shading", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_TANGENT_STR);
- RNA_def_property_ui_text(prop, "Strand Tangent Shading", "Uses direction of strands as normal for tangent-shading.");
+ RNA_def_property_ui_text(prop, "Tangent Shading", "Uses direction of strands as normal for tangent-shading.");
- prop= RNA_def_property(srna, "strand_surface_diffuse", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "surface_diffuse", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_STR_SURFDIFF);
- RNA_def_property_ui_text(prop, "Strand Surface Diffuse", "Make diffuse shading more similar to shading the surface.");
+ RNA_def_property_ui_text(prop, "Surface Diffuse", "Make diffuse shading more similar to shading the surface.");
- prop= RNA_def_property(srna, "strand_blend_distance", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "blend_distance", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "strand_surfnor");
RNA_def_property_range(prop, 0, 10);
RNA_def_property_ui_text(prop, "Blend Distance", "Distance in Blender units over which to blend in the surface normal.");
- prop= RNA_def_property(srna, "strand_blender_units", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "blender_units", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_STR_B_UNITS);
- RNA_def_property_ui_text(prop, "Strand Blender Units", "Use Blender units for widths instead of pixels.");
+ RNA_def_property_ui_text(prop, "Blender Units", "Use Blender units for widths instead of pixels.");
- /* XXX: range is different depending on (mode & MA_STR_B_UNITS) */
- prop= RNA_def_property(srna, "strand_start_size", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "start_size", PROP_FLOAT, PROP_UNSIGNED);
RNA_def_property_float_sdna(prop, NULL, "strand_sta");
- RNA_def_property_ui_text(prop, "Strand Start Size", "");
+ RNA_def_property_float_funcs(prop, NULL, NULL, "rna_MaterialStrand_start_size_range");
+ RNA_def_property_ui_text(prop, "Start Size", "Start size of strands in pixels Blender units.");
- /* XXX: range is different depending on (mode & MA_STR_B_UNITS) */
- prop= RNA_def_property(srna, "strand_end_size", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "end_size", PROP_FLOAT, PROP_UNSIGNED);
RNA_def_property_float_sdna(prop, NULL, "strand_end");
- RNA_def_property_ui_text(prop, "Strand End Size", "");
+ RNA_def_property_float_funcs(prop, NULL, NULL, "rna_MaterialStrand_end_size_range");
+ RNA_def_property_ui_text(prop, "End Size", "Start size of strands in pixels or Blender units.");
- prop= RNA_def_property(srna, "strand_minimum_size", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "min_size", PROP_FLOAT, PROP_UNSIGNED);
RNA_def_property_float_sdna(prop, NULL, "strand_min");
RNA_def_property_range(prop, 0.001, 10);
- RNA_def_property_ui_text(prop, "Strand Minimum Size", "Minimum size of strands in pixels.");
+ RNA_def_property_ui_text(prop, "Minimum Size", "Minimum size of strands in pixels.");
- prop= RNA_def_property(srna, "strand_shape", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "shape", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "strand_ease");
RNA_def_property_range(prop, -0.9, 0.9);
- RNA_def_property_ui_text(prop, "Strand Shape", "Positive values make strands rounder, negative makes strands spiky.");
+ RNA_def_property_ui_text(prop, "Shape", "Positive values make strands rounder, negative makes strands spiky.");
- prop= RNA_def_property(srna, "strand_fade", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "width_fade", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "strand_widthfade");
RNA_def_property_range(prop, 0, 2);
- RNA_def_property_ui_text(prop, "Strand Fade", "Transparency along the width of the strand.");
+ RNA_def_property_ui_text(prop, "Width Fade", "Transparency along the width of the strand.");
- prop= RNA_def_property(srna, "strand_uv_layer", PROP_STRING, PROP_NONE);
+ prop= RNA_def_property(srna, "uv_layer", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "strand_uvname");
- RNA_def_property_ui_text(prop, "Strand UV Layer", "Name of UV layer to override.");
+ RNA_def_property_ui_text(prop, "UV Layer", "Name of UV layer to override.");
}
void RNA_def_material(BlenderRNA *brna)
@@ -615,18 +721,12 @@ void RNA_def_material(BlenderRNA *brna)
PropertyRNA *prop= NULL;
srna= RNA_def_struct(brna, "Material", "ID");
- RNA_def_struct_ui_text(srna, "Material", "DOC_BROKEN");
-
- /* mtex */
- prop= RNA_def_property(srna, "textures", PROP_COLLECTION, PROP_NONE);
- RNA_def_property_struct_type(prop, "TextureSlot");
- RNA_def_property_collection_funcs(prop, "rna_Material_mtex_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_dereference_get", 0, 0, 0, 0);
- RNA_def_property_ui_text(prop, "Textures", "");
+ RNA_def_struct_ui_text(srna, "Material", "Material datablock to defined the appearance of geometric objects for rendering.");
prop= RNA_def_property(srna, "ambient", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "amb");
RNA_def_property_range(prop, 0, 1);
- RNA_def_property_ui_text(prop, "Ambient", "");
+ RNA_def_property_ui_text(prop, "Ambient", "Amount of global ambient color the material receives.");
prop= RNA_def_property(srna, "emit", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0, 2);
@@ -636,51 +736,104 @@ void RNA_def_material(BlenderRNA *brna)
RNA_def_property_range(prop, 0, 1);
RNA_def_property_ui_text(prop, "Translucency", "Amount of diffuse shading on the back side.");
- prop= RNA_def_property(srna, "cubic_interpolation", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "cubic", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "shade_flag", MA_CUBIC);
- RNA_def_property_ui_text(prop, "Cubic Interpolation", "Use cubic interpolation for diffuse values, for smoother transitions.");
+ RNA_def_property_ui_text(prop, "Cubic", "Use cubic interpolation for diffuse values, for smoother transitions.");
prop= RNA_def_property(srna, "object_color", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "shade_flag", MA_OBCOLOR);
RNA_def_property_ui_text(prop, "Object Color", "Modulate the result with a per-object color.");
- prop= RNA_def_property(srna, "shadow_bias", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "shadow_ray_bias", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "sbias");
RNA_def_property_range(prop, 0, 0.25);
- RNA_def_property_ui_text(prop, "Shadow Bias", "Shadow bias to prevent terminator problems on shadow boundary.");
+ RNA_def_property_ui_text(prop, "Shadow Ray Bias", "Shadow raytracing bias to prevent terminator problems on shadow boundary.");
- prop= RNA_def_property(srna, "shadow_bias_factor", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "shadow_buffer_bias", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "lbias");
RNA_def_property_range(prop, 0, 10);
- RNA_def_property_ui_text(prop, "Shadow Bias Factor", "Factor to multiple shadowbuffer bias with (0 is ignore.)");
+ RNA_def_property_ui_text(prop, "Shadow Buffer Bias", "Factor to multiply shadow buffer bias with (0 is ignore.)");
prop= RNA_def_property(srna, "shadow_casting_alpha", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "shad_alpha");
RNA_def_property_range(prop, 0.001, 1);
RNA_def_property_ui_text(prop, "Shadow Casting Alpha", "Shadow casting alpha, only in use for Irregular Shadowbuffer.");
+ /* nested structs */
+ prop= RNA_def_property(srna, "raytrace_mirror", PROP_POINTER, PROP_NEVER_NULL);
+ RNA_def_property_struct_type(prop, "MaterialRaytraceMirror");
+ RNA_def_property_pointer_funcs(prop, "rna_Material_self_get", NULL, NULL);
+ RNA_def_property_ui_text(prop, "Raytrace Mirror", "Raytraced reflection settings for the material.");
+
+ prop= RNA_def_property(srna, "raytrace_transparency", PROP_POINTER, PROP_NEVER_NULL);
+ RNA_def_property_struct_type(prop, "MaterialRaytraceTransparency");
+ RNA_def_property_pointer_funcs(prop, "rna_Material_self_get", NULL, NULL);
+ RNA_def_property_ui_text(prop, "Raytrace Transparency", "Raytraced reflection settings for the material.");
+
+ prop= RNA_def_property(srna, "halo", PROP_POINTER, PROP_NEVER_NULL);
+ RNA_def_property_struct_type(prop, "MaterialHalo");
+ RNA_def_property_pointer_funcs(prop, "rna_Material_self_get", NULL, NULL);
+ RNA_def_property_ui_text(prop, "Halo", "Halo settings for the material.");
+
+ prop= RNA_def_property(srna, "subsurface_scattering", PROP_POINTER, PROP_NEVER_NULL);
+ RNA_def_property_struct_type(prop, "MaterialSubsurfaceScattering");
+ RNA_def_property_pointer_funcs(prop, "rna_Material_self_get", NULL, NULL);
+ RNA_def_property_ui_text(prop, "Subsurface Scattering", "Subsurface scattering settings for the material.");
+
+ prop= RNA_def_property(srna, "strand", PROP_POINTER, PROP_NEVER_NULL);
+ RNA_def_property_struct_type(prop, "MaterialStrand");
+ RNA_def_property_pointer_funcs(prop, "rna_Material_self_get", NULL, NULL);
+ RNA_def_property_ui_text(prop, "Strand", "Strand settings for the material.");
+
+ /* nodetree */
+ prop= RNA_def_property(srna, "node_tree", PROP_POINTER, PROP_NONE);
+ RNA_def_property_pointer_sdna(prop, NULL, "nodetree");
+ RNA_def_property_ui_text(prop, "Node Tree", "Node tree for node based materials.");
+
+ /* common */
+ rna_def_ipo_common(srna);
+ rna_def_mtex_common(srna, "rna_Material_mtex_begin", "rna_Material_active_texture_get", "MaterialTextureSlot");
+
+ prop= RNA_def_property(srna, "script_link", PROP_POINTER, PROP_NEVER_NULL);
+ RNA_def_property_pointer_sdna(prop, NULL, "scriptlink");
+ RNA_def_property_flag(prop, PROP_NOT_EDITABLE);
+ RNA_def_property_ui_text(prop, "Script Link", "Scripts linked to this material.");
+
/* XXX: does Material.septex get RNA? */
- /* colors */
- rna_def_material_colors(srna, prop);
- /* diffuse shaders */
- rna_def_material_diffuse(srna, prop);
- /* raytrace mirror */
- rna_def_material_raymirror(brna, srna);
- /* raytrace transparency */
- rna_def_material_raytra(brna, srna);
- /* Halo settings */
- rna_def_material_halo(brna, srna);
- /* Subsurface scattering */
- rna_def_material_sss(brna, srna);
- /* specularity */
- rna_def_material_specularity(srna, prop);
- /* strand */
- rna_def_material_strand(srna, prop);
+ rna_def_material_colors(srna);
+ rna_def_material_diffuse(srna);
+ rna_def_material_specularity(srna);
+
+ /* nested structs */
+ rna_def_material_raymirror(brna);
+ rna_def_material_raytra(brna);
+ rna_def_material_halo(brna);
+ rna_def_material_sss(brna);
+ rna_def_material_mtex(brna);
+ rna_def_material_strand(brna);
+}
- /* nodetree */
- prop= RNA_def_property(srna, "nodetree", PROP_POINTER, PROP_NONE);
- RNA_def_property_ui_text(prop, "Node Tree", "");
+void rna_def_mtex_common(StructRNA *srna, const char *begin, const char *activeget, const char *structname)
+{
+ PropertyRNA *prop;
+
+ /* mtex */
+ prop= RNA_def_property(srna, "textures", PROP_COLLECTION, PROP_NONE);
+ RNA_def_property_struct_type(prop, structname);
+ RNA_def_property_collection_funcs(prop, begin, "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_dereference_get", 0, 0, 0, 0);
+ RNA_def_property_ui_text(prop, "Textures", "Texture slots defining the mapping and influence of textures.");
+
+ prop= RNA_def_property(srna, "active_texture", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NOT_EDITABLE);
+ RNA_def_property_struct_type(prop, structname);
+ RNA_def_property_pointer_funcs(prop, activeget, NULL, NULL);
+ RNA_def_property_ui_text(prop, "Active Texture", "Active texture slot being displayed.");
+
+ prop= RNA_def_property(srna, "active_texture_index", PROP_INT, PROP_UNSIGNED);
+ RNA_def_property_int_sdna(prop, NULL, "texact");
+ RNA_def_property_range(prop, 0, MAX_MTEX-1);
+ RNA_def_property_ui_text(prop, "Active Texture Index", "Index of active texture slot.");
}
#endif
diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c
index e2add00b1d3..77047135e98 100644
--- a/source/blender/makesrna/intern/rna_mesh.c
+++ b/source/blender/makesrna/intern/rna_mesh.c
@@ -80,49 +80,49 @@ static void rna_MEdge_crease_set(PointerRNA *ptr, float value)
medge->crease= (char)(CLAMPIS(value*255.0f, 0, 255));
}
-static float rna_MCol_color1_get(PointerRNA *ptr, int index)
+static float rna_MeshColor_color1_get(PointerRNA *ptr, int index)
{
MCol *mcol= (MCol*)ptr->data;
return (&mcol[0].r)[index]/255.0f;
}
-static void rna_MCol_color1_set(PointerRNA *ptr, int index, float value)
+static void rna_MeshColor_color1_set(PointerRNA *ptr, int index, float value)
{
MCol *mcol= (MCol*)ptr->data;
(&mcol[0].r)[index]= (char)(CLAMPIS(value*255.0f, 0, 255));
}
-static float rna_MCol_color2_get(PointerRNA *ptr, int index)
+static float rna_MeshColor_color2_get(PointerRNA *ptr, int index)
{
MCol *mcol= (MCol*)ptr->data;
return (&mcol[1].r)[index]/255.0f;
}
-static void rna_MCol_color2_set(PointerRNA *ptr, int index, float value)
+static void rna_MeshColor_color2_set(PointerRNA *ptr, int index, float value)
{
MCol *mcol= (MCol*)ptr->data;
(&mcol[1].r)[index]= (char)(CLAMPIS(value*255.0f, 0, 255));
}
-static float rna_MCol_color3_get(PointerRNA *ptr, int index)
+static float rna_MeshColor_color3_get(PointerRNA *ptr, int index)
{
MCol *mcol= (MCol*)ptr->data;
return (&mcol[2].r)[index]/255.0f;
}
-static void rna_MCol_color3_set(PointerRNA *ptr, int index, float value)
+static void rna_MeshColor_color3_set(PointerRNA *ptr, int index, float value)
{
MCol *mcol= (MCol*)ptr->data;
(&mcol[2].r)[index]= (char)(CLAMPIS(value*255.0f, 0, 255));
}
-static float rna_MCol_color4_get(PointerRNA *ptr, int index)
+static float rna_MeshColor_color4_get(PointerRNA *ptr, int index)
{
MCol *mcol= (MCol*)ptr->data;
return (&mcol[2].r)[index]/255.0f;
}
-static void rna_MCol_color4_set(PointerRNA *ptr, int index, float value)
+static void rna_MeshColor_color4_set(PointerRNA *ptr, int index, float value)
{
MCol *mcol= (MCol*)ptr->data;
(&mcol[3].r)[index]= (char)(CLAMPIS(value*255.0f, 0, 255));
@@ -311,47 +311,47 @@ static int rna_Mesh_vcol_layers_length(PointerRNA *ptr)
return rna_CustomDataLayer_length(ptr, CD_MCOL);
}
-static void rna_MColLayer_data_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
+static void rna_MeshColorLayer_data_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
Mesh *me= (Mesh*)ptr->id.data;
CustomDataLayer *layer= (CustomDataLayer*)ptr->data;
rna_iterator_array_begin(iter, layer->data, sizeof(MCol)*4, me->totface, NULL);
}
-static int rna_MColLayer_data_length(PointerRNA *ptr)
+static int rna_MeshColorLayer_data_length(PointerRNA *ptr)
{
Mesh *me= (Mesh*)ptr->id.data;
return me->totface;
}
-static int rna_MColLayer_active_render_get(PointerRNA *ptr)
+static int rna_MeshColorLayer_active_render_get(PointerRNA *ptr)
{
return rna_CustomDataLayer_active_get(ptr, CD_MCOL, 1);
}
-static int rna_MColLayer_active_get(PointerRNA *ptr)
+static int rna_MeshColorLayer_active_get(PointerRNA *ptr)
{
return rna_CustomDataLayer_active_get(ptr, CD_MCOL, 0);
}
-static void rna_MColLayer_active_render_set(PointerRNA *ptr, int value)
+static void rna_MeshColorLayer_active_render_set(PointerRNA *ptr, int value)
{
rna_CustomDataLayer_active_set(ptr, value, CD_MCOL, 1);
}
-static void rna_MColLayer_active_set(PointerRNA *ptr, int value)
+static void rna_MeshColorLayer_active_set(PointerRNA *ptr, int value)
{
rna_CustomDataLayer_active_set(ptr, value, CD_MCOL, 0);
}
-static void rna_MFloatPropertyLayer_data_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
+static void rna_MeshFloatPropertyLayer_data_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
Mesh *me= (Mesh*)ptr->id.data;
CustomDataLayer *layer= (CustomDataLayer*)ptr->data;
rna_iterator_array_begin(iter, layer->data, sizeof(MFloatProperty), me->totface, NULL);
}
-static int rna_MFloatPropertyLayer_data_length(PointerRNA *ptr)
+static int rna_MeshFloatPropertyLayer_data_length(PointerRNA *ptr)
{
Mesh *me= (Mesh*)ptr->id.data;
return me->totface;
@@ -380,14 +380,14 @@ static int rna_int_layer_check(CollectionPropertyIterator *iter, void *data)
return (layer->type != CD_PROP_INT);
}
-static void rna_MIntPropertyLayer_data_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
+static void rna_MeshIntPropertyLayer_data_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
Mesh *me= (Mesh*)ptr->id.data;
CustomDataLayer *layer= (CustomDataLayer*)ptr->data;
rna_iterator_array_begin(iter, layer->data, sizeof(MIntProperty), me->totface, NULL);
}
-static int rna_MIntPropertyLayer_data_length(PointerRNA *ptr)
+static int rna_MeshIntPropertyLayer_data_length(PointerRNA *ptr)
{
Mesh *me= (Mesh*)ptr->id.data;
return me->totface;
@@ -410,14 +410,14 @@ static int rna_string_layer_check(CollectionPropertyIterator *iter, void *data)
return (layer->type != CD_PROP_STR);
}
-static void rna_MStringPropertyLayer_data_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
+static void rna_MeshStringPropertyLayer_data_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
Mesh *me= (Mesh*)ptr->id.data;
CustomDataLayer *layer= (CustomDataLayer*)ptr->data;
rna_iterator_array_begin(iter, layer->data, sizeof(MStringProperty), me->totface, NULL);
}
-static int rna_MStringPropertyLayer_data_length(PointerRNA *ptr)
+static int rna_MeshStringPropertyLayer_data_length(PointerRNA *ptr)
{
Mesh *me= (Mesh*)ptr->id.data;
return me->totface;
@@ -441,8 +441,8 @@ static void rna_def_mvert_group(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "MeshVertexGroup", NULL);
- RNA_def_struct_ui_text(srna, "Mesh Vertex Group", "DOC_BROKEN");
+ srna= RNA_def_struct(brna, "VertexGroupElement", NULL);
+ RNA_def_struct_ui_text(srna, "Vertex Group Element", "Weight value of a vertex in a vertex group.");
RNA_def_struct_sdna(srna, "MDeformWeight");
/* we can't point to actual group, it is in the object and so
@@ -464,7 +464,7 @@ static void rna_def_mvert(BlenderRNA *brna)
srna= RNA_def_struct(brna, "MeshVertex", NULL);
RNA_def_struct_sdna(srna, "MVert");
- RNA_def_struct_ui_text(srna, "Mesh Vertex", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Mesh Vertex", "Vertex in a Mesh datablock.");
prop= RNA_def_property(srna, "co", PROP_FLOAT, PROP_VECTOR);
RNA_def_property_ui_text(prop, "Location", "");
@@ -488,7 +488,7 @@ static void rna_def_mvert(BlenderRNA *brna)
prop= RNA_def_property(srna, "groups", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_funcs(prop, "rna_MeshVertex_groups_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", 0, 0, 0, 0);
- RNA_def_property_struct_type(prop, "MeshVertexGroup");
+ RNA_def_property_struct_type(prop, "VertexGroupElement");
RNA_def_property_ui_text(prop, "Groups", "Weights for the vertex groups this vertex is member of.");
}
@@ -499,7 +499,7 @@ static void rna_def_medge(BlenderRNA *brna)
srna= RNA_def_struct(brna, "MeshEdge", NULL);
RNA_def_struct_sdna(srna, "MEdge");
- RNA_def_struct_ui_text(srna, "Mesh Edge", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Mesh Edge", "Edge in a Mesh datablock.");
prop= RNA_def_property(srna, "verts", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "v1");
@@ -539,7 +539,7 @@ static void rna_def_mface(BlenderRNA *brna)
srna= RNA_def_struct(brna, "MeshFace", NULL);
RNA_def_struct_sdna(srna, "MFace");
- RNA_def_struct_ui_text(srna, "Mesh Face", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Mesh Face", "Face in a Mesh datablock.");
prop= RNA_def_property(srna, "verts", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "v1");
@@ -577,9 +577,31 @@ static void rna_def_mtface(BlenderRNA *brna)
{TF_CLIP, "CLIPALPHA", "Clip Alpha", "Use the images alpha values clipped with no blending (binary alpha)"},
{0, NULL, NULL, NULL}};
+ srna= RNA_def_struct(brna, "MeshTextureFaceLayer", NULL);
+ RNA_def_struct_ui_text(srna, "Mesh Texture Face Layer", "Layer of texture faces in a Mesh datablock.");
+ RNA_def_struct_sdna(srna, "CustomDataLayer");
+
+ prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
+ RNA_def_struct_name_property(srna, prop);
+ RNA_def_property_ui_text(prop, "Name", "");
+
+ prop= RNA_def_property(srna, "active", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_funcs(prop, "rna_MeshTextureFaceLayer_active_get", "rna_MeshTextureFaceLayer_active_set");
+ RNA_def_property_ui_text(prop, "Active", "Sets the layer as active for display and editing");
+
+ prop= RNA_def_property(srna, "active_render", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "active_rnd", 0);
+ RNA_def_property_boolean_funcs(prop, "rna_MeshTextureFaceLayer_active_render_get", "rna_MeshTextureFaceLayer_active_render_set");
+ RNA_def_property_ui_text(prop, "Active Render", "Sets the layer as active for rendering");
+
+ prop= RNA_def_property(srna, "data", PROP_COLLECTION, PROP_NONE);
+ RNA_def_property_struct_type(prop, "MeshTextureFace");
+ RNA_def_property_ui_text(prop, "Data", "");
+ RNA_def_property_collection_funcs(prop, "rna_MeshTextureFaceLayer_data_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", 0, "rna_MeshTextureFaceLayer_data_length", 0, 0);
+
srna= RNA_def_struct(brna, "MeshTextureFace", NULL);
RNA_def_struct_sdna(srna, "MTFace");
- RNA_def_struct_ui_text(srna, "Mesh Texture Face", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Mesh Texture Face", "UV mapping, texturing and game engine data for a face.");
/* prop= RNA_def_property(srna, "image", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "tpage");
@@ -613,9 +635,9 @@ static void rna_def_mtface(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "mode", TF_TWOSIDE);
RNA_def_property_ui_text(prop, "Twoside", "Render face twosided");
- prop= RNA_def_property(srna, "obcolor", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "object_color", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", TF_OBCOL);
- RNA_def_property_ui_text(prop, "ObColor", "Use ObColor instead of vertex colors");
+ RNA_def_property_ui_text(prop, "Object Color", "Use ObColor instead of vertex colors");
prop= RNA_def_property(srna, "halo", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", TF_BILLBOARD);
@@ -633,7 +655,7 @@ static void rna_def_mtface(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "mode", TF_BMFONT);
RNA_def_property_ui_text(prop, "Text", "Enable bitmap text on face");
- prop= RNA_def_property(srna, "alphasort", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "alpha_sort", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", TF_ALPHASORT);
RNA_def_property_ui_text(prop, "Alpha Sort", "Enable sorting of faces for correct alpha drawing (slow, use Clip Alpha instead when possible)");
@@ -670,9 +692,28 @@ static void rna_def_mtface(BlenderRNA *brna)
RNA_def_property_array(prop, 2);
RNA_def_property_float_funcs(prop, "rna_MeshTextureFace_uv4_get", "rna_MeshTextureFace_uv4_set", NULL);
RNA_def_property_ui_text(prop, "UV 4", "");
+}
- srna= RNA_def_struct(brna, "MeshTextureFaceLayer", NULL);
- RNA_def_struct_ui_text(srna, "Mesh Texture Face Layer", "DOC_BROKEN");
+static void rna_def_msticky(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ srna= RNA_def_struct(brna, "MeshSticky", NULL);
+ RNA_def_struct_sdna(srna, "MSticky");
+ RNA_def_struct_ui_text(srna, "Mesh Vertex Sticky Texture Coordinate", "Stricky texture coordinate.");
+
+ prop= RNA_def_property(srna, "co", PROP_FLOAT, PROP_VECTOR);
+ RNA_def_property_ui_text(prop, "Location", "Sticky texture coordinate location.");
+}
+
+static void rna_def_mcol(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ srna= RNA_def_struct(brna, "MeshColorLayer", NULL);
+ RNA_def_struct_ui_text(srna, "Mesh Vertex Color Layer", "Layer of vertex colors in a Mesh datablock.");
RNA_def_struct_sdna(srna, "CustomDataLayer");
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
@@ -680,150 +721,114 @@ static void rna_def_mtface(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Name", "");
prop= RNA_def_property(srna, "active", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_funcs(prop, "rna_MeshTextureFaceLayer_active_get", "rna_MeshTextureFaceLayer_active_set");
+ RNA_def_property_boolean_funcs(prop, "rna_MeshColorLayer_active_get", "rna_MeshColorLayer_active_set");
RNA_def_property_ui_text(prop, "Active", "Sets the layer as active for display and editing");
prop= RNA_def_property(srna, "active_render", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "active_rnd", 0);
- RNA_def_property_boolean_funcs(prop, "rna_MeshTextureFaceLayer_active_render_get", "rna_MeshTextureFaceLayer_active_render_set");
+ RNA_def_property_boolean_funcs(prop, "rna_MeshColorLayer_active_render_get", "rna_MeshColorLayer_active_render_set");
RNA_def_property_ui_text(prop, "Active Render", "Sets the layer as active for rendering");
prop= RNA_def_property(srna, "data", PROP_COLLECTION, PROP_NONE);
- RNA_def_property_struct_type(prop, "MeshTextureFace");
+ RNA_def_property_struct_type(prop, "MeshColor");
RNA_def_property_ui_text(prop, "Data", "");
- RNA_def_property_collection_funcs(prop, "rna_MeshTextureFaceLayer_data_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", 0, "rna_MeshTextureFaceLayer_data_length", 0, 0);
-}
-
-static void rna_def_msticky(BlenderRNA *brna)
-{
- StructRNA *srna;
- PropertyRNA *prop;
-
- srna= RNA_def_struct(brna, "MSticky", NULL);
- RNA_def_struct_ui_text(srna, "Mesh Vertex Sticky Texture Coordinate", "DOC_BROKEN");
-
- prop= RNA_def_property(srna, "co", PROP_FLOAT, PROP_VECTOR);
- RNA_def_property_ui_text(prop, "Location", "Sticky texture coordinate location");
-}
+ RNA_def_property_collection_funcs(prop, "rna_MeshColorLayer_data_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", 0, "rna_MeshColorLayer_data_length", 0, 0);
-static void rna_def_mcol(BlenderRNA *brna)
-{
- StructRNA *srna;
- PropertyRNA *prop;
-
- srna= RNA_def_struct(brna, "MCol", NULL);
- RNA_def_struct_ui_text(srna, "Mesh Vertex Color", "DOC_BROKEN");
+ srna= RNA_def_struct(brna, "MeshColor", NULL);
+ RNA_def_struct_sdna(srna, "MCol");
+ RNA_def_struct_ui_text(srna, "Mesh Vertex Color", "Vertex colors for a face in a Mesh.");
prop= RNA_def_property(srna, "color1", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
- RNA_def_property_float_funcs(prop, "rna_MCol_color1_get", "rna_MCol_color1_set", NULL);
+ RNA_def_property_float_funcs(prop, "rna_MeshColor_color1_get", "rna_MeshColor_color1_set", NULL);
RNA_def_property_ui_text(prop, "Color 1", "");
prop= RNA_def_property(srna, "color2", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
- RNA_def_property_float_funcs(prop, "rna_MCol_color2_get", "rna_MCol_color2_set", NULL);
+ RNA_def_property_float_funcs(prop, "rna_MeshColor_color2_get", "rna_MeshColor_color2_set", NULL);
RNA_def_property_ui_text(prop, "Color 2", "");
prop= RNA_def_property(srna, "color3", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
- RNA_def_property_float_funcs(prop, "rna_MCol_color3_get", "rna_MCol_color3_set", NULL);
+ RNA_def_property_float_funcs(prop, "rna_MeshColor_color3_get", "rna_MeshColor_color3_set", NULL);
RNA_def_property_ui_text(prop, "Color 3", "");
prop= RNA_def_property(srna, "color4", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
- RNA_def_property_float_funcs(prop, "rna_MCol_color4_get", "rna_MCol_color4_set", NULL);
+ RNA_def_property_float_funcs(prop, "rna_MeshColor_color4_get", "rna_MeshColor_color4_set", NULL);
RNA_def_property_ui_text(prop, "Color 4", "");
+}
- srna= RNA_def_struct(brna, "MColLayer", NULL);
- RNA_def_struct_ui_text(srna, "Mesh Vertex Color Layer", "DOC_BROKEN");
+static void rna_def_mproperties(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ /* Float */
+ srna= RNA_def_struct(brna, "MeshFloatPropertyLayer", NULL);
RNA_def_struct_sdna(srna, "CustomDataLayer");
+ RNA_def_struct_ui_text(srna, "Mesh Float Property Layer", "User defined layer of floating pointer number values.");
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_struct_name_property(srna, prop);
RNA_def_property_ui_text(prop, "Name", "");
- prop= RNA_def_property(srna, "active", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_funcs(prop, "rna_MColLayer_active_get", "rna_MColLayer_active_set");
- RNA_def_property_ui_text(prop, "Active", "Sets the layer as active for display and editing");
-
- prop= RNA_def_property(srna, "active_render", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "active_rnd", 0);
- RNA_def_property_boolean_funcs(prop, "rna_MColLayer_active_render_get", "rna_MColLayer_active_render_set");
- RNA_def_property_ui_text(prop, "Active Render", "Sets the layer as active for rendering");
-
prop= RNA_def_property(srna, "data", PROP_COLLECTION, PROP_NONE);
- RNA_def_property_struct_type(prop, "MCol");
+ RNA_def_property_struct_type(prop, "MeshFloatProperty");
RNA_def_property_ui_text(prop, "Data", "");
- RNA_def_property_collection_funcs(prop, "rna_MColLayer_data_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", 0, "rna_MColLayer_data_length", 0, 0);
-}
+ RNA_def_property_collection_funcs(prop, "rna_MeshFloatPropertyLayer_data_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", 0, "rna_MeshFloatPropertyLayer_data_length", 0, 0);
-static void rna_def_mproperties(BlenderRNA *brna)
-{
- StructRNA *srna;
- PropertyRNA *prop;
-
- /* Float */
- srna= RNA_def_struct(brna, "MFloatProperty", NULL);
- RNA_def_struct_ui_text(srna, "Mesh Float Property", "DOC_BROKEN");
+ srna= RNA_def_struct(brna, "MeshFloatProperty", NULL);
+ RNA_def_struct_sdna(srna, "MFloatProperty");
+ RNA_def_struct_ui_text(srna, "Mesh Float Property", "User defined floating point number value in a float properties layer.");
prop= RNA_def_property(srna, "value", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "f");
RNA_def_property_ui_text(prop, "Value", "");
- srna= RNA_def_struct(brna, "MFloatPropertyLayer", NULL);
- RNA_def_struct_ui_text(srna, "Mesh Float Property Layer", "DOC_BROKEN");
+ /* Int */
+ srna= RNA_def_struct(brna, "MeshIntPropertyLayer", NULL);
RNA_def_struct_sdna(srna, "CustomDataLayer");
+ RNA_def_struct_ui_text(srna, "Mesh Int Property Layer", "User defined layer of integer number values.");
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_struct_name_property(srna, prop);
RNA_def_property_ui_text(prop, "Name", "");
prop= RNA_def_property(srna, "data", PROP_COLLECTION, PROP_NONE);
- RNA_def_property_struct_type(prop, "MFloatProperty");
+ RNA_def_property_struct_type(prop, "MeshIntProperty");
RNA_def_property_ui_text(prop, "Data", "");
- RNA_def_property_collection_funcs(prop, "rna_MFloatPropertyLayer_data_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", 0, "rna_MFloatPropertyLayer_data_length", 0, 0);
+ RNA_def_property_collection_funcs(prop, "rna_MeshIntPropertyLayer_data_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", 0, "rna_MeshIntPropertyLayer_data_length", 0, 0);
- /* Int */
- srna= RNA_def_struct(brna, "MIntProperty", NULL);
- RNA_def_struct_ui_text(srna, "Mesh Int Property", "DOC_BROKEN");
+ srna= RNA_def_struct(brna, "MeshIntProperty", NULL);
+ RNA_def_struct_sdna(srna, "MIntProperty");
+ RNA_def_struct_ui_text(srna, "Mesh Int Property", "User defined integer number value in an integer properties layer.");
prop= RNA_def_property(srna, "value", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "i");
RNA_def_property_ui_text(prop, "Value", "");
- srna= RNA_def_struct(brna, "MIntPropertyLayer", NULL);
- RNA_def_struct_ui_text(srna, "Mesh Int Property Layer", "DOC_BROKEN");
+ /* String */
+ srna= RNA_def_struct(brna, "MeshStringPropertyLayer", NULL);
RNA_def_struct_sdna(srna, "CustomDataLayer");
+ RNA_def_struct_ui_text(srna, "Mesh String Property Layer", "User defined layer of string text values.");
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_struct_name_property(srna, prop);
RNA_def_property_ui_text(prop, "Name", "");
prop= RNA_def_property(srna, "data", PROP_COLLECTION, PROP_NONE);
- RNA_def_property_struct_type(prop, "MIntProperty");
+ RNA_def_property_struct_type(prop, "MeshStringProperty");
RNA_def_property_ui_text(prop, "Data", "");
- RNA_def_property_collection_funcs(prop, "rna_MIntPropertyLayer_data_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", 0, "rna_MIntPropertyLayer_data_length", 0, 0);
+ RNA_def_property_collection_funcs(prop, "rna_MeshStringPropertyLayer_data_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", 0, "rna_MeshStringPropertyLayer_data_length", 0, 0);
- /* String */
- srna= RNA_def_struct(brna, "MStringProperty", NULL);
- RNA_def_struct_ui_text(srna, "Mesh String Property", "DOC_BROKEN");
+ srna= RNA_def_struct(brna, "MeshStringProperty", NULL);
+ RNA_def_struct_sdna(srna, "MStringProperty");
+ RNA_def_struct_ui_text(srna, "Mesh String Property", "User defined string text value in a string properties layer.");
prop= RNA_def_property(srna, "value", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "s");
RNA_def_property_ui_text(prop, "Value", "");
-
- srna= RNA_def_struct(brna, "MStringPropertyLayer", NULL);
- RNA_def_struct_ui_text(srna, "Mesh String Property Layer", "DOC_BROKEN");
- RNA_def_struct_sdna(srna, "CustomDataLayer");
-
- prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
- RNA_def_struct_name_property(srna, prop);
- RNA_def_property_ui_text(prop, "Name", "");
-
- prop= RNA_def_property(srna, "data", PROP_COLLECTION, PROP_NONE);
- RNA_def_property_struct_type(prop, "MStringProperty");
- RNA_def_property_ui_text(prop, "Data", "");
- RNA_def_property_collection_funcs(prop, "rna_MStringPropertyLayer_data_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", 0, "rna_MStringPropertyLayer_data_length", 0, 0);
}
static void rna_def_mmultires(BlenderRNA *brna)
@@ -833,7 +838,7 @@ static void rna_def_mmultires(BlenderRNA *brna)
srna= RNA_def_struct(brna, "MeshMultires", NULL);
RNA_def_struct_sdna(srna, "Multires");
- RNA_def_struct_ui_text(srna, "Mesh Multires", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Mesh Multires", "Multiresolution mesh levels data in a Mesh datablock.");
prop= RNA_def_property(srna, "level", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "newlvl");
@@ -902,7 +907,7 @@ static void rna_def_mesh(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "Mesh", "ID");
- RNA_def_struct_ui_text(srna, "Mesh", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Mesh", "Mesh datablock to define geometric surfaces.");
prop= RNA_def_property(srna, "verts", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "mvert", "totvert");
@@ -921,7 +926,7 @@ static void rna_def_mesh(BlenderRNA *brna)
prop= RNA_def_property(srna, "sticky", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "msticky", "totvert");
- RNA_def_property_struct_type(prop, "MSticky");
+ RNA_def_property_struct_type(prop, "MeshSticky");
RNA_def_property_ui_text(prop, "Sticky", "Sticky texture coordinates.");
prop= RNA_def_property(srna, "uv_layers", PROP_COLLECTION, PROP_NONE);
@@ -933,25 +938,25 @@ static void rna_def_mesh(BlenderRNA *brna)
prop= RNA_def_property(srna, "vcol_layers", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "fdata.layers", "fdata.totlayer");
RNA_def_property_collection_funcs(prop, "rna_Mesh_vcol_layers_begin", 0, 0, 0, 0, "rna_Mesh_vcol_layers_length", 0, 0);
- RNA_def_property_struct_type(prop, "MColLayer");
+ RNA_def_property_struct_type(prop, "MeshColorLayer");
RNA_def_property_ui_text(prop, "Vertex Color Layers", "");
prop= RNA_def_property(srna, "float_layers", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "fdata.layers", "fdata.totlayer");
RNA_def_property_collection_funcs(prop, "rna_Mesh_float_layers_begin", 0, 0, 0, 0, "rna_Mesh_float_layers_length", 0, 0);
- RNA_def_property_struct_type(prop, "MFloatPropertyLayer");
+ RNA_def_property_struct_type(prop, "MeshFloatPropertyLayer");
RNA_def_property_ui_text(prop, "Float Property Layers", "");
prop= RNA_def_property(srna, "int_layers", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "fdata.layers", "fdata.totlayer");
RNA_def_property_collection_funcs(prop, "rna_Mesh_int_layers_begin", 0, 0, 0, 0, "rna_Mesh_int_layers_length", 0, 0);
- RNA_def_property_struct_type(prop, "MIntPropertyLayer");
+ RNA_def_property_struct_type(prop, "MeshIntPropertyLayer");
RNA_def_property_ui_text(prop, "Int Property Layers", "");
prop= RNA_def_property(srna, "string_layers", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "fdata.layers", "fdata.totlayer");
RNA_def_property_collection_funcs(prop, "rna_Mesh_string_layers_begin", 0, 0, 0, 0, "rna_Mesh_string_layers_length", 0, 0);
- RNA_def_property_struct_type(prop, "MStringPropertyLayer");
+ RNA_def_property_struct_type(prop, "MeshStringPropertyLayer");
RNA_def_property_ui_text(prop, "String Property Layers", "");
prop= RNA_def_property(srna, "autosmooth", PROP_BOOLEAN, PROP_NONE);
@@ -979,7 +984,8 @@ static void rna_def_mesh(BlenderRNA *brna)
RNA_def_property_pointer_sdna(prop, NULL, "mr");
RNA_def_property_ui_text(prop, "Multires", "");
- prop= RNA_def_property(srna, "key", PROP_POINTER, PROP_NONE);
+ prop= RNA_def_property(srna, "shape_keys", PROP_POINTER, PROP_NONE);
+ RNA_def_property_pointer_sdna(prop, NULL, "key");
RNA_def_property_ui_text(prop, "Shape Keys", "");
rna_def_texmat_common(srna, "rna_Mesh_texspace_editable");
diff --git a/source/blender/makesrna/intern/rna_meta.c b/source/blender/makesrna/intern/rna_meta.c
index 7da77897921..f187e12225c 100644
--- a/source/blender/makesrna/intern/rna_meta.c
+++ b/source/blender/makesrna/intern/rna_meta.c
@@ -55,7 +55,7 @@ void rna_def_metaelement(BlenderRNA *brna)
{0, NULL, NULL, NULL}};
srna= RNA_def_struct(brna, "MetaElement", NULL);
- RNA_def_struct_ui_text(srna, "Meta Element", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Meta Element", "Blobby element in a MetaBall datablock.");
RNA_def_struct_sdna(srna, "MetaElem");
/* enums */
@@ -111,7 +111,7 @@ void rna_def_metaball(BlenderRNA *brna)
{0, NULL, NULL, NULL}};
srna= RNA_def_struct(brna, "MetaBall", "ID");
- RNA_def_struct_ui_text(srna, "MetaBall", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "MetaBall", "Metaball datablock to defined blobby surfaces.");
prop= RNA_def_property(srna, "elements", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "elems", NULL);
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index a5ba31e2280..37529caf027 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -260,7 +260,7 @@ static void rna_def_modifier_subsurf(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "SubsurfModifier", "Modifier");
- RNA_def_struct_ui_text(srna, "Subsurf Modifier", "Subsurf Modifier.");
+ RNA_def_struct_ui_text(srna, "Subsurf Modifier", "Subdivision surface modifier.");
RNA_def_struct_sdna(srna, "SubsurfModifierData");
rna_def_property_subdivision_common(srna, "subdivType", "levels");
@@ -287,7 +287,7 @@ static void rna_def_modifier_multires(BlenderRNA *brna)
StructRNA *srna;
srna= RNA_def_struct(brna, "MultiresModifier", "Modifier");
- RNA_def_struct_ui_text(srna, "Multires Modifier", "");
+ RNA_def_struct_ui_text(srna, "Multires Modifier", "Multiresolution mesh modifier.");
RNA_def_struct_sdna(srna, "MultiresModifierData");
rna_def_property_subdivision_common(srna, "simple", "lvl");
@@ -299,7 +299,7 @@ static void rna_def_modifier_lattice(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "LatticeModifier", "Modifier");
- RNA_def_struct_ui_text(srna, "Lattice Modifier", "Lattice Modifier.");
+ RNA_def_struct_ui_text(srna, "Lattice Modifier", "Lattice deformation modifier.");
RNA_def_struct_sdna(srna, "LatticeModifierData");
prop= RNA_def_property(srna, "lattice", PROP_POINTER, PROP_NONE);
@@ -330,7 +330,7 @@ static void rna_def_modifier_curve(BlenderRNA *brna)
{0, NULL, NULL, NULL}};
srna= RNA_def_struct(brna, "CurveModifier", "Modifier");
- RNA_def_struct_ui_text(srna, "Curve Modifier", "Curve Modifier.");
+ RNA_def_struct_ui_text(srna, "Curve Modifier", "Curve deformation modifier.");
RNA_def_struct_sdna(srna, "CurveModifierData");
prop= RNA_def_property(srna, "curve", PROP_POINTER, PROP_NONE);
@@ -358,7 +358,7 @@ static void rna_def_modifier_build(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "BuildModifier", "Modifier");
- RNA_def_struct_ui_text(srna, "Build Modifier", "Build Modifier.");
+ RNA_def_struct_ui_text(srna, "Build Modifier", "Build effect modifier.");
RNA_def_struct_sdna(srna, "BuildModifierData");
prop= RNA_def_property(srna, "start", PROP_FLOAT, PROP_NONE);
@@ -387,7 +387,7 @@ static void rna_def_modifier_mirror(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "MirrorModifier", "Modifier");
- RNA_def_struct_ui_text(srna, "Mirror Modifier", "Mirror Modifier.");
+ RNA_def_struct_ui_text(srna, "Mirror Modifier", "Mirroring modifier.");
RNA_def_struct_sdna(srna, "MirrorModifierData");
prop= RNA_def_property(srna, "x", PROP_BOOLEAN, PROP_NONE);
@@ -445,7 +445,7 @@ static void rna_def_modifier_decimate(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "DecimateModifier", "Modifier");
- RNA_def_struct_ui_text(srna, "Decimate Modifier", "Decimate Modifier.");
+ RNA_def_struct_ui_text(srna, "Decimate Modifier", "Decimation modifier.");
RNA_def_struct_sdna(srna, "DecimateModifierData");
prop= RNA_def_property(srna, "ratio", PROP_FLOAT, PROP_NONE);
@@ -466,14 +466,14 @@ static void rna_def_modifier_wave(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem prop_texture_coordinates_items[] = {
- {MOD_WAV_MAP_LOCAL, "MAP_LOCAL", "Local", ""},
- {MOD_WAV_MAP_GLOBAL, "MAP_GLOBAL", "Global", ""},
- {MOD_WAV_MAP_OBJECT, "MAP_OBJECT", "Object", ""},
+ {MOD_WAV_MAP_LOCAL, "LOCAL", "Local", ""},
+ {MOD_WAV_MAP_GLOBAL, "GLOBAL", "Global", ""},
+ {MOD_WAV_MAP_OBJECT, "OBJECT", "Object", ""},
{MOD_WAV_MAP_UV, "MAP_UV", "UV", ""},
{0, NULL, NULL, NULL}};
srna= RNA_def_struct(brna, "WaveModifier", "Modifier");
- RNA_def_struct_ui_text(srna, "Wave Modifier", "Wave Modifier.");
+ RNA_def_struct_ui_text(srna, "Wave Modifier", "Wave effect modifier.");
RNA_def_struct_sdna(srna, "WaveModifierData");
prop= RNA_def_property(srna, "x", PROP_BOOLEAN, PROP_NONE);
@@ -616,7 +616,7 @@ static void rna_def_modifier_armature(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "ArmatureModifier", "Modifier");
- RNA_def_struct_ui_text(srna, "Armature Modifier", "Armature Modifier.");
+ RNA_def_struct_ui_text(srna, "Armature Modifier", "Armature deformation modifier.");
RNA_def_struct_sdna(srna, "ArmatureModifierData");
prop= RNA_def_property(srna, "armature", PROP_POINTER, PROP_NONE);
@@ -663,7 +663,7 @@ static void rna_def_modifier_hook(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "HookModifier", "Modifier");
- RNA_def_struct_ui_text(srna, "Hook Modifier", "Hook Modifier.");
+ RNA_def_struct_ui_text(srna, "Hook Modifier", "Hook modifier to modify the location of vertices.");
RNA_def_struct_sdna(srna, "HookModifierData");
prop= RNA_def_property(srna, "falloff", PROP_FLOAT, PROP_NONE);
@@ -694,7 +694,7 @@ static void rna_def_modifier_softbody(BlenderRNA *brna)
StructRNA *srna;
srna= RNA_def_struct(brna, "SoftbodyModifier", "Modifier");
- RNA_def_struct_ui_text(srna, "Softbody Modifier", "Softbody Modifier.");
+ RNA_def_struct_ui_text(srna, "Softbody Modifier", "Softbody simulation modifier.");
RNA_def_struct_sdna(srna, "SoftbodyModifierData");
}
@@ -704,13 +704,13 @@ static void rna_def_modifier_boolean(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem prop_operation_items[] = {
- {eBooleanModifierOp_Intersect, "OPERATION_INTERSECT", "Intersect", ""},
- {eBooleanModifierOp_Union, "OPERATION_UNION", "Union", ""},
- {eBooleanModifierOp_Difference, "OPERATION_DIFFERENCE", "Difference", ""},
+ {eBooleanModifierOp_Intersect, "INTERSECT", "Intersect", ""},
+ {eBooleanModifierOp_Union, "UNION", "Union", ""},
+ {eBooleanModifierOp_Difference, "DIFFERENCE", "Difference", ""},
{0, NULL, NULL, NULL}};
srna= RNA_def_struct(brna, "BooleanModifier", "Modifier");
- RNA_def_struct_ui_text(srna, "Boolean Modifier", "Boolean Modifier.");
+ RNA_def_struct_ui_text(srna, "Boolean Modifier", "Boolean operations modifier.");
RNA_def_struct_sdna(srna, "BooleanModifierData");
prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
@@ -736,7 +736,7 @@ static void rna_def_modifier_array(BlenderRNA *brna)
{0, NULL, NULL, NULL}};
srna= RNA_def_struct(brna, "ArrayModifier", "Modifier");
- RNA_def_struct_ui_text(srna, "Array Modifier", "Array Modifier.");
+ RNA_def_struct_ui_text(srna, "Array Modifier", "Array duplication modifier.");
RNA_def_struct_sdna(srna, "ArrayModifierData");
/* Length parameters */
@@ -832,7 +832,7 @@ static void rna_def_modifier_edgesplit(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "EdgeSplitModifier", "Modifier");
- RNA_def_struct_ui_text(srna, "EdgeSplit Modifier", "EdgeSplit Modifier.");
+ RNA_def_struct_ui_text(srna, "EdgeSplit Modifier", "Edge splitting modifier to create sharp edges.");
RNA_def_struct_sdna(srna, "EdgeSplitModifierData");
prop= RNA_def_property(srna, "split_angle", PROP_FLOAT, PROP_NONE);
@@ -858,22 +858,22 @@ static void rna_def_modifier_displace(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem prop_direction_items[] = {
- {MOD_DISP_DIR_X, "DIR_X", "X", ""},
- {MOD_DISP_DIR_Y, "DIR_Y", "Y", ""},
- {MOD_DISP_DIR_Z, "DIR_Z", "Z", ""},
- {MOD_DISP_DIR_NOR, "DIR_NORMAL", "Normal", ""},
- {MOD_DISP_DIR_RGB_XYZ, "DIR_RGB_TO_XYZ", "RGB to XYZ", ""},
+ {MOD_DISP_DIR_X, "X", "X", ""},
+ {MOD_DISP_DIR_Y, "Y", "Y", ""},
+ {MOD_DISP_DIR_Z, "Z", "Z", ""},
+ {MOD_DISP_DIR_NOR, "NORMAL", "Normal", ""},
+ {MOD_DISP_DIR_RGB_XYZ, "RGB_TO_XYZ", "RGB to XYZ", ""},
{0, NULL, NULL, NULL}};
static EnumPropertyItem prop_texture_coordinates_items[] = {
- {MOD_DISP_MAP_LOCAL, "MAP_LOCAL", "Map", ""},
- {MOD_DISP_MAP_GLOBAL, "MAP_GLOBAL", "Global", ""},
- {MOD_DISP_MAP_OBJECT, "MAP_OBJECT", "Object", ""},
- {MOD_DISP_MAP_UV, "MAP_UV", "UV", ""},
+ {MOD_DISP_MAP_LOCAL, "LOCAL", "Map", ""},
+ {MOD_DISP_MAP_GLOBAL, "GLOBAL", "Global", ""},
+ {MOD_DISP_MAP_OBJECT, "OBJECT", "Object", ""},
+ {MOD_DISP_MAP_UV, "UV", "UV", ""},
{0, NULL, NULL, NULL}};
srna= RNA_def_struct(brna, "DisplaceModifier", "Modifier");
- RNA_def_struct_ui_text(srna, "Displace Modifier", "Displace Modifier.");
+ RNA_def_struct_ui_text(srna, "Displace Modifier", "Displacement modifier.");
RNA_def_struct_sdna(srna, "DisplaceModifierData");
prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
@@ -929,7 +929,7 @@ static void rna_def_modifier_uvproject(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "UVProjectModifier", "Modifier");
- RNA_def_struct_ui_text(srna, "UVProject Modifier", "UVProject Modifier.");
+ RNA_def_struct_ui_text(srna, "UVProject Modifier", "UV projection modifier to sets UVs from a projector.");
RNA_def_struct_sdna(srna, "UVProjectModifierData");
prop= RNA_def_property(srna, "uv_layer", PROP_STRING, PROP_NONE);
@@ -974,7 +974,7 @@ static void rna_def_modifier_smooth(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "SmoothModifier", "Modifier");
- RNA_def_struct_ui_text(srna, "Smooth Modifier", "Smooth Modifier.");
+ RNA_def_struct_ui_text(srna, "Smooth Modifier", "Smoothing effect modifier.");
RNA_def_struct_sdna(srna, "SmoothModifierData");
prop= RNA_def_property(srna, "x", PROP_BOOLEAN, PROP_NONE);
@@ -1017,13 +1017,13 @@ static void rna_def_modifier_cast(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem prop_cast_type_items[] = {
- {MOD_CAST_TYPE_SPHERE, "TYPE_SPHERE", "Sphere", ""},
- {MOD_CAST_TYPE_CYLINDER, "TYPE_CYLINDER", "Cylinder", ""},
- {MOD_CAST_TYPE_CUBOID, "TYPE_CUBOID", "Cuboid", ""},
+ {MOD_CAST_TYPE_SPHERE, "SPHERE", "Sphere", ""},
+ {MOD_CAST_TYPE_CYLINDER, "CYLINDER", "Cylinder", ""},
+ {MOD_CAST_TYPE_CUBOID, "CUBOID", "Cuboid", ""},
{0, NULL, NULL, NULL}};
srna= RNA_def_struct(brna, "CastModifier", "Modifier");
- RNA_def_struct_ui_text(srna, "Cast Modifier", "Cast Modifier.");
+ RNA_def_struct_ui_text(srna, "Cast Modifier", "Cast modifier to cast to other shapes.");
RNA_def_struct_sdna(srna, "CastModifierData");
prop= RNA_def_property(srna, "cast_type", PROP_ENUM, PROP_NONE);
@@ -1079,7 +1079,7 @@ static void rna_def_modifier_meshdeform(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "MeshDeformModifier", "Modifier");
- RNA_def_struct_ui_text(srna, "MeshDeform Modifier", "MeshDeform Modifier.");
+ RNA_def_struct_ui_text(srna, "MeshDeform Modifier", "Mesh deformation modifier to deform with other meshes.");
RNA_def_struct_sdna(srna, "MeshDeformModifierData");
prop= RNA_def_property(srna, "mesh", PROP_POINTER, PROP_NONE);
@@ -1117,7 +1117,7 @@ static void rna_def_modifier_particlesystem(BlenderRNA *brna)
StructRNA *srna;
srna= RNA_def_struct(brna, "ParticleSystemModifier", "Modifier");
- RNA_def_struct_ui_text(srna, "ParticleSystem Modifier", "ParticleSystem Modifier.");
+ RNA_def_struct_ui_text(srna, "ParticleSystem Modifier", "Particle system simulation modifier.");
RNA_def_struct_sdna(srna, "ParticleSystemModifierData");
}
@@ -1127,7 +1127,7 @@ static void rna_def_modifier_particleinstance(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "ParticleInstanceModifier", "Modifier");
- RNA_def_struct_ui_text(srna, "ParticleInstance Modifier", "ParticleInstance Modifier.");
+ RNA_def_struct_ui_text(srna, "ParticleInstance Modifier", "Particle system instancing modifier.");
RNA_def_struct_sdna(srna, "ParticleInstanceModifierData");
prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
@@ -1179,7 +1179,7 @@ static void rna_def_modifier_explode(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "ExplodeModifier", "Modifier");
- RNA_def_struct_ui_text(srna, "Explode Modifier", "Explode Modifier.");
+ RNA_def_struct_ui_text(srna, "Explode Modifier", "Explosion effect modifier based on a particle system.");
RNA_def_struct_sdna(srna, "ExplodeModifierData");
prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
@@ -1218,20 +1218,20 @@ static void rna_def_modifier_cloth(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "ClothModifier", "Modifier");
- RNA_def_struct_ui_text(srna, "Cloth Modifier", "Cloth Modifier.");
+ RNA_def_struct_ui_text(srna, "Cloth Modifier", "Cloth simulation modifier.");
RNA_def_struct_sdna(srna, "ClothModifierData");
- prop= RNA_def_property(srna, "settings", PROP_POINTER, PROP_NONE);
+ prop= RNA_def_property(srna, "settings", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "sim_parms");
RNA_def_property_struct_type(prop, "ClothSettings");
RNA_def_property_ui_text(prop, "Cloth Settings", "");
- prop= RNA_def_property(srna, "collision_settings", PROP_POINTER, PROP_NONE);
+ prop= RNA_def_property(srna, "collision_settings", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "coll_parms");
RNA_def_property_struct_type(prop, "ClothCollisionSettings");
RNA_def_property_ui_text(prop, "Cloth Collision Settings", "");
- prop= RNA_def_property(srna, "point_cache", PROP_POINTER, PROP_NONE);
+ prop= RNA_def_property(srna, "point_cache", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "PointCache");
RNA_def_property_ui_text(prop, "Point Cache", "");
}
@@ -1241,7 +1241,7 @@ static void rna_def_modifier_collision(BlenderRNA *brna)
StructRNA *srna;
srna= RNA_def_struct(brna, "CollisionModifier", "Modifier");
- RNA_def_struct_ui_text(srna, "Collision Modifier", "Collision Modifier.");
+ RNA_def_struct_ui_text(srna, "Collision Modifier", "Collision modifier defining modifier stack position used for collision.");
RNA_def_struct_sdna(srna, "CollisionModifierData");
}
@@ -1263,7 +1263,7 @@ static void rna_def_modifier_bevel(BlenderRNA *brna)
{0, NULL, NULL, NULL}};
srna= RNA_def_struct(brna, "BevelModifier", "Modifier");
- RNA_def_struct_ui_text(srna, "Bevel Modifier", "Bevel Modifier.");
+ RNA_def_struct_ui_text(srna, "Bevel Modifier", "Bevel modifier to make edges and vertices more rounded.");
RNA_def_struct_sdna(srna, "BevelModifierData");
prop= RNA_def_property(srna, "width", PROP_FLOAT, PROP_NONE);
@@ -1309,7 +1309,7 @@ static void rna_def_modifier_shrinkwrap(BlenderRNA *brna)
{0, NULL, NULL, NULL}};
srna= RNA_def_struct(brna, "ShrinkwrapModifier", "Modifier");
- RNA_def_struct_ui_text(srna, "Shrinkwrap Modifier", "Shrinkwrap Modifier.");
+ RNA_def_struct_ui_text(srna, "Shrinkwrap Modifier", "Shrink wrapping modifier to shrink wrap and object to a target.");
RNA_def_struct_sdna(srna, "ShrinkwrapModifierData");
prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
@@ -1396,10 +1396,10 @@ static void rna_def_modifier_fluidsim(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "FluidSimulationModifier", "Modifier");
- RNA_def_struct_ui_text(srna, "Fluid Simulation Modifier", "Fluid Simulation Modifier.");
+ RNA_def_struct_ui_text(srna, "Fluid Simulation Modifier", "Fluid simulation modifier.");
RNA_def_struct_sdna(srna, "FluidsimModifierData");
- prop= RNA_def_property(srna, "settings", PROP_POINTER, PROP_NONE);
+ prop= RNA_def_property(srna, "settings", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "fss");
RNA_def_property_struct_type(prop, "FluidSettings");
RNA_def_property_ui_text(prop, "Settings", "Settings for how this object is used in the fluid simulation.");
@@ -1411,12 +1411,12 @@ static void rna_def_modifier_mask(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem prop_mode_items[] = {
- {MOD_MASK_MODE_VGROUP, "MODE_VERTEXGROUP", "Vertex Group", ""},
- {MOD_MASK_MODE_ARM, "MODE_ARMATURE", "Armature", ""},
+ {MOD_MASK_MODE_VGROUP, "VERTEX_GROUP", "Vertex Group", ""},
+ {MOD_MASK_MODE_ARM, "ARMATURE", "Armature", ""},
{0, NULL, NULL, NULL}};
srna= RNA_def_struct(brna, "MaskModifier", "Modifier");
- RNA_def_struct_ui_text(srna, "Mask Modifier", "Mask Modifier.");
+ RNA_def_struct_ui_text(srna, "Mask Modifier", "Mask modifier to hide parts of the mesh.");
RNA_def_struct_sdna(srna, "MaskModifierData");
prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
@@ -1448,14 +1448,14 @@ static void rna_def_modifier_simpledeform(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem prop_mode_items[] = {
- {MOD_SIMPLEDEFORM_MODE_TWIST, "MODE_TWIST", "Twist", ""},
- {MOD_SIMPLEDEFORM_MODE_BEND, "MODE_BEND", "Bend", ""},
- {MOD_SIMPLEDEFORM_MODE_TAPER, "MODE_TAPER", "Taper", ""},
- {MOD_SIMPLEDEFORM_MODE_STRETCH, "MODE_STRETCH", "Stretch", ""},
+ {MOD_SIMPLEDEFORM_MODE_TWIST, "TWIST", "Twist", ""},
+ {MOD_SIMPLEDEFORM_MODE_BEND, "BEND", "Bend", ""},
+ {MOD_SIMPLEDEFORM_MODE_TAPER, "TAPER", "Taper", ""},
+ {MOD_SIMPLEDEFORM_MODE_STRETCH, "STRETCH", "Stretch", ""},
{0, NULL, NULL, NULL}};
srna= RNA_def_struct(brna, "SimpleDeformModifier", "Modifier");
- RNA_def_struct_ui_text(srna, "SimpleDeform Modifier", "SimpleDeform Modifier.");
+ RNA_def_struct_ui_text(srna, "SimpleDeform Modifier", "Simple deformation modifier to apply effects such as twisting and bending.");
RNA_def_struct_sdna(srna, "SimpleDeformModifierData");
prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
@@ -1469,8 +1469,7 @@ static void rna_def_modifier_simpledeform(BlenderRNA *brna)
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_SimpleDeformModifier_vgroup_set");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
- prop= RNA_def_property(srna, "Origin", PROP_POINTER, PROP_NONE);
- RNA_def_property_pointer_sdna(prop, NULL, "origin");
+ prop= RNA_def_property(srna, "origin", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "Object");
RNA_def_property_ui_text(prop, "Origin", "Origin of modifier space coordinates.");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
@@ -1544,7 +1543,7 @@ void RNA_def_modifier(BlenderRNA *brna)
/* data */
srna= RNA_def_struct(brna, "Modifier", NULL);
- RNA_def_struct_ui_text(srna , "Object Modifier", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna , "Modifier", "Modifier affecting the geometry data of an object.");
RNA_def_struct_refine_func(srna, "rna_Modifier_refine");
RNA_def_struct_sdna(srna, "ModifierData");
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index 60783337de4..508b8fd1fef 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -51,29 +51,29 @@ static void rna_def_node(BlenderRNA *brna)
{SH_NODE_MATERIAL, "MATERIAL", "Material", ""},
{SH_NODE_RGB, "RGB", "RGB", ""},
{SH_NODE_VALUE, "VALUE", "Value", ""},
- {SH_NODE_MIX_RGB, "MIXRGB", "Mix", ""},
- {SH_NODE_VALTORGB, "VALTORGB", "Value to RGB", ""},
- {SH_NODE_RGBTOBW, "RGBTOBW", "RGB to BW", ""},
+ {SH_NODE_MIX_RGB, "MIX_RGB", "Mix RGB", ""},
+ {SH_NODE_VALTORGB, "VALUE_TO_RGB", "Value to RGB", ""},
+ {SH_NODE_RGBTOBW, "RGB_TO_BW", "RGB to BW", ""},
{SH_NODE_TEXTURE, "TEXTURE", "Texture", ""},
{SH_NODE_NORMAL, "NORMAL", "Normal", ""},
{SH_NODE_GEOMETRY, "GEOMETRY", "Geometry", ""},
{SH_NODE_MAPPING, "MAPPING", "Mapping", ""},
- {SH_NODE_CURVE_VEC, "CURVEVEC", "Vector Curves", ""},
- {SH_NODE_CURVE_RGB, "CURVERGB", "RGB Curves", ""},
+ {SH_NODE_CURVE_VEC, "VECTOR_CURVES", "Vector Curves", ""},
+ {SH_NODE_CURVE_RGB, "RGB_CURVES", "RGB Curves", ""},
{SH_NODE_CAMERA, "CAMERA", "Camera", ""},
{SH_NODE_MATH, "MATH", "Math", ""},
- {SH_NODE_VECT_MATH, "VECTMATH", "Vector Math", ""},
+ {SH_NODE_VECT_MATH, "VECTOR_MATH", "Vector Math", ""},
{SH_NODE_SQUEEZE, "SQUEEZE", "Squeeze", ""},
- {SH_NODE_MATERIAL_EXT, "MATEXT", "Material Extended", ""},
+ {SH_NODE_MATERIAL_EXT, "MATERIAL_EXTENDED", "Material Extended", ""},
{SH_NODE_INVERT, "INVERT", "Invert", ""},
- {SH_NODE_SEPRGB, "SEPRGB", "Seperate RGB", ""},
- {SH_NODE_COMBRGB, "COMBRGB", "Combine RGB", ""},
- {SH_NODE_HUE_SAT, "HUESAT", "Hue/Saturation", ""},
- {NODE_DYNAMIC, "DYNAMIC", "Scripted Node", ""},
+ {SH_NODE_SEPRGB, "SEPARATE_RGB", "Seperate RGB", ""},
+ {SH_NODE_COMBRGB, "COMBINE_RGB", "Combine RGB", ""},
+ {SH_NODE_HUE_SAT, "HUE_SATURATION", "Hue/Saturation", ""},
+ {NODE_DYNAMIC, "SCRIPT", "Script", ""},
{0, NULL, NULL, NULL}};
srna= RNA_def_struct(brna, "Node", NULL);
- RNA_def_struct_ui_text(srna, "Node", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Node", "Node in a node tree.");
RNA_def_struct_sdna(srna, "bNode");
prop= RNA_def_property(srna, "location", PROP_FLOAT, PROP_VECTOR);
@@ -98,7 +98,7 @@ void RNA_def_nodetree(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "NodeTree", "ID");
- RNA_def_struct_ui_text(srna, "Node Tree", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Node Tree", "Node tree consisting of linked nodes used for materials, textures and compositing.");
RNA_def_struct_sdna(srna, "bNodeTree");
prop= RNA_def_property(srna, "nodes", PROP_COLLECTION, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index 36f1703b853..d3573cad76c 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -214,7 +214,7 @@ static void rna_Object_layer_set(PointerRNA *ptr, int index, int value)
}
}
-static void rna_ObjectGameSettings_state_set(PointerRNA *ptr, int index, int value)
+static void rna_GameObjectSettings_state_set(PointerRNA *ptr, int index, int value)
{
Object *ob= (Object*)ptr->data;
@@ -247,7 +247,7 @@ static void rna_def_vertex_group(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Index", "Index number of the vertex group.");
}
-static void rna_def_object_game_settings(BlenderRNA *brna, StructRNA *parent)
+static void rna_def_object_game_settings(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
@@ -270,24 +270,24 @@ static void rna_def_object_game_settings(BlenderRNA *brna, StructRNA *parent)
//{OB_DYN_MESH, "DYNAMIC_MESH", "Dynamic Mesh", ""},
{0, NULL, NULL, NULL}};
- srna= RNA_def_struct(brna, "ObjectGameSettings", NULL);
+ srna= RNA_def_struct(brna, "GameObjectSettings", NULL);
RNA_def_struct_sdna(srna, "Object");
- RNA_def_struct_parent(srna, parent);
- RNA_def_struct_ui_text(srna, "Object Game Settings", "Game engine related settings for the object.");
+ RNA_def_struct_nested(brna, srna, "Object");
+ RNA_def_struct_ui_text(srna, "Game Object Settings", "Game engine related settings for the object.");
/* logic */
prop= RNA_def_property(srna, "sensors", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "Sensor");
- RNA_def_property_ui_text(prop, "Sensors", "DOC_BROKEN");
+ RNA_def_property_ui_text(prop, "Sensors", "Game engine sensor to detect events.");
prop= RNA_def_property(srna, "controllers", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "Controller");
- RNA_def_property_ui_text(prop, "Controllers", "DOC_BROKEN");
+ RNA_def_property_ui_text(prop, "Controllers", "Game engine controllers to process events, connecting sensor to actuators.");
prop= RNA_def_property(srna, "actuators", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "Actuator");
- RNA_def_property_ui_text(prop, "Actuators", "DOC_BROKEN");
+ RNA_def_property_ui_text(prop, "Actuators", "Game engine actuators to act on events.");
prop= RNA_def_property(srna, "properties", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "prop", NULL);
@@ -396,7 +396,7 @@ static void rna_def_object_game_settings(BlenderRNA *brna, StructRNA *parent)
RNA_def_property_boolean_sdna(prop, NULL, "state", 1);
RNA_def_property_array(prop, 30);
RNA_def_property_ui_text(prop, "State", "State determining which controllers are displayed.");
- RNA_def_property_boolean_funcs(prop, NULL, "rna_ObjectGameSettings_state_set");
+ RNA_def_property_boolean_funcs(prop, NULL, "rna_GameObjectSettings_state_set");
prop= RNA_def_property(srna, "initial_state", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "init_state", 1);
@@ -471,7 +471,7 @@ static StructRNA *rna_def_object(BlenderRNA *brna)
{0, NULL, NULL, NULL}};
srna= RNA_def_struct(brna, "Object", "ID");
- RNA_def_struct_ui_text(srna, "Object", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Object", "Object datablock defining an object in a scene..");
prop= RNA_def_property(srna, "data", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "ID");
@@ -616,12 +616,12 @@ static StructRNA *rna_def_object(BlenderRNA *brna)
prop= RNA_def_property(srna, "modifiers", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "Modifier");
- RNA_def_property_ui_text(prop, "Modifiers", "DOC_BROKEN");
+ RNA_def_property_ui_text(prop, "Modifiers", "Modifiers affecting the geometric data of the Object.");
/* game engine */
- prop= RNA_def_property(srna, "game", PROP_POINTER, PROP_NONE);
- RNA_def_property_struct_type(prop, "ObjectGameSettings");
+ prop= RNA_def_property(srna, "game", PROP_POINTER, PROP_NEVER_NULL);
+ RNA_def_property_struct_type(prop, "GameObjectSettings");
RNA_def_property_pointer_funcs(prop, "rna_Object_game_settings_get", NULL, NULL);
RNA_def_property_ui_text(prop, "Game Settings", "Game engine related settings for the object.");
@@ -807,14 +807,14 @@ static StructRNA *rna_def_object(BlenderRNA *brna)
/* script link */
- prop= RNA_def_property(srna, "script_link", PROP_POINTER, PROP_NONE);
+ prop= RNA_def_property(srna, "script_link", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "scriptlink");
RNA_def_property_flag(prop, PROP_NOT_EDITABLE);
RNA_def_property_ui_text(prop, "Script Link", "Scripts linked to this object.");
/* drawing */
- prop= RNA_def_property(srna, "maximum_draw_type", PROP_ENUM, PROP_NONE);
+ prop= RNA_def_property(srna, "max_draw_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "dt");
RNA_def_property_enum_items(prop, drawtype_items);
RNA_def_property_ui_text(prop, "Maximum Draw Type", "Maximum draw type to display object with in viewport.");
@@ -919,10 +919,8 @@ static StructRNA *rna_def_object(BlenderRNA *brna)
void RNA_def_object(BlenderRNA *brna)
{
- StructRNA *srna;
-
- srna= rna_def_object(brna);
- rna_def_object_game_settings(brna, srna);
+ rna_def_object(brna);
+ rna_def_object_game_settings(brna);
rna_def_vertex_group(brna);
}
diff --git a/source/blender/makesrna/intern/rna_object_force.c b/source/blender/makesrna/intern/rna_object_force.c
index 5ae919d2ffd..22521528d68 100644
--- a/source/blender/makesrna/intern/rna_object_force.c
+++ b/source/blender/makesrna/intern/rna_object_force.c
@@ -50,7 +50,7 @@ static void rna_def_collision(BlenderRNA *brna)
srna= RNA_def_struct(brna, "CollisionSettings", NULL);
RNA_def_struct_sdna(srna, "PartDeflect");
- RNA_def_struct_ui_text(srna, "Collision Settings", "Collision settings for physics simulation.");
+ RNA_def_struct_ui_text(srna, "Collision Settings", "Collision settings for object in physics simulation.");
}
static void rna_def_field(BlenderRNA *brna)
@@ -59,7 +59,7 @@ static void rna_def_field(BlenderRNA *brna)
srna= RNA_def_struct(brna, "FieldSettings", NULL);
RNA_def_struct_sdna(srna, "PartDeflect");
- RNA_def_struct_ui_text(srna, "Field Settings", "Field settings for physics simulation.");
+ RNA_def_struct_ui_text(srna, "Field Settings", "Field settings for an object in physics simulation.");
}
static void rna_def_game_softbody(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_packedfile.c b/source/blender/makesrna/intern/rna_packedfile.c
index 76095ac9923..5645765ed83 100644
--- a/source/blender/makesrna/intern/rna_packedfile.c
+++ b/source/blender/makesrna/intern/rna_packedfile.c
@@ -40,11 +40,11 @@ void RNA_def_packedfile(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "PackedFile", NULL);
- RNA_def_struct_ui_text(srna, "Packed File", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Packed File", "External file packed into the .blend file.");
prop= RNA_def_property(srna, "size", PROP_INT, PROP_NONE);
RNA_def_property_flag(prop, PROP_NOT_EDITABLE);
- RNA_def_property_ui_text(prop, "Size", "Size of Packed File.");
+ RNA_def_property_ui_text(prop, "Size", "Size of packed file in bytes.");
}
diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c
index 25e3df40111..c893ac028be 100644
--- a/source/blender/makesrna/intern/rna_particle.c
+++ b/source/blender/makesrna/intern/rna_particle.c
@@ -51,7 +51,7 @@ static void rna_def_particlesystem(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ParticleSystem", NULL);
RNA_def_struct_ui_text(srna, "Particle System", "Particle system in an object.");
- prop= RNA_def_property(srna, "settings", PROP_POINTER, PROP_NONE);
+ prop= RNA_def_property(srna, "settings", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "part");
RNA_def_property_ui_text(prop, "Settings", "Particle system settings.");
}
diff --git a/source/blender/makesrna/intern/rna_pose.c b/source/blender/makesrna/intern/rna_pose.c
index a5c8f698085..c1561987378 100755
--- a/source/blender/makesrna/intern/rna_pose.c
+++ b/source/blender/makesrna/intern/rna_pose.c
@@ -49,7 +49,7 @@ static void rna_def_pose_channel(BlenderRNA *brna)
srna= RNA_def_struct(brna, "PoseChannel", NULL);
RNA_def_struct_sdna(srna, "bPoseChannel");
- RNA_def_struct_ui_text(srna, "Pose Channel", "Member of the 'Pose' type.");
+ RNA_def_struct_ui_text(srna, "Pose Channel", "Channel defining pose data for a bone in a Pose.");
prop= RNA_def_property(srna, "constraints", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "constraints", NULL);
@@ -108,7 +108,7 @@ static void rna_def_pose_channel(BlenderRNA *brna)
RNA_def_property_flag(prop, PROP_NOT_EDITABLE);
RNA_def_property_ui_text(prop, "Bone Paths Calculation End Frame", "End frame of range of frames to use for Bone Path calculations.");
- prop= RNA_def_property(srna, "bone", PROP_POINTER, PROP_NONE);
+ prop= RNA_def_property(srna, "bone", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "Bone");
RNA_def_property_flag(prop, PROP_NOT_EDITABLE);
RNA_def_property_ui_text(prop, "Bone", "Bone associated with this Pose Channel.");
@@ -148,12 +148,12 @@ static void rna_def_pose_channel(BlenderRNA *brna)
RNA_def_property_flag(prop, PROP_NOT_EDITABLE);
RNA_def_property_ui_text(prop, "Pose Tail Position", "Location of tail of the channel's bone.");
- prop= RNA_def_property(srna, "ik_minimums", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "ik_min_limits", PROP_FLOAT, PROP_VECTOR);
RNA_def_property_float_sdna(prop, NULL, "limitmin");
RNA_def_property_range(prop, -180.0f, 0.0f);
RNA_def_property_ui_text(prop, "IK Minimum Limits", "Minimum angles for IK Limit");
- prop= RNA_def_property(srna, "ik_maximum", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "ik_max_limits", PROP_FLOAT, PROP_VECTOR);
RNA_def_property_float_sdna(prop, NULL, "limitmax");
RNA_def_property_range(prop, 0.0f, 180.0f);
RNA_def_property_ui_text(prop, "IK Maximum Limits", "Maximum angles for IK Limit");
diff --git a/source/blender/makesrna/intern/rna_property.c b/source/blender/makesrna/intern/rna_property.c
index 12fdb4a9508..21d8958b665 100644
--- a/source/blender/makesrna/intern/rna_property.c
+++ b/source/blender/makesrna/intern/rna_property.c
@@ -47,7 +47,7 @@ static StructRNA* rna_GameProperty_refine(struct PointerRNA *ptr)
case GPROP_STRING:
return &RNA_GameStringProperty;
case GPROP_TIME:
- return &RNA_GameTimeProperty;
+ return &RNA_GameTimerProperty;
default:
return &RNA_GameProperty;
}
@@ -79,12 +79,12 @@ void RNA_def_gameproperty(BlenderRNA *brna)
{GPROP_INT, "INT", "Integer", ""},
{GPROP_FLOAT, "FLOAT", "Float", ""},
{GPROP_STRING, "STRING", "String", ""},
- {GPROP_TIME, "TIME", "Time", ""},
+ {GPROP_TIME, "TIMER", "Timer", ""},
{0, NULL, NULL, NULL}};
/* Base Struct for GameProperty */
srna= RNA_def_struct(brna, "GameProperty", NULL);
- RNA_def_struct_ui_text(srna , "Game Property", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna , "Game Property", "Game engine user defined object property.");
RNA_def_struct_sdna(srna, "bProperty");
RNA_def_struct_refine_func(srna, "rna_GameProperty_refine");
@@ -104,16 +104,16 @@ void RNA_def_gameproperty(BlenderRNA *brna)
/* GameBooleanProperty */
srna= RNA_def_struct(brna, "GameBooleanProperty", "GameProperty");
- RNA_def_struct_ui_text(srna , "Game Boolean Property", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna , "Game Boolean Property", "Game engine user defined boolean property.");
RNA_def_struct_sdna(srna, "bProperty");
- prop= RNA_def_property(srna, "boolean_value", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "value", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "data", 1);
RNA_def_property_ui_text(prop, "Value", "Property value.");
/* GameIntProperty */
srna= RNA_def_struct(brna, "GameIntProperty", "GameProperty");
- RNA_def_struct_ui_text(srna , "Game Integer Property", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna , "Game Integer Property", "Game engine user defined integer number property.");
RNA_def_struct_sdna(srna, "bProperty");
prop= RNA_def_property(srna, "value", PROP_INT, PROP_NONE);
@@ -123,7 +123,7 @@ void RNA_def_gameproperty(BlenderRNA *brna)
/* GameFloatProperty */
srna= RNA_def_struct(brna, "GameFloatProperty", "GameProperty");
- RNA_def_struct_ui_text(srna, "Game Float Property", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Game Float Property", "Game engine user defined floating pointer number property.");
RNA_def_struct_sdna(srna, "bProperty");
prop= RNA_def_property(srna, "value", PROP_FLOAT, PROP_NONE);
@@ -133,8 +133,8 @@ void RNA_def_gameproperty(BlenderRNA *brna)
RNA_def_property_float_funcs(prop, "rna_GameFloatProperty_value_get", "rna_GameFloatProperty_value_set", NULL);
/* GameTimerProperty */
- srna= RNA_def_struct(brna, "GameTimeProperty", "GameProperty");
- RNA_def_struct_ui_text(srna, "Game Time Property", "DOC_BROKEN");
+ srna= RNA_def_struct(brna, "GameTimerProperty", "GameProperty");
+ RNA_def_struct_ui_text(srna, "Game Timer Property", "Game engine user defined timer property.");
RNA_def_struct_sdna(srna, "bProperty");
prop= RNA_def_property(srna, "value", PROP_FLOAT, PROP_NONE);
@@ -145,7 +145,7 @@ void RNA_def_gameproperty(BlenderRNA *brna)
/* GameStringProperty */
srna= RNA_def_struct(brna, "GameStringProperty", "GameProperty");
- RNA_def_struct_ui_text(srna, "Game String Property", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Game String Property", "Game engine user defined text string property.");
RNA_def_struct_sdna(srna, "bProperty");
prop= RNA_def_property(srna, "value", PROP_STRING, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_radio.c b/source/blender/makesrna/intern/rna_radio.c
index b8f971ad55c..2668a17f979 100644
--- a/source/blender/makesrna/intern/rna_radio.c
+++ b/source/blender/makesrna/intern/rna_radio.c
@@ -46,7 +46,7 @@ void RNA_def_radio(BlenderRNA *brna)
{0, NULL, NULL, NULL}};
srna= RNA_def_struct(brna, "Radiosity", NULL);
- RNA_def_struct_ui_text(srna, "Radiosity", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Radiosity", "Settings for radiosity simulation of indirect diffuse lighting.");
RNA_def_struct_sdna(srna, "Radio");
/* Enums */
diff --git a/source/blender/makesrna/intern/rna_rna.c b/source/blender/makesrna/intern/rna_rna.c
index 60faf0c8e07..5b0c1372c2d 100644
--- a/source/blender/makesrna/intern/rna_rna.c
+++ b/source/blender/makesrna/intern/rna_rna.c
@@ -66,12 +66,12 @@ static int rna_Struct_name_length(PointerRNA *ptr)
static void *rna_Struct_base_get(PointerRNA *ptr)
{
- return ((StructRNA*)ptr->data)->from;
+ return ((StructRNA*)ptr->data)->base;
}
-static void *rna_Struct_parent_get(PointerRNA *ptr)
+static void *rna_Struct_nested_get(PointerRNA *ptr)
{
- return ((StructRNA*)ptr->data)->parent;
+ return ((StructRNA*)ptr->data)->nested;
}
static void *rna_Struct_name_property_get(PointerRNA *ptr)
@@ -411,7 +411,7 @@ static void rna_def_struct(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "Struct", NULL);
- RNA_def_struct_ui_text(srna, "Struct Definition", "RNA Structure definition");
+ RNA_def_struct_ui_text(srna, "Struct Definition", "RNA structure definition");
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_flag(prop, PROP_NOT_EDITABLE);
@@ -435,11 +435,11 @@ static void rna_def_struct(BlenderRNA *brna)
RNA_def_property_pointer_funcs(prop, "rna_Struct_base_get", NULL, NULL);
RNA_def_property_ui_text(prop, "Base", "Struct definition this is derived from.");
- prop= RNA_def_property(srna, "parent", PROP_POINTER, PROP_NONE);
+ prop= RNA_def_property(srna, "nested", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NOT_EDITABLE);
RNA_def_property_struct_type(prop, "Struct");
- RNA_def_property_pointer_funcs(prop, "rna_Struct_parent_get", NULL, NULL);
- RNA_def_property_ui_text(prop, "Parent", "Parent struct, used only for nested structs.");
+ RNA_def_property_pointer_funcs(prop, "rna_Struct_nested_get", NULL, NULL);
+ RNA_def_property_ui_text(prop, "Nested", "Struct in which this struct is always nested, and to which it logically belongs.");
prop= RNA_def_property(srna, "name_property", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NOT_EDITABLE);
@@ -470,16 +470,17 @@ static void rna_def_property(BlenderRNA *brna)
static EnumPropertyItem subtype_items[] = {
{PROP_NONE, "NONE", "None", ""},
{PROP_UNSIGNED, "UNSIGNED", "Unsigned Number", ""},
- {PROP_FILEPATH, "FILEPATH", "File Path", ""},
- {PROP_DIRPATH, "DIRPATH", "Directory Path", ""},
+ {PROP_FILEPATH, "FILE_PATH", "File Path", ""},
+ {PROP_DIRPATH, "DIRECTORY_PATH", "Directory Path", ""},
{PROP_COLOR, "COLOR", "Color", ""},
{PROP_VECTOR, "VECTOR", "Vector", ""},
{PROP_MATRIX, "MATRIX", "Matrix", ""},
{PROP_ROTATION, "ROTATION", "Rotation", ""},
+ {PROP_NEVER_NULL, "NEVER_NULL", "Never Null", ""},
{0, NULL, NULL, NULL}};
srna= RNA_def_struct(brna, "Property", NULL);
- RNA_def_struct_ui_text(srna, "Property Definition", "DOC_BROKEN2");
+ RNA_def_struct_ui_text(srna, "Property Definition", "RNA property definition.");
RNA_def_struct_refine_func(srna, "rna_Property_refine");
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
@@ -509,7 +510,7 @@ static void rna_def_property(BlenderRNA *brna)
RNA_def_property_enum_items(prop, subtype_items);
RNA_def_property_enum_funcs(prop, "rna_Property_subtype_get", NULL);
RNA_def_property_ui_text(prop, "Subtype", "Semantic interpretation of the property.");
-
+
prop= RNA_def_property(srna, "editable", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_flag(prop, PROP_NOT_EDITABLE);
RNA_def_property_boolean_funcs(prop, "rna_Property_editable_get", NULL);
@@ -587,7 +588,7 @@ static void rna_def_enum_property(BlenderRNA *brna, StructRNA *srna)
RNA_def_property_ui_text(prop, "Items", "Possible values for the property.");
srna= RNA_def_struct(brna, "EnumPropertyItem", NULL);
- RNA_def_struct_ui_text(srna, "Enum Item Definition", "DOC_BROKEN3");
+ RNA_def_struct_ui_text(srna, "Enum Item Definition", "Definition of a choice in an RNA enum property.");
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_flag(prop, PROP_NOT_EDITABLE);
@@ -633,42 +634,42 @@ void RNA_def_rna(BlenderRNA *brna)
/* BooleanProperty */
srna= RNA_def_struct(brna, "BooleanProperty", "Property");
- RNA_def_struct_ui_text(srna, "Boolean Definition", "DOC_BROKEN4");
+ RNA_def_struct_ui_text(srna, "Boolean Definition", "RNA boolean property definition.");
rna_def_number_property(srna, PROP_BOOLEAN);
/* IntProperty */
srna= RNA_def_struct(brna, "IntProperty", "Property");
- RNA_def_struct_ui_text(srna, "Int Definition", "DOC_BROKEN5");
+ RNA_def_struct_ui_text(srna, "Int Definition", "RNA integer number property definition.");
rna_def_number_property(srna, PROP_INT);
/* FloatProperty */
srna= RNA_def_struct(brna, "FloatProperty", "Property");
- RNA_def_struct_ui_text(srna, "Float Definition", "DOC_BROKEN6");
+ RNA_def_struct_ui_text(srna, "Float Definition", "RNA floating pointer number property definition.");
rna_def_number_property(srna, PROP_FLOAT);
/* StringProperty */
srna= RNA_def_struct(brna, "StringProperty", "Property");
- RNA_def_struct_ui_text(srna, "String Definition", "DOC_BROKEN7");
+ RNA_def_struct_ui_text(srna, "String Definition", "RNA text string property definition.");
rna_def_string_property(srna);
/* EnumProperty */
srna= RNA_def_struct(brna, "EnumProperty", "Property");
- RNA_def_struct_ui_text(srna, "Enum Definition", "DOC_BROKEN8");
+ RNA_def_struct_ui_text(srna, "Enum Definition", "RNA enumeration property definition, to choose from a number of predefined options.");
rna_def_enum_property(brna, srna);
/* PointerProperty */
srna= RNA_def_struct(brna, "PointerProperty", "Property");
- RNA_def_struct_ui_text(srna, "Pointer Definition", "DOC_BROKEN9");
+ RNA_def_struct_ui_text(srna, "Pointer Definition", "RNA pointer property to point to another RNA struct.");
rna_def_pointer_property(srna, PROP_POINTER);
/* CollectionProperty */
srna= RNA_def_struct(brna, "CollectionProperty", "Property");
- RNA_def_struct_ui_text(srna, "Collection Definition", "DOC_BROKEN10");
+ RNA_def_struct_ui_text(srna, "Collection Definition", "RNA collection property to define lists, arrays and mappings.");
rna_def_pointer_property(srna, PROP_COLLECTION);
/* Blender RNA */
srna= RNA_def_struct(brna, "BlenderRNA", NULL);
- RNA_def_struct_ui_text(srna, "Blender RNA", "RNA Structures");
+ RNA_def_struct_ui_text(srna, "Blender RNA", "Blender RNA structure definitions.");
prop= RNA_def_property(srna, "structs", PROP_COLLECTION, PROP_NONE);
RNA_def_property_flag(prop, PROP_NOT_EDITABLE);
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index f87636bf4e1..58dad710d07 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -99,7 +99,7 @@ void RNA_def_scene(BlenderRNA *brna)
{0, NULL, NULL, NULL}};
srna= RNA_def_struct(brna, "Scene", "ID");
- RNA_def_struct_ui_text(srna, "Scene", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Scene", "Scene consisting objects and defining time and render related settings.");
prop= RNA_def_property(srna, "camera", PROP_POINTER, PROP_NONE);
RNA_def_property_ui_text(prop, "Active Camera", "Active camera used for rendering the scene.");
diff --git a/source/blender/makesrna/intern/rna_screen.c b/source/blender/makesrna/intern/rna_screen.c
index 6bc85f7e6c3..d56230bf2a5 100644
--- a/source/blender/makesrna/intern/rna_screen.c
+++ b/source/blender/makesrna/intern/rna_screen.c
@@ -34,25 +34,12 @@
#ifdef RNA_RUNTIME
-
static void *rna_Screen_scene_get(PointerRNA *ptr)
{
bScreen *sc= (bScreen*)ptr->data;
return sc->scene;
}
-static void rna_Screen_verts_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
-{
- bScreen *scr= (bScreen*)ptr->data;
- rna_iterator_listbase_begin(iter, &scr->vertbase, NULL);
-}
-
-static void rna_Screen_edges_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
-{
- bScreen *scr= (bScreen*)ptr->data;
- rna_iterator_listbase_begin(iter, &scr->edgebase, NULL);
-}
-
static void rna_Screen_areas_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
bScreen *scr= (bScreen*)ptr->data;
@@ -61,85 +48,13 @@ static void rna_Screen_areas_begin(CollectionPropertyIterator *iter, PointerRNA
#else
-static void RNA_def_vectypes(BlenderRNA *brna)
-{
- StructRNA *srna;
-
- srna= RNA_def_struct(brna, "vec2s", NULL);
- RNA_def_struct_ui_text(srna, "vec2s", "DOC_BROKEN");
- RNA_def_struct_sdna(srna, "vec2s");
-}
-
-static void RNA_def_scrvert(BlenderRNA *brna)
-{
- StructRNA *srna;
- PropertyRNA *prop;
-
- srna= RNA_def_struct(brna, "ScrVert", NULL);
- RNA_def_struct_ui_text(srna, "Screen Vertex", "DOC_BROKEN");
- RNA_def_struct_sdna(srna, "ScrVert");
-
- prop= RNA_def_property(srna, "Location", PROP_INT, PROP_VECTOR);
- RNA_def_property_flag(prop, PROP_NOT_EDITABLE);
- RNA_def_property_int_sdna(prop, NULL, "vec.x");
- RNA_def_property_array(prop, 2);
- RNA_def_property_ui_text(prop, "Location", "Screen Vert Location");
-}
-
-static void RNA_def_scredge(BlenderRNA *brna)
-{
- StructRNA *srna;
- PropertyRNA *prop;
-
- srna= RNA_def_struct(brna, "ScrEdge", NULL);
- RNA_def_struct_ui_text(srna, "Screen Edge", "DOC_BROKEN");
- RNA_def_struct_sdna(srna, "ScrEdge");
-
- prop= RNA_def_property(srna, "start", PROP_INT, PROP_VECTOR);
- RNA_def_property_flag(prop, PROP_NOT_EDITABLE);
- RNA_def_property_int_sdna(prop, NULL, "v1->vec.x");
- RNA_def_property_array(prop, 2);
- RNA_def_property_ui_text(prop, "Edge Start", "Screen Edge Start");
-
- prop= RNA_def_property(srna, "end", PROP_INT, PROP_VECTOR);
- RNA_def_property_flag(prop, PROP_NOT_EDITABLE);
- RNA_def_property_int_sdna(prop, NULL, "v2->vec.x");
- RNA_def_property_array(prop, 2);
- RNA_def_property_ui_text(prop, "Edge End", "Screen Edge End");
-}
-
static void RNA_def_scrarea(BlenderRNA *brna)
{
StructRNA *srna;
- PropertyRNA *prop;
- srna= RNA_def_struct(brna, "ScrArea", NULL);
- RNA_def_struct_ui_text(srna, "Area", "DOC_BROKEN");
+ srna= RNA_def_struct(brna, "Area", NULL);
+ RNA_def_struct_ui_text(srna, "Area", "Area in a subdivided screen, containing an editor.");
RNA_def_struct_sdna(srna, "ScrArea");
-
- prop= RNA_def_property(srna, "v1", PROP_INT, PROP_VECTOR);
- RNA_def_property_flag(prop, PROP_NOT_EDITABLE);
- RNA_def_property_int_sdna(prop, NULL, "v1->vec.x");
- RNA_def_property_array(prop, 2);
- RNA_def_property_ui_text(prop, "Area v1", "Screen Area v1");
-
- prop= RNA_def_property(srna, "v2", PROP_INT, PROP_VECTOR);
- RNA_def_property_flag(prop, PROP_NOT_EDITABLE);
- RNA_def_property_int_sdna(prop, NULL, "v2->vec.x");
- RNA_def_property_array(prop, 2);
- RNA_def_property_ui_text(prop, "Area v2", "Screen Area v2");
-
- prop= RNA_def_property(srna, "v3", PROP_INT, PROP_VECTOR);
- RNA_def_property_flag(prop, PROP_NOT_EDITABLE);
- RNA_def_property_int_sdna(prop, NULL, "v3->vec.x");
- RNA_def_property_array(prop, 2);
- RNA_def_property_ui_text(prop, "Area v3", "Screen Area v3");
-
- prop= RNA_def_property(srna, "v4", PROP_INT, PROP_VECTOR);
- RNA_def_property_flag(prop, PROP_NOT_EDITABLE);
- RNA_def_property_int_sdna(prop, NULL, "v4->vec.x");
- RNA_def_property_array(prop, 2);
- RNA_def_property_ui_text(prop, "Area v4", "Screen Area v4");
}
static void RNA_def_panel(BlenderRNA *brna)
@@ -147,7 +62,7 @@ static void RNA_def_panel(BlenderRNA *brna)
StructRNA *srna;
srna= RNA_def_struct(brna, "Panel", NULL);
- RNA_def_struct_ui_text(srna, "Panel", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Panel", "Buttons panel.");
RNA_def_struct_sdna(srna, "Panel");
}
@@ -156,7 +71,7 @@ static void RNA_def_region(BlenderRNA *brna)
StructRNA *srna;
srna= RNA_def_struct(brna, "Region", NULL);
- RNA_def_struct_ui_text(srna, "Area Region", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Region", "Region in a subdivid screen area.");
RNA_def_struct_sdna(srna, "ARegion");
}
@@ -166,30 +81,18 @@ static void RNA_def_bscreen(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "Screen", "ID");
- RNA_def_struct_ui_text(srna, "Screen", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Screen", "Screen datablock, defining the layout of areas in a window.");
RNA_def_struct_sdna(srna, "bScreen");
- prop= RNA_def_property(srna, "scene", PROP_POINTER, PROP_NONE);
+ prop= RNA_def_property(srna, "scene", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_flag(prop, PROP_NOT_EDITABLE);
RNA_def_property_struct_type(prop, "Scene");
RNA_def_property_pointer_funcs(prop, "rna_Screen_scene_get", NULL, NULL);
- RNA_def_property_ui_text(prop, "Scene", "Active scene.");
-
- prop= RNA_def_property(srna, "vertbase", PROP_COLLECTION, PROP_NONE);
- RNA_def_property_flag(prop, PROP_NOT_EDITABLE);
- RNA_def_property_struct_type(prop, "ScrVert");
- RNA_def_property_collection_funcs(prop, "rna_Screen_verts_begin", "rna_iterator_listbase_next", "rna_iterator_listbase_end", "rna_iterator_listbase_get", 0, 0, 0, 0);
- RNA_def_property_ui_text(prop, "Verts", "All Screen Verts");
-
- prop= RNA_def_property(srna, "edgebase", PROP_COLLECTION, PROP_NONE);
- RNA_def_property_flag(prop, PROP_NOT_EDITABLE);
- RNA_def_property_struct_type(prop, "ScrEdge");
- RNA_def_property_collection_funcs(prop, "rna_Screen_edges_begin", "rna_iterator_listbase_next", "rna_iterator_listbase_end", "rna_iterator_listbase_get", 0, 0, 0, 0);
- RNA_def_property_ui_text(prop, "Edges", "All Screen Edges");
+ RNA_def_property_ui_text(prop, "Scene", "Active scene to be edited in the screen.");
- prop= RNA_def_property(srna, "areabase", PROP_COLLECTION, PROP_NONE);
+ prop= RNA_def_property(srna, "areas", PROP_COLLECTION, PROP_NONE);
RNA_def_property_flag(prop, PROP_NOT_EDITABLE);
- RNA_def_property_struct_type(prop, "ScrArea");
+ RNA_def_property_struct_type(prop, "Area");
RNA_def_property_collection_funcs(prop, "rna_Screen_areas_begin", "rna_iterator_listbase_next", "rna_iterator_listbase_end", "rna_iterator_listbase_get", 0, 0, 0, 0);
RNA_def_property_ui_text(prop, "Areas", "All Screen Areas");
}
@@ -197,9 +100,6 @@ static void RNA_def_bscreen(BlenderRNA *brna)
void RNA_def_screen(BlenderRNA *brna)
{
RNA_def_bscreen(brna);
- RNA_def_vectypes(brna);
- RNA_def_scrvert(brna);
- RNA_def_scredge(brna);
RNA_def_scrarea(brna);
RNA_def_panel(brna);
RNA_def_region(brna);
diff --git a/source/blender/makesrna/intern/rna_scriptlink.c b/source/blender/makesrna/intern/rna_scriptlink.c
index d0db7bf1444..f073065f6bc 100644
--- a/source/blender/makesrna/intern/rna_scriptlink.c
+++ b/source/blender/makesrna/intern/rna_scriptlink.c
@@ -40,7 +40,7 @@ void RNA_def_scriptlink(BlenderRNA *brna)
StructRNA *srna;
srna= RNA_def_struct(brna, "ScriptLink", NULL);
- RNA_def_struct_ui_text(srna, "Script Link", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Script Link", "Scripts linked to a datablock, to be executed on changes to the datablock.");
}
#endif
diff --git a/source/blender/makesrna/intern/rna_sensor.c b/source/blender/makesrna/intern/rna_sensor.c
index 1db3abe12ec..b8a1a1ade78 100644
--- a/source/blender/makesrna/intern/rna_sensor.c
+++ b/source/blender/makesrna/intern/rna_sensor.c
@@ -95,7 +95,7 @@ void rna_def_sensor(BlenderRNA *brna)
{0, NULL, NULL, NULL}};
srna= RNA_def_struct(brna, "Sensor", NULL);
- RNA_def_struct_ui_text(srna, "Sensor", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Sensor", "Game engine logic brick to detect events.");
RNA_def_struct_sdna(srna, "bSensor");
RNA_def_struct_refine_func(srna, "rna_Sensor_refine");
@@ -123,7 +123,8 @@ void rna_def_sensor(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "pulse", SENS_NEG_PULSE_MODE);
RNA_def_property_ui_text(prop, "Pulse False Level", "Activate FALSE level triggering (pulse mode).");
- prop= RNA_def_property(srna, "freq", PROP_INT, PROP_NONE);
+ prop= RNA_def_property(srna, "frequence", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "freq");
RNA_def_property_ui_text(prop, "Frequency", "Delay between repeated pulses(in logic tics, 0=no delay).");
RNA_def_property_range(prop, 0, 10000);
}
@@ -132,7 +133,7 @@ void rna_def_always_sensor(BlenderRNA *brna)
{
StructRNA *srna;
srna= RNA_def_struct(brna, "AlwaysSensor", "Sensor");
- RNA_def_struct_ui_text(srna, "Always Sensor", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Always Sensor", "Sensor to generate continuous pulses.");
}
void rna_def_near_sensor(BlenderRNA *brna)
@@ -141,7 +142,7 @@ void rna_def_near_sensor(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "NearSensor", "Sensor");
- RNA_def_struct_ui_text(srna , "Near Sensor", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna , "Near Sensor", "Sensor to detect nearby objects.");
RNA_def_struct_sdna_from(srna, "bNearSensor", "data");
prop= RNA_def_property(srna, "property", PROP_STRING, PROP_NONE);
@@ -176,7 +177,7 @@ void rna_def_mouse_sensor(BlenderRNA *brna)
{0, NULL, NULL, NULL}};
srna= RNA_def_struct(brna, "MouseSensor", "Sensor");
- RNA_def_struct_ui_text(srna, "Mouse Sensor", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Mouse Sensor", "Sensor to detect mouse events.");
RNA_def_struct_sdna_from(srna, "bMouseSensor", "data");
prop= RNA_def_property(srna, "mouse_event", PROP_ENUM, PROP_NONE);
@@ -191,7 +192,7 @@ void rna_def_touch_sensor(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "TouchSensor", "Sensor");
- RNA_def_struct_ui_text(srna, "Touch Sensor", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Touch Sensor", "Sensor to detect objects colliding with the current object.");
RNA_def_struct_sdna_from(srna, "bTouchSensor", "data");
prop= RNA_def_property(srna, "material", PROP_POINTER, PROP_NONE);
@@ -205,7 +206,7 @@ void rna_def_keyboard_sensor(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "KeyboardSensor", "Sensor");
- RNA_def_struct_ui_text(srna, "Keyboard Sensor", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Keyboard Sensor", "Sensor to detect keyboard events.");
RNA_def_struct_sdna_from(srna, "bKeyboardSensor", "data");
prop= RNA_def_property(srna, "key", PROP_INT, PROP_NONE);
@@ -251,7 +252,7 @@ void rna_def_property_sensor(BlenderRNA *brna)
{0, NULL, NULL, NULL}};
srna= RNA_def_struct(brna, "PropertySensor", "Sensor");
- RNA_def_struct_ui_text(srna, "Property Sensor", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Property Sensor", "Sensor to detect values and changes in values of properties.");
RNA_def_struct_sdna_from(srna, "bPropertySensor", "data");
prop= RNA_def_property(srna, "evaluation_type", PROP_ENUM, PROP_NONE);
@@ -282,7 +283,7 @@ void rna_def_actuator_sensor(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "ActuatorSensor", "Sensor");
- RNA_def_struct_ui_text(srna, "Actuator Sensor", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Actuator Sensor", "Sensor to detect state modifications of actuators.");
RNA_def_struct_sdna_from(srna, "bActuatorSensor", "data");
prop= RNA_def_property(srna, "actuator", PROP_STRING, PROP_NONE);
@@ -296,7 +297,7 @@ void rna_def_delay_sensor(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "DelaySensor", "Sensor");
- RNA_def_struct_ui_text(srna, "Delay Sensor", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Delay Sensor", "Sensor to send delayed events.");
RNA_def_struct_sdna_from(srna, "bDelaySensor", "data");
prop= RNA_def_property(srna, "delay", PROP_INT, PROP_NONE);
@@ -322,7 +323,7 @@ void rna_def_collision_sensor(BlenderRNA *brna)
{0, NULL, NULL, NULL}};
srna= RNA_def_struct(brna, "CollisionSensor", "Sensor");
- RNA_def_struct_ui_text(srna, "Collision Sensor", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Collision Sensor", "Sensor to detect objects colliding with the current object, with more settings than the Touch sensor.");
RNA_def_struct_sdna_from(srna, "bCollisionSensor", "data");
prop= RNA_def_property(srna, "property", PROP_STRING, PROP_NONE);
@@ -353,7 +354,7 @@ void rna_def_radar_sensor(BlenderRNA *brna)
{0, NULL, NULL, NULL}};
srna= RNA_def_struct(brna, "RadarSensor", "Sensor");
- RNA_def_struct_ui_text(srna, "Radar Sensor", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Radar Sensor", "Sensor to detect objects in a cone shaped radar emanating from the current object.");
RNA_def_struct_sdna_from(srna, "bRadarSensor", "data");
prop= RNA_def_property(srna, "property", PROP_STRING, PROP_NONE);
@@ -380,7 +381,7 @@ void rna_def_random_sensor(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "RandomSensor", "Sensor");
- RNA_def_struct_ui_text(srna, "Random Sensor", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Random Sensor", "Sensor to send random events.");
RNA_def_struct_sdna_from(srna, "bRandomSensor", "data");
prop= RNA_def_property(srna, "seed", PROP_INT, PROP_NONE);
@@ -406,7 +407,7 @@ void rna_def_ray_sensor(BlenderRNA *brna)
{0, NULL, NULL, NULL}};
srna= RNA_def_struct(brna, "RaySensor", "Sensor");
- RNA_def_struct_ui_text(srna, "Ray Sensor", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Ray Sensor", "Sensor to detect interestions with a ray emanating from the current object.");
RNA_def_struct_sdna_from(srna, "bRaySensor", "data");
prop= RNA_def_property(srna, "property", PROP_STRING, PROP_NONE);
@@ -442,7 +443,7 @@ void rna_def_message_sensor(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "MessageSensor", "Sensor");
- RNA_def_struct_ui_text(srna, "Message Sensor", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Message Sensor", "Sensor to detect incoming messages.");
RNA_def_struct_sdna_from(srna, "bMessageSensor", "data");
prop= RNA_def_property(srna, "subject", PROP_STRING, PROP_NONE);
@@ -468,7 +469,7 @@ void rna_def_joystick_sensor(BlenderRNA *brna)
{0, NULL, NULL, NULL}};
srna= RNA_def_struct(brna, "JoystickSensor", "Sensor");
- RNA_def_struct_ui_text(srna, "Joystick Sensor", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Joystick Sensor", "Sensor to detect joystick events.");
RNA_def_struct_sdna_from(srna, "bJoystickSensor", "data");
prop= RNA_def_property(srna, "joystick_index", PROP_INT, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_sequence.c b/source/blender/makesrna/intern/rna_sequence.c
index 4344c936c94..bfdd20c1e72 100644
--- a/source/blender/makesrna/intern/rna_sequence.c
+++ b/source/blender/makesrna/intern/rna_sequence.c
@@ -114,7 +114,7 @@ static void rna_def_strip_element(BlenderRNA *brna)
PropertyRNA *prop;
srna = RNA_def_struct(brna, "SequenceElement", NULL);
- RNA_def_struct_ui_text(srna, "Sequence Element", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Sequence Element", "Sequence strip data for a single frame.");
RNA_def_struct_sdna(srna, "StripElem");
prop= RNA_def_property(srna, "filename", PROP_STRING, PROP_FILEPATH);
@@ -128,7 +128,7 @@ static void rna_def_strip_crop(BlenderRNA *brna)
PropertyRNA *prop;
srna = RNA_def_struct(brna, "SequenceCrop", NULL);
- RNA_def_struct_ui_text(srna, "Sequence Crop", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Sequence Crop", "Cropping parameters for a sequence strip.");
RNA_def_struct_sdna(srna, "StripCrop");
prop= RNA_def_property(srna, "top", PROP_INT, PROP_UNSIGNED);
@@ -154,7 +154,7 @@ static void rna_def_strip_transform(BlenderRNA *brna)
PropertyRNA *prop;
srna = RNA_def_struct(brna, "SequenceTransform", NULL);
- RNA_def_struct_ui_text(srna, "Sequence Transform", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Sequence Transform", "Transform paramaters for a sequence strip.");
RNA_def_struct_sdna(srna, "StripTransform");
prop= RNA_def_property(srna, "offset_x", PROP_INT, PROP_NONE);
@@ -174,7 +174,7 @@ static void rna_def_strip_proxy(BlenderRNA *brna)
PropertyRNA *prop;
srna = RNA_def_struct(brna, "SequenceProxy", NULL);
- RNA_def_struct_ui_text(srna, "Sequence Proxy", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Sequence Proxy", "Proxy parameters for a sequence strip.");
RNA_def_struct_sdna(srna, "StripProxy");
prop= RNA_def_property(srna, "directory", PROP_STRING, PROP_DIRPATH);
@@ -188,7 +188,7 @@ static void rna_def_strip_color_balance(BlenderRNA *brna)
PropertyRNA *prop;
srna = RNA_def_struct(brna, "SequenceColorBalance", NULL);
- RNA_def_struct_ui_text(srna, "Sequence Color Balance", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Sequence Color Balance", "Color balance paramaters for a sequence strip.");
RNA_def_struct_sdna(srna, "StripColorBalance");
prop= RNA_def_property(srna, "lift", PROP_FLOAT, PROP_COLOR);
@@ -239,11 +239,11 @@ static void rna_def_sequence(BlenderRNA *brna)
{SEQ_CROSS, "CROSS", "Cross", ""},
{SEQ_ADD, "ADD", "Add", ""},
{SEQ_SUB, "SUBTRACT", "Subtract", ""},
- {SEQ_ALPHAOVER, "ALPHAOVER", "Alpha Over", ""},
- {SEQ_ALPHAUNDER, "ALPHAUNDER", "Alpha Under", ""},
- {SEQ_GAMCROSS, "GAMMACROSS", "Gamma Cross", ""},
+ {SEQ_ALPHAOVER, "ALPHA_OVER", "Alpha Over", ""},
+ {SEQ_ALPHAUNDER, "ALPHA_UNDER", "Alpha Under", ""},
+ {SEQ_GAMCROSS, "GAMMA_ACROSS", "Gamma Cross", ""},
{SEQ_MUL, "MULTIPLY", "Multiply", ""},
- {SEQ_OVERDROP, "OVERDROP", "Over Drop", ""},
+ {SEQ_OVERDROP, "OVER_DROP", "Over Drop", ""},
{SEQ_PLUGIN, "PLUGIN", "plugin", ""},
{SEQ_WIPE, "WIPE", "Wipe", ""},
{SEQ_GLOW, "GLOW", "Glow", ""},
@@ -258,11 +258,11 @@ static void rna_def_sequence(BlenderRNA *brna)
{SEQ_CROSS, "CROSS", "Cross", ""},
{SEQ_ADD, "ADD", "Add", ""},
{SEQ_SUB, "SUBTRACT", "Subtract", ""},
- {SEQ_ALPHAOVER, "ALPHAOVER", "Alpha Over", ""},
- {SEQ_ALPHAUNDER, "ALPHAUNDER", "Alpha Under", ""},
- {SEQ_GAMCROSS, "GAMCROSS", "Gamma Cross", ""},
+ {SEQ_ALPHAOVER, "ALPHA_OVER", "Alpha Over", ""},
+ {SEQ_ALPHAUNDER, "ALPHA_UNDER", "Alpha Under", ""},
+ {SEQ_GAMCROSS, "GAMMA_CROSS", "Gamma Cross", ""},
{SEQ_MUL, "MULTIPLY", "Multiply", ""},
- {SEQ_OVERDROP, "OVERDROP", "Over Drop", ""},
+ {SEQ_OVERDROP, "OVER_DROP", "Over Drop", ""},
{SEQ_PLUGIN, "PLUGIN", "plugin", ""},
{SEQ_WIPE, "WIPE", "Wipe", ""},
{SEQ_GLOW, "GLOW", "Glow", ""},
@@ -273,7 +273,7 @@ static void rna_def_sequence(BlenderRNA *brna)
};
srna = RNA_def_struct(brna, "Sequence", NULL);
- RNA_def_struct_ui_text(srna, "Sequence", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Sequence", "Sequence strip in the sequence editor.");
RNA_def_struct_refine_func(srna, "rna_Sequence_refine");
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
@@ -376,7 +376,7 @@ void rna_def_editor(BlenderRNA *brna)
PropertyRNA *prop;
srna = RNA_def_struct(brna, "SequenceEditor", NULL);
- RNA_def_struct_ui_text(srna, "Sequence Editor", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Sequence Editor", "Sequence editing data for a Scene datablock.");
RNA_def_struct_sdna(srna, "Editing");
prop= RNA_def_property(srna, "sequences", PROP_COLLECTION, PROP_NONE);
@@ -510,7 +510,7 @@ static void rna_def_image(BlenderRNA *brna)
PropertyRNA *prop;
srna = RNA_def_struct(brna, "ImageSequence", "Sequence");
- RNA_def_struct_ui_text(srna, "Image Sequence", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Image Sequence", "Sequence strip to load one or more images.");
RNA_def_struct_sdna(srna, "Sequence");
prop= RNA_def_property(srna, "directory", PROP_STRING, PROP_DIRPATH);
@@ -534,7 +534,7 @@ static void rna_def_meta(BlenderRNA *brna)
PropertyRNA *prop;
srna = RNA_def_struct(brna, "MetaSequence", "Sequence");
- RNA_def_struct_ui_text(srna, "Meta Sequence", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Meta Sequence", "Sequence strip to group other strips as a single sequence strip.");
RNA_def_struct_sdna(srna, "Sequence");
prop = RNA_def_property(srna, "sequences", PROP_COLLECTION, PROP_NONE);
@@ -553,7 +553,7 @@ static void rna_def_scene(BlenderRNA *brna)
PropertyRNA *prop;
srna = RNA_def_struct(brna, "SceneSequence", "Sequence");
- RNA_def_struct_ui_text(srna, "Scene Sequence", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Scene Sequence", "Sequence strip to used the rendered image of a scene.");
RNA_def_struct_sdna(srna, "Sequence");
prop= RNA_def_property(srna, "scene", PROP_POINTER, PROP_NONE);
@@ -570,7 +570,7 @@ static void rna_def_movie(BlenderRNA *brna)
PropertyRNA *prop;
srna = RNA_def_struct(brna, "MovieSequence", "Sequence");
- RNA_def_struct_ui_text(srna, "Movie Sequence", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Movie Sequence", "Sequence strip to load a video.");
RNA_def_struct_sdna(srna, "Sequence");
prop= RNA_def_property(srna, "mpeg_preseek", PROP_INT, PROP_NONE);
@@ -597,7 +597,7 @@ static void rna_def_sound(BlenderRNA *brna)
PropertyRNA *prop;
srna = RNA_def_struct(brna, "SoundSequence", "Sequence");
- RNA_def_struct_ui_text(srna, "Sound Sequence", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Sound Sequence", "Sequence strip defining a sound to be played over a period of time.");
RNA_def_struct_sdna(srna, "Sequence");
prop= RNA_def_property(srna, "sound", PROP_POINTER, PROP_NONE);
@@ -621,7 +621,7 @@ static void rna_def_effect(BlenderRNA *brna)
StructRNA *srna;
srna = RNA_def_struct(brna, "EffectSequence", "Sequence");
- RNA_def_struct_ui_text(srna, "Effect Sequence", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Effect Sequence", "Sequence strip applying an effect on the images created by other strips.");
RNA_def_struct_sdna(srna, "Sequence");
rna_def_proxy(srna);
@@ -633,7 +633,7 @@ static void rna_def_plugin(BlenderRNA *brna)
PropertyRNA *prop;
srna = RNA_def_struct(brna, "PluginSequence", "EffectSequence");
- RNA_def_struct_ui_text(srna, "Plugin Sequence", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Plugin Sequence", "Sequence strip applying an effect, loaded from an external plugin.");
RNA_def_struct_sdna_from(srna, "PluginSeq", "plugin");
prop= RNA_def_property(srna, "filename", PROP_STRING, PROP_FILEPATH);
@@ -666,7 +666,7 @@ static void rna_def_wipe(BlenderRNA *brna)
};
srna = RNA_def_struct(brna, "WipeSequence", "EffectSequence");
- RNA_def_struct_ui_text(srna, "Wipe Sequence", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Wipe Sequence", "Sequence strip creating a wipe transition.");
RNA_def_struct_sdna_from(srna, "WipeVars", "effectdata");
prop= RNA_def_property(srna, "blur_width", PROP_FLOAT, PROP_UNSIGNED);
@@ -696,7 +696,7 @@ static void rna_def_glow(BlenderRNA *brna)
PropertyRNA *prop;
srna = RNA_def_struct(brna, "GlowSequence", "EffectSequence");
- RNA_def_struct_ui_text(srna, "Glow Sequence", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Glow Sequence", "Sequence strip creating a glow effect.");
RNA_def_struct_sdna_from(srna, "GlowVars", "effectdata");
prop= RNA_def_property(srna, "threshold", PROP_FLOAT, PROP_NONE);
@@ -748,7 +748,7 @@ static void rna_def_transform(BlenderRNA *brna)
};
srna = RNA_def_struct(brna, "TransformSequence", "EffectSequence");
- RNA_def_struct_ui_text(srna, "Transform Sequence", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Transform Sequence", "Sequence strip applying affine transformations to other strips.");
RNA_def_struct_sdna_from(srna, "TransformVars", "effectdata");
prop= RNA_def_property(srna, "scale_start_x", PROP_FLOAT, PROP_UNSIGNED);
@@ -817,7 +817,7 @@ static void rna_def_solid_color(BlenderRNA *brna)
PropertyRNA *prop;
srna = RNA_def_struct(brna, "ColorSequence", "EffectSequence");
- RNA_def_struct_ui_text(srna, "Color Sequence", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Color Sequence", "Sequence strip creating an image filled with a single color.");
RNA_def_struct_sdna_from(srna, "SolidColorVars", "effectdata");
prop= RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR);
@@ -831,7 +831,7 @@ static void rna_def_speed_control(BlenderRNA *brna)
PropertyRNA *prop;
srna = RNA_def_struct(brna, "SpeedControlSequence", "EffectSequence");
- RNA_def_struct_ui_text(srna, "SpeedControl Sequence", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "SpeedControl Sequence", "Sequence strip to control the speed of other strips.");
RNA_def_struct_sdna_from(srna, "SpeedControlVars", "effectdata");
prop= RNA_def_property(srna, "global_speed", PROP_FLOAT, PROP_UNSIGNED);
diff --git a/source/blender/makesrna/intern/rna_sound.c b/source/blender/makesrna/intern/rna_sound.c
index 6a74a324232..60e7dd8dea2 100644
--- a/source/blender/makesrna/intern/rna_sound.c
+++ b/source/blender/makesrna/intern/rna_sound.c
@@ -36,6 +36,8 @@
#else
+/* sample and listener are internal .. */
+
#if 0
static void rna_def_sample(BlenderRNA *brna)
{
@@ -58,7 +60,7 @@ static void rna_def_sample(BlenderRNA *brna)
srna= RNA_def_struct(brna, "SoundSample", "ID");
RNA_def_struct_sdna(srna, "bSample");
- RNA_def_struct_ui_text(srna, "SoundSample", "Sound Sample");
+ RNA_def_struct_ui_text(srna, "SoundSample", "Sound data loaded from a sound datablock.");
prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_sample_type_items);
@@ -87,7 +89,6 @@ static void rna_def_sample(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Channels", "Number of channels (mono=1; stereo=2)");
RNA_def_property_flag(prop, PROP_NOT_EDITABLE);
}
-#endif
static void rna_def_soundlistener(BlenderRNA *brna)
{
@@ -97,7 +98,7 @@ static void rna_def_soundlistener(BlenderRNA *brna)
srna= RNA_def_struct(brna, "SoundListener", "ID");
RNA_def_struct_sdna(srna, "bSoundListener");
- RNA_def_struct_ui_text(srna, "Sound Listener", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Sound Listener", "Sound listener defining paramaters about how sounds are played.");
prop= RNA_def_property(srna, "gain", PROP_FLOAT, PROP_NONE);
RNA_def_property_ui_text(prop, "Gain", "Overall volume for Game Engine sound.");
@@ -123,102 +124,101 @@ static void rna_def_soundlistener(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Total Sounds in Game Engine", "The total number of sounds in the Game Engine.");
RNA_def_property_flag(prop, PROP_NOT_EDITABLE);
}
+#endif
static void rna_def_sound(BlenderRNA *brna)
{
-
StructRNA *srna;
PropertyRNA *prop;
srna= RNA_def_struct(brna, "Sound", "ID");
RNA_def_struct_sdna(srna, "bSound");
- RNA_def_struct_ui_text(srna, "Sound", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Sound", "Sound datablock referencing an external or packed sound file.");
- prop= RNA_def_property(srna, "sample", PROP_POINTER, PROP_NONE);
- RNA_def_property_struct_type(prop, "ID");
- RNA_def_property_ui_text(prop, "Sample", "Sound Sample.");
+ rna_def_ipo_common(srna);
+
+ /*prop= RNA_def_property(srna, "sample", PROP_POINTER, PROP_NONE);
+ RNA_def_property_struct_type(prop, "SoundSample");
+ RNA_def_property_ui_text(prop, "Sample", "Sound sample.");*/
prop= RNA_def_property(srna, "filename", PROP_STRING, PROP_FILEPATH);
RNA_def_property_string_sdna(prop, NULL, "name");
- RNA_def_property_flag(prop, PROP_NOT_EDITABLE); /* ? */
- RNA_def_property_ui_text(prop, "Filename", "DOC_BROKEN");
+ RNA_def_property_ui_text(prop, "Filename", "Sound sample file used by this Sound datablock.");
+
+ prop= RNA_def_property(srna, "packed_file", PROP_POINTER, PROP_NONE);
+ RNA_def_property_pointer_sdna(prop, NULL, "packedfile");
+ RNA_def_property_ui_text(prop, "Packed File", "");
- /* floats */
- prop= RNA_def_property(srna, "volume", PROP_FLOAT, PROP_NONE);
+ /* game engine settings */
+ prop= RNA_def_property(srna, "volume", PROP_FLOAT, PROP_UNSIGNED);
RNA_def_property_float_sdna(prop, NULL, "volume");
- RNA_def_property_ui_text(prop, "Volume", "The volume for this sound in the game engine only");
RNA_def_property_ui_range(prop, 0.0, 1.0, 10, 4);
-
- prop= RNA_def_property(srna, "panning", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "panning");
- RNA_def_property_ui_text(prop, "Panning", "Pan the sound from left to right");
- RNA_def_property_ui_range(prop, -1.0, 1.0, 10, 4); /* TODO - this isnt used anywhere :/ */
-
- prop= RNA_def_property(srna, "attenuation", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "attenuation");
- RNA_def_property_ui_text(prop, "Attenuation", "DOC_BROKEN");
- RNA_def_property_ui_range(prop, 0.0, 100.0, 10, 4); /* TODO check limits */
+ RNA_def_property_ui_text(prop, "Volume", "Game engine only: volume for this sound.");
prop= RNA_def_property(srna, "pitch", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "pitch");
- RNA_def_property_ui_text(prop, "Pitch", "Set the pitch of this sound for the game engine only");
RNA_def_property_ui_range(prop, -12.0, 12.0, 10, 4);
+ RNA_def_property_ui_text(prop, "Pitch", "Game engine only: set the pitch of this sound.");
+
+ prop= RNA_def_property(srna, "loop", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flags", SOUND_FLAGS_LOOP);
+ RNA_def_property_ui_text(prop, "Sound Loop", "Game engine only: toggle between looping on/off.");
+ prop= RNA_def_property(srna, "ping_pong", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flags", SOUND_FLAGS_BIDIRECTIONAL_LOOP);
+ RNA_def_property_ui_text(prop, "Ping Pong", "Game engine only: Toggle between A->B and A->B->A looping.");
+
+ prop= RNA_def_property(srna, "sound_3d", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flags", SOUND_FLAGS_3D);
+ RNA_def_property_ui_text(prop, "3D Sound", "Game engine only: turns 3D sound on.");
+
+ prop= RNA_def_property(srna, "attenuation", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "attenuation");
+ RNA_def_property_range(prop, 0.0, 5.0);
+ RNA_def_property_ui_text(prop, "Attenuation", "Game engine only: sets the surround scaling factor for 3D sound.");
+
+ /* gain */
prop= RNA_def_property(srna, "min_gain", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "min_gain");
- RNA_def_property_ui_text(prop, "Min Gain", "DOC_BROKEN");
- RNA_def_property_ui_range(prop, 0.0, 1.0, 10, 4); /* NOT used anywhere */
+ RNA_def_property_range(prop, 0.0, 1.0);
+ RNA_def_property_ui_text(prop, "Min Gain", "Minimal gain which is always guaranteed for this sound.");
prop= RNA_def_property(srna, "max_gain", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "max_gain");
- RNA_def_property_ui_text(prop, "Max Gain", "DOC_BROKEN");
- RNA_def_property_ui_range(prop, 0.0, 1.0, 10, 4); /* NOT used anywhere */
+ RNA_def_property_range(prop, 0.0, 1.0);
+ RNA_def_property_ui_text(prop, "Max Gain", "Maximal gain which is always guaranteed for this sound.");
- prop= RNA_def_property(srna, "distance", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "reference_distance", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "distance");
- RNA_def_property_ui_text(prop, "Distance", "Reference distance at which the listener will experience gain");
+ RNA_def_property_ui_text(prop, "Reference Distance", "Reference distance at which the listener will experience gain.");
RNA_def_property_ui_range(prop, 0.0, 1000.0, 10, 4); /* NOT used anywhere */
- prop= RNA_def_property(srna, "ipo", PROP_POINTER, PROP_NONE);
- RNA_def_property_struct_type(prop, "Ipo");
- RNA_def_property_ui_text(prop, "Ipo", "DOC_BROKEN");
-
-
- /* flags */
- prop= RNA_def_property(srna, "loop", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flags", SOUND_FLAGS_LOOP); /* use bitflags */
- RNA_def_property_ui_text(prop, "Sound Loop", "DOC_BROKEN");
+ /* unused
+ prop= RNA_def_property(srna, "panning", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "panning");
+ RNA_def_property_ui_range(prop, -1.0, 1.0, 10, 4);
+ RNA_def_property_ui_text(prop, "Panning", "Pan the sound from left to right"); */
+ /* unused
prop= RNA_def_property(srna, "fixed_volume", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flags", SOUND_FLAGS_FIXED_VOLUME); /* use bitflags */
- RNA_def_property_ui_text(prop, "Fixed Volume", "DOC_BROKEN");
+ RNA_def_property_boolean_sdna(prop, NULL, "flags", SOUND_FLAGS_FIXED_VOLUME);
+ RNA_def_property_ui_text(prop, "Fixed Volume", "Constraint sound to fixed volume."); */
+ /* unused
prop= RNA_def_property(srna, "fixed_panning", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flags", SOUND_FLAGS_FIXED_PANNING); /* use bitflags */
- RNA_def_property_ui_text(prop, "Fixed Panning", "DOC_BROKEN");
-
- prop= RNA_def_property(srna, "spacial", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flags", SOUND_FLAGS_3D); /* use bitflags */
- RNA_def_property_ui_text(prop, "3D", "DOC_BROKEN");
-
- prop= RNA_def_property(srna, "bidirectional_loop", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flags", SOUND_FLAGS_BIDIRECTIONAL_LOOP); /* use bitflags */
- RNA_def_property_ui_text(prop, "Bidirectional Loop", "DOC_BROKEN");
+ RNA_def_property_boolean_sdna(prop, NULL, "flags", SOUND_FLAGS_FIXED_PANNING);
+ RNA_def_property_ui_text(prop, "Fixed Panning", "Constraint sound to fixed panning."); */
+ /* unused
prop= RNA_def_property(srna, "priority", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flags", SOUND_FLAGS_PRIORITY); /* use bitflags */
- RNA_def_property_ui_text(prop, "Priority", "DOC_BROKEN");
-
- prop= RNA_def_property(srna, "sequence", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flags", SOUND_FLAGS_SEQUENCE); /* use bitflags */
- RNA_def_property_ui_text(prop, "Priority", "DOC_BROKEN");
- RNA_def_property_flag(prop, PROP_NOT_EDITABLE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flags", SOUND_FLAGS_PRIORITY);
+ RNA_def_property_ui_text(prop, "Priority", "Make sound higher priority."); */
}
void RNA_def_sound(BlenderRNA *brna)
{
//rna_def_sample(brna);
- rna_def_soundlistener(brna);
+ //rna_def_soundlistener(brna);
rna_def_sound(brna);
}
diff --git a/source/blender/makesrna/intern/rna_text.c b/source/blender/makesrna/intern/rna_text.c
index af04b396584..07f904fed2d 100644
--- a/source/blender/makesrna/intern/rna_text.c
+++ b/source/blender/makesrna/intern/rna_text.c
@@ -108,7 +108,7 @@ static void rna_def_text_line(BlenderRNA *brna)
PropertyRNA *prop;
srna = RNA_def_struct(brna, "TextLine", NULL);
- RNA_def_struct_ui_text(srna, "Text Line", "Line of text.");
+ RNA_def_struct_ui_text(srna, "Text Line", "Line of text in a Text datablock.");
prop= RNA_def_property(srna, "line", PROP_STRING, PROP_NONE);
RNA_def_property_flag(prop, PROP_NOT_EDITABLE);
@@ -122,7 +122,7 @@ static void rna_def_text_marker(BlenderRNA *brna)
PropertyRNA *prop;
srna = RNA_def_struct(brna, "TextMarker", NULL);
- RNA_def_struct_ui_text(srna, "Text Marker", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Text Marker", "Marker highlighting a portion of text in a Text datablock.");
prop= RNA_def_property(srna, "line", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "lineno");
@@ -162,7 +162,7 @@ static void rna_def_text(BlenderRNA *brna)
PropertyRNA *prop;
srna = RNA_def_struct(brna, "Text", "ID");
- RNA_def_struct_ui_text(srna, "Text", "Text file datablock.");
+ RNA_def_struct_ui_text(srna, "Text", "Text datablock referencing an external or packed text file.");
prop= RNA_def_property(srna, "filename", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_Text_filename_get", "rna_Text_filename_length", "rna_Text_filename_set");
@@ -182,7 +182,7 @@ static void rna_def_text(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "TextLine");
RNA_def_property_ui_text(prop, "Lines", "Lines of text.");
- prop= RNA_def_property(srna, "current_line", PROP_POINTER, PROP_NONE);
+ prop= RNA_def_property(srna, "current_line", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "curl");
RNA_def_property_flag(prop, PROP_NOT_EDITABLE);
RNA_def_property_struct_type(prop, "TextLine");
@@ -193,7 +193,7 @@ static void rna_def_text(BlenderRNA *brna)
RNA_def_property_flag(prop, PROP_NOT_EDITABLE);
RNA_def_property_ui_text(prop, "Current Character", "Index of current character in current line, and also start index of character in selection if one exists.");
- prop= RNA_def_property(srna, "selection_end_line", PROP_POINTER, PROP_NONE);
+ prop= RNA_def_property(srna, "selection_end_line", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "sell");
RNA_def_property_flag(prop, PROP_NOT_EDITABLE);
RNA_def_property_struct_type(prop, "TextLine");
diff --git a/source/blender/makesrna/intern/rna_texture.c b/source/blender/makesrna/intern/rna_texture.c
index 12dc72c2616..532b599f786 100644
--- a/source/blender/makesrna/intern/rna_texture.c
+++ b/source/blender/makesrna/intern/rna_texture.c
@@ -37,14 +37,14 @@
#else
-void rna_def_color_ramp_element(BlenderRNA *brna)
+static void rna_def_color_ramp_element(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
srna= RNA_def_struct(brna, "ColorRampElement", NULL);
RNA_def_struct_sdna(srna, "CBData");
- RNA_def_struct_ui_text(srna, "Color Ramp Element", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Color Ramp Element", "Element defining a color at a position in the color ramp.");
prop= RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "r");
@@ -59,7 +59,7 @@ void rna_def_color_ramp_element(BlenderRNA *brna)
/* XXX: CBData.cur? */
}
-void rna_def_color_ramp(BlenderRNA *brna)
+static void rna_def_color_ramp(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
@@ -74,7 +74,7 @@ void rna_def_color_ramp(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ColorRamp", NULL);
RNA_def_struct_sdna(srna, "ColorBand");
- RNA_def_struct_ui_text(srna, "Color Ramp", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Color Ramp", "Color ramp mapping a scalar value to a color.");
prop= RNA_def_property(srna, "elements", PROP_COLLECTION, PROP_COLOR);
RNA_def_property_collection_sdna(prop, NULL, "data", "tot");
@@ -89,23 +89,11 @@ void rna_def_color_ramp(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Interpolation", "");
}
-void rna_def_mapping_texture(BlenderRNA *brna)
+static void rna_def_mtex(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_texture_coordinates_items[] = {
- {TEXCO_ORCO, "ORIGINAL_COORDINATES", "Original Coordinates", ""},
- {TEXCO_REFL, "REFLECTION_VECTOR", "Reflection Vector", ""},
- {TEXCO_NORM, "NORMAL_VECTOR", "Normal Vector", ""},
- {TEXCO_GLOB, "GLOBAL", "Global", ""},
- {TEXCO_UV, "UV", "UV", ""},
- {TEXCO_OBJECT, "LINKED_OBJECT", "Linked Object", ""},
- {TEXCO_STRAND, "STRAND", "Strand", ""},
- {TEXCO_STRESS, "STRESS", "Stress", ""},
- {TEXCO_SPEED, "TANGENT", "Tangent", ""},
- {0, NULL, NULL, NULL}};
-
static EnumPropertyItem prop_blend_type_items[] = {
{MTEX_BLEND, "MIX", "Mix", ""},
{MTEX_ADD, "ADD", "Add", ""},
@@ -123,83 +111,56 @@ void rna_def_mapping_texture(BlenderRNA *brna)
{MTEX_BLEND_COLOR, "COLOR", "Color", ""},
{0, NULL, NULL, NULL}};
- static EnumPropertyItem prop_mapping_items[] = {
- {MTEX_FLAT, "FLAT", "Flat", "Maps X and Y coordinates directly."},
- {MTEX_CUBE, "CUBE", "Cube", "Maps using the normal vector."},
- {MTEX_TUBE, "TUBE", "Tube", "Maps with Z as central axis."},
- {MTEX_SPHERE, "SPHERE", "Sphere", "Maps with Z as central axis."},
- {0, NULL, NULL, NULL}};
-
- static EnumPropertyItem prop_normal_map_space_items[] = {
- {MTEX_NSPACE_CAMERA, "CAMERA", "Camera", ""},
- {MTEX_NSPACE_WORLD, "WORLD", "World", ""},
- {MTEX_NSPACE_OBJECT, "OBJECT", "Object", ""},
- {MTEX_NSPACE_TANGENT, "TANGENT", "Tangent", ""},
- {0, NULL, NULL, NULL}};
-
srna= RNA_def_struct(brna, "TextureSlot", NULL);
RNA_def_struct_sdna(srna, "MTex");
- RNA_def_struct_ui_text(srna, "TextureSlot", "DOC_BROKEN");
-
- prop= RNA_def_property(srna, "texture_coordinates", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "texco");
- RNA_def_property_enum_items(prop, prop_texture_coordinates_items);
- RNA_def_property_ui_text(prop, "Texture Coordinates", "");
-
- /* XXX: MTex.mapto and MTex.maptoneg */
-
- prop= RNA_def_property(srna, "blend_type", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "blendtype");
- RNA_def_property_enum_items(prop, prop_blend_type_items);
- RNA_def_property_ui_text(prop, "Blend Type", "");
-
- prop= RNA_def_property(srna, "mapping_object", PROP_POINTER, PROP_NONE);
- RNA_def_property_pointer_sdna(prop, NULL, "object");
- RNA_def_property_struct_type(prop, "Object");
- RNA_def_property_ui_text(prop, "Mapping Object", "");
+ RNA_def_struct_ui_text(srna, "Texture Slot", "Texture slot defining the mapping and influence of a texture.");
prop= RNA_def_property(srna, "texture", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "tex");
RNA_def_property_struct_type(prop, "Texture");
- RNA_def_property_ui_text(prop, "Texture", "");
-
- /* XXX: MTex.uvname, MTex.proj[xyz] */
-
- prop= RNA_def_property(srna, "mapping", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_items(prop, prop_mapping_items);
- RNA_def_property_ui_text(prop, "Mapping", "");
+ RNA_def_property_ui_text(prop, "Texture", "Texture datablock used by this texture slot.");
+ /* mapping */
prop= RNA_def_property(srna, "offset", PROP_FLOAT, PROP_VECTOR);
RNA_def_property_float_sdna(prop, NULL, "ofs");
RNA_def_property_ui_range(prop, -10, 10, 10, 2);
- RNA_def_property_ui_text(prop, "Offset", "");
+ RNA_def_property_ui_text(prop, "Offset", "Fine tunes texture mapping X, Y and Z locations.");
prop= RNA_def_property(srna, "size", PROP_FLOAT, PROP_VECTOR);
RNA_def_property_ui_range(prop, -100, 100, 10, 2);
- RNA_def_property_ui_text(prop, "Size", "");
-
- /* XXX: MTex.colormodel, pmapto, pmaptoneg */
-
- prop= RNA_def_property(srna, "normal_map_space", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "normapspace");
- RNA_def_property_enum_items(prop, prop_normal_map_space_items);
- RNA_def_property_ui_text(prop, "Normal Map Space", "");
-
- /* XXX: MTex.which_output */
+ RNA_def_property_ui_text(prop, "Size", "Sets scaling for the texture's X, Y and Z sizes.");
prop= RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "r");
RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "Color", "");
+ RNA_def_property_ui_text(prop, "Color", "The default color for textures that don't return RGB.");
+
+ prop= RNA_def_property(srna, "blend_type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "blendtype");
+ RNA_def_property_enum_items(prop, prop_blend_type_items);
+ RNA_def_property_ui_text(prop, "Blend Type", "");
- /* XXX: MTex.k */
+ prop= RNA_def_property(srna, "stencil", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "texflag", MTEX_STENCIL);
+ RNA_def_property_ui_text(prop, "Stencil", "Use this texture as a blending value on the next texture.");
+
+ prop= RNA_def_property(srna, "negate", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "texflag", MTEX_NEGATIVE);
+ RNA_def_property_ui_text(prop, "Negate", "Inverts the values of the texture to reverse its effect.");
+
+ prop= RNA_def_property(srna, "no_rgb", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "texflag", MTEX_RGBTOINT);
+ RNA_def_property_ui_text(prop, "No RGB", "Converts texture RGB values to intensity (gray) values.");
prop= RNA_def_property(srna, "default_value", PROP_FLOAT, PROP_VECTOR);
RNA_def_property_float_sdna(prop, NULL, "def_var");
RNA_def_property_range(prop, 0, 1);
RNA_def_property_ui_text(prop, "Default Value", "Value to use for Ref, Spec, Amb, Emit, Alpha, RayMir, TransLu and Hard.");
- /* XXX: MTex.rt */
+ prop= RNA_def_property(srna, "variable_factor", PROP_FLOAT, PROP_VECTOR);
+ RNA_def_property_float_sdna(prop, NULL, "varfac");
+ RNA_def_property_range(prop, 0, 1);
+ RNA_def_property_ui_text(prop, "Variable Factor", "Amount texture affects other values.");
prop= RNA_def_property(srna, "color_factor", PROP_FLOAT, PROP_VECTOR);
RNA_def_property_float_sdna(prop, NULL, "colfac");
@@ -209,26 +170,10 @@ void rna_def_mapping_texture(BlenderRNA *brna)
prop= RNA_def_property(srna, "normal_factor", PROP_FLOAT, PROP_VECTOR);
RNA_def_property_float_sdna(prop, NULL, "norfac");
RNA_def_property_range(prop, 0, 25);
- RNA_def_property_ui_text(prop, "Normal actor", "Amount texture affects normal values.");
-
- /* XXX: could use a better name/description? */
- prop= RNA_def_property(srna, "general_factor", PROP_FLOAT, PROP_VECTOR);
- RNA_def_property_float_sdna(prop, NULL, "varfac");
- RNA_def_property_range(prop, 0, 1);
- RNA_def_property_ui_text(prop, "General Factor", "Amount texture affects other values.");
-
- prop= RNA_def_property(srna, "displacement_factor", PROP_FLOAT, PROP_VECTOR);
- RNA_def_property_float_sdna(prop, NULL, "dispfac");
- RNA_def_property_range(prop, 0, 1);
- RNA_def_property_ui_text(prop, "Displacement Factor", "Amount texture displaces the surface.");
-
- prop= RNA_def_property(srna, "warp_factor", PROP_FLOAT, PROP_VECTOR);
- RNA_def_property_float_sdna(prop, NULL, "warpfac");
- RNA_def_property_range(prop, 0, 1);
- RNA_def_property_ui_text(prop, "Warp Factor", "Amount texture affects color values.");
+ RNA_def_property_ui_text(prop, "Normal Factor", "Amount texture affects normal values.");
}
-void rna_def_environment_map(BlenderRNA *brna)
+static void rna_def_environment_map(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
@@ -246,7 +191,7 @@ void rna_def_environment_map(BlenderRNA *brna)
srna= RNA_def_struct(brna, "EnvironmentMap", NULL);
RNA_def_struct_sdna(srna, "EnvMap");
- RNA_def_struct_ui_text(srna, "EnvironmentMap", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "EnvironmentMap", "Environment map created by the renderer and cached for subsequent renders.");
prop= RNA_def_property(srna, "image", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "ima");
@@ -283,7 +228,7 @@ void rna_def_environment_map(BlenderRNA *brna)
/* XXX: EnvMap.notlay */
- prop= RNA_def_property(srna, "Resolution", PROP_INT, PROP_NONE);
+ prop= RNA_def_property(srna, "resolution", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "cuberes");
RNA_def_property_range(prop, 50, 4096);
RNA_def_property_ui_text(prop, "Resolution", "Pixel resolution of the rendered environment map.");
@@ -345,14 +290,9 @@ void RNA_def_texture(BlenderRNA *brna)
{TEX_CELLNOISE, "CELL_NOISE", "Cell Noise", ""},
{0, NULL, NULL, NULL}};
- rna_def_mapping_texture(brna);
- rna_def_environment_map(brna);
- rna_def_color_ramp(brna);
- rna_def_color_ramp_element(brna);
-
srna= RNA_def_struct(brna, "Texture", "ID");
RNA_def_struct_sdna(srna, "Tex");
- RNA_def_struct_ui_text(srna, "Texture", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Texture", "Texture datablock used by materials, lamps, worlds and brushes.");
prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_type_items);
@@ -491,7 +431,7 @@ void RNA_def_texture(BlenderRNA *brna)
/* XXX: plugin */
- prop= RNA_def_property(srna, "color_ramp", PROP_POINTER, PROP_NONE);
+ prop= RNA_def_property(srna, "color_ramp", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "coba");
RNA_def_property_struct_type(prop, "ColorRamp");
RNA_def_property_ui_text(prop, "Color Ramp", "");
@@ -501,8 +441,10 @@ void RNA_def_texture(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "EnvironmentMap");
RNA_def_property_ui_text(prop, "Environment Map", "");
- /* XXX: preview */
-
+ rna_def_mtex(brna);
+ rna_def_environment_map(brna);
+ rna_def_color_ramp(brna);
+ rna_def_color_ramp_element(brna);
}
#endif
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index 54bc5d21cd9..64db4a5f191 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -282,7 +282,7 @@ static void rna_def_userdef_theme_space_view3d(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ThemeView3D", NULL);
RNA_def_struct_sdna(srna, "ThemeSpace");
- RNA_def_struct_ui_text(srna, "Theme 3D View", "");
+ RNA_def_struct_ui_text(srna, "Theme 3D View", "Theme settings for the 3D View.");
rna_def_userdef_theme_spaces_main(srna);
@@ -361,7 +361,7 @@ static void rna_def_userdef_theme_space_ipo(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ThemeIpoEditor", NULL);
RNA_def_struct_sdna(srna, "ThemeSpace");
- RNA_def_struct_ui_text(srna, "Theme Ipo Editor", "");
+ RNA_def_struct_ui_text(srna, "Theme Ipo Editor", "Theme settings for the Ipo Editor.");
rna_def_userdef_theme_spaces_main(srna);
@@ -412,7 +412,7 @@ static void rna_def_userdef_theme_space_file(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ThemeFileBrowser", NULL);
RNA_def_struct_sdna(srna, "ThemeSpace");
- RNA_def_struct_ui_text(srna, "Theme File Browser", "");
+ RNA_def_struct_ui_text(srna, "Theme File Browser", "Theme settings for the File Browser.");
rna_def_userdef_theme_spaces_main(srna);
@@ -455,7 +455,7 @@ static void rna_def_userdef_theme_space_oops(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ThemeOutliner", NULL);
RNA_def_struct_sdna(srna, "ThemeSpace");
- RNA_def_struct_ui_text(srna, "Theme Outliner", "");
+ RNA_def_struct_ui_text(srna, "Theme Outliner", "Theme settings for the Outliner.");
rna_def_userdef_theme_spaces_main(srna);
}
@@ -468,7 +468,7 @@ static void rna_def_userdef_theme_space_info(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ThemeUserPreferences", NULL);
RNA_def_struct_sdna(srna, "ThemeSpace");
- RNA_def_struct_ui_text(srna, "Theme User Preferences", "");
+ RNA_def_struct_ui_text(srna, "Theme User Preferences", "Theme settings for the User Preferences.");
rna_def_userdef_theme_spaces_main(srna);
}
@@ -482,7 +482,7 @@ static void rna_def_userdef_theme_space_text(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ThemeTextEditor", NULL);
RNA_def_struct_sdna(srna, "ThemeSpace");
- RNA_def_struct_ui_text(srna, "Theme Text Editor", "");
+ RNA_def_struct_ui_text(srna, "Theme Text Editor", "Theme settings for the Text Editor.");
rna_def_userdef_theme_spaces_main(srna);
@@ -516,7 +516,7 @@ static void rna_def_userdef_theme_space_text(BlenderRNA *brna)
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Syntax Special", "");
- prop= RNA_def_property(srna, "syntax_Comment", PROP_FLOAT, PROP_COLOR);
+ prop= RNA_def_property(srna, "syntax_comment", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "syntaxc");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Syntax Comment", "");
@@ -541,7 +541,7 @@ static void rna_def_userdef_theme_space_node(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ThemeNodeEditor", NULL);
RNA_def_struct_sdna(srna, "ThemeSpace");
- RNA_def_struct_ui_text(srna, "Theme Node Editor", "");
+ RNA_def_struct_ui_text(srna, "Theme Node Editor", "Theme settings for the Node Editor.");
rna_def_userdef_theme_spaces_main(srna);
@@ -595,7 +595,7 @@ static void rna_def_userdef_theme_space_buts(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ThemeButtonsWindow", NULL);
RNA_def_struct_sdna(srna, "ThemeSpace");
- RNA_def_struct_ui_text(srna, "Theme Buttons Window", "");
+ RNA_def_struct_ui_text(srna, "Theme Buttons Window", "Theme settings for the Buttons Window.");
rna_def_userdef_theme_spaces_main(srna);
@@ -613,7 +613,7 @@ static void rna_def_userdef_theme_space_time(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ThemeTimeline", NULL);
RNA_def_struct_sdna(srna, "ThemeSpace");
- RNA_def_struct_ui_text(srna, "Theme Timeline", "");
+ RNA_def_struct_ui_text(srna, "Theme Timeline", "Theme settings for the Timeline.");
rna_def_userdef_theme_spaces_main(srna);
@@ -636,7 +636,7 @@ static void rna_def_userdef_theme_space_sound(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ThemeAudioWindow", NULL);
RNA_def_struct_sdna(srna, "ThemeSpace");
- RNA_def_struct_ui_text(srna, "Theme Audio Window", "");
+ RNA_def_struct_ui_text(srna, "Theme Audio Window", "Theme settings for the Audio Window.");
rna_def_userdef_theme_spaces_main(srna);
@@ -664,7 +664,7 @@ static void rna_def_userdef_theme_space_image(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ThemeImageEditor", NULL);
RNA_def_struct_sdna(srna, "ThemeSpace");
- RNA_def_struct_ui_text(srna, "Theme Image Editor", "");
+ RNA_def_struct_ui_text(srna, "Theme Image Editor", "Theme settings for the Image Editor.");
rna_def_userdef_theme_spaces_main(srna);
rna_def_userdef_theme_spaces_vertex(srna);
@@ -684,7 +684,7 @@ static void rna_def_userdef_theme_space_seq(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ThemeSequenceEditor", NULL);
RNA_def_struct_sdna(srna, "ThemeSpace");
- RNA_def_struct_ui_text(srna, "Theme Sequence Editor", "");
+ RNA_def_struct_ui_text(srna, "Theme Sequence Editor", "Theme settings for the Sequence Editor.");
prop= RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
@@ -760,7 +760,7 @@ static void rna_def_userdef_theme_space_action(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ThemeActionEditor", NULL);
RNA_def_struct_sdna(srna, "ThemeSpace");
- RNA_def_struct_ui_text(srna, "Theme Action Editor", "");
+ RNA_def_struct_ui_text(srna, "Theme Action Editor", "Theme settings for the Action Editor.");
rna_def_userdef_theme_spaces_main(srna);
@@ -823,7 +823,7 @@ static void rna_def_userdef_theme_space_nla(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ThemeNLAEditor", NULL);
RNA_def_struct_sdna(srna, "ThemeSpace");
- RNA_def_struct_ui_text(srna, "Theme NLA Editor", "");
+ RNA_def_struct_ui_text(srna, "Theme NLA Editor", "Theme settings for the NLA Editor.");
rna_def_userdef_theme_spaces_main(srna);
@@ -869,7 +869,7 @@ static void rna_def_userdef_theme_colorset(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ThemeBoneColorSet", NULL);
RNA_def_struct_sdna(srna, "ThemeWireColor");
- RNA_def_struct_ui_text(srna, "Theme Bone Color Set", "Bone color sets.");
+ RNA_def_struct_ui_text(srna, "Theme Bone Color Set", "Theme settings for bone color sets.");
prop= RNA_def_property(srna, "normal", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "solid");
@@ -897,83 +897,83 @@ static void rna_def_userdef_themes(BlenderRNA *brna)
srna= RNA_def_struct(brna, "Theme", NULL);
RNA_def_struct_sdna(srna, "bTheme");
- RNA_def_struct_ui_text(srna, "Theme", "");
+ RNA_def_struct_ui_text(srna, "Theme", "Theme settings defining draw style and colors in the user interface.");
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_ui_text(prop, "Name", "Name of the theme.");
RNA_def_struct_name_property(srna, prop);
- prop= RNA_def_property(srna, "user_interface", PROP_POINTER, PROP_NONE);
+ prop= RNA_def_property(srna, "user_interface", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "tui");
RNA_def_property_struct_type(prop, "ThemeUserInterface");
RNA_def_property_ui_text(prop, "User Interface", "");
- prop= RNA_def_property(srna, "view_3d", PROP_POINTER, PROP_NONE);
+ prop= RNA_def_property(srna, "view_3d", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "tv3d");
RNA_def_property_struct_type(prop, "ThemeView3D");
RNA_def_property_ui_text(prop, "3D View", "");
- prop= RNA_def_property(srna, "ipo_curve_editor", PROP_POINTER, PROP_NONE);
+ prop= RNA_def_property(srna, "ipo_curve_editor", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "tipo");
RNA_def_property_struct_type(prop, "ThemeIpoEditor");
RNA_def_property_ui_text(prop, "Ipo Curve Editor", "");
- prop= RNA_def_property(srna, "file_browser", PROP_POINTER, PROP_NONE);
+ prop= RNA_def_property(srna, "file_browser", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "tfile");
RNA_def_property_struct_type(prop, "ThemeFileBrowser");
RNA_def_property_ui_text(prop, "File Browser", "");
- prop= RNA_def_property(srna, "nla_editor", PROP_POINTER, PROP_NONE);
+ prop= RNA_def_property(srna, "nla_editor", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "tnla");
RNA_def_property_struct_type(prop, "ThemeNLAEditor");
RNA_def_property_ui_text(prop, "NLA Editor", "");
- prop= RNA_def_property(srna, "action_editor", PROP_POINTER, PROP_NONE);
+ prop= RNA_def_property(srna, "action_editor", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "tact");
RNA_def_property_struct_type(prop, "ThemeActionEditor");
RNA_def_property_ui_text(prop, "Action Editor", "");
- prop= RNA_def_property(srna, "image_editor", PROP_POINTER, PROP_NONE);
+ prop= RNA_def_property(srna, "image_editor", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "tima");
RNA_def_property_struct_type(prop, "ThemeImageEditor");
RNA_def_property_ui_text(prop, "Image Editor", "");
- prop= RNA_def_property(srna, "sequence_editor", PROP_POINTER, PROP_NONE);
+ prop= RNA_def_property(srna, "sequence_editor", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "tseq");
RNA_def_property_struct_type(prop, "ThemeSequenceEditor");
RNA_def_property_ui_text(prop, "Sequence Editor", "");
- prop= RNA_def_property(srna, "buttons_window", PROP_POINTER, PROP_NONE);
+ prop= RNA_def_property(srna, "buttons_window", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "tbuts");
RNA_def_property_struct_type(prop, "ThemeButtonsWindow");
RNA_def_property_ui_text(prop, "Buttons Window", "");
- prop= RNA_def_property(srna, "text_editor", PROP_POINTER, PROP_NONE);
+ prop= RNA_def_property(srna, "text_editor", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "text");
RNA_def_property_struct_type(prop, "ThemeTextEditor");
RNA_def_property_ui_text(prop, "Text Editor", "");
- prop= RNA_def_property(srna, "timeline", PROP_POINTER, PROP_NONE);
+ prop= RNA_def_property(srna, "timeline", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "ttime");
RNA_def_property_struct_type(prop, "ThemeTimeline");
RNA_def_property_ui_text(prop, "Timeline", "");
- prop= RNA_def_property(srna, "node_editor", PROP_POINTER, PROP_NONE);
+ prop= RNA_def_property(srna, "node_editor", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "tnode");
RNA_def_property_struct_type(prop, "ThemeNodeEditor");
RNA_def_property_ui_text(prop, "Node Editor", "");
- prop= RNA_def_property(srna, "outliner", PROP_POINTER, PROP_NONE);
+ prop= RNA_def_property(srna, "outliner", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "toops");
RNA_def_property_struct_type(prop, "ThemeOutliner");
RNA_def_property_ui_text(prop, "Outliner", "");
- prop= RNA_def_property(srna, "user_preferences", PROP_POINTER, PROP_NONE);
+ prop= RNA_def_property(srna, "user_preferences", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "tinfo");
RNA_def_property_struct_type(prop, "ThemeUserPreferences");
RNA_def_property_ui_text(prop, "User Preferences", "");
- prop= RNA_def_property(srna, "bone_color_sets", PROP_COLLECTION, PROP_NONE);
+ prop= RNA_def_property(srna, "bone_color_sets", PROP_COLLECTION, PROP_NEVER_NULL);
RNA_def_property_collection_sdna(prop, NULL, "tarm", "");
RNA_def_property_struct_type(prop, "ThemeBoneColorSet");
RNA_def_property_ui_text(prop, "Bone Color Sets", "");
@@ -1378,7 +1378,7 @@ static void rna_def_userdef_edit(StructRNA *srna)
RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_LAMP);
RNA_def_property_ui_text(prop, "Duplicate Lamp", "Causes lamp data to be duplicated with Shift+D.");
- prop= RNA_def_property(srna, "duplicate_Material", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "duplicate_material", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_MAT);
RNA_def_property_ui_text(prop, "Duplicate Material", "Causes material data to be duplicated with Shift+D.");
@@ -1524,7 +1524,7 @@ static void rna_def_userdef_system(StructRNA *srna)
RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_CUSTOM_RANGE);
RNA_def_property_ui_text(prop, "Use Weight Color Range", "Enable color range used for weight visualization in weight painting mode.");
- prop= RNA_def_property(srna, "weight_color_range", PROP_POINTER, PROP_NONE);
+ prop= RNA_def_property(srna, "weight_color_range", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "coba_weight");
RNA_def_property_struct_type(prop, "ColorRamp");
RNA_def_property_ui_text(prop, "Weight Color Range", "Color range used for weight visualization in weight painting mode.");
diff --git a/source/blender/makesrna/intern/rna_vfont.c b/source/blender/makesrna/intern/rna_vfont.c
index 19fa1fd7ad1..ace6e4a6d25 100644
--- a/source/blender/makesrna/intern/rna_vfont.c
+++ b/source/blender/makesrna/intern/rna_vfont.c
@@ -41,7 +41,7 @@ void RNA_def_vfont(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "VectorFont", "ID");
- RNA_def_struct_ui_text(srna, "Vector Font", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Vector Font", "Vector font for Text objects.");
RNA_def_struct_sdna(srna, "VFont");
prop= RNA_def_property(srna, "filename", PROP_STRING, PROP_FILEPATH);
diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c
index c4a4780cb1d..632c3a2f96c 100644
--- a/source/blender/makesrna/intern/rna_wm.c
+++ b/source/blender/makesrna/intern/rna_wm.c
@@ -83,7 +83,7 @@ static void rna_def_operator(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "Operator", NULL);
- RNA_def_struct_ui_text(srna, "Operator", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Operator", "Storage of an operator being or executed, or registered after execution.");
RNA_def_struct_sdna(srna, "wmOperator");
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
@@ -92,13 +92,13 @@ static void rna_def_operator(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Name", "");
RNA_def_struct_name_property(srna, prop);
- prop= RNA_def_property(srna, "properties", PROP_POINTER, PROP_NONE);
+ prop= RNA_def_property(srna, "properties", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "OperatorProperties");
RNA_def_property_ui_text(prop, "Properties", "");
RNA_def_property_pointer_funcs(prop, "rna_Operator_properties_get", NULL, NULL);
srna= RNA_def_struct(brna, "OperatorProperties", NULL);
- RNA_def_struct_ui_text(srna, "Operator Properties", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Operator Properties", "Input properties of an Operator.");
RNA_def_struct_refine_func(srna, "rna_OperatorProperties_refine");
}
@@ -108,7 +108,7 @@ static void rna_def_operator_utils(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "OperatorMousePath", "IDPropertyGroup");
- RNA_def_struct_ui_text(srna, "Operator Mouse Path", "Mouse path values for operators.");
+ RNA_def_struct_ui_text(srna, "Operator Mouse Path", "Mouse path values for operators that record such paths.");
prop= RNA_def_property(srna, "loc", PROP_FLOAT, PROP_VECTOR);
RNA_def_property_flag(prop, PROP_IDPROPERTY);
@@ -126,7 +126,7 @@ static void rna_def_windowmanager(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "WindowManager", "ID");
- RNA_def_struct_ui_text(srna, "Window Manager", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "Window Manager", "Window manager datablock defining open windows and other user interface data.");
RNA_def_struct_sdna(srna, "wmWindowManager");
prop= RNA_def_property(srna, "operators", PROP_COLLECTION, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_world.c b/source/blender/makesrna/intern/rna_world.c
index d09776adfa4..261ae6d1fe4 100644
--- a/source/blender/makesrna/intern/rna_world.c
+++ b/source/blender/makesrna/intern/rna_world.c
@@ -30,6 +30,8 @@
#include "rna_internal.h"
+#include "DNA_material_types.h"
+#include "DNA_texture_types.h"
#include "DNA_world_types.h"
#ifdef RNA_RUNTIME
@@ -39,14 +41,88 @@ static void *rna_World_ambient_occlusion_get(PointerRNA *ptr)
return ptr->id.data;
}
+static void *rna_World_stars_get(PointerRNA *ptr)
+{
+ return ptr->id.data;
+}
+
+static void *rna_World_mist_get(PointerRNA *ptr)
+{
+ return ptr->id.data;
+}
+
+static void rna_World_mtex_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
+{
+ World *wo= (World*)ptr->data;
+ rna_iterator_array_begin(iter, (void*)wo->mtex, sizeof(MTex*), MAX_MTEX, NULL);
+}
+
+static void *rna_World_active_texture_get(PointerRNA *ptr)
+{
+ World *wo= (World*)ptr->data;
+
+ return wo->mtex[(int)wo->texact];
+}
+
#else
-void rna_def_ambient_occlusion(BlenderRNA *brna, StructRNA *parent)
+static void rna_def_world_mtex(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_mode_items[] = {
+ static EnumPropertyItem texco_items[] = {
+ {TEXCO_VIEW, "VIEW", "View", "Uses view vector for the texture coordinates."},
+ {TEXCO_GLOB, "GLOBAL", "Global", "Uses global coordinates for the texture coordinates (interior mist)."},
+ {TEXCO_ANGMAP, "ANGMAP", "AngMap", "Uses 360 degree angular coordinates, e.g. for spherical light probes."},
+ {TEXCO_H_SPHEREMAP, "SPHERE", "Sphere", "For 360 degree panorama sky, spherical mapped, only top half."},
+ {TEXCO_H_TUBEMAP, "TUBE", "Tube", "For 360 degree panorama sky, cylindrical mapped, only top half."},
+ {TEXCO_OBJECT, "OBJECT", "Object", "Uses linked object's coordinates for texture coordinates."},
+ {0, NULL, NULL, NULL}};
+
+ srna= RNA_def_struct(brna, "WorldTextureSlot", "TextureSlot");
+ RNA_def_struct_sdna(srna, "MTex");
+ RNA_def_struct_ui_text(srna, "World Texture Slot", "Texture slot for textures in a World datablock.");
+
+ /* map to */
+ prop= RNA_def_property(srna, "map_to_blend", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "mapto", WOMAP_BLEND);
+ RNA_def_property_ui_text(prop, "Map To Blend", "Causes the texture to affect the color progression of the background.");
+
+ prop= RNA_def_property(srna, "map_to_horizon", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "mapto", WOMAP_HORIZ);
+ RNA_def_property_ui_text(prop, "Map To Horizon", "Causes the texture to affect the color of the horizon.");
+
+ prop= RNA_def_property(srna, "map_to_zenith_up", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "mapto", WOMAP_ZENUP);
+ RNA_def_property_ui_text(prop, "Map To Zenith Up", "Causes the texture to affect the color of the zenith above.");
+
+ prop= RNA_def_property(srna, "map_to_zenith_down", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "mapto", WOMAP_ZENDOWN);
+ RNA_def_property_ui_text(prop, "Map To Zenith Down", "Causes the texture to affect the color of the zenith below.");
+
+ /* unused
+ prop= RNA_def_property(srna, "map_to_mist", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "mapto", WOMAP_MIST);
+ RNA_def_property_ui_text(prop, "Map To Mist", "Causes the texture to affect the intensity of the mist.");*/
+
+ prop= RNA_def_property(srna, "texture_coordinates", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "texco");
+ RNA_def_property_enum_items(prop, texco_items);
+ RNA_def_property_ui_text(prop, "Texture Coordinates", "Textures coordinates used to map the texture with.");
+
+ prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
+ RNA_def_property_pointer_sdna(prop, NULL, "object");
+ RNA_def_property_struct_type(prop, "Object");
+ RNA_def_property_ui_text(prop, "Object", "Object to use for mapping with Object texture coordinates.");
+}
+
+static void rna_def_ambient_occlusion(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ static EnumPropertyItem blend_mode_items[] = {
{WO_AOADD, "ADD", "Add", "Add light and shadow."},
{WO_AOSUB, "SUBTRACT", "Subtract", "Subtract light and shadow (needs a normal light to make anything visible.)"},
{WO_AOADDSUB, "BOTH", "Both", "Both lighten and darken."},
@@ -71,13 +147,8 @@ void rna_def_ambient_occlusion(BlenderRNA *brna, StructRNA *parent)
srna= RNA_def_struct(brna, "WorldAmbientOcclusion", NULL);
RNA_def_struct_sdna(srna, "World");
- RNA_def_struct_parent(srna, parent);
- RNA_def_struct_ui_text(srna, "Ambient Occlusion", "DOC_BROKEN");
-
- prop= RNA_def_property(parent, "ambient_occlusion", PROP_POINTER, PROP_NONE);
- RNA_def_property_struct_type(prop, "WorldAmbientOcclusion");
- RNA_def_property_pointer_funcs(prop, "rna_World_ambient_occlusion_get", NULL, NULL);
- RNA_def_property_ui_text(prop, "Ambient Occlusion", "");
+ RNA_def_struct_nested(brna, srna, "World");
+ RNA_def_struct_ui_text(srna, "Ambient Occlusion", "Ambient occlusion settings for a World datablock.");
prop= RNA_def_property(srna, "enabled", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", WO_AMB_OCC);
@@ -101,27 +172,27 @@ void rna_def_ambient_occlusion(BlenderRNA *brna, StructRNA *parent)
prop= RNA_def_property(srna, "bias", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "aobias");
RNA_def_property_range(prop, 0, 0.5);
- RNA_def_property_ui_text(prop, "Bias", "Bias (in radians) to prevent smoothed faces from showing banding.");
+ RNA_def_property_ui_text(prop, "Bias", "Bias (in radians) to prevent smoothed faces from showing banding (for Raytrace Constant Jittered).");
prop= RNA_def_property(srna, "threshold", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ao_adapt_thresh");
RNA_def_property_range(prop, 0, 1);
- RNA_def_property_ui_text(prop, "Threshold", "Samples below this threshold will be considered fully shadowed/unshadowed and skipped.");
+ RNA_def_property_ui_text(prop, "Threshold", "Samples below this threshold will be considered fully shadowed/unshadowed and skipped (for Raytrace Adaptive QMC).");
prop= RNA_def_property(srna, "adapt_to_speed", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ao_adapt_speed_fac");
RNA_def_property_range(prop, 0, 1);
- RNA_def_property_ui_text(prop, "Adapt To Speed", "Use the speed vector pass to reduce AO samples in fast moving pixels. Higher values result in more aggressive sample reduction. Requires Vec pass enabled.");
+ RNA_def_property_ui_text(prop, "Adapt To Speed", "Use the speed vector pass to reduce AO samples in fast moving pixels. Higher values result in more aggressive sample reduction. Requires Vec pass enabled (for Raytrace Adaptive QMC).");
prop= RNA_def_property(srna, "error_tolerance", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ao_approx_error");
RNA_def_property_range(prop, 0.0001, 1);
- RNA_def_property_ui_text(prop, "Error Tolerance", "Low values are slower and higher quality.");
+ RNA_def_property_ui_text(prop, "Error Tolerance", "Low values are slower and higher quality (for Approximate).");
prop= RNA_def_property(srna, "correction", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ao_approx_correction");
RNA_def_property_range(prop, 0, 1);
- RNA_def_property_ui_text(prop, "Correction", "Ad-hoc correction for over-occlusion due to the approximation.");
+ RNA_def_property_ui_text(prop, "Correction", "Ad-hoc correction for over-occlusion due to the approximation (for Approximate).");
prop= RNA_def_property(srna, "falloff", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "aomode", WO_AODIST);
@@ -129,17 +200,17 @@ void rna_def_ambient_occlusion(BlenderRNA *brna, StructRNA *parent)
prop= RNA_def_property(srna, "pixel_cache", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "aomode", WO_AOCACHE);
- RNA_def_property_ui_text(prop, "Pixel Cache", "Cache AO results in pixels and interpolate over neighbouring pixels for speedup.");
+ RNA_def_property_ui_text(prop, "Pixel Cache", "Cache AO results in pixels and interpolate over neighbouring pixels for speedup (for Approximate).");
prop= RNA_def_property(srna, "samples", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "aosamp");
RNA_def_property_range(prop, 0, 1);
RNA_def_property_ui_text(prop, "Samples", "");
- prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
+ prop= RNA_def_property(srna, "blend_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "aomix");
- RNA_def_property_enum_items(prop, prop_mode_items);
- RNA_def_property_ui_text(prop, "Mode", "");
+ RNA_def_property_enum_items(prop, blend_mode_items);
+ RNA_def_property_ui_text(prop, "Blend Mode", "Blending mode for how AO mixes with material shading.");
prop= RNA_def_property(srna, "color", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "aocolor");
@@ -149,7 +220,7 @@ void rna_def_ambient_occlusion(BlenderRNA *brna, StructRNA *parent)
prop= RNA_def_property(srna, "sample_method", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "ao_samp_method");
RNA_def_property_enum_items(prop, prop_sample_method_items);
- RNA_def_property_ui_text(prop, "Sample Method", "Method for generating shadow samples.");
+ RNA_def_property_ui_text(prop, "Sample Method", "Method for generating shadow samples (for Raytrace).");
prop= RNA_def_property(srna, "gather_method", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "ao_gather_method");
@@ -159,38 +230,117 @@ void rna_def_ambient_occlusion(BlenderRNA *brna, StructRNA *parent)
prop= RNA_def_property(srna, "passes", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "ao_approx_passes");
RNA_def_property_range(prop, 0, 10);
- RNA_def_property_ui_text(prop, "Passes", "Number of preprocessing passes to reduce overocclusion.");
+ RNA_def_property_ui_text(prop, "Passes", "Number of preprocessing passes to reduce overocclusion (for Approximate).");
+}
+
+static void rna_def_world_mist(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ srna= RNA_def_struct(brna, "WorldMistSettings", NULL);
+ RNA_def_struct_sdna(srna, "World");
+ RNA_def_struct_nested(brna, srna, "World");
+ RNA_def_struct_ui_text(srna, "World Mist", "Mist settings for a World datatblock.");
+
+ prop= RNA_def_property(srna, "enabled", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "mode", WO_MIST);
+ RNA_def_property_ui_text(prop, "Enabled", "Enable mist, occluding objects with the environment color as they are further away.");
+
+ prop= RNA_def_property(srna, "intensity", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "misi");
+ RNA_def_property_range(prop, 0, 1);
+ RNA_def_property_ui_text(prop, "Intensity", "Intensity of the mist.");
+
+ prop= RNA_def_property(srna, "start", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "miststa");
+ RNA_def_property_range(prop, 0, FLT_MAX);
+ RNA_def_property_ui_range(prop, 0, 10000, 10, 2);
+ RNA_def_property_ui_text(prop, "Start", "Starting distance of the mist.");
+
+ prop= RNA_def_property(srna, "depth", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "mistdist");
+ RNA_def_property_range(prop, 0, FLT_MAX);
+ RNA_def_property_ui_range(prop, 0, 10000, 10, 2);
+ RNA_def_property_ui_text(prop, "Depth", "Depth of the mist.");
+
+ prop= RNA_def_property(srna, "height", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "misthi");
+ RNA_def_property_range(prop, 0, 100);
+ RNA_def_property_ui_text(prop, "Height", "Factor for a less dense mist with increasing height.");
+}
+
+static void rna_def_world_stars(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ static EnumPropertyItem falloff_items[] = {
+ {0, "QUADRATIC", "Quadratic", "Mist uses quadratic progression."},
+ {1, "LINEAR", "Linear", "Mist uses linear progression."},
+ {2, "INVERSE_QUADRATIC", "Inverse Quadratic", "Mist uses inverse quadratic progression."},
+ {0, NULL, NULL, NULL}};
+
+ srna= RNA_def_struct(brna, "WorldStarsSettings", NULL);
+ RNA_def_struct_sdna(srna, "World");
+ RNA_def_struct_nested(brna, srna, "World");
+ RNA_def_struct_ui_text(srna, "World Stars", "Stars setting for a World datatblock.");
+
+ prop= RNA_def_property(srna, "enabled", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "mode", WO_STARS);
+ RNA_def_property_ui_text(prop, "Enabled", "Enable starfield generation.");
+
+ prop= RNA_def_property(srna, "size", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "starsize");
+ RNA_def_property_range(prop, 0, 10);
+ RNA_def_property_ui_text(prop, "Size", "Average screen dimension of stars.");
+
+ prop= RNA_def_property(srna, "min_distance", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "starmindist");
+ RNA_def_property_range(prop, 0, 1000);
+ RNA_def_property_ui_text(prop, "Minimum Distance", "Minimum distance to the camera for stars.");
+
+ prop= RNA_def_property(srna, "average_separation", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "stardist");
+ RNA_def_property_range(prop, 2, 1000);
+ RNA_def_property_ui_text(prop, "Average Separation", "Average distance between any two stars.");
+
+ prop= RNA_def_property(srna, "color_randomization", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "starcolnoise");
+ RNA_def_property_range(prop, 0, 1);
+ RNA_def_property_ui_text(prop, "Color Randomization", "Randomizes star color.");
+
+ prop= RNA_def_property(srna, "falloff", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "mistype");
+ RNA_def_property_enum_items(prop, falloff_items);
+ RNA_def_property_ui_text(prop, "Falloff", "Falloff method for mist.");
+
+ /* unused
+ prop= RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR);
+ RNA_def_property_float_sdna(prop, NULL, "starr");
+ RNA_def_property_array(prop, 3);
+ RNA_def_property_ui_text(prop, "Color", "Stars color.");*/
}
void RNA_def_world(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
-/*
- float horr, horg, horb, hork;
- float zenr, zeng, zenb, zenk;
- float ambr, ambg, ambb, ambk;
-
- static EnumPropertyItem gameproperty_types_items[] ={
- {PROP_BOOL, "BOOL", "Boolean", ""},
- {PROP_INT, "INT", "Integer", ""},
- {PROP_FLOAT, "FLOAT", "Float", ""},
- {PROP_STRING, "STRING", "String", ""},
- {PROP_TIME, "TIME", "Time", ""},
+
+ static EnumPropertyItem physics_engine_items[] = {
+ {WOPHY_NONE, "NONE", "None", ""},
+ //{WOPHY_ENJI, "ENJI", "Enji", ""},
+ {WOPHY_SUMO, "SUMO", "Sumo (Deprecated)", ""},
+ //{WOPHY_DYNAMO, "DYNAMO", "Dynamo", ""},
+ //{WOPHY_ODE, "ODE", "ODE", ""},
+ {WOPHY_BULLET, "BULLET", "Bullet", ""},
{0, NULL, NULL, NULL}};
-*/
+
srna= RNA_def_struct(brna, "World", "ID");
- RNA_def_struct_ui_text(srna, "World", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "World", "World datablock describing the environment and ambient lighting of a scene.");
rna_def_ipo_common(srna);
-
- rna_def_ambient_occlusion(brna, srna);
-
-/*
- prop= RNA_def_property(srna, "mtex", PROP_POINTER, PROP_NONE);
- RNA_def_property_struct_type(prop, "MTex");
- RNA_def_property_ui_text(prop, "MTex", "MTex associated with this world setting.");
-*/
+ rna_def_mtex_common(srna, "rna_World_mtex_begin", "rna_World_active_texture_get", "WorldTextureSlot");
/* colors */
prop= RNA_def_property(srna, "horizon_color", PROP_FLOAT, PROP_COLOR);
@@ -232,63 +382,42 @@ void RNA_def_world(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "skytype", WO_SKYREAL);
RNA_def_property_ui_text(prop, "Real Sky", "Renders background with a real horizon.");
- /* mist */
- prop= RNA_def_property(srna, "mist_intensity", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "misi");
- RNA_def_property_range(prop, 0, 1);
- RNA_def_property_ui_text(prop, "Mist Intensity", "");
+ /* physics */
+ prop= RNA_def_property(srna, "physics_engine", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "physicsEngine");
+ RNA_def_property_enum_items(prop, physics_engine_items);
+ RNA_def_property_ui_text(prop, "Physics Engine", "Physics engine used for physics simulation in the game engine.");
- prop= RNA_def_property(srna, "mist_start", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "miststa");
- RNA_def_property_range(prop, 0, FLT_MAX);
- RNA_def_property_ui_range(prop, 0, 10000, 10, 2);
- RNA_def_property_ui_text(prop, "Mist Intensity", "");
-
- prop= RNA_def_property(srna, "mist_depth", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "mistdist");
- RNA_def_property_range(prop, 0, FLT_MAX);
- RNA_def_property_ui_range(prop, 0, 10000, 10, 2);
- RNA_def_property_ui_text(prop, "Mist Depth", "");
-
- prop= RNA_def_property(srna, "mist_height", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "misthi");
- RNA_def_property_range(prop, 0, 100);
- RNA_def_property_ui_text(prop, "Mist Height", "");
-
- /* stars */
- prop= RNA_def_property(srna, "star_size", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "starsize");
- RNA_def_property_range(prop, 0, 10);
- RNA_def_property_ui_text(prop, "Star Size", "");
-
- prop= RNA_def_property(srna, "star_minimum_distance", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "starmindist");
- RNA_def_property_range(prop, 0, 1000);
- RNA_def_property_ui_text(prop, "Star Minimum Distance", "");
+ prop= RNA_def_property(srna, "physics_gravity", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "gravity");
+ RNA_def_property_range(prop, 0.0, 20.0);
+ RNA_def_property_ui_text(prop, "Physics Gravity", "Gravitational constant used for physics simulation in the game engine.");
- prop= RNA_def_property(srna, "star_average_separation", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "stardist");
- RNA_def_property_range(prop, 2, 1000);
- RNA_def_property_ui_text(prop, "Star Average Separation", "");
-
- prop= RNA_def_property(srna, "star_color_randomization", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "starcolnoise");
- RNA_def_property_range(prop, 0, 1);
- RNA_def_property_ui_text(prop, "Star Color Randomization", "");
-
- prop= RNA_def_property(srna, "star_color", PROP_FLOAT, PROP_COLOR);
- RNA_def_property_float_sdna(prop, NULL, "starr");
- RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "Star Color", "");
-
- /* modes */
- prop= RNA_def_property(srna, "mist", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mode", WO_MIST);
- RNA_def_property_ui_text(prop, "Mist", "");
-
- prop= RNA_def_property(srna, "stars", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mode", WO_STARS);
- RNA_def_property_ui_text(prop, "Stars", "");
+ /* nested structs */
+ prop= RNA_def_property(srna, "ambient_occlusion", PROP_POINTER, PROP_NEVER_NULL);
+ RNA_def_property_struct_type(prop, "WorldAmbientOcclusion");
+ RNA_def_property_pointer_funcs(prop, "rna_World_ambient_occlusion_get", NULL, NULL);
+ RNA_def_property_ui_text(prop, "Ambient Occlusion", "World ambient occlusion settings.");
+
+ prop= RNA_def_property(srna, "mist", PROP_POINTER, PROP_NEVER_NULL);
+ RNA_def_property_struct_type(prop, "WorldMistSettings");
+ RNA_def_property_pointer_funcs(prop, "rna_World_mist_get", NULL, NULL);
+ RNA_def_property_ui_text(prop, "Mist", "World mist settings.");
+
+ prop= RNA_def_property(srna, "stars", PROP_POINTER, PROP_NEVER_NULL);
+ RNA_def_property_struct_type(prop, "WorldStarsSettings");
+ RNA_def_property_pointer_funcs(prop, "rna_World_stars_get", NULL, NULL);
+ RNA_def_property_ui_text(prop, "Stars", "World stars settings.");
+
+ prop= RNA_def_property(srna, "script_link", PROP_POINTER, PROP_NEVER_NULL);
+ RNA_def_property_pointer_sdna(prop, NULL, "scriptlink");
+ RNA_def_property_flag(prop, PROP_NOT_EDITABLE);
+ RNA_def_property_ui_text(prop, "Script Link", "Scripts linked to this object.");
+
+ rna_def_ambient_occlusion(brna);
+ rna_def_world_mist(brna);
+ rna_def_world_stars(brna);
+ rna_def_world_mtex(brna);
}
#endif
diff --git a/source/blender/python/epy_doc_gen.py b/source/blender/python/epy_doc_gen.py
index 99faf57a1bd..afe5468070b 100644
--- a/source/blender/python/epy_doc_gen.py
+++ b/source/blender/python/epy_doc_gen.py
@@ -111,7 +111,7 @@ def rna2epy(target_path):
# Now write children recursively
for child in structs:
- if rna_struct == child.parent:
+ if rna_struct == child.nested:
write_struct(child, structs, ident + '\t')
@@ -155,7 +155,7 @@ def rna2epy(target_path):
for rna_struct in structs:
- if rna_struct.parent:
+ if rna_struct.nested:
continue
write_struct(rna_struct, structs, '')