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
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/interface/interface_templates.c2
-rw-r--r--source/blender/editors/interface/interface_utils.c1
-rw-r--r--source/blender/gpu/intern/gpu_material.c10
-rw-r--r--source/blender/imbuf/intern/filetype.c2
-rw-r--r--source/blender/makesrna/intern/rna_main_api.c6
-rw-r--r--source/blender/makesrna/intern/rna_nla.c11
-rw-r--r--source/blender/makesrna/intern/rna_object_api.c3
-rw-r--r--source/blender/modifiers/intern/MOD_build.c173
-rw-r--r--source/blender/modifiers/intern/MOD_hook.c1
-rw-r--r--source/blender/modifiers/intern/MOD_solidify.c26
-rw-r--r--source/creator/CMakeLists.txt4
11 files changed, 117 insertions, 122 deletions
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index 5be5c6fa0c4..429f1e80231 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -737,8 +737,6 @@ static uiLayout *draw_modifier(uiLayout *layout, Scene *scene, Object *ob, Modif
/* tesselation point for curve-typed objects */
if (ELEM3(ob->type, OB_CURVE, OB_SURF, OB_FONT)) {
- ModifierTypeInfo *mti = modifierType_getInfo(md->type);
-
/* some modifiers could work with pre-tesselated curves only */
if (ELEM3(md->type, eModifierType_Hook, eModifierType_Softbody, eModifierType_MeshDeform)) {
/* add disabled pre-tesselated button, so users could have
diff --git a/source/blender/editors/interface/interface_utils.c b/source/blender/editors/interface/interface_utils.c
index 842dc40a39f..c80a4010d88 100644
--- a/source/blender/editors/interface/interface_utils.c
+++ b/source/blender/editors/interface/interface_utils.c
@@ -99,7 +99,6 @@ uiBut *uiDefAutoButR(uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, int ind
break;
case PROP_POINTER: {
PointerRNA pptr;
- int icon;
pptr= RNA_property_pointer_get(ptr, prop);
if(!pptr.type)
diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c
index c283e2fd907..3dd4ccc2a2f 100644
--- a/source/blender/gpu/intern/gpu_material.c
+++ b/source/blender/gpu/intern/gpu_material.c
@@ -776,12 +776,12 @@ static void material_lights(GPUShadeInput *shi, GPUShadeResult *shr)
ListBase *lb = object_duplilist(shi->gpumat->scene, ob);
for(dob=lb->first; dob; dob=dob->next) {
- Object *ob = dob->ob;
-
- if(ob->type==OB_LAMP) {
- copy_m4_m4(ob->obmat, dob->mat);
+ Object *ob_iter = dob->ob;
+
+ if(ob_iter->type==OB_LAMP) {
+ copy_m4_m4(ob_iter->obmat, dob->mat);
- lamp = GPU_lamp_from_blender(shi->gpumat->scene, ob, base->object);
+ lamp = GPU_lamp_from_blender(shi->gpumat->scene, ob_iter, ob);
if(lamp)
shade_one_light(shi, shr, lamp);
}
diff --git a/source/blender/imbuf/intern/filetype.c b/source/blender/imbuf/intern/filetype.c
index 0702fbe3907..4e96fd94555 100644
--- a/source/blender/imbuf/intern/filetype.c
+++ b/source/blender/imbuf/intern/filetype.c
@@ -56,11 +56,11 @@ void quicktime_exit(void);
#endif
ImFileType IMB_FILE_TYPES[]= {
- {NULL, NULL, imb_is_a_iris, imb_ftype_iris, imb_loadiris, imb_saveiris, NULL, 0, IMAGIC},
{NULL, NULL, imb_is_a_jpeg, imb_ftype_default, imb_load_jpeg, imb_savejpeg, NULL, 0, JPG},
{NULL, NULL, imb_is_a_png, imb_ftype_default, imb_loadpng, imb_savepng, NULL, 0, PNG},
{NULL, NULL, imb_is_a_bmp, imb_ftype_default, imb_bmp_decode, imb_savebmp, NULL, 0, BMP},
{NULL, NULL, imb_is_a_targa, imb_ftype_default, imb_loadtarga, imb_savetarga, NULL, 0, TGA},
+ {NULL, NULL, imb_is_a_iris, imb_ftype_iris, imb_loadiris, imb_saveiris, NULL, 0, IMAGIC},
#ifdef WITH_CINEON
{NULL, NULL, imb_is_dpx, imb_ftype_default, imb_loaddpx, imb_save_dpx, NULL, IM_FTYPE_FLOAT, DPX},
{NULL, NULL, imb_is_cineon, imb_ftype_default, imb_loadcineon, imb_savecineon, NULL, IM_FTYPE_FLOAT, CINEON},
diff --git a/source/blender/makesrna/intern/rna_main_api.c b/source/blender/makesrna/intern/rna_main_api.c
index 56c2f44ed73..ce9785819ca 100644
--- a/source/blender/makesrna/intern/rna_main_api.c
+++ b/source/blender/makesrna/intern/rna_main_api.c
@@ -394,7 +394,7 @@ Group *rna_Main_groups_new(Main *bmain, const char *name)
{
return add_group(name);
}
-void rna_Main_groups_remove(Main *bmain, ReportList *reports, Group *group)
+void rna_Main_groups_remove(Main *bmain, Group *group)
{
unlink_group(group);
free_libblock(&bmain->group, group);
@@ -405,7 +405,7 @@ Text *rna_Main_texts_new(Main *bmain, const char *name)
{
return add_empty_text(name);
}
-void rna_Main_texts_remove(Main *bmain, ReportList *reports, Text *text)
+void rna_Main_texts_remove(Main *bmain, Text *text)
{
unlink_text(bmain, text);
free_libblock(&bmain->text, text);
@@ -1044,7 +1044,6 @@ void RNA_def_main_groups(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_function_return(func, parm);
func= RNA_def_function(srna, "remove", "rna_Main_groups_remove");
- RNA_def_function_flag(func, FUNC_USE_REPORTS);
RNA_def_function_ui_description(func, "Remove a group from the current blendfile.");
parm= RNA_def_pointer(func, "group", "Group", "", "Group to remove.");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
@@ -1072,7 +1071,6 @@ void RNA_def_main_texts(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_function_return(func, parm);
func= RNA_def_function(srna, "remove", "rna_Main_texts_remove");
- RNA_def_function_flag(func, FUNC_USE_REPORTS);
RNA_def_function_ui_description(func, "Remove a text from the current blendfile.");
parm= RNA_def_pointer(func, "text", "Text", "", "Text to remove.");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
diff --git a/source/blender/makesrna/intern/rna_nla.c b/source/blender/makesrna/intern/rna_nla.c
index f28fec75fe2..c2d38aaf038 100644
--- a/source/blender/makesrna/intern/rna_nla.c
+++ b/source/blender/makesrna/intern/rna_nla.c
@@ -317,9 +317,14 @@ static NlaStrip *rna_NlaStrip_new(NlaTrack *track, bContext *C, ReportList *repo
static void rna_NlaStrip_remove(NlaTrack *track, bContext *C, ReportList *reports, NlaStrip *strip)
{
- free_nlastrip(&track->strips, strip);
-
- WM_event_add_notifier(C, NC_ANIMATION|ND_NLA|NA_REMOVED, NULL);
+ if(BLI_findindex(&track->strips, strip) == -1) {
+ BKE_reportf(reports, RPT_ERROR, "NLA's Strip '%s' not found in track '%s'", strip->name, track->name);
+ return;
+ }
+ else {
+ free_nlastrip(&track->strips, strip);
+ WM_event_add_notifier(C, NC_ANIMATION|ND_NLA|NA_REMOVED, NULL);
+ }
}
#else
diff --git a/source/blender/makesrna/intern/rna_object_api.c b/source/blender/makesrna/intern/rna_object_api.c
index 9f1ef7396c0..43113fed2c4 100644
--- a/source/blender/makesrna/intern/rna_object_api.c
+++ b/source/blender/makesrna/intern/rna_object_api.c
@@ -302,7 +302,7 @@ static void rna_Object_create_duplilist(Object *ob, ReportList *reports, Scene *
/* ob->duplilist should now be freed with Object.free_duplilist */
}
-static void rna_Object_free_duplilist(Object *ob, ReportList *reports)
+static void rna_Object_free_duplilist(Object *ob)
{
if (ob->duplilist) {
free_object_duplilist(ob->duplilist);
@@ -451,7 +451,6 @@ void RNA_api_object(StructRNA *srna)
func= RNA_def_function(srna, "free_dupli_list", "rna_Object_free_duplilist");
RNA_def_function_ui_description(func, "Free the list of dupli objects.");
- RNA_def_function_flag(func, FUNC_USE_REPORTS);
/* Armature */
func= RNA_def_function(srna, "find_armature", "modifiers_isDeformedByArmature");
diff --git a/source/blender/modifiers/intern/MOD_build.c b/source/blender/modifiers/intern/MOD_build.c
index 3bf1fa401f9..bc59c2cba0b 100644
--- a/source/blender/modifiers/intern/MOD_build.c
+++ b/source/blender/modifiers/intern/MOD_build.c
@@ -82,7 +82,6 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
BuildModifierData *bmd = (BuildModifierData*) md;
int i;
int numFaces, numEdges;
- int maxVerts, maxEdges, maxFaces;
int *vertMap, *edgeMap, *faceMap;
float frac;
GHashIterator *hashIter;
@@ -93,19 +92,15 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
GHash *edgeHash = BLI_ghash_new(BLI_ghashutil_inthash,
BLI_ghashutil_intcmp, "build ed apply gh");
- maxVerts = dm->getNumVerts(dm);
- vertMap = MEM_callocN(sizeof(*vertMap) * maxVerts,
- "build modifier vertMap");
- for(i = 0; i < maxVerts; ++i) vertMap[i] = i;
+ const int maxVerts= dm->getNumVerts(dm);
+ const int maxEdges= dm->getNumEdges(dm);
+ const int maxFaces= dm->getNumFaces(dm);
- maxEdges = dm->getNumEdges(dm);
- edgeMap = MEM_callocN(sizeof(*edgeMap) * maxEdges,
- "build modifier edgeMap");
+ vertMap = MEM_callocN(sizeof(*vertMap) * maxVerts, "build modifier vertMap");
+ for(i = 0; i < maxVerts; ++i) vertMap[i] = i;
+ edgeMap = MEM_callocN(sizeof(*edgeMap) * maxEdges, "build modifier edgeMap");
for(i = 0; i < maxEdges; ++i) edgeMap[i] = i;
-
- maxFaces = dm->getNumFaces(dm);
- faceMap = MEM_callocN(sizeof(*faceMap) * maxFaces,
- "build modifier faceMap");
+ faceMap = MEM_callocN(sizeof(*faceMap) * maxFaces, "build modifier faceMap");
for(i = 0; i < maxFaces; ++i) faceMap[i] = i;
if (ob) {
@@ -121,8 +116,6 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
/* if there's at least one face, build based on faces */
if(numFaces) {
- int maxEdges;
-
if(bmd->randomize)
BLI_array_randomize(faceMap, sizeof(*faceMap),
maxFaces, bmd->seed);
@@ -151,7 +144,6 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
/* get the set of edges that will be in the new mesh (i.e. all edges
* that have both verts in the new mesh)
*/
- maxEdges = dm->getNumEdges(dm);
for(i = 0; i < maxEdges; ++i) {
MEdge me;
dm->getEdge(dm, i, &me);
@@ -211,71 +203,72 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
BLI_ghash_size(edgeHash), numFaces);
/* copy the vertices across */
- for(hashIter = BLI_ghashIterator_new(vertHash);
- !BLI_ghashIterator_isDone(hashIter);
- BLI_ghashIterator_step(hashIter)) {
- MVert source;
- MVert *dest;
- int oldIndex = GET_INT_FROM_POINTER(BLI_ghashIterator_getKey(hashIter));
- int newIndex = GET_INT_FROM_POINTER(BLI_ghashIterator_getValue(hashIter));
-
- dm->getVert(dm, oldIndex, &source);
- dest = CDDM_get_vert(result, newIndex);
-
- DM_copy_vert_data(dm, result, oldIndex, newIndex, 1);
- *dest = source;
- }
- BLI_ghashIterator_free(hashIter);
-
- /* copy the edges across, remapping indices */
- for(i = 0; i < BLI_ghash_size(edgeHash); ++i) {
- MEdge source;
- MEdge *dest;
- int oldIndex = GET_INT_FROM_POINTER(BLI_ghash_lookup(edgeHash, SET_INT_IN_POINTER(i)));
-
- dm->getEdge(dm, oldIndex, &source);
- dest = CDDM_get_edge(result, i);
-
- source.v1 = GET_INT_FROM_POINTER(BLI_ghash_lookup(vertHash, SET_INT_IN_POINTER(source.v1)));
- source.v2 = GET_INT_FROM_POINTER(BLI_ghash_lookup(vertHash, SET_INT_IN_POINTER(source.v2)));
-
- DM_copy_edge_data(dm, result, oldIndex, i, 1);
- *dest = source;
- }
-
- /* copy the faces across, remapping indices */
- for(i = 0; i < numFaces; ++i) {
- MFace source;
- MFace *dest;
- int orig_v4;
-
- dm->getFace(dm, faceMap[i], &source);
- dest = CDDM_get_face(result, i);
-
- orig_v4 = source.v4;
-
- source.v1 = GET_INT_FROM_POINTER(BLI_ghash_lookup(vertHash, SET_INT_IN_POINTER(source.v1)));
- source.v2 = GET_INT_FROM_POINTER(BLI_ghash_lookup(vertHash, SET_INT_IN_POINTER(source.v2)));
- source.v3 = GET_INT_FROM_POINTER(BLI_ghash_lookup(vertHash, SET_INT_IN_POINTER(source.v3)));
- if(source.v4)
- source.v4 = GET_INT_FROM_POINTER(BLI_ghash_lookup(vertHash, SET_INT_IN_POINTER(source.v4)));
-
- DM_copy_face_data(dm, result, faceMap[i], i, 1);
- *dest = source;
-
- test_index_face(dest, &result->faceData, i, (orig_v4 ? 4 : 3));
- }
-
- CDDM_calc_normals(result);
-
- BLI_ghash_free(vertHash, NULL, NULL);
- BLI_ghash_free(edgeHash, NULL, NULL);
+ for( hashIter = BLI_ghashIterator_new(vertHash);
+ !BLI_ghashIterator_isDone(hashIter);
+ BLI_ghashIterator_step(hashIter)
+ ) {
+ MVert source;
+ MVert *dest;
+ int oldIndex = GET_INT_FROM_POINTER(BLI_ghashIterator_getKey(hashIter));
+ int newIndex = GET_INT_FROM_POINTER(BLI_ghashIterator_getValue(hashIter));
+
+ dm->getVert(dm, oldIndex, &source);
+ dest = CDDM_get_vert(result, newIndex);
+
+ DM_copy_vert_data(dm, result, oldIndex, newIndex, 1);
+ *dest = source;
+ }
+ BLI_ghashIterator_free(hashIter);
+
+ /* copy the edges across, remapping indices */
+ for(i = 0; i < BLI_ghash_size(edgeHash); ++i) {
+ MEdge source;
+ MEdge *dest;
+ int oldIndex = GET_INT_FROM_POINTER(BLI_ghash_lookup(edgeHash, SET_INT_IN_POINTER(i)));
+
+ dm->getEdge(dm, oldIndex, &source);
+ dest = CDDM_get_edge(result, i);
+
+ source.v1 = GET_INT_FROM_POINTER(BLI_ghash_lookup(vertHash, SET_INT_IN_POINTER(source.v1)));
+ source.v2 = GET_INT_FROM_POINTER(BLI_ghash_lookup(vertHash, SET_INT_IN_POINTER(source.v2)));
+
+ DM_copy_edge_data(dm, result, oldIndex, i, 1);
+ *dest = source;
+ }
- MEM_freeN(vertMap);
- MEM_freeN(edgeMap);
- MEM_freeN(faceMap);
+ /* copy the faces across, remapping indices */
+ for(i = 0; i < numFaces; ++i) {
+ MFace source;
+ MFace *dest;
+ int orig_v4;
+
+ dm->getFace(dm, faceMap[i], &source);
+ dest = CDDM_get_face(result, i);
+
+ orig_v4 = source.v4;
+
+ source.v1 = GET_INT_FROM_POINTER(BLI_ghash_lookup(vertHash, SET_INT_IN_POINTER(source.v1)));
+ source.v2 = GET_INT_FROM_POINTER(BLI_ghash_lookup(vertHash, SET_INT_IN_POINTER(source.v2)));
+ source.v3 = GET_INT_FROM_POINTER(BLI_ghash_lookup(vertHash, SET_INT_IN_POINTER(source.v3)));
+ if(source.v4)
+ source.v4 = GET_INT_FROM_POINTER(BLI_ghash_lookup(vertHash, SET_INT_IN_POINTER(source.v4)));
+
+ DM_copy_face_data(dm, result, faceMap[i], i, 1);
+ *dest = source;
+
+ test_index_face(dest, &result->faceData, i, (orig_v4 ? 4 : 3));
+ }
- return result;
+ CDDM_calc_normals(result);
+
+ BLI_ghash_free(vertHash, NULL, NULL);
+ BLI_ghash_free(edgeHash, NULL, NULL);
+
+ MEM_freeN(vertMap);
+ MEM_freeN(edgeMap);
+ MEM_freeN(faceMap);
+
+ return result;
}
@@ -287,19 +280,19 @@ ModifierTypeInfo modifierType_Build = {
/* flags */ eModifierTypeFlag_AcceptsMesh
| eModifierTypeFlag_AcceptsCVs,
/* copyData */ copyData,
- /* deformVerts */ 0,
- /* deformMatrices */ 0,
- /* deformVertsEM */ 0,
- /* deformMatricesEM */ 0,
+ /* deformVerts */ NULL,
+ /* deformMatrices */ NULL,
+ /* deformVertsEM */ NULL,
+ /* deformMatricesEM */ NULL,
/* applyModifier */ applyModifier,
- /* applyModifierEM */ 0,
+ /* applyModifierEM */ NULL,
/* initData */ initData,
- /* requiredDataMask */ 0,
- /* freeData */ 0,
- /* isDisabled */ 0,
- /* updateDepgraph */ 0,
+ /* requiredDataMask */ NULL,
+ /* freeData */ NULL,
+ /* isDisabled */ NULL,
+ /* updateDepgraph */ NULL,
/* dependsOnTime */ dependsOnTime,
- /* dependsOnNormals */ 0,
- /* foreachObjectLink */ 0,
- /* foreachIDLink */ 0,
+ /* dependsOnNormals */ NULL,
+ /* foreachObjectLink */ NULL,
+ /* foreachIDLink */ NULL
};
diff --git a/source/blender/modifiers/intern/MOD_hook.c b/source/blender/modifiers/intern/MOD_hook.c
index cbd88f32409..59c45eb2eec 100644
--- a/source/blender/modifiers/intern/MOD_hook.c
+++ b/source/blender/modifiers/intern/MOD_hook.c
@@ -244,7 +244,6 @@ static void deformVerts(ModifierData *md, Object *ob,
}
}
else if(dvert) { /* vertex group hook */
- int i;
const float fac_orig= hmd->force;
for(i = 0; i < max_dvert; i++, dvert++) {
diff --git a/source/blender/modifiers/intern/MOD_solidify.c b/source/blender/modifiers/intern/MOD_solidify.c
index 4faf955b953..edf149c1580 100644
--- a/source/blender/modifiers/intern/MOD_solidify.c
+++ b/source/blender/modifiers/intern/MOD_solidify.c
@@ -291,7 +291,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
ehi= BLI_edgehashIterator_new(edgehash);
for(; !BLI_edgehashIterator_isDone(ehi); BLI_edgehashIterator_step(ehi)) {
- int eidx= GET_INT_FROM_POINTER(BLI_edgehashIterator_getValue(ehi));
+ eidx= GET_INT_FROM_POINTER(BLI_edgehashIterator_getValue(ehi));
if(edge_users[eidx] >= 0) {
BLI_edgehashIterator_getKey(ehi, &v1, &v2);
orig_mvert[v1].flag |= ME_VERT_TMP_TAG;
@@ -408,7 +408,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
float *vert_angles= MEM_callocN(sizeof(float) * numVerts * 2, "mod_solid_pair"); /* 2 in 1 */
float *vert_accum= vert_angles + numVerts;
float face_angles[4];
- int i, j, vidx;
+ int j, vidx;
face_nors = CustomData_get_layer(&dm->faceData, CD_NORMAL);
if(!face_nors) {
@@ -650,19 +650,19 @@ ModifierTypeInfo modifierType_Solidify = {
| eModifierTypeFlag_EnableInEditmode,
/* copyData */ copyData,
- /* deformVerts */ 0,
- /* deformMatrices */ 0,
- /* deformVertsEM */ 0,
- /* deformMatricesEM */ 0,
+ /* deformVerts */ NULL,
+ /* deformMatrices */ NULL,
+ /* deformVertsEM */ NULL,
+ /* deformMatricesEM */ NULL,
/* applyModifier */ applyModifier,
/* applyModifierEM */ applyModifierEM,
/* initData */ initData,
/* requiredDataMask */ requiredDataMask,
- /* freeData */ 0,
- /* isDisabled */ 0,
- /* updateDepgraph */ 0,
- /* dependsOnTime */ 0,
- /* dependsOnNormals */ 0,
- /* foreachObjectLink */ 0,
- /* foreachIDLink */ 0,
+ /* freeData */ NULL,
+ /* isDisabled */ NULL,
+ /* updateDepgraph */ NULL,
+ /* dependsOnTime */ NULL,
+ /* dependsOnNormals */ NULL,
+ /* foreachObjectLink */ NULL,
+ /* foreachIDLink */ NULL
};
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
index 41e90ecdc63..9e52f188195 100644
--- a/source/creator/CMakeLists.txt
+++ b/source/creator/CMakeLists.txt
@@ -51,6 +51,10 @@ if(WITH_IMAGE_OPENEXR)
add_definitions(-DWITH_OPENEXR)
endif()
+if(WITH_IMAGE_OPENJPEG)
+ add_definitions(-DWITH_OPENJPEG)
+endif()
+
if(WITH_IMAGE_TIFF)
add_definitions(-DWITH_TIFF)
endif()