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>2010-11-18 07:26:50 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-11-18 07:26:50 +0300
commit48524d6e9122c323a43ef9fc8ba30b20e101308c (patch)
tree9a05b65772fe59ffbc38283e1397f2ecbf8c7453 /source/blender/makesrna/intern/rna_meta.c
parent7045ef617fa097e6f9a7919f36c5a494ce046a7b (diff)
fix [#24780] Metaballs are not drawn correctly in new scenes
this is a can of worms, at the moment blender depends on broken behavior for metaballs: find_basis_mball() can return a metaball object that fails a is_basis_mball() check which makes this logic very confusing (added note about this in mball.c). Metaballs needs a refactor however at least make drawing fail consistently, For wire draw is_basis_mball() wasn't being checked, for solid drawing it was (hence the strange wire frame). For now the motherball needs to exist in the main scene else it wont work.
Diffstat (limited to 'source/blender/makesrna/intern/rna_meta.c')
-rw-r--r--source/blender/makesrna/intern/rna_meta.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/source/blender/makesrna/intern/rna_meta.c b/source/blender/makesrna/intern/rna_meta.c
index 18dfd05b971..6fb8f159758 100644
--- a/source/blender/makesrna/intern/rna_meta.c
+++ b/source/blender/makesrna/intern/rna_meta.c
@@ -25,6 +25,7 @@
#include <stdlib.h>
#include "RNA_define.h"
+#include "RNA_enum_types.h"
#include "rna_internal.h"
@@ -138,14 +139,6 @@ static void rna_MetaBall_elements_remove(MetaBall *mb, ReportList *reports, Meta
#else
-static EnumPropertyItem metaelem_type_items[] = {
- {MB_BALL, "BALL", ICON_META_BALL, "Ball", ""},
- {MB_TUBE, "CAPSULE", ICON_META_CAPSULE, "Capsule", ""},
- {MB_PLANE, "PLANE", ICON_META_PLANE, "Plane", ""},
- {MB_ELIPSOID, "ELLIPSOID", ICON_META_ELLIPSOID, "Ellipsoid", ""}, // NOTE: typo at original definition!
- {MB_CUBE, "CUBE", ICON_META_CUBE, "Cube", ""},
- {0, NULL, 0, NULL, NULL}};
-
static void rna_def_metaelement(BlenderRNA *brna)
{
StructRNA *srna;
@@ -155,7 +148,7 @@ static void rna_def_metaelement(BlenderRNA *brna)
RNA_def_struct_sdna(srna, "MetaElem");
RNA_def_struct_ui_text(srna, "Meta Element", "Blobby element in a MetaBall datablock");
RNA_def_struct_ui_icon(srna, ICON_OUTLINER_DATA_META);
-
+
/* enums */
prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, metaelem_type_items);