forked from bartvdbraak/blender
- 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.
This commit is contained in:
parent
77476b294f
commit
dfe7cde9f1
@ -48,6 +48,19 @@ class DATA_PT_normals(DataButtonsPanel):
|
|||||||
col.itemR(mesh, "vertex_normal_flip")
|
col.itemR(mesh, "vertex_normal_flip")
|
||||||
col.itemR(mesh, "double_sided")
|
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):
|
class DATA_PT_vertex_groups(DataButtonsPanel):
|
||||||
__label__ = "Vertex Groups"
|
__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_context_mesh)
|
||||||
bpy.types.register(DATA_PT_normals)
|
bpy.types.register(DATA_PT_normals)
|
||||||
|
bpy.types.register(DATA_PT_settings)
|
||||||
bpy.types.register(DATA_PT_vertex_groups)
|
bpy.types.register(DATA_PT_vertex_groups)
|
||||||
bpy.types.register(DATA_PT_shape_keys)
|
bpy.types.register(DATA_PT_shape_keys)
|
||||||
bpy.types.register(DATA_PT_uv_texture)
|
bpy.types.register(DATA_PT_uv_texture)
|
||||||
|
@ -78,6 +78,8 @@ editmesh_mods.c, UI level access, no geometry changes
|
|||||||
#include "WM_api.h"
|
#include "WM_api.h"
|
||||||
#include "WM_types.h"
|
#include "WM_types.h"
|
||||||
|
|
||||||
|
#include "UI_resources.h"
|
||||||
|
|
||||||
#include "RNA_access.h"
|
#include "RNA_access.h"
|
||||||
#include "RNA_define.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[] = {
|
static EnumPropertyItem prop_mesh_edit_types[] = {
|
||||||
{1, "VERT", 0, "Vertices", ""},
|
{1, "VERT", ICON_VERTEXSEL, "Vertices", ""},
|
||||||
{2, "EDGE", 0, "Edges", ""},
|
{2, "EDGE", ICON_EDGESEL, "Edges", ""},
|
||||||
{3, "FACE", 0, "Faces", ""},
|
{3, "FACE", ICON_FACESEL, "Faces", ""},
|
||||||
{0, NULL, 0, NULL, NULL}
|
{0, NULL, 0, NULL, NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1995,6 +1995,12 @@ static int object_mode_set_exec(bContext *C, wmOperator *op)
|
|||||||
if(!ob || !object_mode_set_compat(C, op, ob))
|
if(!ob || !object_mode_set_compat(C, op, ob))
|
||||||
return OPERATOR_PASS_THROUGH;
|
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 */
|
/* Exit current mode if it's not the mode we're setting */
|
||||||
if(ob->mode != OB_MODE_OBJECT && ob->mode != mode)
|
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);
|
WM_operator_name_call(C, object_mode_op_string(ob->mode), WM_OP_EXEC_REGION_WIN, NULL);
|
||||||
|
@ -2226,6 +2226,9 @@ int RNA_path_resolve(PointerRNA *ptr, const char *path, PointerRNA *r_ptr, Prope
|
|||||||
prop= NULL;
|
prop= NULL;
|
||||||
curptr= *ptr;
|
curptr= *ptr;
|
||||||
|
|
||||||
|
if(path)
|
||||||
|
return 0;
|
||||||
|
|
||||||
while(*path) {
|
while(*path) {
|
||||||
/* look up property name in current struct */
|
/* look up property name in current struct */
|
||||||
token= rna_path_token(&path, fixedbuf, sizeof(fixedbuf), 0);
|
token= rna_path_token(&path, fixedbuf, sizeof(fixedbuf), 0);
|
||||||
|
@ -1413,8 +1413,13 @@ static void rna_def_mesh(BlenderRNA *brna)
|
|||||||
RNA_def_property_struct_type(prop, "MeshSticky");
|
RNA_def_property_struct_type(prop, "MeshSticky");
|
||||||
RNA_def_property_ui_text(prop, "Sticky", "Sticky texture coordinates.");
|
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);
|
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_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);
|
RNA_def_property_collection_funcs(prop, "rna_Mesh_uv_textures_begin", 0, 0, 0, "rna_Mesh_uv_textures_length", 0, 0, 0, 0);
|
||||||
|
@ -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)
|
static void rna_SceneRenderData_jpeg2k_preset_set(PointerRNA *ptr, int value)
|
||||||
{
|
{
|
||||||
RenderData *rd= (RenderData*)ptr->data;
|
RenderData *rd= (RenderData*)ptr->data;
|
||||||
@ -292,6 +293,7 @@ static void rna_SceneRenderData_jpeg2k_depth_set(PointerRNA *ptr, int value)
|
|||||||
rd->jp2_depth= value;
|
rd->jp2_depth= value;
|
||||||
rna_SceneRenderData_jpeg2k_preset_update(rd);
|
rna_SceneRenderData_jpeg2k_preset_update(rd);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static int rna_SceneRenderData_active_layer_index_get(PointerRNA *ptr)
|
static int rna_SceneRenderData_active_layer_index_get(PointerRNA *ptr)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user