add lattice selection to rna

This commit is contained in:
Campbell Barton 2012-07-19 11:40:25 +00:00
parent a56f4fee38
commit 776c6e66b2
2 changed files with 6 additions and 2 deletions

@ -203,7 +203,7 @@ static int lattice_select_all_exec(bContext *C, wmOperator *op)
while (a--) { while (a--) {
if (bp->hide == 0) { if (bp->hide == 0) {
if (bp->f1) { if (bp->f1 & SELECT) {
action = SEL_DESELECT; action = SEL_DESELECT;
break; break;
} }
@ -225,7 +225,7 @@ static int lattice_select_all_exec(bContext *C, wmOperator *op)
while (a--) { while (a--) {
if (bp->hide == 0) { if (bp->hide == 0) {
bp->f1 ^= 1; bp->f1 ^= SELECT;
} }
bp++; bp++;
} }

@ -224,6 +224,10 @@ static void rna_def_latticepoint(BlenderRNA *brna)
RNA_def_struct_ui_text(srna, "LatticePoint", "Point in the lattice grid"); RNA_def_struct_ui_text(srna, "LatticePoint", "Point in the lattice grid");
RNA_def_struct_path_func(srna, "rna_LatticePoint_path"); RNA_def_struct_path_func(srna, "rna_LatticePoint_path");
prop = RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "f1", 0);
RNA_def_property_ui_text(prop, "Point selected", "Selection status");
prop = RNA_def_property(srna, "co", PROP_FLOAT, PROP_TRANSLATION); prop = RNA_def_property(srna, "co", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_array(prop, 3); RNA_def_property_array(prop, 3);
RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_clear_flag(prop, PROP_EDITABLE);