From 3a4c307652e7e58aace0384d7306b28b7626a1d9 Mon Sep 17 00:00:00 2001 From: Mitchell Stokes Date: Mon, 4 Jul 2016 22:05:32 -0700 Subject: Use COMPAT_ENGINES instead of RenderEngine.use_game_engine for panel poll methods This mostly affects physics panels. Any engines relying on RenderEngine.use_game_engine flag to show/hide panels will need to be updated. The COMPAT_ENGINES technique is how we usually deal with this. One issue with use_game_engine is that I cannot find a way to set it; it appears only the BGE can set it. This means (without this commit) external RenderEngines cannot get rid of the default physics panels. The RE_GAME flag (the C flag behind use_game_engine) is pretty hacky and we should look into removing its usage where possible. --- release/scripts/startup/bl_ui/properties_game.py | 2 +- .../startup/bl_ui/properties_physics_cloth.py | 8 ++++++- .../startup/bl_ui/properties_physics_common.py | 3 ++- .../bl_ui/properties_physics_dynamicpaint.py | 27 ++++++++++++++-------- .../startup/bl_ui/properties_physics_field.py | 8 ++++--- .../startup/bl_ui/properties_physics_fluid.py | 12 ++++++---- .../startup/bl_ui/properties_physics_rigidbody.py | 9 +++++--- .../properties_physics_rigidbody_constraint.py | 3 ++- .../startup/bl_ui/properties_physics_smoke.py | 18 +++++++++++---- .../startup/bl_ui/properties_physics_softbody.py | 9 +++++++- release/scripts/startup/bl_ui/properties_world.py | 4 ++-- 11 files changed, 72 insertions(+), 31 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_game.py b/release/scripts/startup/bl_ui/properties_game.py index 300be708049..386ad254892 100644 --- a/release/scripts/startup/bl_ui/properties_game.py +++ b/release/scripts/startup/bl_ui/properties_game.py @@ -568,7 +568,7 @@ class WORLD_PT_game_context_world(WorldButtonsPanel, Panel): @classmethod def poll(cls, context): rd = context.scene.render - return (context.scene) and (rd.use_game_engine) + return (context.scene) and (rd.engine in cls.COMPAT_ENGINES) def draw(self, context): layout = self.layout diff --git a/release/scripts/startup/bl_ui/properties_physics_cloth.py b/release/scripts/startup/bl_ui/properties_physics_cloth.py index a5cbffb2e2c..2f1798ebd54 100644 --- a/release/scripts/startup/bl_ui/properties_physics_cloth.py +++ b/release/scripts/startup/bl_ui/properties_physics_cloth.py @@ -46,11 +46,12 @@ class PhysicButtonsPanel: def poll(cls, context): ob = context.object rd = context.scene.render - return (ob and ob.type == 'MESH') and (not rd.use_game_engine) and (context.cloth) + return (ob and ob.type == 'MESH') and (rd.engine in cls.COMPAT_ENGINES) and (context.cloth) class PHYSICS_PT_cloth(PhysicButtonsPanel, Panel): bl_label = "Cloth" + COMPAT_ENGINES = {'BLENDER_RENDER'} def draw(self, context): layout = self.layout @@ -113,6 +114,7 @@ class PHYSICS_PT_cloth(PhysicButtonsPanel, Panel): class PHYSICS_PT_cloth_cache(PhysicButtonsPanel, Panel): bl_label = "Cloth Cache" bl_options = {'DEFAULT_CLOSED'} + COMPAT_ENGINES = {'BLENDER_RENDER'} def draw(self, context): md = context.cloth @@ -122,6 +124,7 @@ class PHYSICS_PT_cloth_cache(PhysicButtonsPanel, Panel): class PHYSICS_PT_cloth_collision(PhysicButtonsPanel, Panel): bl_label = "Cloth Collision" bl_options = {'DEFAULT_CLOSED'} + COMPAT_ENGINES = {'BLENDER_RENDER'} def draw_header(self, context): cloth = context.cloth.collision_settings @@ -161,6 +164,7 @@ class PHYSICS_PT_cloth_collision(PhysicButtonsPanel, Panel): class PHYSICS_PT_cloth_stiffness(PhysicButtonsPanel, Panel): bl_label = "Cloth Stiffness Scaling" bl_options = {'DEFAULT_CLOSED'} + COMPAT_ENGINES = {'BLENDER_RENDER'} def draw_header(self, context): cloth = context.cloth.settings @@ -193,6 +197,7 @@ class PHYSICS_PT_cloth_stiffness(PhysicButtonsPanel, Panel): class PHYSICS_PT_cloth_sewing(PhysicButtonsPanel, Panel): bl_label = "Cloth Sewing Springs" bl_options = {'DEFAULT_CLOSED'} + COMPAT_ENGINES = {'BLENDER_RENDER'} def draw_header(self, context): cloth = context.cloth.settings @@ -226,6 +231,7 @@ class PHYSICS_PT_cloth_sewing(PhysicButtonsPanel, Panel): class PHYSICS_PT_cloth_field_weights(PhysicButtonsPanel, Panel): bl_label = "Cloth Field Weights" bl_options = {'DEFAULT_CLOSED'} + COMPAT_ENGINES = {'BLENDER_RENDER'} def draw(self, context): cloth = context.cloth.settings diff --git a/release/scripts/startup/bl_ui/properties_physics_common.py b/release/scripts/startup/bl_ui/properties_physics_common.py index 82eecf0fb5a..277b59d187d 100644 --- a/release/scripts/startup/bl_ui/properties_physics_common.py +++ b/release/scripts/startup/bl_ui/properties_physics_common.py @@ -31,7 +31,7 @@ class PhysicButtonsPanel: @classmethod def poll(cls, context): rd = context.scene.render - return (context.object) and (not rd.use_game_engine) + return (context.object) and rd.engine in cls.COMPAT_ENGINES def physics_add(self, layout, md, name, type, typeicon, toggles): @@ -57,6 +57,7 @@ def physics_add_special(self, layout, data, name, addop, removeop, typeicon): class PHYSICS_PT_add(PhysicButtonsPanel, Panel): bl_label = "" bl_options = {'HIDE_HEADER'} + COMPAT_ENGINES = {'BLENDER_RENDER'} def draw(self, context): obj = context.object diff --git a/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py b/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py index 269ffa6d371..6c3a3246cf6 100644 --- a/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py +++ b/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py @@ -56,11 +56,12 @@ class PhysicButtonsPanel: def poll(cls, context): ob = context.object rd = context.scene.render - return (ob and ob.type == 'MESH') and (not rd.use_game_engine) and context.dynamic_paint + return (ob and ob.type == 'MESH') and rd.engine in cls.COMPAT_ENGINES and context.dynamic_paint class PHYSICS_PT_dynamic_paint(PhysicButtonsPanel, Panel): bl_label = "Dynamic Paint" + COMPAT_ENGINES = {'BLENDER_RENDER'} def draw(self, context): layout = self.layout @@ -137,12 +138,13 @@ class PHYSICS_PT_dynamic_paint(PhysicButtonsPanel, Panel): class PHYSICS_PT_dp_advanced_canvas(PhysicButtonsPanel, Panel): bl_label = "Dynamic Paint Advanced" + COMPAT_ENGINES = {'BLENDER_RENDER'} @classmethod def poll(cls, context): md = context.dynamic_paint rd = context.scene.render - return md and md.ui_type == 'CANVAS' and md.canvas_settings and md.canvas_settings.canvas_surfaces.active and (not rd.use_game_engine) + return md and md.ui_type == 'CANVAS' and md.canvas_settings and md.canvas_settings.canvas_surfaces.active and rd.engine in cls.COMPAT_ENGINES def draw(self, context): layout = self.layout @@ -213,6 +215,7 @@ class PHYSICS_PT_dp_advanced_canvas(PhysicButtonsPanel, Panel): class PHYSICS_PT_dp_canvas_output(PhysicButtonsPanel, Panel): bl_label = "Dynamic Paint Output" bl_options = {'DEFAULT_CLOSED'} + COMPAT_ENGINES = {'BLENDER_RENDER'} @classmethod def poll(cls, context): @@ -223,7 +226,7 @@ class PHYSICS_PT_dp_canvas_output(PhysicButtonsPanel, Panel): surface = context.dynamic_paint.canvas_settings.canvas_surfaces.active return (surface and (not (surface.surface_format == 'VERTEX' and (surface.surface_type in {'DISPLACE', 'WAVE'}))) and - (not rd.use_game_engine)) + (rd.engine in cls.COMPAT_ENGINES)) def draw(self, context): layout = self.layout @@ -306,6 +309,7 @@ class PHYSICS_PT_dp_canvas_output(PhysicButtonsPanel, Panel): class PHYSICS_PT_dp_canvas_initial_color(PhysicButtonsPanel, Panel): bl_label = "Dynamic Paint Initial Color" bl_options = {'DEFAULT_CLOSED'} + COMPAT_ENGINES = {'BLENDER_RENDER'} @classmethod def poll(cls, context): @@ -314,7 +318,7 @@ class PHYSICS_PT_dp_canvas_initial_color(PhysicButtonsPanel, Panel): if not (md and md.ui_type == 'CANVAS' and md.canvas_settings): return 0 surface = context.dynamic_paint.canvas_settings.canvas_surfaces.active - return (surface and surface.surface_type == 'PAINT') and (not rd.use_game_engine) + return (surface and surface.surface_type == 'PAINT') and (rd.engine in cls.COMPAT_ENGINES) def draw(self, context): layout = self.layout @@ -342,6 +346,7 @@ class PHYSICS_PT_dp_canvas_initial_color(PhysicButtonsPanel, Panel): class PHYSICS_PT_dp_effects(PhysicButtonsPanel, Panel): bl_label = "Dynamic Paint Effects" bl_options = {'DEFAULT_CLOSED'} + COMPAT_ENGINES = {'BLENDER_RENDER'} @classmethod def poll(cls, context): @@ -350,7 +355,7 @@ class PHYSICS_PT_dp_effects(PhysicButtonsPanel, Panel): if not (md and md.ui_type == 'CANVAS' and md.canvas_settings): return False surface = context.dynamic_paint.canvas_settings.canvas_surfaces.active - return (surface and surface.surface_type == 'PAINT') and (not rd.use_game_engine) + return (surface and surface.surface_type == 'PAINT') and (rd.engine in cls.COMPAT_ENGINES) def draw(self, context): layout = self.layout @@ -391,6 +396,7 @@ class PHYSICS_PT_dp_effects(PhysicButtonsPanel, Panel): class PHYSICS_PT_dp_cache(PhysicButtonsPanel, Panel): bl_label = "Dynamic Paint Cache" bl_options = {'DEFAULT_CLOSED'} + COMPAT_ENGINES = {'BLENDER_RENDER'} @classmethod def poll(cls, context): @@ -401,7 +407,7 @@ class PHYSICS_PT_dp_cache(PhysicButtonsPanel, Panel): md.canvas_settings and md.canvas_settings.canvas_surfaces.active and md.canvas_settings.canvas_surfaces.active.is_cache_user and - (not rd.use_game_engine)) + (rd.engine in cls.COMPAT_ENGINES)) def draw(self, context): surface = context.dynamic_paint.canvas_settings.canvas_surfaces.active @@ -412,12 +418,13 @@ class PHYSICS_PT_dp_cache(PhysicButtonsPanel, Panel): class PHYSICS_PT_dp_brush_source(PhysicButtonsPanel, Panel): bl_label = "Dynamic Paint Source" + COMPAT_ENGINES = {'BLENDER_RENDER'} @classmethod def poll(cls, context): md = context.dynamic_paint rd = context.scene.render - return md and md.ui_type == 'BRUSH' and md.brush_settings and (not rd.use_game_engine) + return md and md.ui_type == 'BRUSH' and md.brush_settings and (rd.engine in cls.COMPAT_ENGINES) def draw(self, context): layout = self.layout @@ -465,12 +472,13 @@ class PHYSICS_PT_dp_brush_source(PhysicButtonsPanel, Panel): class PHYSICS_PT_dp_brush_velocity(PhysicButtonsPanel, Panel): bl_label = "Dynamic Paint Velocity" bl_options = {'DEFAULT_CLOSED'} + COMPAT_ENGINES = {'BLENDER_RENDER'} @classmethod def poll(cls, context): md = context.dynamic_paint rd = context.scene.render - return md and md.ui_type == 'BRUSH' and md.brush_settings and (not rd.use_game_engine) + return md and md.ui_type == 'BRUSH' and md.brush_settings and (rd.engine in cls.COMPAT_ENGINES) def draw(self, context): layout = self.layout @@ -501,12 +509,13 @@ class PHYSICS_PT_dp_brush_velocity(PhysicButtonsPanel, Panel): class PHYSICS_PT_dp_brush_wave(PhysicButtonsPanel, Panel): bl_label = "Dynamic Paint Waves" bl_options = {'DEFAULT_CLOSED'} + COMPAT_ENGINES = {'BLENDER_RENDER'} @classmethod def poll(cls, context): md = context.dynamic_paint rd = context.scene.render - return md and md.ui_type == 'BRUSH' and md.brush_settings and (not rd.use_game_engine) + return md and md.ui_type == 'BRUSH' and md.brush_settings and (rd.engine in cls.COMPAT_ENGINES) def draw(self, context): layout = self.layout diff --git a/release/scripts/startup/bl_ui/properties_physics_field.py b/release/scripts/startup/bl_ui/properties_physics_field.py index 348f66da145..1cebc0496b0 100644 --- a/release/scripts/startup/bl_ui/properties_physics_field.py +++ b/release/scripts/startup/bl_ui/properties_physics_field.py @@ -34,17 +34,18 @@ class PhysicButtonsPanel: @classmethod def poll(cls, context): rd = context.scene.render - return (context.object) and (not rd.use_game_engine) + return (context.object) and (rd.engine in cls.COMPAT_ENGINES) class PHYSICS_PT_field(PhysicButtonsPanel, Panel): bl_label = "Force Fields" + COMPAT_ENGINES = {'BLENDER_RENDER'} @classmethod def poll(cls, context): ob = context.object rd = context.scene.render - return (not rd.use_game_engine) and (ob.field) and (ob.field.type != 'NONE') + return (rd.engine in cls.COMPAT_ENGINES) and (ob.field) and (ob.field.type != 'NONE') def draw(self, context): layout = self.layout @@ -176,12 +177,13 @@ class PHYSICS_PT_field(PhysicButtonsPanel, Panel): class PHYSICS_PT_collision(PhysicButtonsPanel, Panel): bl_label = "Collision" + COMPAT_ENGINES = {'BLENDER_RENDER'} @classmethod def poll(cls, context): ob = context.object rd = context.scene.render - return (ob and ob.type == 'MESH') and (not rd.use_game_engine) and (context.collision) + return (ob and ob.type == 'MESH') and (rd.engine in cls.COMPAT_ENGINES) and (context.collision) def draw(self, context): layout = self.layout diff --git a/release/scripts/startup/bl_ui/properties_physics_fluid.py b/release/scripts/startup/bl_ui/properties_physics_fluid.py index d6fd8f3792c..5d7034c2e68 100644 --- a/release/scripts/startup/bl_ui/properties_physics_fluid.py +++ b/release/scripts/startup/bl_ui/properties_physics_fluid.py @@ -38,11 +38,12 @@ class PhysicButtonsPanel: def poll(cls, context): ob = context.object rd = context.scene.render - return (ob and ob.type == 'MESH') and (not rd.use_game_engine) and (context.fluid) + return (ob and ob.type == 'MESH') and rd.engine in cls.COMPAT_ENGINES and (context.fluid) class PHYSICS_PT_fluid(PhysicButtonsPanel, Panel): bl_label = "Fluid" + COMPAT_ENGINES = {'BLENDER_RENDER'} def draw(self, context): layout = self.layout @@ -205,12 +206,13 @@ class PHYSICS_PT_fluid(PhysicButtonsPanel, Panel): class PHYSICS_PT_domain_gravity(PhysicButtonsPanel, Panel): bl_label = "Fluid World" bl_options = {'DEFAULT_CLOSED'} + COMPAT_ENGINES = {'BLENDER_RENDER'} @classmethod def poll(cls, context): md = context.fluid rd = context.scene.render - return md and md.settings and (md.settings.type == 'DOMAIN') and (not rd.use_game_engine) + return md and md.settings and (md.settings.type == 'DOMAIN') and rd.engine in cls.COMPAT_ENGINES def draw(self, context): layout = self.layout @@ -258,12 +260,13 @@ class PHYSICS_PT_domain_gravity(PhysicButtonsPanel, Panel): class PHYSICS_PT_domain_boundary(PhysicButtonsPanel, Panel): bl_label = "Fluid Boundary" bl_options = {'DEFAULT_CLOSED'} + COMPAT_ENGINES = {'BLENDER_RENDER'} @classmethod def poll(cls, context): md = context.fluid rd = context.scene.render - return md and md.settings and (md.settings.type == 'DOMAIN') and (not rd.use_game_engine) + return md and md.settings and (md.settings.type == 'DOMAIN') and rd.engine in cls.COMPAT_ENGINES def draw(self, context): layout = self.layout @@ -288,12 +291,13 @@ class PHYSICS_PT_domain_boundary(PhysicButtonsPanel, Panel): class PHYSICS_PT_domain_particles(PhysicButtonsPanel, Panel): bl_label = "Fluid Particles" bl_options = {'DEFAULT_CLOSED'} + COMPAT_ENGINES = {'BLENDER_RENDER'} @classmethod def poll(cls, context): md = context.fluid rd = context.scene.render - return md and md.settings and (md.settings.type == 'DOMAIN') and (not rd.use_game_engine) + return md and md.settings and (md.settings.type == 'DOMAIN') and rd.engine in cls.COMPAT_ENGINES def draw(self, context): layout = self.layout diff --git a/release/scripts/startup/bl_ui/properties_physics_rigidbody.py b/release/scripts/startup/bl_ui/properties_physics_rigidbody.py index e7225d73e41..eeb21c046bf 100644 --- a/release/scripts/startup/bl_ui/properties_physics_rigidbody.py +++ b/release/scripts/startup/bl_ui/properties_physics_rigidbody.py @@ -29,12 +29,13 @@ class PHYSICS_PT_rigidbody_panel: class PHYSICS_PT_rigid_body(PHYSICS_PT_rigidbody_panel, Panel): bl_label = "Rigid Body" + COMPAT_ENGINES = {'BLENDER_RENDER'} @classmethod def poll(cls, context): obj = context.object return (obj and obj.rigid_body and - (not context.scene.render.use_game_engine)) + (context.scene.render.engine in cls.COMPAT_ENGINES)) def draw(self, context): layout = self.layout @@ -55,12 +56,13 @@ class PHYSICS_PT_rigid_body(PHYSICS_PT_rigidbody_panel, Panel): class PHYSICS_PT_rigid_body_collisions(PHYSICS_PT_rigidbody_panel, Panel): bl_label = "Rigid Body Collisions" + COMPAT_ENGINES = {'BLENDER_RENDER'} @classmethod def poll(cls, context): obj = context.object return (obj and obj.rigid_body and - (not context.scene.render.use_game_engine)) + (context.scene.render.engine in cls.COMPAT_ENGINES)) def draw(self, context): layout = self.layout @@ -99,13 +101,14 @@ class PHYSICS_PT_rigid_body_collisions(PHYSICS_PT_rigidbody_panel, Panel): class PHYSICS_PT_rigid_body_dynamics(PHYSICS_PT_rigidbody_panel, Panel): bl_label = "Rigid Body Dynamics" bl_default_closed = True + COMPAT_ENGINES = {'BLENDER_RENDER'} @classmethod def poll(cls, context): obj = context.object return (obj and obj.rigid_body and obj.rigid_body.type == 'ACTIVE' and - (not context.scene.render.use_game_engine)) + (context.scene.render.engine in cls.COMPAT_ENGINES)) def draw(self, context): layout = self.layout diff --git a/release/scripts/startup/bl_ui/properties_physics_rigidbody_constraint.py b/release/scripts/startup/bl_ui/properties_physics_rigidbody_constraint.py index 3f5e0f1fc9b..38c97746f4a 100644 --- a/release/scripts/startup/bl_ui/properties_physics_rigidbody_constraint.py +++ b/release/scripts/startup/bl_ui/properties_physics_rigidbody_constraint.py @@ -29,12 +29,13 @@ class PHYSICS_PT_rigidbody_constraint_panel: class PHYSICS_PT_rigid_body_constraint(PHYSICS_PT_rigidbody_constraint_panel, Panel): bl_label = "Rigid Body Constraint" + COMPAT_ENGINES = {'BLENDER_RENDER'} @classmethod def poll(cls, context): ob = context.object rd = context.scene.render - return (ob and ob.rigid_body_constraint and (not rd.use_game_engine)) + return (ob and ob.rigid_body_constraint and rd.engine in cls.COMPAT_ENGINES) def draw(self, context): layout = self.layout diff --git a/release/scripts/startup/bl_ui/properties_physics_smoke.py b/release/scripts/startup/bl_ui/properties_physics_smoke.py index ef7d25e0a42..99aa54a958a 100644 --- a/release/scripts/startup/bl_ui/properties_physics_smoke.py +++ b/release/scripts/startup/bl_ui/properties_physics_smoke.py @@ -35,11 +35,12 @@ class PhysicButtonsPanel: def poll(cls, context): ob = context.object rd = context.scene.render - return (ob and ob.type == 'MESH') and (not rd.use_game_engine) and (context.smoke) + return (ob and ob.type == 'MESH') and (rd.engine in cls.COMPAT_ENGINES) and (context.smoke) class PHYSICS_PT_smoke(PhysicButtonsPanel, Panel): bl_label = "Smoke" + COMPAT_ENGINES = {'BLENDER_RENDER'} def draw(self, context): layout = self.layout @@ -131,6 +132,7 @@ class PHYSICS_PT_smoke(PhysicButtonsPanel, Panel): class PHYSICS_PT_smoke_flow_advanced(PhysicButtonsPanel, Panel): bl_label = "Smoke Flow Advanced" bl_options = {'DEFAULT_CLOSED'} + COMPAT_ENGINES = {'BLENDER_RENDER'} @classmethod def poll(cls, context): @@ -165,6 +167,7 @@ class PHYSICS_PT_smoke_flow_advanced(PhysicButtonsPanel, Panel): class PHYSICS_PT_smoke_fire(PhysicButtonsPanel, Panel): bl_label = "Smoke Flames" bl_options = {'DEFAULT_CLOSED'} + COMPAT_ENGINES = {'BLENDER_RENDER'} @classmethod def poll(cls, context): @@ -194,6 +197,7 @@ class PHYSICS_PT_smoke_fire(PhysicButtonsPanel, Panel): class PHYSICS_PT_smoke_adaptive_domain(PhysicButtonsPanel, Panel): bl_label = "Smoke Adaptive Domain" bl_options = {'DEFAULT_CLOSED'} + COMPAT_ENGINES = {'BLENDER_RENDER'} @classmethod def poll(cls, context): @@ -227,12 +231,13 @@ class PHYSICS_PT_smoke_adaptive_domain(PhysicButtonsPanel, Panel): class PHYSICS_PT_smoke_highres(PhysicButtonsPanel, Panel): bl_label = "Smoke High Resolution" bl_options = {'DEFAULT_CLOSED'} + COMPAT_ENGINES = {'BLENDER_RENDER'} @classmethod def poll(cls, context): md = context.smoke rd = context.scene.render - return md and (md.smoke_type == 'DOMAIN') and (not rd.use_game_engine) + return md and (md.smoke_type == 'DOMAIN') and (rd.engine in cls.COMPAT_ENGINES) def draw_header(self, context): md = context.smoke.domain_settings @@ -266,12 +271,13 @@ class PHYSICS_PT_smoke_highres(PhysicButtonsPanel, Panel): class PHYSICS_PT_smoke_groups(PhysicButtonsPanel, Panel): bl_label = "Smoke Groups" bl_options = {'DEFAULT_CLOSED'} + COMPAT_ENGINES = {'BLENDER_RENDER'} @classmethod def poll(cls, context): md = context.smoke rd = context.scene.render - return md and (md.smoke_type == 'DOMAIN') and (not rd.use_game_engine) + return md and (md.smoke_type == 'DOMAIN') and (rd.engine in cls.COMPAT_ENGINES) def draw(self, context): layout = self.layout @@ -294,12 +300,13 @@ class PHYSICS_PT_smoke_groups(PhysicButtonsPanel, Panel): class PHYSICS_PT_smoke_cache(PhysicButtonsPanel, Panel): bl_label = "Smoke Cache" bl_options = {'DEFAULT_CLOSED'} + COMPAT_ENGINES = {'BLENDER_RENDER'} @classmethod def poll(cls, context): md = context.smoke rd = context.scene.render - return md and (md.smoke_type == 'DOMAIN') and (not rd.use_game_engine) + return md and (md.smoke_type == 'DOMAIN') and (rd.engine in cls.COMPAT_ENGINES) def draw(self, context): layout = self.layout @@ -330,12 +337,13 @@ class PHYSICS_PT_smoke_cache(PhysicButtonsPanel, Panel): class PHYSICS_PT_smoke_field_weights(PhysicButtonsPanel, Panel): bl_label = "Smoke Field Weights" bl_options = {'DEFAULT_CLOSED'} + COMPAT_ENGINES = {'BLENDER_RENDER'} @classmethod def poll(cls, context): md = context.smoke rd = context.scene.render - return md and (md.smoke_type == 'DOMAIN') and (not rd.use_game_engine) + return md and (md.smoke_type == 'DOMAIN') and (rd.engine in cls.COMPAT_ENGINES) def draw(self, context): domain = context.smoke.domain_settings diff --git a/release/scripts/startup/bl_ui/properties_physics_softbody.py b/release/scripts/startup/bl_ui/properties_physics_softbody.py index e74cac3d06b..c96f455a105 100644 --- a/release/scripts/startup/bl_ui/properties_physics_softbody.py +++ b/release/scripts/startup/bl_ui/properties_physics_softbody.py @@ -39,11 +39,12 @@ class PhysicButtonsPanel: def poll(cls, context): ob = context.object rd = context.scene.render - return (ob and (ob.type == 'MESH' or ob.type == 'LATTICE'or ob.type == 'CURVE')) and (not rd.use_game_engine) and (context.soft_body) + return (ob and (ob.type == 'MESH' or ob.type == 'LATTICE'or ob.type == 'CURVE')) and (rd.engine in cls.COMPAT_ENGINES) and (context.soft_body) class PHYSICS_PT_softbody(PhysicButtonsPanel, Panel): bl_label = "Soft Body" + COMPAT_ENGINES = {'BLENDER_RENDER'} def draw(self, context): layout = self.layout @@ -71,6 +72,7 @@ class PHYSICS_PT_softbody(PhysicButtonsPanel, Panel): class PHYSICS_PT_softbody_cache(PhysicButtonsPanel, Panel): bl_label = "Soft Body Cache" bl_options = {'DEFAULT_CLOSED'} + COMPAT_ENGINES = {'BLENDER_RENDER'} def draw(self, context): md = context.soft_body @@ -80,6 +82,7 @@ class PHYSICS_PT_softbody_cache(PhysicButtonsPanel, Panel): class PHYSICS_PT_softbody_goal(PhysicButtonsPanel, Panel): bl_label = "Soft Body Goal" bl_options = {'DEFAULT_CLOSED'} + COMPAT_ENGINES = {'BLENDER_RENDER'} def draw_header(self, context): softbody = context.soft_body.settings @@ -119,6 +122,7 @@ class PHYSICS_PT_softbody_goal(PhysicButtonsPanel, Panel): class PHYSICS_PT_softbody_edge(PhysicButtonsPanel, Panel): bl_label = "Soft Body Edges" bl_options = {'DEFAULT_CLOSED'} + COMPAT_ENGINES = {'BLENDER_RENDER'} def draw_header(self, context): softbody = context.soft_body.settings @@ -168,6 +172,7 @@ class PHYSICS_PT_softbody_edge(PhysicButtonsPanel, Panel): class PHYSICS_PT_softbody_collision(PhysicButtonsPanel, Panel): bl_label = "Soft Body Self Collision" bl_options = {'DEFAULT_CLOSED'} + COMPAT_ENGINES = {'BLENDER_RENDER'} def draw_header(self, context): softbody = context.soft_body.settings @@ -196,6 +201,7 @@ class PHYSICS_PT_softbody_collision(PhysicButtonsPanel, Panel): class PHYSICS_PT_softbody_solver(PhysicButtonsPanel, Panel): bl_label = "Soft Body Solver" bl_options = {'DEFAULT_CLOSED'} + COMPAT_ENGINES = {'BLENDER_RENDER'} def draw(self, context): layout = self.layout @@ -228,6 +234,7 @@ class PHYSICS_PT_softbody_solver(PhysicButtonsPanel, Panel): class PHYSICS_PT_softbody_field_weights(PhysicButtonsPanel, Panel): bl_label = "Soft Body Field Weights" bl_options = {'DEFAULT_CLOSED'} + COMPAT_ENGINES = {'BLENDER_RENDER'} def draw(self, context): md = context.soft_body diff --git a/release/scripts/startup/bl_ui/properties_world.py b/release/scripts/startup/bl_ui/properties_world.py index 2c8a6fac967..e07349a99ee 100644 --- a/release/scripts/startup/bl_ui/properties_world.py +++ b/release/scripts/startup/bl_ui/properties_world.py @@ -41,7 +41,7 @@ class WORLD_PT_context_world(WorldButtonsPanel, Panel): @classmethod def poll(cls, context): rd = context.scene.render - return (not rd.use_game_engine) and (rd.engine in cls.COMPAT_ENGINES) + return rd.engine in cls.COMPAT_ENGINES def draw(self, context): layout = self.layout @@ -69,7 +69,7 @@ class WORLD_PT_preview(WorldButtonsPanel, Panel): @classmethod def poll(cls, context): rd = context.scene.render - return (context.world) and (not rd.use_game_engine) and (rd.engine in cls.COMPAT_ENGINES) + return (context.world) and (rd.engine in cls.COMPAT_ENGINES) def draw(self, context): self.layout.template_preview(context.world) -- cgit v1.2.3 From 66e2e2484c09d35d6fe9a6282c9722c4039ec25f Mon Sep 17 00:00:00 2001 From: Mai Lavelle Date: Sat, 16 Jul 2016 19:56:45 -0400 Subject: Cycles microdisplacement: move subdivision options to subsurf modifier Subdivision options can now be found in the subsurf modifier. The modifier must be the last in the stack or the options will be unavailable. Catmull-Clark subdivision is still unavailable and will fallback to linear subdivision instead Reviewed By: brecht Differential Revision: https://developer.blender.org/D2109 --- .../scripts/startup/bl_ui/properties_data_modifier.py | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index c6bb6ccf05f..6f53ae6e118 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -879,9 +879,21 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): split = layout.split() col = split.column() - col.label(text="Subdivisions:") - col.prop(md, "levels", text="View") - col.prop(md, "render_levels", text="Render") + + engine = bpy.context.scene.render.engine + if engine == "CYCLES" and md == ob.modifiers[-1] and bpy.context.scene.cycles.feature_set == "EXPERIMENTAL": + col.label(text="Preview:") + col.prop(md, "levels", text="Levels") + col.label(text="Render:") + col.prop(ob.cycles, "use_adaptive_subdivision", text="Adaptive") + if ob.cycles.use_adaptive_subdivision: + col.prop(ob.cycles, "dicing_rate") + else: + col.prop(md, "render_levels", text="Levels") + else: + col.label(text="Subdivisions:") + col.prop(md, "levels", text="View") + col.prop(md, "render_levels", text="Render") col = split.column() col.label(text="Options:") -- cgit v1.2.3 From ca93ebee7fe49c9b89b748e404b22b87c8eb2de0 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 30 Jul 2016 14:44:28 +1000 Subject: Cloth: UI cleanup & quality hard limit removal D2121 by @LucaRood --- .../startup/bl_ui/properties_physics_cloth.py | 37 ++++++++++++++-------- 1 file changed, 24 insertions(+), 13 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_physics_cloth.py b/release/scripts/startup/bl_ui/properties_physics_cloth.py index 2f1798ebd54..37a0390b11d 100644 --- a/release/scripts/startup/bl_ui/properties_physics_cloth.py +++ b/release/scripts/startup/bl_ui/properties_physics_cloth.py @@ -60,20 +60,24 @@ class PHYSICS_PT_cloth(PhysicButtonsPanel, Panel): ob = context.object cloth = md.settings - split = layout.split() - - split.active = cloth_panel_enabled(md) + layout.active = cloth_panel_enabled(md) - col = split.column() + split = layout.split(percentage=0.25) - col.label(text="Presets:") - sub = col.row(align=True) + split.label(text="Presets:") + sub = split.row(align=True) sub.menu("CLOTH_MT_presets", text=bpy.types.CLOTH_MT_presets.bl_label) sub.operator("cloth.preset_add", text="", icon='ZOOMIN') sub.operator("cloth.preset_add", text="", icon='ZOOMOUT').remove_active = True - col.label(text="Quality:") - col.prop(cloth, "quality", text="Steps", slider=True) + split = layout.split(percentage=0.25) + + split.label(text="Quality:") + split.prop(cloth, "quality", text="Steps") + + split = layout.split() + + col = split.column() col.label(text="Material:") col.prop(cloth, "mass") @@ -87,7 +91,11 @@ class PHYSICS_PT_cloth(PhysicButtonsPanel, Panel): col.prop(cloth, "air_damping", text="Air") col.prop(cloth, "vel_damping", text="Velocity") - col.prop(cloth, "use_pin_cloth", text="Pinning") + split = layout.split() + + col = split.column() + + col.prop(cloth, "use_pin_cloth", text="Pinning:") sub = col.column() sub.active = cloth.use_pin_cloth sub.prop_search(cloth, "vertex_group_mass", ob, "vertex_groups", text="") @@ -104,11 +112,14 @@ class PHYSICS_PT_cloth(PhysicButtonsPanel, Panel): col.prop(cloth, "goal_friction", text="Friction") """ + col = split.column() + key = ob.data.shape_keys if key: - col.label(text="Rest Shape Key:") - col.prop_search(cloth, "rest_shape_key", key, "key_blocks", text="") + sub = col.column() + sub.label(text="Rest Shape Key:") + sub.prop_search(cloth, "rest_shape_key", key, "key_blocks", text="") class PHYSICS_PT_cloth_cache(PhysicButtonsPanel, Panel): @@ -144,7 +155,7 @@ class PHYSICS_PT_cloth_collision(PhysicButtonsPanel, Panel): split = layout.split() col = split.column() - col.prop(cloth, "collision_quality", slider=True, text="Quality") + col.prop(cloth, "collision_quality", text="Quality") col.prop(cloth, "distance_min", slider=True, text="Distance") col.prop(cloth, "repel_force", slider=True, text="Repel") col.prop(cloth, "distance_repel", slider=True, text="Repel Distance") @@ -154,7 +165,7 @@ class PHYSICS_PT_cloth_collision(PhysicButtonsPanel, Panel): col.prop(cloth, "use_self_collision", text="Self Collision") sub = col.column() sub.active = cloth.use_self_collision - sub.prop(cloth, "self_collision_quality", slider=True, text="Quality") + sub.prop(cloth, "self_collision_quality", text="Quality") sub.prop(cloth, "self_distance_min", slider=True, text="Distance") sub.prop_search(cloth, "vertex_group_self_collisions", ob, "vertex_groups", text="") -- cgit v1.2.3 From 7a4353160cc5b5e71dde234c7db95302b4233918 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 30 Jul 2016 14:47:31 +1000 Subject: Cloth: option to use dynamic base mesh This adds the ability for cloth simulations to respect changes in the underlying mesh. So you can for instance, animate shape keys, armatures, or add any deformation modifiers (above the cloth modifier). This is mainly useful for (but not limited to) cartoon animations, where your character might stretch or change shape, and you want the clothes to follow accordingly. D1903 by @LucaRood --- release/scripts/startup/bl_ui/properties_physics_cloth.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_physics_cloth.py b/release/scripts/startup/bl_ui/properties_physics_cloth.py index 37a0390b11d..d3b2a9fd149 100644 --- a/release/scripts/startup/bl_ui/properties_physics_cloth.py +++ b/release/scripts/startup/bl_ui/properties_physics_cloth.py @@ -114,10 +114,13 @@ class PHYSICS_PT_cloth(PhysicButtonsPanel, Panel): col = split.column() + col.prop(cloth, "use_dynamic_mesh", text="Dynamic Mesh") + key = ob.data.shape_keys if key: sub = col.column() + sub.active = not cloth.use_dynamic_mesh sub.label(text="Rest Shape Key:") sub.prop_search(cloth, "rest_shape_key", key, "key_blocks", text="") -- cgit v1.2.3 From 362b3bbe58ae378d5e154dd1a27d55d913594a1a Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 30 Jul 2016 14:46:19 +1000 Subject: Cloth Simulation: add time scale property This setting can also be animated, to create a "time warp" effect. D2122 by @LucaRood --- release/scripts/startup/bl_ui/properties_physics_cloth.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_physics_cloth.py b/release/scripts/startup/bl_ui/properties_physics_cloth.py index d3b2a9fd149..3ebf2691b4c 100644 --- a/release/scripts/startup/bl_ui/properties_physics_cloth.py +++ b/release/scripts/startup/bl_ui/properties_physics_cloth.py @@ -75,6 +75,11 @@ class PHYSICS_PT_cloth(PhysicButtonsPanel, Panel): split.label(text="Quality:") split.prop(cloth, "quality", text="Steps") + split = layout.split(percentage=0.25) + + split.label(text="Speed:") + split.prop(cloth, "time_scale", text="Multiplier") + split = layout.split() col = split.column() -- cgit v1.2.3 From 64d4d6b134d5b36c43aa55e09ad92d8593a18269 Mon Sep 17 00:00:00 2001 From: Alexander Gavrilov Date: Sun, 31 Jul 2016 18:56:44 +1000 Subject: Support limiting collisions by group for softbody and particles This feature is extremely useful for layering multiple cloth objects, and there is no reason there shouldn't be the same kind of feature for softbody. --- release/scripts/startup/bl_ui/properties_particle.py | 2 ++ release/scripts/startup/bl_ui/properties_physics_softbody.py | 2 ++ 2 files changed, 4 insertions(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_particle.py b/release/scripts/startup/bl_ui/properties_particle.py index 08290f20a69..c2580d4ac71 100644 --- a/release/scripts/startup/bl_ui/properties_particle.py +++ b/release/scripts/startup/bl_ui/properties_particle.py @@ -605,6 +605,8 @@ class PARTICLE_PT_physics(ParticleButtonsPanel, Panel): row.prop(part, "use_size_deflect") row.prop(part, "use_die_on_collision") + layout.prop(part, "collision_group") + if part.physics_type == 'FLUID': fluid = part.fluid diff --git a/release/scripts/startup/bl_ui/properties_physics_softbody.py b/release/scripts/startup/bl_ui/properties_physics_softbody.py index c96f455a105..a458af739f2 100644 --- a/release/scripts/startup/bl_ui/properties_physics_softbody.py +++ b/release/scripts/startup/bl_ui/properties_physics_softbody.py @@ -68,6 +68,8 @@ class PHYSICS_PT_softbody(PhysicButtonsPanel, Panel): col.label(text="Simulation:") col.prop(softbody, "speed") + layout.prop(softbody, "collision_group") + class PHYSICS_PT_softbody_cache(PhysicButtonsPanel, Panel): bl_label = "Soft Body Cache" -- cgit v1.2.3 From a3ce64be5a828cbf8896be18b9c1060d5520bce8 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 1 Aug 2016 11:54:02 +1000 Subject: Cleanup: unused vars, imports, pep8 --- release/scripts/startup/bl_ui/properties_data_bone.py | 3 +-- .../startup/bl_ui/properties_grease_pencil_common.py | 15 +++++++-------- release/scripts/startup/bl_ui/space_dopesheet.py | 1 + release/scripts/startup/bl_ui/space_image.py | 3 +-- release/scripts/startup/bl_ui/space_view3d.py | 12 +++++------- release/scripts/startup/bl_ui/space_view3d_toolbar.py | 1 + 6 files changed, 16 insertions(+), 19 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_data_bone.py b/release/scripts/startup/bl_ui/properties_data_bone.py index 853d45e2396..3a5475514c9 100644 --- a/release/scripts/startup/bl_ui/properties_data_bone.py +++ b/release/scripts/startup/bl_ui/properties_data_bone.py @@ -153,7 +153,7 @@ class BONE_PT_curved(BoneButtonsPanel, Panel): def draw(self, context): ob = context.object bone = context.bone - arm = context.armature + # arm = context.armature pchan = None if ob and bone: @@ -268,7 +268,6 @@ class BONE_PT_relations(BoneButtonsPanel, Panel): sub.prop(bone, "use_local_location") - class BONE_PT_display(BoneButtonsPanel, Panel): bl_label = "Display" diff --git a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py index ac412688fa1..baa70ed08f5 100644 --- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py +++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py @@ -63,7 +63,7 @@ class GreasePencilDrawingToolsPanel: def draw(self, context): layout = self.layout - is_3d_view = context.space_data.type == 'VIEW_3D' + is_3d_view = context.space_data.type == 'VIEW_3D' is_clip_editor = context.space_data.type == 'CLIP_EDITOR' col = layout.column(align=True) @@ -136,7 +136,7 @@ class GreasePencilStrokeEditPanel: def draw(self, context): layout = self.layout - is_3d_view = context.space_data.type == 'VIEW_3D' + is_3d_view = context.space_data.type == 'VIEW_3D' if not is_3d_view: layout.label(text="Select:") @@ -214,13 +214,13 @@ class GreasePencilStrokeSculptPanel: layout.separator() - if settings.tool == 'THICKNESS': + if tool == 'THICKNESS': layout.row().prop(brush, "direction", expand=True) - elif settings.tool == 'PINCH': + elif tool == 'PINCH': row = layout.row(align=True) row.prop_enum(brush, "direction", 'ADD', text="Pinch") row.prop_enum(brush, "direction", 'SUBTRACT', text="Inflate") - elif settings.tool == 'TWIST': + elif tool == 'TWIST': row = layout.row(align=True) row.prop_enum(brush, "direction", 'SUBTRACT', text="CW") row.prop_enum(brush, "direction", 'ADD', text="CCW") @@ -228,7 +228,7 @@ class GreasePencilStrokeSculptPanel: layout.separator() layout.prop(settings, "use_select_mask") - if settings.tool == 'SMOOTH': + if tool == 'SMOOTH': layout.prop(brush, "affect_pressure") @@ -581,14 +581,13 @@ class GreasePencilDataPanel: col.active = not gpl.lock col.prop(gpl, "line_width", slider=True) - split = layout.split(percentage=0.5) split.active = not gpl.lock col = split.column(align=True) col.prop(gpl, "use_volumetric_strokes") col.prop(gpl, "show_points", text="Points") - + col = split.column(align=True) col.prop(gpl, "use_hq_fill") col.prop(gpl, "show_x_ray") diff --git a/release/scripts/startup/bl_ui/space_dopesheet.py b/release/scripts/startup/bl_ui/space_dopesheet.py index d6d91980201..4d365c8dc08 100644 --- a/release/scripts/startup/bl_ui/space_dopesheet.py +++ b/release/scripts/startup/bl_ui/space_dopesheet.py @@ -103,6 +103,7 @@ def dopesheet_filter(layout, context, genericFiltersOnly=False): layout.prop(dopesheet, "use_datablock_sort", text="") + ####################################### # DopeSheet Editor - General/Standard UI diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py index c191a4b5bdc..9f719bc793e 100644 --- a/release/scripts/startup/bl_ui/space_image.py +++ b/release/scripts/startup/bl_ui/space_image.py @@ -729,7 +729,6 @@ class IMAGE_PT_paint(Panel, ImagePaintPanel): @classmethod def poll(cls, context): sima = context.space_data - toolsettings = context.tool_settings.image_paint return sima.show_paint @@ -987,7 +986,7 @@ class IMAGE_PT_tools_paint_options(BrushButtonsPanel, Panel): layout = self.layout toolsettings = context.tool_settings - brush = toolsettings.image_paint.brush + # brush = toolsettings.image_paint.brush ups = toolsettings.unified_paint_settings diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index fdf0996ac1e..681fa8e39aa 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -37,7 +37,6 @@ class VIEW3D_HT_header(Header): row = layout.row(align=True) row.template_header() - sub = row.row(align=True) VIEW3D_MT_editor_menus.draw_collapsible(context, layout) @@ -137,13 +136,12 @@ class VIEW3D_HT_header(Header): row.operator("gpencil.copy", text="", icon='COPYDOWN') row.operator("gpencil.paste", text="", icon='PASTEDOWN') - layout.prop(context.gpencil_data, "use_onion_skinning", text="Onion Skins", icon='PARTICLE_PATH') # XXX: icon + # XXX: icon + layout.prop(context.gpencil_data, "use_onion_skinning", text="Onion Skins", icon='PARTICLE_PATH') layout.prop(context.tool_settings.gpencil_sculpt, "use_select_mask") - - class VIEW3D_MT_editor_menus(Menu): bl_space_type = 'VIEW3D_MT_editor_menus' bl_label = "" @@ -1505,14 +1503,14 @@ class VIEW3D_MT_object_apply(Menu): props.location, props.rotation, props.scale = False, True, True layout.separator() - + layout.operator("object.transforms_to_deltas", text="Location to Deltas", text_ctxt=i18n_contexts.default).mode = 'LOC' layout.operator("object.transforms_to_deltas", text="Rotation to Deltas", text_ctxt=i18n_contexts.default).mode = 'ROT' layout.operator("object.transforms_to_deltas", text="Scale to Deltas", text_ctxt=i18n_contexts.default).mode = 'SCALE' - + layout.operator("object.transforms_to_deltas", text="All Transforms to Deltas", text_ctxt=i18n_contexts.default).mode = 'ALL' layout.operator("object.anim_transforms_to_deltas") - + layout.separator() layout.operator("object.visual_transform_apply", text="Visual Transform", text_ctxt=i18n_contexts.default) diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index e9f4d715ec2..e9f4a45c2c3 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -605,6 +605,7 @@ class VIEW3D_PT_tools_curveedit_options_stroke(View3DPanel, Panel): colsub = layout.column(align=True) colsub.prop(cps, "surface_plane", expand=True) + # ********** default tools for editmode_surface **************** class VIEW3D_PT_tools_transform_surface(View3DPanel, Panel): -- cgit v1.2.3 From 980fbb35e23d56d444604f4951f4de6a3c2c4e88 Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Wed, 3 Aug 2016 19:46:11 +0200 Subject: Boolean modifier UI improvement This patch improves UI of a recently added solver preference in boolean modifier: {F331776} Issue with the current UI is that it shows user unnecessary information and breaks established grid layout. Reviewers: carter2422 Reviewed By: carter2422 Subscribers: carter2422 Tags: #user_interface, #bf_blender Differential Revision: https://developer.blender.org/D2136 --- release/scripts/startup/bl_ui/properties_data_modifier.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index 6f53ae6e118..de3e98611d7 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -151,14 +151,15 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): col = split.column() col.label(text="Operation:") col.prop(md, "operation", text="") - row = layout.row() - row.label("Solver:") - row.prop(md, "solver", expand=True) col = split.column() col.label(text="Object:") col.prop(md, "object", text="") + split = layout.split() + split.column().label(text="Solver:") + split.column().prop(md, "solver", text="") + if md.solver == 'BMESH': layout.prop(md, "double_threshold") -- cgit v1.2.3 From eaea4ea51f665945e44ff2ffa534a594e9fb1938 Mon Sep 17 00:00:00 2001 From: Antonio Vazquez Date: Wed, 3 Aug 2016 23:31:48 +0200 Subject: Grease Pencil v2 Branch Improve current Grease Pencil in order to get a better 2D animation tool. More info in WIKI pages: https://wiki.blender.org/index.php/User:Antoniov Reviewed By: Severin, aligorith, campbellbarton Patch by @antoniov, with edits by @Severin. Differential Revision: https://developer.blender.org/D2115 --- .../bl_ui/properties_grease_pencil_common.py | 478 ++++++++++++++++++--- release/scripts/startup/bl_ui/space_clip.py | 25 +- release/scripts/startup/bl_ui/space_image.py | 21 + release/scripts/startup/bl_ui/space_node.py | 28 +- release/scripts/startup/bl_ui/space_sequencer.py | 14 +- release/scripts/startup/bl_ui/space_view3d.py | 16 +- .../scripts/startup/bl_ui/space_view3d_toolbar.py | 13 +- 7 files changed, 527 insertions(+), 68 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py index baa70ed08f5..b3d6107ccdb 100644 --- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py +++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py @@ -136,7 +136,7 @@ class GreasePencilStrokeEditPanel: def draw(self, context): layout = self.layout - is_3d_view = context.space_data.type == 'VIEW_3D' + is_3d_view = context.space_data.type == 'VIEW_3D' if not is_3d_view: layout.label(text="Select:") @@ -151,18 +151,19 @@ class GreasePencilStrokeEditPanel: col.operator("gpencil.select_linked") col.operator("gpencil.select_more") col.operator("gpencil.select_less") - - layout.separator() + col.operator("gpencil.palettecolor_select") layout.label(text="Edit:") row = layout.row(align=True) row.operator("gpencil.copy", text="Copy") - row.operator("gpencil.paste", text="Paste") + row.operator("gpencil.paste", text="Paste").type = 'COPY' + row.operator("gpencil.paste", text="Paste & Merge").type = 'MERGE' col = layout.column(align=True) - col.operator("gpencil.delete", text="Delete") + col.operator("gpencil.delete") col.operator("gpencil.duplicate_move", text="Duplicate") - col.operator("transform.mirror", text="Mirror") + if is_3d_view: + col.operator("gpencil.stroke_cyclical_set", text="Toggle Cyclic").type = 'TOGGLE' layout.separator() @@ -176,9 +177,92 @@ class GreasePencilStrokeEditPanel: col = layout.column(align=True) col.operator("transform.bend", text="Bend") + col.operator("transform.mirror", text="Mirror") col.operator("transform.shear", text="Shear") col.operator("transform.tosphere", text="To Sphere") + layout.separator() + col = layout.column(align=True) + col.operator_menu_enum("gpencil.stroke_arrange", text="Arrange Strokes...", property="direction") + col.operator("gpencil.stroke_change_color", text="Move to Color") + + layout.separator() + col = layout.column(align=True) + col.operator("gpencil.stroke_join", text="Join").type = 'JOIN' + col.operator("gpencil.stroke_join", text="Join & Copy").type = 'JOINCOPY' + col.operator("gpencil.stroke_flip", text="Flip direction") + + gpd = context.gpencil_data + if gpd: + col.prop(gpd, "show_stroke_direction", text="Show drawing direction") + + +class GreasePencilBrushPanel: + # subclass must set + # bl_space_type = 'IMAGE_EDITOR' + bl_label = "Drawing Brushes" + bl_category = "Grease Pencil" + bl_region_type = 'TOOLS' + + @staticmethod + def draw(self, context): + layout = self.layout + + row = layout.row() + col = row.column() + ts = context.scene.tool_settings + if len(ts.gpencil_brushes) >= 2: + brows = 3 + else: + brows = 2 + col.template_list("GPENCIL_UL_brush", "", ts, "gpencil_brushes", ts.gpencil_brushes, "active_index", rows=brows) + + col = row.column() + + sub = col.column(align=True) + sub.operator("gpencil.brush_add", icon='ZOOMIN', text="") + sub.operator("gpencil.brush_remove", icon='ZOOMOUT', text="") + sub.menu("GPENCIL_MT_brush_specials", icon='DOWNARROW_HLT', text="") + brush = context.active_gpencil_brush + if brush: + if len(ts.gpencil_brushes) > 1: + col.separator() + sub = col.column(align=True) + sub.operator("gpencil.brush_move", icon='TRIA_UP', text="").type = 'UP' + sub.operator("gpencil.brush_move", icon='TRIA_DOWN', text="").type = 'DOWN' + + # Brush details + if brush is not None: + row = layout.row() + row.prop(brush, "line_width") + row = layout.row(align=True) + row.prop(brush, "use_random_pressure", text='', icon='RNDCURVE') + row.prop(brush, "pen_sensitivity_factor", slider=True) + row.prop(brush, "use_pressure", text='', icon='STYLUS_PRESSURE') + row = layout.row(align=True) + row.prop(brush, "use_random_strength", text='', icon='RNDCURVE') + row.prop(brush, "strength", slider=True) + row.prop(brush, "use_strength_pressure", text='', icon='STYLUS_PRESSURE') + row = layout.row(align=True) + row.prop(brush, "random_press", slider=True) + + row = layout.row(align=True) + row.prop(brush, "jitter", slider=True) + row.prop(brush, "use_jitter_pressure", text='', icon='STYLUS_PRESSURE') + row = layout.row() + row.prop(brush, "angle", slider=True) + row.prop(brush, "angle_factor", text="Factor", slider=True) + + box = layout.box() + col = box.column(align=True) + col.label(text="Stroke Quality:") + col.prop(brush, "pen_smooth_factor") + col.prop(brush, "pen_smooth_steps") + col.separator() + row = col.row(align=False) + row.prop(brush, "pen_subdivision_steps") + row.prop(brush, "random_subdiv", text='Randomness', slider=True) + class GreasePencilStrokeSculptPanel: # subclass must set @@ -203,7 +287,7 @@ class GreasePencilStrokeSculptPanel: tool = settings.tool brush = settings.brush - layout.column().prop(settings, "tool", expand=True) + layout.column().prop(settings, "tool") col = layout.column() col.prop(brush, "size", slider=True) @@ -211,6 +295,11 @@ class GreasePencilStrokeSculptPanel: row.prop(brush, "strength", slider=True) row.prop(brush, "use_pressure_strength", text="") col.prop(brush, "use_falloff") + if tool in {'SMOOTH', 'RANDOMIZE'}: + row = layout.row(align=True) + row.prop(settings, "affect_position", text="Position", icon='MESH_DATA', toggle=True) + row.prop(settings, "affect_strength", text="Strength", icon='COLOR', toggle=True) + row.prop(settings, "affect_thickness", text="Thickness", icon='LINE_DATA', toggle=True) layout.separator() @@ -220,18 +309,54 @@ class GreasePencilStrokeSculptPanel: row = layout.row(align=True) row.prop_enum(brush, "direction", 'ADD', text="Pinch") row.prop_enum(brush, "direction", 'SUBTRACT', text="Inflate") - elif tool == 'TWIST': + elif settings.tool == 'TWIST': row = layout.row(align=True) row.prop_enum(brush, "direction", 'SUBTRACT', text="CW") row.prop_enum(brush, "direction", 'ADD', text="CCW") - layout.separator() - layout.prop(settings, "use_select_mask") + row = layout.row(align=True) + row.prop(settings, "use_select_mask") + row = layout.row(align=True) + row.prop(settings, "selection_alpha", slider=True) if tool == 'SMOOTH': layout.prop(brush, "affect_pressure") +class GreasePencilBrushCurvesPanel: + # subclass must set + # bl_space_type = 'IMAGE_EDITOR' + bl_label = "Grease Pencil Curves" + bl_category = "Grease Pencil" + bl_region_type = 'TOOLS' + bl_options = {'DEFAULT_CLOSED'} + + @classmethod + def poll(cls, context): + if context.active_gpencil_brush is None: + return False + + brush = context.active_gpencil_brush + return bool(brush) + + @staticmethod + def draw(self, context): + layout = self.layout + brush = context.active_gpencil_brush + # Brush + layout.label("Sensitivity") + box = layout.box() + box.template_curve_mapping(brush, "curve_sensitivity", brush=True) + + layout.label("Strength") + box = layout.box() + box.template_curve_mapping(brush, "curve_strength", brush=True) + + layout.label("Jitter") + box = layout.box() + box.template_curve_mapping(brush, "curve_jitter", brush=True) + + ############################### class GPENCIL_PIE_tool_palette(Menu): @@ -282,6 +407,7 @@ class GPENCIL_PIE_tool_palette(Menu): col.operator("gpencil.select_all", text="Select All", icon='PARTICLE_POINT') col.operator("gpencil.select_all", text="Select Inverse", icon='BLANK1') col.operator("gpencil.select_linked", text="Select Linked", icon='LINKED') + col.operator("gpencil.palettecolor_select", text="Select Color", icon='COLOR') # NE - Select (Modal) col = pie.column() @@ -315,24 +441,47 @@ class GPENCIL_PIE_settings_palette(Menu): pie = layout.menu_pie() # gpd = context.gpencil_data gpl = context.active_gpencil_layer + palcolor = context.active_gpencil_palettecolor + brush = context.active_gpencil_brush # W - Stroke draw settings col = pie.column(align=True) - col.label(text="Stroke") - col.prop(gpl, "color", text="") - col.prop(gpl, "alpha", text="", slider=True) + if palcolor is not None: + col.label(text="Stroke") + col.prop(palcolor, "color", text="") + col.prop(palcolor, "alpha", text="", slider=True) # E - Fill draw settings col = pie.column(align=True) - col.label(text="Fill") - col.prop(gpl, "fill_color", text="") - col.prop(gpl, "fill_alpha", text="", slider=True) + if palcolor is not None: + col.label(text="Fill") + col.prop(palcolor, "fill_color", text="") + col.prop(palcolor, "fill_alpha", text="", slider=True) - # S - Layer settings + # S Brush settings col = pie.column() - col.prop(gpl, "line_width", slider=True) - # col.prop(gpl, "use_volumetric_strokes") - col.prop(gpl, "use_onion_skinning") + col.label("Active Brush: ") + + row = col.row() + row.operator_context = 'EXEC_REGION_WIN' + row.operator_menu_enum("gpencil.brush_change", "brush", text="", icon='BRUSH_DATA') + row.prop(brush, "name", text="") + + col.prop(brush, "line_width", slider=True) + row = col.row(align=True) + row.prop(brush, "use_random_pressure", text='', icon='RNDCURVE') + row.prop(brush, "pen_sensitivity_factor", slider=True) + row.prop(brush, "use_pressure", text='', icon='STYLUS_PRESSURE') + row = col.row(align=True) + row.prop(brush, "use_random_strength", text='', icon='RNDCURVE') + row.prop(brush, "strength", slider=True) + row.prop(brush, "use_strength_pressure", text='', icon='STYLUS_PRESSURE') + row = col.row(align=True) + row.prop(brush, "jitter", slider=True) + row.prop(brush, "use_jitter_pressure", text='', icon='STYLUS_PRESSURE') + row = col.row() + row.prop(brush, "angle", slider=True) + row.prop(brush, "angle_factor", text="Factor", slider=True) # N - Active Layer col = pie.column() @@ -347,6 +496,35 @@ class GPENCIL_PIE_settings_palette(Menu): row = col.row() row.prop(gpl, "lock") row.prop(gpl, "hide") + col.prop(gpl, "use_onion_skinning") + + # NW - Move stroke Down + col = pie.column(align=True) + col.label("Arrange Strokes") + col.operator("gpencil.stroke_arrange", text="Send to Back").direction = 'BOTTOM' + col.operator("gpencil.stroke_arrange", text="Send Backward").direction = 'DOWN' + + # NE - Move stroke Up + col = pie.column(align=True) + col.label("Arrange Strokes") + col.operator("gpencil.stroke_arrange", text="Bring to Front").direction = 'TOP' + col.operator("gpencil.stroke_arrange", text="Bring Forward").direction = 'UP' + + # SW - Move stroke to color + col = pie.column(align=True) + col.operator("gpencil.stroke_change_color", text="Move to Color") + + # SE - Join strokes + col = pie.column(align=True) + col.label("Join Strokes") + row = col.row() + row.operator("gpencil.stroke_join", text="Join").type = 'JOIN' + row.operator("gpencil.stroke_join", text="Join & Copy").type = 'JOINCOPY' + col.operator("gpencil.stroke_flip", text="Flip direction") + + gpd = context.gpencil_data + if gpd: + col.prop(gpd, "show_stroke_direction", text="Show drawing direction") class GPENCIL_PIE_tools_more(Menu): @@ -411,6 +589,11 @@ class GPENCIL_PIE_sculpt(Menu): row.prop(brush, "strength", slider=True) # row.prop(brush, "use_pressure_strength", text="", icon_only=True) col.prop(brush, "use_falloff") + if settings.tool in {'SMOOTH', 'RANDOMIZE'}: + row = col.row(align=True) + row.prop(settings, "affect_position", text="Position", icon='MESH_DATA', toggle=True) + row.prop(settings, "affect_strength", text="Strength", icon='COLOR', toggle=True) + row.prop(settings, "affect_thickness", text="Thickness", icon='LINE_DATA', toggle=True) # S - Change Brush Type Shortcuts row = pie.row() @@ -422,6 +605,7 @@ class GPENCIL_PIE_sculpt(Menu): row = pie.row() row.prop_enum(settings, "tool", value='SMOOTH') row.prop_enum(settings, "tool", value='THICKNESS') + row.prop_enum(settings, "tool", value='STRENGTH') row.prop_enum(settings, "tool", value='RANDOMIZE') @@ -448,6 +632,48 @@ class GPENCIL_MT_snap(Menu): ############################### +class GPENCIL_UL_brush(UIList): + def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index): + # assert(isinstance(item, bpy.types.GPencilBrush) + brush = item + + if self.layout_type in {'DEFAULT', 'COMPACT'}: + row = layout.row(align=True) + row.prop(brush, "name", text="", emboss=False, icon='BRUSH_DATA') + elif self.layout_type == 'GRID': + layout.alignment = 'CENTER' + layout.label(text="", icon_value=icon) + + +class GPENCIL_UL_palettecolor(UIList): + def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index): + # assert(isinstance(item, bpy.types.PaletteColor) + palcolor = item + + if self.layout_type in {'DEFAULT', 'COMPACT'}: + if palcolor.lock: + layout.active = False + + split = layout.split(percentage=0.25) + row = split.row(align=True) + row.prop(palcolor, "color", text="", emboss=palcolor.is_stroke_visible) + row.prop(palcolor, "fill_color", text="", emboss=palcolor.is_fill_visible) + split.prop(palcolor, "info", text="", emboss=False) + + row = layout.row(align=True) + row.prop(palcolor, "lock", text="", emboss=False) + row.prop(palcolor, "hide", text="", emboss=False) + if palcolor.ghost is True: + icon = 'GHOST_DISABLED' + else: + icon = 'GHOST_ENABLED' + row.prop(palcolor, "ghost", text="", icon=icon, emboss=False) + + elif self.layout_type == 'GRID': + layout.alignment = 'CENTER' + layout.label(text="", icon_value=icon) + + class GPENCIL_UL_layer(UIList): def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index): # assert(isinstance(item, bpy.types.GPencilLayer) @@ -457,15 +683,19 @@ class GPENCIL_UL_layer(UIList): if gpl.lock: layout.active = False - split = layout.split(percentage=0.25) - row = split.row(align=True) - row.prop(gpl, "color", text="", emboss=gpl.is_stroke_visible) - row.prop(gpl, "fill_color", text="", emboss=gpl.is_fill_visible) - split.prop(gpl, "info", text="", emboss=False) + row = layout.row(align=True) + if gpl.is_parented: + icon = 'BONE_DATA' + else: + icon = 'BLANK1' + + row.label(text="", icon=icon) + row.prop(gpl, "info", text="", emboss=False) row = layout.row(align=True) row.prop(gpl, "lock", text="", emboss=False) row.prop(gpl, "hide", text="", emboss=False) + row.prop(gpl, "unlock_color", text="", emboss=False) elif self.layout_type == 'GRID': layout.alignment = 'CENTER' layout.label(text="", icon_value=icon) @@ -489,11 +719,40 @@ class GPENCIL_MT_layer_specials(Menu): layout.operator("gpencil.lock_all", icon='LOCKED', text="Lock All") layout.operator("gpencil.unlock_all", icon='UNLOCKED', text="UnLock All") + layout.separator() + + layout.operator("gpencil.layer_merge", icon='NLA', text="Merge Down") + + +class GPENCIL_MT_brush_specials(Menu): + bl_label = "Layer" + + def draw(self, context): + layout = self.layout + layout.operator("gpencil.brush_copy", icon='PASTEDOWN', text="Copy current drawing brush") + layout.operator("gpencil.brush_presets_create", icon='HELP', text="Create a set of predefined brushes") + + +class GPENCIL_MT_palettecolor_specials(Menu): + bl_label = "Layer" + + def draw(self, context): + layout = self.layout + + layout.operator("gpencil.palettecolor_reveal", icon='RESTRICT_VIEW_OFF', text="Show All") + layout.operator("gpencil.palettecolor_hide", icon='RESTRICT_VIEW_ON', text="Hide Others").unselected = True + + layout.separator() + + layout.operator("gpencil.palettecolor_lock_all", icon='LOCKED', text="Lock All") + layout.operator("gpencil.palettecolor_unlock_all", icon='UNLOCKED', text="UnLock All") + layout.operator("gpencil.palettecolor_copy", icon='PASTEDOWN', text="Copy Color") + class GreasePencilDataPanel: # subclass must set # bl_space_type = 'IMAGE_EDITOR' - bl_label = "Grease Pencil" + bl_label = "Grease Pencil Layers" bl_region_type = 'UI' @staticmethod @@ -553,46 +812,56 @@ class GreasePencilDataPanel: col.separator() sub = col.column(align=True) - sub.operator("gpencil.layer_isolate", icon='SOLO_OFF', text="").affect_visibility = False + sub.operator("gpencil.layer_isolate", icon='LOCKED', text="").affect_visibility = False sub.operator("gpencil.layer_isolate", icon='RESTRICT_VIEW_OFF', text="").affect_visibility = True if gpl: - self.draw_layer(layout, gpl) + self.draw_layer(context, layout, gpl) - def draw_layer(self, layout, gpl): + def draw_layer(self, context, layout, gpl): + row = layout.row(align=True) + row.prop(gpl, "opacity", text="Opacity", slider=True) # layer settings split = layout.split(percentage=0.5) split.active = not gpl.lock - - # Column 1 - Stroke - col = split.column(align=True) - col.label(text="Stroke:") - col.prop(gpl, "color", text="") - col.prop(gpl, "alpha", slider=True) - - # Column 2 - Fill - col = split.column(align=True) - col.label(text="Fill:") - col.prop(gpl, "fill_color", text="") - col.prop(gpl, "fill_alpha", text="Opacity", slider=True) - # Options - col = layout.column(align=True) + split = layout.split(percentage=0.5) + col = split.column(align=True) col.active = not gpl.lock - col.prop(gpl, "line_width", slider=True) + col.prop(gpl, "show_x_ray") - split = layout.split(percentage=0.5) - split.active = not gpl.lock + col.label("Tint") + col.prop(gpl, "tint_color", text="") + col.prop(gpl, "tint_factor", text="Factor", slider=True) col = split.column(align=True) - col.prop(gpl, "use_volumetric_strokes") + col.active = not gpl.lock col.prop(gpl, "show_points", text="Points") + # Full-Row - Parent + ''' + row = layout.row() + if context.area.type == 'VIEW_3D' and not gpl.lock: + row.enabled = True + else: + row.enabled = False + ''' - col = split.column(align=True) - col.prop(gpl, "use_hq_fill") - col.prop(gpl, "show_x_ray") + # col = row.column() + if context.space_data.type == 'VIEW_3D': + col.label(text="Parent:") + col.prop(gpl, "parent", text="") - layout.separator() + sub = col.column() + sub.prop(gpl, "parent_type", text="") + parent = gpl.parent + if parent and gpl.parent_type == 'BONE' and parent.type == 'ARMATURE': + sub.prop_search(gpl, "parent_bone", parent.data, "bones", text="") + + # Full-Row - Thickness + row = layout.row(align=True) + row.active = not gpl.lock + row.prop(gpl, "line_change", text="Thickness change", slider=True) + row.operator("gpencil.stroke_apply_thickness", icon='STYLUS_PRESSURE', text="") # Full-Row - Frame Locking (and Delete Frame) row = layout.row(align=True) @@ -606,8 +875,6 @@ class GreasePencilDataPanel: row.prop(gpl, "lock_frame", text=lock_label, icon='UNLOCKED') row.operator("gpencil.active_frame_delete", text="", icon='X') - layout.separator() - # Onion skinning col = layout.column(align=True) col.active = not gpl.lock @@ -633,14 +900,103 @@ class GreasePencilDataPanel: row.prop(gpl, "after_color", text="") sub.prop(gpl, "ghost_after_range", text="After") - # Smooth and subdivide new strokes - layout.separator() - col = layout.column(align=True) - col.label(text="New Stroke Quality:") - col.prop(gpl, "pen_smooth_factor") - col.prop(gpl, "pen_smooth_steps") - col.separator() - col.prop(gpl, "pen_subdivision_steps") + +class GreasePencilPaletteColorPanel: + # subclass must set + bl_label = "Grease Pencil Colors" + bl_region_type = 'UI' + + @classmethod + def poll(cls, context): + if context.gpencil_data is None: + return False + + gpd = context.gpencil_data + return bool(gpd.layers.active) + + @staticmethod + def draw(self, context): + layout = self.layout + palette = context.active_gpencil_palette + + if palette: + row = layout.row(align=True) + row.operator_context = 'EXEC_REGION_WIN' + row.operator_menu_enum("gpencil.palette_change", "palette", text="", icon='COLOR') + row.prop(palette, "name", text="") + row.operator("gpencil.palette_add", icon='ZOOMIN', text="") + row.operator("gpencil.palette_remove", icon='ZOOMOUT', text="") + + # Palette colors + row = layout.row() + col = row.column() + if len(palette.colors) >= 2: + color_rows = 5 + else: + color_rows = 2 + col.template_list("GPENCIL_UL_palettecolor", "", palette, "colors", palette.colors, "active_index", + rows=color_rows) + + col = row.column() + + sub = col.column(align=True) + sub.operator("gpencil.palettecolor_add", icon='ZOOMIN', text="") + sub.operator("gpencil.palettecolor_remove", icon='ZOOMOUT', text="") + + palcol = context.active_gpencil_palettecolor + if palcol: + sub.menu("GPENCIL_MT_palettecolor_specials", icon='DOWNARROW_HLT', text="") + + if len(palette.colors) > 1: + col.separator() + + sub = col.column(align=True) + sub.operator("gpencil.palettecolor_move", icon='TRIA_UP', text="").direction = 'UP' + sub.operator("gpencil.palettecolor_move", icon='TRIA_DOWN', text="").direction = 'DOWN' + + col.separator() + sub = col.column(align=True) + sub.operator("gpencil.palettecolor_isolate", icon='LOCKED', text="").affect_visibility = False + sub.operator("gpencil.palettecolor_isolate", icon='RESTRICT_VIEW_OFF', text="").affect_visibility = True + sub.operator("gpencil.stroke_lock_color", icon='BORDER_RECT', text="") + sub.operator("gpencil.palette_lock_layer", icon='COLOR', text="") + + pcolor = palette.colors.active + if pcolor: + self.draw_palettecolors(layout, pcolor) + + # ---------------------------------------------- + # Draw palette colors + # ---------------------------------------------- + def draw_palettecolors(self, layout, pcolor): + # color settings + split = layout.split(percentage=0.5) + split.active = not pcolor.lock + + # Column 1 - Stroke + col = split.column(align=True) + col.active = not pcolor.lock + col.label(text="Stroke:") + col.prop(pcolor, "color", text="") + col.prop(pcolor, "alpha", slider=True) + + # Column 2 - Fill + col = split.column(align=True) + col.active = not pcolor.lock + col.label(text="Fill:") + col.prop(pcolor, "fill_color", text="") + col.prop(pcolor, "fill_alpha", text="Opacity", slider=True) + + # Options + split = layout.split(percentage=0.5) + split.active = not pcolor.lock + + col = split.column(align=True) + col.active = not pcolor.lock + col.prop(pcolor, "use_volumetric_strokes") + col = split.column(align=True) + col.active = not pcolor.lock + col.prop(pcolor, "use_hq_fill") class GreasePencilToolsPanel: diff --git a/release/scripts/startup/bl_ui/space_clip.py b/release/scripts/startup/bl_ui/space_clip.py index 58bb956f653..799f1e20dc6 100644 --- a/release/scripts/startup/bl_ui/space_clip.py +++ b/release/scripts/startup/bl_ui/space_clip.py @@ -25,8 +25,10 @@ from bl_ui.properties_grease_pencil_common import ( GreasePencilDrawingToolsPanel, GreasePencilStrokeEditPanel, GreasePencilStrokeSculptPanel, - GreasePencilDataPanel - ) + GreasePencilBrushPanel, + GreasePencilBrushCurvesPanel, + GreasePencilDataPanel, + GreasePencilPaletteColorPanel) class CLIP_UL_tracking_objects(UIList): @@ -1126,6 +1128,16 @@ class CLIP_PT_grease_pencil(GreasePencilDataPanel, CLIP_PT_clip_view_panel, Pane # But, this should only be visible in "clip" view +# Grease Pencil palette colors +class CLIP_PT_grease_pencil_palettecolor(GreasePencilPaletteColorPanel, CLIP_PT_clip_view_panel, Panel): + bl_space_type = 'CLIP_EDITOR' + bl_region_type = 'UI' + bl_options = {'DEFAULT_CLOSED'} + + # NOTE: this is just a wrapper around the generic GP Panel + # But, this should only be visible in "clip" view + + # Grease Pencil drawing tools class CLIP_PT_tools_grease_pencil_draw(GreasePencilDrawingToolsPanel, Panel): bl_space_type = 'CLIP_EDITOR' @@ -1141,6 +1153,15 @@ class CLIP_PT_tools_grease_pencil_sculpt(GreasePencilStrokeSculptPanel, Panel): bl_space_type = 'CLIP_EDITOR' +# Grease Pencil drawing brushes +class CLIP_PT_tools_grease_pencil_brush(GreasePencilBrushPanel, Panel): + bl_space_type = 'CLIP_EDITOR' + + +# Grease Pencil drawing curves +class CLIP_PT_tools_grease_pencil_brushcurves(GreasePencilBrushCurvesPanel, Panel): + bl_space_type = 'CLIP_EDITOR' + class CLIP_MT_view(Menu): bl_label = "View" diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py index 9f719bc793e..bf6df05c2b2 100644 --- a/release/scripts/startup/bl_ui/space_image.py +++ b/release/scripts/startup/bl_ui/space_image.py @@ -29,7 +29,10 @@ from bl_ui.properties_grease_pencil_common import ( GreasePencilDrawingToolsPanel, GreasePencilStrokeEditPanel, GreasePencilStrokeSculptPanel, + GreasePencilBrushPanel, + GreasePencilBrushCurvesPanel, GreasePencilDataPanel, + GreasePencilPaletteColorPanel ) from bpy.app.translations import pgettext_iface as iface_ @@ -1187,6 +1190,14 @@ class IMAGE_PT_grease_pencil(GreasePencilDataPanel, Panel): # NOTE: this is just a wrapper around the generic GP Panel +# Grease Pencil palette colors +class IMAGE_PT_grease_pencil_palettecolor(GreasePencilPaletteColorPanel, Panel): + bl_space_type = 'IMAGE_EDITOR' + bl_region_type = 'UI' + + # NOTE: this is just a wrapper around the generic GP Panel + + # Grease Pencil drawing tools class IMAGE_PT_tools_grease_pencil_draw(GreasePencilDrawingToolsPanel, Panel): bl_space_type = 'IMAGE_EDITOR' @@ -1202,5 +1213,15 @@ class IMAGE_PT_tools_grease_pencil_sculpt(GreasePencilStrokeSculptPanel, Panel): bl_space_type = 'IMAGE_EDITOR' +# Grease Pencil drawing brushes +class IMAGE_PT_tools_grease_pencil_brush(GreasePencilBrushPanel, Panel): + bl_space_type = 'IMAGE_EDITOR' + + +# Grease Pencil drawing curves +class IMAGE_PT_tools_grease_pencil_brushcurves(GreasePencilBrushCurvesPanel, Panel): + bl_space_type = 'IMAGE_EDITOR' + + if __name__ == "__main__": # only for live edit. bpy.utils.register_module(__name__) diff --git a/release/scripts/startup/bl_ui/space_node.py b/release/scripts/startup/bl_ui/space_node.py index ee342265f3d..8821fa0ca58 100644 --- a/release/scripts/startup/bl_ui/space_node.py +++ b/release/scripts/startup/bl_ui/space_node.py @@ -25,8 +25,11 @@ from bl_ui.properties_grease_pencil_common import ( GreasePencilDrawingToolsPanel, GreasePencilStrokeEditPanel, GreasePencilStrokeSculptPanel, + GreasePencilBrushPanel, + GreasePencilBrushCurvesPanel, GreasePencilDataPanel, - GreasePencilToolsPanel, + GreasePencilPaletteColorPanel, + GreasePencilToolsPanel ) @@ -464,6 +467,19 @@ class NODE_PT_grease_pencil(GreasePencilDataPanel, Panel): return snode is not None and snode.node_tree is not None +# Grease Pencil palette colors +class NODE_PT_grease_pencil_palettecolor(GreasePencilPaletteColorPanel, Panel): + bl_space_type = 'NODE_EDITOR' + bl_region_type = 'UI' + + # NOTE: this is just a wrapper around the generic GP Panel + + @classmethod + def poll(cls, context): + snode = context.space_data + return snode is not None and snode.node_tree is not None + + class NODE_PT_grease_pencil_tools(GreasePencilToolsPanel, Panel): bl_space_type = 'NODE_EDITOR' bl_region_type = 'UI' @@ -494,6 +510,16 @@ class NODE_PT_tools_grease_pencil_sculpt(GreasePencilStrokeSculptPanel, Panel): bl_space_type = 'NODE_EDITOR' bl_region_type = 'TOOLS' +# Grease Pencil drawing brushes +class NODE_PT_tools_grease_pencil_brush(GreasePencilBrushPanel, Panel): + bl_space_type = 'NODE_EDITOR' + bl_region_type = 'TOOLS' + +# Grease Pencil drawing curves +class NODE_PT_tools_grease_pencil_brushcurves(GreasePencilBrushCurvesPanel, Panel): + bl_space_type = 'NODE_EDITOR' + bl_region_type = 'TOOLS' + # ----------------------------- diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py index 4d1b9104344..26136a8e024 100644 --- a/release/scripts/startup/bl_ui/space_sequencer.py +++ b/release/scripts/startup/bl_ui/space_sequencer.py @@ -20,7 +20,11 @@ import bpy from bpy.types import Header, Menu, Panel from rna_prop_ui import PropertyPanel -from bl_ui.properties_grease_pencil_common import GreasePencilDataPanel, GreasePencilToolsPanel +from bl_ui.properties_grease_pencil_common import ( + GreasePencilDataPanel, + GreasePencilPaletteColorPanel, + GreasePencilToolsPanel, + ) from bpy.app.translations import pgettext_iface as iface_ @@ -1186,6 +1190,14 @@ class SEQUENCER_PT_grease_pencil(GreasePencilDataPanel, SequencerButtonsPanel_Ou # But, it should only show up when there are images in the preview region +class SEQUENCER_PT_grease_pencil_palettecolor(GreasePencilPaletteColorPanel, SequencerButtonsPanel_Output, Panel): + bl_space_type = 'SEQUENCE_EDITOR' + bl_region_type = 'UI' + + # NOTE: this is just a wrapper around the generic GP Panel + # But, it should only show up when there are images in the preview region + + class SEQUENCER_PT_grease_pencil_tools(GreasePencilToolsPanel, SequencerButtonsPanel_Output, Panel): bl_space_type = 'SEQUENCE_EDITOR' bl_region_type = 'UI' diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 681fa8e39aa..5f16957b435 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -19,7 +19,10 @@ # import bpy from bpy.types import Header, Menu, Panel -from bl_ui.properties_grease_pencil_common import GreasePencilDataPanel +from bl_ui.properties_grease_pencil_common import ( + GreasePencilDataPanel, + GreasePencilPaletteColorPanel, + ) from bl_ui.properties_paint_common import UnifiedPaintPanel from bpy.app.translations import contexts as i18n_contexts @@ -139,7 +142,9 @@ class VIEW3D_HT_header(Header): # XXX: icon layout.prop(context.gpencil_data, "use_onion_skinning", text="Onion Skins", icon='PARTICLE_PATH') - layout.prop(context.tool_settings.gpencil_sculpt, "use_select_mask") + row = layout.row(align=True) + row.prop(context.tool_settings.gpencil_sculpt, "use_select_mask") + row.prop(context.tool_settings.gpencil_sculpt, "selection_alpha", slider=True) class VIEW3D_MT_editor_menus(Menu): @@ -3079,6 +3084,13 @@ class VIEW3D_PT_grease_pencil(GreasePencilDataPanel, Panel): # NOTE: this is just a wrapper around the generic GP Panel +class VIEW3D_PT_grease_pencil_palettecolor(GreasePencilPaletteColorPanel, Panel): + bl_space_type = 'VIEW_3D' + bl_region_type = 'UI' + + # NOTE: this is just a wrapper around the generic GP Panel + + class VIEW3D_PT_view3d_properties(Panel): bl_space_type = 'VIEW_3D' bl_region_type = 'UI' diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index e9f4a45c2c3..8019c8d2f34 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -22,7 +22,9 @@ from bpy.types import Menu, Panel, UIList from bl_ui.properties_grease_pencil_common import ( GreasePencilDrawingToolsPanel, GreasePencilStrokeEditPanel, - GreasePencilStrokeSculptPanel + GreasePencilStrokeSculptPanel, + GreasePencilBrushPanel, + GreasePencilBrushCurvesPanel ) from bl_ui.properties_paint_common import ( UnifiedPaintPanel, @@ -1965,6 +1967,15 @@ class VIEW3D_PT_tools_grease_pencil_sculpt(GreasePencilStrokeSculptPanel, Panel) bl_space_type = 'VIEW_3D' +# Grease Pencil drawing brushes +class VIEW3D_PT_tools_grease_pencil_brush(GreasePencilBrushPanel, Panel): + bl_space_type = 'VIEW_3D' + +# Grease Pencil drawingcurves +class VIEW3D_PT_tools_grease_pencil_brushcurves(GreasePencilBrushCurvesPanel, Panel): + bl_space_type = 'VIEW_3D' + + # Note: moved here so that it's always in last position in 'Tools' panels! class VIEW3D_PT_tools_history(View3DPanel, Panel): bl_category = "Tools" -- cgit v1.2.3 From 9a8c5721212cc286b6dc9eb6e8e4ac9500c707ea Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Thu, 4 Aug 2016 01:43:01 +0200 Subject: Minor whitespace correction for eaea4ea51f665 Caused by merge conflicts, slipped throug when double checking. --- release/scripts/startup/bl_ui/properties_grease_pencil_common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py index b3d6107ccdb..c216d341450 100644 --- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py +++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py @@ -136,7 +136,7 @@ class GreasePencilStrokeEditPanel: def draw(self, context): layout = self.layout - is_3d_view = context.space_data.type == 'VIEW_3D' + is_3d_view = context.space_data.type == 'VIEW_3D' if not is_3d_view: layout.label(text="Select:") -- cgit v1.2.3 From 3971c83c96134099741d9522784269c73916852a Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Sat, 6 Aug 2016 03:29:51 +1200 Subject: GPencil: Various UI name fixes * "Flip direction" -> "Flip Direction" * "Show drawing direction" -> "Show Directions" * "Grease Pencil Curves" -> "Brush Curves" (I was considering "Brush Response Curves" instead, but that seemed like too much of a mouthful) * "X" for removing a palette. The UI there was more similar to a standard datablock selector, so it should use the "+X" combo instead of "+-" combo for consistency. (Note though, presets tend to use "+-" instead - e.g. see the Render Settings) --- release/scripts/startup/bl_ui/properties_grease_pencil_common.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py index c216d341450..1ad1536a3e1 100644 --- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py +++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py @@ -190,11 +190,11 @@ class GreasePencilStrokeEditPanel: col = layout.column(align=True) col.operator("gpencil.stroke_join", text="Join").type = 'JOIN' col.operator("gpencil.stroke_join", text="Join & Copy").type = 'JOINCOPY' - col.operator("gpencil.stroke_flip", text="Flip direction") + col.operator("gpencil.stroke_flip", text="Flip Direction") gpd = context.gpencil_data if gpd: - col.prop(gpd, "show_stroke_direction", text="Show drawing direction") + col.prop(gpd, "show_stroke_direction", text="Show Directions") class GreasePencilBrushPanel: @@ -326,7 +326,7 @@ class GreasePencilStrokeSculptPanel: class GreasePencilBrushCurvesPanel: # subclass must set # bl_space_type = 'IMAGE_EDITOR' - bl_label = "Grease Pencil Curves" + bl_label = "Brush Curves" bl_category = "Grease Pencil" bl_region_type = 'TOOLS' bl_options = {'DEFAULT_CLOSED'} @@ -925,7 +925,7 @@ class GreasePencilPaletteColorPanel: row.operator_menu_enum("gpencil.palette_change", "palette", text="", icon='COLOR') row.prop(palette, "name", text="") row.operator("gpencil.palette_add", icon='ZOOMIN', text="") - row.operator("gpencil.palette_remove", icon='ZOOMOUT', text="") + row.operator("gpencil.palette_remove", icon='X', text="") # Palette colors row = layout.row() -- cgit v1.2.3 From 8adcd93769800afb0deb989c6e077e5994478fb6 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Sat, 6 Aug 2016 03:46:42 +1200 Subject: GPencil: Tweaks to layout to try and get the spacing a bit nicer Currently, the lack of spacing (or rather, odd spacing/clumping) in places seemed a bit off. --- .../bl_ui/properties_grease_pencil_common.py | 47 ++++++++++------------ 1 file changed, 22 insertions(+), 25 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py index 1ad1536a3e1..c80c5ca7ddd 100644 --- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py +++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py @@ -821,33 +821,32 @@ class GreasePencilDataPanel: def draw_layer(self, context, layout, gpl): row = layout.row(align=True) row.prop(gpl, "opacity", text="Opacity", slider=True) - # layer settings + + # Layer options split = layout.split(percentage=0.5) split.active = not gpl.lock - # Options + split.prop(gpl, "show_x_ray") + split.prop(gpl, "show_points") + + # Offsets + Parenting (where available) split = layout.split(percentage=0.5) - col = split.column(align=True) - col.active = not gpl.lock - col.prop(gpl, "show_x_ray") + split.active = not gpl.lock - col.label("Tint") - col.prop(gpl, "tint_color", text="") - col.prop(gpl, "tint_factor", text="Factor", slider=True) + # Offsets - Color Tint + col = split.column() + subcol = col.column(align=True) + subcol.label("Tint") + subcol.prop(gpl, "tint_color", text="") + subcol.prop(gpl, "tint_factor", text="Factor", slider=True) - col = split.column(align=True) - col.active = not gpl.lock - col.prop(gpl, "show_points", text="Points") - # Full-Row - Parent - ''' - row = layout.row() - if context.area.type == 'VIEW_3D' and not gpl.lock: - row.enabled = True - else: - row.enabled = False - ''' + # Offsets - Thickness + row = col.row(align=True) + row.prop(gpl, "line_change", text="Thickness Change", slider=True) + row.operator("gpencil.stroke_apply_thickness", icon='STYLUS_PRESSURE', text="") - # col = row.column() + # Parenting if context.space_data.type == 'VIEW_3D': + col = split.column(align=True) col.label(text="Parent:") col.prop(gpl, "parent", text="") @@ -857,11 +856,7 @@ class GreasePencilDataPanel: if parent and gpl.parent_type == 'BONE' and parent.type == 'ARMATURE': sub.prop_search(gpl, "parent_bone", parent.data, "bones", text="") - # Full-Row - Thickness - row = layout.row(align=True) - row.active = not gpl.lock - row.prop(gpl, "line_change", text="Thickness change", slider=True) - row.operator("gpencil.stroke_apply_thickness", icon='STYLUS_PRESSURE', text="") + layout.separator() # Full-Row - Frame Locking (and Delete Frame) row = layout.row(align=True) @@ -875,6 +870,8 @@ class GreasePencilDataPanel: row.prop(gpl, "lock_frame", text=lock_label, icon='UNLOCKED') row.operator("gpencil.active_frame_delete", text="", icon='X') + layout.separator() + # Onion skinning col = layout.column(align=True) col.active = not gpl.lock -- cgit v1.2.3 From 4158737cb2d79898b9f1147eaa26eb486f4980a1 Mon Sep 17 00:00:00 2001 From: Alexander Gavrilov Date: Sat, 6 Aug 2016 10:49:42 +0300 Subject: Add the collision group option to the UI for boid particle physics. The option already works, just missing from the ui since it has completely different option set from newtonian and fluid. --- release/scripts/startup/bl_ui/properties_particle.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_particle.py b/release/scripts/startup/bl_ui/properties_particle.py index c2580d4ac71..89ea9dff69b 100644 --- a/release/scripts/startup/bl_ui/properties_particle.py +++ b/release/scripts/startup/bl_ui/properties_particle.py @@ -716,6 +716,8 @@ class PARTICLE_PT_physics(ParticleButtonsPanel, Panel): col.prop(boids, "land_personal_space") col.prop(boids, "land_stick_force") + layout.prop(part, "collision_group") + split = layout.split() col = split.column(align=True) -- cgit v1.2.3 From 61050f75b13ef706d3a80b86137436d3fb0bfa93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dietrich?= Date: Sat, 6 Aug 2016 06:20:37 +0200 Subject: Basic Alembic support All in all, this patch adds an Alembic importer, an Alembic exporter, and a new CacheFile data block which, for now, wraps around an Alembic archive. This data block is made available through a new modifier ("Mesh Sequence Cache") as well as a new constraint ("Transform Cache") to somewhat properly support respectively geometric and transformation data streaming from alembic caches. A more in-depth documentation is to be found on the wiki, as well as a guide to compile alembic: https://wiki.blender.org/index.php/ User:Kevindietrich/AlembicBasicIo. Many thanks to everyone involved in this little project, and huge shout out to "cgstrive" for the thorough testings with Maya, 3ds Max, Houdini and Realflow as well as @fjuhec, @jensverwiebe and @jasperge for the custom builds and compile fixes. Reviewers: sergey, campbellbarton, mont29 Reviewed By: sergey, campbellbarton, mont29 Differential Revision: https://developer.blender.org/D2060 --- .../scripts/startup/bl_ui/properties_constraint.py | 13 +++++++++++++ .../scripts/startup/bl_ui/properties_data_modifier.py | 19 +++++++++++++++++++ release/scripts/startup/bl_ui/space_info.py | 4 ++++ 3 files changed, 36 insertions(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_constraint.py b/release/scripts/startup/bl_ui/properties_constraint.py index 4ca2f773dcc..cb5f1595ff3 100644 --- a/release/scripts/startup/bl_ui/properties_constraint.py +++ b/release/scripts/startup/bl_ui/properties_constraint.py @@ -880,6 +880,19 @@ class ConstraintButtonsPanel: layout.operator("clip.constraint_to_fcurve") + def TRANSFORM_CACHE(self, context, layout, con): + layout.label(text="Cache File Properties:") + box = layout.box() + box.template_cache_file(con, "cache_file") + + cache_file = con.cache_file + + layout.label(text="Constraint Properties:") + box = layout.box() + + if cache_file is not None: + box.prop_search(con, "object_path", cache_file, "object_paths") + def SCRIPT(self, context, layout, con): layout.label("Blender 2.6 doesn't support python constraints yet") diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index de3e98611d7..50221d57b49 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -181,6 +181,9 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): layout.prop(md, "cache_format") layout.prop(md, "filepath") + if md.cache_format == 'ABC': + layout.prop(md, "sub_object") + layout.label(text="Evaluation:") layout.prop(md, "factor", slider=True) layout.prop(md, "deform_mode") @@ -215,6 +218,22 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): row = split.row() row.prop(md, "flip_axis") + def MESH_SEQUENCE_CACHE(self, layout, ob, md): + layout.label(text="Cache File Properties:") + box = layout.box() + box.template_cache_file(md, "cache_file") + + cache_file = md.cache_file + + layout.label(text="Modifier Properties:") + box = layout.box() + + if cache_file is not None: + box.prop_search(md, "object_path", cache_file, "object_paths") + + if ob.type == 'MESH': + box.row().prop(md, "read_data") + def CAST(self, layout, ob, md): split = layout.split(percentage=0.25) diff --git a/release/scripts/startup/bl_ui/space_info.py b/release/scripts/startup/bl_ui/space_info.py index 97ef37fa5e0..780dc4cf982 100644 --- a/release/scripts/startup/bl_ui/space_info.py +++ b/release/scripts/startup/bl_ui/space_info.py @@ -158,6 +158,8 @@ class INFO_MT_file_import(Menu): def draw(self, context): if bpy.app.build_options.collada: self.layout.operator("wm.collada_import", text="Collada (Default) (.dae)") + if bpy.app.build_options.alembic: + self.layout.operator("wm.alembic_import", text="Alembic (.abc)") class INFO_MT_file_export(Menu): @@ -167,6 +169,8 @@ class INFO_MT_file_export(Menu): def draw(self, context): if bpy.app.build_options.collada: self.layout.operator("wm.collada_export", text="Collada (Default) (.dae)") + if bpy.app.build_options.alembic: + self.layout.operator("wm.alembic_export", text="Alembic (.abc)") class INFO_MT_file_external_data(Menu): -- cgit v1.2.3