diff options
author | Joseph Eagar <joeedh@gmail.com> | 2009-07-19 08:32:46 +0400 |
---|---|---|
committer | Joseph Eagar <joeedh@gmail.com> | 2009-07-19 08:32:46 +0400 |
commit | dc78be0d104890d99e506e49f6afe6d8f2a1b9fd (patch) | |
tree | dc5b310f0e6480242b24079be0e0a1f9d9427c69 | |
parent | ab061807e6a598906191bc8e41650a95c0efc9d1 (diff) |
added missing ui script files
-rw-r--r-- | release/ui/buttons_physics_field.py | 66 | ||||
-rw-r--r-- | release/ui/buttons_physics_fluid.py | 223 | ||||
-rw-r--r-- | release/ui/buttons_physics_softbody.py | 219 | ||||
-rw-r--r-- | release/ui/space_buttons.py | 36 | ||||
-rw-r--r-- | release/ui/space_filebrowser.py | 67 | ||||
-rw-r--r-- | release/ui/space_image.py | 397 | ||||
-rw-r--r-- | release/ui/space_info.py | 119 | ||||
-rw-r--r-- | release/ui/space_logic.py | 88 | ||||
-rw-r--r-- | release/ui/space_view3d.py | 106 | ||||
-rw-r--r-- | release/ui/space_view3d_toolbar.py | 254 |
10 files changed, 1575 insertions, 0 deletions
diff --git a/release/ui/buttons_physics_field.py b/release/ui/buttons_physics_field.py new file mode 100644 index 00000000000..696de5e6d56 --- /dev/null +++ b/release/ui/buttons_physics_field.py @@ -0,0 +1,66 @@ + +import bpy + +class PhysicButtonsPanel(bpy.types.Panel): + __space_type__ = "BUTTONS_WINDOW" + __region_type__ = "WINDOW" + __context__ = "physics" + + def poll(self, context): + return (context.object != None) + +class PHYSICS_PT_field(PhysicButtonsPanel): + __idname__ = "PHYSICS_PT_field" + __label__ = "Field" + + def draw(self, context): + layout = self.layout + ob = context.object + field = ob.field + + layout.itemR(field, "type") + + if field.type != "NONE": + layout.itemR(field, "strength") + + if field.type in ("HARMONIC", "SPHERICAL", "CHARGE", "LENNARDj"): + if ob.type in ("MESH", "SURFACE", "FONT", "CURVE"): + layout.itemR(field, "surface") + +class PHYSICS_PT_collision(PhysicButtonsPanel): + __idname__ = "PHYSICS_PT_collision" + __label__ = "Collision" + __default_closed__ = True + + def poll(self, context): + ob = context.object + return (ob and ob.type == 'MESH') + + def draw_header(self, context): + settings = context.object.collision + self.layout.itemR(settings, "enabled", text="") + + def draw(self, context): + layout = self.layout + md = context.collision + settings = context.object.collision + + layout.active = settings.enabled + + split = layout.split() + + col = split.column() + col.itemL(text="Damping:") + col.itemR(settings, "damping_factor", text="Factor"); + col.itemR(settings, "random_damping", text="Random"); + + col = split.column() + col.itemL(text="Friction:") + col.itemR(settings, "friction_factor", text="Factor"); + col.itemR(settings, "random_friction", text="Random"); + + layout.itemR(settings, "permeability"); + layout.itemR(settings, "kill_particles"); + +bpy.types.register(PHYSICS_PT_field) +bpy.types.register(PHYSICS_PT_collision) diff --git a/release/ui/buttons_physics_fluid.py b/release/ui/buttons_physics_fluid.py new file mode 100644 index 00000000000..2ab33b4a416 --- /dev/null +++ b/release/ui/buttons_physics_fluid.py @@ -0,0 +1,223 @@ + +import bpy + +class PhysicButtonsPanel(bpy.types.Panel): + __space_type__ = "BUTTONS_WINDOW" + __region_type__ = "WINDOW" + __context__ = "physics" + + def poll(self, context): + ob = context.object + return (ob and ob.type == 'MESH') + +class PHYSICS_PT_fluid(PhysicButtonsPanel): + __idname__ = "PHYSICS_PT_fluid" + __label__ = "Fluid" + + def draw(self, context): + layout = self.layout + md = context.fluid + ob = context.object + + split = layout.split() + split.operator_context = "EXEC_DEFAULT" + + if md: + # remove modifier + settings + split.set_context_pointer("modifier", md) + split.itemO("OBJECT_OT_modifier_remove", text="Remove") + + row = split.row(align=True) + row.itemR(md, "render", text="") + row.itemR(md, "realtime", text="") + else: + # add modifier + split.item_enumO("OBJECT_OT_modifier_add", "type", "FLUID_SIMULATION", text="Add") + split.itemL() + + if md: + fluid = md.settings + + col = layout.column(align=True) + row = col.row() + row.item_enumR(fluid, "type", "DOMAIN") + row.item_enumR(fluid, "type", "FLUID") + row.item_enumR(fluid, "type", "OBSTACLE") + row = col.row() + row.item_enumR(fluid, "type", "INFLOW") + row.item_enumR(fluid, "type", "OUTFLOW") + row.item_enumR(fluid, "type", "PARTICLE") + row.item_enumR(fluid, "type", "CONTROL") + + if fluid.type == 'DOMAIN': + layout.itemO("FLUID_OT_bake", text="BAKE") + layout.itemL(text="Required Memory: " + fluid.memory_estimate) + + layout.itemL(text="Resolution:") + + split = layout.split() + + col = split.column() + colsub = col.column(align=True) + colsub.itemR(fluid, "resolution", text="Final") + colsub.itemR(fluid, "render_display_mode", text="") + colsub = col.column(align=True) + colsub.itemL(text="Time:") + colsub.itemR(fluid, "start_time", text="Start") + colsub.itemR(fluid, "end_time", text="End") + + col = split.column() + colsub = col.column(align=True) + colsub.itemR(fluid, "preview_resolution", text="Preview", slider=True) + colsub.itemR(fluid, "viewport_display_mode", text="") + colsub = col.column() + colsub.itemR(fluid, "reverse_frames") + colsub.itemR(fluid, "generate_speed_vectors") + colsub.itemR(fluid, "path", text="") + + if fluid.type in ('FLUID', 'OBSTACLE', 'INFLOW', 'OUTFLOW'): + layout.itemR(fluid, "volume_initialization") + + if fluid.type == 'FLUID': + row = layout.row() + row.column().itemR(fluid, "initial_velocity") + row.itemR(fluid, "export_animated_mesh") + + if fluid.type == 'OBSTACLE': + row = layout.row() + row.itemL() + row.itemR(fluid, "export_animated_mesh") + layout.itemR(fluid, "slip_type", expand=True) + if fluid.slip_type == 'PARTIALSLIP': + layout.itemR(fluid, "partial_slip_amount", text="Amount") + + layout.itemR(fluid, "impact_factor") + + if fluid.type == 'INFLOW': + row = layout.row() + row.column().itemR(fluid, "inflow_velocity") + row.itemR(fluid, "export_animated_mesh") + layout.itemR(fluid, "local_coordinates") + + if fluid.type == 'OUTFLOW': + row = layout.row() + row.itemL() + row.itemR(fluid, "export_animated_mesh") + + if fluid.type == 'PARTICLE': + split = layout.split() + + col = split.column() + col.itemL(text="Type:") + col.itemR(fluid, "drops") + col.itemR(fluid, "floats") + col.itemR(fluid, "tracer") + + col = split.column() + col.itemL(text="Influence:") + col.itemR(fluid, "particle_influence", text="Particle") + col.itemR(fluid, "alpha_influence", text="Alpha") + + layout.itemR(fluid, "path") + + if fluid.type == 'CONTROL': + split = layout.split() + + col = split.column() + col.itemL(text="Time:") + col.itemR(fluid, "start_time", text="Start") + col.itemR(fluid, "end_time", text="End") + + col = split.column() + col.itemR(fluid, "quality", slider=True) + col.itemR(fluid, "reverse_frames") + + split = layout.split() + + col = split.column() + col.itemL(text="Attraction:") + col.itemR(fluid, "attraction_strength", text="Strength") + col.itemR(fluid, "attraction_radius", text="Radius") + + col = split.column() + col.itemL(text="Velocity:") + col.itemR(fluid, "velocity_strength", text="Strength") + col.itemR(fluid, "velocity_radius", text="Radius") + +class PHYSICS_PT_domain_gravity(PhysicButtonsPanel): + __idname__ = "PHYSICS_PT_domain_gravity" + __label__ = "Domain World/Gravity" + __default_closed__ = True + + def poll(self, context): + md = context.fluid + if md: + return (md.settings.type == 'DOMAIN') + + def draw(self, context): + layout = self.layout + fluid = context.fluid.settings + + split = layout.split() + + col = split.column() + col.itemR(fluid, "gravity") + + col = split.column(align=True) + col.itemL(text="Viscosity:") + col.itemR(fluid, "viscosity_preset", text="") + if fluid.viscosity_preset == 'MANUAL': + col.itemR(fluid, "viscosity_base", text="Base") + col.itemR(fluid, "viscosity_exponent", text="Exponent") + + col = layout.column_flow() + col.itemR(fluid, "real_world_size") + col.itemR(fluid, "grid_levels") + col.itemR(fluid, "compressibility") + +class PHYSICS_PT_domain_boundary(PhysicButtonsPanel): + __idname__ = "PHYSICS_PT_domain_boundary" + __label__ = "Domain Boundary" + __default_closed__ = True + + def poll(self, context): + md = context.fluid + if md: + return (md.settings.type == 'DOMAIN') + + def draw(self, context): + layout = self.layout + fluid = context.fluid.settings + + layout.itemL(text="Slip:") + + layout.itemR(fluid, "slip_type", expand=True) + if fluid.slip_type == 'PARTIALSLIP': + layout.itemR(fluid, "partial_slip_amount", text="Amount") + + layout.itemL(text="Surface:") + row = layout.row() + row.itemR(fluid, "surface_smoothing", text="Smoothing") + row.itemR(fluid, "surface_subdivisions", text="Subdivisions") + +class PHYSICS_PT_domain_particles(PhysicButtonsPanel): + __idname__ = "PHYSICS_PT_domain_particles" + __label__ = "Domain Particles" + __default_closed__ = True + + def poll(self, context): + md = context.fluid + if md: + return (md.settings.type == 'DOMAIN') + + def draw(self, context): + layout = self.layout + fluid = context.fluid.settings + + layout.itemR(fluid, "tracer_particles") + layout.itemR(fluid, "generate_particles") + +bpy.types.register(PHYSICS_PT_fluid) +bpy.types.register(PHYSICS_PT_domain_gravity) +bpy.types.register(PHYSICS_PT_domain_boundary) +bpy.types.register(PHYSICS_PT_domain_particles) diff --git a/release/ui/buttons_physics_softbody.py b/release/ui/buttons_physics_softbody.py new file mode 100644 index 00000000000..774f7f67979 --- /dev/null +++ b/release/ui/buttons_physics_softbody.py @@ -0,0 +1,219 @@ + +import bpy + +class PhysicButtonsPanel(bpy.types.Panel): + __space_type__ = "BUTTONS_WINDOW" + __region_type__ = "WINDOW" + __context__ = "physics" + + def poll(self, context): + ob = context.object + return (ob and ob.type == 'MESH') + +class PHYSICS_PT_softbody(PhysicButtonsPanel): + __idname__ = "PHYSICS_PT_softbody" + __label__ = "Soft Body" + + def draw(self, context): + layout = self.layout + md = context.soft_body + ob = context.object + + split = layout.split() + split.operator_context = "EXEC_DEFAULT" + + if md: + # remove modifier + settings + split.set_context_pointer("modifier", md) + split.itemO("OBJECT_OT_modifier_remove", text="Remove") + + row = split.row(align=True) + row.itemR(md, "render", text="") + row.itemR(md, "realtime", text="") + else: + # add modifier + split.item_enumO("OBJECT_OT_modifier_add", "type", "SOFTBODY", text="Add") + split.itemL("") + + if md: + softbody = md.settings + + # General + split = layout.split() + + col = split.column() + col.itemL(text="Object:") + col.itemR(softbody, "mass") + col.itemR(softbody, "friction") + + col = split.column() + col.itemL(text="Simulation:") + col.itemR(softbody, "gravity") + col.itemR(softbody, "speed") + + +class PHYSICS_PT_softbody_goal(PhysicButtonsPanel): + __idname__ = "PHYSICS_PT_softbody_goal" + __label__ = "Soft Body Goal" + + def poll(self, context): + return (context.soft_body != None) + + def draw_header(self, context): + layout = self.layout + softbody = context.soft_body.settings + + layout.itemR(softbody, "use_goal", text="") + + def draw(self, context): + layout = self.layout + md = context.soft_body + ob = context.object + + split = layout.split() + + if md: + softbody = md.settings + layout.active = softbody.use_goal + + # Goal + split = layout.split() + + col = split.column() + col.itemL(text="Goal Strengths:") + col.itemR(softbody, "goal_default", text="Default") + subcol = col.column(align=True) + subcol.itemR(softbody, "goal_min", text="Minimum") + subcol.itemR(softbody, "goal_max", text="Maximum") + + col = split.column() + col.itemL(text="Goal Settings:") + col.itemR(softbody, "goal_spring", text="Stiffness") + col.itemR(softbody, "goal_friction", text="Damping") + layout.item_pointerR(softbody, "goal_vertex_group", ob, "vertex_groups", text="Vertex Group") + +class PHYSICS_PT_softbody_edge(PhysicButtonsPanel): + __idname__ = "PHYSICS_PT_softbody_edge" + __label__ = "Soft Body Edges" + + def poll(self, context): + return (context.soft_body != None) + + def draw_header(self, context): + layout = self.layout + softbody = context.soft_body.settings + + layout.itemR(softbody, "use_edges", text="") + + def draw(self, context): + layout = self.layout + md = context.soft_body + ob = context.object + + split = layout.split() + + if md: + softbody = md.settings + + layout.active = softbody.use_edges + + split = layout.split() + + col = split.column() + col.itemL(text="Springs:") + col.itemR(softbody, "pull") + col.itemR(softbody, "push") + col.itemR(softbody, "damp") + col.itemR(softbody, "plastic") + col.itemR(softbody, "bending") + col.itemR(softbody, "spring_length", text="Length") + + col = split.column() + col.itemR(softbody, "stiff_quads") + subcol = col.column() + subcol.active = softbody.stiff_quads + subcol.itemR(softbody, "shear") + + col.itemR(softbody, "new_aero", text="Aero") + subcol = col.column() + subcol.active = softbody.new_aero + subcol.itemR(softbody, "aero", text="Factor", enabled=softbody.new_aero) + + col.itemL(text="Collision:") + col.itemR(softbody, "edge_collision", text="Edge") + col.itemR(softbody, "face_collision", text="Face") + +class PHYSICS_PT_softbody_collision(PhysicButtonsPanel): + __idname__ = "PHYSICS_PT_softbody_collision" + __label__ = "Soft Body Collision" + + def poll(self, context): + return (context.soft_body != None) + + def draw_header(self, context): + layout = self.layout + softbody = context.soft_body.settings + + layout.itemR(softbody, "self_collision", text="") + + def draw(self, context): + layout = self.layout + md = context.soft_body + ob = context.object + + split = layout.split() + + if md: + softbody = md.settings + + layout.active = softbody.self_collision + layout.itemL(text="Collision Type:") + layout.itemR(softbody, "collision_type", expand=True) + + col = layout.column(align=True) + col.itemL(text="Ball:") + col.itemR(softbody, "ball_size", text="Size") + col.itemR(softbody, "ball_stiff", text="Stiffness") + col.itemR(softbody, "ball_damp", text="Dampening") + +class PHYSICS_PT_softbody_solver(PhysicButtonsPanel): + __idname__ = "PHYSICS_PT_softbody_solver" + __label__ = "Soft Body Solver" + + def poll(self, context): + return (context.soft_body != None) + + def draw(self, context): + layout = self.layout + md = context.soft_body + ob = context.object + + split = layout.split() + + if md: + softbody = md.settings + + # Solver + split = layout.split() + + col = split.column(align=True) + col.itemL(text="Step Size:") + col.itemR(softbody, "minstep") + col.itemR(softbody, "maxstep") + col.itemR(softbody, "auto_step", text="Auto-Step") + + col = split.column() + col.itemR(softbody, "error_limit") + + col.itemL(text="Helpers:") + col.itemR(softbody, "choke") + col.itemR(softbody, "fuzzy") + + layout.itemL(text="Diagnostics:") + layout.itemR(softbody, "diagnose") + +bpy.types.register(PHYSICS_PT_softbody) +bpy.types.register(PHYSICS_PT_softbody_goal) +bpy.types.register(PHYSICS_PT_softbody_edge) +bpy.types.register(PHYSICS_PT_softbody_collision) +bpy.types.register(PHYSICS_PT_softbody_solver) diff --git a/release/ui/space_buttons.py b/release/ui/space_buttons.py new file mode 100644 index 00000000000..cae9a813433 --- /dev/null +++ b/release/ui/space_buttons.py @@ -0,0 +1,36 @@ + +import bpy + +class Buttons_HT_header(bpy.types.Header): + __space_type__ = "BUTTONS_WINDOW" + __idname__ = "BUTTONS_HT_header" + + def draw(self, context): + layout = self.layout + + so = context.space_data + scene = context.scene + + layout.template_header() + + if context.area.show_menus: + row = layout.row(align=True) + row.itemM("Buttons_MT_view", text="View") + + row = layout.row() + row.itemR(so, "buttons_context", expand=True, text="") + row.itemR(scene, "current_frame") + +class Buttons_MT_view(bpy.types.Menu): + __space_type__ = "BUTTONS_WINDOW" + __label__ = "View" + + def draw(self, context): + layout = self.layout + so = context.space_data + + col = layout.column() + col.itemR(so, "panel_alignment", expand=True) + +bpy.types.register(Buttons_HT_header) +bpy.types.register(Buttons_MT_view) diff --git a/release/ui/space_filebrowser.py b/release/ui/space_filebrowser.py new file mode 100644 index 00000000000..0c37e8c0816 --- /dev/null +++ b/release/ui/space_filebrowser.py @@ -0,0 +1,67 @@ + +import bpy + + +class FILEBROWSER_HT_header(bpy.types.Header): + __space_type__ = "FILE_BROWSER" + __idname__ = "FILEBROWSER_HT_header" + + def draw(self, context): + st = context.space_data + layout = self.layout + + params = st.params + layout.template_header() + + if context.area.show_menus: + row = layout.row() + row.itemM("FILEBROWSER_MT_directory") + row.itemM("FILEBROWSER_MT_bookmarks") + + row = layout.row(align=True) + row.itemO("FILE_OT_parent", text="", icon='ICON_FILE_PARENT') + row.itemO("FILE_OT_refresh", text="", icon='ICON_FILE_REFRESH') + row.itemO("FILE_OT_previous", text="", icon='ICON_PREV_KEYFRAME') + row.itemO("FILE_OT_next", text="", icon='ICON_NEXT_KEYFRAME') + + layout.itemR(params, "display", expand=True, text="") + layout.itemR(params, "sort", expand=True, text="") + + layout.itemR(params, "hide_dot") + layout.itemR(params, "do_filter") + + row = layout.row(align=True) + row.itemR(params, "filter_folder", text=""); + row.itemR(params, "filter_blender", text=""); + row.itemR(params, "filter_image", text=""); + row.itemR(params, "filter_movie", text=""); + row.itemR(params, "filter_script", text=""); + row.itemR(params, "filter_font", text=""); + row.itemR(params, "filter_sound", text=""); + row.itemR(params, "filter_text", text=""); + + row.active = params.do_filter + +class FILEBROWSER_MT_directory(bpy.types.Menu): + __space_type__ = "FILE_BROWSER" + __label__ = "Directory" + + def draw(self, context): + layout = self.layout + + layout.itemO("FILE_OT_refresh", text="Refresh", icon='ICON_FILE_REFRESH') + layout.itemO("FILE_OT_parent", text="Parent", icon='ICON_FILE_PARENT') + +class FILEBROWSER_MT_bookmarks(bpy.types.Menu): + __space_type__ = "FILE_BROWSER" + __label__ = "Bookmarks" + + def draw(self, context): + layout = self.layout + + layout.itemO("FILE_OT_add_bookmark", text="Add current directory", icon='ICON_BOOKMARKS') + + +bpy.types.register(FILEBROWSER_HT_header) +bpy.types.register(FILEBROWSER_MT_directory) +bpy.types.register(FILEBROWSER_MT_bookmarks) diff --git a/release/ui/space_image.py b/release/ui/space_image.py new file mode 100644 index 00000000000..ce8257203dc --- /dev/null +++ b/release/ui/space_image.py @@ -0,0 +1,397 @@ + +import bpy + +class IMAGE_MT_view(bpy.types.Menu): + __space_type__ = "IMAGE_EDITOR" + __label__ = "View" + + def draw(self, context): + layout = self.layout + sima = context.space_data + uv = sima.uv_editor + settings = context.scene.tool_settings + + show_uvedit = sima.show_uvedit + + layout.itemO("IMAGE_OT_properties", icon="ICON_MENU_PANEL") + + layout.itemS() + + layout.itemR(sima, "update_automatically") + if show_uvedit: + layout.itemR(settings, "uv_local_view") # Numpad / + + layout.itemS() + + layout.itemO("IMAGE_OT_view_zoom_in") + layout.itemO("IMAGE_OT_view_zoom_out") + + layout.itemS() + + ratios = [[1, 8], [1, 4], [1, 2], [1, 1], [2, 1], [4, 1], [8, 1]]; + + for a, b in ratios: + text = "Zoom %d:%d" % (a, b) + layout.item_floatO("IMAGE_OT_view_zoom_ratio", "ratio", a/b, text=text) + + layout.itemS() + + if show_uvedit: + layout.itemO("IMAGE_OT_view_selected") + + layout.itemO("IMAGE_OT_view_all") + layout.itemO("SCREEN_OT_screen_full_area") + +class IMAGE_MT_select(bpy.types.Menu): + __space_type__ = "IMAGE_EDITOR" + __label__ = "Select" + + def draw(self, context): + layout = self.layout + + layout.itemO("UV_OT_select_border") + layout.item_booleanO("UV_OT_select_border", "pinned", True) + + layout.itemS() + + layout.itemO("UV_OT_select_all_toggle") + layout.itemO("UV_OT_select_inverse") + layout.itemO("UV_OT_unlink_selection") + + layout.itemS() + + layout.itemO("UV_OT_select_pinned") + layout.itemO("UV_OT_select_linked") + +class IMAGE_MT_image(bpy.types.Menu): + __space_type__ = "IMAGE_EDITOR" + __label__ = "Image" + + def draw(self, context): + layout = self.layout + sima = context.space_data + ima = sima.image + + layout.itemO("IMAGE_OT_new") + layout.itemO("IMAGE_OT_open") + + show_render = sima.show_render + + if ima: + if show_render: + layout.itemO("IMAGE_OT_replace") + layout.itemO("IMAGE_OT_reload") + + layout.itemO("IMAGE_OT_save") + layout.itemO("IMAGE_OT_save_as") + + if ima.source == "SEQUENCE": + layout.itemO("IMAGE_OT_save_sequence") + + if not show_render: + layout.itemS() + + if ima.packed_file: + layout.itemO("IMAGE_OT_unpack") + else: + layout.itemO("IMAGE_OT_pack") + + # only for dirty && specific image types, perhaps + # this could be done in operator poll too + if ima.dirty: + if ima.source in ("FILE", "GENERATED") and ima.type != "MULTILAYER": + layout.item_booleanO("IMAGE_OT_pack", "as_png", True, text="Pack As PNG") + + layout.itemS() + + layout.itemR(sima, "image_painting") + +class IMAGE_MT_uvs_showhide(bpy.types.Menu): + __space_type__ = "IMAGE_EDITOR" + __label__ = "Show/Hide Faces" + + def draw(self, context): + layout = self.layout + + layout.itemO("UV_OT_reveal") + layout.itemO("UV_OT_hide") + layout.item_booleanO("UV_OT_hide", "unselected", True) + +class IMAGE_MT_uvs_transform(bpy.types.Menu): + __space_type__ = "IMAGE_EDITOR" + __label__ = "Transform" + + def draw(self, context): + layout = self.layout + + layout.item_enumO("TFM_OT_transform", "mode", "TRANSLATION") + layout.item_enumO("TFM_OT_transform", "mode", "ROTATION") + layout.item_enumO("TFM_OT_transform", "mode", "RESIZE") + +class IMAGE_MT_uvs_mirror(bpy.types.Menu): + __space_type__ = "IMAGE_EDITOR" + __label__ = "Mirror" + + def draw(self, context): + layout = self.layout + + layout.item_enumO("UV_OT_mirror", "axis", "MIRROR_X") # "X Axis", M, + layout.item_enumO("UV_OT_mirror", "axis", "MIRROR_Y") # "Y Axis", M, + +class IMAGE_MT_uvs_weldalign(bpy.types.Menu): + __space_type__ = "IMAGE_EDITOR" + __label__ = "Weld/Align" + + def draw(self, context): + layout = self.layout + + layout.itemO("UV_OT_weld") # W, 1 + layout.items_enumO("UV_OT_align", "axis") # W, 2/3/4 + + +class IMAGE_MT_uvs(bpy.types.Menu): + __space_type__ = "IMAGE_EDITOR" + __label__ = "UVs" + + def draw(self, context): + layout = self.layout + sima = context.space_data + uv = sima.uv_editor + settings = context.scene.tool_settings + + layout.itemR(uv, "snap_to_pixels") + layout.itemR(uv, "constrain_to_image_bounds") + + layout.itemS() + + layout.itemR(uv, "live_unwrap") + layout.itemO("UV_OT_unwrap") + layout.item_booleanO("UV_OT_pin", "clear", True, text="Unpin") + layout.itemO("UV_OT_pin") + + layout.itemS() + + layout.itemO("UV_OT_pack_islands") + layout.itemO("UV_OT_average_islands_scale") + layout.itemO("UV_OT_minimize_stretch") + layout.itemO("UV_OT_stitch") + + layout.itemS() + + layout.itemM("IMAGE_MT_uvs_transform") + layout.itemM("IMAGE_MT_uvs_mirror") + layout.itemM("IMAGE_MT_uvs_weldalign") + + layout.itemS() + + layout.itemR(settings, "proportional_editing") + layout.item_menu_enumR(settings, "proportional_editing_falloff") + + layout.itemS() + + layout.itemM("IMAGE_MT_uvs_showhide") + +class IMAGE_HT_header(bpy.types.Header): + __space_type__ = "IMAGE_EDITOR" + + def draw(self, context): + sima = context.space_data + ima = sima.image + iuser = sima.image_user + layout = self.layout + settings = context.scene.tool_settings + + show_render = sima.show_render + show_paint = sima.show_paint + show_uvedit = sima.show_uvedit + + layout.template_header() + + # menus + if context.area.show_menus: + row = layout.row() + row.itemM("IMAGE_MT_view") + + if show_uvedit: + row.itemM("IMAGE_MT_select") + + if ima and ima.dirty: + row.itemM("IMAGE_MT_image", text="Image*") + else: + row.itemM("IMAGE_MT_image", text="Image") + + if show_uvedit: + row.itemM("IMAGE_MT_uvs") + + layout.template_ID(sima, "image", new="IMAGE_OT_new", open="IMAGE_OT_open") + + """ + /* image select */ + + pinflag= (show_render)? 0: UI_ID_PIN; + xco= uiDefIDPoinButs(block, CTX_data_main(C), NULL, (ID*)sima->image, ID_IM, &sima->pin, xco, yco, + sima_idpoin_handle, UI_ID_BROWSE|UI_ID_BROWSE_RENDER|UI_ID_RENAME|UI_ID_ADD_NEW|UI_ID_OPEN|UI_ID_DELETE|pinflag); + xco += 8; + """ + + """ + if(ima && !ELEM3(ima->source, IMA_SRC_SEQUENCE, IMA_SRC_MOVIE, IMA_SRC_VIEWER) && ima->ok) { + /* XXX this should not be a static var */ + static int headerbuttons_packdummy; + + headerbuttons_packdummy = 0; + + if (ima->packedfile) { + headerbuttons_packdummy = 1; + } + if (ima->packedfile && ibuf && (ibuf->userflags & IB_BITMAPDIRTY)) + uiDefIconButBitI(block, TOG, 1, 0 /* XXX B_SIMA_REPACK */, ICON_UGLYPACKAGE, xco,yco,XIC,YIC, &headerbuttons_packdummy, 0, 0, 0, 0, "Re-Pack this image as PNG"); + else + uiDefIconButBitI(block, TOG, 1, 0 /* XXX B_SIMAPACKIMA */, ICON_PACKAGE, xco,yco,XIC,YIC, &headerbuttons_packdummy, 0, 0, 0, 0, "Pack/Unpack this image"); + + xco+= XIC+8; + } + """ + + # uv editing + if show_uvedit: + uvedit = sima.uv_editor + + layout.itemR(uvedit, "pivot", text="") + layout.itemR(settings, "uv_sync_selection", text="") + + if settings.uv_sync_selection: + layout.itemR(settings, "mesh_selection_mode", text="", expand=True) + else: + layout.itemR(settings, "uv_selection_mode", text="", expand=True) + layout.itemR(uvedit, "sticky_selection_mode", text="") + pass + + row = layout.row(align=True) + row.itemR(settings, "snap", text="") + if settings.snap: + row.itemR(settings, "snap_mode", text="") + + """ + mesh = context.edit_object.data + row.item_pointerR(mesh, "active_uv_layer", mesh, "uv_layers") + """ + + if ima: + # layers + layout.template_image_layers(ima, iuser) + + # painting + layout.itemR(sima, "image_painting", text="") + + # draw options + row = layout.row(align=True) + row.itemR(sima, "draw_channels", text="", expand=True) + + row = layout.row(align=True) + if ima.type == "COMPOSITE": + row.itemO("IMAGE_OT_record_composite", icon="ICON_REC") + if ima.type == "COMPOSITE" and ima.source in ("MOVIE", "SEQUENCE"): + row.itemO("IMAGE_OT_play_composite", icon="ICON_PLAY") + + layout.itemR(sima, "update_automatically", text="") + +class IMAGE_PT_game_properties(bpy.types.Panel): + __space_type__ = "IMAGE_EDITOR" + __region_type__ = "UI" + __label__ = "Game Properties" + + def poll(self, context): + sima = context.space_data + return (sima and sima.image) + + def draw(self, context): + sima = context.space_data + layout = self.layout + + ima = sima.image + + if ima: + split = layout.split() + + col = split.column() + + subcol = col.column(align=True) + subcol.itemR(ima, "clamp_x") + subcol.itemR(ima, "clamp_y") + + col.itemR(ima, "mapping", expand=True) + col.itemR(ima, "tiles") + + col = split.column() + + subcol = col.column(align=True) + subcol.itemR(ima, "animated") + + subcol = subcol.column() + subcol.itemR(ima, "animation_start", text="Start") + subcol.itemR(ima, "animation_end", text="End") + subcol.itemR(ima, "animation_speed", text="Speed") + subcol.active = ima.animated + + subrow = col.row(align=True) + subrow.itemR(ima, "tiles_x", text="X") + subrow.itemR(ima, "tiles_y", text="Y") + subrow.active = ima.tiles or ima.animated + +class IMAGE_PT_view_properties(bpy.types.Panel): + __space_type__ = "IMAGE_EDITOR" + __region_type__ = "UI" + __label__ = "View Properties" + + def poll(self, context): + sima = context.space_data + return (sima and (sima.image or sima.show_uvedit)) + + def draw(self, context): + sima = context.space_data + layout = self.layout + + ima = sima.image + show_uvedit = sima.show_uvedit + uvedit = sima.uv_editor + + split = layout.split() + + col = split.column() + if ima: + col.itemR(ima, "display_aspect") + + col = split.column() + col.itemR(sima, "draw_repeated", text="Repeat") + if show_uvedit: + col.itemR(uvedit, "normalized_coordinates", text="Normalized") + elif show_uvedit: + col.itemR(uvedit, "normalized_coordinates", text="Normalized") + + if show_uvedit: + col = layout.column() + row = col.row() + row.itemR(uvedit, "edge_draw_type", expand=True) + row = col.row() + row.itemR(uvedit, "draw_smooth_edges", text="Smooth") + row.itemR(uvedit, "draw_modified_edges", text="Modified") + + row = col.row() + row.itemR(uvedit, "draw_stretch", text="Stretch") + row.itemR(uvedit, "draw_stretch_type", text="") + #col.itemR(uvedit, "draw_edges") + #col.itemR(uvedit, "draw_faces") + +bpy.types.register(IMAGE_MT_view) +bpy.types.register(IMAGE_MT_select) +bpy.types.register(IMAGE_MT_image) +bpy.types.register(IMAGE_MT_uvs_showhide) +bpy.types.register(IMAGE_MT_uvs_transform) +bpy.types.register(IMAGE_MT_uvs_mirror) +bpy.types.register(IMAGE_MT_uvs_weldalign) +bpy.types.register(IMAGE_MT_uvs) +bpy.types.register(IMAGE_HT_header) +bpy.types.register(IMAGE_PT_game_properties) +bpy.types.register(IMAGE_PT_view_properties) + diff --git a/release/ui/space_info.py b/release/ui/space_info.py new file mode 100644 index 00000000000..de3346711e9 --- /dev/null +++ b/release/ui/space_info.py @@ -0,0 +1,119 @@ + +import bpy + +class INFO_HT_header(bpy.types.Header): + __space_type__ = "USER_PREFERENCES" + __idname__ = "INFO_HT_header" + + def draw(self, context): + st = context.space_data + layout = self.layout + + layout.template_header() + + if context.area.show_menus: + row = layout.row() + row.itemM("INFO_MT_file") + row.itemM("INFO_MT_add") + row.itemM("INFO_MT_timeline") + row.itemM("INFO_MT_game") + row.itemM("INFO_MT_render") + row.itemM("INFO_MT_help") + + layout.template_ID(context.window, "screen") #, new="SCREEN_OT_new", open="SCREEN_OT_unlink") + layout.template_ID(context.screen, "scene") #, new="SCENE_OT_new", unlink="SCENE_OT_unlink") + + layout.itemS() + + layout.template_operator_search() + layout.template_running_jobs() + +class INFO_MT_file(bpy.types.Menu): + __space_type__ = "USER_PREFERENCES" + __label__ = "File" + + def draw(self, context): + layout = self.layout + + layout.operator_context = "EXEC_AREA" + layout.itemO("WM_OT_read_homefile") + layout.operator_context = "INVOKE_AREA" + layout.itemO("WM_OT_open_mainfile") + + layout.itemS() + + layout.operator_context = "EXEC_AREA" + layout.itemO("WM_OT_save_mainfile") + layout.operator_context = "INVOKE_AREA" + layout.itemO("WM_OT_save_as_mainfile") + + layout.itemS() + + layout.itemM("INFO_MT_file_external_data") + +class INFO_MT_file_external_data(bpy.types.Menu): + __space_type__ = "USER_PREFERENCES" + __label__ = "External Data" + + def draw(self, context): + layout = self.layout + + layout.itemO("FILE_OT_pack_all", text="Pack into .blend file") + layout.itemO("FILE_OT_unpack_all", text="Unpack into Files...") + + layout.itemS() + + layout.itemO("FILE_OT_make_paths_relative") + layout.itemO("FILE_OT_make_paths_absolute") + layout.itemO("FILE_OT_report_missing_files") + layout.itemO("FILE_OT_find_missing_files") + +class INFO_MT_add(bpy.types.Menu): + __space_type__ = "USER_PREFERENCES" + __label__ = "Add" + + def draw(self, context): + layout = self.layout + layout.itemL(text="Nothing yet") + +class INFO_MT_timeline(bpy.types.Menu): + __space_type__ = "USER_PREFERENCES" + __label__ = "Timeline" + + def draw(self, context): + layout = self.layout + layout.itemL(text="Nothing yet") + +class INFO_MT_game(bpy.types.Menu): + __space_type__ = "USER_PREFERENCES" + __label__ = "Game" + + def draw(self, context): + layout = self.layout + layout.itemL(text="Nothing yet") + +class INFO_MT_render(bpy.types.Menu): + __space_type__ = "USER_PREFERENCES" + __label__ = "Render" + + def draw(self, context): + layout = self.layout + layout.itemL(text="Nothing yet") + +class INFO_MT_help(bpy.types.Menu): + __space_type__ = "USER_PREFERENCES" + __label__ = "Help" + + def draw(self, context): + layout = self.layout + layout.itemL(text="Nothing yet") + +bpy.types.register(INFO_HT_header) +bpy.types.register(INFO_MT_file) +bpy.types.register(INFO_MT_file_external_data) +bpy.types.register(INFO_MT_add) +bpy.types.register(INFO_MT_timeline) +bpy.types.register(INFO_MT_game) +bpy.types.register(INFO_MT_render) +bpy.types.register(INFO_MT_help) + diff --git a/release/ui/space_logic.py b/release/ui/space_logic.py new file mode 100644 index 00000000000..f862f6e2667 --- /dev/null +++ b/release/ui/space_logic.py @@ -0,0 +1,88 @@ +import bpy + +class LOGIC_PT_physics(bpy.types.Panel): + __space_type__ = "LOGIC_EDITOR" + __region_type__ = "UI" + __label__ = "Physics" + + def poll(self, context): + ob = context.active_object + return ob and ob.game + + def draw(self, context): + layout = self.layout + ob = context.active_object + + game = ob.game + + flow = layout.column_flow() + flow.active = True + flow.itemR(game, "physics_type") + flow.itemR(game, "actor") + + row = layout.row() + row.itemR(game, "ghost") + row.itemR(ob, "restrict_render", text="Invisible") # out of place but useful + + flow = layout.column_flow() + flow.itemR(game, "mass") + flow.itemR(game, "radius") + flow.itemR(game, "no_sleeping") + flow.itemR(game, "damping") + flow.itemR(game, "rotation_damping") + flow.itemR(game, "minimum_velocity") + flow.itemR(game, "maximum_velocity") + + row = layout.row() + row.itemR(game, "do_fh") + row.itemR(game, "rotation_fh") + + flow = layout.column_flow() + flow.itemR(game, "form_factor") + flow.itemR(game, "anisotropic_friction") + + flow = layout.column_flow() + flow.active = game.anisotropic_friction + flow.itemR(game, "friction_coefficients") + + split = layout.split() + sub = split.column() + sub.itemR(game, "lock_x_axis") + sub.itemR(game, "lock_y_axis") + sub.itemR(game, "lock_z_axis") + sub = split.column() + sub.itemR(game, "lock_x_rot_axis") + sub.itemR(game, "lock_y_rot_axis") + sub.itemR(game, "lock_z_rot_axis") + + +class LOGIC_PT_collision_bounds(bpy.types.Panel): + __space_type__ = "LOGIC_EDITOR" + __region_type__ = "UI" + __label__ = "Collision Bounds" + + def poll(self, context): + ob = context.active_object + return ob and ob.game + + def draw_header(self, context): + layout = self.layout + ob = context.active_object + game = ob.game + + layout.itemR(game, "use_collision_bounds", text="") + + def draw(self, context): + layout = self.layout + + ob = context.scene.objects[0] + game = ob.game + + flow = layout.column_flow() + flow.active = game.use_collision_bounds + flow.itemR(game, "collision_bounds") + flow.itemR(game, "collision_compound") + flow.itemR(game, "collision_margin") + +bpy.types.register(LOGIC_PT_physics) +bpy.types.register(LOGIC_PT_collision_bounds) diff --git a/release/ui/space_view3d.py b/release/ui/space_view3d.py new file mode 100644 index 00000000000..c338241d5d7 --- /dev/null +++ b/release/ui/space_view3d.py @@ -0,0 +1,106 @@ + +import bpy + +class VIEW3D_MT_view_navigation(bpy.types.Menu): + __space_type__ = "VIEW_3D" + __label__ = "Navigation" + + def draw(self, context): + layout = self.layout + + # layout.itemO("VIEW3D_OT_view_fly_mode") + # layout.itemS() + + layout.items_enumO("VIEW3D_OT_view_orbit", "type") + + layout.itemS() + + layout.items_enumO("VIEW3D_OT_view_pan", "type") + + layout.itemS() + + layout.item_floatO("VIEW3D_OT_zoom", "delta", 1.0, text="Zoom In") + layout.item_floatO("VIEW3D_OT_zoom", "delta", -1.0, text="Zoom Out") + +class VIEW3D_MT_view(bpy.types.Menu): + __space_type__ = "VIEW_3D" + __label__ = "View" + + def draw(self, context): + layout = self.layout + + layout.itemO("VIEW3D_OT_properties", icon="ICON_MENU_PANEL") + layout.itemO("VIEW3D_OT_toolbar", icon="ICON_MENU_PANEL") + + layout.itemS() + + layout.item_enumO("VIEW3D_OT_viewnumpad", "type", "CAMERA") + layout.item_enumO("VIEW3D_OT_viewnumpad", "type", "TOP") + layout.item_enumO("VIEW3D_OT_viewnumpad", "type", "FRONT") + layout.item_enumO("VIEW3D_OT_viewnumpad", "type", "RIGHT") + + # layout.itemM("VIEW3D_MT_view_cameras", text="Cameras") + + layout.itemS() + + layout.itemO("VIEW3D_OT_view_persportho") + + layout.itemS() + + # layout.itemO("VIEW3D_OT_view_show_all_layers") + + # layout.itemS() + + # layout.itemO("VIEW3D_OT_view_local_view") + # layout.itemO("VIEW3D_OT_view_global_view") + + # layout.itemS() + + layout.itemM("VIEW3D_MT_view_navigation") + # layout.itemM("VIEW3D_MT_view_align", text="Align View") + + layout.itemS() + + layout.operator_context = "INVOKE_REGION_WIN" + + layout.itemO("VIEW3D_OT_clip_border") + layout.itemO("VIEW3D_OT_zoom_border") + + layout.itemS() + + layout.itemO("VIEW3D_OT_view_center") + layout.itemO("VIEW3D_OT_view_all") + + layout.itemS() + + layout.itemO("SCREEN_OT_screen_full_area") + +class VIEW3D_HT_header(bpy.types.Header): + __space_type__ = "VIEW_3D" + + def draw(self, context): + layout = self.layout + + layout.template_header() + + # menus + if context.area.show_menus: + row = layout.row() + row.itemM("VIEW3D_MT_view") + + layout.template_header_3D() + +class VIEW3D_PT_random_panel(bpy.types.Panel): + __space_type__ = "VIEW_3D" + __region_type__ = "UI" + __label__ = "Random Panel" + + def draw(self, context): + layout = self.layout + layout.itemL(text="panel contents") + +bpy.types.register(VIEW3D_MT_view_navigation) +bpy.types.register(VIEW3D_MT_view) +bpy.types.register(VIEW3D_HT_header) +bpy.types.register(VIEW3D_PT_random_panel) + diff --git a/release/ui/space_view3d_toolbar.py b/release/ui/space_view3d_toolbar.py new file mode 100644 index 00000000000..990ba1eb6b6 --- /dev/null +++ b/release/ui/space_view3d_toolbar.py @@ -0,0 +1,254 @@ + +import bpy + +# ********** default tools for objectmode **************** + +class View3DPanel(bpy.types.Panel): + __space_type__ = "VIEW_3D" + __region_type__ = "TOOLS" + __context__ = "objectmode" + +class VIEW3D_PT_tools_objectmode(View3DPanel): + __idname__ = "VIEW3D_PT_tools_objectmode" + __label__ = "Object Tools" + + def draw(self, context): + layout = self.layout + + layout.row().itemO("OBJECT_OT_duplicate") + layout.row().itemO("OBJECT_OT_delete") + layout.row().itemO("OBJECT_OT_mesh_add") + layout.row().itemO("OBJECT_OT_curve_add") + layout.row().itemO("OBJECT_OT_text_add") + layout.row().itemO("OBJECT_OT_surface_add") + +# ********** default tools for editmode_mesh **************** + +class View3DPanel(bpy.types.Panel): + __space_type__ = "VIEW_3D" + __region_type__ = "TOOLS" + __context__ = "editmode_mesh" + +class VIEW3D_PT_tools_editmode_mesh(View3DPanel): + __idname__ = "VIEW3D_PT_tools_editmode_mesh" + __label__ = "Mesh Tools" + + def draw(self, context): + layout = self.layout + + layout.row().itemO("MESH_OT_duplicate") + layout.row().itemO("MESH_OT_delete") + layout.row().itemO("MESH_OT_spin") + layout.row().itemO("MESH_OT_screw") + layout.row().itemO("MESH_OT_primitive_plane_add") + layout.row().itemO("MESH_OT_primitive_cube_add") + layout.row().itemO("MESH_OT_primitive_circle_add") + layout.row().itemO("MESH_OT_primitive_cylinder_add") + +# ********** default tools for editmode_curve **************** + +class View3DPanel(bpy.types.Panel): + __space_type__ = "VIEW_3D" + __region_type__ = "TOOLS" + __context__ = "editmode_curve" + +class VIEW3D_PT_tools_editmode_curve(View3DPanel): + __idname__ = "VIEW3D_PT_tools_editmode_curve" + __label__ = "Curve Tools" + + def draw(self, context): + layout = self.layout + + layout.row().itemO("CURVE_OT_duplicate") + layout.row().itemO("CURVE_OT_delete") + layout.row().itemO("OBJECT_OT_curve_add") + layout.row().itemO("CURVE_OT_subdivide") + +# ********** default tools for editmode_surface **************** + +class View3DPanel(bpy.types.Panel): + __space_type__ = "VIEW_3D" + __region_type__ = "TOOLS" + __context__ = "editmode_surface" + +class VIEW3D_PT_tools_editmode_surface(View3DPanel): + __idname__ = "VIEW3D_PT_tools_editmode_surface" + __label__ = "Surface Tools" + + def draw(self, context): + layout = self.layout + + layout.row().itemO("CURVE_OT_duplicate") + layout.row().itemO("CURVE_OT_delete") + layout.row().itemO("OBJECT_OT_surface_add") + layout.row().itemO("CURVE_OT_subdivide") + +# ********** default tools for editmode_text **************** + +class View3DPanel(bpy.types.Panel): + __space_type__ = "VIEW_3D" + __region_type__ = "TOOLS" + __context__ = "editmode_text" + +class VIEW3D_PT_tools_editmode_text(View3DPanel): + __idname__ = "VIEW3D_PT_tools_editmode_text" + __label__ = "Text Tools" + + def draw(self, context): + layout = self.layout + + layout.row().itemO("FONT_OT_text_copy") + layout.row().itemO("FONT_OT_text_paste") + layout.row().itemO("FONT_OT_case_set") + layout.row().itemO("FONT_OT_style_toggle") + +# ********** default tools for editmode_armature **************** + +class View3DPanel(bpy.types.Panel): + __space_type__ = "VIEW_3D" + __region_type__ = "TOOLS" + __context__ = "editmode_armature" + +class VIEW3D_PT_tools_editmode_armature(View3DPanel): + __idname__ = "VIEW3D_PT_tools_editmode_armature" + __label__ = "Armature Tools" + + def draw(self, context): + layout = self.layout + + layout.row().itemO("ARMATURE_OT_duplicate_selected") + layout.row().itemO("ARMATURE_OT_bone_primitive_add") + layout.row().itemO("ARMATURE_OT_delete") + layout.row().itemO("ARMATURE_OT_parent_clear") + +# ********** default tools for editmode_mball **************** + +class View3DPanel(bpy.types.Panel): + __space_type__ = "VIEW_3D" + __region_type__ = "TOOLS" + __context__ = "editmode_mball" + +class VIEW3D_PT_tools_editmode_mball(View3DPanel): + __idname__ = "VIEW3D_PT_tools_editmode_mball" + __label__ = "Meta Tools" + + def draw(self, context): + layout = self.layout + + row = layout.row() + +# ********** default tools for editmode_lattice **************** + +class View3DPanel(bpy.types.Panel): + __space_type__ = "VIEW_3D" + __region_type__ = "TOOLS" + __context__ = "editmode_lattice" + +class VIEW3D_PT_tools_editmode_lattice(View3DPanel): + __idname__ = "VIEW3D_PT_tools_editmode_lattice" + __label__ = "Lattice Tools" + + def draw(self, context): + layout = self.layout + + row = layout.row() + +# ********** default tools for posemode **************** + +class View3DPanel(bpy.types.Panel): + __space_type__ = "VIEW_3D" + __region_type__ = "TOOLS" + __context__ = "posemode" + +class VIEW3D_PT_tools_posemode(View3DPanel): + __idname__ = "VIEW3D_PT_tools_posemode" + __label__ = "Pose Tools" + + def draw(self, context): + layout = self.layout + + layout.row().itemO("POSE_OT_hide") + layout.row().itemO("POSE_OT_reveal") + layout.row().itemO("POSE_OT_rot_clear") + layout.row().itemO("POSE_OT_loc_clear") + +# ********** default tools for sculptmode **************** + +class View3DPanel(bpy.types.Panel): + __space_type__ = "VIEW_3D" + __region_type__ = "TOOLS" + __context__ = "sculptmode" + +class VIEW3D_PT_tools_sculptmode(View3DPanel): + __idname__ = "VIEW3D_PT_tools_sculptmode" + __label__ = "Sculpt Tools" + + def draw(self, context): + layout = self.layout + + layout.row().itemO("SCULPT_OT_radial_control") + +# ********** default tools for weightpaint **************** + +class View3DPanel(bpy.types.Panel): + __space_type__ = "VIEW_3D" + __region_type__ = "TOOLS" + __context__ = "weightpaint" + +class VIEW3D_PT_tools_weightpaint(View3DPanel): + __idname__ = "VIEW3D_PT_tools_weightpaint" + __label__ = "Weight Paint Tools" + + def draw(self, context): + layout = self.layout + + layout.row().itemO("PAINT_OT_weight_paint_radial_control") + +# ********** default tools for vertexpaint **************** + +class View3DPanel(bpy.types.Panel): + __space_type__ = "VIEW_3D" + __region_type__ = "TOOLS" + __context__ = "vertexpaint" + +class VIEW3D_PT_tools_vertexpaint(View3DPanel): + __idname__ = "VIEW3D_PT_tools_vertexpaint" + __label__ = "Vertex Paint Tools" + + def draw(self, context): + layout = self.layout + + layout.row().itemO("PAINT_OT_vertex_paint_radial_control") + +# ********** default tools for texturepaint **************** + +class View3DPanel(bpy.types.Panel): + __space_type__ = "VIEW_3D" + __region_type__ = "TOOLS" + __context__ = "texturepaint" + +class VIEW3D_PT_tools_texturepaint(View3DPanel): + __idname__ = "VIEW3D_PT_tools_texturepaint" + __label__ = "Texture Paint Tools" + + def draw(self, context): + layout = self.layout + + layout.row().itemO("PAINT_OT_texture_paint_radial_control") + + +bpy.types.register(VIEW3D_PT_tools_objectmode) +bpy.types.register(VIEW3D_PT_tools_editmode_mesh) +bpy.types.register(VIEW3D_PT_tools_editmode_curve) +bpy.types.register(VIEW3D_PT_tools_editmode_surface) +bpy.types.register(VIEW3D_PT_tools_editmode_text) +bpy.types.register(VIEW3D_PT_tools_editmode_armature) +bpy.types.register(VIEW3D_PT_tools_editmode_mball) +bpy.types.register(VIEW3D_PT_tools_editmode_lattice) +bpy.types.register(VIEW3D_PT_tools_posemode) +bpy.types.register(VIEW3D_PT_tools_sculptmode) +bpy.types.register(VIEW3D_PT_tools_weightpaint) +bpy.types.register(VIEW3D_PT_tools_vertexpaint) +bpy.types.register(VIEW3D_PT_tools_texturepaint) + + |