[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [49887] branches/soc-2011-tomato: svn merge ^/trunk/blender -r49867:49886
Campbell Barton
ideasman42 at gmail.com
Tue Aug 14 13:07:43 CEST 2012
Revision: 49887
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=49887
Author: campbellbarton
Date: 2012-08-14 11:07:42 +0000 (Tue, 14 Aug 2012)
Log Message:
-----------
svn merge ^/trunk/blender -r49867:49886
Revision Links:
--------------
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=49867
Modified Paths:
--------------
branches/soc-2011-tomato/build_files/cmake/cmake_netbeans_project.py
branches/soc-2011-tomato/source/blender/blenkernel/BKE_sequencer.h
branches/soc-2011-tomato/source/blender/blenkernel/intern/dynamicpaint.c
branches/soc-2011-tomato/source/blender/blenkernel/intern/mask.c
branches/soc-2011-tomato/source/blender/blenkernel/intern/sequencer.c
branches/soc-2011-tomato/source/blender/blenlib/intern/math_geom.c
branches/soc-2011-tomato/source/blender/blenloader/intern/readfile.c
branches/soc-2011-tomato/source/blender/bmesh/intern/bmesh_construct.c
branches/soc-2011-tomato/source/blender/bmesh/intern/bmesh_core.c
branches/soc-2011-tomato/source/blender/bmesh/intern/bmesh_interp.c
branches/soc-2011-tomato/source/blender/bmesh/intern/bmesh_mods.c
branches/soc-2011-tomato/source/blender/bmesh/intern/bmesh_queries.c
branches/soc-2011-tomato/source/blender/bmesh/intern/bmesh_structure.c
branches/soc-2011-tomato/source/blender/bmesh/operators/bmo_subdivide.c
branches/soc-2011-tomato/source/blender/bmesh/tools/BME_bevel.c
branches/soc-2011-tomato/source/blender/compositor/COM_compositor.h
branches/soc-2011-tomato/source/blender/compositor/intern/COM_ExecutionGroup.cpp
branches/soc-2011-tomato/source/blender/compositor/intern/COM_compositor.cpp
branches/soc-2011-tomato/source/blender/compositor/nodes/COM_GroupNode.cpp
branches/soc-2011-tomato/source/blender/compositor/operations/COM_MovieDistortionOperation.cpp
branches/soc-2011-tomato/source/blender/compositor/operations/COM_MovieDistortionOperation.h
branches/soc-2011-tomato/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp
branches/soc-2011-tomato/source/blender/compositor/operations/COM_SetColorOperation.h
branches/soc-2011-tomato/source/blender/editors/include/ED_view3d.h
branches/soc-2011-tomato/source/blender/editors/mesh/editmesh_rip.c
branches/soc-2011-tomato/source/blender/editors/space_clip/tracking_select.c
branches/soc-2011-tomato/source/blender/editors/space_sequencer/sequencer_draw.c
branches/soc-2011-tomato/source/blender/editors/space_view3d/view3d_select.c
branches/soc-2011-tomato/source/blender/editors/uvedit/uvedit_ops.c
branches/soc-2011-tomato/source/blender/imbuf/intern/allocimbuf.c
branches/soc-2011-tomato/source/blender/makesdna/DNA_object_types.h
branches/soc-2011-tomato/source/blender/makesdna/DNA_sequence_types.h
branches/soc-2011-tomato/source/blender/makesrna/intern/rna_armature.c
branches/soc-2011-tomato/source/blender/makesrna/intern/rna_sequencer.c
branches/soc-2011-tomato/source/blender/render/intern/source/pixelblending.c
branches/soc-2011-tomato/source/blender/windowmanager/CMakeLists.txt
branches/soc-2011-tomato/source/blender/windowmanager/SConscript
branches/soc-2011-tomato/source/blender/windowmanager/WM_types.h
branches/soc-2011-tomato/source/blender/windowmanager/intern/wm_init_exit.c
Property Changed:
----------------
branches/soc-2011-tomato/
branches/soc-2011-tomato/source/blender/editors/interface/interface.c
branches/soc-2011-tomato/source/blender/editors/space_outliner/
Property changes on: branches/soc-2011-tomato
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/ge_harmony:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/branches/soc-2011-cucumber:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/vgroup_modifiers:38694-39989
/trunk/blender:36831-49867
+ /branches/ge_harmony:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/branches/soc-2011-cucumber:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/vgroup_modifiers:38694-39989
/trunk/blender:36831-49886
Modified: branches/soc-2011-tomato/build_files/cmake/cmake_netbeans_project.py
===================================================================
--- branches/soc-2011-tomato/build_files/cmake/cmake_netbeans_project.py 2012-08-14 11:05:26 UTC (rev 49886)
+++ branches/soc-2011-tomato/build_files/cmake/cmake_netbeans_project.py 2012-08-14 11:07:42 UTC (rev 49887)
@@ -24,7 +24,7 @@
"""
Example linux usage
- python .~/blenderSVN/blender/build_files/cmake/cmake_netbeans_project.py ~/blenderSVN/cmake
+ python3 ~/blenderSVN/blender/build_files/cmake/cmake_netbeans_project.py ~/blenderSVN/cmake
Windows not supported so far
"""
Modified: branches/soc-2011-tomato/source/blender/blenkernel/BKE_sequencer.h
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/BKE_sequencer.h 2012-08-14 11:05:26 UTC (rev 49886)
+++ branches/soc-2011-tomato/source/blender/blenkernel/BKE_sequencer.h 2012-08-14 11:07:42 UTC (rev 49887)
@@ -297,6 +297,7 @@
void BKE_seqence_base_unique_name_recursive(ListBase *seqbasep, struct Sequence *seq);
void BKE_sequence_base_dupli_recursive(struct Scene *scene, struct Scene *scene_to, ListBase *nseqbase, ListBase *seqbase, int dupe_flag);
+int BKE_seqence_is_valid_check(struct Sequence *seq);
void BKE_sequencer_clear_scene_in_allseqs(struct Main *bmain, struct Scene *sce);
Modified: branches/soc-2011-tomato/source/blender/blenkernel/intern/dynamicpaint.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/intern/dynamicpaint.c 2012-08-14 11:05:26 UTC (rev 49886)
+++ branches/soc-2011-tomato/source/blender/blenkernel/intern/dynamicpaint.c 2012-08-14 11:07:42 UTC (rev 49887)
@@ -1997,7 +1997,10 @@
/* Get closest edge to that subpixel on UV map */
{
- float pixel[2], dist, t_dist;
+ float pixel[2];
+ /* distances only used for comparison */
+ float dist_squared, t_dist_squared;
+
int i, uindex[3], edge1_index, edge2_index,
e1_index, e2_index, target_face;
float closest_point[2], lambda, dir_vec[2];
@@ -2019,17 +2022,17 @@
/*
* Find closest edge to that pixel
*/
- /* Dist to first edge */
+ /* Dist to first edge */
e1_index = cPoint->v1; e2_index = cPoint->v2; edge1_index = uindex[0]; edge2_index = uindex[1];
- dist = dist_to_line_segment_v2(pixel, tface[cPoint->face_index].uv[edge1_index], tface[cPoint->face_index].uv[edge2_index]);
+ dist_squared = dist_squared_to_line_segment_v2(pixel, tface[cPoint->face_index].uv[edge1_index], tface[cPoint->face_index].uv[edge2_index]);
- /* Dist to second edge */
- t_dist = dist_to_line_segment_v2(pixel, tface[cPoint->face_index].uv[uindex[1]], tface[cPoint->face_index].uv[uindex[2]]);
- if (t_dist < dist) { e1_index = cPoint->v2; e2_index = cPoint->v3; edge1_index = uindex[1]; edge2_index = uindex[2]; dist = t_dist; }
+ /* Dist to second edge */
+ t_dist_squared = dist_squared_to_line_segment_v2(pixel, tface[cPoint->face_index].uv[uindex[1]], tface[cPoint->face_index].uv[uindex[2]]);
+ if (t_dist_squared < dist_squared) { e1_index = cPoint->v2; e2_index = cPoint->v3; edge1_index = uindex[1]; edge2_index = uindex[2]; dist_squared = t_dist_squared; }
- /* Dist to third edge */
- t_dist = dist_to_line_segment_v2(pixel, tface[cPoint->face_index].uv[uindex[2]], tface[cPoint->face_index].uv[uindex[0]]);
- if (t_dist < dist) { e1_index = cPoint->v3; e2_index = cPoint->v1; edge1_index = uindex[2]; edge2_index = uindex[0]; dist = t_dist; }
+ /* Dist to third edge */
+ t_dist_squared = dist_squared_to_line_segment_v2(pixel, tface[cPoint->face_index].uv[uindex[2]], tface[cPoint->face_index].uv[uindex[0]]);
+ if (t_dist_squared < dist_squared) { e1_index = cPoint->v3; e2_index = cPoint->v1; edge1_index = uindex[2]; edge2_index = uindex[0]; dist_squared = t_dist_squared; }
/*
Modified: branches/soc-2011-tomato/source/blender/blenkernel/intern/mask.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/intern/mask.c 2012-08-14 11:05:26 UTC (rev 49886)
+++ branches/soc-2011-tomato/source/blender/blenkernel/intern/mask.c 2012-08-14 11:07:42 UTC (rev 49887)
@@ -40,18 +40,22 @@
#include "BLI_math.h"
#include "DNA_mask_types.h"
+#include "DNA_node_types.h"
#include "DNA_scene_types.h"
#include "DNA_object_types.h"
#include "DNA_screen_types.h"
#include "DNA_space_types.h"
#include "DNA_movieclip_types.h"
#include "DNA_tracking_types.h"
+#include "DNA_sequence_types.h"
#include "BKE_curve.h"
#include "BKE_global.h"
#include "BKE_library.h"
#include "BKE_main.h"
#include "BKE_mask.h"
+#include "BKE_node.h"
+#include "BKE_sequencer.h"
#include "BKE_tracking.h"
#include "BKE_movieclip.h"
#include "BKE_utildefines.h"
@@ -1561,26 +1565,83 @@
BKE_mask_layer_free_list(&mask->masklayers);
}
+
+static void ntree_unlink_mask_cb(void *calldata, struct ID *UNUSED(owner_id), struct bNodeTree *ntree)
+{
+ ID *id = (ID *)calldata;
+ bNode *node;
+
+ for (node = ntree->nodes.first; node; node = node->next) {
+ if (node->id == id) {
+ node->id = NULL;
+ }
+ }
+}
+
void BKE_mask_unlink(Main *bmain, Mask *mask)
{
bScreen *scr;
ScrArea *area;
SpaceLink *sl;
+ Scene *scene;
for (scr = bmain->screen.first; scr; scr = scr->id.next) {
for (area = scr->areabase.first; area; area = area->next) {
for (sl = area->spacedata.first; sl; sl = sl->next) {
- if (sl->spacetype == SPACE_CLIP) {
- SpaceClip *sc = (SpaceClip *) sl;
+ switch (sl->spacetype) {
+ case SPACE_CLIP:
+ {
+ SpaceClip *sc = (SpaceClip *)sl;
- if (sc->mask_info.mask == mask)
- sc->mask_info.mask = NULL;
+ if (sc->mask_info.mask == mask) {
+ sc->mask_info.mask = NULL;
+ }
+ break;
+ }
+ case SPACE_IMAGE:
+ {
+ SpaceImage *sima = (SpaceImage *)sl;
+
+ if (sima->mask_info.mask == mask) {
+ sima->mask_info.mask = NULL;
+ }
+ break;
+ }
}
}
}
}
- mask->id.us = 0;
+ for (scene = bmain->scene.first; scene; scene = scene->id.next) {
+ if (scene->ed) {
+ Sequence *seq;
+
+ SEQ_BEGIN (scene->ed, seq)
+ {
+ if (seq->mask == mask) {
+ seq->mask = NULL;
+ }
+ }
+ SEQ_END
+ }
+
+
+ if (scene->nodetree) {
+ bNode *node;
+ for (node = scene->nodetree->nodes.first; node; node = node->next) {
+ if (node->id == &mask->id) {
+ node->id = NULL;
+ }
+ }
+ }
+ }
+
+ {
+ bNodeTreeType *treetype = ntreeGetType(NTREE_COMPOSIT);
+ treetype->foreach_nodetree(bmain, (void *)mask, &ntree_unlink_mask_cb);
+ }
+
+ BKE_libblock_free(&bmain->mask, mask);
}
void BKE_mask_coord_from_frame(float r_co[2], const float co[2], const float frame_size[2])
Modified: branches/soc-2011-tomato/source/blender/blenkernel/intern/sequencer.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/intern/sequencer.c 2012-08-14 11:05:26 UTC (rev 49886)
+++ branches/soc-2011-tomato/source/blender/blenkernel/intern/sequencer.c 2012-08-14 11:07:42 UTC (rev 49887)
@@ -594,6 +594,9 @@
}
break;
case SEQ_TYPE_MOVIECLIP:
+ if (seq->clip == NULL)
+ return;
+
seq->len = BKE_movieclip_get_duration(seq->clip);
seq->len -= seq->anim_startofs;
@@ -603,8 +606,9 @@
}
break;
case SEQ_TYPE_MASK:
+ if (seq->mask == NULL)
+ return;
seq->len = BKE_mask_get_duration(seq->mask);
-
seq->len -= seq->anim_startofs;
seq->len -= seq->anim_endofs;
if (seq->len < 0) {
@@ -4038,3 +4042,21 @@
}
}
}
+
+/* called on draw, needs to be fast,
+ * we could cache and use a flag if we want to make checks for file paths resolving for eg. */
+int BKE_seqence_is_valid_check(Sequence *seq)
+{
+ switch (seq->type) {
+ case SEQ_TYPE_MASK:
+ return (seq->mask != NULL);
+ case SEQ_TYPE_MOVIECLIP:
+ return (seq->clip != NULL);
+ case SEQ_TYPE_SCENE:
+ return (seq->scene != NULL);
+ case SEQ_TYPE_SOUND_RAM:
+ return (seq->sound != NULL);
+ }
+
+ return TRUE;
+}
Modified: branches/soc-2011-tomato/source/blender/blenlib/intern/math_geom.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenlib/intern/math_geom.c 2012-08-14 11:05:26 UTC (rev 49886)
+++ branches/soc-2011-tomato/source/blender/blenlib/intern/math_geom.c 2012-08-14 11:07:42 UTC (rev 49887)
@@ -188,7 +188,7 @@
if (len == 0.0f) {
rc[0] = p[0] - l1[0];
rc[1] = p[1] - l1[1];
- return (float)(sqrt(rc[0] * rc[0] + rc[1] * rc[1]));
+ return (rc[0] * rc[0] + rc[1] * rc[1]);
}
labda = (rc[0] * (p[0] - l1[0]) + rc[1] * (p[1] - l1[1])) / len;
Modified: branches/soc-2011-tomato/source/blender/blenloader/intern/readfile.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenloader/intern/readfile.c 2012-08-14 11:05:26 UTC (rev 49886)
+++ branches/soc-2011-tomato/source/blender/blenloader/intern/readfile.c 2012-08-14 11:07:42 UTC (rev 49887)
@@ -4842,19 +4842,27 @@
}
if (seq->clip) {
seq->clip = newlibadr(fd, sce->id.lib, seq->clip);
- seq->clip->id.us++;
+ if (seq->clip) {
+ seq->clip->id.us++;
+ }
}
if (seq->mask) {
seq->mask = newlibadr(fd, sce->id.lib, seq->mask);
- seq->mask->id.us++;
+ if (seq->mask) {
+ seq->mask->id.us++;
+ }
}
- if (seq->scene_camera) seq->scene_camera = newlibadr(fd, sce->id.lib, seq->scene_camera);
+ if (seq->scene_camera) {
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list