diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py index 13d070be135..a7008efdcf8 100644 --- a/intern/cycles/blender/addon/ui.py +++ b/intern/cycles/blender/addon/ui.py @@ -162,33 +162,55 @@ class CYCLES_RENDER_PT_sampling(CyclesButtonsPanel, Panel): if cscene.progressive == 'PATH' or use_branched_path(context) is False: col = layout.column(align=True) - col.prop(cscene, "samples", text="Render Samples") - col.prop(cscene, "preview_samples", text="Preview Samples") + col.prop(cscene, "samples", text="Render") + col.prop(cscene, "preview_samples", text="Viewport") + col.separator() col.prop(cscene, "use_square_samples") # Duplicate below. else: - col = layout.column(align=True) - col.prop(cscene, "aa_samples", text="Render Samples") - col.prop(cscene, "preview_aa_samples", text="Preview Samples") col = layout.column(align=True) - col.prop(cscene, "diffuse_samples", text="Diffuse Samples") - col.prop(cscene, "glossy_samples", text="Glossy Samples") - col.prop(cscene, "transmission_samples", text="Transmission Samples") - col.prop(cscene, "ao_samples", text="AO Samples") + col.label(text="AA Samples") + col.prop(cscene, "aa_samples", text="Render") + col.prop(cscene, "preview_aa_samples", text="Preview") + + col = layout.column(align=True) + col.label(text="Samples") + col.prop(cscene, "diffuse_samples", text="Diffuse") + col.prop(cscene, "glossy_samples", text="Glossy") + col.prop(cscene, "transmission_samples", text="Transmission") + col.prop(cscene, "ao_samples", text="AO") sub = col.row(align=True) sub.active = use_sample_all_lights(context) - sub.prop(cscene, "mesh_light_samples", text="Mesh Light Samples") - - col.prop(cscene, "subsurface_samples", text="Subsurface Samples") - col.prop(cscene, "volume_samples", text="Volume Samples") - + sub.prop(cscene, "mesh_light_samples", text="Mesh Light") + col.prop(cscene, "subsurface_samples", text="Subsurface") + col.prop(cscene, "volume_samples", text="Volume") + col.separator() col.prop(cscene, "use_square_samples") # Duplicate above. col = layout.column(align=True) col.prop(cscene, "sample_all_lights_direct") col.prop(cscene, "sample_all_lights_indirect") + row = layout.row(align=True) + row.prop(cscene, "seed") + row.prop(cscene, "use_animated_seed", text="", icon="TIME") + + layout.prop(cscene, "sampling_pattern", text="Pattern") + + +class CYCLES_RENDER_PT_sampling_light(CyclesButtonsPanel, Panel): + bl_label = "Light" + bl_parent_id = "CYCLES_RENDER_PT_sampling" + bl_options = {'DEFAULT_CLOSED'} + + def draw(self, context): + layout = self.layout + layout.use_property_split = True + + scene = context.scene + cscene = scene.cycles + col = layout.column(align=True) col.prop(cscene, "light_sampling_threshold", text="Light Threshold") @@ -196,12 +218,6 @@ class CYCLES_RENDER_PT_sampling(CyclesButtonsPanel, Panel): col.prop(cscene, "sample_clamp_direct") col.prop(cscene, "sample_clamp_indirect") - row = layout.row(align=True) - row.prop(cscene, "seed") - row.prop(cscene, "use_animated_seed", text="", icon="TIME") - - layout.row().prop(cscene, "sampling_pattern", text="Pattern") - draw_samples_info(layout, context) @@ -209,6 +225,42 @@ class CYCLES_RENDER_PT_geometry(CyclesButtonsPanel, Panel): bl_label = "Geometry" bl_options = {'DEFAULT_CLOSED'} + def draw(self, context): + pass + + +class CYCLES_RENDER_PT_geometry_subdivision(CyclesButtonsPanel, Panel): + bl_label = "Subdivision" + bl_parent_id = "CYCLES_RENDER_PT_geometry" + + @classmethod + def poll(self, context): + return context.scene.cycles.feature_set == 'EXPERIMENTAL' + + def draw(self, context): + layout = self.layout + layout.use_property_split = True + + scene = context.scene + cscene = scene.cycles + + col = layout.column() + sub = col.column(align=True) + sub.prop(cscene, "dicing_rate", text="Dicing Rate Render") + sub.prop(cscene, "preview_dicing_rate", text="Preview") + + col.separator() + + col.prop(cscene, "offscreen_dicing_scale", text="Offscreen Scale") + col.prop(cscene, "max_subdivisions") + + col.prop(cscene, "dicing_camera") + + +class CYCLES_RENDER_PT_geometry_volume(CyclesButtonsPanel, Panel): + bl_label = "Volume" + bl_parent_id = "CYCLES_RENDER_PT_geometry" + def draw(self, context): layout = self.layout layout.use_property_split = True @@ -217,30 +269,35 @@ class CYCLES_RENDER_PT_geometry(CyclesButtonsPanel, Panel): cscene = scene.cycles ccscene = scene.cycles_curves - col = layout.column(align=True) - col.prop(cscene, "volume_step_size", text="Volume Step Size") - col.prop(cscene, "volume_max_steps", text="Volume Max Steps") - - col.separator() - - if cscene.feature_set == 'EXPERIMENTAL': - - col = layout.column() - sub = col.column(align=True) - sub.prop(cscene, "dicing_rate", text="Dicing Rate Render") - sub.prop(cscene, "preview_dicing_rate", text="Dicing Rate Preview") - - col.prop(cscene, "offscreen_dicing_scale", text="Offscreen Scale") - col.prop(cscene, "max_subdivisions") - - col.prop(cscene, "dicing_camera") - - col.separator() - - layout.prop(ccscene, "use_curves", text="Hair Rendering") col = layout.column() - col.active = ccscene.use_curves + col.prop(cscene, "volume_step_size", text="Step Size") + col.prop(cscene, "volume_max_steps", text="Max Steps") + +class CYCLES_RENDER_PT_geometry_hair(CyclesButtonsPanel, Panel): + bl_label = "Hair" + bl_parent_id = "CYCLES_RENDER_PT_geometry" + bl_options = {'DEFAULT_CLOSED'} + + def draw_header(self, context): + layout = self.layout + scene = context.scene + cscene = scene.cycles + ccscene = scene.cycles_curves + + layout.prop(ccscene, "use_curves", text="") + + def draw(self, context): + layout = self.layout + layout.use_property_split = True + + scene = context.scene + cscene = scene.cycles + ccscene = scene.cycles_curves + + layout.active = ccscene.use_curves + + col = layout.column() col.prop(ccscene, "minimum_width", text="Min Pixels") col.prop(ccscene, "maximum_width", text="Max Extension") col.prop(ccscene, "shape", text="Shape") @@ -270,14 +327,41 @@ class CYCLES_RENDER_PT_light_paths(CyclesButtonsPanel, Panel): row.operator("render.cycles_integrator_preset_add", text="", icon="ZOOMIN") row.operator("render.cycles_integrator_preset_add", text="", icon="ZOOMOUT").remove_active = True + +class CYCLES_RENDER_PT_light_paths_max_bounces(CyclesButtonsPanel, Panel): + bl_label = "Max Bounces" + bl_parent_id = "CYCLES_RENDER_PT_light_paths" + + def draw(self, context): + layout = self.layout + layout.use_property_split = True + + scene = context.scene + cscene = scene.cycles + + col = layout.column(align=True) + col.prop(cscene, "max_bounces", text="Total") + col = layout.column(align=True) - col.prop(cscene, "max_bounces", text="Max Bounces") - col.prop(cscene, "transparent_max_bounces", text="Transparency") col.prop(cscene, "diffuse_bounces", text="Diffuse") col.prop(cscene, "glossy_bounces", text="Glossy") + col.prop(cscene, "transparent_max_bounces", text="Transparency") col.prop(cscene, "transmission_bounces", text="Transmission") col.prop(cscene, "volume_bounces", text="Volume") + +class CYCLES_RENDER_PT_light_paths_caustics(CyclesButtonsPanel, Panel): + bl_label = "Caustics" + bl_parent_id = "CYCLES_RENDER_PT_light_paths" + bl_options = {'DEFAULT_CLOSED'} + + def draw(self, context): + layout = self.layout + layout.use_property_split = True + + scene = context.scene + cscene = scene.cycles + col = layout.column() col.prop(cscene, "blur_glossy") col.prop(cscene, "caustics_reflective") @@ -305,9 +389,29 @@ class CYCLES_RENDER_PT_motion_blur(CyclesButtonsPanel, Panel): col = layout.column() col.prop(cscene, "motion_blur_position", text="Position") col.prop(rd, "motion_blur_shutter") + col.separator() + col.prop(cscene, "rolling_shutter_type", text="Rolling Shutter") + sub = col.column() + sub.active = cscene.rolling_shutter_type != 'NONE' + sub.prop(cscene, "rolling_shutter_duration") + + +class CYCLES_RENDER_PT_motion_blur_curve(CyclesButtonsPanel, Panel): + bl_label = "Shutter Curve" + bl_parent_id = "CYCLES_RENDER_PT_motion_blur" + bl_options = {'DEFAULT_CLOSED'} + + def draw(self, context): + layout = self.layout + layout.use_property_split = True + + scene = context.scene + cscene = scene.cycles + rd = scene.render + layout.active = rd.use_motion_blur col = layout.column() - col.label("Shutter curve:") + col.template_curve_mapping(rd, "motion_blur_shutter_curve") col = layout.column(align=True) @@ -319,12 +423,6 @@ class CYCLES_RENDER_PT_motion_blur(CyclesButtonsPanel, Panel): row.operator("render.shutter_curve_preset", icon='LINCURVE', text="").shape = 'LINE' row.operator("render.shutter_curve_preset", icon='NOCURVE', text="").shape = 'MAX' - col = layout.column() - col.prop(cscene, "rolling_shutter_type") - row = col.row() - row.active = cscene.rolling_shutter_type != 'NONE' - row.prop(cscene, "rolling_shutter_duration") - class CYCLES_RENDER_PT_film(CyclesButtonsPanel, Panel): bl_label = "Film" @@ -339,24 +437,51 @@ class CYCLES_RENDER_PT_film(CyclesButtonsPanel, Panel): col = layout.column() col.prop(cscene, "film_exposure") - layout.separator() + +class CYCLES_RENDER_PT_film_transparency(CyclesButtonsPanel, Panel): + bl_label = "Transparency" + bl_parent_id = "CYCLES_RENDER_PT_film" + + def draw_header(self, context): + layout = self.layout + rd = context.scene.render + + scene = context.scene + cscene = scene.cycles + + layout.prop(cscene, "film_transparent", text="") + + def draw(self, context): + layout = self.layout + layout.use_property_split = True + scene = context.scene + cscene = scene.cycles + + layout.active = cscene.film_transparent col = layout.column() - col.prop(cscene, "pixel_filter_type") - if cscene.pixel_filter_type != 'BOX': - col.prop(cscene, "filter_width") + col.prop(cscene, "film_transparent_glass", text="Transparent Glass") - layout.separator() - - col = layout.column() - col.prop(cscene, "film_transparent") sub = col.column() - sub.prop(cscene, "film_transparent_glass", text="Transparent Glass") - sub.active = cscene.film_transparent + sub.active = cscene.film_transparent and cscene.film_transparent_glass + sub.prop(cscene, "film_transparent_roughness", text="Roughness Threshold") + + +class CYCLES_RENDER_PT_film_pixel_filter(CyclesButtonsPanel, Panel): + bl_label = "Pixel Filter" + bl_parent_id = "CYCLES_RENDER_PT_film" + bl_options = {'DEFAULT_CLOSED'} + + def draw(self, context): + layout = self.layout + layout.use_property_split = True + scene = context.scene + cscene = scene.cycles col = layout.column() - col.active = cscene.film_transparent and cscene.film_transparent_glass - col.prop(cscene, "film_transparent_roughness", text="Roughness Threshold") + col.prop(cscene, "pixel_filter_type", text="Type") + if cscene.pixel_filter_type != 'BOX': + col.prop(cscene, "filter_width", text="Width") class CYCLES_RENDER_PT_performance(CyclesButtonsPanel, Panel): @@ -371,8 +496,6 @@ class CYCLES_RENDER_PT_performance(CyclesButtonsPanel, Panel): rd = scene.render cscene = scene.cycles - col = layout.column() - col = layout.column() col.active = show_device_active(context) col.prop(cscene, "device") @@ -381,16 +504,38 @@ class CYCLES_RENDER_PT_performance(CyclesButtonsPanel, Panel): if engine.with_osl() and use_cpu(context): col.prop(cscene, "shading_system") - col.separator() + +class CYCLES_RENDER_PT_performance_threads(CyclesButtonsPanel, Panel): + bl_label = "Threads" + bl_parent_id = "CYCLES_RENDER_PT_performance" + + def draw(self, context): + layout = self.layout + layout.use_property_split = True + + scene = context.scene + rd = scene.render + cscene = scene.cycles col = layout.column() - col.row(align=True).prop(rd, "threads_mode") + col.prop(rd, "threads_mode") sub = col.column(align=True) sub.enabled = rd.threads_mode == 'FIXED' sub.prop(rd, "threads") - col.separator() + +class CYCLES_RENDER_PT_performance_tiles(CyclesButtonsPanel, Panel): + bl_label = "Tiles" + bl_parent_id = "CYCLES_RENDER_PT_performance" + + def draw(self, context): + layout = self.layout + layout.use_property_split = True + + scene = context.scene + rd = scene.render + cscene = scene.cycles col = layout.column() @@ -406,28 +551,63 @@ class CYCLES_RENDER_PT_performance(CyclesButtonsPanel, Panel): sub.active = False sub.prop(cscene, "use_progressive_refine") - layout.separator() + +class CYCLES_RENDER_PT_performance_acceleration_structure(CyclesButtonsPanel, Panel): + bl_label = "Acceleration Structure" + bl_parent_id = "CYCLES_RENDER_PT_performance" + bl_options = {'DEFAULT_CLOSED'} + + def draw(self, context): + layout = self.layout + layout.use_property_split = True + + scene = context.scene + rd = scene.render + cscene = scene.cycles + + col = layout.column() + + col.prop(cscene, "debug_use_spatial_splits") + col.prop(cscene, "debug_use_hair_bvh") + sub = col.column() + sub.active = not cscene.debug_use_spatial_splits + sub.prop(cscene, "debug_bvh_time_steps") + + +class CYCLES_RENDER_PT_performance_final_render(CyclesButtonsPanel, Panel): + bl_label = "Final Render" + bl_parent_id = "CYCLES_RENDER_PT_performance" + bl_options = {'DEFAULT_CLOSED'} + + def draw(self, context): + layout = self.layout + layout.use_property_split = True + + scene = context.scene + rd = scene.render + cscene = scene.cycles col = layout.column() col.prop(rd, "use_save_buffers") col.prop(rd, "use_persistent_data", text="Persistent Images") - layout.separator() + +class CYCLES_RENDER_PT_performance_viewport(CyclesButtonsPanel, Panel): + bl_label = "Viewport" + bl_parent_id = "CYCLES_RENDER_PT_performance" + bl_options = {'DEFAULT_CLOSED'} + + def draw(self, context): + layout = self.layout + layout.use_property_split = True + + scene = context.scene + rd = scene.render + cscene = scene.cycles col = layout.column() - - col.prop(cscene, "debug_use_spatial_splits") - col.prop(cscene, "debug_use_hair_bvh") - - sub = col.column() - sub.active = not cscene.debug_use_spatial_splits - sub.prop(cscene, "debug_bvh_time_steps") - - layout.separator() - - col = layout.column() - col.prop(rd, "preview_pixel_size", text="Viewport Pixel Size") + col.prop(rd, "preview_pixel_size", text="Pixel Size") col.prop(cscene, "preview_start_resolution", text="Start Pixels") @@ -1062,15 +1242,16 @@ class CYCLES_WORLD_PT_ambient_occlusion(CyclesButtonsPanel, Panel): def draw(self, context): layout = self.layout + layout.use_property_split = True light = context.world.light_settings scene = context.scene - row = layout.row() - sub = row.row() + col = layout.column() + sub = col.column() sub.active = light.use_ambient_occlusion or scene.render.use_simplify sub.prop(light, "ao_factor", text="Factor") - row.prop(light, "distance", text="Distance") + col.prop(light, "distance", text="Distance") class CYCLES_WORLD_PT_mist(CyclesButtonsPanel, Panel): @@ -1135,16 +1316,15 @@ class CYCLES_WORLD_PT_settings(CyclesButtonsPanel, Panel): def draw(self, context): layout = self.layout + layout.use_property_split = True world = context.world cworld = world.cycles # cscene = context.scene.cycles - split = layout.split() + col = layout.column() - col = split.column() - - col.label(text="Surface:") + col.label(text="Surface") col.prop(cworld, "sample_as_light", text="Multiple Importance") sub = col.column(align=True) @@ -1156,8 +1336,9 @@ class CYCLES_WORLD_PT_settings(CyclesButtonsPanel, Panel): subsub.prop(cworld, "samples") sub.prop(cworld, "max_bounces") - col = split.column() - col.label(text="Volume:") + col.separator() + + col.label(text="Volume") sub = col.column() sub.active = use_cpu(context) sub.prop(cworld, "volume_sampling", text="") @@ -1239,26 +1420,26 @@ class CYCLES_MATERIAL_PT_settings(CyclesButtonsPanel, Panel): def draw(self, context): layout = self.layout + layout.use_property_split = True mat = context.material cmat = mat.cycles - split = layout.split() - col = split.column() - col.label(text="Surface:") + col = layout.column() + col.label(text="Surface") col.prop(cmat, "sample_as_light", text="Multiple Importance") col.prop(cmat, "use_transparent_shadow") col.separator() - col.label(text="Geometry:") - col.prop(cmat, "displacement_method", text="") + col.label(text="Geometry") + col.prop(cmat, "displacement_method", text="Displacement Method") - col = split.column() - col.label(text="Volume:") + col.separator() + col.label(text="Volume") sub = col.column() sub.active = use_cpu(context) - sub.prop(cmat, "volume_sampling", text="") - col.prop(cmat, "volume_interpolation", text="") + sub.prop(cmat, "volume_sampling", text="Sampling") + col.prop(cmat, "volume_interpolation", text="Interpolation") col.prop(cmat, "homogeneous_volume", text="Homogeneous") col.separator() @@ -1411,6 +1592,7 @@ class CYCLES_SCENE_PT_simplify(CyclesButtonsPanel, Panel): def draw(self, context): layout = self.layout + layout.use_property_split = True scene = context.scene rd = scene.render @@ -1419,45 +1601,43 @@ class CYCLES_SCENE_PT_simplify(CyclesButtonsPanel, Panel): layout.active = rd.use_simplify col = layout.column(align=True) - col.label(text="Subdivision") - row = col.row(align=True) - row.prop(rd, "simplify_subdivision", text="Viewport") - row.prop(rd, "simplify_subdivision_render", text="Render") + col.prop(rd, "simplify_subdivision", text="Max Subdivision View") + col.prop(rd, "simplify_subdivision_render", text="Render") + + col.separator() col = layout.column(align=True) - col.label(text="Child Particles") - row = col.row(align=True) - row.prop(rd, "simplify_child_particles", text="Viewport") - row.prop(rd, "simplify_child_particles_render", text="Render") + col.prop(rd, "simplify_child_particles", text="Child Particles View") + col.prop(rd, "simplify_child_particles_render", text="Render") + + col.separator() col = layout.column(align=True) - split = col.split() - sub = split.column() - sub.label(text="Texture Limit Viewport") - sub.prop(cscene, "texture_limit", text="") - sub = split.column() - sub.label(text="Texture Limit Render") - sub.prop(cscene, "texture_limit_render", text="") + col.prop(cscene, "texture_limit", text="Texture Limit View") + col.prop(cscene, "texture_limit_render", text="Render") - split = layout.split() - col = split.column() + col.separator() + + col = layout.column(align=True) + col.prop(cscene, "ao_bounces", text="AO Bounces View") + col.prop(cscene, "ao_bounces_render", text="Render") + + layout.separator() + + col = layout.column() col.prop(cscene, "use_camera_cull") - row = col.row() - row.active = cscene.use_camera_cull - row.prop(cscene, "camera_cull_margin") + sub = col.column() + sub.active = cscene.use_camera_cull + sub.prop(cscene, "camera_cull_margin") + + layout.separator() + + col = layout.column() - col = split.column() col.prop(cscene, "use_distance_cull") - row = col.row() - row.active = cscene.use_distance_cull - row.prop(cscene, "distance_cull_margin", text="Distance") - - split = layout.split() - col = split.column() - col.prop(cscene, "ao_bounces") - - col = split.column() - col.prop(cscene, "ao_bounces_render") + sub = col.column() + sub.active = cscene.use_distance_cull + sub.prop(cscene, "distance_cull_margin", text="Distance") def draw_device(self, context): @@ -1514,11 +1694,25 @@ classes = ( CYCLES_MT_sampling_presets, CYCLES_MT_integrator_presets, CYCLES_RENDER_PT_sampling, + CYCLES_RENDER_PT_sampling_light, CYCLES_RENDER_PT_geometry, + CYCLES_RENDER_PT_geometry_subdivision, + CYCLES_RENDER_PT_geometry_volume, + CYCLES_RENDER_PT_geometry_hair, CYCLES_RENDER_PT_light_paths, + CYCLES_RENDER_PT_light_paths_max_bounces, + CYCLES_RENDER_PT_light_paths_caustics, CYCLES_RENDER_PT_motion_blur, + CYCLES_RENDER_PT_motion_blur_curve, CYCLES_RENDER_PT_film, + CYCLES_RENDER_PT_film_transparency, + CYCLES_RENDER_PT_film_pixel_filter, CYCLES_RENDER_PT_performance, + CYCLES_RENDER_PT_performance_threads, + CYCLES_RENDER_PT_performance_tiles, + CYCLES_RENDER_PT_performance_acceleration_structure, + CYCLES_RENDER_PT_performance_final_render, + CYCLES_RENDER_PT_performance_viewport, CYCLES_RENDER_PT_filter, CYCLES_RENDER_PT_layer_passes, CYCLES_RENDER_PT_denoising, diff --git a/release/scripts/startup/bl_ui/properties_data_curve.py b/release/scripts/startup/bl_ui/properties_data_curve.py index 79a18d743a1..057a7233206 100644 --- a/release/scripts/startup/bl_ui/properties_data_curve.py +++ b/release/scripts/startup/bl_ui/properties_data_curve.py @@ -180,9 +180,19 @@ class DATA_PT_geometry_curve(CurveButtonsPanelCurve, Panel): sub.active = curve.taper_object is not None sub.prop(curve, "use_map_taper") - col.separator() +class DATA_PT_geometry_curve_bevel(CurveButtonsPanelCurve, Panel): + bl_label = "Bevel" + bl_parent_id = "DATA_PT_geometry_curve" - layout.label(text="Bevel") + @classmethod + def poll(cls, context): + return (type(context.curve) in {Curve, TextCurve}) + + def draw(self, context): + layout = self.layout + layout.use_property_split = True + + curve = context.curve col = layout.column() sub = col.column() @@ -338,8 +348,17 @@ class DATA_PT_font(CurveButtonsPanelText, Panel): row.prop(char, "use_underline", toggle=True) row.prop(char, "use_small_caps", toggle=True) +class DATA_PT_font_transform(CurveButtonsPanelText, Panel): + bl_label = "Transform" + bl_parent_id = "DATA_PT_font" + + def draw(self, context): + layout = self.layout + + text = context.curve + char = context.curve.edit_format + layout.use_property_split = True - # layout.prop(text, "font") col = layout.column() @@ -370,12 +389,32 @@ class DATA_PT_paragraph(CurveButtonsPanelText, Panel): text = context.curve - layout.label(text="Alignment") + +class DATA_PT_paragraph_alignment(CurveButtonsPanelText, Panel): + bl_parent_id = "DATA_PT_paragraph" + bl_label = "Alignment" + + def draw(self, context): + layout = self.layout + layout.use_property_split = False + + text = context.curve + layout.row().prop(text, "align_x", expand=True) layout.row().prop(text, "align_y", expand=True) + + +class DATA_PT_paragraph_spacing(CurveButtonsPanelText, Panel): + bl_parent_id = "DATA_PT_paragraph" + bl_label = "Spacing" + + def draw(self, context): + layout = self.layout layout.use_property_split = True + text = context.curve + col = layout.column(align=True) col.prop(text, "space_character", text="Character Spacing") col.prop(text, "space_word", text="Word Spacing") @@ -429,10 +468,14 @@ classes = ( DATA_PT_shape_curve, DATA_PT_curve_texture_space, DATA_PT_geometry_curve, + DATA_PT_geometry_curve_bevel, DATA_PT_pathanim, DATA_PT_active_spline, DATA_PT_font, + DATA_PT_font_transform, DATA_PT_paragraph, + DATA_PT_paragraph_alignment, + DATA_PT_paragraph_spacing, DATA_PT_text_boxes, DATA_PT_custom_props_curve, ) diff --git a/release/scripts/startup/bl_ui/properties_object.py b/release/scripts/startup/bl_ui/properties_object.py index 6486fbf0d63..9bcb1099a79 100644 --- a/release/scripts/startup/bl_ui/properties_object.py +++ b/release/scripts/startup/bl_ui/properties_object.py @@ -86,6 +86,7 @@ class OBJECT_PT_transform(ObjectButtonsPanel, Panel): class OBJECT_PT_delta_transform(ObjectButtonsPanel, Panel): bl_label = "Delta Transform" + bl_parent_id = "OBJECT_PT_transform" bl_options = {'DEFAULT_CLOSED'} def draw(self, context): diff --git a/release/scripts/startup/bl_ui/properties_particle.py b/release/scripts/startup/bl_ui/properties_particle.py index fa4d084f17d..9ffc9e983bb 100644 --- a/release/scripts/startup/bl_ui/properties_particle.py +++ b/release/scripts/startup/bl_ui/properties_particle.py @@ -285,6 +285,7 @@ class PARTICLE_PT_emission(ParticleButtonsPanel, Panel): class PARTICLE_PT_emission_source(ParticleButtonsPanel, Panel): bl_label = "Source" bl_parent_id = "PARTICLE_PT_emission" + bl_options = {'DEFAULT_CLOSED'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} def draw(self, context): @@ -345,6 +346,7 @@ class PARTICLE_PT_hair_dynamics(ParticleButtonsPanel, Panel): psys = context.particle_system if not psys.cloth: + layout.label(text="Hair dynamics disabled") return cloth_md = psys.cloth @@ -363,40 +365,16 @@ class PARTICLE_PT_hair_dynamics(ParticleButtonsPanel, Panel): layout.separator() col = layout.column() - col.label(text="Structure") - col.prop(cloth, "mass") - sub = col.column(align=True) - sub.prop(cloth, "bending_stiffness", text="Stiffness") - sub.prop(psys.settings, "bending_random", text="Random") - col.prop(cloth, "bending_damping", text="Damping") - # XXX has no noticeable effect with stiff hair structure springs - #col.prop(cloth, "spring_damping", text="Damping") - - layout.separator() - - col = layout.column() - col.label(text="Volume") - col.prop(cloth, "air_damping", text="Air Drag") - col.prop(cloth, "internal_friction", slider=True) - - sub = col.column(align=True) - sub.prop(cloth, "density_target", text="Density Target") - sub.prop(cloth, "density_strength", slider=True, text="Density Strength") - col.prop(cloth, "voxel_cell_size") - - layout.separator() - - col = layout.column() - col.label(text="Pinning") - col.prop(cloth, "pin_stiffness", text="Goal Strength") - - layout.separator() - - col = layout.column() - col.label(text="Quality") - col.prop(cloth, "quality", text="Steps", slider=True) + col.prop(cloth, "quality", text="Quality Steps", slider=True) col.prop(psys.settings, "show_hair_grid", text="Display Hair Grid") + layout.separator() + + col = layout.column() + col.prop(cloth, "pin_stiffness", text="Pin Goal Strength") + + layout.separator() + if result: box = layout.box() @@ -418,6 +396,71 @@ class PARTICLE_PT_hair_dynamics(ParticleButtonsPanel, Panel): box.label("Error: %.5f .. %.5f (avg. %.5f)" % (result.min_error, result.max_error, result.avg_error)) +class PARTICLE_PT_hair_dynamics_structure(ParticleButtonsPanel, Panel): + bl_label = "Structure" + bl_parent_id = "PARTICLE_PT_hair_dynamics" + bl_options = {'DEFAULT_CLOSED'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} + + @classmethod + def poll(cls, context): + return context.particle_system.cloth != None + + def draw(self, context): + layout = self.layout + + psys = context.particle_system + cloth_md = psys.cloth + cloth = cloth_md.settings + result = cloth_md.solver_result + + layout.enabled = psys.use_hair_dynamics and psys.point_cache.is_baked is False + + layout.use_property_split = True + + col = layout.column() + col.prop(cloth, "mass") + sub = col.column(align=True) + sub.prop(cloth, "bending_stiffness", text="Stiffness") + sub.prop(psys.settings, "bending_random", text="Random") + col.prop(cloth, "bending_damping", text="Damping") + # XXX has no noticeable effect with stiff hair structure springs + #col.prop(cloth, "spring_damping", text="Damping") + + +class PARTICLE_PT_hair_dynamics_volume(ParticleButtonsPanel, Panel): + bl_label = "Volume" + bl_parent_id = "PARTICLE_PT_hair_dynamics" + bl_options = {'DEFAULT_CLOSED'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} + + @classmethod + def poll(cls, context): + return context.particle_system.cloth != None + + def draw(self, context): + layout = self.layout + + psys = context.particle_system + cloth_md = psys.cloth + cloth = cloth_md.settings + result = cloth_md.solver_result + + layout.enabled = psys.use_hair_dynamics and psys.point_cache.is_baked is False + + layout.use_property_split = True + + col = layout.column() + col.prop(cloth, "air_damping", text="Air Drag") + col.prop(cloth, "internal_friction", slider=True) + col.prop(cloth, "voxel_cell_size") + + col.separator() + + col.prop(cloth, "density_target", text="Density Target") + col.prop(cloth, "density_strength", slider=True, text="Density Strength") + + class PARTICLE_PT_cache(ParticleButtonsPanel, Panel): bl_label = "Cache" bl_options = {'DEFAULT_CLOSED'} @@ -475,7 +518,6 @@ class PARTICLE_PT_velocity(ParticleButtonsPanel, Panel): layout.use_property_split = True col = layout.column() - col.label(text="Emitter Geometry") col.prop(part, "normal_factor") sub = col.column(align=True) sub.prop(part, "tangent_factor", text="Tangent") @@ -485,13 +527,13 @@ class PARTICLE_PT_velocity(ParticleButtonsPanel, Panel): col.prop(part, "object_align_factor") - col.label(text="Other") + col.separator() if part.emit_from == 'PARTICLE': col.prop(part, "particle_factor") else: col.prop(part, "object_factor", slider=True) - col.prop(part, "factor_random") + col.prop(part, "factor_random", text="Randomize") # if part.type=='REACTOR': # sub.prop(part, "reactor_factor") @@ -536,8 +578,6 @@ class PARTICLE_PT_rotation(ParticleButtonsPanel, Panel): layout.enabled = particle_panel_enabled(context, psys) and part.use_rotations layout.use_property_split = True - layout.label(text="Initial Orientation") - col = layout.column() col.prop(part, "rotation_mode") @@ -551,14 +591,30 @@ class PARTICLE_PT_rotation(ParticleButtonsPanel, Panel): if part.type != 'HAIR': col.prop(part, "use_dynamic_rotation") - col.separator() +class PARTICLE_PT_rotation_angular_velocity(ParticleButtonsPanel, Panel): + bl_label = "Angular Velocity" + bl_parent_id = "PARTICLE_PT_rotation" + bl_options = {'DEFAULT_CLOSED'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} - col.label(text="Angular Velocity") + def draw(self, context): + layout = self.layout - col.prop(part, "angular_velocity_mode", text="Axis") - sub = col.column(align=True) - sub.active = part.angular_velocity_mode != 'NONE' - sub.prop(part, "angular_velocity_factor", text="Amount") + psys = context.particle_system + if psys: + part = psys.settings + else: + part = context.space_data.pin_id + + layout.enabled = particle_panel_enabled(context, psys) and part.use_rotations + layout.use_property_split = True + + col = layout.column() + + col.prop(part, "angular_velocity_mode", text="Axis") + sub = col.column(align=True) + sub.active = part.angular_velocity_mode != 'NONE' + sub.prop(part, "angular_velocity_factor", text="Amount") class PARTICLE_PT_physics(ParticleButtonsPanel, Panel): @@ -594,85 +650,61 @@ class PARTICLE_PT_physics(ParticleButtonsPanel, Panel): col.prop(part, "mass") col.prop(part, "use_multiply_size_mass", text="Multiply mass with size") - if part.physics_type in {'NEWTON', 'FLUID'}: + if part.physics_type == 'FLUID': + fluid = part.fluid - col.prop(part, "use_size_deflect") - col.prop(part, "use_die_on_collision") + col.label(text="Fluid") + col.prop(fluid, "solver") + col.prop(fluid, "stiffness", text="Stiffness") + col.prop(fluid, "linear_viscosity", text="Viscosity") + col.prop(fluid, "buoyancy", text="Buoyancy", slider=True) - col.prop(part, "collision_group") + col.label(text="Advanced") - col.label(text="Forces") - col.prop(part, "brownian_factor") - col.prop(part, "drag_factor", slider=True) - col.prop(part, "damping", slider=True) + if fluid.solver == 'DDR': + sub = col.column() + sub.prop(fluid, "repulsion", slider=fluid.factor_repulsion) + sub.prop(fluid, "factor_repulsion") - col.label(text="Integration") - col.prop(part, "integrator") - col.prop(part, "timestep") - sub = col.row() - sub.prop(part, "subframes") - supports_courant = part.physics_type == 'FLUID' - subsub = sub.row() - subsub.enabled = supports_courant - subsub.prop(part, "use_adaptive_subframes", text="") - if supports_courant and part.use_adaptive_subframes: - col.prop(part, "courant_target", text="Threshold") + sub.prop(fluid, "stiff_viscosity", slider=fluid.factor_stiff_viscosity) + sub.prop(fluid, "factor_stiff_viscosity") - if part.physics_type == 'FLUID': - fluid = part.fluid + sub = col.column() + sub.prop(fluid, "fluid_radius", slider=fluid.factor_radius) + sub.prop(fluid, "factor_radius") - col.label(text="Fluid") - col.prop(fluid, "solver") - col.prop(fluid, "stiffness", text="Stiffness") - col.prop(fluid, "linear_viscosity", text="Viscosity") - col.prop(fluid, "buoyancy", text="Buoyancy", slider=True) + sub.prop(fluid, "rest_density", slider=fluid.use_factor_density) + sub.prop(fluid, "use_factor_density") - col.label(text="Advanced") + if fluid.solver == 'CLASSICAL': + # With the classical solver, it is possible to calculate the + # spacing between particles when the fluid is at rest. This + # makes it easier to set stable initial conditions. + particle_volume = part.mass / fluid.rest_density + spacing = pow(particle_volume, 1.0 / 3.0) - if fluid.solver == 'DDR': - sub = col.column() - sub.prop(fluid, "repulsion", slider=fluid.factor_repulsion) - sub.prop(fluid, "factor_repulsion") + sub.label(text="Spacing: %g" % spacing) - sub.prop(fluid, "stiff_viscosity", slider=fluid.factor_stiff_viscosity) - sub.prop(fluid, "factor_stiff_viscosity") + elif fluid.solver == 'DDR': + + col.label(text="Springs") + col.prop(fluid, "spring_force", text="Force") + col.prop(fluid, "use_viscoelastic_springs") sub = col.column() - sub.prop(fluid, "fluid_radius", slider=fluid.factor_radius) - sub.prop(fluid, "factor_radius") + sub.active = fluid.use_viscoelastic_springs + sub.prop(fluid, "yield_ratio", slider=True) + sub.prop(fluid, "plasticity", slider=True) - sub.prop(fluid, "rest_density", slider=fluid.use_factor_density) - sub.prop(fluid, "use_factor_density") + col.label(text="Advanced") + sub = col.column() + sub.prop(fluid, "rest_length", slider=fluid.factor_rest_length) + sub.prop(fluid, "factor_rest_length", text="") - if fluid.solver == 'CLASSICAL': - # With the classical solver, it is possible to calculate the - # spacing between particles when the fluid is at rest. This - # makes it easier to set stable initial conditions. - particle_volume = part.mass / fluid.rest_density - spacing = pow(particle_volume, 1.0 / 3.0) - - sub.label(text="Spacing: %g" % spacing) - - elif fluid.solver == 'DDR': - - col.label(text="Springs") - col.prop(fluid, "spring_force", text="Force") - col.prop(fluid, "use_viscoelastic_springs") - - sub = col.column() - sub.active = fluid.use_viscoelastic_springs - sub.prop(fluid, "yield_ratio", slider=True) - sub.prop(fluid, "plasticity", slider=True) - - col.label(text="Advanced") - sub = col.column() - sub.prop(fluid, "rest_length", slider=fluid.factor_rest_length) - sub.prop(fluid, "factor_rest_length", text="") - - sub = col.column() - sub.active = fluid.use_viscoelastic_springs - sub.prop(fluid, "use_initial_rest_length") - sub.prop(fluid, "spring_frames", text="Frames") + sub = col.column() + sub.active = fluid.use_viscoelastic_springs + sub.prop(fluid, "use_initial_rest_length") + sub.prop(fluid, "spring_frames", text="Frames") elif part.physics_type == 'KEYED': @@ -780,6 +812,92 @@ class PARTICLE_PT_physics(ParticleButtonsPanel, Panel): sub.prop(key, "object", text="") sub.prop(key, "system", text="System") +class PARTICLE_PT_physics_deflection(ParticleButtonsPanel, Panel): + bl_label = "Deflection" + bl_parent_id = "PARTICLE_PT_physics" + bl_options = {'DEFAULT_CLOSED'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} + + @classmethod + def poll(cls, context): + part = particle_get_settings(context) + return part.physics_type in {'NEWTON', 'FLUID'} + + def draw(self, context): + layout = self.layout + layout.use_property_split = True + + psys = context.particle_system + part = particle_get_settings(context) + + layout.enabled = particle_panel_enabled(context, psys) + + col = layout.column() + col.prop(part, "use_size_deflect") + col.prop(part, "use_die_on_collision") + + col.prop(part, "collision_group") + + +class PARTICLE_PT_physics_forces(ParticleButtonsPanel, Panel): + bl_label = "Forces" + bl_parent_id = "PARTICLE_PT_physics" + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} + + @classmethod + def poll(cls, context): + part = particle_get_settings(context) + return part.physics_type == 'NEWTON' + + def draw(self, context): + layout = self.layout + layout.use_property_split = True + + psys = context.particle_system + part = particle_get_settings(context) + + layout.enabled = particle_panel_enabled(context, psys) + + col = layout.column() + + col.prop(part, "brownian_factor") + col.prop(part, "drag_factor", slider=True) + col.prop(part, "damping", slider=True) + + +class PARTICLE_PT_physics_integration(ParticleButtonsPanel, Panel): + bl_label = "Integration" + bl_options = {'DEFAULT_CLOSED'} + bl_parent_id = "PARTICLE_PT_physics" + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} + + @classmethod + def poll(cls, context): + part = particle_get_settings(context) + return part.physics_type == 'NEWTON' + + def draw(self, context): + layout = self.layout + layout.use_property_split = True + + psys = context.particle_system + part = particle_get_settings(context) + + layout.enabled = particle_panel_enabled(context, psys) + + col = layout.column() + + col.prop(part, "integrator") + col.prop(part, "timestep") + sub = col.row() + sub.prop(part, "subframes") + supports_courant = part.physics_type == 'FLUID' + subsub = sub.row() + subsub.enabled = supports_courant + subsub.prop(part, "use_adaptive_subframes", text="") + if supports_courant and part.use_adaptive_subframes: + col.prop(part, "courant_target", text="Threshold") + class PARTICLE_PT_boidbrain(ParticleButtonsPanel, Panel): bl_label = "Boid Brain" @@ -907,7 +1025,7 @@ class PARTICLE_PT_render(ParticleButtonsPanel, Panel): layout.prop(part, "render_type", text="Render As") if part.type == 'EMITTER' or \ - (part.render_type in {'OBJECT', 'GROUP'} and part.type == 'HAIR'): + (part.render_type in {'OBJECT', 'COLLECTION'} and part.type == 'HAIR'): if part.render_type not in {'NONE'}: col = layout.column(align=True) @@ -916,156 +1034,361 @@ class PARTICLE_PT_render(ParticleButtonsPanel, Panel): if psys: col = layout.column() - if part.render_type not in {'OBJECT', 'GROUP', 'NONE'}: + if part.render_type not in {'OBJECT', 'COLLECTION', 'NONE'}: # col.enabled = False col.prop(part, "material_slot", text="Material") col.prop(psys, "parent", text="Coordinate System") - if part.render_type not in {'NONE'}: - col = layout.column() - col.prop(part, "use_parent_particles", text="Parent Particles") - col.prop(part, "show_unborn", text="Unborn") - col.prop(part, "use_dead", text="Dead") +class PARTICLE_PT_render_extra(ParticleButtonsPanel, Panel): + bl_label = "Extra" + bl_parent_id = "PARTICLE_PT_render" + bl_options = {'DEFAULT_CLOSED'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} + + @classmethod + def poll(cls, context): + part = particle_get_settings(context) + return part.render_type != 'NONE' + + def draw(self, context): + layout = self.layout + layout.use_property_split = True + + psys = context.particle_system + ob = context.object + part = particle_get_settings(context) + + col=layout.column() col = layout.column() + col.prop(part, "use_parent_particles", text="Parent Particles") + col.prop(part, "show_unborn", text="Unborn") + col.prop(part, "use_dead", text="Dead") - if part.render_type == 'LINE': - col.separator() - col.label(text="Line") - sub = col.column(align=True) - sub.prop(part, "line_length_tail", text="Length Tail") - sub.prop(part, "line_length_head", text="Head") - col.prop(part, "use_velocity_length", text="Velocity Length") - elif part.render_type == 'PATH': - col.separator() - col.label(text="Path") - col.prop(part, "use_strand_primitive") - sub = col.column() - sub.active = (part.use_strand_primitive is False) - sub.prop(part, "use_render_adaptive") - sub = col.column() - sub.active = part.use_render_adaptive or part.use_strand_primitive is True - sub.prop(part, "adaptive_angle") - sub = col.column() - sub.active = (part.use_render_adaptive is True and part.use_strand_primitive is False) - sub.prop(part, "adaptive_pixel") - col.prop(part, "use_hair_bspline") - col.prop(part, "render_step", text="Steps") - col.separator() +class PARTICLE_PT_render_line(ParticleButtonsPanel, Panel): + bl_label = "Line" + bl_parent_id = "PARTICLE_PT_render" + bl_options = {'DEFAULT_CLOSED'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} - col.label(text="Timing") - col.prop(part, "use_absolute_path_time") + @classmethod + def poll(cls, context): + part = particle_get_settings(context) + return part.render_type == 'LINE' - if part.type == 'HAIR' or psys.point_cache.is_baked: - col.prop(part, "path_start", text="Start", slider=not part.use_absolute_path_time) - else: - col.prop(part, "trail_count") + def draw(self, context): + layout = self.layout + layout.use_property_split = True - col.prop(part, "path_end", text="End", slider=not part.use_absolute_path_time) - col.prop(part, "length_random", text="Random", slider=True) + psys = context.particle_system + ob = context.object + part = particle_get_settings(context) - elif part.render_type == 'OBJECT': - col.separator() + col=layout.column() - col.label(text="Object") + col.separator() + sub = col.column(align=True) + sub.prop(part, "line_length_tail", text="Length Tail") + sub.prop(part, "line_length_head", text="Head") + col.prop(part, "use_velocity_length", text="Velocity Length") - col.prop(part, "dupli_object", text="Instance Object") - sub = col.column() - sub.prop(part, "use_global_dupli", text="Global Coordinates") - sub.prop(part, "use_rotation_dupli", text="Object Rotation") - sub.prop(part, "use_scale_dupli", text="Object Scale") - elif part.render_type == 'GROUP': - col.separator() +class PARTICLE_PT_render_path(ParticleButtonsPanel, Panel): + bl_label = "Path" + bl_parent_id = "PARTICLE_PT_render" + bl_options = {'DEFAULT_CLOSED'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} - col.label(text="Group") + @classmethod + def poll(cls, context): + part = particle_get_settings(context) + return part.render_type == 'PATH' - col.prop(part, "dupli_group") + def draw(self, context): + layout = self.layout + layout.use_property_split = True - col.prop(part, "use_whole_group") - sub = col.column() - sub.active = (part.use_whole_group is False) - sub.prop(part, "use_group_pick_random") - sub.prop(part, "use_global_dupli", text="Global Coordinates") - sub.prop(part, "use_rotation_dupli", text="Object Rotation") - sub.prop(part, "use_scale_dupli", text="Object Scale") - sub.prop(part, "use_group_count") + psys = context.particle_system + ob = context.object + part = particle_get_settings(context) - if part.use_group_count and not part.use_whole_group: - row = layout.row() - row.template_list("UI_UL_list", "particle_dupli_weights", part, "dupli_weights", - part, "active_dupliweight_index") + col=layout.column() - col = row.column() - sub = col.row() - subsub = sub.column(align=True) - subsub.operator("particle.dupliob_copy", icon='ZOOMIN', text="") - subsub.operator("particle.dupliob_remove", icon='ZOOMOUT', text="") - subsub.operator("particle.dupliob_move_up", icon='TRIA_UP', text="") - subsub.operator("particle.dupliob_move_down", icon='TRIA_DOWN', text="") + col.prop(part, "use_strand_primitive") + sub = col.column() + sub.active = (part.use_strand_primitive is False) + sub.prop(part, "use_render_adaptive") + sub = col.column() + sub.active = part.use_render_adaptive or part.use_strand_primitive is True + sub.prop(part, "adaptive_angle") + sub = col.column() + sub.active = (part.use_render_adaptive is True and part.use_strand_primitive is False) + sub.prop(part, "adaptive_pixel") + col.prop(part, "use_hair_bspline") + col.prop(part, "render_step", text="Steps") - weight = part.active_dupliweight - if weight: - row = layout.row() - row.prop(weight, "count") - elif part.render_type == 'BILLBOARD': +class PARTICLE_PT_render_path_timing(ParticleButtonsPanel, Panel): + bl_label = "Timing" + bl_parent_id = "PARTICLE_PT_render" + bl_options = {'DEFAULT_CLOSED'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} - ob = context.object + @classmethod + def poll(cls, context): + part = particle_get_settings(context) + return part.render_type == 'PATH' - col.separator() + def draw(self, context): + layout = self.layout + layout.use_property_split = True - col.label(text="Alignment") - col.prop(part, "billboard_align", text="Align To") - col.prop(part, "lock_billboard", text="Lock Axis") - col.prop(part, "billboard_object") + psys = context.particle_system + ob = context.object + part = particle_get_settings(context) - col.separator() - col.label(text="Tilt") + col=layout.column() - sub = col.column(align=True) - sub.prop(part, "billboard_tilt", text="Angle", slider=True) - sub.prop(part, "billboard_tilt_random", text="Random", slider=True) - - sub = col.column(align=True) - sub.prop(part, "billboard_offset") - col.prop(part, "billboard_size", text="Scale") - if part.billboard_align == 'VEL': - col = col.column(align=True) - col.prop(part, "billboard_velocity_head", text="Velocity ScaleHead") - col.prop(part, "billboard_velocity_tail", text="Tail") - - col.separator() - col.label(text="UVs") - - if psys: - col.prop_search(psys, "billboard_normal_uv", ob.data, "uv_layers") - col.prop_search(psys, "billboard_time_index_uv", ob.data, "uv_layers") - - col.prop(part, "billboard_uv_split", text="Split UVs") - - if psys: - sub = col.column() - sub.active = part.billboard_uv_split > 1 - sub.prop_search(psys, "billboard_split_uv", ob.data, "uv_layers") - - sub.prop(part, "billboard_animation") - sub.prop(part, "billboard_offset_split") - - if part.render_type == 'HALO' or part.render_type == 'LINE' or part.render_type == 'BILLBOARD': - - col.separator() - - col.label(text="Trails") + col.prop(part, "use_absolute_path_time") + if part.type == 'HAIR' or psys.point_cache.is_baked: + col.prop(part, "path_start", text="Start", slider=not part.use_absolute_path_time) + else: col.prop(part, "trail_count") + col.prop(part, "path_end", text="End", slider=not part.use_absolute_path_time) + col.prop(part, "length_random", text="Random", slider=True) + +class PARTICLE_PT_render_object(ParticleButtonsPanel, Panel): + bl_label = "Object" + bl_parent_id = "PARTICLE_PT_render" + bl_options = {'DEFAULT_CLOSED'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} + + @classmethod + def poll(cls, context): + part = particle_get_settings(context) + return part.render_type == 'OBJECT' + + def draw(self, context): + layout = self.layout + layout.use_property_split = True + + psys = context.particle_system + ob = context.object + part = particle_get_settings(context) + + col=layout.column() + + col.prop(part, "dupli_object", text="Instance Object") + sub = col.column() + sub.prop(part, "use_global_dupli", text="Global Coordinates") + sub.prop(part, "use_rotation_dupli", text="Object Rotation") + sub.prop(part, "use_scale_dupli", text="Object Scale") + + +class PARTICLE_PT_render_collection(ParticleButtonsPanel, Panel): + bl_label = "Collection" + bl_parent_id = "PARTICLE_PT_render" + bl_options = {'DEFAULT_CLOSED'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} + + @classmethod + def poll(cls, context): + part = particle_get_settings(context) + return part.render_type == 'COLLECTION' + + def draw(self, context): + layout = self.layout + layout.use_property_split = True + + psys = context.particle_system + ob = context.object + part = particle_get_settings(context) + + col=layout.column() + + col.prop(part, "dupli_group") + + col.prop(part, "use_whole_group") + sub = col.column() + sub.active = (part.use_whole_group is False) + sub.prop(part, "use_group_pick_random") + sub.prop(part, "use_global_dupli", text="Global Coordinates") + sub.prop(part, "use_rotation_dupli", text="Object Rotation") + sub.prop(part, "use_scale_dupli", text="Object Scale") + +class PARTICLE_PT_render_collection_use_count(ParticleButtonsPanel, Panel): + bl_label = "Use Count" + bl_parent_id = "PARTICLE_PT_render_collection" + bl_options = {'DEFAULT_CLOSED'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} + + @classmethod + def poll(cls, context): + part = particle_get_settings(context) + return part.render_type == 'COLLECTION' + + def draw_header(self, context): + layout = self.layout + part = particle_get_settings(context) + + layout.active = not part.use_whole_group + + layout.prop(part, "use_group_count", text="") + + def draw(self, context): + layout = self.layout + layout.use_property_split = True + + psys = context.particle_system + ob = context.object + part = particle_get_settings(context) + + col=layout.column() + + layout.active = part.use_group_count and not part.use_whole_group + + row = layout.row() + row.template_list("UI_UL_list", "particle_dupli_weights", part, "dupli_weights", + part, "active_dupliweight_index") + + col = row.column() + sub = col.row() + subsub = sub.column(align=True) + subsub.operator("particle.dupliob_copy", icon='ZOOMIN', text="") + subsub.operator("particle.dupliob_remove", icon='ZOOMOUT', text="") + subsub.operator("particle.dupliob_move_up", icon='TRIA_UP', text="") + subsub.operator("particle.dupliob_move_down", icon='TRIA_DOWN', text="") + + weight = part.active_dupliweight + if weight: + row = layout.row() + row.prop(weight, "count") + +class PARTICLE_PT_render_billboards_alignment(ParticleButtonsPanel, Panel): + bl_label = "Billboard Alignment" + bl_parent_id = "PARTICLE_PT_render" + bl_options = {'DEFAULT_CLOSED'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} + + @classmethod + def poll(cls, context): + part = particle_get_settings(context) + return part.render_type == 'BILLBOARD' + + def draw(self, context): + layout = self.layout + layout.use_property_split = True + + psys = context.particle_system + ob = context.object + part = particle_get_settings(context) + + col=layout.column() + + col.prop(part, "billboard_align", text="Align To") + col.prop(part, "lock_billboard", text="Lock Axis") + col.prop(part, "billboard_object") + +class PARTICLE_PT_render_billboards_tilt(ParticleButtonsPanel, Panel): + bl_label = "Billboard Tilt" + bl_parent_id = "PARTICLE_PT_render" + bl_options = {'DEFAULT_CLOSED'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} + + @classmethod + def poll(cls, context): + part = particle_get_settings(context) + return part.render_type == 'BILLBOARD' + + def draw(self, context): + layout = self.layout + layout.use_property_split = True + + psys = context.particle_system + ob = context.object + part = particle_get_settings(context) + + col=layout.column() + + sub = col.column(align=True) + sub.prop(part, "billboard_tilt", text="Angle", slider=True) + sub.prop(part, "billboard_tilt_random", text="Random", slider=True) + + sub = col.column(align=True) + sub.prop(part, "billboard_offset") + col.prop(part, "billboard_size", text="Scale") + if part.billboard_align == 'VEL': + col = col.column(align=True) + col.prop(part, "billboard_velocity_head", text="Velocity ScaleHead") + col.prop(part, "billboard_velocity_tail", text="Tail") + +class PARTICLE_PT_render_billboards_uv(ParticleButtonsPanel, Panel): + bl_label = "Billboard UVs" + bl_parent_id = "PARTICLE_PT_render" + bl_options = {'DEFAULT_CLOSED'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} + + @classmethod + def poll(cls, context): + part = particle_get_settings(context) + return part.render_type == 'BILLBOARD' + + def draw(self, context): + layout = self.layout + layout.use_property_split = True + + psys = context.particle_system + ob = context.object + part = particle_get_settings(context) + + col=layout.column() + + if psys: + col.prop_search(psys, "billboard_normal_uv", ob.data, "uv_layers") + col.prop_search(psys, "billboard_time_index_uv", ob.data, "uv_layers") + + col.prop(part, "billboard_uv_split", text="Split UVs") + + if psys: sub = col.column() - sub.active = (part.trail_count > 1) - sub.prop(part, "use_absolute_path_time", text="Length in Frames") - sub.prop(part, "path_end", text="Length", slider=not part.use_absolute_path_time) - sub.prop(part, "length_random", text="Random Length", slider=True) + sub.active = part.billboard_uv_split > 1 + sub.prop_search(psys, "billboard_split_uv", ob.data, "uv_layers") + + sub.prop(part, "billboard_animation") + sub.prop(part, "billboard_offset_split") + + + +class PARTICLE_PT_render_trails(ParticleButtonsPanel, Panel): + bl_label = "Trails" + bl_parent_id = "PARTICLE_PT_render" + bl_options = {'DEFAULT_CLOSED'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} + + @classmethod + def poll(cls, context): + part = particle_get_settings(context) + return part.render_type in {'HALO', 'LINE', 'BILLBOARD'} + + def draw(self, context): + layout = self.layout + layout.use_property_split = True + + psys = context.particle_system + part = particle_get_settings(context) + + col=layout.column() + + col.prop(part, "trail_count") + + sub = col.column() + sub.active = (part.trail_count > 1) + sub.prop(part, "use_absolute_path_time", text="Length in Frames") + sub.prop(part, "path_end", text="Length", slider=not part.use_absolute_path_time) + sub.prop(part, "length_random", text="Random Length", slider=True) class PARTICLE_PT_draw(ParticleButtonsPanel, Panel): @@ -1183,24 +1506,54 @@ class PARTICLE_PT_children(ParticleButtonsPanel, Panel): elif part.virtual_parents > 0.0: sub = col.column(align=True) sub.label(text="Parting not available with virtual parents") - else: - col.separator() - col.label(text="Parting") - sub = col.column(align=True) - sub.prop(part, "child_parting_factor", text="Parting", slider=True) - sub.prop(part, "child_parting_min", text="Min") - sub.prop(part, "child_parting_max", text="Max") - col.separator() - col.label(text="Clumping") +class PARTICLE_PT_children_parting(ParticleButtonsPanel, Panel): + bl_label = "Parting" + bl_parent_id = "PARTICLE_PT_children" + bl_options = {'DEFAULT_CLOSED'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} + + @classmethod + def poll(cls, context): + part = particle_get_settings(context) + return part.child_type == 'INTERPOLATED' + + def draw(self, context): + layout = self.layout + + psys = context.particle_system + part = particle_get_settings(context) + + layout.use_property_split = True + + col = layout.column() + col.prop(part, "child_parting_factor", text="Parting", slider=True) + col.prop(part, "child_parting_min", text="Min") + col.prop(part, "child_parting_max", text="Max") + +class PARTICLE_PT_children_clumping(ParticleButtonsPanel, Panel): + bl_label = "Clumping" + bl_parent_id = "PARTICLE_PT_children" + bl_options = {'DEFAULT_CLOSED'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} + + @classmethod + def poll(cls, context): + part = particle_get_settings(context) + return part.child_type != 'NONE' + + def draw(self, context): + layout = self.layout + + psys = context.particle_system + part = particle_get_settings(context) + + layout.use_property_split = True + + col = layout.column() sub = col.column() - if part.child_type == 'SIMPLE': - sub.prop(part, "twist") - sub.prop(part, "use_twist_curve") - if part.use_twist_curve: - sub.template_curve_mapping(part, "twist_curve") sub.prop(part, "use_clump_curve") if part.use_clump_curve: @@ -1214,7 +1567,32 @@ class PARTICLE_PT_children(ParticleButtonsPanel, Panel): subsub.enabled = part.use_clump_noise subsub.prop(part, "clump_noise_size") - col.label(text="Roughness") + if part.child_type == 'SIMPLE': + sub.prop(part, "twist") + sub.prop(part, "use_twist_curve") + if part.use_twist_curve: + sub.template_curve_mapping(part, "twist_curve") + +class PARTICLE_PT_children_roughness(ParticleButtonsPanel, Panel): + bl_label = "Roughness" + bl_parent_id = "PARTICLE_PT_children" + bl_options = {'DEFAULT_CLOSED'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} + + @classmethod + def poll(cls, context): + part = particle_get_settings(context) + return part.child_type != 'NONE' + + def draw(self, context): + layout = self.layout + + psys = context.particle_system + part = particle_get_settings(context) + + layout.use_property_split = True + + col = layout.column() col.prop(part, "use_roughness_curve") if part.use_roughness_curve: @@ -1236,7 +1614,27 @@ class PARTICLE_PT_children(ParticleButtonsPanel, Panel): sub.prop(part, "roughness_2_size", text="Size") sub.prop(part, "roughness_2_threshold", slider=True) - col.label(text="Kink") + +class PARTICLE_PT_children_kink(ParticleButtonsPanel, Panel): + bl_label = "Kink" + bl_parent_id = "PARTICLE_PT_children" + bl_options = {'DEFAULT_CLOSED'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} + + @classmethod + def poll(cls, context): + part = particle_get_settings(context) + return part.child_type != 'NONE' + + def draw(self, context): + layout = self.layout + + psys = context.particle_system + part = particle_get_settings(context) + + layout.use_property_split = True + + col = layout.column() col.prop(part, "kink", text="Kink Type") col = layout.column() @@ -1472,14 +1870,34 @@ classes = ( PARTICLE_PT_emission, PARTICLE_PT_emission_source, PARTICLE_PT_hair_dynamics, + PARTICLE_PT_hair_dynamics_structure, + PARTICLE_PT_hair_dynamics_volume, PARTICLE_PT_cache, PARTICLE_PT_velocity, PARTICLE_PT_rotation, + PARTICLE_PT_rotation_angular_velocity, PARTICLE_PT_physics, + PARTICLE_PT_physics_forces, + PARTICLE_PT_physics_deflection, + PARTICLE_PT_physics_integration, PARTICLE_PT_boidbrain, PARTICLE_PT_render, + PARTICLE_PT_render_line, + PARTICLE_PT_render_path, + PARTICLE_PT_render_path_timing, + PARTICLE_PT_render_object, + PARTICLE_PT_render_collection, + PARTICLE_PT_render_collection_use_count, + PARTICLE_PT_render_billboards_tilt, + PARTICLE_PT_render_billboards_uv, + PARTICLE_PT_render_trails, + PARTICLE_PT_render_extra, PARTICLE_PT_draw, PARTICLE_PT_children, + PARTICLE_PT_children_parting, + PARTICLE_PT_children_clumping, + PARTICLE_PT_children_roughness, + PARTICLE_PT_children_kink, PARTICLE_PT_hair_shape, PARTICLE_PT_field_weights, PARTICLE_PT_force_fields, diff --git a/release/scripts/startup/bl_ui/properties_render.py b/release/scripts/startup/bl_ui/properties_render.py index a37fb4a027c..d75d3b61f1e 100644 --- a/release/scripts/startup/bl_ui/properties_render.py +++ b/release/scripts/startup/bl_ui/properties_render.py @@ -222,11 +222,24 @@ class RENDER_PT_stamp(RenderButtonsPanel, Panel): sub.active = rd.use_stamp_note sub.prop(rd, "stamp_note_text", text="") +class RENDER_PT_stamp_burn(RenderButtonsPanel, Panel): + bl_label = "Burn Into Image" + bl_parent_id = "RENDER_PT_stamp" + bl_options = {'DEFAULT_CLOSED'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'} + + def draw_header(self, context): + rd = context.scene.render + + self.layout.prop(rd, "use_stamp", text="") + + def draw(self, context): + layout = self.layout + + rd = context.scene.render + layout.use_property_split = True - layout.separator() - - layout.prop(rd, "use_stamp", text="Burn Into Image") col = layout.column() col.active = rd.use_stamp col.prop(rd, "stamp_font_size", text="Font Size") @@ -764,6 +777,7 @@ classes = ( RENDER_PT_output, RENDER_PT_encoding, RENDER_PT_stamp, + RENDER_PT_stamp_burn, RENDER_UL_renderviews, RENDER_PT_stereoscopy, RENDER_PT_hair, diff --git a/release/scripts/startup/bl_ui/properties_scene.py b/release/scripts/startup/bl_ui/properties_scene.py index 731a4586e42..380ee57962c 100644 --- a/release/scripts/startup/bl_ui/properties_scene.py +++ b/release/scripts/startup/bl_ui/properties_scene.py @@ -160,6 +160,7 @@ class SceneKeyingSetsPanel: class SCENE_PT_keying_sets(SceneButtonsPanel, SceneKeyingSetsPanel, Panel): bl_label = "Keying Sets" + bl_options = {'DEFAULT_CLOSED'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} def draw(self, context): @@ -193,7 +194,7 @@ class SCENE_PT_keying_sets(SceneButtonsPanel, SceneKeyingSetsPanel, Panel): class SCENE_PT_keying_set_paths(SceneButtonsPanel, SceneKeyingSetsPanel, Panel): bl_label = "Active Keying Set" - bl_options = {'DEFAULT_CLOSED'} + bl_parent_id = "SCENE_PT_keying_sets" COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} @classmethod @@ -258,19 +259,47 @@ class SCENE_PT_color_management(SceneButtonsPanel, Panel): layout.use_property_split = True scene = context.scene + view = scene.view_settings col = layout.column() col.prop(scene.display_settings, "display_device") - - col.separator() - - col = layout.column() - col.template_colormanaged_view_settings(scene, "view_settings") - - col.separator() - col = layout.column() col.prop(scene.sequencer_colorspace_settings, "name", text="Sequencer Color Space") + col.separator() + + col = layout.column() + col.prop(view, "view_transform") + col.prop(view, "exposure") + col.prop(view, "gamma") + col.prop(view, "look") + + +class SCENE_PT_color_management_curves(SceneButtonsPanel, Panel): + bl_label = "Use Curves" + bl_parent_id = "SCENE_PT_color_management" + bl_options = {'DEFAULT_CLOSED'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} + + def draw_header(self, context): + + scene = context.scene + view = scene.view_settings + + self.layout.prop(view, "use_curve_mapping", text="") + + def draw(self, context): + layout = self.layout + + scene = context.scene + view = scene.view_settings + + layout.use_property_split = False + layout.enabled = view.use_curve_mapping + + layout.template_curve_mapping(view, "curve_mapping", levels = True) + + + class SCENE_PT_audio(SceneButtonsPanel, Panel): bl_label = "Audio" @@ -306,6 +335,7 @@ class SCENE_PT_audio(SceneButtonsPanel, Panel): class SCENE_PT_physics(SceneButtonsPanel, Panel): bl_label = "Gravity" + bl_options = {'DEFAULT_CLOSED'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'} def draw_header(self, context): @@ -368,7 +398,8 @@ class SCENE_PT_rigid_body_world(SceneButtonsPanel, Panel): class SCENE_PT_rigid_body_cache(SceneButtonsPanel, Panel): - bl_label = "Rigid Body Cache" + bl_label = "Cache" + bl_parent_id = "SCENE_PT_rigid_body_world" bl_options = {'DEFAULT_CLOSED'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'} @@ -385,7 +416,8 @@ class SCENE_PT_rigid_body_cache(SceneButtonsPanel, Panel): class SCENE_PT_rigid_body_field_weights(SceneButtonsPanel, Panel): - bl_label = "Rigid Body Field Weights" + bl_label = "Field Weights" + bl_parent_id = "SCENE_PT_rigid_body_world" bl_options = {'DEFAULT_CLOSED'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'} @@ -460,6 +492,7 @@ classes = ( SCENE_PT_keying_sets, SCENE_PT_keying_set_paths, SCENE_PT_color_management, + SCENE_PT_color_management_curves, SCENE_PT_viewport_display, SCENE_PT_audio, SCENE_PT_physics, diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c index c32314fba71..3af0ac63d96 100644 --- a/source/blender/makesrna/intern/rna_particle.c +++ b/source/blender/makesrna/intern/rna_particle.c @@ -115,7 +115,7 @@ static const EnumPropertyItem part_ren_as_items[] = { {PART_DRAW_LINE, "LINE", 0, "Line", ""}, {PART_DRAW_PATH, "PATH", 0, "Path", ""}, {PART_DRAW_OB, "OBJECT", 0, "Object", ""}, - {PART_DRAW_GR, "GROUP", 0, "Group", ""}, + {PART_DRAW_GR, "COLLECTION", 0, "Collection", ""}, {PART_DRAW_BB, "BILLBOARD", 0, "Billboard", ""}, {0, NULL, 0, NULL, NULL} }; @@ -125,7 +125,7 @@ static const EnumPropertyItem part_hair_ren_as_items[] = { {PART_DRAW_NOT, "NONE", 0, "None", ""}, {PART_DRAW_PATH, "PATH", 0, "Path", ""}, {PART_DRAW_OB, "OBJECT", 0, "Object", ""}, - {PART_DRAW_GR, "GROUP", 0, "Group", ""}, + {PART_DRAW_GR, "COLLECTION", 0, "Collection", ""}, {0, NULL, 0, NULL, NULL} }; #endif