From 84d4037363b325a279ef87b6b1c430be29984357 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vuk=20Garda=C5=A1evi=C4=87?= Date: Tue, 17 Jul 2018 12:17:42 +0200 Subject: UI: Single-column and flow layout for Scene properties See D3532 --- release/scripts/startup/bl_ui/properties_scene.py | 185 ++++++++++++++++------ 1 file changed, 137 insertions(+), 48 deletions(-) (limited to 'release/scripts/startup/bl_ui/properties_scene.py') diff --git a/release/scripts/startup/bl_ui/properties_scene.py b/release/scripts/startup/bl_ui/properties_scene.py index d0fce0a2582..c0b8233a796 100644 --- a/release/scripts/startup/bl_ui/properties_scene.py +++ b/release/scripts/startup/bl_ui/properties_scene.py @@ -17,9 +17,9 @@ # ##### END GPL LICENSE BLOCK ##### # + import bpy from bpy.types import ( - Menu, Panel, UIList, ) @@ -71,6 +71,7 @@ class SCENE_PT_scene(SceneButtonsPanel, Panel): def draw(self, context): layout = self.layout layout.use_property_split = True + scene = context.scene layout.prop(scene, "camera") @@ -92,13 +93,13 @@ class SCENE_PT_unit(SceneButtonsPanel, Panel): layout.use_property_split = True - col = layout.column() - col.prop(unit, "system") + flow = layout.grid_flow(row_major=True, columns=0, even_columns=False, even_rows=False, align=True) - col = layout.column() + col = flow.column() + col.prop(unit, "system") col.prop(unit, "system_rotation") - col = layout.column() + col = flow.column() col.enabled = unit.system != 'NONE' col.prop(unit, "scale_length") col.prop(unit, "use_separate") @@ -147,15 +148,17 @@ class SceneKeyingSetsPanel: propname = prop row = layout.row(align=True) - row.prop(item, toggle_prop, text="", icon='STYLUS_PRESSURE', toggle=True) # XXX: needs dedicated icon - subrow = row.row() + subrow = row.row(align=True) subrow.active = getattr(item, toggle_prop) + if subrow.active: subrow.prop(item, prop, text=label) else: subrow.prop(owner, propname, text=label) + row.prop(item, toggle_prop, text="", icon='STYLUS_PRESSURE', toggle=True) # XXX: needs dedicated icon + class SCENE_PT_keying_sets(SceneButtonsPanel, SceneKeyingSetsPanel, Panel): bl_label = "Keying Sets" @@ -166,6 +169,7 @@ class SCENE_PT_keying_sets(SceneButtonsPanel, SceneKeyingSetsPanel, Panel): layout = self.layout scene = context.scene + row = layout.row() col = row.column() @@ -175,20 +179,56 @@ class SCENE_PT_keying_sets(SceneButtonsPanel, SceneKeyingSetsPanel, Panel): col.operator("anim.keying_set_add", icon='ZOOMIN', text="") col.operator("anim.keying_set_remove", icon='ZOOMOUT', text="") + layout.use_property_split = True + layout.use_property_decorate = False # No animation. + + flow = layout.grid_flow(row_major=False, columns=0, even_columns=False, even_rows=False, align=False) + ks = scene.keying_sets.active if ks and ks.is_path_absolute: - row = layout.row() - - col = row.column() + col = flow.column() col.prop(ks, "bl_description") - subcol = col.column() + subcol = flow.column() subcol.operator_context = 'INVOKE_DEFAULT' subcol.operator("anim.keying_set_export", text="Export to File").filepath = "keyingset.py" - col = row.column() - col.label(text="Keyframing Settings:") - self.draw_keyframing_settings(context, col, ks, None) + +class SCENE_PT_keyframing_settings(SceneButtonsPanel, SceneKeyingSetsPanel, Panel): + bl_label = "Keyframing Settings" + bl_parent_id = "SCENE_PT_keying_sets" + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'} + + @classmethod + def poll(cls, context): + ks = context.scene.keying_sets.active + return (ks and ks.is_path_absolute) + + def draw(self, context): + layout = self.layout + layout.use_property_split = True + layout.use_property_decorate = False # No animation. + + scene = context.scene + ks = scene.keying_sets.active + + flow = layout.grid_flow(row_major=True, columns=0, even_columns=False, even_rows=False, align=True) + + col = flow.column(align=True) + col.alignment = "RIGHT" + col.label(text="General Override") + + self.draw_keyframing_settings(context, col, ks, None) + + ksp = ks.paths.active + if ksp: + col.separator() + + col = flow.column(align=True) + col.alignment = "RIGHT" + col.label(text="Active Set Override") + + self.draw_keyframing_settings(context, col, ks, ksp) class SCENE_PT_keying_set_paths(SceneButtonsPanel, SceneKeyingSetsPanel, Panel): @@ -219,34 +259,40 @@ class SCENE_PT_keying_set_paths(SceneButtonsPanel, SceneKeyingSetsPanel, Panel): col.operator("anim.keying_set_path_add", icon='ZOOMIN', text="") col.operator("anim.keying_set_path_remove", icon='ZOOMOUT', text="") + # TODO: 1) the template_any_ID needs to be fixed for the text alignment. + # 2) use_property_decorate has to properly skip the non animatable properties. + # Properties affected with needless draw: + # group_method, template_any_ID dropdown, use_entire_array + + layout.use_property_split = True + layout.use_property_decorate = False # No animation (remove this later on). + + flow = layout.grid_flow(row_major=False, columns=0, even_columns=False, even_rows=False, align=True) + ksp = ks.paths.active if ksp: - col = layout.column() - col.label(text="Target:") - col.template_any_ID(ksp, "id", "id_type") - col.template_path_builder(ksp, "data_path", ksp.id) - - row = col.row(align=True) - row.label(text="Array Target:") - row.prop(ksp, "use_entire_array", text="All Items") - if ksp.use_entire_array: - row.label(text=" ") # padding - else: - row.prop(ksp, "array_index", text="Index") + col = flow.column(align=True) + col.alignment = "RIGHT" + + col.template_any_ID(ksp, "id", "id_type", text="Target ID-Block") + + col.separator() - layout.separator() + col.template_path_builder(ksp, "data_path", ksp.id, text="Data Path") - row = layout.row() - col = row.column() - col.label(text="F-Curve Grouping:") - col.prop(ksp, "group_method", text="") + col = flow.column() + + col.prop(ksp, "use_entire_array", text="Array All Items") + + if not ksp.use_entire_array: + col.prop(ksp, "array_index", text="Index") + + col.separator() + + col.prop(ksp, "group_method", text="F-Curve Grouping") if ksp.group_method == 'NAMED': col.prop(ksp, "group") - col = row.column() - col.label(text="Keyframing Settings:") - self.draw_keyframing_settings(context, col, ks, ksp) - class SCENE_PT_color_management(SceneButtonsPanel, Panel): bl_label = "Color Management" @@ -260,16 +306,19 @@ class SCENE_PT_color_management(SceneButtonsPanel, Panel): scene = context.scene view = scene.view_settings - col = layout.column() + flow = layout.grid_flow(row_major=True, columns=0, even_columns=False, even_rows=False, align=True) + + col = flow.column() col.prop(scene.display_settings, "display_device") col.separator() - col = layout.column() col.prop(view, "view_transform") + col.prop(view, "look") + + col = flow.column() col.prop(view, "exposure") col.prop(view, "gamma") - col.prop(view, "look") col.separator() @@ -314,21 +363,28 @@ class SCENE_PT_audio(SceneButtonsPanel, Panel): rd = context.scene.render ffmpeg = rd.ffmpeg - layout.prop(scene, "audio_volume") + flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=True) - col = layout.column() - col.prop(scene, "audio_distance_model") + col = flow.column() + col.prop(scene, "audio_volume") + col.separator() + + col.prop(scene, "audio_distance_model") col.prop(ffmpeg, "audio_channels") + + col.separator() + + col = flow.column() col.prop(ffmpeg, "audio_mixrate", text="Sample Rate") - layout.separator() + col.separator() - col = layout.column(align=True) + col = col.column(align=True) col.prop(scene, "audio_doppler_speed", text="Doppler Speed") col.prop(scene, "audio_doppler_factor", text="Doppler Factor") - layout.separator() + col.separator() layout.operator("sound.bake_animation") @@ -372,7 +428,6 @@ class SCENE_PT_rigid_body_world(SceneButtonsPanel, Panel): layout.use_property_split = True scene = context.scene - rbw = scene.rigidbody_world if rbw is None: @@ -380,7 +435,28 @@ class SCENE_PT_rigid_body_world(SceneButtonsPanel, Panel): else: layout.operator("rigidbody.world_remove") - col = layout.column() + +class SCENE_PT_rigid_body_world_settings(SceneButtonsPanel, Panel): + bl_label = "Settings" + bl_parent_id = "SCENE_PT_rigid_body_world" + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'} + + @classmethod + def poll(cls, context): + scene = context.scene + return scene and scene.rigidbody_world and (context.engine in cls.COMPAT_ENGINES) + + def draw(self, context): + layout = self.layout + layout.use_property_split = True + + scene = context.scene + rbw = scene.rigidbody_world + + if rbw: + flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=True) + + col = flow.column() col.active = rbw.enabled col = col.column() @@ -389,6 +465,9 @@ class SCENE_PT_rigid_body_world(SceneButtonsPanel, Panel): col = col.column() col.prop(rbw, "time_scale", text="Speed") + + col = flow.column() + col.active = rbw.enabled col.prop(rbw, "use_split_impulse") col = col.column() @@ -458,8 +537,12 @@ class SCENE_PT_simplify_viewport(SceneButtonsPanel, Panel): layout.active = rd.use_simplify - col = layout.column() + flow = layout.grid_flow(row_major=True, columns=0, even_columns=False, even_rows=False, align=True) + + col = flow.column() col.prop(rd, "simplify_subdivision", text="Max Subdivision") + + col = flow.column() col.prop(rd, "simplify_child_particles", text="Max Child Particles") @@ -476,8 +559,12 @@ class SCENE_PT_simplify_render(SceneButtonsPanel, Panel): layout.active = rd.use_simplify - col = layout.column() + flow = layout.grid_flow(row_major=True, columns=0, even_columns=False, even_rows=False, align=True) + + col = flow.column() col.prop(rd, "simplify_subdivision_render", text="Max Subdivision") + + col = flow.column() col.prop(rd, "simplify_child_particles_render", text="Max Child Particles") @@ -494,11 +581,13 @@ classes = ( SCENE_PT_unit, SCENE_PT_keying_sets, SCENE_PT_keying_set_paths, + SCENE_PT_keyframing_settings, SCENE_PT_color_management, SCENE_PT_color_management_curves, SCENE_PT_audio, SCENE_PT_physics, SCENE_PT_rigid_body_world, + SCENE_PT_rigid_body_world_settings, SCENE_PT_rigid_body_cache, SCENE_PT_rigid_body_field_weights, SCENE_PT_simplify, -- cgit v1.2.3 From 644fadf2f0131f8ecd73da6c994ec8a8d4b0a7d1 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Wed, 11 Jul 2018 11:43:56 +0200 Subject: Render: add "OpenGL" render engine. This is intended for quick renders for previsualization, animation previews or sequencer previews. It provides the same settings as found in the 3D view Shading popover in solid display mode, but in the scene render properties. The "Workbench" engine was removed, and this name no longer appears in the user interface, it's purely an internal name. We might come up with a better name for this OpenGL engine still, but it's good to be consistent with the OpenGL Render operator name since this has a similar purpose. --- release/scripts/startup/bl_ui/properties_scene.py | 30 +++++++++++------------ 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'release/scripts/startup/bl_ui/properties_scene.py') diff --git a/release/scripts/startup/bl_ui/properties_scene.py b/release/scripts/startup/bl_ui/properties_scene.py index c0b8233a796..1b21ac8fcdf 100644 --- a/release/scripts/startup/bl_ui/properties_scene.py +++ b/release/scripts/startup/bl_ui/properties_scene.py @@ -66,7 +66,7 @@ class SceneButtonsPanel: class SCENE_PT_scene(SceneButtonsPanel, Panel): bl_label = "Scene" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'} def draw(self, context): layout = self.layout @@ -81,7 +81,7 @@ class SCENE_PT_scene(SceneButtonsPanel, Panel): class SCENE_PT_unit(SceneButtonsPanel, Panel): bl_label = "Units" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'} def draw_header_preset(self, context): SCENE_PT_units_length_presets.draw_panel_header(self.layout) @@ -163,7 +163,7 @@ class SceneKeyingSetsPanel: class SCENE_PT_keying_sets(SceneButtonsPanel, SceneKeyingSetsPanel, Panel): bl_label = "Keying Sets" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'} def draw(self, context): layout = self.layout @@ -234,7 +234,7 @@ class SCENE_PT_keyframing_settings(SceneButtonsPanel, SceneKeyingSetsPanel, Pane class SCENE_PT_keying_set_paths(SceneButtonsPanel, SceneKeyingSetsPanel, Panel): bl_label = "Active Keying Set" bl_parent_id = "SCENE_PT_keying_sets" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'} @classmethod def poll(cls, context): @@ -297,7 +297,7 @@ class SCENE_PT_keying_set_paths(SceneButtonsPanel, SceneKeyingSetsPanel, Panel): class SCENE_PT_color_management(SceneButtonsPanel, Panel): bl_label = "Color Management" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'} def draw(self, context): layout = self.layout @@ -329,7 +329,7 @@ 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_EEVEE'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'} def draw_header(self, context): @@ -353,7 +353,7 @@ class SCENE_PT_color_management_curves(SceneButtonsPanel, Panel): class SCENE_PT_audio(SceneButtonsPanel, Panel): bl_label = "Audio" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'} def draw(self, context): layout = self.layout @@ -392,7 +392,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'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'} def draw_header(self, context): self.layout.prop(context.scene, "use_gravity", text="") @@ -411,7 +411,7 @@ class SCENE_PT_physics(SceneButtonsPanel, Panel): class SCENE_PT_rigid_body_world(SceneButtonsPanel, Panel): bl_label = "Rigid Body World" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'} @classmethod def poll(cls, context): @@ -479,7 +479,7 @@ class SCENE_PT_rigid_body_cache(SceneButtonsPanel, Panel): bl_label = "Cache" bl_parent_id = "SCENE_PT_rigid_body_world" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'} @classmethod def poll(cls, context): @@ -497,7 +497,7 @@ class SCENE_PT_rigid_body_field_weights(SceneButtonsPanel, Panel): bl_label = "Field Weights" bl_parent_id = "SCENE_PT_rigid_body_world" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'} @classmethod def poll(cls, context): @@ -514,7 +514,7 @@ class SCENE_PT_rigid_body_field_weights(SceneButtonsPanel, Panel): class SCENE_PT_simplify(SceneButtonsPanel, Panel): bl_label = "Simplify" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'} def draw_header(self, context): rd = context.scene.render @@ -527,7 +527,7 @@ class SCENE_PT_simplify(SceneButtonsPanel, Panel): class SCENE_PT_simplify_viewport(SceneButtonsPanel, Panel): bl_label = "Viewport" bl_parent_id = "SCENE_PT_simplify" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'} def draw(self, context): layout = self.layout @@ -549,7 +549,7 @@ class SCENE_PT_simplify_viewport(SceneButtonsPanel, Panel): class SCENE_PT_simplify_render(SceneButtonsPanel, Panel): bl_label = "Render" bl_parent_id = "SCENE_PT_simplify" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'} def draw(self, context): layout = self.layout @@ -569,7 +569,7 @@ class SCENE_PT_simplify_render(SceneButtonsPanel, Panel): class SCENE_PT_custom_props(SceneButtonsPanel, PropertyPanel, Panel): - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'} _context_path = "scene" _property_type = bpy.types.Scene -- cgit v1.2.3 From 9df1e54079344ed4e2becef9e57cf1b925b46dff Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 19 Jul 2018 16:06:37 +1000 Subject: Cleanup: style --- release/scripts/startup/bl_ui/properties_scene.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'release/scripts/startup/bl_ui/properties_scene.py') diff --git a/release/scripts/startup/bl_ui/properties_scene.py b/release/scripts/startup/bl_ui/properties_scene.py index 1b21ac8fcdf..38bfc6ad294 100644 --- a/release/scripts/startup/bl_ui/properties_scene.py +++ b/release/scripts/startup/bl_ui/properties_scene.py @@ -215,7 +215,7 @@ class SCENE_PT_keyframing_settings(SceneButtonsPanel, SceneKeyingSetsPanel, Pane flow = layout.grid_flow(row_major=True, columns=0, even_columns=False, even_rows=False, align=True) col = flow.column(align=True) - col.alignment = "RIGHT" + col.alignment = 'RIGHT' col.label(text="General Override") self.draw_keyframing_settings(context, col, ks, None) @@ -225,7 +225,7 @@ class SCENE_PT_keyframing_settings(SceneButtonsPanel, SceneKeyingSetsPanel, Pane col.separator() col = flow.column(align=True) - col.alignment = "RIGHT" + col.alignment = 'RIGHT' col.label(text="Active Set Override") self.draw_keyframing_settings(context, col, ks, ksp) @@ -272,7 +272,7 @@ class SCENE_PT_keying_set_paths(SceneButtonsPanel, SceneKeyingSetsPanel, Panel): ksp = ks.paths.active if ksp: col = flow.column(align=True) - col.alignment = "RIGHT" + col.alignment = 'RIGHT' col.template_any_ID(ksp, "id", "id_type", text="Target ID-Block") -- cgit v1.2.3 From 66da2f537ae80ce2b31d1eaf34ad8c03d858938d Mon Sep 17 00:00:00 2001 From: Antonioya Date: Tue, 31 Jul 2018 10:22:19 +0200 Subject: New Grease Pencil object for 2D animation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit merge the full development done in greasepencil-object branch and include mainly the following features. - New grease pencil object. - New drawing engine. - New grease pencil modes Draw/Sculpt/Edit and Weight Paint. - New brushes for grease pencil. - New modifiers for grease pencil. - New shaders FX. - New material system (replace old palettes and colors). - Split of annotations (old grease pencil) and new grease pencil object. - UI adapted to blender 2.8. You can get more info here: https://code.blender.org/2017/12/drawing-2d-animation-in-blender-2-8/ https://code.blender.org/2018/07/grease-pencil-status-update/ This is the result of nearly two years of development and I want thanks firstly the other members of the grease pencil team: Daniel M. Lara, Matias Mendiola and Joshua Leung for their support, ideas and to keep working in the project all the time, without them this project had been impossible. Also, I want thanks other Blender developers for their help, advices and to be there always to help me, and specially to Clément Foucault, Dalai Felinto, Pablo Vázquez and Campbell Barton. --- release/scripts/startup/bl_ui/properties_scene.py | 35 ++++++++++++++++++++--- 1 file changed, 31 insertions(+), 4 deletions(-) (limited to 'release/scripts/startup/bl_ui/properties_scene.py') diff --git a/release/scripts/startup/bl_ui/properties_scene.py b/release/scripts/startup/bl_ui/properties_scene.py index 38bfc6ad294..91be9bb5d0a 100644 --- a/release/scripts/startup/bl_ui/properties_scene.py +++ b/release/scripts/startup/bl_ui/properties_scene.py @@ -28,9 +28,9 @@ from rna_prop_ui import PropertyPanel from bl_operators.presets import PresetMenu from .properties_physics_common import ( - point_cache_ui, - effector_weights_ui, -) + point_cache_ui, + effector_weights_ui, + ) class SCENE_PT_units_length_presets(PresetMenu): @@ -104,7 +104,6 @@ class SCENE_PT_unit(SceneButtonsPanel, Panel): col.prop(unit, "scale_length") col.prop(unit, "use_separate") - class SceneKeyingSetsPanel: @staticmethod @@ -568,6 +567,33 @@ class SCENE_PT_simplify_render(SceneButtonsPanel, Panel): col.prop(rd, "simplify_child_particles_render", text="Max Child Particles") +class SCENE_PT_simplify_greasepencil(SceneButtonsPanel, Panel): + bl_label = "Simplify Grease Pencil" + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'} + bl_options = {'DEFAULT_CLOSED'} + + def draw_header(self, context): + rd = context.scene.render + self.layout.prop(rd, "simplify_gpencil", text="") + + def draw(self, context): + layout = self.layout + + rd = context.scene.render + + layout.active = rd.simplify_gpencil + + row = layout.row() + row.prop(rd, "simplify_gpencil_onplay", text="Only on Play") + + split = layout.split() + + col = split.column() + col.prop(rd, "simplify_gpencil_view_fill", text="Fill") + col.prop(rd, "simplify_gpencil_remove_lines", text="Remove Fill Lines") + col.prop(rd, "simplify_gpencil_view_modifier", text="Modifiers") + + class SCENE_PT_custom_props(SceneButtonsPanel, PropertyPanel, Panel): COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'} _context_path = "scene" @@ -593,6 +619,7 @@ classes = ( SCENE_PT_simplify, SCENE_PT_simplify_viewport, SCENE_PT_simplify_render, + SCENE_PT_simplify_greasepencil, SCENE_PT_custom_props, ) -- cgit v1.2.3 From c1185f3d0dbbb51dea17cc2ac759776365927738 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 31 Jul 2018 21:06:08 +1000 Subject: Cleanup: pep8, windows line endings --- release/scripts/startup/bl_ui/properties_scene.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'release/scripts/startup/bl_ui/properties_scene.py') diff --git a/release/scripts/startup/bl_ui/properties_scene.py b/release/scripts/startup/bl_ui/properties_scene.py index 91be9bb5d0a..7832a5027d4 100644 --- a/release/scripts/startup/bl_ui/properties_scene.py +++ b/release/scripts/startup/bl_ui/properties_scene.py @@ -28,9 +28,9 @@ from rna_prop_ui import PropertyPanel from bl_operators.presets import PresetMenu from .properties_physics_common import ( - point_cache_ui, - effector_weights_ui, - ) + point_cache_ui, + effector_weights_ui, +) class SCENE_PT_units_length_presets(PresetMenu): @@ -104,6 +104,7 @@ class SCENE_PT_unit(SceneButtonsPanel, Panel): col.prop(unit, "scale_length") col.prop(unit, "use_separate") + class SceneKeyingSetsPanel: @staticmethod -- cgit v1.2.3 From d803b4e43b11bffc819d130c811f0e6f03195d57 Mon Sep 17 00:00:00 2001 From: Pablo Vazquez Date: Tue, 31 Jul 2018 16:14:05 +0200 Subject: UI: Grease Pencil Simplify tweaks Single-column layout and tweaks to tooltips. --- release/scripts/startup/bl_ui/properties_scene.py | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'release/scripts/startup/bl_ui/properties_scene.py') diff --git a/release/scripts/startup/bl_ui/properties_scene.py b/release/scripts/startup/bl_ui/properties_scene.py index 7832a5027d4..e324e7a9882 100644 --- a/release/scripts/startup/bl_ui/properties_scene.py +++ b/release/scripts/startup/bl_ui/properties_scene.py @@ -569,7 +569,8 @@ class SCENE_PT_simplify_render(SceneButtonsPanel, Panel): class SCENE_PT_simplify_greasepencil(SceneButtonsPanel, Panel): - bl_label = "Simplify Grease Pencil" + bl_label = "Grease Pencil" + bl_parent_id = "SCENE_PT_simplify" COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'} bl_options = {'DEFAULT_CLOSED'} @@ -579,21 +580,22 @@ class SCENE_PT_simplify_greasepencil(SceneButtonsPanel, Panel): def draw(self, context): layout = self.layout + layout.use_property_split = True rd = context.scene.render layout.active = rd.simplify_gpencil - row = layout.row() - row.prop(rd, "simplify_gpencil_onplay", text="Only on Play") - - split = layout.split() - - col = split.column() - col.prop(rd, "simplify_gpencil_view_fill", text="Fill") - col.prop(rd, "simplify_gpencil_remove_lines", text="Remove Fill Lines") + col = layout.column() + col.prop(rd, "simplify_gpencil_onplay", text="Playback Only") col.prop(rd, "simplify_gpencil_view_modifier", text="Modifiers") + col = layout.column(align=True) + col.prop(rd, "simplify_gpencil_view_fill") + sub = col.column() + sub.active = rd.simplify_gpencil_view_fill + sub.prop(rd, "simplify_gpencil_remove_lines", text="Lines") + class SCENE_PT_custom_props(SceneButtonsPanel, PropertyPanel, Panel): COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'} -- cgit v1.2.3 From 563e17091daf9d8df236dfe50c6522d0f0933571 Mon Sep 17 00:00:00 2001 From: Antonioya Date: Mon, 6 Aug 2018 17:01:47 +0200 Subject: GP: Add Simplify Shader FX option This option was missing when old VFX modifers were backported as Shader FX. --- release/scripts/startup/bl_ui/properties_scene.py | 1 + 1 file changed, 1 insertion(+) (limited to 'release/scripts/startup/bl_ui/properties_scene.py') diff --git a/release/scripts/startup/bl_ui/properties_scene.py b/release/scripts/startup/bl_ui/properties_scene.py index e324e7a9882..5d87b858da6 100644 --- a/release/scripts/startup/bl_ui/properties_scene.py +++ b/release/scripts/startup/bl_ui/properties_scene.py @@ -589,6 +589,7 @@ class SCENE_PT_simplify_greasepencil(SceneButtonsPanel, Panel): col = layout.column() col.prop(rd, "simplify_gpencil_onplay", text="Playback Only") col.prop(rd, "simplify_gpencil_view_modifier", text="Modifiers") + col.prop(rd, "simplify_gpencil_shader_fx", text="ShaderFX") col = layout.column(align=True) col.prop(rd, "simplify_gpencil_view_fill") -- cgit v1.2.3