forked from bartvdbraak/blender
* Some guideline work for the particle py file.
* Minor layout tweaks in Node RNA to match most other RNA enums.
This commit is contained in:
parent
95fbca7dc9
commit
cb45db0336
@ -439,14 +439,14 @@ class PARTICLE_PT_physics(ParticleButtonsPanel):
|
||||
row.template_list(psys, "targets", psys, "active_particle_target_index")
|
||||
|
||||
col = row.column()
|
||||
subrow = col.row()
|
||||
subcol = subrow.column(align=True)
|
||||
subcol.itemO("particle.new_target", icon='ICON_ZOOMIN', text="")
|
||||
subcol.itemO("particle.remove_target", icon='ICON_ZOOMOUT', text="")
|
||||
subrow = col.row()
|
||||
subcol = subrow.column(align=True)
|
||||
subcol.itemO("particle.target_move_up", icon='VICON_MOVE_UP', text="")
|
||||
subcol.itemO("particle.target_move_down", icon='VICON_MOVE_DOWN', text="")
|
||||
sub = col.row()
|
||||
subsub = sub.column(align=True)
|
||||
subsub.itemO("particle.new_target", icon='ICON_ZOOMIN', text="")
|
||||
subsub.itemO("particle.remove_target", icon='ICON_ZOOMOUT', text="")
|
||||
sub = col.row()
|
||||
subsub = sub.column(align=True)
|
||||
subsub.itemO("particle.target_move_up", icon='VICON_MOVE_UP', text="")
|
||||
subsub.itemO("particle.target_move_down", icon='VICON_MOVE_DOWN', text="")
|
||||
|
||||
key = psys.active_particle_target
|
||||
if key:
|
||||
@ -462,11 +462,11 @@ class PARTICLE_PT_physics(ParticleButtonsPanel):
|
||||
col.itemR(key, "time")
|
||||
col.itemR(key, "duration")
|
||||
else:
|
||||
subrow = row.row()
|
||||
sub = row.row()
|
||||
#doesn't work yet
|
||||
#subrow.red_alert = key.valid
|
||||
subrow.itemR(key, "object", text="")
|
||||
subrow.itemR(key, "system", text="System")
|
||||
sub.itemR(key, "object", text="")
|
||||
sub.itemR(key, "system", text="System")
|
||||
|
||||
layout.itemR(key, "mode", expand=True)
|
||||
|
||||
@ -517,14 +517,14 @@ class PARTICLE_PT_boidbrain(ParticleButtonsPanel):
|
||||
row.template_list(state, "rules", state, "active_boid_rule_index")
|
||||
|
||||
col = row.column()
|
||||
subrow = col.row()
|
||||
subcol = subrow.column(align=True)
|
||||
subcol.item_menu_enumO("boid.rule_add", "type", icon='ICON_ZOOMIN', text="")
|
||||
subcol.itemO("boid.rule_del", icon='ICON_ZOOMOUT', text="")
|
||||
subrow = col.row()
|
||||
subcol = subrow.column(align=True)
|
||||
subcol.itemO("boid.rule_move_up", icon='VICON_MOVE_UP', text="")
|
||||
subcol.itemO("boid.rule_move_down", icon='VICON_MOVE_DOWN', text="")
|
||||
sub = col.row()
|
||||
subsub = sub.column(align=True)
|
||||
subsub.item_menu_enumO("boid.rule_add", "type", icon='ICON_ZOOMIN', text="")
|
||||
subsub.itemO("boid.rule_del", icon='ICON_ZOOMOUT', text="")
|
||||
sub = col.row()
|
||||
subcol = sub.column(align=True)
|
||||
subsub.itemO("boid.rule_move_up", icon='VICON_MOVE_UP', text="")
|
||||
subsub.itemO("boid.rule_move_down", icon='VICON_MOVE_DOWN', text="")
|
||||
|
||||
rule = state.active_boid_rule
|
||||
|
||||
@ -619,19 +619,19 @@ class PARTICLE_PT_render(ParticleButtonsPanel):
|
||||
return
|
||||
|
||||
sub.itemR(part, "render_strand")
|
||||
colsub = sub.column()
|
||||
colsub.active = part.render_strand == False
|
||||
colsub.itemR(part, "render_adaptive")
|
||||
colsub = sub.column()
|
||||
colsub.active = part.render_adaptive or part.render_strand == True
|
||||
colsub.itemR(part, "adaptive_angle")
|
||||
colsub = sub.column()
|
||||
colsub.active = part.render_adaptive == True and part.render_strand == False
|
||||
colsub.itemR(part, "adaptive_pix")
|
||||
subsub = sub.column()
|
||||
subsub.active = part.render_strand == False
|
||||
subsub.itemR(part, "render_adaptive")
|
||||
subsub = sub.column()
|
||||
subsub.active = part.render_adaptive or part.render_strand == True
|
||||
subsub.itemR(part, "adaptive_angle")
|
||||
subsub = sub.column()
|
||||
subsub.active = part.render_adaptive == True and part.render_strand == False
|
||||
subsub.itemR(part, "adaptive_pix")
|
||||
sub.itemR(part, "hair_bspline")
|
||||
sub.itemR(part, "render_step", text="Steps")
|
||||
|
||||
sub = split.column()
|
||||
|
||||
sub.itemL(text="Timing:")
|
||||
sub.itemR(part, "abs_path_time")
|
||||
sub.itemR(part, "path_start", text="Start", slider=not part.abs_path_time)
|
||||
@ -650,9 +650,9 @@ class PARTICLE_PT_render(ParticleButtonsPanel):
|
||||
row.itemR(part, "simplify_transition")
|
||||
row = layout.row()
|
||||
row.itemR(part, "viewport")
|
||||
subrow = row.row()
|
||||
subrow.active = part.viewport == True
|
||||
subrow.itemR(part, "simplify_viewport")
|
||||
sub = row.row()
|
||||
sub.active = part.viewport == True
|
||||
sub.itemR(part, "simplify_viewport")
|
||||
|
||||
elif part.ren_as == 'OBJECT':
|
||||
sub.itemR(part, "dupli_object")
|
||||
@ -662,27 +662,27 @@ class PARTICLE_PT_render(ParticleButtonsPanel):
|
||||
split = layout.split()
|
||||
sub = split.column()
|
||||
sub.itemR(part, "whole_group")
|
||||
colsub = sub.column()
|
||||
colsub.active = part.whole_group == False
|
||||
colsub.itemR(part, "use_group_count")
|
||||
subsub = sub.column()
|
||||
subsub.active = part.whole_group == False
|
||||
subsub.itemR(part, "use_group_count")
|
||||
|
||||
sub = split.column()
|
||||
colsub = sub.column()
|
||||
colsub.active = part.whole_group == False
|
||||
colsub.itemR(part, "use_global_dupli")
|
||||
colsub.itemR(part, "rand_group")
|
||||
subsub = sub.column()
|
||||
subsub.active = part.whole_group == False
|
||||
subsub.itemR(part, "use_global_dupli")
|
||||
subsub.itemR(part, "rand_group")
|
||||
|
||||
if part.use_group_count and not part.whole_group:
|
||||
row = layout.row()
|
||||
row.template_list(part, "dupliweights", part, "active_dupliweight_index")
|
||||
|
||||
col = row.column()
|
||||
subrow = col.row()
|
||||
subcol = subrow.column(align=True)
|
||||
subcol.itemO("particle.dupliob_copy", icon='ICON_ZOOMIN', text="")
|
||||
subcol.itemO("particle.dupliob_remove", icon='ICON_ZOOMOUT', text="")
|
||||
subcol.itemO("particle.dupliob_move_up", icon='VICON_MOVE_UP', text="")
|
||||
subcol.itemO("particle.dupliob_move_down", icon='VICON_MOVE_DOWN', text="")
|
||||
sub = col.row()
|
||||
subsub = sub.column(align=True)
|
||||
subsub.itemO("particle.dupliob_copy", icon='ICON_ZOOMIN', text="")
|
||||
subsub.itemO("particle.dupliob_remove", icon='ICON_ZOOMOUT', text="")
|
||||
subsub.itemO("particle.dupliob_move_up", icon='VICON_MOVE_UP', text="")
|
||||
subsub.itemO("particle.dupliob_move_down", icon='VICON_MOVE_DOWN', text="")
|
||||
|
||||
weight = part.active_dupliweight
|
||||
if weight:
|
||||
@ -788,10 +788,10 @@ class PARTICLE_PT_draw(ParticleButtonsPanel):
|
||||
if (path):
|
||||
col.itemR(part, "draw_step")
|
||||
else:
|
||||
subcol = col.column()
|
||||
subcol.active = part.material_color == False
|
||||
#subcol.itemL(text="color")
|
||||
#subcol.itemL(text="Override material color")
|
||||
sub = col.column()
|
||||
sub.active = part.material_color == False
|
||||
#sub.itemL(text="color")
|
||||
#sub.itemL(text="Override material color")
|
||||
|
||||
|
||||
class PARTICLE_PT_children(ParticleButtonsPanel):
|
||||
@ -864,11 +864,11 @@ class PARTICLE_PT_children(ParticleButtonsPanel):
|
||||
|
||||
split = layout.split()
|
||||
|
||||
sub = split.column()
|
||||
sub.itemR(part, "kink_amplitude")
|
||||
sub.itemR(part, "kink_frequency")
|
||||
sub = split.column()
|
||||
sub.itemR(part, "kink_shape", slider=True)
|
||||
col = split.column()
|
||||
col.itemR(part, "kink_amplitude")
|
||||
col.itemR(part, "kink_frequency")
|
||||
col = split.column()
|
||||
col.itemR(part, "kink_shape", slider=True)
|
||||
|
||||
|
||||
class PARTICLE_PT_field_weights(ParticleButtonsPanel):
|
||||
|
@ -59,15 +59,13 @@ static EnumPropertyItem node_blend_type_items[] = {
|
||||
{12, "HUE", 0, "Hue", ""},
|
||||
{16, "SOFT_LIGHT", 0, "Soft Light", ""},
|
||||
{17, "LINEAR_LIGHT", 0, "Linear Light",""},
|
||||
{0, NULL, 0, NULL, NULL}
|
||||
};
|
||||
{0, NULL, 0, NULL, NULL}};
|
||||
|
||||
static EnumPropertyItem node_flip_items[] = {
|
||||
{0, "X", 0, "Flip X", ""},
|
||||
{1, "Y", 0, "Flip Y", ""},
|
||||
{2, "XY", 0, "Flip X & Y", ""},
|
||||
{0, NULL, 0, NULL, NULL}
|
||||
};
|
||||
{0, NULL, 0, NULL, NULL}};
|
||||
|
||||
static EnumPropertyItem node_math_items[] = {
|
||||
{ 0, "ADD", 0, "Add", ""},
|
||||
@ -87,8 +85,7 @@ static EnumPropertyItem node_math_items[] = {
|
||||
{14, "ROUND", 0, "Round", ""},
|
||||
{15, "LESS_THAN", 0, "Less Than", ""},
|
||||
{16, "GREATER_THAN", 0, "Greater Than", ""},
|
||||
{0, NULL, 0, NULL, NULL}
|
||||
};
|
||||
{0, NULL, 0, NULL, NULL}};
|
||||
|
||||
static EnumPropertyItem node_vec_math_items[] = {
|
||||
{0, "ADD", 0, "Add", ""},
|
||||
@ -97,8 +94,7 @@ static EnumPropertyItem node_vec_math_items[] = {
|
||||
{3, "DOT_PRODUCT", 0, "Dot Product", ""},
|
||||
{4, "CROSS_PRODUCT", 0, "Cross Product", ""},
|
||||
{5, "NORMALIZE", 0, "Normalize", ""},
|
||||
{0, NULL, 0, NULL, NULL}
|
||||
};
|
||||
{0, NULL, 0, NULL, NULL}};
|
||||
|
||||
static EnumPropertyItem node_filter_items[] = {
|
||||
{0, "SOFTEN", 0, "Soften", ""},
|
||||
@ -108,8 +104,7 @@ static EnumPropertyItem node_filter_items[] = {
|
||||
{4, "PREWITT", 0, "Prewitt", ""},
|
||||
{5, "KIRSCH", 0, "Kirsch", ""},
|
||||
{6, "SHADOW", 0, "Shadow", ""},
|
||||
{0, NULL, 0, NULL, NULL}
|
||||
};
|
||||
{0, NULL, 0, NULL, NULL}};
|
||||
|
||||
#ifdef RNA_RUNTIME
|
||||
|
||||
@ -583,8 +578,7 @@ static void def_cmp_blur(StructRNA *srna)
|
||||
{R_FILTER_FAST_GAUSS, "FAST_GAUSS", 0, "Fast Gaussian", ""},
|
||||
{R_FILTER_CATROM, "CATROM", 0, "Catrom", ""},
|
||||
{R_FILTER_MITCH, "MITCH", 0, "Mitch", ""},
|
||||
{0, NULL, 0, NULL, NULL}
|
||||
};
|
||||
{0, NULL, 0, NULL, NULL}};
|
||||
|
||||
RNA_def_struct_sdna_from(srna, "NodeBlurData", "storage");
|
||||
|
||||
@ -766,8 +760,7 @@ static void def_cmp_levels(StructRNA *srna)
|
||||
{3, "GREEN", 0, "G", "Green Channel"},
|
||||
{4, "BLUE", 0, "B", "Blue Channel"},
|
||||
{5, "LUMINANCE", 0, "L", "Luminance Channel"},
|
||||
{0, NULL, 0, NULL, NULL}
|
||||
};
|
||||
{0, NULL, 0, NULL, NULL}};
|
||||
|
||||
prop = RNA_def_property(srna, "color_space", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_sdna(prop, NULL, "custom1");
|
||||
@ -785,8 +778,7 @@ static void def_cmp_image(StructRNA *srna)
|
||||
{IMA_SRC_MOVIE, "MOVIE", "Movie", ""},
|
||||
{IMA_SRC_SEQUENCE, "SEQUENCE", "Sequence", ""},
|
||||
{IMA_SRC_GENERATED, "GENERATED", "Generated", ""},
|
||||
{0, NULL, 0, NULL, NULL}
|
||||
};*/
|
||||
{0, NULL, 0, NULL, NULL}};*/
|
||||
|
||||
prop = RNA_def_property(srna, "image", PROP_POINTER, PROP_NONE);
|
||||
RNA_def_property_pointer_sdna(prop, NULL, "id");
|
||||
@ -949,8 +941,7 @@ static void def_cmp_scale(StructRNA *srna)
|
||||
{0, "RELATIVE", 0, "Relative", ""},
|
||||
{1, "ABSOLUTE", 0, "Absolute", ""},
|
||||
{2, "SCENE_SIZE", 0, "Scene Size", ""},
|
||||
{0, NULL, 0, NULL, NULL}
|
||||
};
|
||||
{0, NULL, 0, NULL, NULL}};
|
||||
|
||||
prop = RNA_def_property(srna, "space", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_sdna(prop, NULL, "custom1");
|
||||
@ -1034,8 +1025,7 @@ static void def_cmp_color_spill(StructRNA *srna)
|
||||
{1, "R", 0, "R", "Red Spill Suppression"},
|
||||
{2, "G", 0, "G", "Green Spill Suppression"},
|
||||
{3, "B", 0, "B", "Blue Spill Suppression"},
|
||||
{0, NULL, 0, NULL, NULL}
|
||||
};
|
||||
{0, NULL, 0, NULL, NULL}};
|
||||
|
||||
prop = RNA_def_property(srna, "channel", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_sdna(prop, NULL, "custom1");
|
||||
@ -1121,8 +1111,7 @@ static void def_cmp_channel_matte(StructRNA *srna)
|
||||
{2, "HSV", 0, "HSV", "HSV Color Space"},
|
||||
{3, "YUV", 0, "YUV", "YUV Color Space"},
|
||||
{4, "YCC", 0, "YCbCr", "YCbCr Color Space"},
|
||||
{0, NULL, 0, NULL, NULL}
|
||||
};
|
||||
{0, NULL, 0, NULL, NULL}};
|
||||
|
||||
prop = RNA_def_property(srna, "color_space", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_sdna(prop, NULL, "custom1");
|
||||
@ -1171,8 +1160,7 @@ static void def_cmp_splitviewer(StructRNA *srna)
|
||||
static EnumPropertyItem axis_items[] = {
|
||||
{0, "X", 0, "X", ""},
|
||||
{1, "Y", 0, "Y", ""},
|
||||
{0, NULL, 0, NULL, NULL}
|
||||
};
|
||||
{0, NULL, 0, NULL, NULL}};
|
||||
|
||||
prop = RNA_def_property(srna, "axis", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_sdna(prop, NULL, "custom2");
|
||||
@ -1221,8 +1209,7 @@ static void def_cmp_defocus(StructRNA *srna)
|
||||
{4, "SQUARE", 0, "Square", "4 sides"},
|
||||
{3, "TRIANGLE", 0, "Triangular", "3 sides"},
|
||||
{0, "CIRCLE", 0, "Circular", ""},
|
||||
{0, NULL, 0, NULL, NULL}
|
||||
};
|
||||
{0, NULL, 0, NULL, NULL}};
|
||||
|
||||
RNA_def_struct_sdna_from(srna, "NodeDefocus", "storage");
|
||||
|
||||
@ -1423,8 +1410,7 @@ static void def_cmp_premul_key(StructRNA *srna)
|
||||
static EnumPropertyItem type_items[] = {
|
||||
{0, "KEY_TO_PREMUL", 0, "Key to Premul", ""},
|
||||
{1, "PREMUL_TO_KEY", 0, "Premul to Key", ""},
|
||||
{0, NULL, 0, NULL, NULL}
|
||||
};
|
||||
{0, NULL, 0, NULL, NULL}};
|
||||
|
||||
prop = RNA_def_property(srna, "mapping", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_sdna(prop, NULL, "custom1");
|
||||
@ -1443,15 +1429,13 @@ static void def_cmp_glare(StructRNA *srna)
|
||||
{2, "STREAKS", 0, "Streaks", ""},
|
||||
{1, "FOG_GLOW", 0, "Fog Glow", ""},
|
||||
{0, "SIMPLE_STAR", 0, "Simple Star", ""},
|
||||
{0, NULL, 0, NULL, NULL}
|
||||
};
|
||||
{0, NULL, 0, NULL, NULL}};
|
||||
|
||||
static EnumPropertyItem quality_items[] = {
|
||||
{0, "HIGH", 0, "High", ""},
|
||||
{1, "MEDIUM", 0, "Medium", ""},
|
||||
{2, "LOW", 0, "Low", ""},
|
||||
{0, NULL, 0, NULL, NULL}
|
||||
};
|
||||
{0, NULL, 0, NULL, NULL}};
|
||||
|
||||
RNA_def_struct_sdna_from(srna, "NodeGlare", "storage");
|
||||
|
||||
@ -1530,8 +1514,7 @@ static void def_cmp_tonemap(StructRNA *srna)
|
||||
static EnumPropertyItem type_items[] = {
|
||||
{1, "RD_PHOTORECEPTOR", 0, "R/D Photoreceptor", ""},
|
||||
{0, "RH_SIMPLE", 0, "Rh Simple", ""},
|
||||
{0, NULL, 0, NULL, NULL}
|
||||
};
|
||||
{0, NULL, 0, NULL, NULL}};
|
||||
|
||||
RNA_def_struct_sdna_from(srna, "NodeTonemap", "storage");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user