Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/properties_scene.py
| Show First 20 Lines • Show All 60 Lines • ▼ Show 20 Lines | class SceneButtonsPanel: | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| return (context.engine in cls.COMPAT_ENGINES) | return (context.engine in cls.COMPAT_ENGINES) | ||||
| class SCENE_PT_scene(SceneButtonsPanel, Panel): | class SCENE_PT_scene(SceneButtonsPanel, Panel): | ||||
| bl_label = "Scene" | bl_label = "Scene" | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL', "BLENDER_LANPR"} | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| layout.use_property_split = True | layout.use_property_split = True | ||||
| scene = context.scene | scene = context.scene | ||||
| layout.prop(scene, "camera") | layout.prop(scene, "camera") | ||||
| layout.prop(scene, "background_set") | layout.prop(scene, "background_set") | ||||
| layout.prop(scene, "active_clip") | layout.prop(scene, "active_clip") | ||||
| class SCENE_PT_unit(SceneButtonsPanel, Panel): | class SCENE_PT_unit(SceneButtonsPanel, Panel): | ||||
| bl_label = "Units" | bl_label = "Units" | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL', "BLENDER_LANPR"} | ||||
| def draw_header_preset(self, context): | def draw_header_preset(self, context): | ||||
| SCENE_PT_units_length_presets.draw_panel_header(self.layout) | SCENE_PT_units_length_presets.draw_panel_header(self.layout) | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| unit = context.scene.unit_settings | unit = context.scene.unit_settings | ||||
| ▲ Show 20 Lines • Show All 65 Lines • ▼ Show 20 Lines | def _draw_keyframing_setting(context, layout, ks, ksp, label, toggle_prop, prop, userpref_fallback=None): | ||||
| subrow.prop(owner, propname, text=label) | subrow.prop(owner, propname, text=label) | ||||
| row.prop(item, toggle_prop, text="", icon='STYLUS_PRESSURE', toggle=True) # XXX: needs dedicated icon | row.prop(item, toggle_prop, text="", icon='STYLUS_PRESSURE', toggle=True) # XXX: needs dedicated icon | ||||
| class SCENE_PT_keying_sets(SceneButtonsPanel, SceneKeyingSetsPanel, Panel): | class SCENE_PT_keying_sets(SceneButtonsPanel, SceneKeyingSetsPanel, Panel): | ||||
| bl_label = "Keying Sets" | bl_label = "Keying Sets" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL', "BLENDER_LANPR"} | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| scene = context.scene | scene = context.scene | ||||
| row = layout.row() | row = layout.row() | ||||
| Show All 17 Lines | def draw(self, context): | ||||
| subcol = flow.column() | subcol = flow.column() | ||||
| subcol.operator_context = 'INVOKE_DEFAULT' | subcol.operator_context = 'INVOKE_DEFAULT' | ||||
| subcol.operator("anim.keying_set_export", text="Export to File").filepath = "keyingset.py" | subcol.operator("anim.keying_set_export", text="Export to File").filepath = "keyingset.py" | ||||
| class SCENE_PT_keyframing_settings(SceneButtonsPanel, SceneKeyingSetsPanel, Panel): | class SCENE_PT_keyframing_settings(SceneButtonsPanel, SceneKeyingSetsPanel, Panel): | ||||
| bl_label = "Keyframing Settings" | bl_label = "Keyframing Settings" | ||||
| bl_parent_id = "SCENE_PT_keying_sets" | bl_parent_id = "SCENE_PT_keying_sets" | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', "BLENDER_LANPR"} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| ks = context.scene.keying_sets.active | ks = context.scene.keying_sets.active | ||||
| return (ks and ks.is_path_absolute) | return (ks and ks.is_path_absolute) | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| Show All 20 Lines | def draw(self, context): | ||||
| col.label(text="Active Set Override") | col.label(text="Active Set Override") | ||||
| self.draw_keyframing_settings(context, col, ks, ksp) | self.draw_keyframing_settings(context, col, ks, ksp) | ||||
| class SCENE_PT_keying_set_paths(SceneButtonsPanel, SceneKeyingSetsPanel, Panel): | class SCENE_PT_keying_set_paths(SceneButtonsPanel, SceneKeyingSetsPanel, Panel): | ||||
| bl_label = "Active Keying Set" | bl_label = "Active Keying Set" | ||||
| bl_parent_id = "SCENE_PT_keying_sets" | bl_parent_id = "SCENE_PT_keying_sets" | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL', "BLENDER_LANPR"} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| ks = context.scene.keying_sets.active | ks = context.scene.keying_sets.active | ||||
| return (ks and ks.is_path_absolute) | return (ks and ks.is_path_absolute) | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| ▲ Show 20 Lines • Show All 46 Lines • ▼ Show 20 Lines | def draw(self, context): | ||||
| col.prop(ksp, "group_method", text="F-Curve Grouping") | col.prop(ksp, "group_method", text="F-Curve Grouping") | ||||
| if ksp.group_method == 'NAMED': | if ksp.group_method == 'NAMED': | ||||
| col.prop(ksp, "group") | col.prop(ksp, "group") | ||||
| class SCENE_PT_color_management(SceneButtonsPanel, Panel): | class SCENE_PT_color_management(SceneButtonsPanel, Panel): | ||||
| bl_label = "Color Management" | bl_label = "Color Management" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL', 'BLENDER_LANPR'} | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| layout.use_property_split = True | layout.use_property_split = True | ||||
| scene = context.scene | scene = context.scene | ||||
| view = scene.view_settings | view = scene.view_settings | ||||
| Show All 15 Lines | def draw(self, context): | ||||
| col.prop(scene.sequencer_colorspace_settings, "name", text="Sequencer") | col.prop(scene.sequencer_colorspace_settings, "name", text="Sequencer") | ||||
| class SCENE_PT_color_management_curves(SceneButtonsPanel, Panel): | class SCENE_PT_color_management_curves(SceneButtonsPanel, Panel): | ||||
| bl_label = "Use Curves" | bl_label = "Use Curves" | ||||
| bl_parent_id = "SCENE_PT_color_management" | bl_parent_id = "SCENE_PT_color_management" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL', 'BLENDER_LANPR'} | ||||
| def draw_header(self, context): | def draw_header(self, context): | ||||
| scene = context.scene | scene = context.scene | ||||
| view = scene.view_settings | view = scene.view_settings | ||||
| self.layout.prop(view, "use_curve_mapping", text="") | self.layout.prop(view, "use_curve_mapping", text="") | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| scene = context.scene | scene = context.scene | ||||
| view = scene.view_settings | view = scene.view_settings | ||||
| layout.use_property_split = False | layout.use_property_split = False | ||||
| layout.enabled = view.use_curve_mapping | layout.enabled = view.use_curve_mapping | ||||
| layout.template_curve_mapping(view, "curve_mapping", levels=True) | layout.template_curve_mapping(view, "curve_mapping", levels=True) | ||||
| class SCENE_PT_audio(SceneButtonsPanel, Panel): | class SCENE_PT_audio(SceneButtonsPanel, Panel): | ||||
| bl_label = "Audio" | bl_label = "Audio" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL', 'BLENDER_LANPR'} | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| layout.use_property_split = True | layout.use_property_split = True | ||||
| scene = context.scene | scene = context.scene | ||||
| rd = context.scene.render | rd = context.scene.render | ||||
| ffmpeg = rd.ffmpeg | ffmpeg = rd.ffmpeg | ||||
| Show All 22 Lines | def draw(self, context): | ||||
| col.separator() | col.separator() | ||||
| layout.operator("sound.bake_animation") | layout.operator("sound.bake_animation") | ||||
| class SCENE_PT_physics(SceneButtonsPanel, Panel): | class SCENE_PT_physics(SceneButtonsPanel, Panel): | ||||
| bl_label = "Gravity" | bl_label = "Gravity" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL', 'BLENDER_LANPR'} | ||||
| def draw_header(self, context): | def draw_header(self, context): | ||||
| self.layout.prop(context.scene, "use_gravity", text="") | self.layout.prop(context.scene, "use_gravity", text="") | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| layout.use_property_split = True | layout.use_property_split = True | ||||
| scene = context.scene | scene = context.scene | ||||
| layout.active = scene.use_gravity | layout.active = scene.use_gravity | ||||
| layout.prop(scene, "gravity") | layout.prop(scene, "gravity") | ||||
| class SCENE_PT_rigid_body_world(SceneButtonsPanel, Panel): | class SCENE_PT_rigid_body_world(SceneButtonsPanel, Panel): | ||||
| bl_label = "Rigid Body World" | bl_label = "Rigid Body World" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL', 'BLENDER_LANPR'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| return (context.engine in cls.COMPAT_ENGINES) | return (context.engine in cls.COMPAT_ENGINES) | ||||
| def draw_header(self, context): | def draw_header(self, context): | ||||
| scene = context.scene | scene = context.scene | ||||
| rbw = scene.rigidbody_world | rbw = scene.rigidbody_world | ||||
| ▲ Show 20 Lines • Show All 51 Lines • ▼ Show 20 Lines | def draw(self, context): | ||||
| col.prop(rbw, "steps_per_second", text="Steps Per Second") | col.prop(rbw, "steps_per_second", text="Steps Per Second") | ||||
| col.prop(rbw, "solver_iterations", text="Solver Iterations") | col.prop(rbw, "solver_iterations", text="Solver Iterations") | ||||
| class SCENE_PT_rigid_body_cache(SceneButtonsPanel, Panel): | class SCENE_PT_rigid_body_cache(SceneButtonsPanel, Panel): | ||||
| bl_label = "Cache" | bl_label = "Cache" | ||||
| bl_parent_id = "SCENE_PT_rigid_body_world" | bl_parent_id = "SCENE_PT_rigid_body_world" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL', 'BLENDER_LANPR'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| scene = context.scene | scene = context.scene | ||||
| return scene and scene.rigidbody_world and (context.engine in cls.COMPAT_ENGINES) | return scene and scene.rigidbody_world and (context.engine in cls.COMPAT_ENGINES) | ||||
| def draw(self, context): | def draw(self, context): | ||||
| scene = context.scene | scene = context.scene | ||||
| rbw = scene.rigidbody_world | rbw = scene.rigidbody_world | ||||
| point_cache_ui(self, context, rbw.point_cache, rbw.point_cache.is_baked is False and rbw.enabled, 'RIGID_BODY') | point_cache_ui(self, context, rbw.point_cache, rbw.point_cache.is_baked is False and rbw.enabled, 'RIGID_BODY') | ||||
| class SCENE_PT_rigid_body_field_weights(SceneButtonsPanel, Panel): | class SCENE_PT_rigid_body_field_weights(SceneButtonsPanel, Panel): | ||||
| bl_label = "Field Weights" | bl_label = "Field Weights" | ||||
| bl_parent_id = "SCENE_PT_rigid_body_world" | bl_parent_id = "SCENE_PT_rigid_body_world" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL', 'BLENDER_LANPR'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| scene = context.scene | scene = context.scene | ||||
| return scene and scene.rigidbody_world and (context.engine in cls.COMPAT_ENGINES) | return scene and scene.rigidbody_world and (context.engine in cls.COMPAT_ENGINES) | ||||
| def draw(self, context): | def draw(self, context): | ||||
| scene = context.scene | scene = context.scene | ||||
| rbw = scene.rigidbody_world | rbw = scene.rigidbody_world | ||||
| effector_weights_ui(self, context, rbw.effector_weights, 'RIGID_BODY') | effector_weights_ui(self, context, rbw.effector_weights, 'RIGID_BODY') | ||||
| class SCENE_PT_simplify(SceneButtonsPanel, Panel): | class SCENE_PT_simplify(SceneButtonsPanel, Panel): | ||||
| bl_label = "Simplify" | bl_label = "Simplify" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL', 'BLENDER_LANPR'} | ||||
| def draw_header(self, context): | def draw_header(self, context): | ||||
| rd = context.scene.render | rd = context.scene.render | ||||
| self.layout.prop(rd, "use_simplify", text="") | self.layout.prop(rd, "use_simplify", text="") | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| class SCENE_PT_simplify_viewport(SceneButtonsPanel, Panel): | class SCENE_PT_simplify_viewport(SceneButtonsPanel, Panel): | ||||
| bl_label = "Viewport" | bl_label = "Viewport" | ||||
| bl_parent_id = "SCENE_PT_simplify" | bl_parent_id = "SCENE_PT_simplify" | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL', 'BLENDER_LANPR'} | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| layout.use_property_split = True | layout.use_property_split = True | ||||
| rd = context.scene.render | rd = context.scene.render | ||||
| layout.active = rd.use_simplify | layout.active = rd.use_simplify | ||||
| flow = layout.grid_flow(row_major=True, columns=0, even_columns=False, even_rows=False, align=True) | flow = layout.grid_flow(row_major=True, columns=0, even_columns=False, even_rows=False, align=True) | ||||
| col = flow.column() | col = flow.column() | ||||
| col.prop(rd, "simplify_subdivision", text="Max Subdivision") | col.prop(rd, "simplify_subdivision", text="Max Subdivision") | ||||
| col = flow.column() | col = flow.column() | ||||
| col.prop(rd, "simplify_child_particles", text="Max Child Particles") | col.prop(rd, "simplify_child_particles", text="Max Child Particles") | ||||
| class SCENE_PT_simplify_render(SceneButtonsPanel, Panel): | class SCENE_PT_simplify_render(SceneButtonsPanel, Panel): | ||||
| bl_label = "Render" | bl_label = "Render" | ||||
| bl_parent_id = "SCENE_PT_simplify" | bl_parent_id = "SCENE_PT_simplify" | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL', 'BLENDER_LANPR'} | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| layout.use_property_split = True | layout.use_property_split = True | ||||
| rd = context.scene.render | rd = context.scene.render | ||||
| layout.active = rd.use_simplify | layout.active = rd.use_simplify | ||||
| Show All 31 Lines | def draw(self, context): | ||||
| col.prop(rd, "simplify_gpencil_shader_fx", text="ShaderFX") | col.prop(rd, "simplify_gpencil_shader_fx", text="ShaderFX") | ||||
| col = layout.column(align=True) | col = layout.column(align=True) | ||||
| col.prop(rd, "simplify_gpencil_view_fill") | col.prop(rd, "simplify_gpencil_view_fill") | ||||
| sub = col.column() | sub = col.column() | ||||
| sub.active = rd.simplify_gpencil_view_fill | sub.active = rd.simplify_gpencil_view_fill | ||||
| sub.prop(rd, "simplify_gpencil_remove_lines", text="Lines") | sub.prop(rd, "simplify_gpencil_remove_lines", text="Lines") | ||||
| class SCENE_PT_viewport_display(SceneButtonsPanel, Panel): | |||||
| bl_label = "Viewport Display" | |||||
| bl_options = {'DEFAULT_CLOSED'} | |||||
| @classmethod | |||||
| def poll(cls, context): | |||||
| return True | |||||
| def draw(self, context): | |||||
| layout = self.layout | |||||
| layout.use_property_split = True | |||||
| scene = context.scene | |||||
| col = layout.column() | |||||
| col.prop(scene.display, "light_direction") | |||||
| col.prop(scene.display, "shadow_shift") | |||||
| class LANPR_linesets(UIList): | |||||
| def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index): | |||||
| lineset = item | |||||
| if self.layout_type in {'DEFAULT', 'COMPACT'}: | |||||
| split = layout.split(percentage=0.6) | |||||
| split.label(text="Layer") | |||||
| row = split.row(align=True) | |||||
| row.prop(lineset, "color", text="", icon_value=icon) | |||||
| row.prop(lineset, "thickness", text="", icon_value=icon) | |||||
| elif self.layout_type == 'GRID': | |||||
| layout.alignment = 'CENTER' | |||||
| layout.label("", icon_value=icon) | |||||
| class SCENE_PT_lanpr(SceneButtonsPanel, Panel): | |||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_LANPR', 'BLENDER_OPENGL'} | |||||
| bl_label = "LANPR" | |||||
| bl_options = {'DEFAULT_CLOSED'} | |||||
| @classmethod | |||||
| def poll(cls, context): | |||||
| return True | |||||
| def draw(self, context): | |||||
| layout = self.layout | |||||
| scene = context.scene | |||||
| lanpr = scene.lanpr | |||||
| active_layer = lanpr.layers.active_layer | |||||
| layout.prop(lanpr, "master_mode", expand=True) | |||||
| if lanpr.master_mode == "DPIX" or lanpr.master_mode == "SOFTWARE": | |||||
| layout.prop(lanpr, "background_color") | |||||
| if lanpr.master_mode == "SOFTWARE": | |||||
| layout.label(text="Enable On Demand:") | |||||
| row = layout.row() | |||||
| row.prop(lanpr,"enable_intersections", text = "Intersection Lines") | |||||
| row.prop(lanpr,"enable_chaining", text = "Chaining (SLOW!)") | |||||
| layout.label(text="RUN:") | |||||
| layout.operator("scene.lanpr_calculate", icon='RENDER_STILL') | |||||
| split = layout.split(percentage=0.7) | |||||
| col = split.column() | |||||
| col.label(text="Layer Composition:") | |||||
| col = split.column() | |||||
| col.operator("scene.lanpr_auto_create_line_layer", text = "Default", icon = "ZOOMIN") | |||||
| layout.template_list("LANPR_linesets", "", lanpr, "layers", lanpr.layers, "active_layer_index", rows=4) | |||||
| if active_layer: | |||||
| split = layout.split() | |||||
| col = split.column() | |||||
| col.operator("scene.lanpr_add_line_layer", icon="ZOOMIN") | |||||
| col.operator("scene.lanpr_delete_line_layer", icon="ZOOMOUT") | |||||
| col = split.column() | |||||
| col.operator("scene.lanpr_move_line_layer", icon="TRIA_UP").direction = "UP" | |||||
| col.operator("scene.lanpr_move_line_layer", icon="TRIA_DOWN").direction = "DOWN" | |||||
| layout.operator("scene.lanpr_rebuild_all_commands") | |||||
| else: | |||||
| layout.operator("scene.lanpr_add_line_layer") | |||||
| elif not lanpr.layers.active_layer: | |||||
| layout.operator("scene.lanpr_add_line_layer") | |||||
| else: | |||||
| layout.label(text="Vectorization:") | |||||
| layout.prop(lanpr, "enable_vector_trace", expand = True) | |||||
| class SCENE_PT_lanpr_line_types(SceneButtonsPanel, Panel): | |||||
| bl_label = "Types" | |||||
| bl_parent_id = "SCENE_PT_lanpr" | |||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_LANPR', 'BLENDER_OPENGL'} | |||||
| @classmethod | |||||
| def poll(cls, context): | |||||
| scene = context.scene | |||||
| lanpr = scene.lanpr | |||||
| active_layer = lanpr.layers.active_layer | |||||
| return active_layer and lanpr.master_mode != "SNAKE" | |||||
| def draw(self, context): | |||||
| layout = self.layout | |||||
| scene = context.scene | |||||
| lanpr = scene.lanpr | |||||
| active_layer = lanpr.layers.active_layer | |||||
| if active_layer and lanpr.master_mode == "DPIX": | |||||
| active_layer = lanpr.layers[0] | |||||
| layout.operator("scene.lanpr_enable_all_line_types") | |||||
| split = layout.split(percentage=0.3) | |||||
| col = split.column() | |||||
| col.prop(active_layer, "enable_contour", text="Contour", toggle=True) | |||||
| col.prop(active_layer, "enable_crease", text="Crease", toggle=True) | |||||
| col.prop(active_layer, "enable_edge_mark", text="Mark", toggle=True) | |||||
| col.prop(active_layer, "enable_material_seperate", text="Material", toggle=True) | |||||
| col.prop(active_layer, "enable_intersection", text="Intersection", toggle=True) | |||||
| col = split.column() | |||||
| row = col.row(align = True) | |||||
| #row.enabled = active_layer.enable_contour this is always enabled now | |||||
| row.prop(active_layer, "color", text="") | |||||
| row.prop(active_layer, "thickness", text="") | |||||
| row = col.row(align = True) | |||||
| row.enabled = active_layer.enable_crease | |||||
| row.prop(active_layer, "crease_color", text="") | |||||
| row.prop(active_layer, "thickness_crease", text="") | |||||
| row = col.row(align = True) | |||||
| row.enabled = active_layer.enable_edge_mark | |||||
| row.prop(active_layer, "edge_mark_color", text="") | |||||
| row.prop(active_layer, "thickness_edge_mark", text="") | |||||
| row = col.row(align = True) | |||||
| row.enabled = active_layer.enable_material_seperate | |||||
| row.prop(active_layer, "material_color", text="") | |||||
| row.prop(active_layer, "thickness_material", text="") | |||||
| row = col.row(align = True) | |||||
| if lanpr.enable_intersections: | |||||
| row.enabled = active_layer.enable_intersection | |||||
| row.prop(active_layer, "intersection_color", text="") | |||||
| row.prop(active_layer, "thickness_intersection", text="") | |||||
| else: | |||||
| row.label(text= "Intersection Calculation Disabled") | |||||
| if lanpr.master_mode == "DPIX" and active_layer.enable_intersection: | |||||
| row = col.row(align = True) | |||||
| row.prop(lanpr,"enable_intersections", toggle = True, text = "Enable") | |||||
| if lanpr.enable_intersections: | |||||
| row.operator("scene.lanpr_calculate", text= "Recalculate") | |||||
| if lanpr.master_mode == "SOFTWARE": | |||||
| row = layout.row(align=True) | |||||
| row.prop(active_layer, "qi_begin") | |||||
| row.prop(active_layer, "qi_end") | |||||
| class SCENE_PT_lanpr_line_components(SceneButtonsPanel, Panel): | |||||
| bl_label = "Including" | |||||
| bl_parent_id = "SCENE_PT_lanpr" | |||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_LANPR', 'BLENDER_OPENGL'} | |||||
| @classmethod | |||||
| def poll(cls, context): | |||||
| scene = context.scene | |||||
| lanpr = scene.lanpr | |||||
| active_layer = lanpr.layers.active_layer | |||||
| return active_layer and lanpr.master_mode == "SOFTWARE" and not lanpr.enable_chaining | |||||
| def draw(self, context): | |||||
| layout = self.layout | |||||
| scene = context.scene | |||||
| lanpr = scene.lanpr | |||||
| active_layer = lanpr.layers.active_layer | |||||
| layout.operator("scene.lanpr_add_line_component", icon = "ZOOMIN") | |||||
| i=0 | |||||
| for c in active_layer.components: | |||||
| split = layout.split(percentage=0.85) | |||||
| col = split.column() | |||||
| sp2 = col.split(percentage=0.4) | |||||
| cl = sp2.column() | |||||
| cl.prop(c,"component_mode", text = "") | |||||
| cl = sp2.column() | |||||
| if c.component_mode == "OBJECT": | |||||
| cl.prop(c,"object_select", text = "") | |||||
| elif c.component_mode == "MATERIAL": | |||||
| cl.prop(c,"material_select", text = "") | |||||
| elif c.component_mode == "COLLECTION": | |||||
| cl.prop(c,"collection_select", text = "") | |||||
| col = split.column() | |||||
| col.operator("scene.lanpr_delete_line_component", text="", icon = "ZOOMOUT").index=i | |||||
| i=i+1 | |||||
| class SCENE_PT_lanpr_line_effects(SceneButtonsPanel, Panel): | |||||
| bl_label = "Effects" | |||||
| bl_parent_id = "SCENE_PT_lanpr" | |||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_LANPR', 'BLENDER_OPENGL'} | |||||
| @classmethod | |||||
| def poll(cls, context): | |||||
| scene = context.scene | |||||
| lanpr = scene.lanpr | |||||
| return lanpr.master_mode == "DPIX" | |||||
| def draw(self, context): | |||||
| layout = self.layout | |||||
| scene = context.scene | |||||
| lanpr = scene.lanpr | |||||
| active_layer = lanpr.layers.active_layer | |||||
| row = layout.row(align = True) | |||||
| row.prop(lanpr, "crease_threshold") | |||||
| row.prop(lanpr, "crease_fade_threshold") | |||||
| row = layout.row(align = True) | |||||
| row.prop(lanpr, "depth_width_influence") | |||||
| row.prop(lanpr, "depth_width_curve") | |||||
| row = layout.row(align = True) | |||||
| row.prop(lanpr, "depth_alpha_influence") | |||||
| row.prop(lanpr, "depth_alpha_curve") | |||||
| class SCENE_PT_lanpr_snake_sobel_parameters(SceneButtonsPanel, Panel): | |||||
| bl_label = "Sobel Parameters" | |||||
| bl_parent_id = "SCENE_PT_lanpr" | |||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_LANPR', 'BLENDER_OPENGL'} | |||||
| @classmethod | |||||
| def poll(cls, context): | |||||
| scene = context.scene | |||||
| lanpr = scene.lanpr | |||||
| return lanpr.master_mode == "SNAKE" | |||||
| def draw(self, context): | |||||
| layout = self.layout | |||||
| scene = context.scene | |||||
| lanpr = scene.lanpr | |||||
| layout.prop(lanpr, "depth_clamp") | |||||
| layout.prop(lanpr, "depth_strength") | |||||
| layout.prop(lanpr, "normal_clamp") | |||||
| layout.prop(lanpr, "normal_strength") | |||||
| if lanpr.enable_vector_trace == "DISABLED": | |||||
| layout.prop(lanpr, "display_thinning_result") | |||||
| class SCENE_PT_lanpr_snake_settings(SceneButtonsPanel, Panel): | |||||
| bl_label = "Snake Settings" | |||||
| bl_parent_id = "SCENE_PT_lanpr" | |||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_LANPR', 'BLENDER_OPENGL'} | |||||
| @classmethod | |||||
| def poll(cls, context): | |||||
| scene = context.scene | |||||
| lanpr = scene.lanpr | |||||
| return lanpr.master_mode == "SNAKE" and lanpr.enable_vector_trace == "ENABLED" | |||||
| def draw(self, context): | |||||
| layout = self.layout | |||||
| scene = context.scene | |||||
| lanpr = scene.lanpr | |||||
| split = layout.split() | |||||
| col = split.column() | |||||
| col.prop(lanpr, "background_color") | |||||
| col = split.column() | |||||
| col.prop(lanpr, "line_color") | |||||
| layout.prop(lanpr, "line_thickness") | |||||
| split = layout.split() | |||||
| col = split.column() | |||||
| col.prop(lanpr, "depth_width_influence") | |||||
| col.prop(lanpr, "depth_alpha_influence") | |||||
| col = split.column() | |||||
| col.prop(lanpr, "depth_width_curve") | |||||
| col.prop(lanpr, "depth_alpha_curve") | |||||
| layout.label(text="Taper:") | |||||
| layout.prop(lanpr, "use_same_taper", expand = True) | |||||
| if lanpr.use_same_taper == "DISABLED": | |||||
| split = layout.split() | |||||
| col = split.column(align = True) | |||||
| col.label(text="Left:") | |||||
| col.prop(lanpr,"taper_left_distance") | |||||
| col.prop(lanpr,"taper_left_strength") | |||||
| col = split.column(align = True) | |||||
| col.label(text="Right:") | |||||
| col.prop(lanpr,"taper_right_distance") | |||||
| col.prop(lanpr,"taper_right_strength") | |||||
| else: | |||||
| split = layout.split() | |||||
| col = split.column(align = True) | |||||
| col.prop(lanpr,"taper_left_distance") | |||||
| col.prop(lanpr,"taper_left_strength") | |||||
| layout.label(text="Tip Extend:") | |||||
| layout.prop(lanpr, "enable_tip_extend", expand = True) | |||||
| if lanpr.enable_tip_extend == "ENABLED": | |||||
| layout.label(text="---INOP---") | |||||
| layout.prop(lanpr,"extend_length") | |||||
| class SCENE_PT_lanpr_software_chain_styles(SceneButtonsPanel, Panel): | |||||
| bl_label = "Chain Styles" | |||||
| bl_parent_id = "SCENE_PT_lanpr" | |||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_LANPR', 'BLENDER_OPENGL'} | |||||
| @classmethod | |||||
| def poll(cls, context): | |||||
| scene = context.scene | |||||
| lanpr = scene.lanpr | |||||
| return lanpr.master_mode == "SOFTWARE" and lanpr.enable_chaining | |||||
| def draw(self, context): | |||||
| layout = self.layout | |||||
| scene = context.scene | |||||
| lanpr = scene.lanpr | |||||
| layout.label(text="Taper:") | |||||
| layout.prop(lanpr, "use_same_taper", expand = True) | |||||
| if lanpr.use_same_taper == "DISABLED": | |||||
| split = layout.split() | |||||
| col = split.column(align = True) | |||||
| col.label(text="Left:") | |||||
| col.prop(lanpr,"taper_left_distance") | |||||
| col.prop(lanpr,"taper_left_strength") | |||||
| col = split.column(align = True) | |||||
| col.label(text="Right:") | |||||
| col.prop(lanpr,"taper_right_distance") | |||||
| col.prop(lanpr,"taper_right_strength") | |||||
| else: | |||||
| split = layout.split() | |||||
| col = split.column(align = True) | |||||
| col.prop(lanpr,"taper_left_distance") | |||||
| col.prop(lanpr,"taper_left_strength") | |||||
| layout.label(text="Tip Extend:") | |||||
| layout.prop(lanpr, "enable_tip_extend", expand = True) | |||||
| if lanpr.enable_tip_extend == "ENABLED": | |||||
| layout.label(text="---INOP---") | |||||
| layout.prop(lanpr,"extend_length") | |||||
| class SCENE_PT_viewport_display_ssao(SceneButtonsPanel, Panel): | |||||
| bl_label = "Screen Space Ambient Occlusion" | |||||
| bl_parent_id = "SCENE_PT_viewport_display" | |||||
| @classmethod | |||||
| def poll(cls, context): | |||||
| return True | |||||
| def draw(self, context): | |||||
| layout = self.layout | |||||
| layout.use_property_split = True | |||||
| scene = context.scene | |||||
| col = layout.column() | |||||
| col.prop(scene.display, "matcap_ssao_samples") | |||||
| col.prop(scene.display, "matcap_ssao_distance") | |||||
| col.prop(scene.display, "matcap_ssao_attenuation") | |||||
| class SCENE_PT_custom_props(SceneButtonsPanel, PropertyPanel, Panel): | class SCENE_PT_custom_props(SceneButtonsPanel, PropertyPanel, Panel): | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL', 'BLENDER_LANPR'} | ||||
| _context_path = "scene" | _context_path = "scene" | ||||
| _property_type = bpy.types.Scene | _property_type = bpy.types.Scene | ||||
| classes = ( | classes = ( | ||||
| SCENE_PT_units_length_presets, | SCENE_PT_units_length_presets, | ||||
| SCENE_UL_keying_set_paths, | SCENE_UL_keying_set_paths, | ||||
| SCENE_PT_scene, | SCENE_PT_scene, | ||||
| SCENE_PT_unit, | SCENE_PT_unit, | ||||
| SCENE_PT_keying_sets, | SCENE_PT_keying_sets, | ||||
| SCENE_PT_keying_set_paths, | SCENE_PT_keying_set_paths, | ||||
| SCENE_PT_keyframing_settings, | SCENE_PT_keyframing_settings, | ||||
| SCENE_PT_color_management, | SCENE_PT_color_management, | ||||
| SCENE_PT_color_management_curves, | SCENE_PT_color_management_curves, | ||||
| SCENE_PT_viewport_display, | |||||
| SCENE_PT_viewport_display_ssao, | |||||
| SCENE_PT_audio, | SCENE_PT_audio, | ||||
| SCENE_PT_physics, | SCENE_PT_physics, | ||||
| SCENE_PT_rigid_body_world, | SCENE_PT_rigid_body_world, | ||||
| SCENE_PT_rigid_body_world_settings, | SCENE_PT_rigid_body_world_settings, | ||||
| SCENE_PT_rigid_body_cache, | SCENE_PT_rigid_body_cache, | ||||
| SCENE_PT_rigid_body_field_weights, | SCENE_PT_rigid_body_field_weights, | ||||
| SCENE_PT_simplify, | SCENE_PT_simplify, | ||||
| SCENE_PT_simplify_viewport, | SCENE_PT_simplify_viewport, | ||||
| SCENE_PT_simplify_render, | SCENE_PT_simplify_render, | ||||
| SCENE_PT_simplify_greasepencil, | SCENE_PT_simplify_greasepencil, | ||||
| SCENE_PT_custom_props, | SCENE_PT_custom_props, | ||||
| SCENE_PT_lanpr, | |||||
| SCENE_PT_lanpr_line_types, | |||||
| SCENE_PT_lanpr_line_components, | |||||
| SCENE_PT_lanpr_line_effects, | |||||
| SCENE_PT_lanpr_snake_sobel_parameters, | |||||
| SCENE_PT_lanpr_snake_settings, | |||||
| SCENE_PT_lanpr_software_chain_styles, | |||||
| LANPR_linesets, | |||||
| ) | ) | ||||
| if __name__ == "__main__": # only for live edit. | if __name__ == "__main__": # only for live edit. | ||||
| from bpy.utils import register_class | from bpy.utils import register_class | ||||
| for cls in classes: | for cls in classes: | ||||
| register_class(cls) | register_class(cls) | ||||