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>2009-10-07 13:23:29 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-10-07 13:23:29 +0400
commitdfe7cde9f1a8dc90d6d77e2c1108bcb0e87eef82 (patch)
treece7653532d1d2364a3e27dd4683a7daa1f53ed9f
parent77476b294f8a7a74ee6f19ff8bfcbb3fb26e3bda (diff)
- rna path lookup crashed if the string was null (reported by Cessen with an empty driver)
- added TexMesh access ([#19505] Missing option : TexMesh) - Ctrl+Tab works again, not-so-nice workaround, disallow switching to paint modes from editmode, but would be nicer to manage this with keymaps.
-rw-r--r--release/scripts/ui/buttons_data_mesh.py14
-rw-r--r--source/blender/editors/mesh/editmesh_mods.c8
-rw-r--r--source/blender/editors/object/object_edit.c6
-rw-r--r--source/blender/makesrna/intern/rna_access.c3
-rw-r--r--source/blender/makesrna/intern/rna_mesh.c7
-rw-r--r--source/blender/makesrna/intern/rna_scene.c2
6 files changed, 36 insertions, 4 deletions
diff --git a/release/scripts/ui/buttons_data_mesh.py b/release/scripts/ui/buttons_data_mesh.py
index 780ae3ac8f9..055cbb02e3f 100644
--- a/release/scripts/ui/buttons_data_mesh.py
+++ b/release/scripts/ui/buttons_data_mesh.py
@@ -48,6 +48,19 @@ class DATA_PT_normals(DataButtonsPanel):
col.itemR(mesh, "vertex_normal_flip")
col.itemR(mesh, "double_sided")
+class DATA_PT_settings(DataButtonsPanel):
+ __label__ = "Settings"
+
+ def draw(self, context):
+ layout = self.layout
+
+ mesh = context.mesh
+
+ split = layout.split()
+
+ col = split.column()
+ col.itemR(mesh, "texture_mesh")
+
class DATA_PT_vertex_groups(DataButtonsPanel):
__label__ = "Vertex Groups"
@@ -197,6 +210,7 @@ class DATA_PT_vertex_colors(DataButtonsPanel):
bpy.types.register(DATA_PT_context_mesh)
bpy.types.register(DATA_PT_normals)
+bpy.types.register(DATA_PT_settings)
bpy.types.register(DATA_PT_vertex_groups)
bpy.types.register(DATA_PT_shape_keys)
bpy.types.register(DATA_PT_uv_texture)
diff --git a/source/blender/editors/mesh/editmesh_mods.c b/source/blender/editors/mesh/editmesh_mods.c
index 325a1aeec99..a23a6dde652 100644
--- a/source/blender/editors/mesh/editmesh_mods.c
+++ b/source/blender/editors/mesh/editmesh_mods.c
@@ -78,6 +78,8 @@ editmesh_mods.c, UI level access, no geometry changes
#include "WM_api.h"
#include "WM_types.h"
+#include "UI_resources.h"
+
#include "RNA_access.h"
#include "RNA_define.h"
@@ -3614,9 +3616,9 @@ static void mesh_selection_type(ToolSettings *ts, EditMesh *em, int val)
}
static EnumPropertyItem prop_mesh_edit_types[] = {
- {1, "VERT", 0, "Vertices", ""},
- {2, "EDGE", 0, "Edges", ""},
- {3, "FACE", 0, "Faces", ""},
+ {1, "VERT", ICON_VERTEXSEL, "Vertices", ""},
+ {2, "EDGE", ICON_EDGESEL, "Edges", ""},
+ {3, "FACE", ICON_FACESEL, "Faces", ""},
{0, NULL, 0, NULL, NULL}
};
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c
index 54df3ae92da..268cd3b3542 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -1995,6 +1995,12 @@ static int object_mode_set_exec(bContext *C, wmOperator *op)
if(!ob || !object_mode_set_compat(C, op, ob))
return OPERATOR_PASS_THROUGH;
+ /* Irritating workaround! disallow paint modes from editmode since a number of shortcuts conflict
+ * XXX - would be much better to handle this on a keymap level */
+ if(ob->mode == OB_MODE_EDIT && ELEM6(mode, OB_MODE_SCULPT, OB_MODE_VERTEX_PAINT, OB_MODE_WEIGHT_PAINT, OB_MODE_TEXTURE_PAINT, OB_MODE_PARTICLE_EDIT, OB_MODE_POSE)) {
+ return OPERATOR_PASS_THROUGH;
+ }
+
/* Exit current mode if it's not the mode we're setting */
if(ob->mode != OB_MODE_OBJECT && ob->mode != mode)
WM_operator_name_call(C, object_mode_op_string(ob->mode), WM_OP_EXEC_REGION_WIN, NULL);
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index 21fbc9fa66d..780a387ddbb 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -2226,6 +2226,9 @@ int RNA_path_resolve(PointerRNA *ptr, const char *path, PointerRNA *r_ptr, Prope
prop= NULL;
curptr= *ptr;
+ if(path)
+ return 0;
+
while(*path) {
/* look up property name in current struct */
token= rna_path_token(&path, fixedbuf, sizeof(fixedbuf), 0);
diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c
index 124fd80ce5a..84a1940de9d 100644
--- a/source/blender/makesrna/intern/rna_mesh.c
+++ b/source/blender/makesrna/intern/rna_mesh.c
@@ -1413,8 +1413,13 @@ static void rna_def_mesh(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "MeshSticky");
RNA_def_property_ui_text(prop, "Sticky", "Sticky texture coordinates.");
- /* UV textures */
+ /* TODO, should this be allowed to be its self? */
+ prop= RNA_def_property(srna, "texture_mesh", PROP_POINTER, PROP_NONE);
+ RNA_def_property_pointer_sdna(prop, NULL, "texcomesh");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Texture Mesh", "Use another mesh for texture indicies (vertex indicies must be aligned).");
+ /* UV textures */
prop= RNA_def_property(srna, "uv_textures", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "fdata.layers", "fdata.totlayer");
RNA_def_property_collection_funcs(prop, "rna_Mesh_uv_textures_begin", 0, 0, 0, "rna_Mesh_uv_textures_length", 0, 0, 0, 0);
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 9eea920e371..c771259d5a1 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -279,6 +279,7 @@ void rna_SceneRenderData_jpeg2k_preset_update(RenderData *rd)
}
}
+#ifdef WITH_OPENJPEG
static void rna_SceneRenderData_jpeg2k_preset_set(PointerRNA *ptr, int value)
{
RenderData *rd= (RenderData*)ptr->data;
@@ -292,6 +293,7 @@ static void rna_SceneRenderData_jpeg2k_depth_set(PointerRNA *ptr, int value)
rd->jp2_depth= value;
rna_SceneRenderData_jpeg2k_preset_update(rd);
}
+#endif
static int rna_SceneRenderData_active_layer_index_get(PointerRNA *ptr)
{