Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-09-18 06:35:26 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-09-18 06:35:26 +0400
commit96ada15d7940a72744dc1a63f13dbd9383b42a11 (patch)
tree4e5527c0be1706fa28f715305d7f5b8eea4379ae /source/blender/makesrna
parent1b5d16f1bf80f2da8d3d4da5bbfaf4819c14a225 (diff)
parent5db33d11bd569f4040fd58e4f39cf97ed94fec29 (diff)
svn merge -r40197:40311 ^/trunk/blender
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/makesrna.c14
-rw-r--r--source/blender/makesrna/intern/rna_ID.c2
-rw-r--r--source/blender/makesrna/intern/rna_action.c2
-rw-r--r--source/blender/makesrna/intern/rna_actuator.c6
-rw-r--r--source/blender/makesrna/intern/rna_animation.c2
-rw-r--r--source/blender/makesrna/intern/rna_armature.c4
-rw-r--r--source/blender/makesrna/intern/rna_constraint.c2
-rw-r--r--source/blender/makesrna/intern/rna_fcurve.c4
-rw-r--r--source/blender/makesrna/intern/rna_key.c2
-rw-r--r--source/blender/makesrna/intern/rna_mesh.c4
-rw-r--r--source/blender/makesrna/intern/rna_modifier.c2
-rw-r--r--source/blender/makesrna/intern/rna_nla.c2
-rw-r--r--source/blender/makesrna/intern/rna_nodetree.c2
-rw-r--r--source/blender/makesrna/intern/rna_object.c12
-rw-r--r--source/blender/makesrna/intern/rna_pose.c6
-rw-r--r--source/blender/makesrna/intern/rna_property.c2
-rw-r--r--source/blender/makesrna/intern/rna_scene.c10
-rw-r--r--source/blender/makesrna/intern/rna_sequencer.c2
-rw-r--r--source/blender/makesrna/intern/rna_text.c4
-rw-r--r--source/blender/makesrna/intern/rna_texture.c2
-rw-r--r--source/blender/makesrna/intern/rna_texture_api.c2
-rw-r--r--source/blender/makesrna/intern/rna_wm.c22
22 files changed, 58 insertions, 52 deletions
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c
index bc30210bfbb..23100fa8bd7 100644
--- a/source/blender/makesrna/intern/makesrna.c
+++ b/source/blender/makesrna/intern/makesrna.c
@@ -522,11 +522,14 @@ static char *rna_def_property_get_func(FILE *f, StructRNA *srna, PropertyRNA *pr
fprintf(f, " %s(ptr, value);\n", manualfunc);
}
else {
+ const PropertySubType subtype= prop->subtype;
+ const char *string_copy_func= (subtype==PROP_FILEPATH || subtype==PROP_DIRPATH || subtype==PROP_FILENAME) ? "BLI_strncpy" : "BLI_strncpy_utf8";
+
rna_print_data_get(f, dp);
if(sprop->maxlength)
- fprintf(f, " BLI_strncpy(value, data->%s, %d);\n", dp->dnaname, sprop->maxlength);
+ fprintf(f, " %s(value, data->%s, %d);\n", string_copy_func, dp->dnaname, sprop->maxlength);
else
- fprintf(f, " BLI_strncpy(value, data->%s, sizeof(data->%s));\n", dp->dnaname, dp->dnaname);
+ fprintf(f, " %s(value, data->%s, sizeof(data->%s));\n", string_copy_func, dp->dnaname, dp->dnaname);
}
fprintf(f, "}\n\n");
break;
@@ -734,11 +737,14 @@ static char *rna_def_property_set_func(FILE *f, StructRNA *srna, PropertyRNA *pr
fprintf(f, " %s(ptr, value);\n", manualfunc);
}
else {
+ const PropertySubType subtype= prop->subtype;
+ const char *string_copy_func= (subtype==PROP_FILEPATH || subtype==PROP_DIRPATH || subtype==PROP_FILENAME) ? "BLI_strncpy" : "BLI_strncpy_utf8";
+
rna_print_data_get(f, dp);
if(sprop->maxlength)
- fprintf(f, " BLI_strncpy(data->%s, value, %d);\n", dp->dnaname, sprop->maxlength);
+ fprintf(f, " %s(data->%s, value, %d);\n", string_copy_func, dp->dnaname, sprop->maxlength);
else
- fprintf(f, " BLI_strncpy(data->%s, value, sizeof(data->%s));\n", dp->dnaname, dp->dnaname);
+ fprintf(f, " %s(data->%s, value, sizeof(data->%s));\n", string_copy_func, dp->dnaname, dp->dnaname);
}
fprintf(f, "}\n\n");
break;
diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c
index 82217cdc3e4..05786cedeac 100644
--- a/source/blender/makesrna/intern/rna_ID.c
+++ b/source/blender/makesrna/intern/rna_ID.c
@@ -99,7 +99,7 @@ int rna_ID_name_length(PointerRNA *ptr)
void rna_ID_name_set(PointerRNA *ptr, const char *value)
{
ID *id= (ID*)ptr->data;
- BLI_strncpy(id->name+2, value, sizeof(id->name)-2);
+ BLI_strncpy_utf8(id->name+2, value, sizeof(id->name)-2);
test_idbutton(id->name+2);
}
diff --git a/source/blender/makesrna/intern/rna_action.c b/source/blender/makesrna/intern/rna_action.c
index 815a9c92968..53e1bf7e6f6 100644
--- a/source/blender/makesrna/intern/rna_action.c
+++ b/source/blender/makesrna/intern/rna_action.c
@@ -137,7 +137,7 @@ static TimeMarker *rna_Action_pose_markers_new(bAction *act, ReportList *reports
TimeMarker *marker = MEM_callocN(sizeof(TimeMarker), "TimeMarker");
marker->flag= 1;
marker->frame= 1;
- BLI_strncpy(marker->name, name, sizeof(marker->name));
+ BLI_strncpy_utf8(marker->name, name, sizeof(marker->name));
BLI_addtail(&act->markers, marker);
return marker;
}
diff --git a/source/blender/makesrna/intern/rna_actuator.c b/source/blender/makesrna/intern/rna_actuator.c
index 7356af05dcb..6aff68a9c09 100644
--- a/source/blender/makesrna/intern/rna_actuator.c
+++ b/source/blender/makesrna/intern/rna_actuator.c
@@ -1931,9 +1931,9 @@ static void rna_def_steering_actuator(BlenderRNA *brna)
{1, "X", 0, "X", ""},
{2, "Y", 0, "Y", ""},
{3, "Z", 0, "Z", ""},
- {4, "-X", 0, "-X", ""},
- {5, "-Y", 0, "-Y", ""},
- {6, "-Z", 0, "-Z", ""},
+ {4, "NEG_X", 0, "-X", ""},
+ {5, "NEG_Y", 0, "-Y", ""},
+ {6, "NEG_Z", 0, "-Z", ""},
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "SteeringActuator", "Actuator");
diff --git a/source/blender/makesrna/intern/rna_animation.c b/source/blender/makesrna/intern/rna_animation.c
index 0395a54be8e..2f5f22c52d5 100644
--- a/source/blender/makesrna/intern/rna_animation.c
+++ b/source/blender/makesrna/intern/rna_animation.c
@@ -252,7 +252,7 @@ static void rna_ksPath_RnaPath_get(PointerRNA *ptr, char *value)
if (ksp->rna_path)
strcpy(value, ksp->rna_path);
else
- strcpy(value, "");
+ value[0]= '\0';
}
static int rna_ksPath_RnaPath_length(PointerRNA *ptr)
diff --git a/source/blender/makesrna/intern/rna_armature.c b/source/blender/makesrna/intern/rna_armature.c
index e2399b5b57c..4ed5d2a125a 100644
--- a/source/blender/makesrna/intern/rna_armature.c
+++ b/source/blender/makesrna/intern/rna_armature.c
@@ -253,7 +253,7 @@ static void rna_EditBone_name_set(PointerRNA *ptr, const char *value)
char oldname[sizeof(ebone->name)], newname[sizeof(ebone->name)];
/* need to be on the stack */
- BLI_strncpy(newname, value, sizeof(ebone->name));
+ BLI_strncpy_utf8(newname, value, sizeof(ebone->name));
BLI_strncpy(oldname, ebone->name, sizeof(ebone->name));
ED_armature_bone_rename(arm, oldname, newname);
@@ -266,7 +266,7 @@ static void rna_Bone_name_set(PointerRNA *ptr, const char *value)
char oldname[sizeof(bone->name)], newname[sizeof(bone->name)];
/* need to be on the stack */
- BLI_strncpy(newname, value, sizeof(bone->name));
+ BLI_strncpy_utf8(newname, value, sizeof(bone->name));
BLI_strncpy(oldname, bone->name, sizeof(bone->name));
ED_armature_bone_rename(arm, oldname, newname);
diff --git a/source/blender/makesrna/intern/rna_constraint.c b/source/blender/makesrna/intern/rna_constraint.c
index 22d9a19f933..fdbb4f09f93 100644
--- a/source/blender/makesrna/intern/rna_constraint.c
+++ b/source/blender/makesrna/intern/rna_constraint.c
@@ -170,7 +170,7 @@ static void rna_Constraint_name_set(PointerRNA *ptr, const char *value)
BLI_strncpy(oldname, con->name, sizeof(con->name));
/* copy the new name into the name slot */
- BLI_strncpy(con->name, value, sizeof(con->name));
+ BLI_strncpy_utf8(con->name, value, sizeof(con->name));
/* make sure name is unique */
if (ptr->id.data) {
diff --git a/source/blender/makesrna/intern/rna_fcurve.c b/source/blender/makesrna/intern/rna_fcurve.c
index e922a007249..c0c8ac6b88a 100644
--- a/source/blender/makesrna/intern/rna_fcurve.c
+++ b/source/blender/makesrna/intern/rna_fcurve.c
@@ -215,7 +215,7 @@ static void rna_DriverTarget_RnaPath_get(PointerRNA *ptr, char *value)
if (dtar->rna_path)
strcpy(value, dtar->rna_path);
else
- strcpy(value, "");
+ value[0]= '\0';
}
static int rna_DriverTarget_RnaPath_length(PointerRNA *ptr)
@@ -309,7 +309,7 @@ static void rna_FCurve_RnaPath_get(PointerRNA *ptr, char *value)
if (fcu->rna_path)
strcpy(value, fcu->rna_path);
else
- strcpy(value, "");
+ value[0]= '\0';
}
static int rna_FCurve_RnaPath_length(PointerRNA *ptr)
diff --git a/source/blender/makesrna/intern/rna_key.c b/source/blender/makesrna/intern/rna_key.c
index 3e65eb8665e..ad6f67cddaf 100644
--- a/source/blender/makesrna/intern/rna_key.c
+++ b/source/blender/makesrna/intern/rna_key.c
@@ -76,7 +76,7 @@ void rna_ShapeKey_name_set(PointerRNA *ptr, const char *value)
BLI_strncpy(oldname, kb->name, sizeof(kb->name));
/* copy the new name into the name slot */
- BLI_strncpy(kb->name, value, sizeof(kb->name));
+ BLI_strncpy_utf8(kb->name, value, sizeof(kb->name));
/* make sure the name is truly unique */
if (ptr->id.data) {
diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c
index 16817001bf4..2fdb9923ca5 100644
--- a/source/blender/makesrna/intern/rna_mesh.c
+++ b/source/blender/makesrna/intern/rna_mesh.c
@@ -708,7 +708,7 @@ static void rna_MeshTextureFaceLayer_name_set(PointerRNA *ptr, const char *value
Mesh *me= (Mesh*)ptr->id.data;
CustomData *fdata= rna_mesh_fdata(me);
CustomDataLayer *cdl= (CustomDataLayer*)ptr->data;
- BLI_strncpy(cdl->name, value, sizeof(cdl->name));
+ BLI_strncpy_utf8(cdl->name, value, sizeof(cdl->name));
CustomData_set_layer_unique_name(fdata, cdl - fdata->layers);
}
@@ -820,7 +820,7 @@ static void rna_MeshColorLayer_name_set(PointerRNA *ptr, const char *value)
Mesh *me= (Mesh*)ptr->id.data;
CustomData *fdata= rna_mesh_fdata(me);
CustomDataLayer *cdl= (CustomDataLayer*)ptr->data;
- BLI_strncpy(cdl->name, value, sizeof(cdl->name));
+ BLI_strncpy_utf8(cdl->name, value, sizeof(cdl->name));
CustomData_set_layer_unique_name(fdata, cdl - fdata->layers);
}
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index 464f676b7f6..b83f06c633c 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -211,7 +211,7 @@ void rna_Modifier_name_set(PointerRNA *ptr, const char *value)
BLI_strncpy(oldname, md->name, sizeof(md->name));
/* copy the new name into the name slot */
- BLI_strncpy(md->name, value, sizeof(md->name));
+ BLI_strncpy_utf8(md->name, value, sizeof(md->name));
/* make sure the name is truly unique */
if (ptr->id.data) {
diff --git a/source/blender/makesrna/intern/rna_nla.c b/source/blender/makesrna/intern/rna_nla.c
index ef4adde6fb4..2a234dfaa61 100644
--- a/source/blender/makesrna/intern/rna_nla.c
+++ b/source/blender/makesrna/intern/rna_nla.c
@@ -59,7 +59,7 @@ static void rna_NlaStrip_name_set(PointerRNA *ptr, const char *value)
NlaStrip *data= (NlaStrip *)ptr->data;
/* copy the name first */
- BLI_strncpy(data->name, value, sizeof(data->name));
+ BLI_strncpy_utf8(data->name, value, sizeof(data->name));
/* validate if there's enough info to do so */
if (ptr->id.data) {
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index 0554e4d00ad..61947977fee 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -361,7 +361,7 @@ static void rna_Node_name_set(PointerRNA *ptr, const char *value)
/* make a copy of the old name first */
BLI_strncpy(oldname, node->name, sizeof(node->name));
/* set new name */
- BLI_strncpy(node->name, value, sizeof(node->name));
+ BLI_strncpy_utf8(node->name, value, sizeof(node->name));
nodeUniqueName(ntree, node);
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index 59f5173f7ef..e777d2df98b 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -466,7 +466,7 @@ void rna_VertexGroup_name_set(PointerRNA *ptr, const char *value)
{
Object *ob= (Object *)ptr->id.data;
bDeformGroup *dg= (bDeformGroup *)ptr->data;
- BLI_strncpy(dg->name, value, sizeof(dg->name));
+ BLI_strncpy_utf8(dg->name, value, sizeof(dg->name));
defgroup_unique_name(dg, ob);
}
@@ -512,7 +512,7 @@ void rna_object_vgroup_name_index_get(PointerRNA *ptr, char *value, int index)
dg= BLI_findlink(&ob->defbase, index-1);
if(dg) BLI_strncpy(value, dg->name, sizeof(dg->name));
- else BLI_strncpy(value, "", sizeof(dg->name));
+ else value[0]= '\0';
}
int rna_object_vgroup_name_index_length(PointerRNA *ptr, int index)
@@ -535,7 +535,7 @@ void rna_object_vgroup_name_set(PointerRNA *ptr, const char *value, char *result
Object *ob= (Object*)ptr->id.data;
bDeformGroup *dg= defgroup_find_name(ob, value);
if(dg) {
- BLI_strncpy(result, value, maxlen);
+ BLI_strncpy(result, value, maxlen); /* no need for BLI_strncpy_utf8, since this matches an existing group */
return;
}
@@ -562,7 +562,7 @@ void rna_object_uvlayer_name_set(PointerRNA *ptr, const char *value, char *resul
}
}
- BLI_strncpy(result, "", maxlen);
+ result[0]= '\0';
}
void rna_object_vcollayer_name_set(PointerRNA *ptr, const char *value, char *result, int maxlen)
@@ -585,7 +585,7 @@ void rna_object_vcollayer_name_set(PointerRNA *ptr, const char *value, char *res
}
}
- BLI_strncpy(result, "", maxlen);
+ result[0]= '\0';
}
static int rna_Object_active_material_index_get(PointerRNA *ptr)
@@ -836,7 +836,7 @@ static void rna_MaterialSlot_name_get(PointerRNA *ptr, char *str)
if(ma)
strcpy(str, ma->id.name+2);
else
- strcpy(str, "");
+ str[0]= '\0';
}
static void rna_MaterialSlot_update(Main *bmain, Scene *scene, PointerRNA *ptr)
diff --git a/source/blender/makesrna/intern/rna_pose.c b/source/blender/makesrna/intern/rna_pose.c
index 0dd8218d1b9..434634f6b10 100644
--- a/source/blender/makesrna/intern/rna_pose.c
+++ b/source/blender/makesrna/intern/rna_pose.c
@@ -222,7 +222,7 @@ static void rna_PoseChannel_name_set(PointerRNA *ptr, const char *value)
char oldname[sizeof(pchan->name)], newname[sizeof(pchan->name)];
/* need to be on the stack */
- BLI_strncpy(newname, value, sizeof(pchan->name));
+ BLI_strncpy_utf8(newname, value, sizeof(pchan->name));
BLI_strncpy(oldname, pchan->name, sizeof(pchan->name));
ED_armature_bone_rename(ob->data, oldname, newname);
@@ -411,7 +411,7 @@ static void rna_pose_bgroup_name_index_get(PointerRNA *ptr, char *value, int ind
grp= BLI_findlink(&pose->agroups, index-1);
if(grp) BLI_strncpy(value, grp->name, sizeof(grp->name));
- else BLI_strncpy(value, "", sizeof(grp->name)); // XXX if invalid pointer, won't this crash?
+ else value[0]= '\0';
}
static int rna_pose_bgroup_name_index_length(PointerRNA *ptr, int index)
@@ -451,7 +451,7 @@ static void rna_pose_pgroup_name_set(PointerRNA *ptr, const char *value, char *r
}
}
- BLI_strncpy(result, "", maxlen);
+ result[0]= '\0';
}
#endif
diff --git a/source/blender/makesrna/intern/rna_property.c b/source/blender/makesrna/intern/rna_property.c
index 9fd5610a577..e2b886b8d38 100644
--- a/source/blender/makesrna/intern/rna_property.c
+++ b/source/blender/makesrna/intern/rna_property.c
@@ -88,7 +88,7 @@ static void rna_GameProperty_type_set(PointerRNA *ptr, int value)
static void rna_GameProperty_name_set(PointerRNA *ptr, const char *value)
{
bProperty *prop= (bProperty*)(ptr->data);
- BLI_strncpy(prop->name, value, sizeof(prop->name));
+ BLI_strncpy_utf8(prop->name, value, sizeof(prop->name));
unique_property(NULL, prop, 1);
}
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 3a0183d70fb..3e7b1692a26 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -737,7 +737,7 @@ static void rna_RenderSettings_engine_set(PointerRNA *ptr, int value)
RenderEngineType *type= BLI_findlink(&R_engines, value);
if(type)
- BLI_strncpy(rd->engine, type->idname, sizeof(rd->engine));
+ BLI_strncpy_utf8(rd->engine, type->idname, sizeof(rd->engine));
}
static EnumPropertyItem *rna_RenderSettings_engine_itemf(bContext *UNUSED(C), PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), int *free)
@@ -810,7 +810,7 @@ static void rna_SceneRenderLayer_name_set(PointerRNA *ptr, const char *value)
Scene *scene= (Scene*)ptr->id.data;
SceneRenderLayer *rl= (SceneRenderLayer*)ptr->data;
- BLI_strncpy(rl->name, value, sizeof(rl->name));
+ BLI_strncpy_utf8(rl->name, value, sizeof(rl->name));
if(scene->nodetree) {
bNode *node;
@@ -1011,7 +1011,7 @@ static TimeMarker *rna_TimeLine_add(Scene *scene, const char name[])
TimeMarker *marker = MEM_callocN(sizeof(TimeMarker), "TimeMarker");
marker->flag= SELECT;
marker->frame= 1;
- BLI_strncpy(marker->name, name, sizeof(marker->name));
+ BLI_strncpy_utf8(marker->name, name, sizeof(marker->name));
BLI_addtail(&scene->markers, marker);
return marker;
}
@@ -1819,8 +1819,8 @@ static void rna_def_scene_game_data(BlenderRNA *brna)
static EnumPropertyItem obstacle_simulation_items[] = {
{OBSTSIMULATION_NONE, "NONE", 0, "None", ""},
- {OBSTSIMULATION_TOI_rays, "RVO (rays)", 0, "RVO (rays)", ""},
- {OBSTSIMULATION_TOI_cells, "RVO (cells)", 0, "RVO (cells)", ""},
+ {OBSTSIMULATION_TOI_rays, "RVO_RAYS", 0, "RVO (rays)", ""},
+ {OBSTSIMULATION_TOI_cells, "RVO_CELLS", 0, "RVO (cells)", ""},
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "SceneGameData", NULL);
diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c
index 627c2274965..79724adf91c 100644
--- a/source/blender/makesrna/intern/rna_sequencer.c
+++ b/source/blender/makesrna/intern/rna_sequencer.c
@@ -359,7 +359,7 @@ static void rna_Sequence_name_set(PointerRNA *ptr, const char *value)
BLI_strncpy(oldname, seq->name+2, sizeof(seq->name)-2);
/* copy the new name into the name slot */
- BLI_strncpy(seq->name+2, value, sizeof(seq->name)-2);
+ BLI_strncpy_utf8(seq->name+2, value, sizeof(seq->name)-2);
/* make sure the name is unique */
seqbase_unique_name_recursive(&scene->ed->seqbase, seq);
diff --git a/source/blender/makesrna/intern/rna_text.c b/source/blender/makesrna/intern/rna_text.c
index 959f9db851b..6a1e93fce41 100644
--- a/source/blender/makesrna/intern/rna_text.c
+++ b/source/blender/makesrna/intern/rna_text.c
@@ -53,7 +53,7 @@ static void rna_Text_filename_get(PointerRNA *ptr, char *value)
if(text->name)
strcpy(value, text->name);
else
- strcpy(value, "");
+ value[0]= '\0';
}
static int rna_Text_filename_length(PointerRNA *ptr)
@@ -88,7 +88,7 @@ static void rna_TextLine_body_get(PointerRNA *ptr, char *value)
if(line->line)
strcpy(value, line->line);
else
- strcpy(value, "");
+ value[0]= '\0';
}
static int rna_TextLine_body_length(PointerRNA *ptr)
diff --git a/source/blender/makesrna/intern/rna_texture.c b/source/blender/makesrna/intern/rna_texture.c
index 890be76c49a..608a7326d79 100644
--- a/source/blender/makesrna/intern/rna_texture.c
+++ b/source/blender/makesrna/intern/rna_texture.c
@@ -260,7 +260,7 @@ static void rna_TextureSlot_name_get(PointerRNA *ptr, char *str)
if(mtex->tex)
strcpy(str, mtex->tex->id.name+2);
else
- strcpy(str, "");
+ str[0]= '\0';
}
static int rna_TextureSlot_output_node_get(PointerRNA *ptr)
diff --git a/source/blender/makesrna/intern/rna_texture_api.c b/source/blender/makesrna/intern/rna_texture_api.c
index 8c63d5da8fd..4941c75c400 100644
--- a/source/blender/makesrna/intern/rna_texture_api.c
+++ b/source/blender/makesrna/intern/rna_texture_api.c
@@ -68,7 +68,7 @@ void clear_envmap(struct EnvMap *env, bContext *C)
}
}
-void texture_evaluate(struct Tex *tex, float value[3], float color_r[3])
+void texture_evaluate(struct Tex *tex, float value[3], float color_r[4])
{
TexResult texres= {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, NULL};
multitex_ext(tex, value, NULL, NULL, 1, &texres);
diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c
index 7ce1e1ab88f..a259f84ff1a 100644
--- a/source/blender/makesrna/intern/rna_wm.c
+++ b/source/blender/makesrna/intern/rna_wm.c
@@ -348,20 +348,20 @@ EnumPropertyItem keymap_modifiers_items[] = {
{0, NULL, 0, NULL, NULL}};
EnumPropertyItem operator_flag_items[] = {
- {OPTYPE_REGISTER, "REGISTER", 0, "Register", ""},
- {OPTYPE_UNDO, "UNDO", 0, "Undo", ""},
- {OPTYPE_BLOCKING, "BLOCKING", 0, "Blocking", ""},
- {OPTYPE_MACRO, "MACRO", 0, "Macro", ""},
- {OPTYPE_GRAB_POINTER, "GRAB_POINTER", 0, "Grab Pointer", ""},
- {OPTYPE_PRESET, "PRESET", 0, "Preset", ""},
- {OPTYPE_INTERNAL, "INTERNAL", 0, "Internal", ""},
+ {OPTYPE_REGISTER, "REGISTER", 0, "Register", "Display in the info window and support the redo toolbar panel"},
+ {OPTYPE_UNDO, "UNDO", 0, "Undo", "Push an undo event (needed for operator redo)"},
+ {OPTYPE_BLOCKING, "BLOCKING", 0, "Blocking", "Block anything else from using the cursor"},
+ {OPTYPE_MACRO, "MACRO", 0, "Macro", "Use to check if an operator is a macro"},
+ {OPTYPE_GRAB_POINTER, "GRAB_POINTER", 0, "Grab Pointer", "Use so the operator grabs the mouse focus, enables wrapping when continuous grab is enabled"},
+ {OPTYPE_PRESET, "PRESET", 0, "Preset", "Display a preset button with the operators settings"},
+ {OPTYPE_INTERNAL, "INTERNAL", 0, "Internal", "Removes the operator from search results"},
{0, NULL, 0, NULL, NULL}};
EnumPropertyItem operator_return_items[] = {
- {OPERATOR_RUNNING_MODAL, "RUNNING_MODAL", 0, "Running Modal", ""},
- {OPERATOR_CANCELLED, "CANCELLED", 0, "Cancelled", ""},
- {OPERATOR_FINISHED, "FINISHED", 0, "Finished", ""},
- {OPERATOR_PASS_THROUGH, "PASS_THROUGH", 0, "Pass Through", ""}, // used as a flag
+ {OPERATOR_RUNNING_MODAL, "RUNNING_MODAL", 0, "Running Modal", "Keep the operator running with blender"},
+ {OPERATOR_CANCELLED, "CANCELLED", 0, "Cancelled", "When no action has been taken, operator exits"},
+ {OPERATOR_FINISHED, "FINISHED", 0, "Finished", "When the operator is complete, operator exits"},
+ {OPERATOR_PASS_THROUGH, "PASS_THROUGH", 0, "Pass Through", "Do nothing and pass the event on"}, // used as a flag
{0, NULL, 0, NULL, NULL}};
/* flag/enum */