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>2014-09-01 14:09:31 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-09-01 15:01:11 +0400
commite8f3fa99de8196a36736381b03015689492137bd (patch)
treef02e6a039cf55792053999a41220fbcbc8eaec59 /source/blender/makesrna
parentd91916725d0d20f95c6d4c069428bd1076680087 (diff)
Support more object types scene-scale (on creation)
- lamp - camera - font - empty & effector Also fix inconsistency with apply transform (modified shape-keys for meshes but not curve/lattice)
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_curve_api.c9
-rw-r--r--source/blender/makesrna/intern/rna_lattice_api.c9
-rw-r--r--source/blender/makesrna/intern/rna_mesh_api.c7
-rw-r--r--source/blender/makesrna/intern/rna_meta_api.c6
4 files changed, 20 insertions, 11 deletions
diff --git a/source/blender/makesrna/intern/rna_curve_api.c b/source/blender/makesrna/intern/rna_curve_api.c
index e2c2d1929a8..e85511f08e9 100644
--- a/source/blender/makesrna/intern/rna_curve_api.c
+++ b/source/blender/makesrna/intern/rna_curve_api.c
@@ -38,14 +38,16 @@
#include "BLI_utildefines.h"
-#include "ED_curve.h"
+#include "BKE_curve.h"
#include "rna_internal.h" /* own include */
#ifdef RNA_RUNTIME
-static void rna_Curve_transform(Curve *cu, float *mat)
+static void rna_Curve_transform(Curve *cu, float *mat, int shape_keys)
{
- ED_curve_transform(cu, (float (*)[4])mat);
+ BKE_curve_transform(cu, (float (*)[4])mat, shape_keys);
+
+ DAG_id_tag_update(&cu->id, 0);
}
#else
@@ -58,6 +60,7 @@ void RNA_api_curve(StructRNA *srna)
RNA_def_function_ui_description(func, "Transform curve by a matrix");
parm = RNA_def_float_matrix(func, "matrix", 4, 4, NULL, 0.0f, 0.0f, "", "Matrix", 0.0f, 0.0f);
RNA_def_property_flag(parm, PROP_REQUIRED);
+ RNA_def_boolean(func, "shape_keys", 0, "", "Transform Shape Keys");
func = RNA_def_function(srna, "validate_material_indices", "BKE_curve_material_index_validate");
RNA_def_function_ui_description(func, "Validate material indices of splines or letters, return True when the curve "
diff --git a/source/blender/makesrna/intern/rna_lattice_api.c b/source/blender/makesrna/intern/rna_lattice_api.c
index 2738ee58ada..ed0489db1a2 100644
--- a/source/blender/makesrna/intern/rna_lattice_api.c
+++ b/source/blender/makesrna/intern/rna_lattice_api.c
@@ -38,14 +38,14 @@
#include "BLI_utildefines.h"
-#include "ED_lattice.h"
-
#include "rna_internal.h" /* own include */
#ifdef RNA_RUNTIME
-static void rna_Lattice_transform(Lattice *lt, float *mat)
+static void rna_Lattice_transform(Lattice *lt, float *mat, int shape_keys)
{
- ED_lattice_transform(lt, (float (*)[4])mat);
+ BKE_lattice_transform(lt, (float (*)[4])mat, shape_keys);
+
+ DAG_id_tag_update(&lt->id, 0);
}
#else
@@ -58,6 +58,7 @@ void RNA_api_lattice(StructRNA *srna)
RNA_def_function_ui_description(func, "Transform lattice by a matrix");
parm = RNA_def_float_matrix(func, "matrix", 4, 4, NULL, 0.0f, 0.0f, "", "Matrix", 0.0f, 0.0f);
RNA_def_property_flag(parm, PROP_REQUIRED);
+ RNA_def_boolean(func, "shape_keys", 0, "", "Transform Shape Keys");
}
#endif
diff --git a/source/blender/makesrna/intern/rna_mesh_api.c b/source/blender/makesrna/intern/rna_mesh_api.c
index 3b063515625..cc1f57d8a14 100644
--- a/source/blender/makesrna/intern/rna_mesh_api.c
+++ b/source/blender/makesrna/intern/rna_mesh_api.c
@@ -139,9 +139,11 @@ static void rna_Mesh_calc_smooth_groups(Mesh *mesh, int use_bitflags, int *r_pol
r_group_total, use_bitflags);
}
-static void rna_Mesh_transform(Mesh *mesh, float *mat)
+static void rna_Mesh_transform(Mesh *mesh, float *mat, int shape_keys)
{
- ED_mesh_transform(mesh, (float (*)[4])mat);
+ BKE_mesh_transform(mesh, (float (*)[4])mat, shape_keys);
+
+ DAG_id_tag_update(&mesh->id, 0);
}
#else
@@ -155,6 +157,7 @@ void RNA_api_mesh(StructRNA *srna)
RNA_def_function_ui_description(func, "Transform mesh vertices by a matrix");
parm = RNA_def_float_matrix(func, "matrix", 4, 4, NULL, 0.0f, 0.0f, "", "Matrix", 0.0f, 0.0f);
RNA_def_property_flag(parm, PROP_REQUIRED);
+ RNA_def_boolean(func, "shape_keys", 0, "", "Transform Shape Keys");
func = RNA_def_function(srna, "calc_normals", "BKE_mesh_calc_normals");
RNA_def_function_ui_description(func, "Calculate vertex normals");
diff --git a/source/blender/makesrna/intern/rna_meta_api.c b/source/blender/makesrna/intern/rna_meta_api.c
index 4e8703ecac1..43dca6fe4f1 100644
--- a/source/blender/makesrna/intern/rna_meta_api.c
+++ b/source/blender/makesrna/intern/rna_meta_api.c
@@ -38,14 +38,16 @@
#include "BLI_utildefines.h"
-#include "ED_mball.h"
+#include "BKE_mball.h"
#include "rna_internal.h" /* own include */
#ifdef RNA_RUNTIME
static void rna_Meta_transform(struct MetaBall *mb, float *mat)
{
- ED_mball_transform(mb, (float (*)[4])mat);
+ BKE_mball_transform(mb, (float (*)[4])mat);
+
+ DAG_id_tag_update(&mb->id, 0);
}
#else