Cleanup: simplify RNA names

This commit is contained in:
Campbell Barton 2018-07-11 13:02:22 +02:00
parent ef30fa3739
commit 1d83fe82bc
8 changed files with 19 additions and 19 deletions

@ -4115,10 +4115,10 @@ class VIEW3D_PT_overlay_pose(Panel):
col.active = display_all
col.prop(overlay, "show_transparent_bones")
row = col.split(0.65)
row.prop(overlay, "show_bone_selection")
row.prop(overlay, "show_bone_select")
sub = row.column()
sub.active = display_all and overlay.show_bone_selection
sub.prop(overlay, "bone_selection_alpha", text="")
sub.active = display_all and overlay.show_bone_select
sub.prop(overlay, "bone_select_alpha", text="")
class VIEW3D_PT_overlay_edit_armature(Panel):

@ -1465,13 +1465,13 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
}
}
}
if (!DNA_struct_elem_find(fd->filesdna, "View3DOverlay", "float", "bone_selection_alpha")) {
if (!DNA_struct_elem_find(fd->filesdna, "View3DOverlay", "float", "bone_select_alpha")) {
for (bScreen *screen = bmain->screen.first; screen; screen = screen->id.next) {
for (ScrArea *sa = screen->areabase.first; sa; sa = sa->next) {
for (SpaceLink *sl = sa->spacedata.first; sl; sl = sl->next) {
if (sl->spacetype == SPACE_VIEW3D) {
View3D *v3d = (View3D *)sl;
v3d->overlay.bone_selection_alpha = 0.5f;
v3d->overlay.bone_select_alpha = 0.5f;
}
}
}

@ -1788,7 +1788,7 @@ void DRW_draw_select_loop(
obedit_mode = CTX_MODE_EDIT_ARMATURE;
}
}
if (v3d->overlay.flag & V3D_OVERLAY_BONE_SELECTION) {
if (v3d->overlay.flag & V3D_OVERLAY_BONE_SELECT) {
if (!(v3d->flag2 & V3D_RENDER_OVERRIDE)) {
Object *obpose = OBPOSE_FROM_OBACT(obact);
if (obpose) {

@ -87,7 +87,7 @@ static bool POSE_is_bone_selection_overlay_active(void)
{
const DRWContextState *dcs = DRW_context_state_get();
const View3D *v3d = dcs->v3d;
return v3d && (v3d->overlay.flag & V3D_OVERLAY_BONE_SELECTION) && OBPOSE_FROM_OBACT(dcs->obact);
return v3d && (v3d->overlay.flag & V3D_OVERLAY_BONE_SELECT) && OBPOSE_FROM_OBACT(dcs->obact);
}
static void POSE_engine_init(void *UNUSED(vedata))
@ -155,8 +155,8 @@ static void POSE_cache_init(void *vedata)
{
if (POSE_is_bone_selection_overlay_active()) {
copy_v4_fl4(ppd->blend_color, 0.0f, 0.0f, 0.0f, v3d->overlay.bone_selection_alpha);
copy_v4_fl4(ppd->blend_color_invert, 0.0f, 0.0f, 0.0f, pow(v3d->overlay.bone_selection_alpha, 4));
copy_v4_fl4(ppd->blend_color, 0.0f, 0.0f, 0.0f, v3d->overlay.bone_select_alpha);
copy_v4_fl4(ppd->blend_color_invert, 0.0f, 0.0f, 0.0f, pow(v3d->overlay.bone_select_alpha, 4));
DRWShadingGroup *grp;
psl->bone_selection = DRW_pass_create(
"Bone Selection",

@ -1256,7 +1256,7 @@ void POSE_OT_quaternions_flip(wmOperatorType *ot)
static int toggle_bone_selection_exec(bContext *C, wmOperator *UNUSED(op))
{
View3D *v3d = CTX_wm_view3d(C);
v3d->overlay.flag ^= V3D_OVERLAY_BONE_SELECTION;
v3d->overlay.flag ^= V3D_OVERLAY_BONE_SELECT;
ED_view3d_shade_update(CTX_data_main(C), v3d, CTX_wm_area(C));
WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, v3d);
return OPERATOR_FINISHED;

@ -334,7 +334,7 @@ static SpaceLink *view3d_new(const ScrArea *UNUSED(sa), const Scene *scene)
v3d->overlay.flag = V3D_OVERLAY_LOOK_DEV;
v3d->overlay.wireframe_threshold = 0.5f;
v3d->overlay.bone_selection_alpha = 0.5f;
v3d->overlay.bone_select_alpha = 0.5f;
v3d->overlay.texture_paint_mode_opacity = 0.8;
v3d->overlay.weight_paint_mode_opacity = 0.8;
v3d->overlay.vertex_paint_mode_opacity = 0.8;

@ -175,7 +175,7 @@ typedef struct View3DOverlay {
/* Armature edit/pose mode settings */
int arm_flag;
float bone_selection_alpha;
float bone_select_alpha;
/* Other settings */
float wireframe_threshold;
@ -380,7 +380,7 @@ enum {
enum {
V3D_OVERLAY_FACE_ORIENTATION = (1 << 0),
V3D_OVERLAY_HIDE_CURSOR = (1 << 1),
V3D_OVERLAY_BONE_SELECTION = (1 << 2),
V3D_OVERLAY_BONE_SELECT = (1 << 2),
V3D_OVERLAY_LOOK_DEV = (1 << 3),
V3D_OVERLAY_WIREFRAMES = (1 << 4),
V3D_OVERLAY_HIDE_TEXT = (1 << 5),

@ -2653,14 +2653,14 @@ static void rna_def_space_view3d_overlay(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Face Orientation", "Show the Face Orientation Overlay");
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
prop = RNA_def_property(srna, "show_bone_selection", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "overlay.flag", V3D_OVERLAY_BONE_SELECTION);
prop = RNA_def_property(srna, "show_bone_select", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "overlay.flag", V3D_OVERLAY_BONE_SELECT);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Bone Selection", "Show the Bone Selection Overlay");
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
prop = RNA_def_property(srna, "bone_selection_alpha", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "overlay.bone_selection_alpha");
prop = RNA_def_property(srna, "bone_select_alpha", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "overlay.bone_select_alpha");
RNA_def_property_float_default(prop, 0.5f);
RNA_def_property_ui_text(prop, "Opacity", "Opacity to use for bone selection");
RNA_def_property_range(prop, 0.0f, 1.0f);
@ -2682,13 +2682,13 @@ static void rna_def_space_view3d_overlay(BlenderRNA *brna)
prop = RNA_def_property(srna, "show_look_dev", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "overlay.flag", V3D_OVERLAY_LOOK_DEV);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Look Dev", "Show Look Development Balls and Palette");
RNA_def_property_ui_text(prop, "Look Dev Preview", "Show look development balls and palette");
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
prop = RNA_def_property(srna, "show_wireframes", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "overlay.flag", V3D_OVERLAY_WIREFRAMES);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Wireframes", "Show face edges wires");
RNA_def_property_ui_text(prop, "Wireframe", "Show face edges wires");
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
prop = RNA_def_property(srna, "wireframe_threshold", PROP_FLOAT, PROP_FACTOR);