Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'release/ui')
-rw-r--r--release/ui/buttons_data_armature.py126
-rw-r--r--release/ui/buttons_data_bone.py52
-rw-r--r--release/ui/buttons_data_camera.py86
-rw-r--r--release/ui/buttons_data_curve.py144
-rw-r--r--release/ui/buttons_data_empty.py24
-rw-r--r--release/ui/buttons_data_lamp.py249
-rw-r--r--release/ui/buttons_data_lattice.py50
-rw-r--r--release/ui/buttons_data_mesh.py47
-rw-r--r--release/ui/buttons_data_modifier.py418
-rw-r--r--release/ui/buttons_data_text.py124
-rw-r--r--release/ui/buttons_material.py226
-rw-r--r--release/ui/buttons_object_constraint.py550
-rw-r--r--release/ui/buttons_objects.py135
-rw-r--r--release/ui/buttons_particle.py630
-rw-r--r--release/ui/buttons_physic_cloth.py111
-rw-r--r--release/ui/buttons_scene.py253
-rw-r--r--release/ui/buttons_texture.py499
-rw-r--r--release/ui/buttons_world.py175
-rw-r--r--release/ui/space_outliner.py52
-rw-r--r--release/ui/space_sequencer.py467
-rw-r--r--release/ui/space_text.py146
21 files changed, 4564 insertions, 0 deletions
diff --git a/release/ui/buttons_data_armature.py b/release/ui/buttons_data_armature.py
new file mode 100644
index 00000000000..fd317baf861
--- /dev/null
+++ b/release/ui/buttons_data_armature.py
@@ -0,0 +1,126 @@
+
+import bpy
+
+class DataButtonsPanel(bpy.types.Panel):
+ __space_type__ = "BUTTONS_WINDOW"
+ __region_type__ = "WINDOW"
+ __context__ = "data"
+
+ def poll(self, context):
+ return (context.armature != None)
+
+class DATA_PT_skeleton(DataButtonsPanel):
+ __idname__ = "DATA_PT_skeleton"
+ __label__ = "Skeleton"
+
+ def draw(self, context):
+ ob = context.object
+ arm = context.armature
+ space = context.space_data
+ layout = self.layout
+
+ split = layout.split(percentage=0.65)
+
+ if ob:
+ split.template_ID(context, ob, "data")
+ split.itemS()
+ elif arm:
+ split.template_ID(context, space, "pin_id")
+ split.itemS()
+
+ if arm:
+ layout.itemS()
+ layout.itemR(arm, "rest_position")
+
+ split = layout.split()
+
+ sub = split.column()
+ sub.itemL(text="Deform:")
+ sub.itemR(arm, "deform_vertexgroups", text="Vertes Groups")
+ sub.itemR(arm, "deform_envelope", text="Envelopes")
+ sub.itemR(arm, "deform_quaternion", text="Quaternion")
+ sub.itemR(arm, "deform_bbone_rest", text="B-Bones Rest")
+ #sub.itemR(arm, "x_axis_mirror")
+ #sub.itemR(arm, "auto_ik")
+
+ sub = split.column()
+ sub.itemL(text="Layers:")
+ sub.itemL(text="LAYERS")
+ #sub.itemR(arm, "layer")
+ #sub.itemR(arm, "layer_protection")
+
+class DATA_PT_display(DataButtonsPanel):
+ __idname__ = "DATA_PT_display"
+ __label__ = "Display"
+
+ def draw(self, context):
+ arm = context.armature
+ layout = self.layout
+
+ split = layout.split()
+
+ sub = split.column()
+ sub.itemR(arm, "drawtype", text="Style")
+ sub.itemR(arm, "delay_deform", text="Delay Refresh")
+
+ sub = split.column()
+ sub.itemR(arm, "draw_names", text="Names")
+ sub.itemR(arm, "draw_axes", text="Axes")
+ sub.itemR(arm, "draw_custom_bone_shapes", text="Shapes")
+ sub.itemR(arm, "draw_group_colors", text="Colors")
+
+class DATA_PT_paths(DataButtonsPanel):
+ __idname__ = "DATA_PT_paths"
+ __label__ = "Paths"
+
+ def draw(self, context):
+ arm = context.armature
+ layout = self.layout
+
+ split = layout.split()
+
+ sub = split.column()
+ sub.itemR(arm, "paths_show_around_current_frame", text="Around Frame")
+ if (arm.paths_show_around_current_frame):
+ sub.itemR(arm, "path_before_current", text="Before")
+ sub.itemR(arm, "path_after_current", text="After")
+ else:
+ sub.itemR(arm, "path_start_frame", text="Start")
+ sub.itemR(arm, "path_end_frame", text="End")
+
+ sub.itemR(arm, "path_size", text="Step")
+ sub.itemR(arm, "paths_calculate_head_positions", text="Head")
+
+ sub = split.column()
+ sub.itemL(text="Show:")
+ sub.itemR(arm, "paths_show_frame_numbers", text="Frame Numbers")
+ sub.itemR(arm, "paths_highlight_keyframes", text="Keyframes")
+ sub.itemR(arm, "paths_show_keyframe_numbers", text="Keyframe Numbers")
+
+class DATA_PT_ghost(DataButtonsPanel):
+ __idname__ = "DATA_PT_ghost"
+ __label__ = "Ghost"
+
+ def draw(self, context):
+ arm = context.armature
+ layout = self.layout
+
+ split = layout.split()
+
+ sub = split.column()
+ sub.itemR(arm, "ghost_type", text="Scope")
+ if arm.ghost_type == 'RANGE':
+ sub.itemR(arm, "ghost_start_frame", text="Start")
+ sub.itemR(arm, "ghost_end_frame", text="End")
+ sub.itemR(arm, "ghost_size", text="Step")
+ elif arm.ghost_type == 'CURRENT_FRAME':
+ sub.itemR(arm, "ghost_step", text="Range")
+ sub.itemR(arm, "ghost_size", text="Step")
+
+ sub = split.column()
+ sub.itemR(arm, "ghost_only_selected", text="Selected Only")
+
+bpy.types.register(DATA_PT_skeleton)
+bpy.types.register(DATA_PT_display)
+bpy.types.register(DATA_PT_paths)
+bpy.types.register(DATA_PT_ghost)
diff --git a/release/ui/buttons_data_bone.py b/release/ui/buttons_data_bone.py
new file mode 100644
index 00000000000..75c201f015e
--- /dev/null
+++ b/release/ui/buttons_data_bone.py
@@ -0,0 +1,52 @@
+
+import bpy
+
+class BoneButtonsPanel(bpy.types.Panel):
+ __space_type__ = "BUTTONS_WINDOW"
+ __region_type__ = "WINDOW"
+ __context__ = "bone"
+
+ def poll(self, context):
+ return (context.bone != None)
+
+class BONE_PT_bone(BoneButtonsPanel):
+ __idname__ = "BONE_PT_bone"
+ __label__ = "Bone"
+
+ def draw(self, context):
+ bone = context.bone
+ layout = self.layout
+
+ split = layout.split()
+
+ sub = split.column()
+ sub.itemR(bone, "name")
+ sub.itemR(bone, "parent")
+ sub.itemR(bone, "connected")
+ sub.itemR(bone, "deform")
+
+ sub.itemL(text="Inherit:")
+ sub.itemR(bone, "hinge")
+ sub.itemR(bone, "inherit_scale")
+
+ sub.itemL(text="Envelope:")
+ sub.itemR(bone, "envelope_distance", text="Distance")
+ sub.itemR(bone, "envelope_weight", text="Weight")
+ sub.itemR(bone, "multiply_vertexgroup_with_envelope", text="Multiply")
+
+ sub = split.column()
+ #sub.itemR(bone, "layer")
+ sub.itemL(text="Display:")
+ sub.itemR(bone, "draw_wire", text="Wireframe")
+ sub.itemR(bone, "editmode_hidden", text="Hide (EditMode)")
+ sub.itemR(bone, "pose_channel_hidden", text="Hide (PoseMode)")
+
+ sub.itemL(text="Curved Bones:")
+ sub.itemR(bone, "bbone_segments", text="Segments")
+ sub.itemR(bone, "bbone_in", text="Ease In")
+ sub.itemR(bone, "bbone_out", text="Ease Out")
+
+ sub.itemR(bone, "cyclic_offset")
+
+bpy.types.register(BONE_PT_bone)
+
diff --git a/release/ui/buttons_data_camera.py b/release/ui/buttons_data_camera.py
new file mode 100644
index 00000000000..362e4f96aa2
--- /dev/null
+++ b/release/ui/buttons_data_camera.py
@@ -0,0 +1,86 @@
+
+import bpy
+
+class DataButtonsPanel(bpy.types.Panel):
+ __space_type__ = "BUTTONS_WINDOW"
+ __region_type__ = "WINDOW"
+ __context__ = "data"
+
+ def poll(self, context):
+ return (context.camera != None)
+
+class DATA_PT_camera(DataButtonsPanel):
+ __idname__ = "DATA_PT_camera"
+ __label__ = "Lens"
+
+ def draw(self, context):
+ ob = context.object
+ cam = context.camera
+ space = context.space_data
+ layout = self.layout
+
+ split = layout.split(percentage=0.65)
+
+ if ob:
+ split.template_ID(context, ob, "data")
+ split.itemS()
+ elif arm:
+ split.template_ID(context, space, "pin_id")
+ split.itemS()
+
+ if cam:
+ layout.itemS()
+ layout.itemR(cam, "type", expand=True)
+
+ row = layout.row(align=True)
+ if cam.type == 'PERSP':
+ row.itemR(cam, "lens_unit", text="")
+ if cam.lens_unit == 'MILLIMETERS':
+ row.itemR(cam, "lens", text="Angle")
+ elif cam.lens_unit == 'DEGREES':
+ row.itemR(cam, "angle")
+
+ elif cam.type == 'ORTHO':
+ row.itemR(cam, "ortho_scale")
+
+ split = layout.split()
+
+ sub = split.column(align=True)
+ sub.itemL(text="Shift:")
+ sub.itemR(cam, "shift_x", text="X")
+ sub.itemR(cam, "shift_y", text="Y")
+
+ sub = split.column(align=True)
+ sub.itemL(text="Clipping:")
+ sub.itemR(cam, "clip_start", text="Start")
+ sub.itemR(cam, "clip_end", text="End")
+
+ row = layout.row()
+ row.itemR(cam, "dof_object")
+ row.itemR(cam, "dof_distance")
+
+class DATA_PT_camera_display(DataButtonsPanel):
+ __idname__ = "DATA_PT_camera_display"
+ __label__ = "Display"
+
+ def draw(self, context):
+ cam = context.camera
+ layout = self.layout
+
+ split = layout.split()
+
+ sub = split.column()
+ sub.itemR(cam, "show_limits", text="Limits")
+ sub.itemR(cam, "show_mist", text="Mist")
+ sub.itemR(cam, "show_title_safe", text="Title Safe")
+ sub.itemR(cam, "show_name", text="Name")
+
+ col = split.column()
+ col.itemR(cam, "show_passepartout", text="Passepartout")
+ colsub = col.column()
+ colsub.active = cam.show_passepartout
+ colsub.itemR(cam, "passepartout_alpha", text="Alpha", slider=True)
+ col.itemR(cam, "draw_size", text="Size")
+
+bpy.types.register(DATA_PT_camera)
+bpy.types.register(DATA_PT_camera_display)
diff --git a/release/ui/buttons_data_curve.py b/release/ui/buttons_data_curve.py
new file mode 100644
index 00000000000..b8b7d6a324f
--- /dev/null
+++ b/release/ui/buttons_data_curve.py
@@ -0,0 +1,144 @@
+
+import bpy
+
+class DataButtonsPanel(bpy.types.Panel):
+ __space_type__ = "BUTTONS_WINDOW"
+ __region_type__ = "WINDOW"
+ __context__ = "data"
+
+ def poll(self, context):
+ ob = context.object
+ return (ob and ob.type == 'CURVE' and context.curve)
+
+class DATA_PT_shape_curve(DataButtonsPanel):
+ __idname__ = "DATA_PT_shape_curve"
+ __label__ = "Shape"
+
+ def draw(self, context):
+ ob = context.object
+ curve = context.curve
+ space = context.space_data
+ layout = self.layout
+
+ split = layout.split(percentage=0.65)
+
+ if ob:
+ split.template_ID(context, ob, "data")
+ split.itemS()
+ elif curve:
+ split.template_ID(context, space, "pin_id")
+ split.itemS()
+
+ if curve:
+ layout.itemS()
+ layout.itemR(curve, "curve_2d")
+
+ split = layout.split()
+
+ col = split.column()
+ colsub = col.column()
+ colsub.active = curve.curve_2d
+ colsub.itemL(text="Caps:")
+ colsub.itemR(curve, "front")
+ colsub.itemR(curve, "back")
+
+ col.itemL(text="Textures:")
+ col.itemR(curve, "uv_orco")
+ col.itemR(curve, "auto_texspace")
+
+ sub = split.column()
+ sub.itemL(text="Resolution:")
+ sub.itemR(curve, "resolution_u", text="Preview U")
+ sub.itemR(curve, "resolution_v", text="Preview V")
+ sub.itemR(curve, "render_resolution_u", text="Render U")
+ sub.itemR(curve, "render_resolution_v", text="Render V")
+
+ sub.itemL(text="Display:")
+ sub.itemL(text="HANDLES")
+ sub.itemL(text="NORMALS")
+ sub.itemR(curve, "vertex_normal_flip")
+
+class DATA_PT_geometry(DataButtonsPanel):
+ __idname__ = "DATA_PT_geometry"
+ __label__ = "Geometry"
+
+ def draw(self, context):
+ curve = context.curve
+ layout = self.layout
+
+ split = layout.split()
+
+ sub = split.column()
+ sub.itemL(text="Modification:")
+ sub.itemR(curve, "width")
+ sub.itemR(curve, "extrude")
+ sub.itemR(curve, "taper_object")
+
+ sub = split.column()
+ sub.itemL(text="Bevel:")
+ sub.itemR(curve, "bevel_depth", text="Depth")
+ sub.itemR(curve, "bevel_resolution", text="Resolution")
+ sub.itemR(curve, "bevel_object")
+
+class DATA_PT_pathanim(DataButtonsPanel):
+ __idname__ = "DATA_PT_pathanim"
+ __label__ = "Path Animation"
+
+ def draw_header(self, context):
+ curve = context.curve
+
+ layout = self.layout
+ layout.itemR(curve, "path", text="")
+
+ def draw(self, context):
+ curve = context.curve
+ layout = self.layout
+ layout.active = curve.path
+
+ split = layout.split()
+
+ sub = split.column()
+ sub.itemR(curve, "path_length", text="Frames")
+ sub.itemR(curve, "follow")
+
+ sub = split.column()
+ sub.itemR(curve, "stretch")
+ sub.itemR(curve, "offset_path_distance", text="Offset Children")
+
+class DATA_PT_current_curve(DataButtonsPanel):
+ __idname__ = "DATA_PT_current_curve"
+ __label__ = "Current Curve"
+
+ def draw(self, context):
+ currentcurve = context.curve.curves[0] # XXX
+ layout = self.layout
+
+ split = layout.split()
+
+ sub = split.column()
+ sub.itemL(text="Cyclic:")
+ sub.itemR(currentcurve, "cyclic_u", text="U")
+ sub.itemR(currentcurve, "cyclic_v", text="V")
+ sub.itemL(text="Order:")
+ sub.itemR(currentcurve, "order_u", text="U")
+ sub.itemR(currentcurve, "order_v", text="V")
+ sub.itemL(text="Endpoints:")
+ sub.itemR(currentcurve, "endpoint_u", text="U")
+ sub.itemR(currentcurve, "endpoint_v", text="V")
+
+ sub = split.column()
+ sub.itemL(text="Bezier:")
+ sub.itemR(currentcurve, "bezier_u", text="U")
+ sub.itemR(currentcurve, "bezier_v", text="V")
+ sub.itemL(text="Resolution:")
+ sub.itemR(currentcurve, "resolution_u", text="U")
+ sub.itemR(currentcurve, "resolution_v", text="V")
+ sub.itemL(text="Interpolation:")
+ sub.itemR(currentcurve, "tilt_interpolation", text="Tilt")
+ sub.itemR(currentcurve, "radius_interpolation", text="Tilt")
+ sub.itemR(currentcurve, "smooth")
+
+bpy.types.register(DATA_PT_shape_curve)
+bpy.types.register(DATA_PT_geometry)
+bpy.types.register(DATA_PT_pathanim)
+bpy.types.register(DATA_PT_current_curve)
diff --git a/release/ui/buttons_data_empty.py b/release/ui/buttons_data_empty.py
new file mode 100644
index 00000000000..7f994c94a07
--- /dev/null
+++ b/release/ui/buttons_data_empty.py
@@ -0,0 +1,24 @@
+
+import bpy
+
+class DataButtonsPanel(bpy.types.Panel):
+ __space_type__ = "BUTTONS_WINDOW"
+ __region_type__ = "WINDOW"
+ __context__ = "data"
+
+ def poll(self, context):
+ ob = context.object
+ return (ob and ob.type == 'EMPTY')
+
+class DATA_PT_empty(DataButtonsPanel):
+ __idname__ = "DATA_PT_empty"
+ __label__ = "Empty"
+
+ def draw(self, context):
+ ob = context.object
+ layout = self.layout
+
+ layout.itemR(ob, "empty_draw_type")
+ layout.itemR(ob, "empty_draw_size")
+
+bpy.types.register(DATA_PT_empty)
diff --git a/release/ui/buttons_data_lamp.py b/release/ui/buttons_data_lamp.py
new file mode 100644
index 00000000000..f626eb45ed6
--- /dev/null
+++ b/release/ui/buttons_data_lamp.py
@@ -0,0 +1,249 @@
+
+import bpy
+
+class DataButtonsPanel(bpy.types.Panel):
+ __space_type__ = "BUTTONS_WINDOW"
+ __region_type__ = "WINDOW"
+ __context__ = "data"
+
+ def poll(self, context):
+ return (context.lamp != None)
+
+class DATA_PT_preview(DataButtonsPanel):
+ __idname__= "DATA_PT_preview"
+ __label__ = "Preview"
+
+ def draw(self, context):
+ layout = self.layout
+
+ lamp = context.lamp
+ layout.template_preview(lamp)
+
+class DATA_PT_lamp(DataButtonsPanel):
+ __idname__ = "DATA_PT_lamp"
+ __label__ = "Lamp"
+
+ def draw(self, context):
+ ob = context.object
+ lamp = context.lamp
+ space = context.space_data
+ layout = self.layout
+
+ split = layout.split(percentage=0.65)
+
+ if ob:
+ split.template_ID(context, ob, "data")
+ split.itemS()
+ elif lamp:
+ split.template_ID(context, space, "pin_id")
+ split.itemS()
+
+ layout.itemS()
+
+ layout.itemR(lamp, "type", expand=True)
+
+ split = layout.split()
+
+ sub = split.column()
+ sub.itemR(lamp, "color")
+ sub.itemR(lamp, "energy")
+ sub.itemR(lamp, "distance")
+ sub.itemR(lamp, "negative")
+
+ sub = split.column()
+ sub.itemR(lamp, "layer", text="This Layer Only")
+ sub.itemR(lamp, "specular")
+ sub.itemR(lamp, "diffuse")
+
+ if lamp.type in ('POINT', 'SPOT'):
+ sub.itemR(lamp, "falloff_type")
+ sub.itemR(lamp, "sphere")
+
+ if (lamp.falloff_type == 'LINEAR_QUADRATIC_WEIGHTED'):
+ sub.itemR(lamp, "linear_attenuation")
+ sub.itemR(lamp, "quadratic_attenuation")
+
+ if lamp.type == 'AREA':
+ sub.column()
+ sub.itemR(lamp, "gamma")
+ sub.itemR(lamp, "shape")
+ if (lamp.shape == 'SQUARE'):
+ sub.itemR(lamp, "size")
+ if (lamp.shape == 'RECTANGLE'):
+ sub.itemR(lamp, "size", text="Size X")
+ sub.itemR(lamp, "size_y")
+
+class DATA_PT_sunsky(DataButtonsPanel):
+ __idname__ = "DATA_PT_sunsky"
+ __label__ = "Sun/Sky"
+
+ def poll(self, context):
+ lamp = context.lamp
+ return (lamp and lamp.type == 'SUN')
+
+ def draw(self, context):
+ lamp = context.lamp.sky
+ layout = self.layout
+
+ row = layout.row()
+ row.itemR(lamp, "sky")
+ row.itemR(lamp, "atmosphere")
+
+ row = layout.row()
+ row.active = lamp.sky or lamp.atmosphere
+ row.itemR(lamp, "atmosphere_turbidity", text="Turbidity")
+
+ split = layout.split()
+
+ col = split.column()
+
+ sub = col.column()
+ sub.active = lamp.sky
+ sub.itemR(lamp, "sky_blend_type", text="Blend Type")
+ sub.itemR(lamp, "sky_blend")
+ sub.itemR(lamp, "sky_color_space", text="Color Space")
+ sub.itemR(lamp, "sky_exposure")
+ sub.itemR(lamp, "horizon_brightness", text="Hor Bright")
+ sub.itemR(lamp, "spread", text="Hor Spread")
+ sub.itemR(lamp, "sun_brightness", text="Sun Bright")
+ sub.itemR(lamp, "sun_size")
+ sub.itemR(lamp, "backscattered_light", text="Back Light")
+
+ sub = split.column()
+ sub.active = lamp.atmosphere
+ sub.itemR(lamp, "sun_intensity", text="Sun Intens")
+ sub.itemR(lamp, "atmosphere_inscattering", text="Inscattering")
+ sub.itemR(lamp, "atmosphere_extinction", text="Extinction")
+ sub.itemR(lamp, "atmosphere_distance_factor", text="Distance")
+
+class DATA_PT_shadow(DataButtonsPanel):
+ __idname__ = "DATA_PT_shadow"
+ __label__ = "Shadow"
+
+ def poll(self, context):
+ lamp = context.lamp
+ return (lamp and lamp.type in ('POINT','SUN', 'SPOT', 'AREA'))
+
+ def draw(self, context):
+ lamp = context.lamp
+ layout = self.layout
+
+ layout.itemR(lamp, "shadow_method", expand=True)
+
+ if lamp.shadow_method in ('BUFFER_SHADOW', 'RAY_SHADOW'):
+
+ split = layout.split()
+
+ sub = split.column()
+ sub.itemR(lamp, "shadow_color")
+
+ sub = split.column()
+ sub.itemR(lamp, "shadow_layer", text="This Layer Only")
+ sub.itemR(lamp, "only_shadow")
+
+ if lamp.shadow_method == 'RAY_SHADOW':
+
+ col = layout.column()
+ col.itemL(text="Sampling:")
+ col.row().itemR(lamp, "shadow_ray_sampling_method", expand=True)
+
+ if lamp.type in ('POINT', 'SUN', 'SPOT'):
+ flow = layout.column_flow()
+ flow.itemR(lamp, "shadow_soft_size", text="Soft Size")
+ flow.itemR(lamp, "shadow_ray_samples", text="Samples")
+ if lamp.shadow_ray_sampling_method == 'ADAPTIVE_QMC':
+ flow.itemR(lamp, "shadow_adaptive_threshold", text="Threshold")
+
+ if lamp.type == 'AREA':
+ flow = layout.column_flow()
+ flow.itemR(lamp, "shadow_ray_samples_x", text="Samples")
+ if lamp.shadow_ray_sampling_method == 'ADAPTIVE_QMC':
+ flow.itemR(lamp, "shadow_adaptive_threshold", text="Threshold")
+ if lamp.shadow_ray_sampling_method == 'CONSTANT_JITTERED':
+ flow.itemR(lamp, "umbra")
+ flow.itemR(lamp, "dither")
+ flow.itemR(lamp, "jitter")
+
+ if lamp.shadow_method == 'BUFFER_SHADOW':
+ col = layout.column()
+ col.itemL(text="Buffer Type:")
+ col.row().itemR(lamp, "shadow_buffer_type", expand=True)
+
+ if lamp.shadow_buffer_type in ('REGULAR', 'HALFWAY'):
+ flow = layout.column_flow()
+ flow.itemL(text="Sample Buffers:")
+ flow.itemR(lamp, "shadow_sample_buffers", text="")
+ flow.itemL(text="Filter Type:")
+ flow.itemR(lamp, "shadow_filter_type", text="")
+
+ flow = layout.column_flow()
+ flow.itemR(lamp, "shadow_buffer_size", text="Size")
+ flow.itemR(lamp, "shadow_buffer_samples", text="Samples")
+ flow.itemR(lamp, "shadow_buffer_bias", text="Bias")
+ flow.itemR(lamp, "shadow_buffer_soft", text="Soft")
+
+ if (lamp.shadow_buffer_type == 'IRREGULAR'):
+ row = layout.row()
+ row.itemR(lamp, "shadow_buffer_bias", text="Bias")
+
+ row = layout.row()
+ row.itemR(lamp, "auto_clip_start", text="Autoclip Start")
+ if not (lamp.auto_clip_start):
+ row.itemR(lamp, "shadow_buffer_clip_start", text="Clip Start")
+ row = layout.row()
+ row.itemR(lamp, "auto_clip_end", text="Autoclip End")
+ if not (lamp.auto_clip_end):
+ row.itemR(lamp, "shadow_buffer_clip_end", text=" Clip End")
+
+class DATA_PT_spot(DataButtonsPanel):
+ __idname__ = "DATA_PT_spot"
+ __label__ = "Spot"
+
+ def poll(self, context):
+ lamp = context.lamp
+ return (lamp and lamp.type == 'SPOT')
+
+ def draw(self, context):
+ lamp = context.lamp
+ layout = self.layout
+
+ split = layout.split()
+
+ sub = split.column()
+ sub.itemR(lamp, "spot_size", text="Size")
+ sub.itemR(lamp, "spot_blend", text="Blend")
+ sub.itemR(lamp, "square")
+
+ col = split.column()
+ col.itemR(lamp, "halo")
+ colsub = col.column()
+ colsub.active = lamp.halo
+ colsub.itemR(lamp, "halo_intensity", text="Intensity")
+ if lamp.shadow_method == 'BUFFER_SHADOW':
+ colsub.itemR(lamp, "halo_step", text="Step")
+
+class DATA_PT_falloff_curve(DataButtonsPanel):
+ __idname__ = "DATA_PT_falloff_curve"
+ __label__ = "Falloff Curve"
+
+ def poll(self, context):
+ lamp = context.lamp
+
+ if lamp and lamp.type in ('POINT', 'SPOT'):
+ if lamp.falloff_type == 'CUSTOM_CURVE':
+ return True
+
+ return False
+
+ def draw(self, context):
+ lamp = context.lamp
+ layout = self.layout
+
+ layout.template_curve_mapping(lamp.falloff_curve)
+
+bpy.types.register(DATA_PT_preview)
+bpy.types.register(DATA_PT_lamp)
+bpy.types.register(DATA_PT_shadow)
+bpy.types.register(DATA_PT_sunsky)
+bpy.types.register(DATA_PT_spot)
+bpy.types.register(DATA_PT_falloff_curve) \ No newline at end of file
diff --git a/release/ui/buttons_data_lattice.py b/release/ui/buttons_data_lattice.py
new file mode 100644
index 00000000000..8f83cbb45f9
--- /dev/null
+++ b/release/ui/buttons_data_lattice.py
@@ -0,0 +1,50 @@
+
+import bpy
+
+class DataButtonsPanel(bpy.types.Panel):
+ __space_type__ = "BUTTONS_WINDOW"
+ __region_type__ = "WINDOW"
+ __context__ = "data"
+
+ def poll(self, context):
+ return (context.lattice != None)
+
+class DATA_PT_lattice(DataButtonsPanel):
+ __idname__ = "DATA_PT_lattice"
+ __label__ = "Lattice"
+
+ def draw(self, context):
+ ob = context.object
+ lat = context.lattice
+ space = context.space_data
+ layout = self.layout
+
+ split = layout.split(percentage=0.65)
+
+ if ob:
+ split.template_ID(context, ob, "data")
+ split.itemS()
+ elif lat:
+ split.template_ID(context, space, "pin_id")
+ split.itemS()
+
+ if lat:
+ layout.itemS()
+
+ row = layout.row()
+ row.itemR(lat, "points_u")
+ row.itemR(lat, "interpolation_type_u", expand=True)
+
+ row = layout.row()
+ row.itemR(lat, "points_v")
+ row.itemR(lat, "interpolation_type_v", expand=True)
+
+ row = layout.row()
+ row.itemR(lat, "points_w")
+ row.itemR(lat, "interpolation_type_w", expand=True)
+
+ row = layout.row()
+ row.itemR(lat, "outside")
+ row.itemR(lat, "shape_keys")
+
+bpy.types.register(DATA_PT_lattice)
diff --git a/release/ui/buttons_data_mesh.py b/release/ui/buttons_data_mesh.py
new file mode 100644
index 00000000000..c3742b38cc1
--- /dev/null
+++ b/release/ui/buttons_data_mesh.py
@@ -0,0 +1,47 @@
+
+import bpy
+
+class DataButtonsPanel(bpy.types.Panel):
+ __space_type__ = "BUTTONS_WINDOW"
+ __region_type__ = "WINDOW"
+ __context__ = "data"
+
+ def poll(self, context):
+ return (context.mesh != None)
+
+class DATA_PT_mesh(DataButtonsPanel):
+ __idname__ = "DATA_PT_mesh"
+ __label__ = "Mesh"
+
+ def draw(self, context):
+ ob = context.object
+ mesh = context.mesh
+ space = context.space_data
+ layout = self.layout
+
+ split = layout.split(percentage=0.65)
+
+ if ob:
+ split.template_ID(context, ob, "data")
+ split.itemS()
+ elif mesh:
+ split.template_ID(context, space, "pin_id")
+ split.itemS()
+
+ if mesh:
+ layout.itemS()
+
+ split = layout.split()
+
+ col = split.column()
+ col.itemR(mesh, "autosmooth")
+ colsub = col.column()
+ colsub.active = mesh.autosmooth
+ colsub.itemR(mesh, "autosmooth_angle", text="Angle")
+ sub = split.column()
+ sub.itemR(mesh, "vertex_normal_flip")
+ sub.itemR(mesh, "double_sided")
+
+ layout.itemR(mesh, "texco_mesh")
+
+bpy.types.register(DATA_PT_mesh)
diff --git a/release/ui/buttons_data_modifier.py b/release/ui/buttons_data_modifier.py
new file mode 100644
index 00000000000..0f5d446f889
--- /dev/null
+++ b/release/ui/buttons_data_modifier.py
@@ -0,0 +1,418 @@
+
+import bpy
+
+class DataButtonsPanel(bpy.types.Panel):
+ __space_type__ = "BUTTONS_WINDOW"
+ __region_type__ = "WINDOW"
+ __context__ = "modifier"
+
+ def poll(self, context):
+ ob = context.object
+ return (ob and ob.type in ('MESH', 'CURVE', 'SURFACE', 'TEXT', 'LATTICE'))
+
+class DATA_PT_modifiers(DataButtonsPanel):
+ __idname__ = "DATA_PT_modifiers"
+ __label__ = "Modifiers"
+
+ def draw(self, context):
+ ob = context.object
+ layout = self.layout
+
+ row = layout.row()
+ row.item_menu_enumO("OBJECT_OT_modifier_add", "type")
+ row.itemL();
+
+ for md in ob.modifiers:
+ box = layout.template_modifier(md)
+
+ if box:
+ if md.type == 'ARMATURE':
+ self.armature(box, md)
+ if md.type == 'ARRAY':
+ self.array(box, md)
+ if md.type == 'BEVEL':
+ self.bevel(box, md)
+ if md.type == 'BOOLEAN':
+ self.boolean(box, md)
+ if md.type == 'BUILD':
+ self.build(box, md)
+ if md.type == 'CAST':
+ self.cast(box, md)
+ if md.type == 'CLOTH':
+ self.cloth(box, md)
+ if md.type == 'COLLISION':
+ self.collision(box, md)
+ if md.type == 'CURVE':
+ self.curve(box, md)
+ if md.type == 'DECIMATE':
+ self.decimate(box, md)
+ if md.type == 'DISPLACE':
+ self.displace(box, md)
+ if md.type == 'EDGE_SPLIT':
+ self.edgesplit(box, md)
+ if md.type == 'EXPLODE':
+ self.explode(box, md)
+ if md.type == 'FLUID_SIMULATION':
+ self.fluid(box, md)
+ if md.type == 'HOOK':
+ self.hook(box, md)
+ if md.type == 'LATTICE':
+ self.lattice(box, md)
+ if md.type == 'MASK':
+ self.mask(box, md)
+ if md.type == 'MESH_DEFORM':
+ self.mesh_deform(box, md)
+ if md.type == 'MIRROR':
+ self.mirror(box, md)
+ if md.type == 'MULTIRES':
+ self.multires(box, md)
+ if md.type == 'PARTICLE_INSTANCE':
+ self.particleinstance(box, md)
+ if md.type == 'PARTICLE_SYSTEM':
+ self.particlesystem(box, md)
+ if md.type == 'SHRINKWRAP':
+ self.shrinkwrap(box, md)
+ if md.type == 'SIMPLE_DEFORM':
+ self.simpledeform(box, md)
+ if md.type == 'SMOOTH':
+ self.smooth(box, md)
+ if md.type == 'SOFTBODY':
+ self.softbody(box, md)
+ if md.type == 'SUBSURF':
+ self.subsurf(box, md)
+ if md.type == 'UV_PROJECT':
+ self.uvproject(box, md)
+ if md.type == 'WAVE':
+ self.wave(box, md)
+
+ def armature(self, layout, md):
+ layout.itemR(md, "object")
+ row = layout.row()
+ row.itemR(md, "vertex_group")
+ row.itemR(md, "invert")
+ flow = layout.column_flow()
+ flow.itemR(md, "use_vertex_groups", text="Vertex Groups")
+ flow.itemR(md, "use_bone_envelopes", text="Bone Envelopes")
+ flow.itemR(md, "quaternion")
+ flow.itemR(md, "multi_modifier")
+
+ def array(self, layout, md):
+ layout.itemR(md, "fit_type")
+ if md.fit_type == 'FIXED_COUNT':
+ layout.itemR(md, "count")
+ if md.fit_type == 'FIT_LENGTH':
+ layout.itemR(md, "length")
+ if md.fit_type == 'FIT_CURVE':
+ layout.itemR(md, "curve")
+
+ layout.itemS()
+
+ split = layout.split()
+
+ col = split.column()
+ col = col.column()
+ col.itemR(md, "constant_offset")
+ colsub = col.column()
+ colsub.active = md.constant_offset
+ colsub.itemR(md, "constant_offset_displacement", text="")
+
+ col.itemS()
+
+ sub = col.row().itemR(md, "merge_adjacent_vertices", text="Merge")
+ colsub = col.column()
+ colsub.active = md.merge_adjacent_vertices
+ colsub.itemR(md, "merge_end_vertices", text="First Last")
+ colsub.itemR(md, "merge_distance", text="Distance")
+
+ col = split.column()
+ col = col.column()
+ col.itemR(md, "relative_offset")
+ colsub = col.column()
+ colsub.active = md.relative_offset
+ colsub.itemR(md, "relative_offset_displacement", text="")
+
+ col.itemS()
+
+ col = col.column()
+ col.itemR(md, "add_offset_object")
+ colsub = col.column()
+ colsub.active = md.add_offset_object
+ colsub.itemR(md, "offset_object", text="")
+
+ layout.itemS()
+
+ col = layout.column()
+ col.itemR(md, "start_cap")
+ col.itemR(md, "end_cap")
+
+ def bevel(self, layout, md):
+ row = layout.row()
+ row.itemR(md, "width")
+ row.itemR(md, "only_vertices")
+
+ layout.itemL(text="Limit Method:")
+ row = layout.row()
+ row.itemR(md, "limit_method", expand=True)
+ if md.limit_method == 'ANGLE':
+ row = layout.row()
+ row.itemR(md, "angle")
+ if md.limit_method == 'WEIGHT':
+ row = layout.row()
+ row.itemR(md, "edge_weight_method", expand=True)
+
+ def boolean(self, layout, md):
+ layout.itemR(md, "operation")
+ layout.itemR(md, "object")
+
+ def build(self, layout, md):
+ split = layout.split()
+
+ col = split.column()
+ col.itemR(md, "start")
+ col.itemR(md, "length")
+
+ col = split.column()
+ col.itemR(md, "randomize")
+ colsub = col.column()
+ colsub.active = md.randomize
+ colsub.itemR(md, "seed")
+
+
+
+ def cast(self, layout, md):
+ layout.itemR(md, "cast_type")
+ col = layout.column_flow()
+ col.itemR(md, "x")
+ col.itemR(md, "y")
+ col.itemR(md, "z")
+ col.itemR(md, "factor")
+ col.itemR(md, "radius")
+ col.itemR(md, "size")
+ layout.itemR(md, "vertex_group")
+ #Missing: "OB" and "From Radius"
+
+ def cloth(self, layout, md):
+ layout.itemL(text="See Cloth panel.")
+
+ def collision(self, layout, md):
+ layout.itemL(text="See Collision panel.")
+
+ def curve(self, layout, md):
+ layout.itemR(md, "object")
+ layout.itemR(md, "vertex_group")
+ layout.itemR(md, "deform_axis")
+
+ def decimate(self, layout, md):
+ layout.itemR(md, "ratio")
+ layout.itemR(md, "face_count")
+
+ def displace(self, layout, md):
+ layout.itemR(md, "vertex_group")
+ layout.itemR(md, "texture")
+ layout.itemR(md, "midlevel")
+ layout.itemR(md, "strength")
+ layout.itemR(md, "texture_coordinates")
+ if md.texture_coordinates == 'OBJECT':
+ layout.itemR(md, "texture_coordinate_object", text="Object")
+ if md.texture_coordinates == 'UV':
+ layout.itemR(md, "uv_layer")
+
+ def edgesplit(self, layout, md):
+ split = layout.split()
+
+ col = split.column()
+ col.itemR(md, "use_edge_angle", text="Edge Angle")
+ colsub = col.column()
+ colsub.active = md.use_edge_angle
+ colsub.itemR(md, "split_angle")
+ col = split.column()
+ col.itemR(md, "use_sharp", text="Sharp Edges")
+
+ def explode(self, layout, md):
+ layout.itemR(md, "vertex_group")
+ layout.itemR(md, "protect")
+ layout.itemR(md, "split_edges")
+ layout.itemR(md, "unborn")
+ layout.itemR(md, "alive")
+ layout.itemR(md, "dead")
+ # Missing: "Refresh" and "Clear Vertex Group" ?
+
+ def fluid(self, layout, md):
+ layout.itemL(text="See Fluidsim panel.")
+
+ def hook(self, layout, md):
+ layout.itemR(md, "falloff")
+ layout.itemR(md, "force", slider=True)
+ layout.itemR(md, "object")
+ layout.itemR(md, "vertex_group")
+ # Missing: "Reset" and "Recenter"
+
+ def lattice(self, layout, md):
+ layout.itemR(md, "object")
+ layout.itemR(md, "vertex_group")
+
+ def mask(self, layout, md):
+ layout.itemR(md, "mode")
+ if md.mode == 'ARMATURE':
+ layout.itemR(md, "armature")
+ if md.mode == 'VERTEX_GROUP':
+ layout.itemR(md, "vertex_group")
+ layout.itemR(md, "inverse")
+
+ def mesh_deform(self, layout, md):
+ layout.itemR(md, "object")
+ layout.itemR(md, "vertex_group")
+ layout.itemR(md, "invert")
+
+ layout.itemS()
+ layout.itemO("OBJECT_OT_modifier_mdef_bind", text="Bind")
+ row = layout.row()
+ row.itemR(md, "precision")
+ row.itemR(md, "dynamic")
+
+ def mirror(self, layout, md):
+ layout.itemR(md, "merge_limit")
+ split = layout.split()
+
+ sub = split.column()
+ sub.itemR(md, "x")
+ sub.itemR(md, "y")
+ sub.itemR(md, "z")
+ sub = split.column()
+ sub.itemL(text="Textures:")
+ sub.itemR(md, "mirror_u")
+ sub.itemR(md, "mirror_v")
+ sub = split.column()
+ sub.itemR(md, "clip", text="Do Clipping")
+ sub.itemR(md, "mirror_vertex_groups", text="Vertex Group")
+
+ layout.itemR(md, "mirror_object")
+
+ def multires(self, layout, md):
+ layout.itemR(md, "subdivision_type")
+ layout.itemO("OBJECT_OT_multires_subdivide", text="Subdivide")
+ layout.itemR(md, "level")
+
+ def particleinstance(self, layout, md):
+ layout.itemR(md, "object")
+ layout.itemR(md, "particle_system_number")
+
+ col = layout.column_flow()
+ col.itemR(md, "normal")
+ col.itemR(md, "children")
+ col.itemR(md, "path")
+ col.itemR(md, "unborn")
+ col.itemR(md, "alive")
+ col.itemR(md, "dead")
+
+ def particlesystem(self, layout, md):
+ layout.itemL(text="See Particle panel.")
+
+ def shrinkwrap(self, layout, md):
+ layout.itemR(md, "target")
+ layout.itemR(md, "vertex_group")
+ layout.itemR(md, "offset")
+ layout.itemR(md, "subsurf_levels")
+ layout.itemR(md, "mode")
+ if md.mode == 'PROJECT':
+ layout.itemR(md, "subsurf_levels")
+ layout.itemR(md, "auxiliary_target")
+
+ row = layout.row()
+ row.itemR(md, "x")
+ row.itemR(md, "y")
+ row.itemR(md, "z")
+
+ col = layout.column_flow()
+ col.itemR(md, "negative")
+ col.itemR(md, "positive")
+ col.itemR(md, "cull_front_faces")
+ col.itemR(md, "cull_back_faces")
+ if md.mode == 'NEAREST_SURFACEPOINT':
+ layout.itemR(md, "keep_above_surface")
+ # To-Do: Validate if structs
+
+ def simpledeform(self, layout, md):
+ layout.itemR(md, "mode")
+ layout.itemR(md, "vertex_group")
+ layout.itemR(md, "origin")
+ layout.itemR(md, "relative")
+ layout.itemR(md, "factor")
+ layout.itemR(md, "limits")
+ if md.mode in ('TAPER', 'STRETCH'):
+ layout.itemR(md, "lock_x_axis")
+ layout.itemR(md, "lock_y_axis")
+
+ def smooth(self, layout, md):
+ split = layout.split()
+ sub = split.column()
+ sub.itemR(md, "x")
+ sub.itemR(md, "y")
+ sub.itemR(md, "z")
+ sub = split.column()
+ sub.itemR(md, "factor")
+ sub.itemR(md, "repeat")
+
+ layout.itemR(md, "vertex_group")
+
+ def softbody(self, layout, md):
+ layout.itemL(text="See Softbody panel.")
+
+ def subsurf(self, layout, md):
+ layout.itemR(md, "subdivision_type")
+ col = layout.column_flow()
+ col.itemR(md, "levels", text="Preview")
+ col.itemR(md, "render_levels", text="Render")
+ col.itemR(md, "optimal_draw", text="Optimal Display")
+ col.itemR(md, "subsurf_uv")
+
+ def uvproject(self, layout, md):
+ layout.itemR(md, "uv_layer")
+ layout.itemR(md, "projectors")
+ layout.itemR(md, "image")
+ layout.itemR(md, "horizontal_aspect_ratio")
+ layout.itemR(md, "vertical_aspect_ratio")
+ layout.itemR(md, "override_image")
+ #"Projectors" don't work.
+
+ def wave(self, layout, md):
+ split = layout.split()
+
+ sub = split.column()
+ sub.itemL(text="Motion:")
+ sub.itemR(md, "x")
+ sub.itemR(md, "y")
+ sub.itemR(md, "cyclic")
+
+ sub = split.column()
+ sub.itemR(md, "normals")
+ row = sub.row(align=True)
+ row.active = md.normals
+ row.itemR(md, "x_normal", text="X", toggle=True)
+ row.itemR(md, "y_normal", text="Y", toggle=True)
+ row.itemR(md, "z_normal", text="Z", toggle=True)
+
+ col = layout.column_flow()
+ col.itemR(md, "time_offset")
+ col.itemR(md, "lifetime")
+ col.itemR(md, "damping_time")
+ col.itemR(md, "falloff_radius")
+ col.itemR(md, "start_position_x")
+ col.itemR(md, "start_position_y")
+
+ layout.itemR(md, "start_position_object")
+ layout.itemR(md, "vertex_group")
+ layout.itemR(md, "texture")
+ layout.itemR(md, "texture_coordinates")
+ if md.texture_coordinates == 'MAP_UV':
+ layout.itemR(md, "uv_layer")
+ if md.texture_coordinates == 'OBJECT':
+ layout.itemR(md, "texture_coordinates_object")
+
+ col = layout.column_flow()
+ col.itemR(md, "speed", slider=True)
+ col.itemR(md, "height", slider=True)
+ col.itemR(md, "width", slider=True)
+ col.itemR(md, "narrowness", slider=True)
+
+bpy.types.register(DATA_PT_modifiers)
diff --git a/release/ui/buttons_data_text.py b/release/ui/buttons_data_text.py
new file mode 100644
index 00000000000..20503d8d2fd
--- /dev/null
+++ b/release/ui/buttons_data_text.py
@@ -0,0 +1,124 @@
+
+import bpy
+
+class DataButtonsPanel(bpy.types.Panel):
+ __space_type__ = "BUTTONS_WINDOW"
+ __region_type__ = "WINDOW"
+ __context__ = "data"
+
+ def poll(self, context):
+ ob = context.object
+ return (ob and ob.type == 'TEXT')
+
+class DATA_PT_shape_text(DataButtonsPanel):
+ __idname__ = "DATA_PT_shape_text"
+ __label__ = "Shape"
+
+ def draw(self, context):
+ ob = context.object
+ curve = context.curve
+ space = context.space_data
+ layout = self.layout
+
+ split = layout.split(percentage=0.65)
+
+ if ob:
+ split.template_ID(context, ob, "data")
+ split.itemS()
+ elif curve:
+ split.template_ID(context, space, "pin_id")
+ split.itemS()
+
+ if curve:
+ layout.itemS()
+ layout.itemR(curve, "curve_2d")
+
+ split = layout.split()
+
+ sub = split.column()
+ sub.itemL(text="Caps:")
+ sub.itemR(curve, "front")
+ sub.itemR(curve, "back")
+
+ sub.itemL(text="Textures:")
+ sub.itemR(curve, "uv_orco")
+ sub.itemR(curve, "auto_texspace")
+
+ sub = split.column()
+ sub.itemL(text="Resolution:")
+ sub.itemR(curve, "resolution_u", text="Preview U")
+ sub.itemR(curve, "resolution_v", text="Preview V")
+ sub.itemR(curve, "render_resolution_u", text="Render U")
+ sub.itemR(curve, "render_resolution_v", text="Render V")
+
+ sub.itemL(text="Display:")
+ sub.itemR(curve, "fast")
+
+class DATA_PT_font(DataButtonsPanel):
+ __idname__ = "DATA_PT_font"
+ __label__ = "Font"
+
+ def draw(self, context):
+ text = context.curve
+ layout = self.layout
+
+ layout.row()
+ layout.itemR(text, "font")
+
+ split = layout.split()
+
+ sub = split.column()
+ # sub.itemR(text, "style")
+ # sub.itemR(text, "bold")
+ # sub.itemR(text, "italic")
+ # sub.itemR(text, "underline")
+ # ToDo: These settings are in a sub struct (Edit Format).
+ sub.itemR(text, "text_size")
+ sub.itemR(text, "shear")
+
+ sub = split.column()
+ sub.itemR(text, "text_on_curve")
+ sub.itemR(text, "family")
+ sub.itemL(text="Underline:")
+ sub.itemR(text, "ul_position", text="Position")
+ sub.itemR(text, "ul_height", text="Height")
+
+ # sub.itemR(text, "edit_format")
+
+class DATA_PT_paragraph(DataButtonsPanel):
+ __idname__ = "DATA_PT_paragraph"
+ __label__ = "Paragraph"
+
+ def draw(self, context):
+ text = context.curve
+ layout = self.layout
+
+ layout.itemL(text="Align:")
+ layout.itemR(text, "spacemode", expand=True)
+
+ split = layout.split()
+
+ sub = split.column()
+ sub.itemL(text="Spacing:")
+ sub.itemR(text, "spacing", text="Character")
+ sub.itemR(text, "word_spacing", text="Word")
+ sub.itemR(text, "line_dist", text="Line")
+
+ sub = split.column()
+ sub.itemL(text="Offset:")
+ sub.itemR(text, "x_offset", text="X")
+ sub.itemR(text, "y_offset", text="Y")
+ sub.itemR(text, "wrap")
+
+class DATA_PT_textboxes(DataButtonsPanel):
+ __idname__ = "DATA_PT_textboxes"
+ __label__ = "Text Boxes"
+
+ def draw(self, context):
+ text = context.curve
+ layout = self.layout
+
+bpy.types.register(DATA_PT_shape_text)
+bpy.types.register(DATA_PT_font)
+bpy.types.register(DATA_PT_paragraph)
+#bpy.types.register(DATA_PT_textboxes)
diff --git a/release/ui/buttons_material.py b/release/ui/buttons_material.py
new file mode 100644
index 00000000000..b9816e36dd7
--- /dev/null
+++ b/release/ui/buttons_material.py
@@ -0,0 +1,226 @@
+
+import bpy
+
+class MaterialButtonsPanel(bpy.types.Panel):
+ __space_type__ = "BUTTONS_WINDOW"
+ __region_type__ = "WINDOW"
+ __context__ = "material"
+
+ def poll(self, context):
+ return (context.material != None)
+
+class MATERIAL_PT_preview(MaterialButtonsPanel):
+ __idname__= "MATERIAL_PT_preview"
+ __label__ = "Preview"
+
+ def poll(self, context):
+ return (context.material or context.object)
+
+ def draw(self, context):
+ layout = self.layout
+
+ mat = context.material
+ layout.template_preview(mat)
+
+class MATERIAL_PT_material(MaterialButtonsPanel):
+ __idname__= "MATERIAL_PT_material"
+ __label__ = "Material"
+
+ def poll(self, context):
+ return (context.material or context.object)
+
+ def draw(self, context):
+ layout = self.layout
+ mat = context.material
+ ob = context.object
+ slot = context.material_slot
+ space = context.space_data
+
+ split = layout.split(percentage=0.65)
+
+ if ob and slot:
+ split.template_ID(context, slot, "material", new="MATERIAL_OT_new")
+ split.itemR(ob, "active_material_index", text="Active")
+ elif mat:
+ split.template_ID(context, space, "pin_id")
+ split.itemS()
+
+ if mat:
+ layout.itemS()
+
+ layout.itemR(mat, "type", expand=True)
+
+ row = layout.row()
+ row.column().itemR(mat, "diffuse_color")
+ row.column().itemR(mat, "specular_color")
+ row.column().itemR(mat, "mirror_color")
+
+ layout.itemR(mat, "alpha", slider=True)
+
+class MATERIAL_PT_sss(MaterialButtonsPanel):
+ __idname__= "MATERIAL_PT_sss"
+ __label__ = "Subsurface Scattering"
+
+ def poll(self, context):
+ mat = context.material
+ return (mat and mat.type == "SURFACE")
+
+ def draw_header(self, context):
+ sss = context.material.subsurface_scattering
+
+ layout = self.layout
+ layout.itemR(sss, "enabled", text="")
+
+ def draw(self, context):
+ layout = self.layout
+ sss = context.material.subsurface_scattering
+ layout.active = sss.enabled
+
+ flow = layout.column_flow()
+ flow.itemR(sss, "error_tolerance")
+ flow.itemR(sss, "ior")
+ flow.itemR(sss, "scale")
+
+ row = layout.row()
+ row.column().itemR(sss, "color")
+ row.column().itemR(sss, "radius")
+
+ flow = layout.column_flow()
+ flow.itemR(sss, "color_factor", slider=True)
+ flow.itemR(sss, "texture_factor", slider=True)
+ flow.itemR(sss, "front")
+ flow.itemR(sss, "back")
+
+class MATERIAL_PT_raymir(MaterialButtonsPanel):
+ __idname__= "MATERIAL_PT_raymir"
+ __label__ = "Ray Mirror"
+
+ def poll(self, context):
+ mat = context.material
+ return (mat and mat.type == "SURFACE")
+
+ def draw_header(self, context):
+ raym = context.material.raytrace_mirror
+
+ layout = self.layout
+ layout.itemR(raym, "enabled", text="")
+
+ def draw(self, context):
+ layout = self.layout
+ raym = context.material.raytrace_mirror
+ layout.active = raym.enabled
+ split = layout.split()
+
+ sub = split.column()
+ sub.itemR(raym, "reflect", text="RayMir", slider=True)
+ sub.itemR(raym, "fresnel")
+ sub.itemR(raym, "fresnel_fac", text="Fac", slider=True)
+
+ sub = split.column()
+ sub.itemR(raym, "gloss", slider=True)
+ sub.itemR(raym, "gloss_threshold", slider=True)
+ sub.itemR(raym, "gloss_samples")
+ sub.itemR(raym, "gloss_anisotropic", slider=True)
+
+ row = layout.row()
+ row.itemR(raym, "distance", text="Max Dist")
+ row.itemR(raym, "depth")
+
+ layout.itemR(raym, "fade_to")
+
+class MATERIAL_PT_raytransp(MaterialButtonsPanel):
+ __idname__= "MATERIAL_PT_raytransp"
+ __label__= "Ray Transparency"
+
+ def poll(self, context):
+ mat = context.material
+ return (mat and mat.type == "SURFACE")
+
+ def draw_header(self, context):
+ rayt = context.material.raytrace_transparency
+
+ layout = self.layout
+ layout.itemR(rayt, "enabled", text="")
+
+ def draw(self, context):
+ layout = self.layout
+ rayt = context.material.raytrace_transparency
+ layout.active = rayt.enabled
+
+ split = layout.split()
+
+ sub = split.column()
+ sub.itemR(rayt, "ior")
+ sub.itemR(rayt, "fresnel")
+ sub.itemR(rayt, "fresnel_fac", text="Fac", slider=True)
+
+ sub = split.column()
+ sub.itemR(rayt, "gloss", slider=True)
+ sub.itemR(rayt, "gloss_threshold", slider=True)
+ sub.itemR(rayt, "gloss_samples")
+
+ flow = layout.column_flow()
+ flow.itemR(rayt, "filter", slider=True)
+ flow.itemR(rayt, "limit")
+ flow.itemR(rayt, "falloff")
+ flow.itemR(rayt, "specular_opacity", slider=True)
+ flow.itemR(rayt, "depth")
+
+class MATERIAL_PT_halo(MaterialButtonsPanel):
+ __idname__= "MATERIAL_PT_halo"
+ __label__= "Halo"
+
+ def poll(self, context):
+ mat = context.material
+ return (mat and mat.type == "HALO")
+
+ def draw(self, context):
+ layout = self.layout
+ mat = context.material
+ halo = mat.halo
+
+ split = layout.split()
+
+ col = split.column(align=True)
+ col.itemL(text="General Settings:")
+ col.itemR(halo, "size")
+ col.itemR(halo, "hardness")
+ col.itemR(halo, "add", slider=True)
+
+ col.itemL(text="Options:")
+ col.itemR(halo, "use_texture", text="Texture")
+ col.itemR(halo, "use_vertex_normal", text="Vertex Normal")
+ col.itemR(halo, "xalpha")
+ col.itemR(halo, "shaded")
+ col.itemR(halo, "soft")
+
+ col = split.column()
+ col = col.column(align=True)
+ col.itemR(halo, "ring")
+ colsub = col.column()
+ colsub.active = halo.ring
+ colsub.itemR(halo, "rings")
+ col.itemR(halo, "lines")
+ colsub = col.column()
+ colsub.active = halo.lines
+ colsub.itemR(halo, "line_number", text="Lines")
+ col.itemR(halo, "star")
+ colsub = col.column()
+ colsub.active = halo.star
+ colsub.itemR(halo, "star_tips")
+ col.itemR(halo, "flare_mode")
+ colsub = col.column()
+ colsub.active = halo.flare_mode
+ colsub.itemR(halo, "flare_size", text="Size")
+ colsub.itemR(halo, "flare_subsize", text="Subsize")
+ colsub.itemR(halo, "flare_boost", text="Boost")
+ colsub.itemR(halo, "flare_seed", text="Seed")
+ colsub.itemR(halo, "flares_sub", text="Sub")
+
+bpy.types.register(MATERIAL_PT_preview)
+bpy.types.register(MATERIAL_PT_material)
+bpy.types.register(MATERIAL_PT_raymir)
+bpy.types.register(MATERIAL_PT_raytransp)
+bpy.types.register(MATERIAL_PT_sss)
+bpy.types.register(MATERIAL_PT_halo)
+
diff --git a/release/ui/buttons_object_constraint.py b/release/ui/buttons_object_constraint.py
new file mode 100644
index 00000000000..f4507f9149d
--- /dev/null
+++ b/release/ui/buttons_object_constraint.py
@@ -0,0 +1,550 @@
+
+import bpy
+
+class ConstraintButtonsPanel(bpy.types.Panel):
+ __space_type__ = "BUTTONS_WINDOW"
+ __region_type__ = "WINDOW"
+ __context__ = "constraint"
+
+ def draw_constraint(self, con):
+ layout = self.layout
+ box = layout.template_constraint(con)
+
+ if box:
+ if con.type == "CHILD_OF":
+ self.child_of(box, con)
+ elif con.type == "TRACK_TO":
+ self.track_to(box, con)
+ elif con.type == "IK":
+ self.ik(box, con)
+ elif con.type == "FOLLOW_PATH":
+ self.follow_path(box, con)
+ elif con.type == "LIMIT_ROTATION":
+ self.limit_rotation(box, con)
+ elif con.type == "LIMIT_LOCATION":
+ self.limit_location(box, con)
+ elif con.type == "LIMIT_SCALE":
+ self.limit_scale(box, con)
+ elif con.type == "COPY_ROTATION":
+ self.copy_rotation(box, con)
+ elif con.type == "COPY_LOCATION":
+ self.copy_location(box, con)
+ elif con.type == "COPY_SCALE":
+ self.copy_scale(box, con)
+ #elif con.type == "SCRIPT":
+ # self.script(box, con)
+ elif con.type == "ACTION":
+ self.action(box, con)
+ elif con.type == "LOCKED_TRACK":
+ self.locked_track(box, con)
+ elif con.type == "LIMIT_DISTANCE":
+ self.limit_distance(box, con)
+ elif con.type == "STRETCH_TO":
+ self.stretch_to(box, con)
+ elif con.type == "FLOOR":
+ self.floor(box, con)
+ elif con.type == "RIGID_BODY_JOINT":
+ self.rigid_body(box, con)
+ elif con.type == "CLAMP_TO":
+ self.clamp_to(box, con)
+ elif con.type == "TRANSFORM":
+ self.transform(box, con)
+ elif con.type == "SHRINKWRAP":
+ self.shrinkwrap(box, con)
+
+ # show/key buttons here are most likely obsolete now, with
+ # keyframing functionality being part of every button
+ if con.type not in ("RIGID_BODY_JOINT", "NULL"):
+ box.itemR(con, "influence")
+
+ def space_template(self, layout, con, target=True, owner=True):
+ if target or owner:
+ row = layout.row()
+
+ row.itemL(text="Convert:")
+
+ if target:
+ row.itemR(con, "target_space", text="")
+
+ if target and owner:
+ row.itemL(icon=8) # XXX
+
+ if owner:
+ row.itemR(con, "owner_space", text="")
+
+ def target_template(self, layout, con, subtargets=True):
+ layout.itemR(con, "target") # XXX limiting settings for only 'curves' or some type of object
+
+ if con.target and subtargets:
+ if con.target.type == "ARMATURE":
+ layout.itemR(con, "subtarget", text="Bone") # XXX autocomplete
+
+ row = layout.row()
+ row.itemL(text="Head/Tail:")
+ row.itemR(con, "head_tail", text="")
+ elif con.target.type in ("MESH", "LATTICE"):
+ layout.itemR(con, "subtarget", text="Vertex Group") # XXX autocomplete
+
+ def child_of(self, layout, con):
+ self.target_template(layout, con)
+
+ split = layout.split()
+
+ sub = split.column()
+ sub.itemL(text="Location:")
+ sub.itemR(con, "locationx", text="X")
+ sub.itemR(con, "locationy", text="Y")
+ sub.itemR(con, "locationz", text="Z")
+
+ sub = split.column()
+ sub.itemL(text="Rotation:")
+ sub.itemR(con, "rotationx", text="X")
+ sub.itemR(con, "rotationy", text="Y")
+ sub.itemR(con, "rotationz", text="Z")
+
+ sub = split.column()
+ sub.itemL(text="Scale:")
+ sub.itemR(con, "sizex", text="X")
+ sub.itemR(con, "sizey", text="Y")
+ sub.itemR(con, "sizez", text="Z")
+
+ # Missing
+ row = layout.row()
+ row.itemL(text="SET OFFSET")
+ row.itemL(text="CLEAR OFFSET")
+
+ def track_to(self, layout, con):
+ self.target_template(layout, con)
+
+ row = layout.row()
+ row.itemL(text="To:")
+ row.itemR(con, "track", expand=True)
+
+ row = layout.row()
+ row.itemR(con, "up", text="Up")
+ row.itemR(con, "target_z")
+
+ self.space_template(layout, con)
+
+ def ik(self, layout, con):
+ self.target_template(layout, con)
+
+ layout.itemR(con, "pole_target")
+ layout.itemR(con, "pole_subtarget")
+
+ col = layout.column_flow()
+ col.itemR(con, "iterations")
+ col.itemR(con, "pole_angle")
+ col.itemR(con, "weight")
+ col.itemR(con, "orient_weight")
+ col.itemR(con, "chain_length")
+
+ col = layout.column_flow()
+ col.itemR(con, "tail")
+ col.itemR(con, "rotation")
+ col.itemR(con, "targetless")
+ col.itemR(con, "stretch")
+
+ def follow_path(self, layout, con):
+ self.target_template(layout, con)
+
+ row = layout.row()
+ row.itemR(con, "curve_follow")
+ row.itemR(con, "offset")
+
+ row = layout.row()
+ row.itemL(text="Forward:")
+ row.itemR(con, "forward", expand=True)
+
+ row = layout.row()
+ row.itemR(con, "up", text="Up")
+ row.itemL()
+
+ def limit_rotation(self, layout, con):
+
+ split = layout.split()
+
+ col = split.column()
+ col.itemR(con, "use_limit_x")
+ colsub = col.column()
+ colsub.active = con.use_limit_x
+ colsub.itemR(con, "minimum_x", text="Min")
+ colsub.itemR(con, "maximum_x", text="Max")
+
+ col = split.column()
+ col.itemR(con, "use_limit_y")
+ colsub = col.column()
+ colsub.active = con.use_limit_y
+ colsub.itemR(con, "minimum_y", text="Min")
+ colsub.itemR(con, "maximum_y", text="Max")
+
+ col = split.column()
+ col.itemR(con, "use_limit_z")
+ colsub = col.column()
+ colsub.active = con.use_limit_z
+ colsub.itemR(con, "minimum_z", text="Min")
+ colsub.itemR(con, "maximum_z", text="Max")
+
+ row = layout.row()
+ row.itemR(con, "limit_transform")
+ row.itemL()
+
+ row = layout.row()
+ row.itemL(text="Convert:")
+ row.itemR(con, "owner_space", text="")
+
+ def limit_location(self, layout, con):
+ split = layout.split()
+
+ col = split.column()
+ col.itemR(con, "use_minimum_x")
+ colsub = col.column()
+ colsub.active = con.use_minimum_x
+ colsub.itemR(con, "minimum_x", text="")
+ col.itemR(con, "use_maximum_x")
+ colsub = col.column()
+ colsub.active = con.use_maximum_x
+ colsub.itemR(con, "maximum_x", text="")
+
+ col = split.column()
+ col.itemR(con, "use_minimum_y")
+ colsub = col.column()
+ colsub.active = con.use_minimum_y
+ colsub.itemR(con, "minimum_y", text="")
+ col.itemR(con, "use_maximum_y")
+ colsub = col.column()
+ colsub.active = con.use_maximum_y
+ colsub.itemR(con, "maximum_y", text="")
+
+ col = split.column()
+ col.itemR(con, "use_minimum_z")
+ colsub = col.column()
+ colsub.active = con.use_minimum_z
+ colsub.itemR(con, "minimum_z", text="")
+ col.itemR(con, "use_maximum_z")
+ colsub = col.column()
+ colsub.active = con.use_maximum_z
+ colsub.itemR(con, "maximum_z", text="")
+
+ row = layout.row()
+ row.itemR(con, "limit_transform")
+ row.itemL()
+
+ row = layout.row()
+ row.itemL(text="Convert:")
+ row.itemR(con, "owner_space", text="")
+
+ def limit_scale(self, layout, con):
+ split = layout.split()
+
+ col = split.column()
+ col.itemR(con, "use_minimum_x")
+ colsub = col.column()
+ colsub.active = con.use_minimum_x
+ colsub.itemR(con, "minimum_x", text="")
+ col.itemR(con, "use_maximum_x")
+ colsub = col.column()
+ colsub.active = con.use_maximum_x
+ colsub.itemR(con, "maximum_x", text="")
+
+ col = split.column()
+ col.itemR(con, "use_minimum_y")
+ colsub = col.column()
+ colsub.active = con.use_minimum_y
+ colsub.itemR(con, "minimum_y", text="")
+ col.itemR(con, "use_maximum_y")
+ colsub = col.column()
+ colsub.active = con.use_maximum_y
+ colsub.itemR(con, "maximum_y", text="")
+
+ col = split.column()
+ col.itemR(con, "use_minimum_z")
+ colsub = col.column()
+ colsub.active = con.use_minimum_z
+ colsub.itemR(con, "minimum_z", text="")
+ col.itemR(con, "use_maximum_z")
+ colsub = col.column()
+ colsub.active = con.use_maximum_z
+ colsub.itemR(con, "maximum_z", text="")
+
+ row = layout.row()
+ row.itemR(con, "limit_transform")
+ row.itemL()
+
+ row = layout.row()
+ row.itemL(text="Convert:")
+ row.itemR(con, "owner_space", text="")
+
+ def copy_rotation(self, layout, con):
+ self.target_template(layout, con)
+
+ split = layout.split()
+
+ col = split.column()
+ col.itemR(con, "rotate_like_x", text="X")
+ colsub = col.column()
+ colsub.active = con.rotate_like_x
+ colsub.itemR(con, "invert_x", text="Invert")
+
+ col = split.column()
+ col.itemR(con, "rotate_like_y", text="Y")
+ colsub = col.column()
+ colsub.active = con.rotate_like_y
+ colsub.itemR(con, "invert_y", text="Invert")
+
+ col = split.column()
+ col.itemR(con, "rotate_like_z", text="Z")
+ colsub = col.column()
+ colsub.active = con.rotate_like_z
+ colsub.itemR(con, "invert_z", text="Invert")
+
+ layout.itemR(con, "offset")
+
+ self.space_template(layout, con)
+
+ def copy_location(self, layout, con):
+ self.target_template(layout, con)
+
+ split = layout.split()
+
+ col = split.column()
+ col.itemR(con, "locate_like_x", text="X")
+ colsub = col.column()
+ colsub.active = con.locate_like_x
+ colsub.itemR(con, "invert_x", text="Invert")
+
+ col = split.column()
+ col.itemR(con, "locate_like_y", text="Y")
+ colsub = col.column()
+ colsub.active = con.locate_like_y
+ colsub.itemR(con, "invert_y", text="Invert")
+
+ col = split.column()
+ col.itemR(con, "locate_like_z", text="Z")
+ colsub = col.column()
+ colsub.active = con.locate_like_z
+ colsub.itemR(con, "invert_z", text="Invert")
+
+ layout.itemR(con, "offset")
+
+ self.space_template(layout, con)
+
+ def copy_scale(self, layout, con):
+ self.target_template(layout, con)
+
+ row = layout.row(align=True)
+ row.itemR(con, "size_like_x", text="X")
+ row.itemR(con, "size_like_y", text="Y")
+ row.itemR(con, "size_like_z", text="Z")
+
+ layout.itemR(con, "offset")
+
+ self.space_template(layout, con)
+
+ #def script(self, layout, con):
+
+ def action(self, layout, con):
+ self.target_template(layout, con)
+
+ layout.itemR(con, "action")
+ layout.itemR(con, "transform_channel")
+
+ split = layout.split()
+
+ col = split.column(align=True)
+ col.itemR(con, "start_frame", text="Start")
+ col.itemR(con, "end_frame", text="End")
+
+ col = split.column(align=True)
+ col.itemR(con, "minimum", text="Min")
+ col.itemR(con, "maximum", text="Max")
+
+ row = layout.row()
+ row.itemL(text="Convert:")
+ row.itemR(con, "owner_space", text="")
+
+ def locked_track(self, layout, con):
+ self.target_template(layout, con)
+
+ row = layout.row()
+ row.itemL(text="To:")
+ row.itemR(con, "track", expand=True)
+
+ row = layout.row()
+ row.itemL(text="Lock:")
+ row.itemR(con, "locked", expand=True)
+
+ def limit_distance(self, layout, con):
+ self.target_template(layout, con)
+
+ layout.itemR(con, "distance")
+
+ row = layout.row()
+ row.itemL(text="Clamp Region:")
+ row.itemR(con, "limit_mode", text="")
+ #Missing: Recalculate Button
+
+ def stretch_to(self, layout, con):
+ self.target_template(layout, con)
+
+ row = layout.row()
+ row.itemR(con, "original_length", text="Rest Length")
+ row.itemR(con, "bulge", text="Volume Variation")
+
+ row = layout.row()
+ row.itemL(text="Volume:")
+ row.itemR(con, "volume", expand=True)
+ row.itemL(text="Plane:")
+ row.itemR(con, "keep_axis", expand=True)
+ #Missing: Recalculate Button
+
+ def floor(self, layout, con):
+ self.target_template(layout, con)
+
+ row = layout.row()
+ row.itemR(con, "sticky")
+ row.itemR(con, "use_rotation")
+
+ layout.itemR(con, "offset")
+
+ row = layout.row()
+ row.itemL(text="Min/Max:")
+ row.itemR(con, "floor_location", expand=True)
+
+ def rigid_body(self, layout, con):
+ self.target_template(layout, con)
+
+ layout.itemR(con, "pivot_type")
+ layout.itemR(con, "child")
+
+ row = layout.row()
+ row.itemR(con, "disable_linked_collision", text="No Collision")
+ row.itemR(con, "draw_pivot")
+
+ split = layout.split()
+
+ col = split.column()
+ col.itemR(con, "pivot_x")
+ col.itemR(con, "pivot_y")
+ col.itemR(con, "pivot_z")
+
+ col = split.column()
+ col.itemR(con, "axis_x")
+ col.itemR(con, "axis_y")
+ col.itemR(con, "axis_z")
+
+ #Missing: Limit arrays (not wrapped in RNA yet)
+
+ def clamp_to(self, layout, con):
+ self.target_template(layout, con)
+
+ row = layout.row()
+ row.itemL(text="Main Axis:")
+ row.itemR(con, "main_axis", expand=True)
+
+ row = layout.row()
+ row.itemR(con, "cyclic")
+
+ def transform(self, layout, con):
+ self.target_template(layout, con)
+
+ layout.itemR(con, "extrapolate_motion", text="Extrapolate")
+
+ split = layout.split()
+
+ col = split.column()
+ col.itemL(text="Source:")
+ col.row().itemR(con, "map_from", expand=True)
+
+ sub = col.row(align=True)
+ sub.itemL(text="X:")
+ sub.itemR(con, "from_min_x", text="")
+ sub.itemR(con, "from_max_x", text="")
+
+ sub = col.row(align=True)
+ sub.itemL(text="Y:")
+ sub.itemR(con, "from_min_y", text="")
+ sub.itemR(con, "from_max_y", text="")
+
+ sub = col.row(align=True)
+ sub.itemL(text="Z:")
+ sub.itemR(con, "from_min_z", text="")
+ sub.itemR(con, "from_max_z", text="")
+
+ split = layout.split()
+
+ col = split.column()
+ col.itemL(text="Destination:")
+ col.row().itemR(con, "map_to", expand=True)
+
+ sub = col.row(align=True)
+ sub.itemR(con, "map_to_x_from", text="")
+ sub.itemR(con, "to_min_x", text="")
+ sub.itemR(con, "to_max_x", text="")
+
+ sub = col.row(align=True)
+ sub.itemR(con, "map_to_y_from", text="")
+ sub.itemR(con, "to_min_y", text="")
+ sub.itemR(con, "to_max_y", text="")
+
+ sub = col.row(align=True)
+ sub.itemR(con, "map_to_z_from", text="")
+ sub.itemR(con, "to_min_z", text="")
+ sub.itemR(con, "to_max_z", text="")
+
+ self.space_template(layout, con)
+
+ def shrinkwrap (self, layout, con):
+ self.target_template(layout, con)
+
+ layout.itemR(con, "distance")
+ layout.itemR(con, "shrinkwrap_type")
+
+ if con.shrinkwrap_type == "PROJECT":
+ row = layout.row(align=True)
+ row.itemR(con, "axis_x")
+ row.itemR(con, "axis_y")
+ row.itemR(con, "axis_z")
+
+class OBJECT_PT_constraints(ConstraintButtonsPanel):
+ __idname__ = "OBJECT_PT_constraints"
+ __label__ = "Constraints"
+ __context__ = "constraint"
+
+ def poll(self, context):
+ return (context.object != None)
+
+ def draw(self, context):
+ ob = context.object
+ layout = self.layout
+
+ row = layout.row()
+ row.item_menu_enumO("OBJECT_OT_constraint_add", "type")
+ row.itemL();
+
+ for con in ob.constraints:
+ self.draw_constraint(con)
+
+class BONE_PT_constraints(ConstraintButtonsPanel):
+ __idname__ = "BONE_PT_constraints"
+ __label__ = "Bone Constraints"
+ __context__ = "constraint"
+
+ def poll(self, context):
+ ob = context.object
+ return (ob and ob.type == "ARMATURE")
+
+ def draw(self, context):
+ ob = context.object
+ pchan = ob.pose.pose_channels[0] # XXX
+ layout = self.layout
+
+ #row = layout.row()
+ #row.item_menu_enumO("BONE_OT_constraint_add", "type")
+ #row.itemL();
+
+ for con in pchan.constraints:
+ self.draw_constraint(con)
+
+bpy.types.register(OBJECT_PT_constraints)
+bpy.types.register(BONE_PT_constraints) \ No newline at end of file
diff --git a/release/ui/buttons_objects.py b/release/ui/buttons_objects.py
new file mode 100644
index 00000000000..6d75146fe5f
--- /dev/null
+++ b/release/ui/buttons_objects.py
@@ -0,0 +1,135 @@
+
+import bpy
+
+class ObjectButtonsPanel(bpy.types.Panel):
+ __space_type__ = "BUTTONS_WINDOW"
+ __region_type__ = "WINDOW"
+ __context__ = "object"
+
+ def poll(self, context):
+ return (context.object != None)
+
+class OBJECT_PT_transform(ObjectButtonsPanel):
+ __idname__ = "OBJECT_PT_transform"
+ __label__ = "Transform"
+
+ def draw(self, context):
+ ob = context.object
+ layout = self.layout
+
+ row = layout.row()
+ row.column().itemR(ob, "location")
+ row.column().itemR(ob, "rotation")
+ row.column().itemR(ob, "scale")
+
+class OBJECT_PT_groups(ObjectButtonsPanel):
+ __idname__ = "OBJECT_PT_groups"
+ __label__ = "Groups"
+
+ def draw(self, context):
+ ob = context.object
+ layout = self.layout
+
+ row = layout.row()
+ row.itemR(ob, "pass_index")
+ row.itemR(ob, "parent")
+
+ # layout.left_right()
+ # layout.itemO("OBJECT_OT_add_group");
+
+ for group in bpy.data.groups:
+ if ob in group.objects:
+ col = layout.column(align=True)
+
+ row = col.box().row()
+ row.itemR(group, "name", text="")
+ #row.itemO("OBJECT_OT_remove_group")
+
+ split = col.box().split()
+ split.column().itemR(group, "layer")
+ split.column().itemR(group, "dupli_offset")
+
+class OBJECT_PT_display(ObjectButtonsPanel):
+ __idname__ = "OBJECT_PT_display"
+ __label__ = "Display"
+
+ def draw(self, context):
+ ob = context.object
+ layout = self.layout
+
+ row = layout.row()
+ row.itemR(ob, "max_draw_type", text="Type")
+ row.itemR(ob, "draw_bounds_type", text="Bounds")
+
+ flow = layout.column_flow()
+ flow.itemR(ob, "draw_name", text="Name")
+ flow.itemR(ob, "draw_axis", text="Axis")
+ flow.itemR(ob, "draw_wire", text="Wire")
+ flow.itemR(ob, "draw_texture_space", text="Texture Space")
+ flow.itemR(ob, "x_ray", text="X-Ray")
+ flow.itemR(ob, "draw_transparent", text="Transparency")
+
+class OBJECT_PT_duplication(ObjectButtonsPanel):
+ __idname__ = "OBJECT_PT_duplication"
+ __label__ = "Duplication"
+
+ def draw(self, context):
+ ob = context.object
+ layout = self.layout
+
+ layout.itemR(ob, "dupli_type", expand=True)
+
+ if ob.dupli_type == 'FRAMES':
+ split = layout.split()
+
+ sub = split.column(align=True)
+ sub.itemR(ob, "dupli_frames_start", text="Start")
+ sub.itemR(ob, "dupli_frames_end", text="End")
+
+ sub = split.column(align=True)
+ sub.itemR(ob, "dupli_frames_on", text="On")
+ sub.itemR(ob, "dupli_frames_off", text="Off")
+
+ layout.itemR(ob, "dupli_frames_no_speed", text="No Speed")
+
+ elif ob.dupli_type == 'VERTS':
+ layout.itemR(ob, "dupli_verts_rotation", text="Rotation")
+
+ elif ob.dupli_type == 'FACES':
+ row = layout.row()
+ row.itemR(ob, "dupli_faces_scale", text="Scale")
+ row.itemR(ob, "dupli_faces_inherit_scale", text="Inherit Scale")
+
+ elif ob.dupli_type == 'GROUP':
+ layout.itemR(ob, "dupli_group", text="Group")
+
+class OBJECT_PT_animation(ObjectButtonsPanel):
+ __idname__ = "OBJECT_PT_animation"
+ __label__ = "Animation"
+
+ def draw(self, context):
+ ob = context.object
+ layout = self.layout
+
+ split = layout.split()
+
+ sub = split.column()
+ sub.itemL(text="Time Offset:")
+ sub.itemR(ob, "time_offset_edit", text="Edit")
+ sub.itemR(ob, "time_offset_particle", text="Particle")
+ sub.itemR(ob, "time_offset_parent", text="Parent")
+ sub.itemR(ob, "slow_parent")
+ sub.itemR(ob, "time_offset", text="Offset")
+
+ sub = split.column()
+ sub.itemL(text="Tracking:")
+ sub.itemR(ob, "track_axis", text="Axis")
+ sub.itemR(ob, "up_axis", text="Up Axis")
+ sub.itemR(ob, "track_rotation", text="Rotation")
+
+bpy.types.register(OBJECT_PT_transform)
+bpy.types.register(OBJECT_PT_groups)
+bpy.types.register(OBJECT_PT_display)
+bpy.types.register(OBJECT_PT_duplication)
+bpy.types.register(OBJECT_PT_animation)
+
diff --git a/release/ui/buttons_particle.py b/release/ui/buttons_particle.py
new file mode 100644
index 00000000000..571cafb709d
--- /dev/null
+++ b/release/ui/buttons_particle.py
@@ -0,0 +1,630 @@
+
+import bpy
+
+def particle_panel_enabled(psys):
+ return psys.point_cache.baked==False and psys.editable==False
+
+def particle_panel_poll(context):
+ psys = context.particle_system
+ if psys==None: return False
+ return psys.settings.type in ('EMITTER', 'REACTOR', 'HAIR')
+
+class ParticleButtonsPanel(bpy.types.Panel):
+ __space_type__ = "BUTTONS_WINDOW"
+ __region_type__ = "WINDOW"
+ __context__ = "particle"
+
+ def poll(self, context):
+ return particle_panel_poll(context)
+
+class PARTICLE_PT_particles(ParticleButtonsPanel):
+ __idname__= "PARTICLE_PT_particles"
+ __label__ = "Particle System"
+
+ def poll(self, context):
+ return (context.particle_system or context.object)
+
+ def draw(self, context):
+ layout = self.layout
+ ob = context.object
+ psys = context.particle_system
+
+ split = layout.split(percentage=0.65)
+
+ if psys:
+ split.template_ID(context, psys, "settings")
+
+ #if ob:
+ # split.itemR(ob, "active_particle_system_index", text="Active")
+
+ if psys:
+ #row = layout.row()
+ #row.itemL(text="Particle system datablock")
+ #row.itemL(text="Viewport")
+ #row.itemL(text="Render")
+
+ part = psys.settings
+ ptype = psys.settings.type
+
+ if ptype not in ('EMITTER', 'REACTOR', 'HAIR'):
+ layout.itemL(text="No settings for fluid particles")
+ return
+
+ row = layout.row()
+ row.enabled = particle_panel_enabled(psys)
+ row.itemR(part, "type")
+ row.itemR(psys, "seed")
+
+ row = layout.row()
+ if part.type=='HAIR':
+ if psys.editable==True:
+ row.itemO("PARTICLE_OT_editable_set", text="Free Edit")
+ else:
+ row.itemO("PARTICLE_OT_editable_set", text="Make Editable")
+ subrow = row.row()
+ subrow.enabled = particle_panel_enabled(psys)
+ subrow.itemR(part, "hair_step")
+ elif part.type=='REACTOR':
+ row.itemR(psys, "reactor_target_object")
+ row.itemR(psys, "reactor_target_particle_system", text="Particle System")
+
+ if psys:
+ #row = layout.row()
+ #row.itemL(text="Particle system datablock")
+ #row.itemL(text="Viewport")
+ #row.itemL(text="Render")
+
+ part = psys.settings
+ ptype = psys.settings.type
+
+ if ptype not in ('EMITTER', 'REACTOR', 'HAIR'):
+ layout.itemL(text="No settings for fluid particles")
+ return
+
+ row = layout.row()
+ row.enabled = particle_panel_enabled(psys)
+ row.itemR(part, "type", expand=True)
+
+
+ row = layout.row()
+ if part.type=='HAIR':
+ if psys.editable==True:
+ row.itemO("PARTICLE_OT_editable_set", text="Free Edit")
+ else:
+ row.itemO("PARTICLE_OT_editable_set", text="Make Editable")
+ subrow = row.row()
+ subrow.enabled = particle_panel_enabled(psys)
+ subrow.itemR(part, "hair_step")
+ elif part.type=='REACTOR':
+ row.itemR(psys, "reactor_target_object")
+ row.itemR(psys, "reactor_target_particle_system", text="Particle System")
+
+class PARTICLE_PT_emission(ParticleButtonsPanel):
+ __idname__= "PARTICLE_PT_emission"
+ __label__ = "Emission"
+
+ def draw(self, context):
+ layout = self.layout
+
+ psys = context.particle_system
+ part = psys.settings
+
+ layout.enabled = particle_panel_enabled(psys)
+
+ row = layout.row()
+ #col.itemL(text="TODO: Rate instead of amount")
+ row.itemR(part, "amount")
+ row.itemR(psys, "seed")
+
+ split = layout.split()
+
+ col = split.column(align=True)
+ col.itemR(part, "start")
+ col.itemR(part, "end")
+
+ col = split.column(align=True)
+ col.itemR(part, "lifetime")
+ col.itemR(part, "random_lifetime", slider=True)
+
+ layout.row().itemL(text="Emit From:")
+
+ row = layout.row()
+ row.itemR(part, "emit_from", expand=True)
+ row = layout.row()
+ row.itemR(part, "trand")
+ if part.distribution!='GRID':
+ row.itemR(part, "even_distribution")
+
+ if part.emit_from=='FACE' or part.emit_from=='VOLUME':
+ row = layout.row()
+ row.itemR(part, "distribution", expand=True)
+
+ row = layout.row()
+
+ if part.distribution=='JIT':
+ row.itemR(part, "userjit", text="Particles/Face")
+ row.itemR(part, "jitter_factor", text="Jittering Amount", slider=True)
+ elif part.distribution=='GRID':
+ row.itemR(part, "grid_resolution")
+
+class PARTICLE_PT_cache(ParticleButtonsPanel):
+ __idname__= "PARTICLE_PT_cache"
+ __label__ = "Cache"
+
+ def poll(self, context):
+ psys = context.particle_system
+ if psys==None: return False
+ return psys.settings.type in ('EMITTER', 'REACTOR')
+
+ def draw(self, context):
+ layout = self.layout
+
+ psys = context.particle_system
+ part = psys.settings
+ cache = psys.point_cache
+
+ #if cache.baked==True:
+ #layout.itemO("PARTICLE_OT_free_bake", text="BAKE")
+ #else:
+ row = layout.row()
+ #row.itemO("PARTICLE_OT_bake", text="BAKE")
+ row.itemR(cache, "start_frame")
+ row.itemR(cache, "end_frame")
+
+ #layout.row().itemL(text="No simulation frames in disk cache.")
+
+class PARTICLE_PT_initial(ParticleButtonsPanel):
+ __idname__= "PARTICLE_PT_initial"
+ __label__ = "Velocity"
+
+ def draw(self, context):
+ layout = self.layout
+
+ psys = context.particle_system
+ part = psys.settings
+
+ layout.enabled = particle_panel_enabled(psys)
+
+ #layout.row().itemL(text="")
+
+ layout.row().itemL(text="Direction:")
+
+ split = layout.split()
+
+ sub = split.column()
+ sub.itemR(part, "normal_factor")
+ if part.emit_from=='PARTICLE':
+ sub.itemR(part, "particle_factor")
+ else:
+ sub.itemR(part, "object_factor", slider=True)
+ sub.itemR(part, "random_factor")
+ sub.itemR(part, "tangent_factor")
+ sub.itemR(part, "tangent_phase", slider=True)
+
+ sub = split.column()
+ sub.itemL(text="TODO:")
+ sub.itemL(text="Object aligned")
+ sub.itemL(text="direction: X, Y, Z")
+
+ if part.type=='REACTOR':
+ sub.itemR(part, "reactor_factor")
+ sub.itemR(part, "reaction_shape", slider=True)
+ else:
+ sub.itemL(text="")
+
+ layout.row().itemL(text="Rotation:")
+ split = layout.split()
+
+ sub = split.column()
+
+ sub.itemR(part, "rotation_mode", text="Axis")
+ split = layout.split()
+
+ sub = split.column()
+ sub.itemR(part, "rotation_dynamic")
+ sub.itemR(part, "random_rotation_factor", slider=True)
+ sub = split.column()
+ sub.itemR(part, "phase_factor", slider=True)
+ sub.itemR(part, "random_phase_factor", text="Random", slider=True)
+
+ layout.row().itemL(text="Angular velocity:")
+ layout.row().itemR(part, "angular_velocity_mode", expand=True)
+ split = layout.split()
+
+ sub = split.column()
+
+ sub.itemR(part, "angular_velocity_factor", text="")
+
+class PARTICLE_PT_physics(ParticleButtonsPanel):
+ __idname__= "PARTICLE_PT_physics"
+ __label__ = "Physics"
+
+ def draw(self, context):
+ layout = self.layout
+
+ psys = context.particle_system
+ part = psys.settings
+
+ layout.enabled = layout.enabled = particle_panel_enabled(psys)
+
+ row = layout.row()
+ row.itemR(part, "physics_type", expand=True)
+ if part.physics_type != 'NO':
+ layout.itemR(part, "effector_group")
+
+ row = layout.row()
+ col = row.column(align=True)
+ col.itemR(part, "particle_size")
+ col.itemR(part, "random_size", slider=True)
+ col = row.column(align=True)
+ col.itemR(part, "mass")
+ col.itemR(part, "sizemass", text="Multiply mass with size")
+
+ split = layout.split()
+
+ sub = split.column()
+
+ if part.physics_type == 'NEWTON':
+
+ sub.itemL(text="Forces:")
+ sub.itemR(part, "brownian_factor")
+ sub.itemR(part, "drag_factor", slider=True)
+ sub.itemR(part, "damp_factor", slider=True)
+ sub.itemR(part, "integrator")
+ sub = split.column()
+ sub.itemR(part, "acceleration")
+
+ elif part.physics_type == 'KEYED':
+ sub.itemR(psys, "keyed_first")
+ if psys.keyed_first==True:
+ sub.itemR(psys, "timed_keys", text="Key timing")
+ else:
+ sub.itemR(part, "keyed_time")
+ sub = split.column()
+ sub.itemL(text="Next key from object:")
+ sub.itemR(psys, "keyed_object", text="")
+ sub.itemR(psys, "keyed_particle_system")
+
+ if part.physics_type=='NEWTON' or part.physics_type=='BOIDS':
+
+ sub.itemR(part, "size_deflect")
+ sub.itemR(part, "die_on_collision")
+ sub.itemR(part, "sticky")
+
+class PARTICLE_PT_render(ParticleButtonsPanel):
+ __idname__= "PARTICLE_PT_render"
+ __label__ = "Render"
+
+ def poll(self, context):
+ return (context.particle_system != None)
+
+ def draw(self, context):
+ layout = self.layout
+
+ psys = context.particle_system
+ part = psys.settings
+
+ layout.itemR(part, "material")
+
+ split = layout.split()
+
+ sub = split.column()
+ sub.itemR(part, "emitter");
+ sub.itemR(part, "parent");
+ sub = split.column()
+ sub.itemR(part, "unborn");
+ sub.itemR(part, "died");
+
+ row = layout.row()
+ row.itemR(part, "ren_as", expand=True)
+
+ split = layout.split()
+
+ sub = split.column()
+
+ if part.ren_as == 'LINE':
+ sub.itemR(part, "line_length_tail")
+ sub.itemR(part, "line_length_head")
+ sub = split.column()
+ sub.itemR(part, "velocity_length")
+ elif part.ren_as == 'PATH':
+
+ if (part.type!='HAIR' and psys.point_cache.baked==False):
+ box = layout.box()
+ box.itemL(text="Baked or keyed particles needed for correct rendering.")
+ return
+
+ sub.itemR(part, "render_strand")
+ colsub = sub.column()
+ colsub.active = part.render_strand == False
+ colsub.itemR(part, "render_adaptive")
+ colsub = sub.column()
+ colsub.active = part.render_adaptive or part.render_strand == True
+ colsub.itemR(part, "adaptive_angle")
+ colsub = sub.column()
+ colsub.active = part.render_adaptive == True and part.render_strand == False
+ colsub.itemR(part, "adaptive_pix")
+ sub.itemR(part, "hair_bspline")
+ sub.itemR(part, "render_step", text="Steps")
+ sub = split.column()
+ sub.itemL(text="Length:")
+ sub.itemR(part, "abs_length", text="Absolute")
+ sub.itemR(part, "absolute_length", text="Maximum")
+ sub.itemR(part, "random_length", text="Random", slider=True)
+
+ #row = layout.row()
+ #row.itemR(part, "timed_path")
+ #col = row.column(align=True)
+ #col.active = part.timed_path == True
+ #col.itemR(part, "line_length_tail", text="Start")
+ #col.itemR(part, "line_length_head", text="End")
+
+ row = layout.row()
+ col = row.column()
+
+
+# subrow = col.row()
+# subrow.active = part.render_strand == False
+# subrow.itemR(part, "render_adaptive")
+# col = row.column(align=True)
+# subrow = col.row()
+# subrow.active = part.render_adaptive or part.render_strand == True
+# subrow.itemR(part, "adaptive_angle")
+# subrow = col.row()
+# subrow.active = part.render_adaptive == True and part.render_strand == False
+# subrow.itemR(part, "adaptive_pix")
+
+ if part.type=='HAIR' and part.render_strand==True and part.child_type=='FACES':
+ layout.itemR(part, "enable_simplify")
+ if part.enable_simplify==True:
+ box = layout.box()
+ row = box.row()
+ row.itemR(part, "simplify_refsize")
+ row.itemR(part, "simplify_rate")
+ row.itemR(part, "simplify_transition")
+ row = box.row()
+ row.itemR(part, "viewport")
+ subrow = row.row()
+ subrow.active = part.viewport==True
+ subrow.itemR(part, "simplify_viewport")
+
+
+ elif part.ren_as == 'OBJECT':
+ #sub = split.column()
+ sub.itemR(part, "dupli_object")
+ elif part.ren_as == 'GROUP':
+ sub.itemR(part, "dupli_group")
+ split = layout.split()
+ sub = split.column()
+ sub.itemR(part, "whole_group")
+ sub = split.column()
+ colsub = sub.column()
+ colsub.active = part.whole_group == False
+ colsub.itemR(part, "rand_group")
+
+ elif part.ren_as == 'BILLBOARD':
+ sub.itemL(text="Align:")
+
+ row = layout.row()
+ row.itemR(part, "billboard_align", expand=True)
+ row.itemR(part, "billboard_lock", text="Lock")
+ row = layout.row()
+ row.itemR(part, "billboard_object")
+
+ row = layout.row()
+ col = row.column(align=True)
+ col.itemL(text="Tilt:")
+ col.itemR(part, "billboard_tilt", text="Angle", slider=True)
+ col.itemR(part, "billboard_random_tilt", slider=True)
+ col = row.column()
+ col.itemR(part, "billboard_offset")
+
+ row = layout.row()
+ row.itemR(psys, "billboard_normal_uv")
+ row = layout.row()
+ row.itemR(psys, "billboard_time_index_uv")
+
+ row = layout.row()
+ row.itemL(text="Split uv's:")
+ row.itemR(part, "billboard_uv_split", text="Number of splits")
+ row = layout.row()
+ row.itemR(psys, "billboard_split_uv")
+ row = layout.row()
+ row.itemL(text="Animate:")
+ row.itemR(part, "billboard_animation", expand=True)
+ row.itemL(text="Offset:")
+ row.itemR(part, "billboard_split_offset", expand=True)
+
+class PARTICLE_PT_draw(ParticleButtonsPanel):
+ __idname__= "PARTICLE_PT_draw"
+ __label__ = "Display"
+
+ def poll(self, context):
+ return (context.particle_system != None)
+
+ def draw(self, context):
+ layout = self.layout
+
+ psys = context.particle_system
+ part = psys.settings
+
+ row = layout.row()
+ row.itemR(part, "draw_as", expand=True)
+
+ if part.draw_as=='NONE' or (part.ren_as=='NONE' and part.draw_as=='RENDER'):
+ return
+
+ path = (part.ren_as=='PATH' and part.draw_as=='RENDER') or part.draw_as=='PATH'
+
+ if path and part.type!='HAIR' and psys.point_cache.baked==False:
+ box = layout.box()
+ box.itemL(text="Baked or keyed particles needed for correct drawing.")
+ return
+
+ row = layout.row()
+ row.itemR(part, "display", slider=True)
+ if part.draw_as!='RENDER' or part.ren_as=='HALO':
+ row.itemR(part, "draw_size")
+ else:
+ row.itemL(text="")
+
+ row = layout.row()
+ col = row.column()
+ col.itemR(part, "show_size")
+ col.itemR(part, "velocity")
+ col.itemR(part, "num")
+ if part.physics_type == 'BOIDS':
+ col.itemR(part, "draw_health")
+
+ col = row.column()
+ if (path):
+ box = col.box()
+ box.itemR(part, "draw_step")
+ else:
+ col.itemR(part, "material_color", text="Use material color")
+ subcol = col.column()
+ subcol.active = part.material_color==False
+ #subcol.itemL(text="color")
+ #subcol.itemL(text="Override material color")
+
+class PARTICLE_PT_children(ParticleButtonsPanel):
+ __idname__= "PARTICLE_PT_children"
+ __label__ = "Children"
+
+ def draw(self, context):
+ layout = self.layout
+
+ psys = context.particle_system
+ part = psys.settings
+
+ layout.row().itemR(part, "child_type", expand=True)
+
+ if part.child_type=='NONE':
+ return
+
+ row = layout.row()
+
+ col = row.column(align=True)
+ col.itemR(part, "child_nbr", text="Display")
+ col.itemR(part, "rendered_child_nbr", text="Render")
+
+ col = row.column(align=True)
+
+ if part.child_type=='FACES':
+ col.itemR(part, "virtual_parents", slider=True)
+ else:
+ col.itemR(part, "child_radius", text="Radius")
+ col.itemR(part, "child_roundness", text="Roundness", slider=True)
+
+ col = row.column(align=True)
+ col.itemR(part, "child_size", text="Size")
+ col.itemR(part, "child_random_size", text="Random")
+
+ layout.row().itemL(text="Effects:")
+
+ row = layout.row()
+
+ col = row.column(align=True)
+ col.itemR(part, "clump_factor", slider=True)
+ col.itemR(part, "clumppow", slider=True)
+
+ col = row.column(align=True)
+ col.itemR(part, "rough_endpoint")
+ col.itemR(part, "rough_end_shape")
+
+ row = layout.row()
+
+ col = row.column(align=True)
+ col.itemR(part, "rough1")
+ col.itemR(part, "rough1_size")
+
+ col = row.column(align=True)
+ col.itemR(part, "rough2")
+ col.itemR(part, "rough2_size")
+ col.itemR(part, "rough2_thres", slider=True)
+
+ layout.row().itemL(text="Kink:")
+ layout.row().itemR(part, "kink", expand=True)
+
+ split = layout.split()
+
+ sub = split.column()
+ sub.itemR(part, "kink_amplitude")
+ sub.itemR(part, "kink_frequency")
+ sub = split.column()
+ sub.itemR(part, "kink_shape", slider=True)
+
+class PARTICLE_PT_vertexgroups(ParticleButtonsPanel):
+ __idname__= "PARTICLE_PT_vertexgroups"
+ __label__ = "Vertexgroups"
+
+ def draw(self, context):
+ layout = self.layout
+
+ psys = context.particle_system
+ part = psys.settings
+
+ layout.itemL(text="Nothing here yet.")
+
+ #row = layout.row()
+ #row.itemL(text="Vertex Group")
+ #row.itemL(text="Negate")
+
+
+ #row = layout.row()
+ #row.itemR(psys, "vertex_group_density")
+ #row.itemR(psys, "vertex_group_density_negate", text="")
+
+ #row = layout.row()
+ #row.itemR(psys, "vertex_group_velocity")
+ #row.itemR(psys, "vertex_group_velocity_negate", text="")
+
+ #row = layout.row()
+ #row.itemR(psys, "vertex_group_length")
+ #row.itemR(psys, "vertex_group_length_negate", text="")
+
+ #row = layout.row()
+ #row.itemR(psys, "vertex_group_clump")
+ #row.itemR(psys, "vertex_group_clump_negate", text="")
+
+ #row = layout.row()
+ #row.itemR(psys, "vertex_group_kink")
+ #row.itemR(psys, "vertex_group_kink_negate", text="")
+
+ #row = layout.row()
+ #row.itemR(psys, "vertex_group_roughness1")
+ #row.itemR(psys, "vertex_group_roughness1_negate", text="")
+
+ #row = layout.row()
+ #row.itemR(psys, "vertex_group_roughness2")
+ #row.itemR(psys, "vertex_group_roughness2_negate", text="")
+
+ #row = layout.row()
+ #row.itemR(psys, "vertex_group_roughness_end")
+ #row.itemR(psys, "vertex_group_roughness_end_negate", text="")
+
+ #row = layout.row()
+ #row.itemR(psys, "vertex_group_size")
+ #row.itemR(psys, "vertex_group_size_negate", text="")
+
+ #row = layout.row()
+ #row.itemR(psys, "vertex_group_tangent")
+ #row.itemR(psys, "vertex_group_tangent_negate", text="")
+
+ #row = layout.row()
+ #row.itemR(psys, "vertex_group_rotation")
+ #row.itemR(psys, "vertex_group_rotation_negate", text="")
+
+ #row = layout.row()
+ #row.itemR(psys, "vertex_group_field")
+ #row.itemR(psys, "vertex_group_field_negate", text="")
+
+bpy.types.register(PARTICLE_PT_particles)
+bpy.types.register(PARTICLE_PT_cache)
+bpy.types.register(PARTICLE_PT_emission)
+bpy.types.register(PARTICLE_PT_initial)
+bpy.types.register(PARTICLE_PT_physics)
+bpy.types.register(PARTICLE_PT_render)
+bpy.types.register(PARTICLE_PT_draw)
+bpy.types.register(PARTICLE_PT_children)
+bpy.types.register(PARTICLE_PT_vertexgroups)
diff --git a/release/ui/buttons_physic_cloth.py b/release/ui/buttons_physic_cloth.py
new file mode 100644
index 00000000000..efa796df5b0
--- /dev/null
+++ b/release/ui/buttons_physic_cloth.py
@@ -0,0 +1,111 @@
+
+import bpy
+
+class PhysicButtonsPanel(bpy.types.Panel):
+ __space_type__ = "BUTTONS_WINDOW"
+ __region_type__ = "WINDOW"
+ __context__ = "physics"
+
+ def poll(self, context):
+ return (context.cloth != None)
+
+class Physic_PT_cloth(PhysicButtonsPanel):
+ __idname__ = "Physic_PT_cloth"
+ __label__ = "Cloth"
+
+ def draw(self, context):
+ layout = self.layout
+ md = context.cloth
+ cloth = md.settings
+
+ split = layout.split()
+
+ col = split.column()
+ col.itemR(cloth, "quality", slider=True)
+ col.itemR(cloth, "gravity")
+ col.itemR(cloth, "mass")
+ col.itemR(cloth, "mass_vertex_group", text="Vertex Group")
+
+ col = split.column()
+ col.itemL(text="Stiffness:")
+ col.itemR(cloth, "structural_stiffness", text="Structural")
+ col.itemR(cloth, "bending_stiffness", text="Bending")
+ col.itemL(text="Damping:")
+ col.itemR(cloth, "spring_damping", text="Spring")
+ col.itemR(cloth, "air_damping", text="Air")
+
+ # Disabled for now
+ """
+ if cloth.mass_vertex_group:
+ layout.itemL(text="Goal:")
+
+ col = layout.column_flow()
+ col.itemR(cloth, "goal_default", text="Default")
+ col.itemR(cloth, "goal_spring", text="Stiffness")
+ col.itemR(cloth, "goal_friction", text="Friction")
+ """
+
+class Physic_PT_cloth_collision(PhysicButtonsPanel):
+ __idname__ = "Physic_PT_clothcollision"
+ __label__ = "Cloth Collision"
+
+ def draw_header(self, context):
+ layout = self.layout
+ md = context.cloth
+ cloth = md.collision_settings
+
+ layout.itemR(cloth, "enable_collision", text="")
+
+ def draw(self, context):
+ layout = self.layout
+
+ md = context.cloth
+ cloth = md.collision_settings
+ layout.active = cloth.enable_collision
+
+ col = layout.column_flow()
+ col.itemR(cloth, "collision_quality", slider=True)
+ col.itemR(cloth, "friction")
+ col.itemR(cloth, "min_distance", text="MinDistance")
+
+
+ layout.itemR(cloth, "enable_self_collision", text="Self Collision")
+
+ col = layout.column_flow()
+ col.active = cloth.enable_self_collision
+ col.itemR(cloth, "self_collision_quality", slider=True)
+ col.itemR(cloth, "self_min_distance", text="MinDistance")
+
+class Physic_PT_cloth_stiffness(PhysicButtonsPanel):
+ __idname__ = "Physic_PT_stiffness"
+ __label__ = "Cloth Stiffness Scaling"
+
+ def draw_header(self, context):
+ layout = self.layout
+ md = context.cloth
+ cloth = md.settings
+
+ layout.itemR(cloth, "stiffness_scaling", text="")
+
+ def draw(self, context):
+ layout = self.layout
+
+ md = context.cloth
+ cloth = md.settings
+ layout.active = cloth.stiffness_scaling
+
+ split = layout.split()
+
+ sub = split.column()
+ sub.itemL(text="Structural Stiffness:")
+ sub.column().itemR(cloth, "structural_stiffness_vertex_group", text="VGroup")
+ sub.itemR(cloth, "structural_stiffness_max", text="Max")
+
+ sub = split.column()
+ sub.itemL(text="Bending Stiffness:")
+ sub.column().itemR(cloth, "bending_vertex_group", text="VGroup")
+ sub.itemR(cloth, "bending_stiffness_max", text="Max")
+
+bpy.types.register(Physic_PT_cloth)
+bpy.types.register(Physic_PT_cloth_collision)
+bpy.types.register(Physic_PT_cloth_stiffness) \ No newline at end of file
diff --git a/release/ui/buttons_scene.py b/release/ui/buttons_scene.py
new file mode 100644
index 00000000000..e275b888156
--- /dev/null
+++ b/release/ui/buttons_scene.py
@@ -0,0 +1,253 @@
+
+import bpy
+
+class RenderButtonsPanel(bpy.types.Panel):
+ __space_type__ = "BUTTONS_WINDOW"
+ __region_type__ = "WINDOW"
+ __context__ = "scene"
+
+class RENDER_PT_shading(RenderButtonsPanel):
+ __label__ = "Shading"
+
+ def draw(self, context):
+ scene = context.scene
+ layout = self.layout
+
+ rd = scene.render_data
+
+ split = layout.split()
+
+ sub = split.column()
+ sub.itemR(rd, "render_shadows", text="Shadows")
+ sub.itemR(rd, "render_sss", text="Subsurface Scattering")
+ sub.itemR(rd, "render_envmaps", text="Environment Map")
+ # sub.itemR(rd, "render_radiosity", text="Radio")
+
+ col = split.column()
+ col.itemR(rd, "render_raytracing", text="Ray Tracing")
+ colsub = col.column()
+ colsub.active = rd.render_raytracing
+ colsub.itemR(rd, "octree_resolution", text="Octree")
+ col.itemR(rd, "dither_intensity", text="Dither", slider=True)
+
+class RENDER_PT_output(RenderButtonsPanel):
+ __label__ = "Output"
+
+ def draw(self, context):
+ scene = context.scene
+ layout = self.layout
+
+ rd = scene.render_data
+
+ layout.itemR(rd, "output_path")
+
+ split = layout.split()
+
+ col = split.column()
+ col.itemR(rd, "file_extensions")
+ col.itemR(rd, "fields", text="Fields")
+ colsub = col.column()
+ colsub.active = rd.fields
+ colsub.itemR(rd, "fields_still", text="Still")
+ colsub.row().itemR(rd, "field_order", expand=True)
+
+ col = split.column()
+ col.itemR(rd, "color_mode")
+ col.itemR(rd, "alpha_mode")
+ col.itemL(text="Distributed Rendering:")
+ col.itemR(rd, "placeholders")
+ col.itemR(rd, "no_overwrite")
+
+
+ layout.itemR(rd, "file_format", text="Format")
+
+ split = layout.split()
+
+ col = split.column()
+
+ if rd.file_format in ("AVIJPEG", "JPEG"):
+ col.itemR(rd, "quality", slider=True)
+
+ elif rd.file_format in ("OPENEXR"):
+ col.itemR(rd, "exr_codec")
+ col.itemR(rd, "exr_half")
+ col = split.column()
+ col.itemR(rd, "exr_zbuf")
+ col.itemR(rd, "exr_preview")
+
+ elif rd.file_format in ("JPEG2000"):
+ row = layout.row()
+ row.itemR(rd, "jpeg_preset")
+ split = layout.split()
+ col = split.column()
+ col.itemL(text="Depth:")
+ col.row().itemR(rd, "jpeg_depth", expand=True)
+ col = split.column()
+ col.itemR(rd, "jpeg_ycc")
+ col.itemR(rd, "exr_preview")
+
+ elif rd.file_format in ("CINEON", "DPX"):
+ col.itemR(rd, "cineon_log", text="Convert to Log")
+ colsub = col.column()
+ colsub.active = rd.cineon_log
+ colsub.itemR(rd, "cineon_black", text="Black")
+ colsub.itemR(rd, "cineon_white", text="White")
+ colsub.itemR(rd, "cineon_gamma", text="Gamma")
+
+ elif rd.file_format in ("TIFF"):
+ col.itemR(rd, "tiff_bit")
+
+class RENDER_PT_antialiasing(RenderButtonsPanel):
+ __label__ = "Anti-Aliasing"
+
+ def draw_header(self, context):
+ rd = context.scene.render_data
+
+ layout = self.layout
+ layout.itemR(rd, "antialiasing", text="")
+
+ def draw(self, context):
+ scene = context.scene
+ rd = scene.render_data
+
+ layout = self.layout
+ layout.active = rd.antialiasing
+
+ split = layout.split()
+
+ sub = split.column()
+ sub.itemL(text="Samples:")
+ sub.row().itemR(rd, "antialiasing_samples", expand=True)
+ sub.itemR(rd, "pixel_filter")
+
+ col = split.column()
+ col.itemR(rd, "filter_size", text="Size", slider=True)
+ col.itemR(rd, "save_buffers")
+ colsub = col.column()
+ colsub.active = rd.save_buffers
+ colsub.itemR(rd, "full_sample")
+
+class RENDER_PT_render(RenderButtonsPanel):
+ __label__ = "Render"
+
+ def draw(self, context):
+ scene = context.scene
+ layout = self.layout
+
+ rd = scene.render_data
+
+ row = layout.row()
+ row.itemO("SCREEN_OT_render", text="Render Still", icon=109)
+ row.item_booleanO("SCREEN_OT_render", "anim", True, text="Render Animation", icon=111)
+
+ row = layout.row()
+ row.itemR(rd, "do_composite")
+ row.itemR(rd, "do_sequence")
+ rowsub = layout.row()
+ rowsub.active = rd.do_composite
+ rowsub.itemR(rd, "free_image_textures")
+
+ split = layout.split()
+
+ col = split.column(align=True)
+ col.itemL(text="Threads:")
+ col.row().itemR(rd, "threads_mode", expand=True)
+ colsub = col.column()
+ colsub.active = rd.threads_mode == 'THREADS_FIXED'
+ colsub.itemR(rd, "threads")
+
+ sub = split.column(align=True)
+ sub.itemL(text="Tiles:")
+ sub.itemR(rd, "parts_x", text="X")
+ sub.itemR(rd, "parts_y", text="Y")
+
+ split = layout.split()
+ sub = split.column()
+ sub = split.column()
+ sub.itemR(rd, "panorama")
+
+ # row.itemR(rd, "backbuf")
+
+class RENDER_PT_dimensions(RenderButtonsPanel):
+ __label__ = "Dimensions"
+
+ def draw(self, context):
+ scene = context.scene
+ layout = self.layout
+
+ rd = scene.render_data
+
+ split = layout.split()
+
+ col = split.column()
+ sub = col.column(align=True)
+ sub.itemL(text="Resolution:")
+ sub.itemR(rd, "resolution_x", text="X")
+ sub.itemR(rd, "resolution_y", text="Y")
+ sub.itemR(rd, "resolution_percentage", text="")
+
+ sub.itemL(text="Aspect Ratio:")
+ sub.itemR(rd, "pixel_aspect_x", text="X")
+ sub.itemR(rd, "pixel_aspect_y", text="Y")
+
+ col = col.column(align=False)
+ col.itemR(rd, "border", text="Border")
+ colsub = col.column()
+ colsub.active = rd.border
+ colsub.itemR(rd, "crop_to_border")
+
+ col = split.column(align=True)
+ col.itemL(text="Frame Range:")
+ col.itemR(scene, "start_frame", text="Start")
+ col.itemR(scene, "end_frame", text="End")
+ col.itemR(scene, "frame_step", text="Step")
+
+ col.itemL(text="Frame Rate:")
+ col.itemR(rd, "fps")
+ col.itemR(rd, "fps_base",text="/")
+
+class RENDER_PT_stamp(RenderButtonsPanel):
+ __label__ = "Stamp"
+
+ def draw_header(self, context):
+ rd = context.scene.render_data
+
+ layout = self.layout
+ layout.itemR(rd, "stamp", text="")
+
+ def draw(self, context):
+ scene = context.scene
+ rd = scene.render_data
+
+ layout = self.layout
+ layout.active = rd.stamp
+
+ split = layout.split()
+
+ col = split.column()
+ col.itemR(rd, "stamp_time", text="Time")
+ col.itemR(rd, "stamp_date", text="Date")
+ col.itemR(rd, "stamp_frame", text="Frame")
+ col.itemR(rd, "stamp_camera", text="Scene")
+ col.itemR(rd, "stamp_marker", text="Marker")
+ col.itemR(rd, "stamp_filename", text="Filename")
+ col.itemR(rd, "stamp_sequence_strip", text="Seq. Strip")
+ col.itemR(rd, "stamp_note", text="Note")
+ colsub = col.column()
+ colsub.active = rd.stamp_note
+ colsub.itemR(rd, "stamp_note_text", text="")
+
+ sub = split.column()
+ sub.itemR(rd, "render_stamp")
+ colsub = sub.column()
+ colsub.active = rd.render_stamp
+ colsub.itemR(rd, "stamp_foreground")
+ colsub.itemR(rd, "stamp_background")
+ colsub.itemR(rd, "stamp_font_size", text="Font Size")
+
+bpy.types.register(RENDER_PT_render)
+bpy.types.register(RENDER_PT_dimensions)
+bpy.types.register(RENDER_PT_antialiasing)
+bpy.types.register(RENDER_PT_shading)
+bpy.types.register(RENDER_PT_output)
+bpy.types.register(RENDER_PT_stamp) \ No newline at end of file
diff --git a/release/ui/buttons_texture.py b/release/ui/buttons_texture.py
new file mode 100644
index 00000000000..74a1ad9172c
--- /dev/null
+++ b/release/ui/buttons_texture.py
@@ -0,0 +1,499 @@
+
+import bpy
+
+class TextureButtonsPanel(bpy.types.Panel):
+ __space_type__ = "BUTTONS_WINDOW"
+ __region_type__ = "WINDOW"
+ __context__ = "texture"
+
+ def poll(self, context):
+ return (context.texture != None)
+
+class TEXTURE_PT_preview(TextureButtonsPanel):
+ __idname__= "TEXTURE_PT_preview"
+ __label__ = "Preview"
+
+ def poll(self, context):
+ return (context.texture or context.material)
+
+ def draw(self, context):
+ layout = self.layout
+
+ tex = context.texture
+ layout.template_preview(tex)
+
+class TEXTURE_PT_texture(TextureButtonsPanel):
+ __idname__= "TEXTURE_PT_texture"
+ __label__ = "Texture"
+
+ def poll(self, context):
+ return (context.texture or context.material or context.world or context.lamp)
+
+ def draw(self, context):
+ layout = self.layout
+ tex = context.texture
+ ma = context.material
+ la = context.lamp
+ wo = context.world
+ space = context.space_data
+ slot = context.texture_slot
+
+ split = layout.split(percentage=0.65)
+
+ if ma or la or wo:
+ if slot:
+ split.template_ID(context, slot, "texture", new="TEXTURE_OT_new")
+ else:
+ split.itemS()
+
+ if ma:
+ split.itemR(ma, "active_texture_index", text="Active")
+ elif la:
+ split.itemR(la, "active_texture_index", text="Active")
+ elif wo:
+ split.itemR(wo, "active_texture_index", text="Active")
+ elif tex:
+ split.template_ID(context, space, "pin_id")
+ split.itemS()
+
+ layout.itemS()
+
+ if tex:
+ split = layout.split(percentage=0.2)
+
+ col = split.column()
+ col.itemL(text="Type:")
+ col = split.column()
+ col.itemR(tex, "type", text="")
+
+class TEXTURE_PT_map(TextureButtonsPanel):
+ __idname__= "TEXTURE_PT_map"
+ __label__ = "Map"
+
+ def draw(self, context):
+ layout = self.layout
+ tex = context.texture_slot
+
+ split = layout.split(percentage=0.3)
+ col = split.column()
+ col.itemL(text="Coordinates:")
+ col = split.column()
+ col.itemR(tex, "texture_coordinates", text="")
+
+ split = layout.split()
+ col = split.column()
+ if tex.texture_coordinates == 'UV':
+ col.itemR(tex, "uv_layer")
+ elif tex.texture_coordinates == 'OBJECT':
+ col.itemR(tex, "object")
+
+ col = split.column()
+ col.itemR(tex, "from_dupli")
+
+ split = layout.split()
+ col = split.column()
+ col.itemR(tex, "mapping")
+ col = split.column()
+ rowsub = col.row()
+ rowsub.itemL(text="TODO:X")
+ rowsub.itemL(text="TODO:Y")
+ rowsub.itemL(text="TODO:Z")
+
+ split = layout.split()
+ col = split.column()
+ col.itemR(tex, "offset")
+ col = split.column()
+ col.itemR(tex, "size")
+
+ row = layout.row()
+ row.itemL(text="Affect:")
+
+ split = layout.split()
+ col = split.column()
+ col.itemL(text="TODO: Diffuse Color")
+ col.itemR(tex, "color_factor")
+ col.itemR(tex, "blend_type")
+ col.itemR(tex, "no_rgb")
+ colsub = col.column()
+ colsub.active = tex.no_rgb
+ colsub.itemR(tex, "color")
+ col.itemL(text="TODO: Normal")
+ col.itemR(tex, "normal_factor")
+ col.itemR(tex, "normal_map_space")
+ col.itemL(text="TODO: Warp")
+ col.itemR(tex, "warp_factor")
+ col.itemL(text="TODO: Specular Color")
+ col.itemL(text="TODO: Displacement")
+ col.itemR(tex, "displacement_factor")
+ col = split.column()
+ col.itemL(text="TODO: Mirror Color")
+ col.itemL(text="TODO: Reflection")
+ col.itemL(text="TODO: Specularity")
+ col.itemL(text="TODO: Ambient")
+ col.itemL(text="TODO: Hard")
+ col.itemL(text="TODO: Ray Mirror")
+ col.itemL(text="TODO: Alpha")
+ col.itemL(text="TODO: Emit")
+ col.itemL(text="TODO: Translucency")
+
+ col.itemR(tex, "default_value")
+
+ split = layout.split()
+ col = split.column()
+ col.itemR(tex, "stencil")
+ col = split.column()
+ col.itemR(tex, "negate", text="Negative")
+
+
+
+class TEXTURE_PT_colors(TextureButtonsPanel):
+ __idname__= "TEXTURE_PT_colors"
+ __label__ = "Colors"
+
+ def draw(self, context):
+ layout = self.layout
+ tex = context.texture
+
+ if tex.color_ramp:
+ layout.template_color_ramp(tex.color_ramp, expand=True)
+ else:
+ split = layout.split()
+ col = split.column()
+ col.itemR(tex, "rgb_factor")
+
+ col = split.column()
+ col.itemL(text="Adjust:")
+ col.itemR(tex, "brightness")
+ col.itemR(tex, "contrast")
+
+class TEXTURE_PT_clouds(TextureButtonsPanel):
+ __idname__= "TEXTURE_PT_clouds"
+ __label__ = "Clouds"
+
+ def poll(self, context):
+ tex = context.texture
+ return (tex and tex.type == 'CLOUDS')
+
+ def draw(self, context):
+ layout = self.layout
+ tex = context.texture
+
+ layout.itemR(tex, "stype", expand=True)
+ layout.itemL(text="Noise:")
+ layout.itemR(tex, "noise_type", text="Type", expand=True)
+ layout.itemR(tex, "noise_basis", text="Basis")
+
+ col = layout.column_flow()
+ col.itemR(tex, "noise_size", text="Size")
+ col.itemR(tex, "noise_depth", text="Depth")
+ col.itemR(tex, "nabla", text="Nabla")
+
+class TEXTURE_PT_wood(TextureButtonsPanel):
+ __idname__= "TEXTURE_PT_wood"
+ __label__ = "Wood"
+
+ def poll(self, context):
+ tex = context.texture
+ return (tex and tex.type == 'WOOD')
+
+ def draw(self, context):
+ layout = self.layout
+ tex = context.texture
+
+ layout.itemR(tex, "noisebasis2", expand=True)
+ layout.itemR(tex, "stype", expand=True)
+
+ col = layout.column()
+ col.active = tex.stype in ('RINGNOISE', 'BANDNOISE')
+ col.itemL(text="Noise:")
+ col.row().itemR(tex, "noise_type", text="Type", expand=True)
+ col.itemR(tex, "noise_basis", text="Basis")
+
+ col = layout.column_flow()
+ col.active = tex.stype in ('RINGNOISE', 'BANDNOISE')
+ col.itemR(tex, "noise_size", text="Size")
+ col.itemR(tex, "turbulence")
+ col.itemR(tex, "nabla")
+
+class TEXTURE_PT_marble(TextureButtonsPanel):
+ __idname__= "TEXTURE_PT_marble"
+ __label__ = "Marble"
+
+ def poll(self, context):
+ tex = context.texture
+ return (tex and tex.type == 'MARBLE')
+
+ def draw(self, context):
+ layout = self.layout
+ tex = context.texture
+
+ layout.itemR(tex, "stype", expand=True)
+ layout.itemR(tex, "noisebasis2", expand=True)
+ layout.itemL(text="Noise:")
+ layout.itemR(tex, "noise_type", text="Type", expand=True)
+ layout.itemR(tex, "noise_basis", text="Basis")
+
+ col = layout.column_flow()
+ col.itemR(tex, "noise_size", text="Size")
+ col.itemR(tex, "noise_depth", text="Depth")
+ col.itemR(tex, "turbulence")
+ col.itemR(tex, "nabla")
+
+class TEXTURE_PT_magic(TextureButtonsPanel):
+ __idname__= "TEXTURE_PT_magic"
+ __label__ = "Magic"
+
+ def poll(self, context):
+ tex = context.texture
+ return (tex and tex.type == 'MAGIC')
+
+ def draw(self, context):
+ layout = self.layout
+ tex = context.texture
+
+ row = layout.row()
+ row.itemR(tex, "noise_depth", text="Depth")
+ row.itemR(tex, "turbulence")
+
+class TEXTURE_PT_blend(TextureButtonsPanel):
+ __idname__= "TEXTURE_PT_blend"
+ __label__ = "Blend"
+
+ def poll(self, context):
+ tex = context.texture
+ return (tex and tex.type == 'BLEND')
+
+ def draw(self, context):
+ layout = self.layout
+ tex = context.texture
+
+ layout.itemR(tex, "progression")
+ layout.itemR(tex, "flip_axis")
+
+class TEXTURE_PT_stucci(TextureButtonsPanel):
+ __idname__= "TEXTURE_PT_stucci"
+ __label__ = "Stucci"
+
+ def poll(self, context):
+ tex = context.texture
+ return (tex and tex.type == 'STUCCI')
+
+ def draw(self, context):
+ layout = self.layout
+ tex = context.texture
+
+ layout.itemR(tex, "stype", expand=True)
+ layout.itemL(text="Noise:")
+ layout.itemR(tex, "noise_type", text="Type", expand=True)
+ layout.itemR(tex, "noise_basis", text="Basis")
+
+ row = layout.row()
+ row.itemR(tex, "noise_size", text="Size")
+ row.itemR(tex, "turbulence")
+
+class TEXTURE_PT_image(TextureButtonsPanel):
+ __idname__= "TEXTURE_PT_image"
+ __label__ = "Image/Movie"
+
+ def poll(self, context):
+ tex = context.texture
+ return (tex and tex.type == 'IMAGE')
+
+ def draw(self, context):
+ layout = self.layout
+ tex = context.texture
+
+ split = layout.split()
+
+ sub = split.column()
+ sub.itemR(tex, "flip_axis")
+ sub.itemR(tex, "normal_map")
+ sub.itemL(text="Filter:")
+ sub.itemR(tex, "mipmap")
+ sub.itemR(tex, "mipmap_gauss")
+ sub.itemR(tex, "interpolation")
+ sub = split.column()
+ sub.itemL(text="Alpha:")
+ sub.itemR(tex, "use_alpha")
+ sub.itemR(tex, "calculate_alpha")
+ sub.itemR(tex, "invert_alpha")
+
+class TEXTURE_PT_mapping(TextureButtonsPanel):
+ __idname__= "TEXTURE_PT_mapping"
+ __label__ = "Mapping"
+
+ def poll(self, context):
+ tex = context.texture
+ return (tex and tex.type == 'IMAGE')
+
+ def draw(self, context):
+ layout = self.layout
+ tex = context.texture
+
+ split = layout.split()
+
+ sub = split.column()
+ #sub.itemR(tex, "crop_rectangle")
+ sub.itemL(text="Crop Minimum:")
+ sub.itemR(tex, "crop_min_x", text="X")
+ sub.itemR(tex, "crop_min_y", text="Y")
+ sub = split.column()
+ sub.itemL(text="Crop Maximum:")
+ sub.itemR(tex, "crop_max_x", text="X")
+ sub.itemR(tex, "crop_max_y", text="Y")
+
+ layout.itemR(tex, "extension")
+
+ split = layout.split()
+
+ sub = split.column()
+ if tex.extension == 'REPEAT':
+ sub.itemL(text="Repeat:")
+ sub.itemR(tex, "repeat_x", text="X")
+ sub.itemR(tex, "repeat_y", text="Y")
+ sub = split.column()
+ sub.itemL(text="Mirror:")
+ sub.itemR(tex, "mirror_x", text="X")
+ sub.itemR(tex, "mirror_y", text="Y")
+ elif tex.extension == 'CHECKER':
+ sub.itemR(tex, "checker_even", text="Even")
+ sub.itemR(tex, "checker_odd", text="Odd")
+ sub = split.column()
+ sub.itemR(tex, "checker_distance", text="Distance")
+
+class TEXTURE_PT_plugin(TextureButtonsPanel):
+ __idname__= "TEXTURE_PT_plugin"
+ __label__ = "Plugin"
+
+ def poll(self, context):
+ tex = context.texture
+ return (tex and tex.type == 'PLUGIN')
+
+ def draw(self, context):
+ layout = self.layout
+ tex = context.texture
+
+ layout.itemL(text="Nothing yet")
+
+class TEXTURE_PT_envmap(TextureButtonsPanel):
+ __idname__= "TEXTURE_PT_envmap"
+ __label__ = "Environment Map"
+
+ def poll(self, context):
+ tex = context.texture
+ return (tex and tex.type == 'ENVIRONMENT_MAP')
+
+ def draw(self, context):
+ layout = self.layout
+ tex = context.texture
+
+ layout.itemL(text="Nothing yet")
+
+class TEXTURE_PT_musgrave(TextureButtonsPanel):
+ __idname__= "TEXTURE_PT_musgrave"
+ __label__ = "Musgrave"
+
+ def poll(self, context):
+ tex = context.texture
+ return (tex and tex.type == 'MUSGRAVE')
+
+ def draw(self, context):
+ layout = self.layout
+ tex = context.texture
+
+ layout.itemR(tex, "musgrave_type")
+
+ split = layout.split()
+
+ sub = split.column()
+ sub.itemR(tex, "highest_dimension", text="Dimension")
+ sub.itemR(tex, "lacunarity")
+ sub.itemR(tex, "octaves")
+ sub = split.column()
+ if (tex.musgrave_type in ('HETERO_TERRAIN', 'RIDGED_MULTIFRACTAL', 'HYBRID_MULTIFRACTAL')):
+ sub.itemR(tex, "offset")
+ if (tex.musgrave_type in ('RIDGED_MULTIFRACTAL', 'HYBRID_MULTIFRACTAL')):
+ sub.itemR(tex, "gain")
+ sub.itemR(tex, "noise_intensity", text="Intensity")
+
+ layout.itemL(text="Noise:")
+
+ layout.itemR(tex, "noise_basis", text="Basis")
+
+ row = layout.row()
+ row.itemR(tex, "noise_size", text="Size")
+ row.itemR(tex, "nabla")
+
+class TEXTURE_PT_voronoi(TextureButtonsPanel):
+ __idname__= "TEXTURE_PT_voronoi"
+ __label__ = "Voronoi"
+
+ def poll(self, context):
+ tex = context.texture
+ return (tex and tex.type == 'VORONOI')
+
+ def draw(self, context):
+ layout = self.layout
+ tex = context.texture
+
+ layout.itemR(tex, "distance_metric")
+ layout.itemR(tex, "coloring")
+
+ split = layout.split()
+
+ sub = split.column()
+
+ sub.itemR(tex, "noise_intensity", text="Intensity")
+ if tex.distance_metric == 'MINKOVSKY':
+ sub.itemR(tex, "minkovsky_exponent", text="Exponent")
+ sub = split.column()
+ sub.itemR(tex, "feature_weights", slider=True)
+
+ layout.itemL(text="Noise:")
+
+ row = layout.row()
+ row.itemR(tex, "noise_size", text="Size")
+ row.itemR(tex, "nabla")
+
+class TEXTURE_PT_distortednoise(TextureButtonsPanel):
+ __idname__= "TEXTURE_PT_distortednoise"
+ __label__ = "Distorted Noise"
+
+ def poll(self, context):
+ tex = context.texture
+ return (tex and tex.type == 'DISTORTED_NOISE')
+
+ def draw(self, context):
+ layout = self.layout
+ tex = context.texture
+
+ layout.itemR(tex, "noise_distortion")
+ layout.itemR(tex, "noise_basis", text="Basis")
+
+ split = layout.split()
+
+ sub = split.column()
+ sub.itemR(tex, "distortion_amount", text="Amount")
+ sub.itemR(tex, "noise_size", text="Size")
+
+ sub = split.column()
+ sub.itemR(tex, "nabla")
+
+bpy.types.register(TEXTURE_PT_preview)
+bpy.types.register(TEXTURE_PT_texture)
+bpy.types.register(TEXTURE_PT_clouds)
+bpy.types.register(TEXTURE_PT_wood)
+bpy.types.register(TEXTURE_PT_marble)
+bpy.types.register(TEXTURE_PT_magic)
+bpy.types.register(TEXTURE_PT_blend)
+bpy.types.register(TEXTURE_PT_stucci)
+bpy.types.register(TEXTURE_PT_image)
+bpy.types.register(TEXTURE_PT_mapping)
+bpy.types.register(TEXTURE_PT_plugin)
+bpy.types.register(TEXTURE_PT_envmap)
+bpy.types.register(TEXTURE_PT_musgrave)
+bpy.types.register(TEXTURE_PT_voronoi)
+bpy.types.register(TEXTURE_PT_distortednoise)
+bpy.types.register(TEXTURE_PT_colors)
+bpy.types.register(TEXTURE_PT_map)
+
diff --git a/release/ui/buttons_world.py b/release/ui/buttons_world.py
new file mode 100644
index 00000000000..8298c0c9b13
--- /dev/null
+++ b/release/ui/buttons_world.py
@@ -0,0 +1,175 @@
+
+import bpy
+
+class WorldButtonsPanel(bpy.types.Panel):
+ __space_type__ = "BUTTONS_WINDOW"
+ __region_type__ = "WINDOW"
+ __context__ = "world"
+
+ def poll(self, context):
+ return (context.world != None)
+
+class WORLD_PT_preview(WorldButtonsPanel):
+ __label__ = "Preview"
+
+ def poll(self, context):
+ return (context.scene or context.world)
+
+ def draw(self, context):
+ layout = self.layout
+
+ world = context.world
+ layout.template_preview(world)
+
+class WORLD_PT_world(WorldButtonsPanel):
+ __label__ = "World"
+
+ def poll(self, context):
+ return (context.scene or context.world)
+
+ def draw(self, context):
+ scene = context.scene
+ world = context.world
+ space = context.space_data
+ layout = self.layout
+
+ split = layout.split(percentage=0.65)
+
+ if scene:
+ split.template_ID(context, scene, "world", new="WORLD_OT_new")
+ elif world:
+ split.template_ID(context, space, "pin_id")
+
+ split.itemS()
+
+ if world:
+ layout.itemS()
+
+ row = layout.row()
+ row.itemR(world, "blend_sky")
+ row.itemR(world, "paper_sky")
+ row.itemR(world, "real_sky")
+
+ row = layout.row()
+ row.column().itemR(world, "horizon_color")
+ col = row.column()
+ col.itemR(world, "zenith_color")
+ col.active = world.blend_sky
+ row.column().itemR(world, "ambient_color")
+
+class WORLD_PT_color_correction(WorldButtonsPanel):
+ __label__ = "Color Correction"
+
+ def draw(self, context):
+ world = context.world
+ layout = self.layout
+
+ row = layout.row()
+ row.itemR(world, "exposure")
+ row.itemR(world, "range")
+
+class WORLD_PT_mist(WorldButtonsPanel):
+ __label__ = "Mist"
+
+ def draw_header(self, context):
+ world = context.world
+
+ layout = self.layout
+ layout.itemR(world.mist, "enabled", text="")
+
+ def draw(self, context):
+ world = context.world
+ layout = self.layout
+ layout.active = world.mist.enabled
+
+ flow = layout.column_flow()
+ flow.itemR(world.mist, "start")
+ flow.itemR(world.mist, "depth")
+ flow.itemR(world.mist, "height")
+ flow.itemR(world.mist, "intensity")
+ col = layout.column()
+ col.itemL(text="Fallof:")
+ col.row().itemR(world.mist, "falloff", expand=True)
+
+class WORLD_PT_stars(WorldButtonsPanel):
+ __label__ = "Stars"
+
+ def draw_header(self, context):
+ world = context.world
+
+ layout = self.layout
+ layout.itemR(world.stars, "enabled", text="")
+
+ def draw(self, context):
+ world = context.world
+ layout = self.layout
+ layout.active = world.stars.enabled
+
+ flow = layout.column_flow()
+ flow.itemR(world.stars, "size")
+ flow.itemR(world.stars, "min_distance", text="Min. Dist")
+ flow.itemR(world.stars, "average_separation", text="Separation")
+ flow.itemR(world.stars, "color_randomization", text="Random")
+
+class WORLD_PT_ambient_occlusion(WorldButtonsPanel):
+ __label__ = "Ambient Occlusion"
+
+ def draw_header(self, context):
+ world = context.world
+
+ layout = self.layout
+ layout.itemR(world.ambient_occlusion, "enabled", text="")
+
+ def draw(self, context):
+ world = context.world
+ ao = world.ambient_occlusion
+ layout = self.layout
+ layout.active = ao.enabled
+
+ layout.itemR(ao, "gather_method", expand=True)
+
+ if ao.gather_method == 'RAYTRACE':
+ split = layout.split()
+ col = split.column()
+ col.itemR(ao, "samples")
+ col.itemR(ao, "distance")
+ col = split.column()
+ col.itemR(ao, "falloff")
+ colsub = col.column()
+ colsub.active = ao.falloff
+ colsub.itemR(ao, "strength")
+
+ layout.itemR(ao, "sample_method")
+ if ao.sample_method == 'ADAPTIVE_QMC':
+ row = layout.row()
+ row.itemR(ao, "threshold")
+ row.itemR(ao, "adapt_to_speed")
+
+ if ao.sample_method == 'CONSTANT_JITTERED':
+ row = layout.row()
+ row.itemR(ao, "bias")
+
+ if ao.gather_method == 'APPROXIMATE':
+ split = layout.split()
+ col = split.column()
+ col.itemR(ao, "passes")
+ col.itemR(ao, "error_tolerance", text="Error")
+ col.itemR(ao, "correction")
+ col = split.column()
+ col.itemR(ao, "falloff")
+ colsub = col.column()
+ colsub.active = ao.falloff
+ colsub.itemR(ao, "strength")
+ col.itemR(ao, "pixel_cache")
+
+ col = layout.column()
+ col.row().itemR(ao, "blend_mode", expand=True)
+ col.row().itemR(ao, "color", expand=True)
+ col.itemR(ao, "energy")
+
+bpy.types.register(WORLD_PT_preview)
+bpy.types.register(WORLD_PT_world)
+bpy.types.register(WORLD_PT_ambient_occlusion)
+bpy.types.register(WORLD_PT_mist)
+bpy.types.register(WORLD_PT_stars)
+bpy.types.register(WORLD_PT_color_correction)
diff --git a/release/ui/space_outliner.py b/release/ui/space_outliner.py
new file mode 100644
index 00000000000..f039eb3f7c3
--- /dev/null
+++ b/release/ui/space_outliner.py
@@ -0,0 +1,52 @@
+
+import bpy
+
+class OUTLINER_HT_header(bpy.types.Header):
+ __space_type__ = "OUTLINER"
+ __idname__ = "OUTLINER_HT_header"
+
+ def draw(self, context):
+ so = context.space_data
+ sce = context.scene
+ layout = self.layout
+
+ layout.template_header(context)
+
+ if context.area.show_menus:
+ row = layout.row(align=True)
+ row.itemM(context, "OUTLINER_MT_view")
+
+ row = layout.row()
+ row.itemR(so, "display_mode", text="")
+
+ if so.display_mode == 'DATABLOCKS':
+ row = layout.row(align=True)
+ row.itemO("ANIM_OT_keyingset_add_new", text="", icon=31)
+ # row.itemR(sce, "active_keyingset", text="KS: ")
+ # ks = sce.keyingsets[sce.active_keyingset - 1]
+ # row.itemR(ks, "name", text="")
+ ## row.itemR(sce, "keyingsets")
+
+ row = layout.row()
+ row.itemO("OUTLINER_OT_keyingset_add_selected", text="", icon=31)
+ row.itemO("OUTLINER_OT_keyingset_remove_selected", text="", icon=32)
+
+ row.itemO("ANIM_OT_insert_keyframe", text="", icon=514)
+ row.itemO("ANIM_OT_delete_keyframe", text="", icon=513)
+
+
+class OUTLINER_MT_view(bpy.types.Menu):
+ __space_type__ = "OUTLINER"
+ __label__ = "View"
+
+ def draw(self, context):
+ layout = self.layout
+ so = context.space_data
+
+ col = layout.column()
+ col.itemR(so, "show_restriction_columns")
+ #layout.itemO("TEXT_OT_new")
+
+bpy.types.register(OUTLINER_HT_header)
+bpy.types.register(OUTLINER_MT_view)
+
diff --git a/release/ui/space_sequencer.py b/release/ui/space_sequencer.py
new file mode 100644
index 00000000000..71a185dbe18
--- /dev/null
+++ b/release/ui/space_sequencer.py
@@ -0,0 +1,467 @@
+
+import bpy
+
+def act_strip(context):
+ try: return context.scene.sequence_editor.active_strip
+ except: return None
+
+# Header
+class SEQUENCER_HT_header(bpy.types.Header):
+ __space_type__ = "SEQUENCE_EDITOR"
+ __idname__ = "SEQUENCE_HT_header"
+
+ def draw(self, context):
+
+ st = context.space_data
+ layout = self.layout
+
+ layout.template_header(context)
+
+ if context.area.show_menus:
+ row = layout.row(align=True)
+ row.itemM(context, "SEQUENCER_MT_view")
+ row.itemM(context, "SEQUENCER_MT_select")
+ row.itemM(context, "SEQUENCER_MT_marker")
+ row.itemM(context, "SEQUENCER_MT_add")
+ row.itemM(context, "SEQUENCER_MT_strip")
+
+class SEQUENCER_MT_view(bpy.types.Menu):
+ __space_type__ = "SEQUENCE_EDITOR"
+ __label__ = "View (TODO)"
+
+ def draw(self, context):
+ layout = self.layout
+ st = context.space_data
+
+ layout.column()
+
+ """
+ uiBlock *block= uiBeginBlock(C, ar, "seq_viewmenu", UI_EMBOSSP);
+ short yco= 0, menuwidth=120;
+
+ if (sseq->mainb == SEQ_DRAW_SEQUENCE) {
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
+ "Play Back Animation "
+ "in all Sequence Areas|Alt A", 0, yco-=20,
+ menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
+ }
+ else {
+ uiDefIconTextBut(block, BUTM, 1, ICON_MENU_PANEL,
+ "Grease Pencil...", 0, yco-=20,
+ menuwidth, 19, NULL, 0.0, 0.0, 1, 7, "");
+ uiDefMenuSep(block);
+
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
+ "Play Back Animation "
+ "in this window|Alt A", 0, yco-=20,
+ menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
+ }
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
+ "Play Back Animation in all "
+ "3D Views and Sequence Areas|Alt Shift A",
+ 0, yco-=20,
+ menuwidth, 19, NULL, 0.0, 0.0, 1, 2, "");
+
+ """
+ layout.itemS()
+ layout.itemO("SEQUENCER_OT_view_all")
+ layout.itemO("SEQUENCER_OT_view_selected")
+ layout.itemS()
+ """
+
+
+ /* Lock Time */
+ uiDefIconTextBut(block, BUTM, 1, (v2d->flag & V2D_VIEWSYNC_SCREEN_TIME)?ICON_CHECKBOX_HLT:ICON_CHECKBOX_DEHLT,
+ "Lock Time to Other Windows|", 0, yco-=20,
+ menuwidth, 19, NULL, 0.0, 0.0, 1, 5, "");
+
+ /* Draw time or frames.*/
+ uiDefMenuSep(block);
+
+ if(sseq->flag & SEQ_DRAWFRAMES)
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Show Seconds|Ctrl T", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 6, "");
+ else
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Show Frames|Ctrl T", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 6, "");
+
+
+ if(!sa->full) uiDefIconTextBut(block, BUTM, B_FULL, ICON_BLANK1, "Maximize Window|Ctrl UpArrow", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0,0, "");
+ else uiDefIconTextBut(block, BUTM, B_FULL, ICON_BLANK1, "Tile Window|Ctrl DownArrow", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 0, "");
+
+ """
+
+class SEQUENCER_MT_select(bpy.types.Menu):
+ __space_type__ = "SEQUENCE_EDITOR"
+ __label__ = "Select"
+
+ def draw(self, context):
+ layout = self.layout
+ st = context.space_data
+
+ layout.column()
+ layout.item_enumO("SEQUENCER_OT_select_active_side", "side", 'LEFT', text="Strips to the Left")
+ layout.item_enumO("SEQUENCER_OT_select_active_side", "side", 'RIGHT', text="Strips to the Right")
+ layout.itemS()
+ layout.item_enumO("SEQUENCER_OT_select_handles", "side", 'BOTH', text="Surrounding Handles")
+ layout.item_enumO("SEQUENCER_OT_select_handles", "side", 'LEFT', text="Left Handle")
+ layout.item_enumO("SEQUENCER_OT_select_handles", "side", 'RIGHT', text="Right Handle")
+ layout.itemS()
+ layout.itemO("SEQUENCER_OT_select_linked")
+ layout.itemO("SEQUENCER_OT_select_all_toggle")
+ layout.itemO("SEQUENCER_OT_select_invert")
+
+class SEQUENCER_MT_marker(bpy.types.Menu):
+ __space_type__ = "SEQUENCE_EDITOR"
+ __label__ = "Marker (TODO)"
+
+ def draw(self, context):
+ layout = self.layout
+ st = context.space_data
+
+ layout.column()
+ layout.itemO("SEQUENCER_OT_sound_strip_add", text="Add Marker|Ctrl Alt M")
+ layout.itemO("SEQUENCER_OT_sound_strip_add", text="Duplicate Marker|Ctrl Shift D")
+ layout.itemO("SEQUENCER_OT_sound_strip_add", text="Delete Marker|Shift X")
+ layout.itemS()
+ layout.itemO("SEQUENCER_OT_sound_strip_add", text="(Re)Name Marker|Ctrl M")
+ layout.itemO("SEQUENCER_OT_sound_strip_add", text="Grab/Move Marker|Ctrl G")
+ layout.itemS()
+ layout.itemO("SEQUENCER_OT_sound_strip_add", text="Transform Markers") # toggle, will be rna - (sseq->flag & SEQ_MARKER_TRANS)
+
+class SEQUENCER_MT_add(bpy.types.Menu):
+ __space_type__ = "SEQUENCE_EDITOR"
+ __label__ = "Add"
+
+ def draw(self, context):
+ layout = self.layout
+ st = context.space_data
+
+ layout.column()
+ layout.itemO("SEQUENCER_OT_movie_strip_add", text="Movie")
+ layout.item_booleanO("SEQUENCER_OT_movie_strip_add", "sound", True, text="Movie & Sound") # FFMPEG ONLY
+ layout.itemO("SEQUENCER_OT_image_strip_add", text="Image")
+ layout.itemO("SEQUENCER_OT_sound_strip_add", text="Sound (Ram)")
+ layout.item_booleanO("SEQUENCER_OT_sound_strip_add", "hd", True, text="Sound (Streaming)") # FFMPEG ONLY
+
+ layout.itemM(context, "SEQUENCER_MT_add_effect")
+
+
+class SEQUENCER_MT_add_effect(bpy.types.Menu):
+ __space_type__ = "SEQUENCE_EDITOR"
+ __label__ = "Effect Strip..."
+
+ def draw(self, context):
+ layout = self.layout
+ st = context.space_data
+
+ self.layout.column()
+ self.layout.item_enumO("SEQUENCER_OT_effect_strip_add", 'type', 'ADD')
+ self.layout.item_enumO("SEQUENCER_OT_effect_strip_add", 'type', 'SUBTRACT')
+ self.layout.item_enumO("SEQUENCER_OT_effect_strip_add", 'type', 'ALPHA_OVER')
+ self.layout.item_enumO("SEQUENCER_OT_effect_strip_add", 'type', 'ALPHA_UNDER')
+ self.layout.item_enumO("SEQUENCER_OT_effect_strip_add", 'type', 'GAMMA_CROSS')
+ self.layout.item_enumO("SEQUENCER_OT_effect_strip_add", 'type', 'MULTIPLY')
+ self.layout.item_enumO("SEQUENCER_OT_effect_strip_add", 'type', 'OVER_DROP')
+ self.layout.item_enumO("SEQUENCER_OT_effect_strip_add", 'type', 'PLUGIN')
+ self.layout.item_enumO("SEQUENCER_OT_effect_strip_add", 'type', 'WIPE')
+ self.layout.item_enumO("SEQUENCER_OT_effect_strip_add", 'type', 'GLOW')
+ self.layout.item_enumO("SEQUENCER_OT_effect_strip_add", 'type', 'TRANSFORM')
+ self.layout.item_enumO("SEQUENCER_OT_effect_strip_add", 'type', 'COLOR')
+ self.layout.item_enumO("SEQUENCER_OT_effect_strip_add", 'type', 'SPEED')
+
+class SEQUENCER_MT_strip(bpy.types.Menu):
+ __space_type__ = "SEQUENCE_EDITOR"
+ __label__ = "Strip"
+
+ def draw(self, context):
+ layout = self.layout
+ st = context.space_data
+
+ # uiLayoutSetOperatorContext(layout, WM_OP_INVOKE_REGION_WIN);
+
+ layout.column()
+ layout.item_enumO("TFM_OT_transform", "mode", 'TRANSLATION', text="Grab/Move")
+ layout.item_enumO("TFM_OT_transform", "mode", 'TIME_EXTEND', text="Grab/Extend from frame")
+ # uiItemO(layout, NULL, 0, "SEQUENCER_OT_strip_snap"); // TODO - add this operator
+ layout.itemS()
+
+ layout.item_enumO("SEQUENCER_OT_cut", "type", 'HARD', text="Cut (hard) at frame")
+ layout.item_enumO("SEQUENCER_OT_cut", "type", 'SOFT', text="Cut (soft) at frame")
+ layout.itemO("SEQUENCER_OT_images_separate")
+ layout.itemS()
+
+ layout.itemO("SEQUENCER_OT_duplicate_add")
+ layout.itemO("SEQUENCER_OT_delete")
+
+ strip = act_strip(context)
+
+ if strip:
+ stype = strip.type
+
+ if stype=='EFFECT':
+ layout.itemS()
+ layout.itemO("SEQUENCER_OT_effect_change")
+ layout.itemO("SEQUENCER_OT_effect_reassign_inputs")
+ elif stype=='IMAGE':
+ layout.itemS()
+ layout.itemO("SEQUENCER_OT_image_change")
+ elif stype=='SCENE':
+ layout.itemS()
+ layout.itemO("SEQUENCER_OT_scene_change", text="Change Scene")
+ elif stype=='MOVIE':
+ layout.itemS()
+ layout.itemO("SEQUENCER_OT_movie_change")
+
+ layout.itemS()
+
+ layout.itemO("SEQUENCER_OT_meta_make")
+ layout.itemO("SEQUENCER_OT_meta_separate")
+
+ #if (ed && (ed->metastack.first || (ed->act_seq && ed->act_seq->type == SEQ_META))) {
+ # uiItemS(layout);
+ # uiItemO(layout, NULL, 0, "SEQUENCER_OT_meta_toggle");
+ #}
+
+ layout.itemS()
+ layout.itemO("SEQUENCER_OT_reload")
+ layout.itemS()
+ layout.itemO("SEQUENCER_OT_lock")
+ layout.itemO("SEQUENCER_OT_unlock")
+ layout.itemO("SEQUENCER_OT_mute")
+ layout.itemO("SEQUENCER_OT_unmute")
+
+ layout.item_enumO("SEQUENCER_OT_mute", "type", 'UNSELECTED', text="Mute Deselected Strips")
+
+
+
+# Panels
+class SequencerButtonsPanel(bpy.types.Panel):
+ __space_type__ = "SEQUENCE_EDITOR"
+ __region_type__ = "UI"
+
+ def poll(self, context):
+ return act_strip(context) != None
+
+class SEQUENCER_PT_edit(SequencerButtonsPanel):
+ __label__ = "Edit Strip"
+ __idname__ = "SEQUENCER_PT_edit"
+
+ def draw(self, context):
+ layout = self.layout
+
+ strip = act_strip(context)
+
+ layout.itemR(strip, "name")
+
+ layout.itemR(strip, "blend_mode")
+
+ layout.itemR(strip, "blend_opacity")
+
+ row = layout.row()
+ row.itemR(strip, "mute")
+ row.itemR(strip, "lock")
+ row.itemR(strip, "frame_locked")
+
+ row = layout.row()
+ row.itemR(strip, "channel")
+ row.itemR(strip, "start_frame")
+
+ row = layout.row()
+ row.itemR(strip, "length")
+ row.itemR(strip, "type")
+
+class SEQUENCER_PT_effect(SequencerButtonsPanel):
+ __label__ = "Effect Strip"
+ __idname__ = "SEQUENCER_PT_effect"
+
+ def poll(self, context):
+ strip = act_strip(context)
+ if not strip:
+ return False
+
+ return strip.type in ('COLOR', 'WIPE', 'GLOW', 'SPEED', 'TRANSFORM')
+
+ def draw(self, context):
+ layout = self.layout
+
+ strip = act_strip(context)
+
+ if strip.type == 'COLOR':
+ layout.itemR(strip, "color")
+
+ elif strip.type == 'WIPE':
+ row = layout.row()
+ row.itemL(text="Transition Type:")
+ row.itemL(text="Direction:")
+
+ row = layout.row()
+ row.itemR(strip, "transition_type", text="")
+ row.itemR(strip, "direction", text="")
+
+ row = layout.row()
+ row.itemR(strip, "blur_width")
+ if strip.transition_type in ('SINGLE', 'DOUBLE'):
+ row.itemR(strip, "angle")
+
+ elif strip.type == 'GLOW':
+ flow = layout.column_flow()
+ flow.itemR(strip, "threshold")
+ flow.itemR(strip, "clamp")
+ flow.itemR(strip, "boost_factor")
+ flow.itemR(strip, "blur_distance")
+
+ row = layout.row()
+ row.itemR(strip, "quality", slider=True)
+ row.itemR(strip, "only_boost")
+
+ elif strip.type == 'SPEED':
+ layout.itemR(strip, "global_speed")
+
+ flow = layout.column_flow()
+ flow.itemR(strip, "curve_velocity")
+ flow.itemR(strip, "curve_compress_y")
+ flow.itemR(strip, "frame_blending")
+
+ elif strip.type == 'TRANSFORM':
+ row = layout.row()
+ row.itemL(text="Interpolation:")
+ row.itemL(text="Translation Unit:")
+
+ row = layout.row()
+ row.itemR(strip, "interpolation", text="")
+ row.itemR(strip, "translation_unit", text="")
+
+ split = layout.split()
+
+ col = split.column()
+ sub = col.column(align=True)
+ sub.itemL(text="Position X:")
+ sub.itemR(strip, "translate_start_x", text="Start")
+ sub.itemR(strip, "translate_end_x", text="End")
+
+ sub = col.column(align=True)
+ sub.itemL(text="Scale X:")
+ sub.itemR(strip, "scale_start_x", text="Start")
+ sub.itemR(strip, "scale_end_x", text="End")
+
+ sub = col.column(align=True)
+ sub.itemL(text="Rotation:")
+ sub.itemR(strip, "rotation_start", text="Start")
+ sub.itemR(strip, "rotation_end", text="End")
+
+ col = split.column()
+ sub = col.column(align=True)
+ sub.itemL(text="Position Y:")
+ sub.itemR(strip, "translate_start_y", text="Start")
+ sub.itemR(strip, "translate_end_y", text="End")
+
+ sub = col.column(align=True)
+ sub.itemL(text="Scale Y:")
+ sub.itemR(strip, "scale_start_y", text="Start")
+ sub.itemR(strip, "scale_end_y", text="End")
+
+class SEQUENCER_PT_input(SequencerButtonsPanel):
+ __label__ = "Strip Input"
+ __idname__ = "SEQUENCER_PT_input"
+
+ def poll(self, context):
+ strip = act_strip(context)
+ if not strip:
+ return False
+
+ return strip.type in ('MOVIE', 'IMAGE', 'SCENE', 'META')
+
+ def draw(self, context):
+ layout = self.layout
+
+ strip = act_strip(context)
+
+ layout.itemR(strip, "directory")
+
+ # TODO - get current element!
+ layout.itemR(strip.elements[0], "filename")
+
+ """
+ layout.itemR(strip, "use_crop")
+
+ flow = layout.column_flow()
+ flow.active = strip.use_crop
+ flow.itemR(strip, "top")
+ flow.itemR(strip, "left")
+ flow.itemR(strip, "bottom")
+ flow.itemR(strip, "right")
+ """
+
+class SEQUENCER_PT_filter(SequencerButtonsPanel):
+ __label__ = "Filter"
+ __idname__ = "SEQUENCER_PT_filter"
+
+ def poll(self, context):
+ strip = act_strip(context)
+ if not strip:
+ return False
+
+ return strip.type in ('MOVIE', 'IMAGE', 'SCENE', 'META')
+
+ def draw(self, context):
+ layout = self.layout
+
+ strip = act_strip(context)
+
+ row = layout.row()
+ row.itemR(strip, "premultiply")
+ row.itemR(strip, "convert_float")
+ row.itemR(strip, "de_interlace")
+
+ row = layout.row()
+ row.itemR(strip, "flip_x")
+ row.itemR(strip, "flip_y")
+ row.itemR(strip, "reverse_frames")
+
+ row = layout.row()
+ row.itemR(strip, "multiply_colors")
+ row.itemR(strip, "strobe")
+
+ layout.itemR(strip, "use_color_balance")
+
+class SEQUENCER_PT_proxy(SequencerButtonsPanel):
+ __label__ = "Proxy"
+ __idname__ = "SEQUENCER_PT_proxy"
+
+ def poll(self, context):
+ strip = act_strip(context)
+ if not strip:
+ return False
+
+ return strip.type in ('MOVIE', 'IMAGE', 'SCENE', 'META')
+
+ def draw_header(self, context):
+ strip = act_strip(context)
+
+ layout = self.layout
+
+ layout.itemR(strip, "use_proxy", text="")
+
+ def draw(self, context):
+ strip = act_strip(context)
+
+ layout = self.layout
+
+ row = layout.row()
+ row.itemR(strip, "proxy_custom_directory")
+ # row.itemR(strip.proxy, "dir") # TODO
+
+
+bpy.types.register(SEQUENCER_HT_header)
+bpy.types.register(SEQUENCER_MT_view)
+bpy.types.register(SEQUENCER_MT_select)
+bpy.types.register(SEQUENCER_MT_marker)
+bpy.types.register(SEQUENCER_MT_add)
+bpy.types.register(SEQUENCER_MT_add_effect)
+bpy.types.register(SEQUENCER_MT_strip)
+
+bpy.types.register(SEQUENCER_PT_edit)
+bpy.types.register(SEQUENCER_PT_effect)
+bpy.types.register(SEQUENCER_PT_input)
+bpy.types.register(SEQUENCER_PT_filter)
+bpy.types.register(SEQUENCER_PT_proxy)
+
diff --git a/release/ui/space_text.py b/release/ui/space_text.py
new file mode 100644
index 00000000000..5c6c5c0d21b
--- /dev/null
+++ b/release/ui/space_text.py
@@ -0,0 +1,146 @@
+
+import bpy
+
+# temporary
+ICON_LINENUMBERS_OFF = 588
+ICON_WORDWRAP_OFF = 584
+ICON_SYNTAX_OFF = 586
+ICON_TEXT = 120
+ICON_HELP = 1
+ICON_SCRIPTPLUGINS = 1
+
+class TEXT_HT_header(bpy.types.Header):
+ __space_type__ = "TEXT_EDITOR"
+ __idname__ = "TEXT_HT_header"
+
+ def draw(self, context):
+ st = context.space_data
+ text = st.text
+ layout = self.layout
+
+ layout.template_header(context)
+
+ if context.area.show_menus:
+ row = layout.row(align=True)
+ row.itemM(context, "TEXT_MT_text")
+ if text:
+ row.itemM(context, "TEXT_MT_edit")
+ row.itemM(context, "TEXT_MT_format")
+
+ if text and text.modified:
+ row = layout.row()
+ # row.color(redalert)
+ row.itemO("TEXT_OT_resolve_conflict", text="", icon=ICON_HELP)
+
+ row = layout.row(align=True)
+ row.itemR(st, "line_numbers", text="", icon=ICON_LINENUMBERS_OFF)
+ row.itemR(st, "word_wrap", text="", icon=ICON_WORDWRAP_OFF)
+ row.itemR(st, "syntax_highlight", text="", icon=ICON_SYNTAX_OFF)
+ # row.itemR(st, "do_python_plugins", text="", icon=ICON_SCRIPTPLUGINS)
+
+ layout.template_ID(context, st, "text", new="TEXT_OT_new", open="TEXT_OT_open", unlink="TEXT_OT_unlink")
+
+ if text:
+ row = layout.row()
+ if text.filename != "":
+ if text.dirty:
+ row.itemL(text="File: *" + text.filename + " (unsaved)")
+ else:
+ row.itemL(text="File: " + text.filename)
+ else:
+ if text.library:
+ row.itemL(text="Text: External")
+ else:
+ row.itemL(text="Text: Internal")
+
+class TEXT_PT_properties(bpy.types.Panel):
+ __space_type__ = "TEXT_EDITOR"
+ __region_type__ = "UI"
+ __label__ = "Properties"
+
+ def draw(self, context):
+ st = context.space_data
+ layout = self.layout
+
+ flow = layout.column_flow()
+ flow.itemR(st, "line_numbers", icon=ICON_LINENUMBERS_OFF)
+ flow.itemR(st, "word_wrap", icon=ICON_WORDWRAP_OFF)
+ flow.itemR(st, "syntax_highlight", icon=ICON_SYNTAX_OFF)
+
+ flow = layout.column_flow()
+ flow.itemR(st, "font_size")
+ flow.itemR(st, "tab_width")
+
+class TEXT_PT_find(bpy.types.Panel):
+ __space_type__ = "TEXT_EDITOR"
+ __region_type__ = "UI"
+ __label__ = "Find"
+
+ def draw(self, context):
+ st = context.space_data
+ layout = self.layout
+
+ # find
+ col = layout.column(align=True)
+ row = col.row()
+ row.itemR(st, "find_text", text="")
+ row.itemO("TEXT_OT_find_set_selected", text="", icon=ICON_TEXT)
+ col.itemO("TEXT_OT_find")
+
+ # replace
+ col = layout.column(align=True)
+ row = col.row()
+ row.itemR(st, "replace_text", text="")
+ row.itemO("TEXT_OT_replace_set_selected", text="", icon=ICON_TEXT)
+ col.itemO("TEXT_OT_replace")
+
+ # mark
+ layout.itemO("TEXT_OT_mark_all")
+
+ # settings
+ row = layout.row()
+ row.itemR(st, "find_wrap", text="Wrap")
+ row.itemR(st, "find_all", text="All")
+
+class TEXT_MT_text(bpy.types.Menu):
+ __space_type__ = "TEXT_EDITOR"
+ __label__ = "Text"
+
+ def draw(self, context):
+ layout = self.layout
+ st = context.space_data
+ text = st.text
+
+ layout.column()
+ layout.itemO("TEXT_OT_new")
+ layout.itemO("TEXT_OT_open")
+
+ if text:
+ layout.itemO("TEXT_OT_reload")
+
+ layout.column()
+ layout.itemO("TEXT_OT_save")
+ layout.itemO("TEXT_OT_save_as")
+
+ if text.filename != "":
+ layout.itemO("TEXT_OT_make_internal")
+
+ layout.column()
+ layout.itemO("TEXT_OT_run_script")
+
+ #ifndef DISABLE_PYTHON
+ # XXX if(BPY_is_pyconstraint(text))
+ # XXX uiMenuItemO(head, 0, "TEXT_OT_refresh_pyconstraints");
+ #endif
+
+ #ifndef DISABLE_PYTHON
+ # XXX layout.column()
+ # XXX uiDefIconTextBlockBut(block, text_template_scriptsmenu, NULL, ICON_RIGHTARROW_THIN, "Script Templates", 0, yco-=20, 120, 19, "");
+ # XXX uiDefIconTextBlockBut(block, text_plugin_scriptsmenu, NULL, ICON_RIGHTARROW_THIN, "Text Plugins", 0, yco-=20, 120, 19, "");
+ #endif
+
+bpy.types.register(TEXT_HT_header)
+bpy.types.register(TEXT_PT_properties)
+bpy.types.register(TEXT_PT_find)
+bpy.types.register(TEXT_MT_text)
+