[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46772] branches/soc-2011-tomato: rename ' mask shape' to mask object, will make adding shape keys less confusing.
Campbell Barton
ideasman42 at gmail.com
Fri May 18 14:51:11 CEST 2012
Revision: 46772
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46772
Author: campbellbarton
Date: 2012-05-18 12:51:11 +0000 (Fri, 18 May 2012)
Log Message:
-----------
rename 'mask shape' to mask object, will make adding shape keys less confusing.
Modified Paths:
--------------
branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_clip.py
branches/soc-2011-tomato/source/blender/blenkernel/BKE_mask.h
branches/soc-2011-tomato/source/blender/blenkernel/intern/mask.c
branches/soc-2011-tomato/source/blender/blenloader/intern/readfile.c
branches/soc-2011-tomato/source/blender/blenloader/intern/writefile.c
branches/soc-2011-tomato/source/blender/editors/mask/mask_draw.c
branches/soc-2011-tomato/source/blender/editors/mask/mask_editor.c
branches/soc-2011-tomato/source/blender/editors/mask/mask_intern.h
branches/soc-2011-tomato/source/blender/editors/mask/mask_ops.c
branches/soc-2011-tomato/source/blender/editors/transform/transform_conversions.c
branches/soc-2011-tomato/source/blender/makesdna/DNA_mask_types.h
branches/soc-2011-tomato/source/blender/makesrna/intern/rna_mask.c
branches/soc-2011-tomato/source/blender/nodes/composite/nodes/node_composite_mask.c
Modified: branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_clip.py
===================================================================
--- branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_clip.py 2012-05-18 12:49:27 UTC (rev 46771)
+++ branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_clip.py 2012-05-18 12:51:11 UTC (rev 46772)
@@ -555,10 +555,10 @@
col.prop(clip.tracking.camera, "k3")
-class CLIP_PT_shapes(Panel):
+class CLIP_PT_mask_objects(Panel):
bl_space_type = 'CLIP_EDITOR'
bl_region_type = 'UI'
- bl_label = "Shapes"
+ bl_label = "Mask Objects"
@classmethod
def poll(cls, context):
@@ -573,15 +573,15 @@
mask = sc.mask
row = layout.row()
- row.template_list(mask, "shapes",
- mask, "active_shape_index", rows=3)
+ row.template_list(mask, "objects",
+ mask, "active_object_index", rows=3)
sub = row.column(align=True)
- sub.operator("mask.shape_new", icon='ZOOMIN', text="")
- sub.operator("mask.shape_remove", icon='ZOOMOUT', text="")
+ sub.operator("mask.object_new", icon='ZOOMIN', text="")
+ sub.operator("mask.object_remove", icon='ZOOMOUT', text="")
- active = mask.shapes.active
+ active = mask.objects.active
if active:
layout.prop(active, "name")
@@ -597,7 +597,7 @@
mask = sc.mask
if mask and sc.mode == 'MASKEDITING':
- return mask.shapes.active and mask.shapes.active.splines.active
+ return mask.objects.active and mask.objects.active.splines.active
return False
@@ -606,7 +606,7 @@
sc = context.space_data
mask = sc.mask
- spline = mask.shapes.active.splines.active
+ spline = mask.objects.active.splines.active
col = layout.column()
col.prop(spline, "weight_interpolation")
@@ -624,7 +624,7 @@
mask = sc.mask
if mask and sc.mode == 'MASKEDITING':
- return mask.shapes.active and mask.shapes.active.splines.active_point
+ return mask.objects.active and mask.objects.active.splines.active_point
return False
@@ -633,7 +633,7 @@
sc = context.space_data
mask = sc.mask
- point = mask.shapes.active.splines.active_point
+ point = mask.objects.active.splines.active_point
parent = point.parent
col = layout.column()
Modified: branches/soc-2011-tomato/source/blender/blenkernel/BKE_mask.h
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/BKE_mask.h 2012-05-18 12:49:27 UTC (rev 46771)
+++ branches/soc-2011-tomato/source/blender/blenkernel/BKE_mask.h 2012-05-18 12:51:11 UTC (rev 46772)
@@ -30,7 +30,7 @@
struct Main;
struct Mask;
struct MaskParent;
-struct MaskShape;
+struct MaskObject;
struct MaskSpline;
struct MaskSplinePoint;
struct MaskSplinePointUW;
@@ -38,20 +38,20 @@
struct MovieClipUser;
struct Scene;
-/* shapes */
-struct MaskShape *BKE_mask_shape_new(struct Mask *mask, const char *name);
-struct MaskShape *BKE_mask_shape_active(struct Mask *mask);
-void BKE_mask_shape_active_set(struct Mask *mask, struct MaskShape *shape);
-void BKE_mask_shape_remove(struct Mask *mask, struct MaskShape *shape);
+/* mask objects */
+struct MaskObject *BKE_mask_object_new(struct Mask *mask, const char *name);
+struct MaskObject *BKE_mask_object_active(struct Mask *mask);
+void BKE_mask_object_active_set(struct Mask *mask, struct MaskObject *maskobj);
+void BKE_mask_object_remove(struct Mask *mask, struct MaskObject *maskobj);
-void BKE_mask_shape_free(struct MaskShape *shape);
+void BKE_mask_object_free(struct MaskObject *maskobj);
void BKE_mask_spline_free(struct MaskSpline *spline);
void BKE_mask_point_free(struct MaskSplinePoint *point);
-void BKE_mask_shape_unique_name(struct Mask *mask, struct MaskShape *shape);
+void BKE_mask_object_unique_name(struct Mask *mask, struct MaskObject *maskobj);
/* splines */
-struct MaskSpline *BKE_mask_spline_add(struct MaskShape *shape);
+struct MaskSpline *BKE_mask_spline_add(struct MaskObject *maskobj);
int BKE_mask_spline_resolution(struct MaskSpline *spline);
float *BKE_mask_spline_differentiate(struct MaskSpline *spline, int *tot_diff_point);
float *BKE_mask_spline_feather_differentiated_points(struct MaskSpline *spline, int *tot_feather_point);
Modified: branches/soc-2011-tomato/source/blender/blenkernel/intern/mask.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/intern/mask.c 2012-05-18 12:49:27 UTC (rev 46771)
+++ branches/soc-2011-tomato/source/blender/blenkernel/intern/mask.c 2012-05-18 12:51:11 UTC (rev 46772)
@@ -55,68 +55,68 @@
#include "BKE_movieclip.h"
#include "BKE_utildefines.h"
-/* shapes */
+/* mask objects */
-MaskShape *BKE_mask_shape_new(Mask *mask, const char *name)
+MaskObject *BKE_mask_object_new(Mask *mask, const char *name)
{
- MaskShape *shape = MEM_callocN(sizeof(MaskShape), "new mask shape");
+ MaskObject *maskobj = MEM_callocN(sizeof(MaskObject), "new mask object");
if (name && name[0])
- BLI_strncpy(shape->name, name, sizeof(shape->name));
+ BLI_strncpy(maskobj->name, name, sizeof(maskobj->name));
else
- strcpy(shape->name, "Shape");
+ strcpy(maskobj->name, "MaskObject");
- BLI_addtail(&mask->shapes, shape);
+ BLI_addtail(&mask->maskobjs, maskobj);
- BKE_mask_shape_unique_name(mask, shape);
+ BKE_mask_object_unique_name(mask, maskobj);
- mask->tot_shape++;
+ mask->tot_maskobj++;
- return shape;
+ return maskobj;
}
-MaskShape *BKE_mask_shape_active(Mask *mask)
+MaskObject *BKE_mask_object_active(Mask *mask)
{
- return BLI_findlink(&mask->shapes, mask->shapenr);
+ return BLI_findlink(&mask->maskobjs, mask->act_maskobj);
}
-void BKE_mask_shape_active_set(Mask *mask, MaskShape *shape)
+void BKE_mask_object_active_set(Mask *mask, MaskObject *maskobj)
{
- int index = BLI_findindex(&mask->shapes, shape);
+ int index = BLI_findindex(&mask->maskobjs, maskobj);
if (index >= 0)
- mask->shapenr = index;
+ mask->act_maskobj = index;
else
- mask->shapenr = 0;
+ mask->act_maskobj = 0;
}
-void BKE_mask_shape_remove(Mask *mask, MaskShape *shape)
+void BKE_mask_object_remove(Mask *mask, MaskObject *maskobj)
{
- BLI_remlink(&mask->shapes, shape);
- BKE_mask_shape_free(shape);
+ BLI_remlink(&mask->maskobjs, maskobj);
+ BKE_mask_object_free(maskobj);
- mask->tot_shape--;
+ mask->tot_maskobj--;
- if (mask->shapenr >= mask->tot_shape)
- mask->shapenr = mask->tot_shape - 1;
+ if (mask->act_maskobj >= mask->tot_maskobj)
+ mask->act_maskobj = mask->tot_maskobj - 1;
}
-void BKE_mask_shape_unique_name(Mask *mask, MaskShape *shape)
+void BKE_mask_object_unique_name(Mask *mask, MaskObject *maskobj)
{
- BLI_uniquename(&mask->shapes, shape, "Shape", '.', offsetof(MaskShape, name), sizeof(shape->name));
+ BLI_uniquename(&mask->maskobjs, maskobj, "MaskObject", '.', offsetof(MaskObject, name), sizeof(maskobj->name));
}
/* splines */
-MaskSpline *BKE_mask_spline_add(MaskShape *shape)
+MaskSpline *BKE_mask_spline_add(MaskObject *maskobj)
{
MaskSpline *spline;
- spline = MEM_callocN(sizeof(MaskSpline), "new shape spline");
- BLI_addtail(&shape->splines, spline);
+ spline = MEM_callocN(sizeof(MaskSpline), "new mask spline");
+ BLI_addtail(&maskobj->splines, spline);
/* spline shall have one point at least */
- spline->points = MEM_callocN(sizeof(MaskSplinePoint), "new shape spline point");
+ spline->points = MEM_callocN(sizeof(MaskSplinePoint), "new mask spline point");
spline->tot_point = 1;
/* cyclic shapes are more usually used */
@@ -662,33 +662,33 @@
MEM_freeN(spline);
}
-void BKE_mask_shape_free(MaskShape *shape)
+void BKE_mask_object_free(MaskObject *maskobj)
{
- MaskSpline *spline = shape->splines.first;
+ MaskSpline *spline = maskobj->splines.first;
while (spline) {
MaskSpline *next_spline = spline->next;
- BLI_remlink(&shape->splines, spline);
+ BLI_remlink(&maskobj->splines, spline);
BKE_mask_spline_free(spline);
spline = next_spline;
}
- MEM_freeN(shape);
+ MEM_freeN(maskobj);
}
void BKE_mask_free(Mask *mask)
{
- MaskShape *shape = mask->shapes.first;
+ MaskObject *maskobj = mask->maskobjs.first;
- while (shape) {
- MaskShape *next_shape = shape->next;
+ while (maskobj) {
+ MaskObject *next_maskobj = maskobj->next;
- BLI_remlink(&mask->shapes, shape);
- BKE_mask_shape_free(shape);
+ BLI_remlink(&mask->maskobjs, maskobj);
+ BKE_mask_object_free(maskobj);
- shape = next_shape;
+ maskobj = next_maskobj;
}
}
@@ -940,12 +940,12 @@
void BKE_mask_calc_handles(Mask *mask)
{
- MaskShape *shape;
+ MaskObject *maskobj;
- for (shape = mask->shapes.first; shape; shape = shape->next) {
+ for (maskobj = mask->maskobjs.first; maskobj; maskobj = maskobj->next) {
MaskSpline *spline;
- for (spline = shape->splines.first; spline; spline = spline->next) {
+ for (spline = maskobj->splines.first; spline; spline = spline->next) {
int i;
for (i = 0; i < spline->tot_point; i++) {
@@ -957,10 +957,10 @@
void BKE_mask_evaluate(Mask *mask, float ctime)
{
- MaskShape *shape = mask->shapes.first;
+ MaskObject *maskobj = mask->maskobjs.first;
- while (shape) {
- MaskSpline *spline = shape->splines.first;
+ while (maskobj) {
+ MaskSpline *spline = maskobj->splines.first;
int i;
while (spline) {
@@ -981,7 +981,7 @@
spline = spline->next;
}
- shape = shape->next;
+ maskobj = maskobj->next;
}
BKE_mask_calc_handles(mask);
Modified: branches/soc-2011-tomato/source/blender/blenloader/intern/readfile.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenloader/intern/readfile.c 2012-05-18 12:49:27 UTC (rev 46771)
+++ branches/soc-2011-tomato/source/blender/blenloader/intern/readfile.c 2012-05-18 12:51:11 UTC (rev 46772)
@@ -6276,19 +6276,19 @@
static void direct_link_mask(FileData *fd, Mask *mask)
{
- MaskShape *shape;
+ MaskObject *maskobj;
mask->adt = newdataadr(fd, mask->adt);
- link_list(fd, &mask->shapes);
+ link_list(fd, &mask->maskobjs);
- shape = mask->shapes.first;
- while (shape) {
+ maskobj = mask->maskobjs.first;
+ while (maskobj) {
MaskSpline *spline;
- link_list(fd, &shape->splines);
+ link_list(fd, &maskobj->splines);
- spline = shape->splines.first;
+ spline = maskobj->splines.first;
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list