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
path: root/source
diff options
context:
space:
mode:
authorAndrew Hale <TrumanBlending@gmail.com>2018-08-06 12:37:49 +0300
committerAndrew Hale <TrumanBlending@gmail.com>2018-08-06 13:11:35 +0300
commit4c4aa65adbef3b119fbd1e3e5e8bb17bdef67718 (patch)
treebd78c424e18e62b2a850c93f474b7ae06002c37f /source
parent907413ca65f46d4d349fb52cfcf42bf6212f62b3 (diff)
PyAPI: Make skin modifier roots settable
This make the root flag writable using the Python API, using the generic skin vertex flag setter function. Reviewed By: Campbell Barton Differential Revision: http://developer.blender.org/D3583
Diffstat (limited to 'source')
-rw-r--r--source/blender/makesrna/intern/rna_mesh.c4
-rw-r--r--source/blender/python/bmesh/bmesh_py_types_meshdata.c7
2 files changed, 6 insertions, 5 deletions
diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c
index 0b8f90e1c68..0e0e869a340 100644
--- a/source/blender/makesrna/intern/rna_mesh.c
+++ b/source/blender/makesrna/intern/rna_mesh.c
@@ -3220,7 +3220,9 @@ static void rna_def_skin_vertices(BlenderRNA *brna, PropertyRNA *UNUSED(cprop))
prop = RNA_def_property(srna, "use_root", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MVERT_SKIN_ROOT);
- RNA_def_property_ui_text(prop, "Root", "Vertex is a root for rotation calculations and armature generation");
+ RNA_def_property_ui_text(prop, "Root",
+ "Vertex is a root for rotation calculations and armature generation, "
+ "setting this flag does not clear other roots in the same mesh island");
RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop = RNA_def_property(srna, "use_loose", PROP_BOOLEAN, PROP_NONE);
diff --git a/source/blender/python/bmesh/bmesh_py_types_meshdata.c b/source/blender/python/bmesh/bmesh_py_types_meshdata.c
index ea606329b07..fabbfdb94c5 100644
--- a/source/blender/python/bmesh/bmesh_py_types_meshdata.c
+++ b/source/blender/python/bmesh/bmesh_py_types_meshdata.c
@@ -282,7 +282,7 @@ static int bpy_bmvertskin_radius_set(BPy_BMVertSkin *self, PyObject *value, void
}
PyDoc_STRVAR(bpy_bmvertskin_flag__use_root_doc,
-"Use as root vertex.\n\n:type: boolean"
+"Use as root vertex. Setting this flag does not clear other roots in the same mesh island.\n\n:type: boolean"
);
PyDoc_STRVAR(bpy_bmvertskin_flag__use_loose_doc,
"Use loose vertex.\n\n:type: boolean"
@@ -311,17 +311,16 @@ static int bpy_bmvertskin_flag_set(BPy_BMVertSkin *self, PyObject *value, void *
}
}
-/* XXX Todo: Make root settable, currently the code to disable all other verts as roots sits within the modifier */
static PyGetSetDef bpy_bmvertskin_getseters[] = {
/* attributes match rna_mesh_gen */
{(char *)"radius", (getter)bpy_bmvertskin_radius_get, (setter)bpy_bmvertskin_radius_set, (char *)bpy_bmvertskin_radius_doc, NULL},
- {(char *)"use_root", (getter)bpy_bmvertskin_flag_get, (setter)NULL, (char *)bpy_bmvertskin_flag__use_root_doc, (void *)MVERT_SKIN_ROOT},
+ {(char *)"use_root", (getter)bpy_bmvertskin_flag_get, (setter)bpy_bmvertskin_flag_set, (char *)bpy_bmvertskin_flag__use_root_doc, (void *)MVERT_SKIN_ROOT},
{(char *)"use_loose", (getter)bpy_bmvertskin_flag_get, (setter)bpy_bmvertskin_flag_set, (char *)bpy_bmvertskin_flag__use_loose_doc, (void *)MVERT_SKIN_LOOSE},
{NULL, NULL, NULL, NULL, NULL} /* Sentinel */
};
-static PyTypeObject BPy_BMVertSkin_Type; /* bm.loops.layers.uv.active */
+static PyTypeObject BPy_BMVertSkin_Type; /* bm.loops.layers.skin.active */
static void bm_init_types_bmvertskin(void)
{