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

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-11-19 06:48:09 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-11-19 06:48:09 +0400
commit822d6ae037e0cce734916e88ed00fdbd811edae1 (patch)
treec3b37852984d864edae79696023a5bf1d6b2fd65
parentf3613be1fbfd764d829188b56ac17a3987161a77 (diff)
- rename MovieTrackingMarker.enabled --> mute, to match constraints/nla/fcurves/sequencer
- report an error if an invalid BGpic arg is given to v3d.background_images.remove()
-rw-r--r--source/blender/makesrna/intern/rna_space.c13
-rw-r--r--source/blender/makesrna/intern/rna_tracking.c6
-rw-r--r--source/gameengine/Ketsji/BL_Shader.cpp9
3 files changed, 18 insertions, 10 deletions
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 393ffa69cbc..a33622cf8a1 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -900,11 +900,15 @@ static BGpic *rna_BackgroundImage_new(View3D *v3d)
return bgpic;
}
-static void rna_BackgroundImage_remove(View3D *v3d, BGpic *bgpic)
+static void rna_BackgroundImage_remove(View3D *v3d, ReportList *reports, BGpic *bgpic)
{
- ED_view3D_background_image_remove(v3d, bgpic);
-
- WM_main_add_notifier(NC_SPACE|ND_SPACE_VIEW3D, v3d);
+ if (BLI_findindex(&v3d->bgpicbase, bgpic) == -1) {
+ BKE_report(reports, RPT_ERROR, "BackgroundImage can't be removed");
+ }
+ else {
+ ED_view3D_background_image_remove(v3d, bgpic);
+ WM_main_add_notifier(NC_SPACE|ND_SPACE_VIEW3D, v3d);
+ }
}
/* Space Node Editor */
@@ -1321,6 +1325,7 @@ static void rna_def_backgroundImages(BlenderRNA *brna, PropertyRNA *cprop)
func= RNA_def_function(srna, "remove", "rna_BackgroundImage_remove");
RNA_def_function_ui_description(func, "Remove background image");
+ RNA_def_function_flag(func, FUNC_USE_REPORTS);
parm= RNA_def_pointer(func, "image", "BackgroundImage", "", "Image displayed as viewport background");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
}
diff --git a/source/blender/makesrna/intern/rna_tracking.c b/source/blender/makesrna/intern/rna_tracking.c
index 73b2914fba1..269860e1d7e 100644
--- a/source/blender/makesrna/intern/rna_tracking.c
+++ b/source/blender/makesrna/intern/rna_tracking.c
@@ -451,9 +451,9 @@ static void rna_def_trackingMarker(BlenderRNA *brna)
RNA_def_property_update(prop, NC_MOVIECLIP|NA_EDITED, NULL);
/* enable */
- prop= RNA_def_property(srna, "enable", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", MARKER_DISABLED);
- RNA_def_property_ui_text(prop, "Enable", "Is marker enabled for current frame");
+ prop= RNA_def_property(srna, "mute", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", MARKER_DISABLED);
+ RNA_def_property_ui_text(prop, "Mode", "Is marker muted for current frame");
RNA_def_property_update(prop, NC_MOVIECLIP|NA_EDITED, NULL);
}
diff --git a/source/gameengine/Ketsji/BL_Shader.cpp b/source/gameengine/Ketsji/BL_Shader.cpp
index 682b42cc3cf..b1e3737af07 100644
--- a/source/gameengine/Ketsji/BL_Shader.cpp
+++ b/source/gameengine/Ketsji/BL_Shader.cpp
@@ -1362,14 +1362,17 @@ KX_PYMETHODDEF_DOC( BL_Shader, setAttrib, "setAttrib(enum)" )
int attr=0;
- if(!PyArg_ParseTuple(args, "i:setAttrib", &attr ))
+ if(!PyArg_ParseTuple(args, "i:setAttrib", &attr))
return NULL;
-
+
+ attr= SHD_TANGENT; /* user input is ignored for now, there is only 1 attr */
+
if(mShader==0) {
PyErr_SetString(PyExc_ValueError, "shader.setAttrib() BL_Shader, invalid shader object");
return NULL;
}
- mAttr=SHD_TANGENT; /* What the heck is going on here - attr is just ignored??? - Campbell */
+
+ mAttr= attr;
glUseProgramObjectARB(mShader);
glBindAttribLocationARB(mShader, mAttr, "Tangent");
Py_RETURN_NONE;