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:
authorCampbell Barton <ideasman42@gmail.com>2009-09-28 07:19:52 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-09-28 07:19:52 +0400
commit2d797f35d804fd86ef079b30f2c83a81a8e38cd5 (patch)
treef3354beea96c83a39c5d89d291d4429c8a69ec22 /release/ui
parent0cbc87b42816711469cb63825ee826a837cc364a (diff)
- removed 2.4x release/scripts
- moved release/io and release/ui into release/scripts/io, ui - updated scons, cmake, make When porting 2.4x scripts back, use a command like this so as not to loose the commit history... svn cp https://svn.blender.org/svnroot/bf-blender/branches/blender2.4/release/scripts/raw_import.py release/scripts/io/import_raw.py
Diffstat (limited to 'release/ui')
-rw-r--r--release/ui/bpy_ops.py141
-rw-r--r--release/ui/buttons_data_armature.py186
-rw-r--r--release/ui/buttons_data_bone.py353
-rw-r--r--release/ui/buttons_data_camera.py98
-rw-r--r--release/ui/buttons_data_curve.py227
-rw-r--r--release/ui/buttons_data_empty.py23
-rw-r--r--release/ui/buttons_data_lamp.py310
-rw-r--r--release/ui/buttons_data_lattice.py56
-rw-r--r--release/ui/buttons_data_mesh.py203
-rw-r--r--release/ui/buttons_data_metaball.py106
-rw-r--r--release/ui/buttons_data_modifier.py449
-rw-r--r--release/ui/buttons_data_text.py179
-rw-r--r--release/ui/buttons_game.py416
-rw-r--r--release/ui/buttons_material.py708
-rw-r--r--release/ui/buttons_object.py185
-rw-r--r--release/ui/buttons_object_constraint.py561
-rw-r--r--release/ui/buttons_particle.py961
-rw-r--r--release/ui/buttons_physics_cloth.py172
-rw-r--r--release/ui/buttons_physics_field.py226
-rw-r--r--release/ui/buttons_physics_fluid.py257
-rw-r--r--release/ui/buttons_physics_smoke.py179
-rw-r--r--release/ui/buttons_physics_softbody.py231
-rw-r--r--release/ui/buttons_scene.py465
-rw-r--r--release/ui/buttons_texture.py758
-rw-r--r--release/ui/buttons_world.py181
-rw-r--r--release/ui/space_buttons.py36
-rw-r--r--release/ui/space_console.py451
-rw-r--r--release/ui/space_filebrowser.py42
-rw-r--r--release/ui/space_image.py503
-rw-r--r--release/ui/space_info.py292
-rw-r--r--release/ui/space_logic.py29
-rw-r--r--release/ui/space_node.py118
-rw-r--r--release/ui/space_outliner.py52
-rw-r--r--release/ui/space_sequencer.py600
-rw-r--r--release/ui/space_text.py245
-rw-r--r--release/ui/space_time.py151
-rw-r--r--release/ui/space_userpref.py405
-rw-r--r--release/ui/space_view3d.py1362
-rw-r--r--release/ui/space_view3d_toolbar.py746
39 files changed, 0 insertions, 12663 deletions
diff --git a/release/ui/bpy_ops.py b/release/ui/bpy_ops.py
deleted file mode 100644
index 83c2e82bf6c..00000000000
--- a/release/ui/bpy_ops.py
+++ /dev/null
@@ -1,141 +0,0 @@
-# for slightly faster access
-from bpy.__ops__ import add as op_add
-from bpy.__ops__ import remove as op_remove
-from bpy.__ops__ import dir as op_dir
-from bpy.__ops__ import call as op_call
-from bpy.__ops__ import as_string as op_as_string
-from bpy.__ops__ import get_rna as op_get_rna
-
-# Keep in sync with WM_types.h
-context_dict = {
- 'INVOKE_DEFAULT':0,
- 'INVOKE_REGION_WIN':1,
- 'INVOKE_AREA':2,
- 'INVOKE_SCREEN':3,
- 'EXEC_DEFAULT':4,
- 'EXEC_REGION_WIN':5,
- 'EXEC_AREA':6,
- 'EXEC_SCREEN':7,
-}
-
-class bpy_ops(object):
- '''
- Fake module like class.
-
- bpy.ops
- '''
- def add(self, pyop):
- op_add(pyop)
-
- def remove(self, pyop):
- op_remove(pyop)
-
- def __getattr__(self, module):
- '''
- gets a bpy.ops submodule
- '''
- return bpy_ops_submodule(module)
-
- def __dir__(self):
-
- submodules = set()
-
- # add this classes functions
- for id_name in dir(self.__class__):
- if not id_name.startswith('__'):
- submodules.add(id_name)
-
- for id_name in op_dir():
- id_split = id_name.split('_OT_', 1)
-
- if len(id_split) == 2:
- submodules.add(id_split[0].lower())
- else:
- submodules.add(id_split[0])
-
- return list(submodules)
-
- def __repr__(self):
- return "<module like class 'bpy.ops'>"
-
-
-class bpy_ops_submodule(object):
- '''
- Utility class to fake submodules.
-
- eg. bpy.ops.object
- '''
- __keys__ = ('module',)
-
- def __init__(self, module):
- self.module = module
-
- def __getattr__(self, func):
- '''
- gets a bpy.ops.submodule function
- '''
- return bpy_ops_submodule_op(self.module, func)
-
- def __dir__(self):
-
- functions = set()
-
- module_upper = self.module.upper()
-
- for id_name in op_dir():
- id_split = id_name.split('_OT_', 1)
- if len(id_split) == 2 and module_upper == id_split[0]:
- functions.add(id_split[1])
-
- return list(functions)
-
- def __repr__(self):
- return "<module like class 'bpy.ops.%s'>" % self.module
-
-class bpy_ops_submodule_op(object):
- '''
- Utility class to fake submodule operators.
-
- eg. bpy.ops.object.somefunc
- '''
- __keys__ = ('module', 'func')
- def __init__(self, module, func):
- self.module = module
- self.func = func
-
- def idname(self):
- # submod.foo -> SUBMOD_OT_foo
- return self.module.upper() + '_OT_' + self.func
-
- def __call__(self, *args, **kw):
-
- # Get the operator from blender
- if len(args) > 1:
- raise ValueError("only one argument for the execution context is supported ")
-
- if args:
- try:
- context = context_dict[args[0]]
- except:
- raise ValueError("Expected a single context argument in: " + str(list(context_dict.keys())))
-
- return op_call(self.idname(), kw, context)
-
- else:
- return op_call(self.idname(), kw)
-
- def get_rna(self):
- '''
- currently only used for '__rna__'
- '''
- return op_get_rna(self.idname())
-
-
- def __repr__(self): # useful display, repr(op)
- return op_as_string(self.idname())
-
- def __str__(self): # used for print(...)
- return "<function bpy.ops.%s.%s at 0x%x'>" % (self.module, self.func, id(self))
-
-import bpy
-bpy.ops = bpy_ops()
diff --git a/release/ui/buttons_data_armature.py b/release/ui/buttons_data_armature.py
deleted file mode 100644
index 9344294ff9e..00000000000
--- a/release/ui/buttons_data_armature.py
+++ /dev/null
@@ -1,186 +0,0 @@
-
-import bpy
-
-class DataButtonsPanel(bpy.types.Panel):
- __space_type__ = 'PROPERTIES'
- __region_type__ = 'WINDOW'
- __context__ = "data"
-
- def poll(self, context):
- return context.armature
-
-class DATA_PT_context_arm(DataButtonsPanel):
- __show_header__ = False
-
- def draw(self, context):
- layout = self.layout
-
- ob = context.object
- arm = context.armature
- space = context.space_data
-
- split = layout.split(percentage=0.65)
-
- if ob:
- split.template_ID(ob, "data")
- split.itemS()
- elif arm:
- split.template_ID(space, "pin_id")
- split.itemS()
-
-class DATA_PT_skeleton(DataButtonsPanel):
- __label__ = "Skeleton"
-
- def draw(self, context):
- layout = self.layout
-
- ob = context.object
- arm = context.armature
- space = context.space_data
-
- layout.itemR(arm, "pose_position", expand=True)
-
- split = layout.split()
-
- col = split.column()
- col.itemL(text="Layers:")
- col.itemR(arm, "layer", text="")
- col.itemL(text="Protected Layers:")
- col.itemR(arm, "layer_protection", text="")
- col.itemL(text="Edit Options:")
- col.itemR(arm, "x_axis_mirror")
- col.itemR(arm, "auto_ik")
-
- col = split.column()
- col.itemL(text="Deform:")
- col.itemR(arm, "deform_vertexgroups", text="Vertex Groups")
- col.itemR(arm, "deform_envelope", text="Envelopes")
- col.itemR(arm, "deform_quaternion", text="Quaternion")
- col.itemR(arm, "deform_bbone_rest", text="B-Bones Rest")
-
-class DATA_PT_display(DataButtonsPanel):
- __label__ = "Display"
-
- def draw(self, context):
- layout = self.layout
-
- arm = context.armature
-
- layout.row().itemR(arm, "drawtype", expand=True)
-
- flow = layout.column_flow()
- flow.itemR(arm, "draw_names", text="Names")
- flow.itemR(arm, "draw_axes", text="Axes")
- flow.itemR(arm, "draw_custom_bone_shapes", text="Shapes")
- flow.itemR(arm, "draw_group_colors", text="Colors")
- flow.itemR(arm, "delay_deform", text="Delay Refresh")
-
-class DATA_PT_bone_groups(DataButtonsPanel):
- __label__ = "Bone Groups"
-
- def poll(self, context):
- return (context.object and context.object.type=='ARMATURE' and context.object.pose)
-
- def draw(self, context):
- layout = self.layout
-
- ob = context.object
- pose = ob.pose
-
- row = layout.row()
- row.template_list(pose, "bone_groups", pose, "active_bone_group_index")
-
- col = row.column(align=True)
- col.active = (ob.proxy == None)
- col.itemO("pose.group_add", icon='ICON_ZOOMIN', text="")
- col.itemO("pose.group_remove", icon='ICON_ZOOMOUT', text="")
-
- group = pose.active_bone_group
- if group:
- col = layout.column()
- col.active= (ob.proxy == None)
- col.itemR(group, "name")
-
- split = layout.split(0.5)
- split.active= (ob.proxy == None)
- split.itemR(group, "color_set")
- if group.color_set:
- split.template_triColorSet(group, "colors")
-
- row = layout.row(align=True)
- row.active = (ob.proxy == None)
-
- row.itemO("pose.group_assign", text="Assign")
- row.itemO("pose.group_remove", text="Remove") #row.itemO("pose.bone_group_remove_from", text="Remove")
- #row.itemO("object.bone_group_select", text="Select")
- #row.itemO("object.bone_group_deselect", text="Deselect")
-
-class DATA_PT_paths(DataButtonsPanel):
- __label__ = "Paths"
-
- def draw(self, context):
- layout = self.layout
-
- arm = context.armature
-
- layout.itemR(arm, "paths_type", expand=True)
-
- split = layout.split()
-
- col = split.column()
- sub = col.column(align=True)
- if (arm.paths_type == 'CURRENT_FRAME'):
- sub.itemR(arm, "path_before_current", text="Before")
- sub.itemR(arm, "path_after_current", text="After")
- elif (arm.paths_type == 'RANGE'):
- sub.itemR(arm, "path_start_frame", text="Start")
- sub.itemR(arm, "path_end_frame", text="End")
-
- sub.itemR(arm, "path_size", text="Step")
- col.row().itemR(arm, "paths_location", expand=True)
-
- col = split.column()
- col.itemL(text="Display:")
- col.itemR(arm, "paths_show_frame_numbers", text="Frame Numbers")
- col.itemR(arm, "paths_highlight_keyframes", text="Keyframes")
- col.itemR(arm, "paths_show_keyframe_numbers", text="Keyframe Numbers")
-
- layout.itemS()
-
- row = layout.row()
- row.itemO("pose.paths_calculate", text="Calculate Paths")
- row.itemO("pose.paths_clear", text="Clear Paths")
-
-class DATA_PT_ghost(DataButtonsPanel):
- __label__ = "Ghost"
-
- def draw(self, context):
- layout = self.layout
-
- arm = context.armature
-
- layout.itemR(arm, "ghost_type", expand=True)
-
- split = layout.split()
-
- col = split.column()
-
- sub = col.column(align=True)
- 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")
-
- col = split.column()
- col.itemL(text="Display:")
- col.itemR(arm, "ghost_only_selected", text="Selected Only")
-
-bpy.types.register(DATA_PT_context_arm)
-bpy.types.register(DATA_PT_skeleton)
-bpy.types.register(DATA_PT_display)
-bpy.types.register(DATA_PT_bone_groups)
-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
deleted file mode 100644
index 50ece679e27..00000000000
--- a/release/ui/buttons_data_bone.py
+++ /dev/null
@@ -1,353 +0,0 @@
-
-import bpy
-
-class BoneButtonsPanel(bpy.types.Panel):
- __space_type__ = 'PROPERTIES'
- __region_type__ = 'WINDOW'
- __context__ = "bone"
-
- def poll(self, context):
- return (context.bone or context.edit_bone)
-
-class BONE_PT_context_bone(BoneButtonsPanel):
- __show_header__ = False
-
- def draw(self, context):
- layout = self.layout
-
- bone = context.bone
- if not bone:
- bone = context.edit_bone
-
- row = layout.row()
- row.itemL(text="", icon='ICON_BONE_DATA')
- row.itemR(bone, "name", text="")
-
-class BONE_PT_transform(BoneButtonsPanel):
- __label__ = "Transform"
-
- def draw(self, context):
- layout = self.layout
-
- ob = context.object
- bone = context.bone
- if not bone:
- bone = context.edit_bone
-
- row = layout.row()
- row.column().itemR(bone, "head")
- row.column().itemR(bone, "tail")
-
- col = row.column()
- sub = col.column(align=True)
- sub.itemL(text="Roll:")
- sub.itemR(bone, "roll", text="")
- sub.itemL()
- sub.itemR(bone, "locked")
-
- else:
- pchan = ob.pose.pose_channels[context.bone.name]
-
- layout.itemR(pchan, "rotation_mode")
-
- row = layout.row()
- col = row.column()
- col.itemR(pchan, "location")
- col.active = not (bone.parent and bone.connected)
-
- col = row.column()
- if pchan.rotation_mode == 'QUATERNION':
- col.itemR(pchan, "rotation", text="Rotation")
- elif pchan.rotation_mode == 'AXIS_ANGLE':
- col.itemL(text="Rotation")
- col.itemR(pchan, "rotation_angle", text="Angle")
- col.itemR(pchan, "rotation_axis", text="Axis")
- else:
- col.itemR(pchan, "euler_rotation", text="Rotation")
-
- row.column().itemR(pchan, "scale")
-
- if pchan.rotation_mode == 'QUATERNION':
- col = layout.column(align=True)
- col.itemL(text="Euler:")
- col.row().itemR(pchan, "euler_rotation", text="")
-
-class BONE_PT_transform_locks(BoneButtonsPanel):
- __label__ = "Transform Locks"
- __default_closed__ = True
-
- def poll(self, context):
- return context.bone
-
- def draw(self, context):
- layout = self.layout
-
- ob = context.object
- bone = context.bone
- pchan = ob.pose.pose_channels[context.bone.name]
-
- row = layout.row()
- col = row.column()
- col.itemR(pchan, "lock_location")
- col.active = not (bone.parent and bone.connected)
-
- col = row.column()
- if pchan.rotation_mode in ('QUATERNION', 'AXIS_ANGLE'):
- col.itemR(pchan, "lock_rotations_4d", text="Lock Rotation")
- if pchan.lock_rotations_4d:
- col.itemR(pchan, "lock_rotation_w", text="W")
- col.itemR(pchan, "lock_rotation", text="")
- else:
- col.itemR(pchan, "lock_rotation", text="Rotation")
-
- row.column().itemR(pchan, "lock_scale")
-
-class BONE_PT_bone(BoneButtonsPanel):
- __label__ = "Bone"
-
- def draw(self, context):
- layout = self.layout
-
- ob = context.object
- bone = context.bone
- arm = context.armature
-
- if not bone:
- bone = context.edit_bone
- pchan = None
- else:
- pchan = ob.pose.pose_channels[context.bone.name]
-
- split = layout.split()
-
- col = split.column()
- col.itemL(text="Parent:")
- if context.bone:
- col.itemR(bone, "parent", text="")
- else:
- col.item_pointerR(bone, "parent", arm, "edit_bones", text="")
-
- row = col.row()
- row.active = bone.parent != None
- row.itemR(bone, "connected")
-
- col.itemL(text="Layers:")
- col.itemR(bone, "layer", text="")
-
- col = split.column()
- col.itemL(text="Inherit:")
- col.itemR(bone, "hinge", text="Rotation")
- col.itemR(bone, "inherit_scale", text="Scale")
- col.itemL(text="Display:")
- col.itemR(bone, "draw_wire", text="Wireframe")
- col.itemR(bone, "hidden", text="Hide")
-
- if ob and pchan:
- split = layout.split()
-
- col = split.column()
- col.itemL(text="Bone Group:")
- col.item_pointerR(pchan, "bone_group", ob.pose, "bone_groups", text="")
-
- col = split.column()
- col.itemL(text="Custom Shape:")
- col.itemR(pchan, "custom_shape", text="")
-
-class BONE_PT_inverse_kinematics(BoneButtonsPanel):
- __label__ = "Inverse Kinematics"
- __default_closed__ = True
-
- def poll(self, context):
- ob = context.object
- bone = context.bone
-
- if ob and context.bone:
- pchan = ob.pose.pose_channels[context.bone.name]
- return pchan.has_ik
-
- return False
-
- def draw(self, context):
- layout = self.layout
-
- ob = context.object
- bone = context.bone
- pchan = ob.pose.pose_channels[context.bone.name]
-
- row = layout.row()
- row.itemR(ob.pose, "ik_solver")
-
- split = layout.split(percentage=0.25)
- split.itemR(pchan, "ik_dof_x", text="X")
- row = split.row()
- row.itemR(pchan, "ik_stiffness_x", text="Stiffness", slider=True)
- row.active = pchan.ik_dof_x
-
- split = layout.split(percentage=0.25)
- row = split.row()
- row.itemR(pchan, "ik_limit_x", text="Limit")
- row.active = pchan.ik_dof_x
- row = split.row(align=True)
- row.itemR(pchan, "ik_min_x", text="")
- row.itemR(pchan, "ik_max_x", text="")
- row.active = pchan.ik_dof_x and pchan.ik_limit_x
-
- split = layout.split(percentage=0.25)
- split.itemR(pchan, "ik_dof_y", text="Y")
- row = split.row()
- row.itemR(pchan, "ik_stiffness_y", text="Stiffness", slider=True)
- row.active = pchan.ik_dof_y
-
- split = layout.split(percentage=0.25)
- row = split.row()
- row.itemR(pchan, "ik_limit_y", text="Limit")
- row.active = pchan.ik_dof_y
- row = split.row(align=True)
- row.itemR(pchan, "ik_min_y", text="")
- row.itemR(pchan, "ik_max_y", text="")
- row.active = pchan.ik_dof_y and pchan.ik_limit_y
-
- split = layout.split(percentage=0.25)
- split.itemR(pchan, "ik_dof_z", text="Z")
- row = split.row()
- row.itemR(pchan, "ik_stiffness_z", text="Stiffness", slider=True)
- row.active = pchan.ik_dof_z
-
- split = layout.split(percentage=0.25)
- row = split.row()
- row.itemR(pchan, "ik_limit_z", text="Limit")
- row.active = pchan.ik_dof_z
- row = split.row(align=True)
- row.itemR(pchan, "ik_min_z", text="")
- row.itemR(pchan, "ik_max_z", text="")
- row.active = pchan.ik_dof_z and pchan.ik_limit_z
- split = layout.split()
- split.itemR(pchan, "ik_stretch", text="Stretch", slider=True)
- split.itemL()
-
- if ob.pose.ik_solver == "ITASC":
- layout.itemL(text="Joint constraint:")
- split = layout.split(percentage=0.3)
- row = split.row()
- row.itemR(pchan, "ik_rot_control", text="Rotation")
- row = split.row()
- row.itemR(pchan, "ik_rot_weight", text="Weight", slider=True)
- row.active = pchan.ik_rot_control
- # not supported yet
- #split = layout.split(percentage=0.3)
- #row = split.row()
- #row.itemR(pchan, "ik_lin_control", text="Size")
- #row = split.row()
- #row.itemR(pchan, "ik_lin_weight", text="Weight", slider=True)
- #row.active = pchan.ik_lin_control
-
-class BONE_PT_deform(BoneButtonsPanel):
- __label__ = "Deform"
- __default_closed__ = True
-
- def draw_header(self, context):
- bone = context.bone
-
- if not bone:
- bone = context.edit_bone
-
- self.layout.itemR(bone, "deform", text="")
-
- def draw(self, context):
- layout = self.layout
-
- bone = context.bone
-
- if not bone:
- bone = context.edit_bone
-
- layout.active = bone.deform
-
- split = layout.split()
-
- col = split.column()
- col.itemL(text="Envelope:")
-
- sub = col.column(align=True)
- sub.itemR(bone, "envelope_distance", text="Distance")
- sub.itemR(bone, "envelope_weight", text="Weight")
- col.itemR(bone, "multiply_vertexgroup_with_envelope", text="Multiply")
-
- sub = col.column(align=True)
- sub.itemL(text="Radius:")
- sub.itemR(bone, "head_radius", text="Head")
- sub.itemR(bone, "tail_radius", text="Tail")
-
- col = split.column()
- col.itemL(text="Curved Bones:")
-
- sub = col.column(align=True)
- sub.itemR(bone, "bbone_segments", text="Segments")
- sub.itemR(bone, "bbone_in", text="Ease In")
- sub.itemR(bone, "bbone_out", text="Ease Out")
-
- col.itemL(text="Offset:")
- col.itemR(bone, "cyclic_offset")
-
-class BONE_PT_iksolver_itasc(BoneButtonsPanel):
- __idname__ = "BONE_PT_iksolver_itasc"
- __label__ = "iTaSC parameters"
- __default_closed__ = True
-
- def poll(self, context):
- ob = context.object
- bone = context.bone
-
- if ob and context.bone:
- pchan = ob.pose.pose_channels[context.bone.name]
- return pchan.has_ik and ob.pose.ik_solver == "ITASC" and ob.pose.ik_param
-
- return False
-
- def draw(self, context):
- layout = self.layout
-
- ob = context.object
- itasc = ob.pose.ik_param
-
- layout.row().itemR(itasc, "simulation")
- if itasc.simulation:
- split = layout.split()
- row = split.row()
- row.itemR(itasc, "reiteration")
- row = split.row()
- if itasc.reiteration:
- itasc.initial_reiteration = True
- row.itemR(itasc, "initial_reiteration")
- row.active = not itasc.reiteration
-
- flow = layout.column_flow()
- flow.itemR(itasc, "precision")
- flow.itemR(itasc, "num_iter")
- flow.active = not itasc.simulation or itasc.initial_reiteration or itasc.reiteration
-
- if itasc.simulation:
- layout.itemR(itasc, "auto_step")
- row = layout.row()
- if itasc.auto_step:
- row.itemR(itasc, "min_step")
- row.itemR(itasc, "max_step")
- else:
- row.itemR(itasc, "num_step")
-
- layout.itemR(itasc, "solver")
- if itasc.simulation:
- layout.itemR(itasc, "feedback")
- layout.itemR(itasc, "max_velocity")
- if itasc.solver == "DLS":
- row = layout.row()
- row.itemR(itasc, "dampmax")
- row.itemR(itasc, "dampeps")
-
-bpy.types.register(BONE_PT_context_bone)
-bpy.types.register(BONE_PT_transform)
-bpy.types.register(BONE_PT_transform_locks)
-bpy.types.register(BONE_PT_bone)
-bpy.types.register(BONE_PT_deform)
-bpy.types.register(BONE_PT_inverse_kinematics)
-bpy.types.register(BONE_PT_iksolver_itasc)
diff --git a/release/ui/buttons_data_camera.py b/release/ui/buttons_data_camera.py
deleted file mode 100644
index 19d7dfef852..00000000000
--- a/release/ui/buttons_data_camera.py
+++ /dev/null
@@ -1,98 +0,0 @@
-
-import bpy
-
-class DataButtonsPanel(bpy.types.Panel):
- __space_type__ = 'PROPERTIES'
- __region_type__ = 'WINDOW'
- __context__ = "data"
-
- def poll(self, context):
- return context.camera
-
-class DATA_PT_context_camera(DataButtonsPanel):
- __show_header__ = False
-
- def draw(self, context):
- layout = self.layout
-
- ob = context.object
- cam = context.camera
- space = context.space_data
-
- split = layout.split(percentage=0.65)
-
- if ob:
- split.template_ID(ob, "data")
- split.itemS()
- elif cam:
- split.template_ID(space, "pin_id")
- split.itemS()
-
-class DATA_PT_camera(DataButtonsPanel):
- __label__ = "Lens"
-
- def draw(self, context):
- layout = self.layout
-
- cam = context.camera
-
- layout.itemR(cam, "type", expand=True)
-
- row = layout.row()
- if cam.type == 'PERSP':
- if cam.lens_unit == 'MILLIMETERS':
- row.itemR(cam, "lens", text="Angle")
- elif cam.lens_unit == 'DEGREES':
- row.itemR(cam, "angle")
- row.itemR(cam, "lens_unit", text="")
-
- elif cam.type == 'ORTHO':
- row.itemR(cam, "ortho_scale")
-
- layout.itemR(cam, "panorama")
-
- split = layout.split()
-
- col = split.column(align=True)
- col.itemL(text="Shift:")
- col.itemR(cam, "shift_x", text="X")
- col.itemR(cam, "shift_y", text="Y")
-
- col = split.column(align=True)
- col.itemL(text="Clipping:")
- col.itemR(cam, "clip_start", text="Start")
- col.itemR(cam, "clip_end", text="End")
-
- layout.itemL(text="Depth of Field:")
-
- row = layout.row()
- row.itemR(cam, "dof_object", text="")
- row.itemR(cam, "dof_distance", text="Distance")
-
-class DATA_PT_camera_display(DataButtonsPanel):
- __label__ = "Display"
-
- def draw(self, context):
- layout = self.layout
-
- cam = context.camera
-
- split = layout.split()
-
- col = split.column()
- col.itemR(cam, "show_limits", text="Limits")
- col.itemR(cam, "show_mist", text="Mist")
- col.itemR(cam, "show_title_safe", text="Title Safe")
- col.itemR(cam, "show_name", text="Name")
-
- col = split.column()
- col.itemR(cam, "draw_size", text="Size")
- col.itemS()
- col.itemR(cam, "show_passepartout", text="Passepartout")
- sub = col.column()
- sub.active = cam.show_passepartout
- sub.itemR(cam, "passepartout_alpha", text="Alpha", slider=True)
-
-bpy.types.register(DATA_PT_context_camera)
-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
deleted file mode 100644
index c715cfb5d93..00000000000
--- a/release/ui/buttons_data_curve.py
+++ /dev/null
@@ -1,227 +0,0 @@
-
-import bpy
-
-class DataButtonsPanel(bpy.types.Panel):
- __space_type__ = 'PROPERTIES'
- __region_type__ = 'WINDOW'
- __context__ = "data"
-
- def poll(self, context):
- return (context.object and context.object.type in ('CURVE', 'SURFACE') and context.curve)
-
-class DataButtonsPanelCurve(DataButtonsPanel):
- '''
- Same as above but for curves only
- '''
- def poll(self, context):
- return (context.object and context.object.type == 'CURVE' and context.curve)
-
-class DataButtonsPanelActive(DataButtonsPanel):
- '''
- Same as above but for curves only
- '''
- def poll(self, context):
- curve = context.curve
- return (curve and curve.active_spline)
-
-class DATA_PT_context_curve(DataButtonsPanel):
- __show_header__ = False
-
- def draw(self, context):
- layout = self.layout
-
- ob = context.object
- curve = context.curve
- space = context.space_data
-
- split = layout.split(percentage=0.65)
-
- if ob:
- split.template_ID(ob, "data")
- split.itemS()
- elif curve:
- split.template_ID(space, "pin_id")
- split.itemS()
-
-class DATA_PT_shape_curve(DataButtonsPanel):
- __label__ = "Shape"
-
- def draw(self, context):
- layout = self.layout
-
- ob = context.object
- curve = context.curve
- space = context.space_data
- is_surf = (ob.type == 'SURFACE')
-
- if not is_surf:
- row = layout.row()
- row.itemR(curve, "dimensions", expand=True)
-
- split = layout.split()
-
- col = split.column()
-
- if not is_surf:
- sub = col.column()
- sub.active = (curve.dimensions=='2D')
- sub.itemL(text="Caps:")
- row = sub.row()
- row.itemR(curve, "front")
- row.itemR(curve, "back")
-
- col.itemL(text="Textures:")
-# col.itemR(curve, "uv_orco")
- col.itemR(curve, "auto_texspace")
-
- col = split.column()
- col.itemL(text="Resolution:")
- sub = col.column(align=True)
- sub.itemR(curve, "resolution_u", text="Preview U")
- sub.itemR(curve, "render_resolution_u", text="Render U")
-
- if is_surf:
- sub = col.column(align=True)
- sub.itemR(curve, "resolution_v", text="Preview V")
- sub.itemR(curve, "render_resolution_v", text="Render V")
-
- # XXX - put somewhere nicer.
- row= layout.row()
- row.itemR(curve, "twist_mode")
- row.itemR(curve, "twist_smooth") # XXX - may not be kept
-
-
-# col.itemL(text="Display:")
-# col.itemL(text="HANDLES")
-# col.itemL(text="NORMALS")
-# col.itemR(curve, "vertex_normal_flip")
-
-class DATA_PT_geometry_curve(DataButtonsPanel):
- __label__ = "Geometry"
-
- def draw(self, context):
- layout = self.layout
-
- curve = context.curve
-
- split = layout.split()
-
- col = split.column()
- col.itemL(text="Modification:")
- col.itemR(curve, "width")
- col.itemR(curve, "extrude")
- col.itemL(text="Taper Object:")
- col.itemR(curve, "taper_object", text="")
-
- col = split.column()
- col.itemL(text="Bevel:")
- col.itemR(curve, "bevel_depth", text="Depth")
- col.itemR(curve, "bevel_resolution", text="Resolution")
- col.itemL(text="Bevel Object:")
- col.itemR(curve, "bevel_object", text="")
-
-class DATA_PT_pathanim(DataButtonsPanelCurve):
- __label__ = "Path Animation"
-
- def draw_header(self, context):
- curve = context.curve
-
- self.layout.itemR(curve, "use_path", text="")
-
- def draw(self, context):
- layout = self.layout
-
- curve = context.curve
-
- layout.active = curve.use_path
-
- split = layout.split()
-
- col = split.column()
- col.itemR(curve, "path_length", text="Frames")
- col.itemR(curve, "use_path_follow")
-
- col = split.column()
- col.itemR(curve, "use_stretch")
- col.itemR(curve, "use_radius")
- col.itemR(curve, "use_time_offset", text="Offset Children")
-
-class DATA_PT_active_spline(DataButtonsPanelActive):
- __label__ = "Active Spline"
-
- def draw(self, context):
- layout = self.layout
-
- ob = context.object
- curve = context.curve
- act_spline = curve.active_spline
- is_surf = (ob.type == 'SURFACE')
- is_poly = (act_spline.type == 'POLY')
-
- split = layout.split()
-
- if is_poly:
- # These settings are below but its easier to have
- # poly's set aside since they use so few settings
- col = split.column()
- col.itemL(text="Cyclic:")
- col.itemR(act_spline, "smooth")
- col = split.column()
- col.itemR(act_spline, "cyclic_u", text="U")
-
- else:
- col = split.column()
- col.itemL(text="Cyclic:")
- if act_spline.type == 'NURBS':
- col.itemL(text="Bezier:")
- col.itemL(text="Endpoint:")
- col.itemL(text="Order:")
-
- col.itemL(text="Resolution:")
-
- col = split.column()
- col.itemR(act_spline, "cyclic_u", text="U")
-
- if act_spline.type == 'NURBS':
- sub = col.column()
- # sub.active = (not act_spline.cyclic_u)
- sub.itemR(act_spline, "bezier_u", text="U")
- sub.itemR(act_spline, "endpoint_u", text="U")
-
- sub = col.column()
- sub.itemR(act_spline, "order_u", text="U")
- col.itemR(act_spline, "resolution_u", text="U")
-
- if is_surf:
- col = split.column()
- col.itemR(act_spline, "cyclic_v", text="V")
-
- # its a surface, assume its a nurb.
- sub = col.column()
- sub.active = (not act_spline.cyclic_v)
- sub.itemR(act_spline, "bezier_v", text="V")
- sub.itemR(act_spline, "endpoint_v", text="V")
- sub = col.column()
- sub.itemR(act_spline, "order_v", text="V")
- sub.itemR(act_spline, "resolution_v", text="V")
-
-
- if not is_surf:
- split = layout.split()
- col = split.column()
- col.active = (curve.dimensions=='3D')
-
- col.itemL(text="Interpolation:")
- col.itemR(act_spline, "tilt_interpolation", text="Tilt")
- col.itemR(act_spline, "radius_interpolation", text="Radius")
-
- split = layout.split()
- col = split.column()
- col.itemR(act_spline, "smooth")
-
-
-bpy.types.register(DATA_PT_context_curve)
-bpy.types.register(DATA_PT_shape_curve)
-bpy.types.register(DATA_PT_geometry_curve)
-bpy.types.register(DATA_PT_pathanim)
-bpy.types.register(DATA_PT_active_spline)
diff --git a/release/ui/buttons_data_empty.py b/release/ui/buttons_data_empty.py
deleted file mode 100644
index c07f3136fae..00000000000
--- a/release/ui/buttons_data_empty.py
+++ /dev/null
@@ -1,23 +0,0 @@
-
-import bpy
-
-class DataButtonsPanel(bpy.types.Panel):
- __space_type__ = 'PROPERTIES'
- __region_type__ = 'WINDOW'
- __context__ = "data"
-
- def poll(self, context):
- return (context.object and context.object.type == 'EMPTY')
-
-class DATA_PT_empty(DataButtonsPanel):
- __label__ = "Empty"
-
- def draw(self, context):
- layout = self.layout
-
- ob = context.object
-
- layout.itemR(ob, "empty_draw_type", text="Draw Type")
- layout.itemR(ob, "empty_draw_size", text="Draw Size")
-
-bpy.types.register(DATA_PT_empty)
diff --git a/release/ui/buttons_data_lamp.py b/release/ui/buttons_data_lamp.py
deleted file mode 100644
index 86ca5beb9b5..00000000000
--- a/release/ui/buttons_data_lamp.py
+++ /dev/null
@@ -1,310 +0,0 @@
-
-import bpy
-
-class DataButtonsPanel(bpy.types.Panel):
- __space_type__ = 'PROPERTIES'
- __region_type__ = 'WINDOW'
- __context__ = "data"
-
- def poll(self, context):
- return context.lamp
-
-class DATA_PT_preview(DataButtonsPanel):
- __label__ = "Preview"
-
- def draw(self, context):
- self.layout.template_preview(context.lamp)
-
-class DATA_PT_context_lamp(DataButtonsPanel):
- __show_header__ = False
-
- def draw(self, context):
- layout = self.layout
-
- ob = context.object
- lamp = context.lamp
- space = context.space_data
-
- split = layout.split(percentage=0.65)
-
- if ob:
- split.template_ID(ob, "data")
- split.itemS()
- elif lamp:
- split.template_ID(space, "pin_id")
- split.itemS()
-
-class DATA_PT_lamp(DataButtonsPanel):
- __label__ = "Lamp"
-
- def draw(self, context):
- layout = self.layout
-
- lamp = context.lamp
-
- layout.itemR(lamp, "type", expand=True)
-
- split = layout.split()
-
- col = split.column()
- sub = col.column()
- sub.itemR(lamp, "color", text="")
- sub.itemR(lamp, "energy")
-
- if lamp.type in ('POINT', 'SPOT'):
- sub.itemL(text="Falloff:")
- sub.itemR(lamp, "falloff_type", text="")
- sub.itemR(lamp, "distance")
-
- if lamp.falloff_type == 'LINEAR_QUADRATIC_WEIGHTED':
- col.itemL(text="Attenuation Factors:")
- sub = col.column(align=True)
- sub.itemR(lamp, "linear_attenuation", slider=True, text="Linear")
- sub.itemR(lamp, "quadratic_attenuation", slider=True, text="Quadratic")
-
- col.itemR(lamp, "sphere")
-
- if lamp.type == 'AREA':
- col.itemR(lamp, "distance")
- col.itemR(lamp, "gamma")
-
- col = split.column()
- col.itemR(lamp, "negative")
- col.itemR(lamp, "layer", text="This Layer Only")
- col.itemR(lamp, "specular")
- col.itemR(lamp, "diffuse")
-
-class DATA_PT_sunsky(DataButtonsPanel):
- __label__ = "Sky & Atmosphere"
-
- def poll(self, context):
- lamp = context.lamp
- return (lamp and lamp.type == 'SUN')
-
- def draw(self, context):
- layout = self.layout
-
- lamp = context.lamp.sky
-
- layout.itemR(lamp, "sky")
-
- row = layout.row()
- row.active = lamp.sky or lamp.atmosphere
- row.itemR(lamp, "atmosphere_turbidity", text="Turbidity")
-
- split = layout.split()
-
- col = split.column()
- col.active = lamp.sky
- col.itemL(text="Blending:")
- sub = col.column()
- sub.itemR(lamp, "sky_blend_type", text="")
- sub.itemR(lamp, "sky_blend", text="Factor")
-
- col.itemL(text="Color Space:")
- sub = col.column()
- sub.row().itemR(lamp, "sky_color_space", expand=True)
- sub.itemR(lamp, "sky_exposure", text="Exposure")
-
- col = split.column()
- col.active = lamp.sky
- col.itemL(text="Horizon:")
- sub = col.column()
- sub.itemR(lamp, "horizon_brightness", text="Brightness")
- sub.itemR(lamp, "spread", text="Spread")
-
- col.itemL(text="Sun:")
- sub = col.column()
- sub.itemR(lamp, "sun_brightness", text="Brightness")
- sub.itemR(lamp, "sun_size", text="Size")
- sub.itemR(lamp, "backscattered_light", slider=True,text="Back Light")
-
- layout.itemS()
-
- layout.itemR(lamp, "atmosphere")
-
- split = layout.split()
-
- col = split.column()
- col.active = lamp.atmosphere
- col.itemL(text="Intensity:")
- col.itemR(lamp, "sun_intensity", text="Sun")
- col.itemR(lamp, "atmosphere_distance_factor", text="Distance")
-
- col = split.column()
- col.active = lamp.atmosphere
- col.itemL(text="Scattering:")
- sub = col.column(align=True)
- sub.itemR(lamp, "atmosphere_inscattering", slider=True, text="Inscattering")
- sub.itemR(lamp, "atmosphere_extinction", slider=True ,text="Extinction")
-
-class DATA_PT_shadow(DataButtonsPanel):
- __label__ = "Shadow"
-
- def poll(self, context):
- lamp = context.lamp
- return (lamp and lamp.type in ('POINT','SUN', 'SPOT', 'AREA'))
-
- def draw(self, context):
- layout = self.layout
-
- lamp = context.lamp
-
- layout.itemR(lamp, "shadow_method", expand=True)
-
- if lamp.shadow_method != 'NOSHADOW':
- split = layout.split()
-
- col = split.column()
- col.itemR(lamp, "shadow_color", text="")
-
- col = split.column()
- col.itemR(lamp, "shadow_layer", text="This Layer Only")
- col.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'):
- split = layout.split()
-
- col = split.column()
- col.itemR(lamp, "shadow_soft_size", text="Soft Size")
-
- col.itemR(lamp, "shadow_ray_samples", text="Samples")
- if lamp.shadow_ray_sampling_method == 'ADAPTIVE_QMC':
- col.itemR(lamp, "shadow_adaptive_threshold", text="Threshold")
- col = split.column()
-
- elif lamp.type == 'AREA':
- split = layout.split()
-
- col = split.column()
- sub = split.column(align=True)
- if lamp.shape == 'SQUARE':
- col.itemR(lamp, "shadow_ray_samples_x", text="Samples")
- elif lamp.shape == 'RECTANGLE':
- col.itemR(lamp, "shadow_ray_samples_x", text="Samples X")
- col.itemR(lamp, "shadow_ray_samples_y", text="Samples Y")
-
- if lamp.shadow_ray_sampling_method == 'ADAPTIVE_QMC':
- col.itemR(lamp, "shadow_adaptive_threshold", text="Threshold")
-
- elif lamp.shadow_ray_sampling_method == 'CONSTANT_JITTERED':
- sub.itemR(lamp, "umbra")
- sub.itemR(lamp, "dither")
- sub.itemR(lamp, "jitter")
-
- elif 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'):
- split = layout.split()
-
- col = split.column()
- col.itemL(text="Filter Type:")
- col.itemR(lamp, "shadow_filter_type", text="")
- sub = col.column(align=True)
- sub.itemR(lamp, "shadow_buffer_soft", text="Soft")
- sub.itemR(lamp, "shadow_buffer_bias", text="Bias")
-
- col = split.column()
- col.itemL(text="Sample Buffers:")
- col.itemR(lamp, "shadow_sample_buffers", text="")
- sub = col.column(align=True)
- sub.itemR(lamp, "shadow_buffer_size", text="Size")
- sub.itemR(lamp, "shadow_buffer_samples", text="Samples")
-
- elif lamp.shadow_buffer_type == 'IRREGULAR':
- layout.itemR(lamp, "shadow_buffer_bias", text="Bias")
-
- row = layout.row()
- row.itemR(lamp, "auto_clip_start", text="Autoclip Start")
- sub = row.row()
- sub.active = not lamp.auto_clip_start
- sub.itemR(lamp, "shadow_buffer_clip_start", text="Clip Start")
-
- row = layout.row()
- row.itemR(lamp, "auto_clip_end", text="Autoclip End")
- sub = row.row()
- sub.active = not lamp.auto_clip_end
- sub.itemR(lamp, "shadow_buffer_clip_end", text=" Clip End")
-
-class DATA_PT_area(DataButtonsPanel):
- __label__ = "Area Shape"
-
- def poll(self, context):
- lamp = context.lamp
- return (lamp and lamp.type == 'AREA')
-
- def draw(self, context):
- layout = self.layout
-
- lamp = context.lamp
-
- split = layout.split()
-
- col = split.column()
- col.itemR(lamp, "shape", text="")
-
- sub = col.column(align=True)
- if (lamp.shape == 'SQUARE'):
- sub.itemR(lamp, "size")
- elif (lamp.shape == 'RECTANGLE'):
- sub.itemR(lamp, "size", text="Size X")
- sub.itemR(lamp, "size_y", text="Size Y")
-
-class DATA_PT_spot(DataButtonsPanel):
- __label__ = "Spot Shape"
-
- def poll(self, context):
- lamp = context.lamp
- return (lamp and lamp.type == 'SPOT')
-
- def draw(self, context):
- layout = self.layout
-
- lamp = context.lamp
-
- split = layout.split()
-
- col = split.column()
- sub = col.column(align=True)
- sub.itemR(lamp, "spot_size", text="Size")
- sub.itemR(lamp, "spot_blend", text="Blend")
- col.itemR(lamp, "square")
-
- col = split.column()
- col.itemR(lamp, "halo")
- sub = col.column(align=True)
- sub.active = lamp.halo
- sub.itemR(lamp, "halo_intensity", text="Intensity")
- if lamp.shadow_method == 'BUFFER_SHADOW':
- sub.itemR(lamp, "halo_step", text="Step")
-
-class DATA_PT_falloff_curve(DataButtonsPanel):
- __label__ = "Falloff Curve"
- __default_closed__ = True
-
- def poll(self, context):
- lamp = context.lamp
-
- return (lamp and lamp.type in ('POINT', 'SPOT') and lamp.falloff_type == 'CUSTOM_CURVE')
-
- def draw(self, context):
- lamp = context.lamp
-
- self.layout.template_curve_mapping(lamp, "falloff_curve")
-
-bpy.types.register(DATA_PT_context_lamp)
-bpy.types.register(DATA_PT_preview)
-bpy.types.register(DATA_PT_lamp)
-bpy.types.register(DATA_PT_falloff_curve)
-bpy.types.register(DATA_PT_area)
-bpy.types.register(DATA_PT_spot)
-bpy.types.register(DATA_PT_shadow)
-bpy.types.register(DATA_PT_sunsky)
diff --git a/release/ui/buttons_data_lattice.py b/release/ui/buttons_data_lattice.py
deleted file mode 100644
index bc977860330..00000000000
--- a/release/ui/buttons_data_lattice.py
+++ /dev/null
@@ -1,56 +0,0 @@
-
-import bpy
-
-class DataButtonsPanel(bpy.types.Panel):
- __space_type__ = 'PROPERTIES'
- __region_type__ = 'WINDOW'
- __context__ = "data"
-
- def poll(self, context):
- return context.lattice
-
-class DATA_PT_context_lattice(DataButtonsPanel):
- __show_header__ = False
-
- def draw(self, context):
- layout = self.layout
-
- ob = context.object
- lat = context.lattice
- space = context.space_data
-
- split = layout.split(percentage=0.65)
-
- if ob:
- split.template_ID(ob, "data")
- split.itemS()
- elif lat:
- split.template_ID(space, "pin_id")
- split.itemS()
-
-class DATA_PT_lattice(DataButtonsPanel):
- __label__ = "Lattice"
-
- def draw(self, context):
- layout = self.layout
-
- lat = context.lattice
-
- 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.itemO("lattice.make_regular")
- row.itemR(lat, "outside")
-
-bpy.types.register(DATA_PT_context_lattice)
-bpy.types.register(DATA_PT_lattice)
diff --git a/release/ui/buttons_data_mesh.py b/release/ui/buttons_data_mesh.py
deleted file mode 100644
index 780ae3ac8f9..00000000000
--- a/release/ui/buttons_data_mesh.py
+++ /dev/null
@@ -1,203 +0,0 @@
-
-import bpy
-
-class DataButtonsPanel(bpy.types.Panel):
- __space_type__ = 'PROPERTIES'
- __region_type__ = 'WINDOW'
- __context__ = "data"
-
- def poll(self, context):
- return context.mesh
-
-class DATA_PT_context_mesh(DataButtonsPanel):
- __show_header__ = False
-
- def draw(self, context):
- layout = self.layout
-
- ob = context.object
- mesh = context.mesh
- space = context.space_data
-
- split = layout.split(percentage=0.65)
-
- if ob:
- split.template_ID(ob, "data")
- split.itemS()
- elif mesh:
- split.template_ID(space, "pin_id")
- split.itemS()
-
-class DATA_PT_normals(DataButtonsPanel):
- __label__ = "Normals"
-
- def draw(self, context):
- layout = self.layout
-
- mesh = context.mesh
-
- split = layout.split()
-
- col = split.column()
- col.itemR(mesh, "autosmooth")
- sub = col.column()
- sub.active = mesh.autosmooth
- sub.itemR(mesh, "autosmooth_angle", text="Angle")
-
- col = split.column()
- col.itemR(mesh, "vertex_normal_flip")
- col.itemR(mesh, "double_sided")
-
-class DATA_PT_vertex_groups(DataButtonsPanel):
- __label__ = "Vertex Groups"
-
- def poll(self, context):
- return (context.object and context.object.type in ('MESH', 'LATTICE'))
-
- def draw(self, context):
- layout = self.layout
-
- ob = context.object
-
- row = layout.row()
- row.template_list(ob, "vertex_groups", ob, "active_vertex_group_index", rows=2)
-
- col = row.column(align=True)
- col.itemO("object.vertex_group_add", icon='ICON_ZOOMIN', text="")
- col.itemO("object.vertex_group_remove", icon='ICON_ZOOMOUT', text="")
-
- col.itemO("object.vertex_group_copy", icon='ICON_COPYDOWN', text="")
- if ob.data.users > 1:
- col.itemO("object.vertex_group_copy_to_linked", icon='ICON_COPYDOWN', text="")
-
- group = ob.active_vertex_group
- if group:
- row = layout.row()
- row.itemR(group, "name")
-
- if ob.mode == 'EDIT':
- row = layout.row()
-
- sub = row.row(align=True)
- sub.itemO("object.vertex_group_assign", text="Assign")
- sub.itemO("object.vertex_group_remove_from", text="Remove")
-
- sub = row.row(align=True)
- sub.itemO("object.vertex_group_select", text="Select")
- sub.itemO("object.vertex_group_deselect", text="Deselect")
-
- layout.itemR(context.tool_settings, "vertex_group_weight", text="Weight")
-
-class DATA_PT_shape_keys(DataButtonsPanel):
- __label__ = "Shape Keys"
-
- def poll(self, context):
- return (context.object and context.object.type in ('MESH', 'LATTICE'))
-
- def draw(self, context):
- layout = self.layout
-
- ob = context.object
- key = ob.data.shape_keys
- kb = ob.active_shape_key
-
- row = layout.row()
- row.template_list(key, "keys", ob, "active_shape_key_index", rows=2)
-
- col = row.column()
-
- subcol = col.column(align=True)
- subcol.itemO("object.shape_key_add", icon='ICON_ZOOMIN', text="")
- subcol.itemO("object.shape_key_remove", icon='ICON_ZOOMOUT', text="")
-
- if kb:
- col.itemS()
-
- subcol = col.column(align=True)
- subcol.itemR(ob, "shape_key_lock", icon='ICON_UNPINNED', text="")
- subcol.itemR(kb, "mute", icon='ICON_MUTE_IPO_ON', text="")
-
- if key.relative:
- row = layout.row()
- row.itemR(key, "relative")
- row.itemL()
-
- row = layout.row()
- row.itemR(kb, "name")
-
- if ob.active_shape_key_index != 0:
-
- row = layout.row()
- row.enabled = ob.shape_key_lock == False
- row.itemR(kb, "value", slider=True)
-
- split = layout.split()
- sub = split.column(align=True)
- sub.enabled = ob.shape_key_lock == False
- sub.itemL(text="Range:")
- sub.itemR(kb, "slider_min", text="Min")
- sub.itemR(kb, "slider_max", text="Max")
-
- sub = split.column()
- sub.itemL(text="Blend:")
- sub.item_pointerR(kb, "vertex_group", ob, "vertex_groups", text="")
- sub.item_pointerR(kb, "relative_key", key, "keys", text="")
-
- else:
- row = layout.row()
- row.itemR(key, "relative")
- row.itemR(key, "slurph")
-
- layout.itemR(kb, "name")
-
- if ob.mode == 'EDIT':
- layout.enabled = False
-
-class DATA_PT_uv_texture(DataButtonsPanel):
- __label__ = "UV Texture"
-
- def draw(self, context):
- layout = self.layout
-
- me = context.mesh
-
- row = layout.row()
- col = row.column()
-
- col.template_list(me, "uv_textures", me, "active_uv_texture_index", rows=2)
-
- col = row.column(align=True)
- col.itemO("mesh.uv_texture_add", icon='ICON_ZOOMIN', text="")
- col.itemO("mesh.uv_texture_remove", icon='ICON_ZOOMOUT', text="")
-
- lay = me.active_uv_texture
- if lay:
- layout.itemR(lay, "name")
-
-class DATA_PT_vertex_colors(DataButtonsPanel):
- __label__ = "Vertex Colors"
-
- def draw(self, context):
- layout = self.layout
-
- me = context.mesh
-
- row = layout.row()
- col = row.column()
-
- col.template_list(me, "vertex_colors", me, "active_vertex_color_index", rows=2)
-
- col = row.column(align=True)
- col.itemO("mesh.vertex_color_add", icon='ICON_ZOOMIN', text="")
- col.itemO("mesh.vertex_color_remove", icon='ICON_ZOOMOUT', text="")
-
- lay = me.active_vertex_color
- if lay:
- layout.itemR(lay, "name")
-
-bpy.types.register(DATA_PT_context_mesh)
-bpy.types.register(DATA_PT_normals)
-bpy.types.register(DATA_PT_vertex_groups)
-bpy.types.register(DATA_PT_shape_keys)
-bpy.types.register(DATA_PT_uv_texture)
-bpy.types.register(DATA_PT_vertex_colors)
diff --git a/release/ui/buttons_data_metaball.py b/release/ui/buttons_data_metaball.py
deleted file mode 100644
index 757546fdf8a..00000000000
--- a/release/ui/buttons_data_metaball.py
+++ /dev/null
@@ -1,106 +0,0 @@
-import bpy
-
-class DataButtonsPanel(bpy.types.Panel):
- __space_type__ = 'PROPERTIES'
- __region_type__ = 'WINDOW'
- __context__ = "data"
-
- def poll(self, context):
- return context.meta_ball
-
-class DATA_PT_context_metaball(DataButtonsPanel):
- __show_header__ = False
-
- def draw(self, context):
- layout = self.layout
-
- ob = context.object
- mball = context.meta_ball
- space = context.space_data
-
- split = layout.split(percentage=0.65)
-
- if ob:
- split.template_ID(ob, "data")
- split.itemS()
- elif mball:
- split.template_ID(space, "pin_id")
- split.itemS()
-
-class DATA_PT_metaball(DataButtonsPanel):
- __label__ = "Metaball"
-
- def draw(self, context):
- layout = self.layout
-
- mball = context.meta_ball
-
- split = layout.split()
-
- col = split.column()
- col.itemL(text="Resolution:")
- sub = col.column(align=True)
- sub.itemR(mball, "wire_size", text="View")
- sub.itemR(mball, "render_size", text="Render")
-
- col = split.column()
- col.itemL(text="Settings:")
- col.itemR(mball, "threshold", text="Threshold")
-
- layout.itemL(text="Update:")
- layout.itemR(mball, "flag", expand=True)
-
-class DATA_PT_metaball_element(DataButtonsPanel):
- __label__ = "Active Element"
-
- def poll(self, context):
- return (context.meta_ball and context.meta_ball.active_element)
-
- def draw(self, context):
- layout = self.layout
-
- metaelem = context.meta_ball.active_element
-
- split = layout.split(percentage=0.3)
- split.itemL(text="Type:")
- split.itemR(metaelem, "type", text="")
-
- split = layout.split()
-
- col = split.column()
- col.itemL(text="Settings:")
- col.itemR(metaelem, "stiffness", text="Stiffness")
- col.itemR(metaelem, "negative", text="Negative")
- col.itemR(metaelem, "hide", text="Hide")
-
- if metaelem.type == 'BALL':
- col = split.column(align=True)
-
- elif metaelem.type == 'CUBE':
- col = split.column(align=True)
- col.itemL(text="Size:")
- col.itemR(metaelem, "size_x", text="X")
- col.itemR(metaelem, "size_y", text="Y")
- col.itemR(metaelem, "size_z", text="Z")
-
- elif metaelem.type == 'TUBE':
- col = split.column(align=True)
- col.itemL(text="Size:")
- col.itemR(metaelem, "size_x", text="X")
-
- elif metaelem.type == 'PLANE':
- col = split.column(align=True)
- col.itemL(text="Size:")
- col.itemR(metaelem, "size_x", text="X")
- col.itemR(metaelem, "size_y", text="Y")
-
- elif metaelem.type == 'ELLIPSOID':
- col = split.column(align=True)
- col.itemL(text="Size:")
- col.itemR(metaelem, "size_x", text="X")
- col.itemR(metaelem, "size_y", text="Y")
- col.itemR(metaelem, "size_z", text="Z")
-
-bpy.types.register(DATA_PT_context_metaball)
-bpy.types.register(DATA_PT_metaball)
-bpy.types.register(DATA_PT_metaball_element)
diff --git a/release/ui/buttons_data_modifier.py b/release/ui/buttons_data_modifier.py
deleted file mode 100644
index 754e8ce106e..00000000000
--- a/release/ui/buttons_data_modifier.py
+++ /dev/null
@@ -1,449 +0,0 @@
-
-import bpy
-
-class DataButtonsPanel(bpy.types.Panel):
- __space_type__ = 'PROPERTIES'
- __region_type__ = 'WINDOW'
- __context__ = "modifier"
-
-class DATA_PT_modifiers(DataButtonsPanel):
- __label__ = "Modifiers"
-
- def draw(self, context):
- layout = self.layout
-
- ob = context.object
-
- row = layout.row()
- row.item_menu_enumO("object.modifier_add", "type")
- row.itemL()
-
- for md in ob.modifiers:
- box = layout.template_modifier(md)
- if box:
- # match enum type to our functions, avoids a lookup table.
- getattr(self, md.type)(box, ob, md)
-
- # the mt.type enum is (ab)used for a lookup on function names
- # ...to avoid lengthy if statements
- # so each type must have a function here.
-
- def ARMATURE(self, layout, ob, md):
- layout.itemR(md, "object")
-
- split = layout.split(percentage=0.5)
- split.itemL(text="Vertex Group:")
- sub = split.split(percentage=0.7)
- sub.item_pointerR(md, "vertex_group", ob, "vertex_groups", text="")
- subsub = sub.row()
- subsub.active = md.vertex_group
- subsub.itemR(md, "invert")
-
- layout.itemS()
-
- split = layout.split()
-
- col = split.column()
- col.itemL(text="Bind To:")
- col.itemR(md, "use_vertex_groups", text="Vertex Groups")
- col.itemR(md, "use_bone_envelopes", text="Bone Envelopes")
-
- col = split.column()
- col.itemL(text="Deformation:")
- col.itemR(md, "quaternion")
- col.itemR(md, "multi_modifier")
-
- def ARRAY(self, layout, ob, md):
- layout.itemR(md, "fit_type")
- if md.fit_type == 'FIXED_COUNT':
- layout.itemR(md, "count")
- elif md.fit_type == 'FIT_LENGTH':
- layout.itemR(md, "length")
- elif md.fit_type == 'FIT_CURVE':
- layout.itemR(md, "curve")
-
- layout.itemS()
-
- split = layout.split()
-
- col = split.column()
- col.itemR(md, "constant_offset")
- sub = col.column()
- sub.active = md.constant_offset
- sub.itemR(md, "constant_offset_displacement", text="")
-
- col.itemS()
-
- col.itemR(md, "merge_adjacent_vertices", text="Merge")
- sub = col.column()
- sub.active = md.merge_adjacent_vertices
- sub.itemR(md, "merge_end_vertices", text="First Last")
- sub.itemR(md, "merge_distance", text="Distance")
-
- col = split.column()
- col.itemR(md, "relative_offset")
- sub = col.column()
- sub.active = md.relative_offset
- sub.itemR(md, "relative_offset_displacement", text="")
-
- col.itemS()
-
- col.itemR(md, "add_offset_object")
- sub = col.column()
- sub.active = md.add_offset_object
- sub.itemR(md, "offset_object", text="")
-
- layout.itemS()
-
- col = layout.column()
- col.itemR(md, "start_cap")
- col.itemR(md, "end_cap")
-
- def BEVEL(self, layout, ob, md):
- row = layout.row()
- row.itemR(md, "width")
- row.itemR(md, "only_vertices")
-
- layout.itemL(text="Limit Method:")
- layout.row().itemR(md, "limit_method", expand=True)
- if md.limit_method == 'ANGLE':
- layout.itemR(md, "angle")
- elif md.limit_method == 'WEIGHT':
- layout.row().itemR(md, "edge_weight_method", expand=True)
-
- def BOOLEAN(self, layout, ob, md):
- layout.itemR(md, "operation")
- layout.itemR(md, "object")
-
- def BUILD(self, layout, ob, md):
- split = layout.split()
-
- col = split.column()
- col.itemR(md, "start")
- col.itemR(md, "length")
-
- col = split.column()
- col.itemR(md, "randomize")
- sub = col.column()
- sub.active = md.randomize
- sub.itemR(md, "seed")
-
- def CAST(self, layout, ob, md):
- layout.itemR(md, "cast_type")
- layout.itemR(md, "object")
- if md.object:
- layout.itemR(md, "use_transform")
-
- flow = layout.column_flow()
- flow.itemR(md, "x")
- flow.itemR(md, "y")
- flow.itemR(md, "z")
- flow.itemR(md, "factor")
- flow.itemR(md, "radius")
- flow.itemR(md, "size")
-
- layout.itemR(md, "from_radius")
-
- layout.item_pointerR(md, "vertex_group", ob, "vertex_groups")
-
- def CLOTH(self, layout, ob, md):
- layout.itemL(text="See Cloth panel.")
-
- def COLLISION(self, layout, ob, md):
- layout.itemL(text="See Collision panel.")
-
- def CURVE(self, layout, ob, md):
- layout.itemR(md, "object")
- layout.item_pointerR(md, "vertex_group", ob, "vertex_groups")
- layout.itemR(md, "deform_axis")
-
- def DECIMATE(self, layout, ob, md):
- layout.itemR(md, "ratio")
- layout.itemR(md, "face_count")
-
- def DISPLACE(self, layout, ob, md):
- layout.item_pointerR(md, "vertex_group", ob, "vertex_groups")
- layout.itemR(md, "texture")
- layout.itemR(md, "midlevel")
- layout.itemR(md, "strength")
- layout.itemR(md, "direction")
- layout.itemR(md, "texture_coordinates")
- if md.texture_coordinates == 'OBJECT':
- layout.itemR(md, "texture_coordinate_object", text="Object")
- elif md.texture_coordinates == 'UV' and ob.type == 'MESH':
- layout.item_pointerR(md, "uv_layer", ob.data, "uv_textures")
-
- def EDGE_SPLIT(self, layout, ob, md):
- split = layout.split()
-
- col = split.column()
- col.itemR(md, "use_edge_angle", text="Edge Angle")
- sub = col.column()
- sub.active = md.use_edge_angle
- sub.itemR(md, "split_angle")
-
- col = split.column()
- col.itemR(md, "use_sharp", text="Sharp Edges")
-
- def EXPLODE(self, layout, ob, md):
- layout.item_pointerR(md, "vertex_group", ob, "vertex_groups")
- layout.itemR(md, "protect")
-
- flow = layout.column_flow(2)
- flow.itemR(md, "split_edges")
- flow.itemR(md, "unborn")
- flow.itemR(md, "alive")
- flow.itemR(md, "dead")
-
- layout.itemO("object.explode_refresh", text="Refresh");
-
- def FLUID_SIMULATION(self, layout, ob, md):
- layout.itemL(text="See Fluid panel.")
-
- def HOOK(self, layout, ob, md):
- col = layout.column()
- col.itemR(md, "object")
- if md.object and md.object.type == 'ARMATURE':
- layout.item_pointerR(md, "subtarget", md.object.data, "bones", text="Bone")
-
- layout.item_pointerR(md, "vertex_group", ob, "vertex_groups")
-
- split = layout.split()
- split.itemR(md, "falloff")
- split.itemR(md, "force", slider=True)
-
- layout.itemS()
-
- row = layout.row()
- row.itemO("object.hook_reset", text="Reset")
- row.itemO("object.hook_recenter", text="Recenter")
-
- if ob.mode == 'EDIT':
- row = layout.row()
- row.itemO("object.hook_select", text="Select")
- row.itemO("object.hook_assign", text="Assign")
-
- def LATTICE(self, layout, ob, md):
- layout.itemR(md, "object")
- layout.item_pointerR(md, "vertex_group", ob, "vertex_groups")
-
- def MASK(self, layout, ob, md):
- layout.itemR(md, "mode")
- if md.mode == 'ARMATURE':
- layout.itemR(md, "armature")
- elif md.mode == 'VERTEX_GROUP':
- layout.item_pointerR(md, "vertex_group", ob, "vertex_groups")
- layout.itemR(md, "inverse")
-
- def MESH_DEFORM(self, layout, ob, md):
- layout.itemR(md, "object")
- layout.item_pointerR(md, "vertex_group", ob, "vertex_groups")
- layout.itemR(md, "invert")
-
- layout.itemS()
-
- if md.is_bound:
- layout.itemO("object.meshdeform_bind", text="Unbind")
- else:
- layout.itemO("object.meshdeform_bind", text="Bind")
- row = layout.row()
- row.itemR(md, "precision")
- row.itemR(md, "dynamic")
-
- def MIRROR(self, layout, ob, md):
- layout.itemR(md, "merge_limit")
- split = layout.split()
-
- col = split.column()
- col.itemR(md, "x")
- col.itemR(md, "y")
- col.itemR(md, "z")
-
- col = split.column()
- col.itemL(text="Textures:")
- col.itemR(md, "mirror_u")
- col.itemR(md, "mirror_v")
-
- col = split.column()
- col.itemR(md, "clip", text="Do Clipping")
- col.itemR(md, "mirror_vertex_groups", text="Vertex Group")
-
- layout.itemR(md, "mirror_object")
-
- def MULTIRES(self, layout, ob, md):
- layout.itemR(md, "subdivision_type")
-
- row = layout.row()
- row.itemO("object.multires_subdivide", text="Subdivide")
- row.itemO("object.multires_higher_levels_delete", text="Delete Higher")
-
- layout.itemR(md, "level")
-
- def PARTICLE_INSTANCE(self, layout, ob, md):
- layout.itemR(md, "object")
- layout.itemR(md, "particle_system_number")
-
- flow = layout.column_flow()
- flow.itemR(md, "normal")
- flow.itemR(md, "children")
- flow.itemR(md, "size")
- flow.itemR(md, "path")
- if md.path:
- flow.itemR(md, "keep_shape")
- flow.itemR(md, "unborn")
- flow.itemR(md, "alive")
- flow.itemR(md, "dead")
- flow.itemL(md, "")
- if md.path:
- flow.itemR(md, "axis", text="")
-
- if md.path:
- row = layout.row()
- row.itemR(md, "position", slider=True)
- row.itemR(md, "random_position", text = "Random", slider=True)
-
- def PARTICLE_SYSTEM(self, layout, ob, md):
- layout.itemL(text="See Particle panel.")
-
- def SHRINKWRAP(self, layout, ob, md):
- layout.itemR(md, "target")
- layout.item_pointerR(md, "vertex_group", ob, "vertex_groups")
- 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")
-
- flow = layout.column_flow()
- flow.itemR(md, "negative")
- flow.itemR(md, "positive")
- flow.itemR(md, "cull_front_faces")
- flow.itemR(md, "cull_back_faces")
- elif md.mode == 'NEAREST_SURFACEPOINT':
- layout.itemR(md, "keep_above_surface")
-
- def SIMPLE_DEFORM(self, layout, ob, md):
- layout.itemR(md, "mode")
- layout.item_pointerR(md, "vertex_group", ob, "vertex_groups")
- 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 SMOKE(self, layout, ob, md):
- layout.itemL(text="See Smoke panel.")
-
- def SMOOTH(self, layout, ob, md):
- split = layout.split()
-
- col = split.column()
- col.itemR(md, "x")
- col.itemR(md, "y")
- col.itemR(md, "z")
-
- col = split.column()
- col.itemR(md, "factor")
- col.itemR(md, "repeat")
-
- layout.item_pointerR(md, "vertex_group", ob, "vertex_groups")
-
- def SOFT_BODY(self, layout, ob, md):
- layout.itemL(text="See Soft Body panel.")
-
- def SUBSURF(self, layout, ob, md):
- layout.row().itemR(md, "subdivision_type", expand=True)
-
- flow = layout.column_flow()
- flow.itemR(md, "levels", text="Preview")
- flow.itemR(md, "render_levels", text="Render")
- flow.itemR(md, "optimal_draw", text="Optimal Display")
- flow.itemR(md, "subsurf_uv")
-
- def SURFACE(self, layout, ob, md):
- layout.itemL(text="See Fields panel.")
-
- def UV_PROJECT(self, layout, ob, md):
- if ob.type == 'MESH':
- layout.item_pointerR(md, "uv_layer", ob.data, "uv_textures")
- layout.itemR(md, "image")
- layout.itemR(md, "override_image")
-
- split = layout.split()
-
- col = split.column()
- col.itemL(text="Aspect Ratio:")
-
- sub = col.column(align=True)
- sub.itemR(md, "horizontal_aspect_ratio", text="Horizontal")
- sub.itemR(md, "vertical_aspect_ratio", text="Vertical")
-
- col = split.column()
- col.itemL(text="Projectors:")
-
- sub = col.column(align=True)
- sub.itemR(md, "num_projectors", text="Number")
- for proj in md.projectors:
- sub.itemR(proj, "object", text="")
-
- def WAVE(self, layout, ob, md):
- split = layout.split()
-
- col = split.column()
- col.itemL(text="Motion:")
- col.itemR(md, "x")
- col.itemR(md, "y")
- col.itemR(md, "cyclic")
-
- col = split.column()
- col.itemR(md, "normals")
- sub = col.column()
- sub.active = md.normals
- sub.itemR(md, "x_normal", text="X")
- sub.itemR(md, "y_normal", text="Y")
- sub.itemR(md, "z_normal", text="Z")
-
- split = layout.split()
-
- col = split.column()
- col.itemL(text="Time:")
- sub = col.column(align=True)
- sub.itemR(md, "time_offset", text="Offset")
- sub.itemR(md, "lifetime", text="Life")
- col.itemR(md, "damping_time", text="Damping")
-
- col = split.column()
- col.itemL(text="Position:")
- sub = col.column(align=True)
- sub.itemR(md, "start_position_x", text="X")
- sub.itemR(md, "start_position_y", text="Y")
- col.itemR(md, "falloff_radius", text="Falloff")
-
- layout.itemS()
-
- layout.itemR(md, "start_position_object")
- layout.item_pointerR(md, "vertex_group", ob, "vertex_groups")
- layout.itemR(md, "texture")
- layout.itemR(md, "texture_coordinates")
- if md.texture_coordinates == 'MAP_UV' and ob.type == 'MESH':
- layout.item_pointerR(md, "uv_layer", ob.data, "uv_textures")
- elif md.texture_coordinates == 'OBJECT':
- layout.itemR(md, "texture_coordinates_object")
-
- layout.itemS()
-
- flow = layout.column_flow()
- flow.itemR(md, "speed", slider=True)
- flow.itemR(md, "height", slider=True)
- flow.itemR(md, "width", slider=True)
- flow.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
deleted file mode 100644
index 0d46d5f8a0d..00000000000
--- a/release/ui/buttons_data_text.py
+++ /dev/null
@@ -1,179 +0,0 @@
-
-import bpy
-
-class DataButtonsPanel(bpy.types.Panel):
- __space_type__ = 'PROPERTIES'
- __region_type__ = 'WINDOW'
- __context__ = "data"
-
- def poll(self, context):
- return (context.object and context.object.type == 'TEXT' and context.curve)
-
-class DATA_PT_context_text(DataButtonsPanel):
- __show_header__ = False
-
- def draw(self, context):
- layout = self.layout
-
- ob = context.object
- curve = context.curve
- space = context.space_data
-
- split = layout.split(percentage=0.65)
-
- if ob:
- split.template_ID(ob, "data")
- split.itemS()
- elif curve:
- split.template_ID(space, "pin_id")
- split.itemS()
-
-class DATA_PT_shape_text(DataButtonsPanel):
- __label__ = "Shape Text"
-
- def draw(self, context):
- layout = self.layout
-
- ob = context.object
- curve = context.curve
- space = context.space_data
-
- split = layout.split()
-
- col = split.column()
- col.itemL(text="Caps:")
- row = col.row()
- row .itemR(curve, "front")
- row .itemR(curve, "back")
- # col = split.column()
- col.itemL(text="Textures:")
- col.itemR(curve, "uv_orco")
- col.itemR(curve, "auto_texspace")
-
- col = split.column()
- col.itemL(text="Resolution:")
- sub = col.column(align=True)
- sub.itemR(curve, "resolution_u", text="Preview")
- sub.itemR(curve, "render_resolution_u", text="Render")
-
- # resolution_v is not used for text
-
- sub = col.column(align=True)
- col.itemL(text="Display:")
- col.itemR(curve, "fast", text="Fast Editing")
-
-class DATA_PT_geometry_text(DataButtonsPanel):
- __label__ = "Geometry"
-
- def draw(self, context):
- layout = self.layout
-
- curve = context.curve
-
- split = layout.split()
-
- col = split.column()
- col.itemL(text="Modification:")
- col.itemR(curve, "width")
- col.itemR(curve, "extrude")
- col.itemL(text="Taper Object:")
- col.itemR(curve, "taper_object", text="")
-
- col = split.column()
- col.itemL(text="Bevel:")
- col.itemR(curve, "bevel_depth", text="Depth")
- col.itemR(curve, "bevel_resolution", text="Resolution")
- col.itemL(text="Bevel Object:")
- col.itemR(curve, "bevel_object", text="")
-
-class DATA_PT_font(DataButtonsPanel):
- __label__ = "Font"
-
- def draw(self, context):
- layout = self.layout
-
- text = context.curve
- char = context.curve.edit_format
-
- layout.itemR(text, "font")
-
- row = layout.row()
- row.itemR(text, "text_size", text="Size")
- row.itemR(text, "shear")
-
- split = layout.split()
-
- col = split.column()
- col.itemL(text="Object Font:")
- col.itemR(text, "family", text="")
-
- col = split.column()
- col.itemL(text="Text on Curve:")
- col.itemR(text, "text_on_curve", text="")
-
- split = layout.split()
-
- col = split.column()
- col.itemL(text="Character:")
- col.itemR(char, "bold")
- col.itemR(char, "italic")
- col.itemR(char, "underline")
-# col.itemR(char, "style")
-# col.itemR(char, "wrap")
-
- col = split.column(align=True)
- col.itemL(text="Underline:")
- col.itemR(text, "ul_position", text="Position")
- col.itemR(text, "ul_height", text="Thickness")
-
-class DATA_PT_paragraph(DataButtonsPanel):
- __label__ = "Paragraph"
-
- def draw(self, context):
- layout = self.layout
-
- text = context.curve
-
- layout.itemL(text="Align:")
- layout.itemR(text, "spacemode", expand=True)
-
- split = layout.split()
-
- col = split.column(align=True)
- col.itemL(text="Spacing:")
- col.itemR(text, "spacing", text="Character")
- col.itemR(text, "word_spacing", text="Word")
- col.itemR(text, "line_dist", text="Line")
-
- col = split.column(align=True)
- col.itemL(text="Offset:")
- col.itemR(text, "offset_x", text="X")
- col.itemR(text, "offset_y", text="Y")
-
-class DATA_PT_textboxes(DataButtonsPanel):
- __label__ = "Text Boxes"
-
- def draw(self, context):
- layout = self.layout
-
- text = context.curve
-
- for box in text.textboxes:
- split = layout.box().split()
-
- col = split.column(align=True)
- col.itemL(text="Dimensions:")
- col.itemR(box, "width", text="Width")
- col.itemR(box, "height", text="Height")
-
- col = split.column(align=True)
- col.itemL(text="Offset:")
- col.itemR(box, "x", text="X")
- col.itemR(box, "y", text="Y")
-
-bpy.types.register(DATA_PT_context_text)
-bpy.types.register(DATA_PT_shape_text)
-bpy.types.register(DATA_PT_geometry_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_game.py b/release/ui/buttons_game.py
deleted file mode 100644
index 5f5d4f916d0..00000000000
--- a/release/ui/buttons_game.py
+++ /dev/null
@@ -1,416 +0,0 @@
-
-import bpy
-
-class PhysicsButtonsPanel(bpy.types.Panel):
- __space_type__ = 'PROPERTIES'
- __region_type__ = 'WINDOW'
- __context__ = "physics"
-
- def poll(self, context):
- ob = context.active_object
- rd = context.scene.render_data
- return ob and ob.game and (rd.engine == 'BLENDER_GAME')
-
-class PHYSICS_PT_game_physics(PhysicsButtonsPanel):
- __label__ = "Physics"
-
- def draw(self, context):
- layout = self.layout
-
- ob = context.active_object
- game = ob.game
- soft = ob.game.soft_body
-
- layout.itemR(game, "physics_type")
- layout.itemS()
-
- #if game.physics_type == 'DYNAMIC':
- if game.physics_type in ('DYNAMIC', 'RIGID_BODY'):
- split = layout.split()
-
- col = split.column()
- col.itemR(game, "actor")
- col.itemR(game, "ghost")
- col.itemR(ob, "restrict_render", text="Invisible") # out of place but useful
-
- col = split.column()
- col.itemR(game, "material_physics")
- col.itemR(game, "rotate_from_normal")
- col.itemR(game, "no_sleeping")
-
- layout.itemS()
-
- split = layout.split()
-
- col = split.column()
- col.itemL(text="Attributes:")
- col.itemR(game, "mass")
- col.itemR(game, "radius")
- col.itemR(game, "form_factor")
-
- col = split.column()
- sub = col.column()
- sub.active = (game.physics_type == 'RIGID_BODY')
- sub.itemR(game, "anisotropic_friction")
- subsub = sub.column()
- subsub.active = game.anisotropic_friction
- subsub.itemR(game, "friction_coefficients", text="", slider=True)
-
- split = layout.split()
-
- col = split.column()
- col.itemL(text="Velocity:")
- sub = col.column(align=True)
- sub.itemR(game, "minimum_velocity", text="Minimum")
- sub.itemR(game, "maximum_velocity", text="Maximum")
-
- col = split.column()
- col.itemL(text="Damping:")
- sub = col.column(align=True)
- sub.itemR(game, "damping", text="Translation", slider=True)
- sub.itemR(game, "rotation_damping", text="Rotation", slider=True)
-
- layout.itemS()
-
- split = layout.split()
-
- col = split.column()
- col.itemL(text="Lock Translation:")
- col.itemR(game, "lock_x_axis", text="X")
- col.itemR(game, "lock_y_axis", text="Y")
- col.itemR(game, "lock_z_axis", text="Z")
-
- col = split.column()
- col.itemL(text="Lock Rotation:")
- col.itemR(game, "lock_x_rot_axis", text="X")
- col.itemR(game, "lock_y_rot_axis", text="Y")
- col.itemR(game, "lock_z_rot_axis", text="Z")
-
- elif game.physics_type == 'SOFT_BODY':
- col = layout.column()
- col.itemR(game, "actor")
- col.itemR(game, "ghost")
- col.itemR(ob, "restrict_render", text="Invisible")
-
- layout.itemS()
-
- split = layout.split()
-
- col = split.column()
- col.itemL(text="Attributes:")
- col.itemR(game, "mass")
- col.itemR(soft, "welding")
- col.itemR(soft, "position_iterations")
- col.itemR(soft, "linstiff", slider=True)
- col.itemR(soft, "dynamic_friction", slider=True)
- col.itemR(soft, "margin", slider=True)
- col.itemR(soft, "bending_const", text="Bending Constraints")
-
- col = split.column()
- col.itemR(soft, "shape_match")
- sub = col.column()
- sub.active = soft.shape_match
- sub.itemR(soft, "threshold", slider=True)
-
- col.itemS()
-
- col.itemL(text="Cluster Collision:")
- col.itemR(soft, "cluster_rigid_to_softbody")
- col.itemR(soft, "cluster_soft_to_softbody")
- sub = col.column()
- sub.active = (soft.cluster_rigid_to_softbody or soft.cluster_soft_to_softbody)
- sub.itemR(soft, "cluster_iterations", text="Iterations")
-
- elif game.physics_type == 'STATIC':
- col = layout.column()
- col.itemR(game, "actor")
- col.itemR(game, "ghost")
- col.itemR(ob, "restrict_render", text="Invisible")
-
- elif game.physics_type in ('SENSOR', 'INVISIBLE', 'NO_COLLISION', 'OCCLUDE'):
- layout.itemR(ob, "restrict_render", text="Invisible")
-
-class PHYSICS_PT_game_collision_bounds(PhysicsButtonsPanel):
- __label__ = "Collision Bounds"
-
- def poll(self, context):
- game = context.object.game
- rd = context.scene.render_data
- return (game.physics_type in ('DYNAMIC', 'RIGID_BODY', 'SENSOR', 'SOFT_BODY', 'STATIC')) and (rd.engine == 'BLENDER_GAME')
-
- def draw_header(self, context):
- game = context.active_object.game
-
- self.layout.itemR(game, "use_collision_bounds", text="")
-
- def draw(self, context):
- layout = self.layout
-
- game = context.active_object.game
-
- layout.active = game.use_collision_bounds
- layout.itemR(game, "collision_bounds", text="Bounds")
-
- row = layout.row()
- row.itemR(game, "collision_compound", text="Compound")
- row.itemR(game, "collision_margin", text="Margin", slider=True)
-
-bpy.types.register(PHYSICS_PT_game_physics)
-bpy.types.register(PHYSICS_PT_game_collision_bounds)
-
-class SceneButtonsPanel(bpy.types.Panel):
- __space_type__ = 'PROPERTIES'
- __region_type__ = 'WINDOW'
- __context__ = "scene"
-
- def poll(self, context):
- rd = context.scene.render_data
- return (rd.engine == 'BLENDER_GAME')
-
-class SCENE_PT_game(SceneButtonsPanel):
- __label__ = "Game"
-
- def draw(self, context):
- layout = self.layout
-
- row = layout.row()
- row.itemO("view3d.game_start", text="Start")
- row.itemL()
-
-class SCENE_PT_game_player(SceneButtonsPanel):
- __label__ = "Standalone Player"
-
- def draw(self, context):
- layout = self.layout
-
- gs = context.scene.game_data
-
- layout.itemR(gs, "fullscreen")
-
- split = layout.split()
-
- col = split.column()
- col.itemL(text="Resolution:")
- sub = col.column(align=True)
- sub.itemR(gs, "resolution_x", slider=False, text="X")
- sub.itemR(gs, "resolution_y", slider=False, text="Y")
-
- col = split.column()
- col.itemL(text="Quality:")
- sub = col.column(align=True)
- sub.itemR(gs, "depth", text="Bit Depth", slider=False)
- sub.itemR(gs, "frequency", text="FPS", slider=False)
-
- # framing:
- col = layout.column()
- col.itemL(text="Framing:")
- col.row().itemR(gs, "framing_type", expand=True)
- if gs.framing_type == 'LETTERBOX':
- col.itemR(gs, "framing_color", text="")
-
-class SCENE_PT_game_stereo(SceneButtonsPanel):
- __label__ = "Stereo"
-
- def draw(self, context):
- layout = self.layout
-
- gs = context.scene.game_data
- stereo_mode = gs.stereo
-
- # stereo options:
- layout.itemR(gs, "stereo", expand=True)
-
- # stereo:
- if stereo_mode == 'STEREO':
- layout.itemR(gs, "stereo_mode")
- layout.itemL(text="To do: Focal Length")
- layout.itemL(text="To do: Eye Separation")
-
- # dome:
- elif stereo_mode == 'DOME':
- layout.itemR(gs, "dome_mode", text="Dome Type")
-
- dome_type = gs.dome_mode
-
- split=layout.split()
-
- if dome_type == 'FISHEYE' or \
- dome_type == 'TRUNCATED_REAR' or \
- dome_type == 'TRUNCATED_FRONT':
-
- col=split.column()
- col.itemR(gs, "dome_angle", slider=True)
- col.itemR(gs, "dome_tilt")
-
- col=split.column()
- col.itemR(gs, "dome_tesselation", text="Tesselation")
- col.itemR(gs, "dome_buffer_resolution", text="Resolution", slider=True)
-
- elif dome_type == 'PANORAM_SPH':
- col=split.column()
- col.itemR(gs, "dome_tesselation", text="Tesselation")
- col.itemR(gs, "dome_buffer_resolution", text="Resolution", slider=True)
-
- else: # cube map
- col=split.column()
- col.itemR(gs, "dome_buffer_resolution", text="Resolution", slider=True)
-
- layout.itemR(gs, "dome_text")
-
-class SCENE_PT_game_shading(SceneButtonsPanel):
- __label__ = "Shading"
-
- def draw(self, context):
- layout = self.layout
-
- gs = context.scene.game_data
- layout.itemR(gs, "material_mode", expand=True)
-
- if gs.material_mode == 'GLSL':
- split = layout.split()
-
- col = split.column()
- col.itemR(gs, "glsl_lights", text="Lights")
- col.itemR(gs, "glsl_shaders", text="Shaders")
- col.itemR(gs, "glsl_shadows", text="Shadows")
-
- col = split.column()
- col.itemR(gs, "glsl_ramps", text="Ramps")
- col.itemR(gs, "glsl_nodes", text="Nodes")
- col.itemR(gs, "glsl_extra_textures", text="Extra Textures")
-
-class SCENE_PT_game_performance(SceneButtonsPanel):
- __label__ = "Performance"
-
- def draw(self, context):
- layout = self.layout
-
- gs = context.scene.game_data
-
- split = layout.split()
-
- col = split.column()
- col.itemL(text="Show:")
- col.itemR(gs, "show_debug_properties", text="Debug Properties")
- col.itemR(gs, "show_framerate_profile", text="Framerate and Profile")
- col.itemR(gs, "show_physics_visualization", text="Physics Visualization")
- col.itemR(gs, "deprecation_warnings")
-
- col = split.column()
- col.itemL(text="Render:")
- col.itemR(gs, "all_frames")
- col.itemR(gs, "display_lists")
-
-class SCENE_PT_game_sound(SceneButtonsPanel):
- __label__ = "Sound"
-
- def draw(self, context):
- layout = self.layout
-
- scene = context.scene
-
- layout.itemR(scene, "distance_model")
- layout.itemR(scene, "speed_of_sound", text="Speed")
- layout.itemR(scene, "doppler_factor")
-
-bpy.types.register(SCENE_PT_game)
-bpy.types.register(SCENE_PT_game_player)
-bpy.types.register(SCENE_PT_game_stereo)
-bpy.types.register(SCENE_PT_game_shading)
-bpy.types.register(SCENE_PT_game_performance)
-bpy.types.register(SCENE_PT_game_sound)
-
-class WorldButtonsPanel(bpy.types.Panel):
- __space_type__ = 'PROPERTIES'
- __region_type__ = 'WINDOW'
- __context__ = "world"
-
- def poll(self, context):
- rd = context.scene.render_data
- return (rd.engine == 'BLENDER_GAME')
-
-class WORLD_PT_game_context_world(WorldButtonsPanel):
- __show_header__ = False
-
- def poll(self, context):
- rd = context.scene.render_data
- return (context.scene) and (rd.use_game_engine)
-
- def draw(self, context):
- layout = self.layout
-
- scene = context.scene
- world = context.world
- space = context.space_data
-
- split = layout.split(percentage=0.65)
-
- if scene:
- split.template_ID(scene, "world", new="world.new")
- elif world:
- split.template_ID(space, "pin_id")
-
-class WORLD_PT_game_world(WorldButtonsPanel):
- __label__ = "World"
-
- def draw(self, context):
- layout = self.layout
-
- world = context.world
-
- row = layout.row()
- row.column().itemR(world, "horizon_color")
- row.column().itemR(world, "ambient_color")
-
- layout.itemR(world.mist, "enabled", text="Mist")
-
- row = layout.column_flow()
- row.active = world.mist.enabled
- row.itemR(world.mist, "start")
- row.itemR(world.mist, "depth")
-
-class WORLD_PT_game_physics(WorldButtonsPanel):
- __label__ = "Physics"
-
- def draw(self, context):
- layout = self.layout
-
- gs = context.scene.game_data
-
- layout.itemR(gs, "physics_engine")
- if gs.physics_engine != 'NONE':
- layout.itemR(gs, "physics_gravity", text="Gravity")
-
- split = layout.split()
-
- col = split.column()
- col.itemL(text="Physics Steps:")
- sub = col.column(align=True)
- sub.itemR(gs, "physics_step_max", text="Max")
- sub.itemR(gs, "physics_step_sub", text="Substeps")
- col.itemR(gs, "fps", text="FPS")
-
- col = split.column()
- col.itemL(text="Logic Steps:")
- col.itemR(gs, "logic_step_max", text="Max")
-
- col = layout.column()
- col.itemR(gs, "use_occlusion_culling", text="Occlusion Culling")
- sub = col.column()
- sub.active = gs.use_occlusion_culling
- sub.itemR(gs, "occlusion_culling_resolution", text="Resolution")
-
- else:
- split = layout.split()
-
- col = split.column()
- col.itemL(text="Physics Steps:")
- col.itemR(gs, "fps", text="FPS")
-
- col = split.column()
- col.itemL(text="Logic Steps:")
- col.itemR(gs, "logic_step_max", text="Max")
-
-bpy.types.register(WORLD_PT_game_context_world)
-bpy.types.register(WORLD_PT_game_world)
-bpy.types.register(WORLD_PT_game_physics)
diff --git a/release/ui/buttons_material.py b/release/ui/buttons_material.py
deleted file mode 100644
index 448cb36e130..00000000000
--- a/release/ui/buttons_material.py
+++ /dev/null
@@ -1,708 +0,0 @@
-
-import bpy
-
-class MaterialButtonsPanel(bpy.types.Panel):
- __space_type__ = 'PROPERTIES'
- __region_type__ = 'WINDOW'
- __context__ = "material"
- # COMPAT_ENGINES must be defined in each subclass, external engines can add themselves here
-
- def poll(self, context):
- mat = context.material
- engine = context.scene.render_data.engine
- return mat and (engine in self.COMPAT_ENGINES)
-
-class MATERIAL_PT_preview(MaterialButtonsPanel):
- __label__ = "Preview"
- COMPAT_ENGINES = set(['BLENDER_RENDER', 'BLENDER_GAME'])
-
- def draw(self, context):
- self.layout.template_preview(context.material)
-
-class MATERIAL_PT_context_material(MaterialButtonsPanel):
- __show_header__ = False
- COMPAT_ENGINES = set(['BLENDER_RENDER', 'BLENDER_GAME'])
-
- def poll(self, context):
- # An exception, dont call the parent poll func because
- # this manages materials for all engine types
-
- engine = context.scene.render_data.engine
- return (context.material or context.object) and (engine in self.COMPAT_ENGINES)
-
- def draw(self, context):
- layout = self.layout
-
- mat = context.material
- ob = context.object
- slot = context.material_slot
- space = context.space_data
-
- if ob:
- row = layout.row()
-
- row.template_list(ob, "materials", ob, "active_material_index", rows=2)
-
- col = row.column(align=True)
- col.itemO("object.material_slot_add", icon='ICON_ZOOMIN', text="")
- col.itemO("object.material_slot_remove", icon='ICON_ZOOMOUT', text="")
-
- if ob.mode == 'EDIT':
- row = layout.row(align=True)
- row.itemO("object.material_slot_assign", text="Assign")
- row.itemO("object.material_slot_select", text="Select")
- row.itemO("object.material_slot_deselect", text="Deselect")
-
- split = layout.split(percentage=0.65)
-
- if ob:
- split.template_ID(ob, "active_material", new="material.new")
- row = split.row()
- if slot:
- row.itemR(slot, "link", text="")
- else:
- row.itemL()
- elif mat:
- split.template_ID(space, "pin_id")
- split.itemS()
-
- if mat:
- layout.itemR(mat, "type", expand=True)
-
-class MATERIAL_PT_shading(MaterialButtonsPanel):
- __label__ = "Shading"
- COMPAT_ENGINES = set(['BLENDER_RENDER', 'BLENDER_GAME'])
-
- def poll(self, context):
- mat = context.material
- engine = context.scene.render_data.engine
- return mat and (mat.type in ('SURFACE', 'WIRE', 'HALO')) and (engine in self.COMPAT_ENGINES)
-
- def draw(self, context):
- layout = self.layout
-
- mat = context.material
-
- if mat.type in ('SURFACE', 'WIRE'):
- split = layout.split()
-
- col = split.column()
- sub = col.column()
- sub.active = not mat.shadeless
- sub.itemR(mat, "emit")
- sub.itemR(mat, "ambient")
- sub = col.column()
- sub.itemR(mat, "translucency")
-
- col = split.column()
- col.itemR(mat, "shadeless")
- sub = col.column()
- sub.active = not mat.shadeless
- sub.itemR(mat, "tangent_shading")
- sub.itemR(mat, "cubic")
-
- elif mat.type == 'HALO':
- layout.itemR(mat, "alpha")
-
-class MATERIAL_PT_strand(MaterialButtonsPanel):
- __label__ = "Strand"
- __default_closed__ = True
- COMPAT_ENGINES = set(['BLENDER_RENDER'])
-
- def poll(self, context):
- mat = context.material
- engine = context.scene.render_data.engine
- return mat and (mat.type in ('SURFACE', 'WIRE', 'HALO')) and (engine in self.COMPAT_ENGINES)
-
- def draw(self, context):
- layout = self.layout
-
- mat = context.material
- tan = mat.strand
-
- split = layout.split()
-
- col = split.column(align=True)
- col.itemL(text="Size:")
- col.itemR(tan, "root_size", text="Root")
- col.itemR(tan, "tip_size", text="Tip")
- col.itemR(tan, "min_size", text="Minimum")
- col.itemR(tan, "blender_units")
- sub = col.column()
- sub.active = (not mat.shadeless)
- sub.itemR(tan, "tangent_shading")
- col.itemR(tan, "shape")
-
- col = split.column()
- col.itemL(text="Shading:")
- col.itemR(tan, "width_fade")
- col.itemR(tan, "uv_layer")
- col.itemS()
- sub = col.column()
- sub.active = (not mat.shadeless)
- sub.itemR(tan, "surface_diffuse")
- sub = col.column()
- sub.active = tan.surface_diffuse
- sub.itemR(tan, "blend_distance", text="Distance")
-
-class MATERIAL_PT_physics(MaterialButtonsPanel):
- __label__ = "Physics"
- COMPAT_ENGINES = set(['BLENDER_GAME'])
-
- def draw(self, context):
- layout = self.layout
-
- phys = context.material.physics
-
- split = layout.split()
-
- col = split.column()
- col.itemR(phys, "distance")
- col.itemR(phys, "friction")
- col.itemR(phys, "align_to_normal")
-
- col = split.column()
- col.itemR(phys, "force", slider=True)
- col.itemR(phys, "elasticity", slider=True)
- col.itemR(phys, "damp", slider=True)
-
-class MATERIAL_PT_options(MaterialButtonsPanel):
- __label__ = "Options"
- COMPAT_ENGINES = set(['BLENDER_RENDER', 'BLENDER_GAME'])
-
- def poll(self, context):
- mat = context.material
- engine = context.scene.render_data.engine
- return mat and (mat.type in ('SURFACE', 'WIRE', 'HALO')) and (engine in self.COMPAT_ENGINES)
-
- def draw(self, context):
- layout = self.layout
-
- mat = context.material
-
- split = layout.split()
-
- col = split.column()
- col.itemR(mat, "traceable")
- col.itemR(mat, "full_oversampling")
- col.itemR(mat, "sky")
- col.itemR(mat, "exclude_mist")
- col.itemR(mat, "invert_z")
- sub = col.column(align=True)
- sub.itemL(text="Light Group:")
- sub.itemR(mat, "light_group", text="")
- row = sub.row()
- row.active = mat.light_group
- row.itemR(mat, "light_group_exclusive", text="Exclusive")
-
- col = split.column()
- col.itemR(mat, "face_texture")
- sub = col.column()
- sub.active = mat.face_texture
- sub.itemR(mat, "face_texture_alpha")
- col.itemS()
- col.itemR(mat, "vertex_color_paint")
- col.itemR(mat, "vertex_color_light")
- col.itemR(mat, "object_color")
-
-class MATERIAL_PT_shadow(MaterialButtonsPanel):
- __label__ = "Shadow"
- __default_closed__ = True
- COMPAT_ENGINES = set(['BLENDER_RENDER', 'BLENDER_GAME'])
-
- def poll(self, context):
- mat = context.material
- engine = context.scene.render_data.engine
- return mat and (mat.type in ('SURFACE', 'WIRE')) and (engine in self.COMPAT_ENGINES)
-
- def draw(self, context):
- layout = self.layout
-
- mat = context.material
-
- split = layout.split()
-
- col = split.column()
- col.itemR(mat, "shadows", text="Receive")
- col.itemR(mat, "receive_transparent_shadows", text="Receive Transparent")
- col.itemR(mat, "only_shadow", text="Shadows Only")
- col.itemR(mat, "cast_shadows_only", text="Cast Only")
- col.itemR(mat, "shadow_casting_alpha", text="Casting Alpha")
-
- col = split.column()
- col.itemR(mat, "cast_buffer_shadows")
- sub = col.column()
- sub.active = mat.cast_buffer_shadows
- sub.itemR(mat, "shadow_buffer_bias", text="Buffer Bias")
- col.itemR(mat, "ray_shadow_bias", text="Auto Ray Bias")
- sub = col.column()
- sub.active = (not mat.ray_shadow_bias)
- sub.itemR(mat, "shadow_ray_bias", text="Ray Bias")
-
-class MATERIAL_PT_diffuse(MaterialButtonsPanel):
- __label__ = "Diffuse"
- COMPAT_ENGINES = set(['BLENDER_RENDER', 'BLENDER_GAME'])
-
- def poll(self, context):
- mat = context.material
- engine = context.scene.render_data.engine
- return mat and (mat.type in ('SURFACE', 'WIRE')) and (engine in self.COMPAT_ENGINES)
-
- def draw(self, context):
- layout = self.layout
-
- mat = context.material
-
- split = layout.split()
-
- col = split.column()
- col.itemR(mat, "diffuse_color", text="")
- sub = col.column()
- sub.active = (not mat.shadeless)
- sub.itemR(mat, "diffuse_intensity", text="Intensity")
-
- col = split.column()
- col.active = (not mat.shadeless)
- col.itemR(mat, "diffuse_shader", text="")
- col.itemR(mat, "use_diffuse_ramp", text="Ramp")
-
- col = layout.column()
- col.active = (not mat.shadeless)
- if mat.diffuse_shader == 'OREN_NAYAR':
- col.itemR(mat, "roughness")
- elif mat.diffuse_shader == 'MINNAERT':
- col.itemR(mat, "darkness")
- elif mat.diffuse_shader == 'TOON':
- row = col.row()
- row.itemR(mat, "diffuse_toon_size", text="Size")
- row.itemR(mat, "diffuse_toon_smooth", text="Smooth")
- elif mat.diffuse_shader == 'FRESNEL':
- row = col.row()
- row.itemR(mat, "diffuse_fresnel", text="Fresnel")
- row.itemR(mat, "diffuse_fresnel_factor", text="Factor")
-
- if mat.use_diffuse_ramp:
- layout.itemS()
- layout.template_color_ramp(mat, "diffuse_ramp", expand=True)
- layout.itemS()
- row = layout.row()
- split = row.split(percentage=0.3)
- split.itemL(text="Input:")
- split.itemR(mat, "diffuse_ramp_input", text="")
- split = row.split(percentage=0.3)
- split.itemL(text="Blend:")
- split.itemR(mat, "diffuse_ramp_blend", text="")
-
-class MATERIAL_PT_specular(MaterialButtonsPanel):
- __label__ = "Specular"
- COMPAT_ENGINES = set(['BLENDER_RENDER', 'BLENDER_GAME'])
-
- def poll(self, context):
- mat = context.material
- engine = context.scene.render_data.engine
- return mat and (mat.type in ('SURFACE', 'WIRE')) and (engine in self.COMPAT_ENGINES)
-
- def draw(self, context):
- layout = self.layout
-
- mat = context.material
-
- layout.active = (not mat.shadeless)
-
- split = layout.split()
-
- col = split.column()
- col.itemR(mat, "specular_color", text="")
- col.itemR(mat, "specular_intensity", text="Intensity")
-
- col = split.column()
- col.itemR(mat, "specular_shader", text="")
- col.itemR(mat, "use_specular_ramp", text="Ramp")
-
- col = layout.column()
- if mat.specular_shader in ('COOKTORR', 'PHONG'):
- col.itemR(mat, "specular_hardness", text="Hardness")
- elif mat.specular_shader == 'BLINN':
- row = col.row()
- row.itemR(mat, "specular_hardness", text="Hardness")
- row.itemR(mat, "specular_ior", text="IOR")
- elif mat.specular_shader == 'WARDISO':
- col.itemR(mat, "specular_slope", text="Slope")
- elif mat.specular_shader == 'TOON':
- row = col.row()
- row.itemR(mat, "specular_toon_size", text="Size")
- row.itemR(mat, "specular_toon_smooth", text="Smooth")
-
- if mat.use_specular_ramp:
- layout.itemS()
- layout.template_color_ramp(mat, "specular_ramp", expand=True)
- layout.itemS()
- row = layout.row()
- split = row.split(percentage=0.3)
- split.itemL(text="Input:")
- split.itemR(mat, "specular_ramp_input", text="")
- split = row.split(percentage=0.3)
- split.itemL(text="Blend:")
- split.itemR(mat, "specular_ramp_blend", text="")
-
-class MATERIAL_PT_sss(MaterialButtonsPanel):
- __label__ = "Subsurface Scattering"
- __default_closed__ = True
- COMPAT_ENGINES = set(['BLENDER_RENDER'])
-
- def poll(self, context):
- mat = context.material
- engine = context.scene.render_data.engine
- return mat and (mat.type in ('SURFACE', 'WIRE')) and (engine in self.COMPAT_ENGINES)
-
- def draw_header(self, context):
- mat = context.material
- sss = mat.subsurface_scattering
-
- self.layout.active = (not mat.shadeless)
- self.layout.itemR(sss, "enabled", text="")
-
- def draw(self, context):
- layout = self.layout
-
- mat = context.material
- sss = mat.subsurface_scattering
-
- layout.active = sss.enabled
-
- split = layout.split()
- split.active = (not mat.shadeless)
-
- col = split.column()
- col.itemR(sss, "ior")
- col.itemR(sss, "scale")
- col.itemR(sss, "color", text="")
- col.itemR(sss, "radius", text="RGB Radius")
-
- col = split.column()
- sub = col.column(align=True)
- sub.itemL(text="Blend:")
- sub.itemR(sss, "color_factor", text="Color")
- sub.itemR(sss, "texture_factor", text="Texture")
- sub.itemL(text="Scattering Weight:")
- sub.itemR(sss, "front")
- sub.itemR(sss, "back")
- col.itemS()
- col.itemR(sss, "error_tolerance", text="Error")
-
-class MATERIAL_PT_mirror(MaterialButtonsPanel):
- __label__ = "Mirror"
- __default_closed__ = True
- COMPAT_ENGINES = set(['BLENDER_RENDER'])
-
- def poll(self, context):
- mat = context.material
- engine = context.scene.render_data.engine
- return mat and (mat.type in ('SURFACE', 'WIRE')) and (engine in self.COMPAT_ENGINES)
-
- def draw_header(self, context):
- raym = context.material.raytrace_mirror
-
- self.layout.itemR(raym, "enabled", text="")
-
- def draw(self, context):
- layout = self.layout
-
- mat = context.material
- raym = mat.raytrace_mirror
-
- layout.active = raym.enabled
-
- split = layout.split()
-
- col = split.column()
- col.itemR(raym, "reflect_factor")
- col.itemR(mat, "mirror_color", text="")
-
- col = split.column()
- col.itemR(raym, "fresnel")
- sub = col.column()
- sub.active = raym.fresnel > 0
- sub.itemR(raym, "fresnel_factor", text="Blend")
-
- split = layout.split()
-
- col = split.column()
- col.itemS()
- col.itemR(raym, "distance", text="Max Dist")
- col.itemR(raym, "depth")
- col.itemS()
- sub = col.split(percentage=0.4)
- sub.itemL(text="Fade To:")
- sub.itemR(raym, "fade_to", text="")
-
- col = split.column()
- col.itemL(text="Gloss:")
- col.itemR(raym, "gloss_factor", text="Amount")
- sub = col.column()
- sub.active = raym.gloss_factor < 1.0
- sub.itemR(raym, "gloss_threshold", text="Threshold")
- sub.itemR(raym, "gloss_samples", text="Samples")
- sub.itemR(raym, "gloss_anisotropic", text="Anisotropic")
-
-class MATERIAL_PT_transp(MaterialButtonsPanel):
- __label__= "Transparency"
- __default_closed__ = True
- COMPAT_ENGINES = set(['BLENDER_RENDER'])
-
- def poll(self, context):
- mat = context.material
- engine = context.scene.render_data.engine
- return mat and (mat.type in ('SURFACE', 'WIRE')) and (engine in self.COMPAT_ENGINES)
-
- def draw_header(self, context):
- mat = context.material
-
- self.layout.itemR(mat, "transparency", text="")
-
- def draw(self, context):
- layout = self.layout
-
- mat = context.material
- rayt = mat.raytrace_transparency
-
- row = layout.row()
- row.active = mat.transparency and (not mat.shadeless)
- row.itemR(mat, "transparency_method", expand=True)
-
- split = layout.split()
-
- col = split.column()
- col.itemR(mat, "alpha")
- row = col.row()
- row.active = mat.transparency and (not mat.shadeless)
- row.itemR(mat, "specular_alpha", text="Specular")
-
- col = split.column()
- col.active = (not mat.shadeless)
- col.itemR(rayt, "fresnel")
- sub = col.column()
- sub.active = rayt.fresnel > 0
- sub.itemR(rayt, "fresnel_factor", text="Blend")
-
- if mat.transparency_method == 'RAYTRACE':
- layout.itemS()
- split = layout.split()
- split.active = mat.transparency
-
- col = split.column()
- col.itemR(rayt, "ior")
- col.itemR(rayt, "filter")
- col.itemR(rayt, "falloff")
- col.itemR(rayt, "limit")
- col.itemR(rayt, "depth")
-
- col = split.column()
- col.itemL(text="Gloss:")
- col.itemR(rayt, "gloss_factor", text="Amount")
- sub = col.column()
- sub.active = rayt.gloss_factor < 1.0
- sub.itemR(rayt, "gloss_threshold", text="Threshold")
- sub.itemR(rayt, "gloss_samples", text="Samples")
-
-class MATERIAL_PT_halo(MaterialButtonsPanel):
- __label__= "Halo"
- COMPAT_ENGINES = set(['BLENDER_RENDER'])
-
- def poll(self, context):
- mat = context.material
- engine = context.scene.render_data.engine
- return mat and (mat.type == 'HALO') and (engine in self.COMPAT_ENGINES)
-
- def draw(self, context):
- layout = self.layout
-
- mat = context.material
- halo = mat.halo
-
- split = layout.split()
-
- col = split.column()
- col.itemR(mat, "diffuse_color", text="")
- col.itemR(halo, "size")
- col.itemR(halo, "hardness")
- col.itemR(halo, "add")
- col.itemL(text="Options:")
- col.itemR(halo, "texture")
- col.itemR(halo, "vertex_normal")
- col.itemR(halo, "xalpha")
- col.itemR(halo, "shaded")
- col.itemR(halo, "soft")
-
- col = split.column()
- col.itemR(halo, "ring")
- sub = col.column()
- sub.active = halo.ring
- sub.itemR(halo, "rings")
- sub.itemR(mat, "mirror_color", text="")
- col.itemS()
- col.itemR(halo, "lines")
- sub = col.column()
- sub.active = halo.lines
- sub.itemR(halo, "line_number", text="Lines")
- sub.itemR(mat, "specular_color", text="")
- col.itemS()
- col.itemR(halo, "star")
- sub = col.column()
- sub.active = halo.star
- sub.itemR(halo, "star_tips")
-
-class MATERIAL_PT_flare(MaterialButtonsPanel):
- __label__= "Flare"
- COMPAT_ENGINES = set(['BLENDER_RENDER'])
-
- def poll(self, context):
- mat = context.material
- engine = context.scene.render_data.engine
- return mat and (mat.type == 'HALO') and (engine in self.COMPAT_ENGINES)
-
- def draw_header(self, context):
- halo = context.material.halo
-
- self.layout.itemR(halo, "flare_mode", text="")
-
- def draw(self, context):
- layout = self.layout
-
- mat = context.material
- halo = mat.halo
-
- layout.active = halo.flare_mode
-
- split = layout.split()
-
- col = split.column()
- col.itemR(halo, "flare_size", text="Size")
- col.itemR(halo, "flare_boost", text="Boost")
- col.itemR(halo, "flare_seed", text="Seed")
- col = split.column()
- col.itemR(halo, "flares_sub", text="Subflares")
- col.itemR(halo, "flare_subsize", text="Subsize")
-
-bpy.types.register(MATERIAL_PT_context_material)
-bpy.types.register(MATERIAL_PT_preview)
-bpy.types.register(MATERIAL_PT_diffuse)
-bpy.types.register(MATERIAL_PT_specular)
-bpy.types.register(MATERIAL_PT_shading)
-bpy.types.register(MATERIAL_PT_transp)
-bpy.types.register(MATERIAL_PT_mirror)
-bpy.types.register(MATERIAL_PT_sss)
-bpy.types.register(MATERIAL_PT_halo)
-bpy.types.register(MATERIAL_PT_flare)
-bpy.types.register(MATERIAL_PT_physics)
-bpy.types.register(MATERIAL_PT_strand)
-bpy.types.register(MATERIAL_PT_options)
-bpy.types.register(MATERIAL_PT_shadow)
-
-# Volumetrics
-class VolumeButtonsPanel(bpy.types.Panel):
- __space_type__ = 'PROPERTIES'
- __region_type__ = 'WINDOW'
- __context__ = "material"
-
- def poll(self, context):
- mat = context.material
- engine = context.scene.render_data.engine
- return mat and (mat.type == 'VOLUME') and (engine in self.COMPAT_ENGINES)
-
-class MATERIAL_PT_volume_shading(VolumeButtonsPanel):
- __label__ = "Shading"
- __default_closed__ = False
- COMPAT_ENGINES = set(['BLENDER_RENDER'])
-
- def draw(self, context):
- layout = self.layout
-
- vol = context.material.volume
-
- row = layout.row()
- row.itemR(vol, "density")
- row.itemR(vol, "scattering")
-
- split = layout.split()
-
- col = split.column()
- col.itemR(vol, "absorption")
- col.itemR(vol, "absorption_color", text="")
-
- col = split.column()
- col.itemR(vol, "emission")
- col.itemR(vol, "emission_color", text="")
-
-class MATERIAL_PT_volume_scattering(VolumeButtonsPanel):
- __label__ = "Scattering"
- __default_closed__ = False
- COMPAT_ENGINES = set(['BLENDER_RENDER'])
-
- def draw(self, context):
- layout = self.layout
-
- vol = context.material.volume
-
- split = layout.split()
-
- col = split.column()
- col.itemR(vol, "scattering_mode", text="")
- if vol.scattering_mode == 'SINGLE_SCATTERING':
- col.itemR(vol, "light_cache")
- sub = col.column()
- sub.active = vol.light_cache
- sub.itemR(vol, "cache_resolution")
- elif vol.scattering_mode in ('MULTIPLE_SCATTERING', 'SINGLE_PLUS_MULTIPLE_SCATTERING'):
- col.itemR(vol, "cache_resolution")
-
- sub = col.column(align=True)
- sub.itemR(vol, "ms_diffusion")
- sub.itemR(vol, "ms_spread")
- sub.itemR(vol, "ms_intensity")
-
- col = split.column()
- # col.itemL(text="Anisotropic Scattering:")
- col.itemR(vol, "phase_function", text="")
- if vol.phase_function in ('SCHLICK', 'HENYEY-GREENSTEIN'):
- col.itemR(vol, "asymmetry")
-
-class MATERIAL_PT_volume_transp(VolumeButtonsPanel):
- __label__= "Transparency"
- COMPAT_ENGINES = set(['BLENDER_RENDER'])
-
- def draw(self, context):
- layout = self.layout
-
- mat = context.material
-
- layout.itemR(mat, "transparency_method", expand=True)
-
-class MATERIAL_PT_volume_integration(VolumeButtonsPanel):
- __label__ = "Integration"
- __default_closed__ = False
- COMPAT_ENGINES = set(['BLENDER_RENDER'])
-
- def draw(self, context):
- layout = self.layout
-
- vol = context.material.volume
-
- split = layout.split()
-
- col = split.column()
- col.itemL(text="Step Calculation:")
- col.itemR(vol, "step_calculation", text="")
- sub = col.column(align=True)
- sub.itemR(vol, "step_size")
- sub.itemR(vol, "shading_step_size")
-
- col = split.column()
- col.itemL()
- col.itemR(vol, "depth_cutoff")
- col.itemR(vol, "density_scale")
-
-bpy.types.register(MATERIAL_PT_volume_shading)
-bpy.types.register(MATERIAL_PT_volume_scattering)
-bpy.types.register(MATERIAL_PT_volume_transp)
-bpy.types.register(MATERIAL_PT_volume_integration)
diff --git a/release/ui/buttons_object.py b/release/ui/buttons_object.py
deleted file mode 100644
index 9e043cfeaf3..00000000000
--- a/release/ui/buttons_object.py
+++ /dev/null
@@ -1,185 +0,0 @@
-
-import bpy
-
-class ObjectButtonsPanel(bpy.types.Panel):
- __space_type__ = 'PROPERTIES'
- __region_type__ = 'WINDOW'
- __context__ = "object"
-
-class OBJECT_PT_context_object(ObjectButtonsPanel):
- __show_header__ = False
-
- def draw(self, context):
- layout = self.layout
-
- ob = context.object
-
- row = layout.row()
- row.itemL(text="", icon='ICON_OBJECT_DATA')
- row.itemR(ob, "name", text="")
-
-class OBJECT_PT_transform(ObjectButtonsPanel):
- __label__ = "Transform"
-
- def draw(self, context):
- layout = self.layout
-
- ob = context.object
-
- row = layout.row()
- row.column().itemR(ob, "location")
- row.column().itemR(ob, "rotation")
- row.column().itemR(ob, "scale")
-
-class OBJECT_PT_relations(ObjectButtonsPanel):
- __label__ = "Relations"
-
- def draw(self, context):
- layout = self.layout
-
- ob = context.object
-
- split = layout.split()
-
- col = split.column()
- col.itemR(ob, "layers")
- col.itemS()
- col.itemR(ob, "pass_index")
-
- col = split.column()
- col.itemL(text="Parent:")
- col.itemR(ob, "parent", text="")
-
- sub = col.column()
- split = sub.split(percentage=0.3)
- split.itemL(text="Type:")
- split.itemR(ob, "parent_type", text="")
- parent = ob.parent
- if parent and ob.parent_type == 'BONE' and parent.type == 'ARMATURE':
- sub.item_pointerR(ob, "parent_bone", parent.data, "bones", text="")
- sub.active = parent != None
-
-class OBJECT_PT_groups(ObjectButtonsPanel):
- __label__ = "Groups"
-
- def draw(self, context):
- layout = self.layout
-
- ob = context.object
-
- split = layout.split()
- split.item_menu_enumO("object.group_add", "group", text="Add to Group")
- split.itemL()
-
- for group in bpy.data.groups:
- if ob.name in group.objects:
- col = layout.column(align=True)
-
- col.set_context_pointer("group", group)
-
- row = col.box().row()
- row.itemR(group, "name", text="")
- row.itemO("object.group_remove", text="", icon='VICON_X')
-
- split = col.box().split()
- split.column().itemR(group, "layer", text="Dupli")
- split.column().itemR(group, "dupli_offset", text="")
-
-class OBJECT_PT_display(ObjectButtonsPanel):
- __label__ = "Display"
-
- def draw(self, context):
- layout = self.layout
-
- ob = context.object
-
- split = layout.split()
- col = split.column()
- col.itemR(ob, "max_draw_type", text="Type")
- col = split.column()
- row = col.row()
- row.itemR(ob, "draw_bounds", text="Bounds")
- row.itemR(ob, "draw_bounds_type", text="")
-
- 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):
- __label__ = "Duplication"
-
- def draw(self, context):
- layout = self.layout
-
- ob = context.object
-
- layout.itemR(ob, "dupli_type", expand=True)
-
- if ob.dupli_type == 'FRAMES':
- split = layout.split()
-
- col = split.column(align=True)
- col.itemR(ob, "dupli_frames_start", text="Start")
- col.itemR(ob, "dupli_frames_end", text="End")
-
- col = split.column(align=True)
- col.itemR(ob, "dupli_frames_on", text="On")
- col.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):
- __label__ = "Animation"
-
- def draw(self, context):
- layout = self.layout
-
- ob = context.object
-
- split = layout.split()
-
- col = split.column()
- col.itemL(text="Time Offset:")
- col.itemR(ob, "time_offset_edit", text="Edit")
- row = col.row()
- row.itemR(ob, "time_offset_particle", text="Particle")
- row.active = len(ob.particle_systems) != 0
- row = col.row()
- row.itemR(ob, "time_offset_parent", text="Parent")
- row.active = ob.parent != None
- row = col.row()
- row.itemR(ob, "slow_parent")
- row.active = ob.parent != None
- col.itemR(ob, "time_offset", text="Offset")
-
- col = split.column()
- col.itemL(text="Track:")
- col.itemR(ob, "track", text="")
- col.itemR(ob, "track_axis", text="Axis")
- col.itemR(ob, "up_axis", text="Up Axis")
- row = col.row()
- row.itemR(ob, "track_override_parent", text="Override Parent")
- row.active = ob.parent != None
-
-bpy.types.register(OBJECT_PT_context_object)
-bpy.types.register(OBJECT_PT_transform)
-bpy.types.register(OBJECT_PT_relations)
-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_object_constraint.py b/release/ui/buttons_object_constraint.py
deleted file mode 100644
index e089cff264f..00000000000
--- a/release/ui/buttons_object_constraint.py
+++ /dev/null
@@ -1,561 +0,0 @@
-
-import bpy
-
-class ConstraintButtonsPanel(bpy.types.Panel):
- __space_type__ = 'PROPERTIES'
- __region_type__ = 'WINDOW'
- __context__ = "constraint"
-
- def draw_constraint(self, context, con):
- layout = self.layout
-
- box = layout.template_constraint(con)
-
- if box:
- # match enum type to our functions, avoids a lookup table.
- getattr(self, con.type)(context, 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='ICON_ARROW_LEFTRIGHT')
-
- 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.item_pointerR(con, "subtarget", con.target.data, "bones", text="Bone")
-
- if con.type == 'COPY_LOCATION':
- row = layout.row()
- row.itemL(text="Head/Tail:")
- row.itemR(con, "head_tail", text="")
- elif con.target.type in ('MESH', 'LATTICE'):
- layout.item_pointerR(con, "subtarget", con.target, "vertex_groups", text="Vertex Group")
-
- def ik_template(self, layout, con):
- layout.itemR(con, "pole_target")
-
- if con.pole_target and con.pole_target.type == 'ARMATURE':
- layout.item_pointerR(con, "pole_subtarget", con.pole_target.data, "bones", text="Bone")
-
- if con.pole_target:
- row = layout.row()
- row.itemL()
- row.itemR(con, "pole_angle")
-
- split = layout.split()
- col = split.column()
- col.itemR(con, "tail")
- col.itemR(con, "stretch")
-
- col = split.column()
- col.itemR(con, "iterations")
- col.itemR(con, "chain_length")
-
- def CHILD_OF(self, context, layout, con):
- self.target_template(layout, con)
-
- split = layout.split()
-
- col = split.column()
- col.itemL(text="Location:")
- col.itemR(con, "locationx", text="X")
- col.itemR(con, "locationy", text="Y")
- col.itemR(con, "locationz", text="Z")
-
- col = split.column()
- col.itemL(text="Rotation:")
- col.itemR(con, "rotationx", text="X")
- col.itemR(con, "rotationy", text="Y")
- col.itemR(con, "rotationz", text="Z")
-
- col = split.column()
- col.itemL(text="Scale:")
- col.itemR(con, "sizex", text="X")
- col.itemR(con, "sizey", text="Y")
- col.itemR(con, "sizez", text="Z")
-
- row = layout.row()
- row.itemO("constraint.childof_set_inverse")
- row.itemO("constraint.childof_clear_inverse")
-
- def TRACK_TO(self, context, 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", expand=True) # XXX: up and expand don't play nice together
- row.itemR(con, "up", text="Up")
- row.itemR(con, "target_z")
-
- self.space_template(layout, con)
-
- def IK(self, context, layout, con):
- if context.object.pose.ik_solver == "ITASC":
- layout.itemR(con, "ik_type")
- getattr(self, "IK_"+con.ik_type)(context, layout, con)
- else:
- self.IK_COPY_POSE(context, layout, con)
-
- def IK_COPY_POSE(self, context, layout, con):
- self.target_template(layout, con)
- self.ik_template(layout, con)
-
- split = layout.split()
- col = split.column()
- col.itemL()
- col.itemR(con, "targetless")
- col.itemR(con, "rotation")
-
- col = split.column()
- col.itemL(text="Weight:")
- col.itemR(con, "weight", text="Position", slider=True)
- sub = col.column()
- sub.active = con.rotation
- sub.itemR(con, "orient_weight", text="Rotation", slider=True)
-
- def IK_DISTANCE(self, context, layout, con):
- self.target_template(layout, con)
- self.ik_template(layout, con)
-
- layout.itemR(con, "limit_mode")
- row = layout.row()
- row.itemR(con, "weight", text="Weight", slider=True)
- row.itemR(con, "distance", text="Distance", slider=True)
-
- def FOLLOW_PATH(self, context, layout, con):
- self.target_template(layout, con)
-
- split = layout.split()
-
- col = split.column()
- col.itemR(con, "use_curve_follow")
- col.itemR(con, "use_curve_radius")
-
- col = split.column()
- col.itemR(con, "use_fixed_position")
- if con.use_fixed_position:
- col.itemR(con, "offset_factor", text="Offset")
- else:
- col.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, context, layout, con):
-
- split = layout.split()
-
- col = split.column()
- col.itemR(con, "use_limit_x")
- sub = col.column()
- sub.active = con.use_limit_x
- sub.itemR(con, "minimum_x", text="Min")
- sub.itemR(con, "maximum_x", text="Max")
-
- col = split.column()
- col.itemR(con, "use_limit_y")
- sub = col.column()
- sub.active = con.use_limit_y
- sub.itemR(con, "minimum_y", text="Min")
- sub.itemR(con, "maximum_y", text="Max")
-
- col = split.column()
- col.itemR(con, "use_limit_z")
- sub = col.column()
- sub.active = con.use_limit_z
- sub.itemR(con, "minimum_z", text="Min")
- sub.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, context, layout, con):
- split = layout.split()
-
- col = split.column()
- col.itemR(con, "use_minimum_x")
- sub = col.column()
- sub.active = con.use_minimum_x
- sub.itemR(con, "minimum_x", text="")
- col.itemR(con, "use_maximum_x")
- sub = col.column()
- sub.active = con.use_maximum_x
- sub.itemR(con, "maximum_x", text="")
-
- col = split.column()
- col.itemR(con, "use_minimum_y")
- sub = col.column()
- sub.active = con.use_minimum_y
- sub.itemR(con, "minimum_y", text="")
- col.itemR(con, "use_maximum_y")
- sub = col.column()
- sub.active = con.use_maximum_y
- sub.itemR(con, "maximum_y", text="")
-
- col = split.column()
- col.itemR(con, "use_minimum_z")
- sub = col.column()
- sub.active = con.use_minimum_z
- sub.itemR(con, "minimum_z", text="")
- col.itemR(con, "use_maximum_z")
- sub = col.column()
- sub.active = con.use_maximum_z
- sub.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, context, layout, con):
- split = layout.split()
-
- col = split.column()
- col.itemR(con, "use_minimum_x")
- sub = col.column()
- sub.active = con.use_minimum_x
- sub.itemR(con, "minimum_x", text="")
- col.itemR(con, "use_maximum_x")
- sub = col.column()
- sub.active = con.use_maximum_x
- sub.itemR(con, "maximum_x", text="")
-
- col = split.column()
- col.itemR(con, "use_minimum_y")
- sub = col.column()
- sub.active = con.use_minimum_y
- sub.itemR(con, "minimum_y", text="")
- col.itemR(con, "use_maximum_y")
- sub = col.column()
- sub.active = con.use_maximum_y
- sub.itemR(con, "maximum_y", text="")
-
- col = split.column()
- col.itemR(con, "use_minimum_z")
- sub = col.column()
- sub.active = con.use_minimum_z
- sub.itemR(con, "minimum_z", text="")
- col.itemR(con, "use_maximum_z")
- sub = col.column()
- sub.active = con.use_maximum_z
- sub.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, context, layout, con):
- self.target_template(layout, con)
-
- split = layout.split()
-
- col = split.column()
- col.itemR(con, "rotate_like_x", text="X")
- sub = col.column()
- sub.active = con.rotate_like_x
- sub.itemR(con, "invert_x", text="Invert")
-
- col = split.column()
- col.itemR(con, "rotate_like_y", text="Y")
- sub = col.column()
- sub.active = con.rotate_like_y
- sub.itemR(con, "invert_y", text="Invert")
-
- col = split.column()
- col.itemR(con, "rotate_like_z", text="Z")
- sub = col.column()
- sub.active = con.rotate_like_z
- sub.itemR(con, "invert_z", text="Invert")
-
- layout.itemR(con, "offset")
-
- self.space_template(layout, con)
-
- def COPY_LOCATION(self, context, layout, con):
- self.target_template(layout, con)
-
- split = layout.split()
-
- col = split.column()
- col.itemR(con, "locate_like_x", text="X")
- sub = col.column()
- sub.active = con.locate_like_x
- sub.itemR(con, "invert_x", text="Invert")
-
- col = split.column()
- col.itemR(con, "locate_like_y", text="Y")
- sub = col.column()
- sub.active = con.locate_like_y
- sub.itemR(con, "invert_y", text="Invert")
-
- col = split.column()
- col.itemR(con, "locate_like_z", text="Z")
- sub = col.column()
- sub.active = con.locate_like_z
- sub.itemR(con, "invert_z", text="Invert")
-
- layout.itemR(con, "offset")
-
- self.space_template(layout, con)
-
- def COPY_SCALE(self, context, 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, context, layout, con):
-
- def ACTION(self, context, 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, context, 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, context, layout, con):
- self.target_template(layout, con)
-
- col = layout.column(align=True);
- col.itemR(con, "distance")
- col.itemO("constraint.limitdistance_reset")
-
- row = layout.row()
- row.itemL(text="Clamp Region:")
- row.itemR(con, "limit_mode", text="")
-
- def STRETCH_TO(self, context, layout, con):
- self.target_template(layout, con)
-
- row = layout.row()
- row.itemR(con, "original_length", text="Rest Length")
- row.itemO("constraint.stretchto_reset", text="Reset")
-
- col = layout.column()
- col.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)
-
- def FLOOR(self, context, 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_JOINT(self, context, 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", text="Display Pivot")
-
- split = layout.split()
-
- col = split.column(align=True)
- col.itemL(text="Pivot:")
- col.itemR(con, "pivot_x", text="X")
- col.itemR(con, "pivot_y", text="Y")
- col.itemR(con, "pivot_z", text="Z")
-
- col = split.column(align=True)
- col.itemL(text="Axis:")
- col.itemR(con, "axis_x", text="X")
- col.itemR(con, "axis_y", text="Y")
- col.itemR(con, "axis_z", text="Z")
-
- #Missing: Limit arrays (not wrapped in RNA yet)
-
- def CLAMP_TO(self, context, 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, context, 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, context, 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):
- __label__ = "Constraints"
- __context__ = "constraint"
-
- def poll(self, context):
- return (context.object)
-
- def draw(self, context):
- layout = self.layout
- ob = context.object
-
- row = layout.row()
- row.item_menu_enumO("object.constraint_add", "type")
- row.itemL();
-
- for con in ob.constraints:
- self.draw_constraint(context, con)
-
-class BONE_PT_constraints(ConstraintButtonsPanel):
- __label__ = "Constraints"
- __context__ = "bone_constraint"
-
- def poll(self, context):
- ob = context.object
- return (ob and ob.type == 'ARMATURE' and context.bone)
-
- def draw(self, context):
- layout = self.layout
-
- ob = context.object
- pchan = ob.pose.pose_channels[context.bone.name]
-
- row = layout.row()
- row.item_menu_enumO("pose.constraint_add", "type")
- row.itemL();
-
- for con in pchan.constraints:
- self.draw_constraint(context, con)
-
-bpy.types.register(OBJECT_PT_constraints)
-bpy.types.register(BONE_PT_constraints)
diff --git a/release/ui/buttons_particle.py b/release/ui/buttons_particle.py
deleted file mode 100644
index e72bd38e563..00000000000
--- a/release/ui/buttons_particle.py
+++ /dev/null
@@ -1,961 +0,0 @@
-
-import bpy
-
-def particle_panel_enabled(psys):
- return psys.point_cache.baked==False and psys.edited==False
-
-def particle_panel_poll(context):
- psys = context.particle_system
- if psys==None: return False
- if psys.settings==None: return False
- return psys.settings.type in ('EMITTER', 'REACTOR', 'HAIR')
-
-def point_cache_ui(self, cache, enabled, particles, smoke):
- layout = self.layout
- layout.set_context_pointer("PointCache", cache)
-
- row = layout.row()
- row.template_list(cache, "point_cache_list", cache, "active_point_cache_index", rows=2 )
- col = row.column(align=True)
- col.itemO("ptcache.add_new", icon='ICON_ZOOMIN', text="")
- col.itemO("ptcache.remove", icon='ICON_ZOOMOUT', text="")
-
- row = layout.row()
- row.itemL(text="File Name:")
- if particles:
- row.itemR(cache, "external")
-
- if cache.external:
- split = layout.split(percentage=0.80)
- split.itemR(cache, "name", text="")
- split.itemR(cache, "index", text="")
-
- layout.itemL(text="File Path:")
- layout.itemR(cache, "filepath", text="")
-
- layout.itemL(text=cache.info)
- else:
- layout.itemR(cache, "name", text="")
-
- if not particles:
- row = layout.row()
- row.enabled = enabled
- row.itemR(cache, "start_frame")
- row.itemR(cache, "end_frame")
-
- row = layout.row()
-
- if cache.baked == True:
- row.itemO("ptcache.free_bake", text="Free Bake")
- else:
- row.item_booleanO("ptcache.bake", "bake", True, text="Bake")
-
- sub = row.row()
- sub.enabled = (cache.frames_skipped or cache.outdated) and enabled
- sub.itemO("ptcache.bake", "bake", False, text="Calculate to Current Frame")
-
- row = layout.row()
- row.enabled = enabled
- row.itemO("ptcache.bake_from_cache", text="Current Cache to Bake")
- if not smoke:
- row.itemR(cache, "step");
-
- if not smoke:
- row = layout.row()
- sub = row.row()
- sub.enabled = enabled
- sub.itemR(cache, "quick_cache")
- row.itemR(cache, "disk_cache")
-
- layout.itemL(text=cache.info)
-
- layout.itemS()
-
- row = layout.row()
- row.item_booleanO("ptcache.bake_all", "bake", True, text="Bake All Dynamics")
- row.itemO("ptcache.free_bake_all", text="Free All Bakes")
- layout.itemO("ptcache.bake_all", "bake", False, text="Update All Dynamics to current frame")
-
-
-class ParticleButtonsPanel(bpy.types.Panel):
- __space_type__ = 'PROPERTIES'
- __region_type__ = 'WINDOW'
- __context__ = "particle"
-
- def poll(self, context):
- return particle_panel_poll(context)
-
-class PARTICLE_PT_particles(ParticleButtonsPanel):
- __show_header__ = False
-
- 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
-
- if ob:
- row = layout.row()
-
- row.template_list(ob, "particle_systems", ob, "active_particle_system_index", rows=2)
-
- col = row.column(align=True)
- col.itemO("object.particle_system_add", icon='ICON_ZOOMIN', text="")
- col.itemO("object.particle_system_remove", icon='ICON_ZOOMOUT', text="")
-
- if psys and not psys.settings:
- split = layout.split(percentage=0.32)
- col = split.column()
- col.itemL(text="Name:")
- col.itemL(text="Settings:")
-
- col = split.column()
- col.itemR(psys, "name", text="")
- col.template_ID(psys, "settings", new="particle.new")
- elif psys:
- part = psys.settings
-
- split = layout.split(percentage=0.32)
- col = split.column()
- col.itemL(text="Name:")
- if part.type in ('EMITTER', 'REACTOR', 'HAIR'):
- col.itemL(text="Settings:")
- col.itemL(text="Type:")
-
- col = split.column()
- col.itemR(psys, "name", text="")
- if part.type in ('EMITTER', 'REACTOR', 'HAIR'):
- col.template_ID(psys, "settings", new="particle.new")
-
- #row = layout.row()
- #row.itemL(text="Viewport")
- #row.itemL(text="Render")
-
- if part:
- if part.type not in ('EMITTER', 'REACTOR', 'HAIR'):
- layout.itemL(text="No settings for fluid particles")
- return
-
- row=col.row()
- row.enabled = particle_panel_enabled(psys)
- row.itemR(part, "type", text="")
- row.itemR(psys, "seed")
-
- split = layout.split(percentage=0.65)
- if part.type=='HAIR':
- if psys.edited==True:
- split.itemO("particle.edited_clear", text="Free Edit")
- else:
- split.itemL(text="")
- row = split.row()
- row.enabled = particle_panel_enabled(psys)
- row.itemR(part, "hair_step")
- if psys.edited==True:
- if psys.global_hair:
- layout.itemO("particle.connect_hair")
- layout.itemL(text="Hair is disconnected.")
- else:
- layout.itemO("particle.disconnect_hair")
- layout.itemL(text="")
- elif part.type=='REACTOR':
- split.enabled = particle_panel_enabled(psys)
- split.itemR(psys, "reactor_target_object")
- split.itemR(psys, "reactor_target_particle_system", text="Particle System")
-
-class PARTICLE_PT_emission(ParticleButtonsPanel):
- __label__ = "Emission"
-
- def poll(self, context):
- if particle_panel_poll(context):
- return not context.particle_system.point_cache.external
- else:
- return False
-
- def draw(self, context):
- layout = self.layout
-
- psys = context.particle_system
- part = psys.settings
-
- layout.enabled = particle_panel_enabled(psys) and not psys.multiple_caches
-
- row = layout.row()
- row.itemR(part, "amount")
-
- 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_hair_dynamics(ParticleButtonsPanel):
- __label__ = "Hair dynamics"
- __default_closed__ = True
-
- def poll(self, context):
- psys = context.particle_system
- if psys==None: return False
- if psys.settings==None: return False
- return psys.settings.type == 'HAIR'
-
- def draw_header(self, context):
- #cloth = context.cloth.collision_settings
-
- #self.layout.active = cloth_panel_enabled(context.cloth)
- #self.layout.itemR(cloth, "enable_collision", text="")
- psys = context.particle_system
- self.layout.itemR(psys, "hair_dynamics", text="")
-
- def draw(self, context):
- layout = self.layout
-
- psys = context.particle_system
- part = psys.settings
- cloth = psys.cloth.settings
-
- layout.enabled = psys.hair_dynamics
-
- split = layout.split()
-
- col = split.column()
- col.itemL(text="Quality:")
- col.itemR(cloth, "quality", text="Steps",slider=True)
- col.itemL(text="Gravity:")
- col.itemR(cloth, "gravity", text="")
-
- col = split.column()
- col.itemL(text="Material:")
- sub = col.column(align=True)
- sub.itemR(cloth, "pin_stiffness", text="Stiffness")
- sub.itemR(cloth, "mass")
- sub.itemR(cloth, "bending_stiffness", text="Bending")
- col.itemL(text="Damping:")
- sub = col.column(align=True)
- sub.itemR(cloth, "spring_damping", text="Spring")
- sub.itemR(cloth, "air_damping", text="Air")
-
- layout.itemR(cloth, "internal_friction", slider="True")
-
-class PARTICLE_PT_cache(ParticleButtonsPanel):
- __label__ = "Cache"
- __default_closed__ = True
-
- def poll(self, context):
- psys = context.particle_system
- if psys==None: return False
- if psys.settings==None: return False
- phystype = psys.settings.physics_type
- if phystype == 'NO' or phystype == 'KEYED':
- return False
- return psys.settings.type in ('EMITTER', 'REACTOR') or (psys.settings.type == 'HAIR' and psys.hair_dynamics)
-
- def draw(self, context):
- layout = self.layout
-
- psys = context.particle_system
-
- point_cache_ui(self, psys.point_cache, particle_panel_enabled(psys), not psys.hair_dynamics, 0)
-
-class PARTICLE_PT_initial(ParticleButtonsPanel):
- __label__ = "Velocity"
-
- def poll(self, context):
- if particle_panel_poll(context):
- psys = context.particle_system
- return psys.settings.physics_type != 'BOIDS' and not psys.point_cache.external
- else:
- return False
-
- def draw(self, context):
- layout = self.layout
-
- psys = context.particle_system
- part = psys.settings
-
- layout.enabled = particle_panel_enabled(psys)
-
- 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):
- __label__ = "Physics"
-
- def poll(self, context):
- if particle_panel_poll(context):
- return not context.particle_system.point_cache.external
- else:
- return False
-
- def draw(self, context):
- layout = self.layout
-
- psys = context.particle_system
- part = psys.settings
-
- layout.enabled = particle_panel_enabled(psys)
-
- row = layout.row()
- row.itemR(part, "physics_type", expand=True)
- if part.physics_type != 'NO':
- 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")
-
- if part.physics_type == 'NEWTON':
- split = layout.split()
- sub = split.column()
-
- 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':
- split = layout.split()
- sub = split.column()
-
- row = layout.row()
- col = row.column()
- col.active = not psys.keyed_timing
- col.itemR(part, "keyed_loops", text="Loops")
- row.itemR(psys, "keyed_timing", text="Use Timing")
-
- layout.itemL(text="Keys:")
- elif part.physics_type=='BOIDS':
- boids = part.boids
-
-
- row = layout.row()
- row.itemR(boids, "allow_flight")
- row.itemR(boids, "allow_land")
- row.itemR(boids, "allow_climb")
-
- split = layout.split()
-
- sub = split.column()
- col = sub.column(align=True)
- col.active = boids.allow_flight
- col.itemR(boids, "air_max_speed")
- col.itemR(boids, "air_min_speed", slider="True")
- col.itemR(boids, "air_max_acc", slider="True")
- col.itemR(boids, "air_max_ave", slider="True")
- col.itemR(boids, "air_personal_space")
- row = col.row()
- row.active = (boids.allow_land or boids.allow_climb) and boids.allow_flight
- row.itemR(boids, "landing_smoothness")
-
- sub = split.column()
- col = sub.column(align=True)
- col.active = boids.allow_land or boids.allow_climb
- col.itemR(boids, "land_max_speed")
- col.itemR(boids, "land_jump_speed")
- col.itemR(boids, "land_max_acc", slider="True")
- col.itemR(boids, "land_max_ave", slider="True")
- col.itemR(boids, "land_personal_space")
- col.itemR(boids, "land_stick_force")
-
- row = layout.row()
-
- col = row.column(align=True)
- col.itemL(text="Battle:")
- col.itemR(boids, "health")
- col.itemR(boids, "strength")
- col.itemR(boids, "aggression")
- col.itemR(boids, "accuracy")
- col.itemR(boids, "range")
-
- col = row.column()
- col.itemL(text="Misc:")
- col.itemR(part, "gravity")
- col.itemR(boids, "banking", slider=True)
- col.itemR(boids, "height", slider=True)
-
- if part.physics_type=='NEWTON':
- sub.itemR(part, "size_deflect")
- sub.itemR(part, "die_on_collision")
- elif part.physics_type=='KEYED' or part.physics_type=='BOIDS':
- if part.physics_type=='BOIDS':
- layout.itemL(text="Relations:")
-
- row = layout.row()
- row.template_list(psys, "targets", psys, "active_particle_target_index")
-
- col = row.column()
- subrow = col.row()
- subcol = subrow.column(align=True)
- subcol.itemO("particle.new_target", icon='ICON_ZOOMIN', text="")
- subcol.itemO("particle.remove_target", icon='ICON_ZOOMOUT', text="")
- subrow = col.row()
- subcol = subrow.column(align=True)
- subcol.itemO("particle.target_move_up", icon='VICON_MOVE_UP', text="")
- subcol.itemO("particle.target_move_down", icon='VICON_MOVE_DOWN', text="")
-
- key = psys.active_particle_target
- if key:
- row = layout.row()
- if part.physics_type=='KEYED':
- col = row.column()
- #doesn't work yet
- #col.red_alert = key.valid
- col.itemR(key, "object", text="")
- col.itemR(key, "system", text="System")
- col = row.column();
- col.active = psys.keyed_timing
- col.itemR(key, "time")
- col.itemR(key, "duration")
- else:
- subrow = row.row()
- #doesn't work yet
- #subrow.red_alert = key.valid
- subrow.itemR(key, "object", text="")
- subrow.itemR(key, "system", text="System")
-
- layout.itemR(key, "mode", expand=True)
-
-class PARTICLE_PT_boidbrain(ParticleButtonsPanel):
- __label__ = "Boid Brain"
-
- def poll(self, context):
- psys = context.particle_system
- if psys==None: return False
- if psys.settings==None: return False
- if psys.point_cache.external: return False
- return psys.settings.physics_type=='BOIDS'
-
- def draw(self, context):
- boids = context.particle_system.settings.boids
- layout = self.layout
-
- layout.enabled = particle_panel_enabled(psys)
-
- # Currently boids can only use the first state so these are commented out for now.
- #row = layout.row()
- #row.template_list(boids, "states", boids, "active_boid_state_index", compact="True")
- #col = row.row()
- #subrow = col.row(align=True)
- #subrow.itemO("boid.boidstate_add", icon='ICON_ZOOMIN', text="")
- #subrow.itemO("boid.boidstate_del", icon='ICON_ZOOMOUT', text="")
- #subrow = row.row(align=True)
- #subrow.itemO("boid.boidstate_move_up", icon='VICON_MOVE_UP', text="")
- #subrow.itemO("boid.boidstate_move_down", icon='VICON_MOVE_DOWN', text="")
-
- state = boids.active_boid_state
-
- #layout.itemR(state, "name", text="State name")
-
- row = layout.row()
- row.itemR(state, "ruleset_type")
- if state.ruleset_type=='FUZZY':
- row.itemR(state, "rule_fuzziness", slider=True)
- else:
- row.itemL(text="")
-
- row = layout.row()
- row.template_list(state, "rules", state, "active_boid_rule_index")
-
- col = row.column()
- subrow = col.row()
- subcol = subrow.column(align=True)
- subcol.item_menu_enumO("boid.boidrule_add", "type", icon='ICON_ZOOMIN', text="")
- subcol.itemO("boid.boidrule_del", icon='ICON_ZOOMOUT', text="")
- subrow = col.row()
- subcol = subrow.column(align=True)
- subcol.itemO("boid.boidrule_move_up", icon='VICON_MOVE_UP', text="")
- subcol.itemO("boid.boidrule_move_down", icon='VICON_MOVE_DOWN', text="")
-
- rule = state.active_boid_rule
-
- if rule:
- row = layout.row()
- row.itemR(rule, "name", text="")
- #somebody make nice icons for boids here please! -jahka
- row.itemR(rule, "in_air", icon='VICON_MOVE_UP', text="")
- row.itemR(rule, "on_land", icon='VICON_MOVE_DOWN', text="")
-
- row = layout.row()
-
- if rule.type == 'GOAL':
- row.itemR(rule, "object")
- row = layout.row()
- row.itemR(rule, "predict")
- elif rule.type == 'AVOID':
- row.itemR(rule, "object")
- row = layout.row()
- row.itemR(rule, "predict")
- row.itemR(rule, "fear_factor")
- elif rule.type == 'FOLLOW_PATH':
- row.itemL(text="Not yet functional.")
- elif rule.type == 'AVOID_COLLISION':
- row.itemR(rule, "boids")
- row.itemR(rule, "deflectors")
- row.itemR(rule, "look_ahead")
- elif rule.type == 'FOLLOW_LEADER':
- row.itemR(rule, "object", text="")
- row.itemR(rule, "distance")
- row = layout.row()
- row.itemR(rule, "line")
- subrow = row.row()
- subrow.active = rule.line
- subrow.itemR(rule, "queue_size")
- elif rule.type == 'AVERAGE_SPEED':
- row.itemR(rule, "speed", slider=True)
- row.itemR(rule, "wander", slider=True)
- row.itemR(rule, "level", slider=True)
- elif rule.type == 'FIGHT':
- row.itemR(rule, "distance")
- row.itemR(rule, "flee_distance")
-
-
-class PARTICLE_PT_render(ParticleButtonsPanel):
- __label__ = "Render"
-
- def poll(self, context):
- psys = context.particle_system
- if psys==None: return False
- if psys.settings==None: return False
- return True;
-
- def draw(self, context):
- layout = self.layout
-
- psys = context.particle_system
- part = psys.settings
-
- row = layout.row()
- row.itemR(part, "material")
- row.itemR(psys, "parent");
-
- 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 part.physics_type!='KEYED' 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="Timing:")
- sub.itemR(part, "abs_path_time")
- sub.itemR(part, "path_start", text="Start", slider= not part.abs_path_time)
- sub.itemR(part, "path_end", text="End", slider= not part.abs_path_time)
- sub.itemR(part, "random_length", text="Random", slider=True)
-
- row = layout.row()
- col = row.column()
-
- if part.type=='HAIR' and part.render_strand==True and part.child_type=='FACES':
- layout.itemR(part, "enable_simplify")
- if part.enable_simplify==True:
- row = layout.row()
- row.itemR(part, "simplify_refsize")
- row.itemR(part, "simplify_rate")
- row.itemR(part, "simplify_transition")
- row = layout.row()
- row.itemR(part, "viewport")
- subrow = row.row()
- subrow.active = part.viewport==True
- subrow.itemR(part, "simplify_viewport")
-
-
- elif part.ren_as == 'OBJECT':
- 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)
- if part.ren_as == 'HALO' or part.ren_as == 'LINE' or part.ren_as=='BILLBOARD':
- row = layout.row()
- col = row.column()
- col.itemR(part, "trail_count")
- if part.trail_count > 1:
- col.itemR(part, "abs_path_time", text="Length in frames")
- col = row.column()
- col.itemR(part, "path_end", text="Length", slider=not part.abs_path_time)
- col.itemR(part, "random_length", text="Random", slider=True)
- else:
- col = row.column()
- col.itemL(text="")
-
-class PARTICLE_PT_draw(ParticleButtonsPanel):
- __label__ = "Display"
- __default_closed__ = True
-
- def poll(self, context):
- psys = context.particle_system
- if psys==None: return False
- if psys.settings==None: return False
- return True;
-
- 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 part.physics_type!='KEYED' 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()
- col.itemR(part, "material_color", text="Use material color")
-
- if (path):
- col.itemR(part, "draw_step")
- else:
- subcol = col.column()
- subcol.active = part.material_color==False
- #subcol.itemL(text="color")
- #subcol.itemL(text="Override material color")
-
-class PARTICLE_PT_children(ParticleButtonsPanel):
- __label__ = "Children"
- __default_closed__ = True
-
- 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)
-
- row = layout.row()
- col = row.column(align=True)
- col.itemR(part, "child_length", slider=True)
- col.itemR(part, "child_length_thres", slider=True)
-
- col = row.column(align=True)
- col.itemL(text="Space reserved for")
- col.itemL(text="hair parting controls")
-
- 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_effectors(ParticleButtonsPanel):
- __label__ = "Effectors"
- __default_closed__ = True
-
- def draw(self, context):
- layout = self.layout
-
- psys = context.particle_system
- part = psys.settings
-
- layout.itemR(part, "effector_group")
-
- layout.itemR(part, "eweight_all", slider=True)
-
- layout.itemS()
- layout.itemR(part, "eweight_spherical", slider=True)
- layout.itemR(part, "eweight_vortex", slider=True)
- layout.itemR(part, "eweight_magnetic", slider=True)
- layout.itemR(part, "eweight_wind", slider=True)
- layout.itemR(part, "eweight_curveguide", slider=True)
- layout.itemR(part, "eweight_texture", slider=True)
- layout.itemR(part, "eweight_harmonic", slider=True)
- layout.itemR(part, "eweight_charge", slider=True)
- layout.itemR(part, "eweight_lennardjones", slider=True)
-
-class PARTICLE_PT_vertexgroups(ParticleButtonsPanel):
- __label__ = "Vertexgroups"
- __default_closed__ = True
-
- 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_hair_dynamics)
-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_boidbrain)
-bpy.types.register(PARTICLE_PT_render)
-bpy.types.register(PARTICLE_PT_draw)
-bpy.types.register(PARTICLE_PT_children)
-bpy.types.register(PARTICLE_PT_effectors)
-bpy.types.register(PARTICLE_PT_vertexgroups)
diff --git a/release/ui/buttons_physics_cloth.py b/release/ui/buttons_physics_cloth.py
deleted file mode 100644
index f6493951a34..00000000000
--- a/release/ui/buttons_physics_cloth.py
+++ /dev/null
@@ -1,172 +0,0 @@
-
-import bpy
-
-from buttons_particle import point_cache_ui
-
-def cloth_panel_enabled(md):
- return md.point_cache.baked==False
-
-class PhysicButtonsPanel(bpy.types.Panel):
- __space_type__ = 'PROPERTIES'
- __region_type__ = 'WINDOW'
- __context__ = "physics"
-
- def poll(self, context):
- ob = context.object
- rd = context.scene.render_data
- return (ob and ob.type == 'MESH') and (not rd.use_game_engine)
-
-class PHYSICS_PT_cloth(PhysicButtonsPanel):
- __label__ = "Cloth"
-
- def draw(self, context):
- layout = self.layout
-
- md = context.cloth
- ob = context.object
-
- split = layout.split()
- split.operator_context = 'EXEC_DEFAULT'
-
- if md:
- # remove modifier + settings
- split.set_context_pointer("modifier", md)
- split.itemO("object.modifier_remove", text="Remove")
-
- row = split.row(align=True)
- row.itemR(md, "render", text="")
- row.itemR(md, "realtime", text="")
- else:
- # add modifier
- split.item_enumO("object.modifier_add", "type", 'CLOTH', text="Add")
- split.itemL()
-
- if md:
- cloth = md.settings
-
- layout.active = cloth_panel_enabled(md)
-
- split = layout.split()
-
- col = split.column()
- col.itemL(text="Quality:")
- col.itemR(cloth, "quality", text="Steps",slider=True)
- col.itemL(text="Gravity:")
- col.itemR(cloth, "gravity", text="")
-
- col.itemR(cloth, "pin_cloth", text="Pin")
- sub = col.column(align=True)
- sub.active = cloth.pin_cloth
- sub.itemR(cloth, "pin_stiffness", text="Stiffness")
- sub.item_pointerR(cloth, "mass_vertex_group", ob, "vertex_groups", text="")
-
- col = split.column()
- col.itemL(text="Presets...")
- col.itemL(text="TODO!")
- col.itemL(text="Material:")
- sub = col.column(align=True)
- sub.itemR(cloth, "mass")
- sub.itemR(cloth, "structural_stiffness", text="Structural")
- sub.itemR(cloth, "bending_stiffness", text="Bending")
- col.itemL(text="Damping:")
- sub = col.column(align=True)
- sub.itemR(cloth, "spring_damping", text="Spring")
- sub.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 PHYSICS_PT_cloth_cache(PhysicButtonsPanel):
- __label__ = "Cloth Cache"
- __default_closed__ = True
-
- def poll(self, context):
- return context.cloth
-
- def draw(self, context):
- md = context.cloth
- point_cache_ui(self, md.point_cache, cloth_panel_enabled(md), 0, 0)
-
-class PHYSICS_PT_cloth_collision(PhysicButtonsPanel):
- __label__ = "Cloth Collision"
- __default_closed__ = True
-
- def poll(self, context):
- return context.cloth
-
- def draw_header(self, context):
- cloth = context.cloth.collision_settings
-
- self.layout.active = cloth_panel_enabled(context.cloth)
- self.layout.itemR(cloth, "enable_collision", text="")
-
- def draw(self, context):
- layout = self.layout
-
- cloth = context.cloth.collision_settings
- md = context.cloth
-
- layout.active = cloth.enable_collision and cloth_panel_enabled(md)
-
- split = layout.split()
-
- col = split.column()
- col.itemR(cloth, "collision_quality", slider=True, text="Quality")
- col.itemR(cloth, "min_distance", slider=True, text="Distance")
- col.itemR(cloth, "friction")
-
- col = split.column()
- col.itemR(cloth, "enable_self_collision", text="Self Collision")
- sub = col.column()
- sub.active = cloth.enable_self_collision
- sub.itemR(cloth, "self_collision_quality", slider=True, text="Quality")
- sub.itemR(cloth, "self_min_distance", slider=True, text="Distance")
-
-class PHYSICS_PT_cloth_stiffness(PhysicButtonsPanel):
- __label__ = "Cloth Stiffness Scaling"
- __default_closed__ = True
-
- def poll(self, context):
- return context.cloth
-
- def draw_header(self, context):
- cloth = context.cloth.settings
-
- self.layout.active = cloth_panel_enabled(context.cloth)
- self.layout.itemR(cloth, "stiffness_scaling", text="")
-
- def draw(self, context):
- layout = self.layout
-
- md = context.cloth
- ob = context.object
- cloth = context.cloth.settings
-
- layout.active = cloth.stiffness_scaling and cloth_panel_enabled(md)
-
- split = layout.split()
-
- col = split.column()
- col.itemL(text="Structural Stiffness:")
- sub = col.column(align=True)
- sub.itemR(cloth, "structural_stiffness_max", text="Max")
- sub.item_pointerR(cloth, "structural_stiffness_vertex_group", ob, "vertex_groups", text="")
-
- col = split.column()
- col.itemL(text="Bending Stiffness:")
- sub = col.column(align=True)
- sub.itemR(cloth, "bending_stiffness_max", text="Max")
- sub.item_pointerR(cloth, "bending_vertex_group", ob, "vertex_groups", text="")
-
-bpy.types.register(PHYSICS_PT_cloth)
-bpy.types.register(PHYSICS_PT_cloth_cache)
-bpy.types.register(PHYSICS_PT_cloth_collision)
-bpy.types.register(PHYSICS_PT_cloth_stiffness)
diff --git a/release/ui/buttons_physics_field.py b/release/ui/buttons_physics_field.py
deleted file mode 100644
index 7d14690856a..00000000000
--- a/release/ui/buttons_physics_field.py
+++ /dev/null
@@ -1,226 +0,0 @@
-
-import bpy
-
-class PhysicButtonsPanel(bpy.types.Panel):
- __space_type__ = 'PROPERTIES'
- __region_type__ = 'WINDOW'
- __context__ = "physics"
-
- def poll(self, context):
- rd = context.scene.render_data
- return (context.object) and (not rd.use_game_engine)
-
-class PHYSICS_PT_field(PhysicButtonsPanel):
- __label__ = "Force Fields"
- __default_closed__ = True
-
- def draw(self, context):
- layout = self.layout
-
- ob = context.object
- field = ob.field
-
- #layout.active = field.enabled
-
- split = layout.split(percentage=0.2)
-
- split.itemL(text="Type:")
- split.itemR(field, "type",text="")
-
- split = layout.split()
-
- if field.type == 'GUIDE':
- layout.itemR(field, "guide_path_add")
-
- elif field.type == 'WIND':
- split.itemR(field, "strength")
-
- col = split.column()
- col.itemR(field, "noise")
- col.itemR(field, "seed")
-
- elif field.type == 'VORTEX':
- split.itemR(field, "strength")
- split.itemL()
-
- elif field.type in ('SPHERICAL', 'CHARGE', 'LENNARDJ'):
- split.itemR(field, "strength")
-
- col = split.column()
- col.itemR(field, "planar")
- col.itemR(field, "surface")
-
- elif field.type == 'BOID':
- split.itemR(field, "strength")
- split.itemR(field, "surface")
-
- elif field.type == 'MAGNET':
- split.itemR(field, "strength")
- split.itemR(field, "planar")
-
- elif field.type == 'HARMONIC':
- col = split.column()
- col.itemR(field, "strength")
- col.itemR(field, "harmonic_damping", text="Damping")
-
- col = split.column()
- col.itemR(field, "planar")
- col.itemR(field, "surface")
-
- elif field.type == 'TEXTURE':
- col = split.column()
- col.itemR(field, "strength")
- col.itemR(field, "texture", text="")
- col.itemR(field, "texture_mode", text="")
- col.itemR(field, "texture_nabla")
-
- col = split.column()
- col.itemR(field, "use_coordinates")
- col.itemR(field, "root_coordinates")
- col.itemR(field, "force_2d")
-
- if field.type in ('HARMONIC', 'SPHERICAL', 'CHARGE', 'WIND', 'VORTEX', 'TEXTURE', 'MAGNET', 'BOID'):
-
- layout.itemL(text="Falloff:")
- layout.itemR(field, "falloff_type", expand=True)
-
- split = layout.split(percentage=0.35)
-
- col = split.column()
- col.itemR(field, "positive_z", text="Positive Z")
- col.itemR(field, "use_min_distance", text="Use Minimum")
- col.itemR(field, "use_max_distance", text="Use Maximum")
-
- col = split.column()
- col.itemR(field, "falloff_power", text="Power")
-
- sub = col.column()
- sub.active = field.use_min_distance
- sub.itemR(field, "minimum_distance", text="Distance")
-
- sub = col.column()
- sub.active = field.use_max_distance
- sub.itemR(field, "maximum_distance", text="Distance")
-
- if field.falloff_type == 'CONE':
- layout.itemS()
-
- split = layout.split(percentage=0.35)
-
- col = split.column()
- col.itemL(text="Angular:")
- col.itemR(field, "use_radial_min", text="Use Minimum")
- col.itemR(field, "use_radial_max", text="Use Maximum")
-
- col = split.column()
- col.itemR(field, "radial_falloff", text="Power")
-
- sub = col.column()
- sub.active = field.use_radial_min
- sub.itemR(field, "radial_minimum", text="Angle")
-
- sub = col.column()
- sub.active = field.use_radial_max
- sub.itemR(field, "radial_maximum", text="Angle")
-
- elif field.falloff_type == 'TUBE':
- layout.itemS()
-
- split = layout.split(percentage=0.35)
-
- col = split.column()
- col.itemL(text="Radial:")
- col.itemR(field, "use_radial_min", text="Use Minimum")
- col.itemR(field, "use_radial_max", text="Use Maximum")
-
- col = split.column()
- col.itemR(field, "radial_falloff", text="Power")
-
- sub = col.column()
- sub.active = field.use_radial_min
- sub.itemR(field, "radial_minimum", text="Distance")
-
- sub = col.column()
- sub.active = field.use_radial_max
- sub.itemR(field, "radial_maximum", text="Distance")
-
- #if ob.type in 'CURVE':
- #if field.type == 'GUIDE':
- #colsub = col.column(align=True)
-
- #if field.type != 'NONE':
- #layout.itemR(field, "strength")
-
- #if field.type in ('HARMONIC', 'SPHERICAL', 'CHARGE', "LENNARDj"):
- #if ob.type in ('MESH', 'SURFACE', 'FONT', 'CURVE'):
- #layout.itemR(field, "surface")
-
-class PHYSICS_PT_collision(PhysicButtonsPanel):
- __label__ = "Collision"
- __default_closed__ = True
-
- def poll(self, context):
- ob = context.object
- rd = context.scene.render_data
- return (ob and ob.type == 'MESH') and (not rd.use_game_engine)
-
- def draw(self, context):
- layout = self.layout
-
- md = context.collision
-
- split = layout.split()
- split.operator_context = 'EXEC_DEFAULT'
-
- if md:
- # remove modifier + settings
- split.set_context_pointer("modifier", md)
- split.itemO("object.modifier_remove", text="Remove")
- col = split.column()
-
- #row = split.row(align=True)
- #row.itemR(md, "render", text="")
- #row.itemR(md, "realtime", text="")
-
- settings = md.settings
-
- else:
- # add modifier
- split.item_enumO("object.modifier_add", "type", 'COLLISION', text="Add")
- split.itemL()
-
- settings = None
-
- if settings:
- layout.active = settings.enabled
-
- split = layout.split()
-
- col = split.column()
- col.itemL(text="Particle:")
- col.itemR(settings, "permeability", slider=True)
- col.itemL(text="Particle Damping:")
- sub = col.column(align=True)
- sub.itemR(settings, "damping_factor", text="Factor", slider=True)
- sub.itemR(settings, "random_damping", text="Random", slider=True)
-
- col.itemL(text="Soft Body and Cloth:")
- sub = col.column(align=True)
- sub.itemR(settings, "outer_thickness", text="Outer", slider=True)
- sub.itemR(settings, "inner_thickness", text="Inner", slider=True)
-
- layout.itemL(text="Force Fields:")
- layout.itemR(settings, "absorption", text="Absorption")
-
- col = split.column()
- col.itemL(text="")
- col.itemR(settings, "kill_particles")
- col.itemL(text="Particle Friction:")
- sub = col.column(align=True)
- sub.itemR(settings, "friction_factor", text="Factor", slider=True)
- sub.itemR(settings, "random_friction", text="Random", slider=True)
- col.itemL(text="Soft Body Damping:")
- col.itemR(settings, "damping", text="Factor", slider=True)
-
-bpy.types.register(PHYSICS_PT_field)
-bpy.types.register(PHYSICS_PT_collision)
diff --git a/release/ui/buttons_physics_fluid.py b/release/ui/buttons_physics_fluid.py
deleted file mode 100644
index e178a831ddd..00000000000
--- a/release/ui/buttons_physics_fluid.py
+++ /dev/null
@@ -1,257 +0,0 @@
-
-import bpy
-
-class PhysicButtonsPanel(bpy.types.Panel):
- __space_type__ = 'PROPERTIES'
- __region_type__ = 'WINDOW'
- __context__ = "physics"
-
- def poll(self, context):
- ob = context.object
- rd = context.scene.render_data
- return (ob and ob.type == 'MESH') and (not rd.use_game_engine)
-
-class PHYSICS_PT_fluid(PhysicButtonsPanel):
- __label__ = "Fluid"
-
- def draw(self, context):
- layout = self.layout
-
- md = context.fluid
- ob = context.object
-
- split = layout.split()
- split.operator_context = 'EXEC_DEFAULT'
-
- if md:
- # remove modifier + settings
- split.set_context_pointer("modifier", md)
- split.itemO("object.modifier_remove", text="Remove")
-
- row = split.row(align=True)
- row.itemR(md, "render", text="")
- row.itemR(md, "realtime", text="")
-
- fluid = md.settings
-
- else:
- # add modifier
- split.item_enumO("object.modifier_add", "type", 'FLUID_SIMULATION', text="Add")
- split.itemL()
-
- fluid = None
-
-
- if fluid:
- layout.itemR(fluid, "type")
-
- if fluid.type == 'DOMAIN':
- layout.itemO("fluid.bake", text="Bake Fluid Simulation", icon='ICON_MOD_FLUIDSIM')
- split = layout.split()
-
- col = split.column()
- col.itemL(text="Resolution:")
- col.itemR(fluid, "resolution", text="Final")
- col.itemL(text="Render Display:")
- col.itemR(fluid, "render_display_mode", text="")
- col.itemL(text="Time:")
- sub = col.column(align=True)
- sub.itemR(fluid, "start_time", text="Start")
- sub.itemR(fluid, "end_time", text="End")
-
- col = split.column()
- col.itemL(text="Required Memory: " + fluid.memory_estimate)
- col.itemR(fluid, "preview_resolution", text="Preview")
- col.itemL(text="Viewport Display:")
- col.itemR(fluid, "viewport_display_mode", text="")
- col.itemL()
- col.itemR(fluid, "generate_speed_vectors")
- col.itemR(fluid, "reverse_frames")
-
- layout.itemR(fluid, "path", text="")
-
- elif fluid.type == 'FLUID':
- split = layout.split()
-
- col = split.column()
- col.itemL(text="Volume Initialization:")
- col.itemR(fluid, "volume_initialization", text="")
- col.itemR(fluid, "export_animated_mesh")
-
- col = split.column()
- col.itemL(text="Initial Velocity:")
- col.itemR(fluid, "initial_velocity", text="")
-
- elif fluid.type == 'OBSTACLE':
- split = layout.split()
-
- col = split.column()
- col.itemL(text="Volume Initialization:")
- col.itemR(fluid, "volume_initialization", text="")
- col.itemR(fluid, "export_animated_mesh")
-
- col = split.column()
- col.itemL(text="Slip Type:")
- col.itemR(fluid, "slip_type", text="")
- if fluid.slip_type == 'PARTIALSLIP':
- col.itemR(fluid, "partial_slip_factor", slider=True, text="Amount")
-
- col.itemL(text="Impact:")
- col.itemR(fluid, "impact_factor", text="Factor")
-
- elif fluid.type == 'INFLOW':
- split = layout.split()
-
- col = split.column()
- col.itemL(text="Volume Initialization:")
- col.itemR(fluid, "volume_initialization", text="")
- col.itemR(fluid, "export_animated_mesh")
- col.itemR(fluid, "local_coordinates")
-
- col = split.column()
- col.itemL(text="Inflow Velocity:")
- col.itemR(fluid, "inflow_velocity", text="")
-
- elif fluid.type == 'OUTFLOW':
- split = layout.split()
-
- col = split.column()
- col.itemL(text="Volume Initialization:")
- col.itemR(fluid, "volume_initialization", text="")
- col.itemR(fluid, "export_animated_mesh")
-
- split.column()
-
- elif fluid.type == 'PARTICLE':
- split = layout.split(percentage=0.5)
-
- col = split.column()
- col.itemL(text="Influence:")
- col.itemR(fluid, "particle_influence", text="Size")
- col.itemR(fluid, "alpha_influence", text="Alpha")
-
- col = split.column()
- col.itemL(text="Type:")
- col.itemR(fluid, "drops")
- col.itemR(fluid, "floats")
- col = split.column()
- col.itemL()
- col.itemR(fluid, "tracer")
-
- layout.itemR(fluid, "path", text="")
-
- elif fluid.type == 'CONTROL':
- split = layout.split()
-
- col = split.column()
- col.itemL(text="")
- col.itemR(fluid, "quality", slider=True)
- col.itemR(fluid, "reverse_frames")
-
- col = split.column()
- col.itemL(text="Time:")
- sub = col.column(align=True)
- sub.itemR(fluid, "start_time", text="Start")
- sub.itemR(fluid, "end_time", text="End")
-
- split = layout.split()
-
- col = split.column()
- col.itemL(text="Attraction Force:")
- sub = col.column(align=True)
- sub.itemR(fluid, "attraction_strength", text="Strength")
- sub.itemR(fluid, "attraction_radius", text="Radius")
-
- col = split.column()
- col.itemL(text="Velocity Force:")
- sub = col.column(align=True)
- sub.itemR(fluid, "velocity_strength", text="Strength")
- sub.itemR(fluid, "velocity_radius", text="Radius")
-
-class PHYSICS_PT_domain_gravity(PhysicButtonsPanel):
- __label__ = "Domain World"
- __default_closed__ = True
-
- def poll(self, context):
- md = context.fluid
- return md and (md.settings.type == 'DOMAIN')
-
- def draw(self, context):
- layout = self.layout
-
- fluid = context.fluid.settings
-
- split = layout.split()
-
- col = split.column()
- col.itemL(text="Gravity:")
- col.itemR(fluid, "gravity", text="")
- col.itemL(text="Real World Size:")
- col.itemR(fluid, "real_world_size", text="Metres")
-
- col = split.column()
- col.itemL(text="Viscosity Presets:")
- sub = col.column(align=True)
- sub.itemR(fluid, "viscosity_preset", text="")
-
- if fluid.viscosity_preset == 'MANUAL':
- sub.itemR(fluid, "viscosity_base", text="Base")
- sub.itemR(fluid, "viscosity_exponent", text="Exponent", slider=True)
- else:
- sub.itemL()
- sub.itemL()
-
- col.itemL(text="Optimization:")
- sub = col.column(align=True)
- sub.itemR(fluid, "grid_levels", slider=True)
- sub.itemR(fluid, "compressibility", slider=True)
-
-class PHYSICS_PT_domain_boundary(PhysicButtonsPanel):
- __label__ = "Domain Boundary"
- __default_closed__ = True
-
- def poll(self, context):
- md = context.fluid
- return md and (md.settings.type == 'DOMAIN')
-
- def draw(self, context):
- layout = self.layout
-
- fluid = context.fluid.settings
-
- split = layout.split()
-
- col = split.column()
- col.itemL(text="Slip Type:")
- sub = col.column(align=True)
- sub.itemR(fluid, "slip_type", text="")
- if fluid.slip_type == 'PARTIALSLIP':
- sub.itemR(fluid, "partial_slip_factor", slider=True, text="Amount")
-
- col = split.column()
- col.itemL(text="Surface:")
- sub = col.column(align=True)
- sub.itemR(fluid, "surface_smoothing", text="Smoothing")
- sub.itemR(fluid, "surface_subdivisions", text="Subdivisions")
-
-class PHYSICS_PT_domain_particles(PhysicButtonsPanel):
- __label__ = "Domain Particles"
- __default_closed__ = True
-
- def poll(self, context):
- md = context.fluid
- return md and (md.settings.type == 'DOMAIN')
-
- def draw(self, context):
- layout = self.layout
-
- fluid = context.fluid.settings
-
- col = layout.column(align=True)
- col.itemR(fluid, "tracer_particles")
- col.itemR(fluid, "generate_particles")
-
-bpy.types.register(PHYSICS_PT_fluid)
-bpy.types.register(PHYSICS_PT_domain_gravity)
-bpy.types.register(PHYSICS_PT_domain_boundary)
-bpy.types.register(PHYSICS_PT_domain_particles)
diff --git a/release/ui/buttons_physics_smoke.py b/release/ui/buttons_physics_smoke.py
deleted file mode 100644
index 1541b0bae14..00000000000
--- a/release/ui/buttons_physics_smoke.py
+++ /dev/null
@@ -1,179 +0,0 @@
-
-import bpy
-
-from buttons_particle import point_cache_ui
-
-class PhysicButtonsPanel(bpy.types.Panel):
- __space_type__ = 'PROPERTIES'
- __region_type__ = 'WINDOW'
- __context__ = "physics"
-
- def poll(self, context):
- ob = context.object
- rd = context.scene.render_data
- return (ob and ob.type == 'MESH') and (not rd.use_game_engine)
-
-class PHYSICS_PT_smoke(PhysicButtonsPanel):
- __label__ = "Smoke"
-
- def draw(self, context):
- layout = self.layout
-
- md = context.smoke
- ob = context.object
-
- split = layout.split()
- split.operator_context = 'EXEC_DEFAULT'
-
- if md:
- # remove modifier + settings
- split.set_context_pointer("modifier", md)
- split.itemO("object.modifier_remove", text="Remove")
-
- row = split.row(align=True)
- row.itemR(md, "render", text="")
- row.itemR(md, "realtime", text="")
-
- else:
- # add modifier
- split.item_enumO("object.modifier_add", "type", 'SMOKE', text="Add")
- split.itemL()
-
- if md:
- layout.itemR(md, "smoke_type", expand=True)
-
- if md.smoke_type == 'TYPE_DOMAIN':
-
- domain = md.domain_settings
-
- split = layout.split()
-
- col = split.column()
- col.itemL(text="Resolution:")
- col.itemR(domain, "maxres", text="Divisions")
-
- col = split.column()
- col.itemL(text="Behavior:")
- col.itemR(domain, "alpha")
- col.itemR(domain, "beta")
- col.itemR(domain, "dissolve_smoke", text="Dissolve")
- sub = col.column()
- sub.active = domain.dissolve_smoke
- sub.itemR(domain, "dissolve_speed", text="Time")
- sub.itemR(domain, "dissolve_smoke_log", text="Slow")
-
- elif md.smoke_type == 'TYPE_FLOW':
-
- flow = md.flow_settings
-
- split = layout.split()
-
- col = split.column()
- col.itemR(flow, "outflow")
- col.itemL(text="Particle System:")
- col.item_pointerR(flow, "psys", ob, "particle_systems", text="")
-
- if md.flow_settings.outflow:
- col = split.column()
- else:
- col = split.column()
- col.itemL(text="Behavior:")
- col.itemR(flow, "temperature")
- col.itemR(flow, "density")
-
- #elif md.smoke_type == 'TYPE_COLL':
- # layout.itemS()
-
-class PHYSICS_PT_smoke_groups(PhysicButtonsPanel):
- __label__ = "Smoke Groups"
- __default_closed__ = True
-
- def poll(self, context):
- md = context.smoke
- return md and (md.smoke_type == 'TYPE_DOMAIN')
-
- def draw(self, context):
- layout = self.layout
-
- group = context.smoke.domain_settings
-
- split = layout.split()
-
- col = split.column()
- col.itemL(text="Flow Group:")
- col.itemR(group, "fluid_group", text="")
-
- #col.itemL(text="Effector Group:")
- #col.itemR(group, "eff_group", text="")
-
- col = split.column()
- col.itemL(text="Collision Group:")
- col.itemR(group, "coll_group", text="")
-
-class PHYSICS_PT_smoke_cache(PhysicButtonsPanel):
- __label__ = "Smoke Cache"
- __default_closed__ = True
-
- def poll(self, context):
- md = context.smoke
- return md and (md.smoke_type == 'TYPE_DOMAIN')
-
- def draw(self, context):
- layout = self.layout
-
- md = context.smoke.domain_settings
- cache = md.point_cache_low
-
- point_cache_ui(self, cache, cache.baked==False, 0, 1)
-
-class PHYSICS_PT_smoke_highres(PhysicButtonsPanel):
- __label__ = "Smoke High Resolution"
- __default_closed__ = True
-
- def poll(self, context):
- md = context.smoke
- return md and (md.smoke_type == 'TYPE_DOMAIN')
-
- def draw_header(self, context):
- high = context.smoke.domain_settings
-
- self.layout.itemR(high, "highres", text="")
-
- def draw(self, context):
- layout = self.layout
-
- md = context.smoke.domain_settings
-
- split = layout.split()
-
- col = split.column()
- col.itemL(text="Resolution:")
- col.itemR(md, "amplify", text="Divisions")
-
- col = split.column()
- col.itemL(text="Noise Method:")
- col.row().itemR(md, "noise_type", text="")
- col.itemR(md, "strength")
- col.itemR(md, "viewhighres")
-
-class PHYSICS_PT_smoke_cache_highres(PhysicButtonsPanel):
- __label__ = "Smoke High Resolution Cache"
- __default_closed__ = True
-
- def poll(self, context):
- md = context.smoke
- return md and (md.smoke_type == 'TYPE_DOMAIN') and md.domain_settings.highres
-
- def draw(self, context):
- layout = self.layout
-
- md = context.smoke.domain_settings
- cache = md.point_cache_high
-
- point_cache_ui(self, cache, cache.baked==False, 0, 1)
-
-bpy.types.register(PHYSICS_PT_smoke)
-bpy.types.register(PHYSICS_PT_smoke_cache)
-bpy.types.register(PHYSICS_PT_smoke_highres)
-bpy.types.register(PHYSICS_PT_smoke_groups)
-bpy.types.register(PHYSICS_PT_smoke_cache_highres)
diff --git a/release/ui/buttons_physics_softbody.py b/release/ui/buttons_physics_softbody.py
deleted file mode 100644
index 3bdbb1b8b90..00000000000
--- a/release/ui/buttons_physics_softbody.py
+++ /dev/null
@@ -1,231 +0,0 @@
-
-import bpy
-
-from buttons_particle import point_cache_ui
-
-def softbody_panel_enabled(md):
- return md.point_cache.baked==False
-
-class PhysicButtonsPanel(bpy.types.Panel):
- __space_type__ = 'PROPERTIES'
- __region_type__ = 'WINDOW'
- __context__ = "physics"
-
- def poll(self, context):
- ob = context.object
- rd = context.scene.render_data
- return (ob and ob.type == 'MESH') and (not rd.use_game_engine)
-
-class PHYSICS_PT_softbody(PhysicButtonsPanel):
- __label__ = "Soft Body"
-
- def draw(self, context):
- layout = self.layout
-
- md = context.soft_body
- ob = context.object
-
- split = layout.split()
- split.operator_context = "EXEC_DEFAULT"
-
- if md:
- # remove modifier + settings
- split.set_context_pointer("modifier", md)
- split.itemO("object.modifier_remove", text="Remove")
-
- row = split.row(align=True)
- row.itemR(md, "render", text="")
- row.itemR(md, "realtime", text="")
- else:
- # add modifier
- split.item_enumO("object.modifier_add", "type", 'SOFT_BODY', text="Add")
- split.itemL("")
-
- if md:
- softbody = md.settings
-
- # General
- split = layout.split()
- split.enabled = softbody_panel_enabled(md)
-
- col = split.column()
- col.itemL(text="Object:")
- col.itemR(softbody, "mass")
- col.itemR(softbody, "friction")
-
- col = split.column()
- col.itemL(text="Simulation:")
- col.itemR(softbody, "gravity")
- col.itemR(softbody, "speed")
-
-class PHYSICS_PT_softbody_cache(PhysicButtonsPanel):
- __label__ = "Soft Body Cache"
- __default_closed__ = True
-
- def poll(self, context):
- return context.soft_body
-
- def draw(self, context):
- md = context.soft_body
- point_cache_ui(self, md.point_cache, softbody_panel_enabled(md), 0, 0)
-
-class PHYSICS_PT_softbody_goal(PhysicButtonsPanel):
- __label__ = "Soft Body Goal"
- __default_closed__ = True
-
- def poll(self, context):
- return context.soft_body
-
- def draw_header(self, context):
- softbody = context.soft_body.settings
-
- self.layout.active = softbody_panel_enabled(context.soft_body)
- self.layout.itemR(softbody, "use_goal", text="")
-
- def draw(self, context):
- layout = self.layout
-
- md = context.soft_body
- softbody = md.settings
- ob = context.object
-
- layout.active = softbody.use_goal and softbody_panel_enabled(md)
-
- split = layout.split()
-
- # Goal
- split = layout.split()
-
- col = split.column()
- col.itemL(text="Goal Strengths:")
- col.itemR(softbody, "goal_default", text="Default")
- sub = col.column(align=True)
- sub.itemR(softbody, "goal_min", text="Minimum")
- sub.itemR(softbody, "goal_max", text="Maximum")
-
- col = split.column()
- col.itemL(text="Goal Settings:")
- col.itemR(softbody, "goal_spring", text="Stiffness")
- col.itemR(softbody, "goal_friction", text="Damping")
-
- layout.item_pointerR(softbody, "goal_vertex_group", ob, "vertex_groups", text="Vertex Group")
-
-class PHYSICS_PT_softbody_edge(PhysicButtonsPanel):
- __label__ = "Soft Body Edges"
- __default_closed__ = True
-
- def poll(self, context):
- return context.soft_body
-
- def draw_header(self, context):
- softbody = context.soft_body.settings
-
- self.layout.active = softbody_panel_enabled(context.soft_body)
- self.layout.itemR(softbody, "use_edges", text="")
-
- def draw(self, context):
- layout = self.layout
-
- md = context.soft_body
- softbody = md.settings
- ob = context.object
-
- layout.active = softbody.use_edges and softbody_panel_enabled(md)
-
- split = layout.split()
-
- col = split.column()
- col.itemL(text="Springs:")
- col.itemR(softbody, "pull")
- col.itemR(softbody, "push")
- col.itemR(softbody, "damp")
- col.itemR(softbody, "plastic")
- col.itemR(softbody, "bending")
- col.itemR(softbody, "spring_length", text="Length")
-
- col = split.column()
- col.itemR(softbody, "stiff_quads")
- sub = col.column()
- sub.active = softbody.stiff_quads
- sub.itemR(softbody, "shear")
-
- col.itemR(softbody, "new_aero", text="Aero")
- sub = col.column()
- sub.enabled = softbody.new_aero
- sub.itemR(softbody, "aero", text="Factor")
-
- col.itemL(text="Collision:")
- col.itemR(softbody, "edge_collision", text="Edge")
- col.itemR(softbody, "face_collision", text="Face")
-
-class PHYSICS_PT_softbody_collision(PhysicButtonsPanel):
- __label__ = "Soft Body Collision"
- __default_closed__ = True
-
- def poll(self, context):
- return context.soft_body
-
- def draw_header(self, context):
- softbody = context.soft_body.settings
-
- self.layout.active = softbody_panel_enabled(context.soft_body)
- self.layout.itemR(softbody, "self_collision", text="")
-
- def draw(self, context):
- layout = self.layout
-
- md = context.soft_body
- softbody = md.settings
- ob = context.object
-
- layout.active = softbody.self_collision and softbody_panel_enabled(md)
-
- layout.itemL(text="Collision Type:")
- layout.itemR(softbody, "collision_type", expand=True)
-
- col = layout.column(align=True)
- col.itemL(text="Ball:")
- col.itemR(softbody, "ball_size", text="Size")
- col.itemR(softbody, "ball_stiff", text="Stiffness")
- col.itemR(softbody, "ball_damp", text="Dampening")
-
-class PHYSICS_PT_softbody_solver(PhysicButtonsPanel):
- __label__ = "Soft Body Solver"
- __default_closed__ = True
-
- def poll(self, context):
- return context.soft_body
-
- def draw(self, context):
- layout = self.layout
-
- md = context.soft_body
- softbody = md.settings
- ob = context.object
-
- layout.active = softbody_panel_enabled(md)
-
- # Solver
- split = layout.split()
-
- col = split.column(align=True)
- col.itemL(text="Step Size:")
- col.itemR(softbody, "minstep")
- col.itemR(softbody, "maxstep")
- col.itemR(softbody, "auto_step", text="Auto-Step")
-
- col = split.column()
- col.itemR(softbody, "error_limit")
- col.itemL(text="Helpers:")
- col.itemR(softbody, "choke")
- col.itemR(softbody, "fuzzy")
-
- layout.itemL(text="Diagnostics:")
- layout.itemR(softbody, "diagnose")
-
-bpy.types.register(PHYSICS_PT_softbody)
-bpy.types.register(PHYSICS_PT_softbody_cache)
-bpy.types.register(PHYSICS_PT_softbody_goal)
-bpy.types.register(PHYSICS_PT_softbody_edge)
-bpy.types.register(PHYSICS_PT_softbody_collision)
-bpy.types.register(PHYSICS_PT_softbody_solver)
diff --git a/release/ui/buttons_scene.py b/release/ui/buttons_scene.py
deleted file mode 100644
index 8bb172e8cd1..00000000000
--- a/release/ui/buttons_scene.py
+++ /dev/null
@@ -1,465 +0,0 @@
-
-import bpy
-
-class RenderButtonsPanel(bpy.types.Panel):
- __space_type__ = 'PROPERTIES'
- __region_type__ = 'WINDOW'
- __context__ = "scene"
- # COMPAT_ENGINES must be defined in each subclass, external engines can add themselves here
-
- def poll(self, context):
- rd = context.scene.render_data
- return (rd.use_game_engine==False) and (rd.engine in self.COMPAT_ENGINES)
-
-class SCENE_PT_render(RenderButtonsPanel):
- __label__ = "Render"
- COMPAT_ENGINES = set(['BLENDER_RENDER'])
-
- def draw(self, context):
- layout = self.layout
-
- rd = context.scene.render_data
-
- row = layout.row()
- row.itemO("screen.render", text="Image", icon='ICON_RENDER_RESULT')
- row.item_booleanO("screen.render", "animation", True, text="Animation", icon='ICON_RENDER_ANIMATION')
-
- layout.itemR(rd, "display_mode", text="Display")
-
-class SCENE_PT_layers(RenderButtonsPanel):
- __label__ = "Layers"
- __default_closed__ = True
- COMPAT_ENGINES = set(['BLENDER_RENDER'])
-
- def draw(self, context):
- layout = self.layout
-
- scene = context.scene
- rd = scene.render_data
-
- row = layout.row()
- row.template_list(rd, "layers", rd, "active_layer_index", rows=2)
-
- col = row.column(align=True)
- col.itemO("scene.render_layer_add", icon='ICON_ZOOMIN', text="")
- col.itemO("scene.render_layer_remove", icon='ICON_ZOOMOUT', text="")
-
- rl = rd.layers[rd.active_layer_index]
-
- split = layout.split()
-
- col = split.column()
- col.itemR(scene, "visible_layers", text="Scene")
- col = split.column()
- col.itemR(rl, "visible_layers", text="Layer")
-
- layout.itemR(rl, "light_override", text="Light")
- layout.itemR(rl, "material_override", text="Material")
-
- layout.itemS()
- layout.itemL(text="Include:")
-
- split = layout.split()
-
- col = split.column()
- col.itemR(rl, "zmask")
- row = col.row()
- row.itemR(rl, "zmask_negate", text="Negate")
- row.active = rl.zmask
- col.itemR(rl, "all_z")
-
- col = split.column()
- col.itemR(rl, "solid")
- col.itemR(rl, "halo")
- col.itemR(rl, "ztransp")
-
- col = split.column()
- col.itemR(rl, "sky")
- col.itemR(rl, "edge")
- col.itemR(rl, "strand")
-
- if rl.zmask:
- split = layout.split()
- split.itemL(text="Zmask Layers:")
- split.column().itemR(rl, "zmask_layers", text="")
-
- layout.itemS()
-
- split = layout.split()
-
- col = split.column()
- col.itemL(text="Passes:")
- col.itemR(rl, "pass_combined")
- col.itemR(rl, "pass_z")
- col.itemR(rl, "pass_vector")
- col.itemR(rl, "pass_normal")
- col.itemR(rl, "pass_uv")
- col.itemR(rl, "pass_mist")
- col.itemR(rl, "pass_object_index")
-
- col = split.column()
- col.itemL()
- col.itemR(rl, "pass_color")
- col.itemR(rl, "pass_diffuse")
- row = col.row()
- row.itemR(rl, "pass_specular")
- row.itemR(rl, "pass_specular_exclude", text="", icon='ICON_X')
- row = col.row()
- row.itemR(rl, "pass_shadow")
- row.itemR(rl, "pass_shadow_exclude", text="", icon='ICON_X')
- row = col.row()
- row.itemR(rl, "pass_ao")
- row.itemR(rl, "pass_ao_exclude", text="", icon='ICON_X')
- row = col.row()
- row.itemR(rl, "pass_reflection")
- row.itemR(rl, "pass_reflection_exclude", text="", icon='ICON_X')
- row = col.row()
- row.itemR(rl, "pass_refraction")
- row.itemR(rl, "pass_refraction_exclude", text="", icon='ICON_X')
-
-class SCENE_PT_shading(RenderButtonsPanel):
- __label__ = "Shading"
- COMPAT_ENGINES = set(['BLENDER_RENDER'])
-
- def draw(self, context):
- layout = self.layout
-
- rd = context.scene.render_data
-
- split = layout.split()
-
- col = split.column()
- col.itemR(rd, "render_textures", text="Textures")
- col.itemR(rd, "render_shadows", text="Shadows")
- col.itemR(rd, "render_sss", text="Subsurface Scattering")
- col.itemR(rd, "render_envmaps", text="Environment Map")
-
- col = split.column()
- col.itemR(rd, "render_raytracing", text="Ray Tracing")
- col.itemR(rd, "color_management")
- col.itemR(rd, "alpha_mode", text="Alpha")
-
-class SCENE_PT_performance(RenderButtonsPanel):
- __label__ = "Performance"
- __default_closed__ = True
- COMPAT_ENGINES = set(['BLENDER_RENDER'])
-
- def draw(self, context):
- layout = self.layout
-
- rd = context.scene.render_data
-
- split = layout.split()
-
- col = split.column(align=True)
- col.itemL(text="Threads:")
- col.row().itemR(rd, "threads_mode", expand=True)
- sub = col.column()
- sub.enabled = rd.threads_mode == 'THREADS_FIXED'
- sub.itemR(rd, "threads")
- col.itemL(text="Tiles:")
- col.itemR(rd, "parts_x", text="X")
- col.itemR(rd, "parts_y", text="Y")
-
- col = split.column()
- col.itemL(text="Memory:")
- sub = col.column()
- sub.itemR(rd, "save_buffers")
- sub.enabled = not rd.full_sample
- sub = col.column()
- sub.active = rd.use_compositing
- sub.itemR(rd, "free_image_textures")
- sub = col.column()
- sub.active = rd.render_raytracing
- sub.itemL(text="Ray Tracing Octree:")
- sub.itemR(rd, "octree_resolution", text="")
-
-class SCENE_PT_post_processing(RenderButtonsPanel):
- __label__ = "Post Processing"
- __default_closed__ = True
- COMPAT_ENGINES = set(['BLENDER_RENDER'])
-
- def draw(self, context):
- layout = self.layout
-
- rd = context.scene.render_data
-
- split = layout.split()
-
- col = split.column()
- col.itemR(rd, "use_compositing")
- col.itemR(rd, "use_sequencer")
-
- col = split.column()
- col.itemR(rd, "dither_intensity", text="Dither", slider=True)
-
- layout.itemS()
-
- split = layout.split()
-
- col = split.column()
- col.itemR(rd, "fields", text="Fields")
- sub = col.column()
- sub.active = rd.fields
- sub.row().itemR(rd, "field_order", expand=True)
- sub.itemR(rd, "fields_still", text="Still")
-
- col = split.column()
- col.itemR(rd, "edge")
- sub = col.column()
- sub.active = rd.edge
- sub.itemR(rd, "edge_threshold", text="Threshold", slider=True)
- sub.itemR(rd, "edge_color", text="")
-
-class SCENE_PT_output(RenderButtonsPanel):
- __label__ = "Output"
- COMPAT_ENGINES = set(['BLENDER_RENDER'])
-
- def draw(self, context):
- layout = self.layout
-
- rd = context.scene.render_data
-
- layout.itemR(rd, "output_path", text="")
-
- split = layout.split()
- col = split.column()
- col.itemR(rd, "file_format", text="")
- col.row().itemR(rd, "color_mode", text="Color", expand=True)
-
- col = split.column()
- col.itemR(rd, "file_extensions")
- col.itemR(rd, "use_overwrite")
- col.itemR(rd, "use_placeholder")
-
- if rd.file_format in ('AVIJPEG', 'JPEG'):
- split = layout.split()
- split.itemR(rd, "quality", slider=True)
-
- elif rd.file_format == 'OPENEXR':
- split = layout.split()
-
- col = split.column()
- col.itemL(text="Codec:")
- col.itemR(rd, "exr_codec", text="")
-
- subsplit = split.split()
- col = subsplit.column()
- col.itemR(rd, "exr_half")
- col.itemR(rd, "exr_zbuf")
- col = subsplit.column()
- col.itemR(rd, "exr_preview")
-
- elif rd.file_format == 'JPEG2000':
- 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_preset", text="")
- col.itemR(rd, "jpeg_ycc")
- col.itemR(rd, "exr_preview")
-
- elif rd.file_format in ('CINEON', 'DPX'):
- split = layout.split()
- col = split.column()
- col.itemR(rd, "cineon_log", text="Convert to Log")
-
- col = split.column(align=True)
- col.active = rd.cineon_log
- col.itemR(rd, "cineon_black", text="Black")
- col.itemR(rd, "cineon_white", text="White")
- col.itemR(rd, "cineon_gamma", text="Gamma")
-
- elif rd.file_format == 'TIFF':
- split = layout.split()
- split.itemR(rd, "tiff_bit")
-
-class SCENE_PT_encoding(RenderButtonsPanel):
- __label__ = "Encoding"
- __default_closed__ = True
- COMPAT_ENGINES = set(['BLENDER_RENDER'])
-
- def poll(self, context):
- rd = context.scene.render_data
- return rd.file_format in ('FFMPEG', 'XVID', 'H264', 'THEORA')
-
- def draw(self, context):
- layout = self.layout
-
- rd = context.scene.render_data
-
- split = layout.split()
-
- split.itemR(rd, "ffmpeg_format")
- if rd.ffmpeg_format in ('AVI', 'QUICKTIME', 'MKV', 'OGG'):
- split.itemR(rd, "ffmpeg_codec")
- else:
- split.itemL()
-
- split = layout.split()
-
- col = split.column()
- col.itemR(rd, "ffmpeg_video_bitrate")
- col.itemL(text="Rate:")
- col.itemR(rd, "ffmpeg_minrate", text="Minimum")
- col.itemR(rd, "ffmpeg_maxrate", text="Maximum")
- col.itemR(rd, "ffmpeg_buffersize", text="Buffer")
-
- col = split.column()
- col.itemR(rd, "ffmpeg_gopsize")
- col.itemR(rd, "ffmpeg_autosplit")
- col.itemL(text="Mux:")
- col.itemR(rd, "ffmpeg_muxrate", text="Rate")
- col.itemR(rd, "ffmpeg_packetsize", text="Packet Size")
-
- row = layout.row()
- row.itemL(text="Audio:")
- row = layout.row()
- row.itemR(rd, "ffmpeg_audio_codec")
-
- split = layout.split()
-
- col = split.column()
- col.itemR(rd, "ffmpeg_audio_bitrate")
- col.itemR(rd, "ffmpeg_audio_mixrate")
- col = split.column()
- col.itemR(rd, "ffmpeg_multiplex_audio")
- col.itemR(rd, "ffmpeg_audio_volume")
-
-class SCENE_PT_antialiasing(RenderButtonsPanel):
- __label__ = "Anti-Aliasing"
- COMPAT_ENGINES = set(['BLENDER_RENDER'])
-
- def draw_header(self, context):
- rd = context.scene.render_data
-
- self.layout.itemR(rd, "antialiasing", text="")
-
- def draw(self, context):
- layout = self.layout
-
- rd = context.scene.render_data
-
- layout.active = rd.antialiasing
-
- split = layout.split()
-
- col = split.column()
- col.row().itemR(rd, "antialiasing_samples", expand=True)
- col.itemR(rd, "full_sample")
-
- col = split.column()
- col.itemR(rd, "pixel_filter", text="")
- col.itemR(rd, "filter_size", text="Size", slider=True)
-
-class SCENE_PT_dimensions(RenderButtonsPanel):
- __label__ = "Dimensions"
- COMPAT_ENGINES = set(['BLENDER_RENDER'])
-
- def draw(self, context):
- layout = self.layout
-
- scene = context.scene
- 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")
-
- row = col.row()
- row.itemR(rd, "use_border", text="Border")
- rowsub = row.row()
- rowsub.active = rd.use_border
- rowsub.itemR(rd, "crop_to_border", text="Crop")
-
- 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 SCENE_PT_stamp(RenderButtonsPanel):
- __label__ = "Stamp"
- __default_closed__ = True
- COMPAT_ENGINES = set(['BLENDER_RENDER'])
-
- def draw_header(self, context):
- rd = context.scene.render_data
-
- self.layout.itemR(rd, "render_stamp", text="")
-
- def draw(self, context):
- layout = self.layout
-
- rd = context.scene.render_data
-
- layout.active = rd.render_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_scene", text="Scene")
- col.itemR(rd, "stamp_camera", text="Camera")
- col.itemR(rd, "stamp_filename", text="Filename")
- col.itemR(rd, "stamp_marker", text="Marker")
- col.itemR(rd, "stamp_sequence_strip", text="Seq. Strip")
-
- col = split.column()
- col.active = rd.render_stamp
- col.itemR(rd, "stamp_foreground", slider=True)
- col.itemR(rd, "stamp_background", slider=True)
- col.itemR(rd, "stamp_font_size", text="Font Size")
-
- row = layout.split(percentage=0.2)
- row.itemR(rd, "stamp_note", text="Note")
- sub = row.row()
- sub.active = rd.stamp_note
- sub.itemR(rd, "stamp_note_text", text="")
-
-class SCENE_PT_unit(RenderButtonsPanel):
- __label__ = "Units"
- __default_closed__ = True
- COMPAT_ENGINES = set(['BLENDER_RENDER'])
-
- def draw(self, context):
- layout = self.layout
-
- unit = context.scene.unit_settings
-
- col = layout.column()
- col.row().itemR(unit, "system", expand=True)
-
- row = layout.row()
- row.active = (unit.system != 'NONE')
- row.itemR(unit, "scale_length", text="Scale")
- row.itemR(unit, "use_separate")
-
-bpy.types.register(SCENE_PT_render)
-bpy.types.register(SCENE_PT_layers)
-bpy.types.register(SCENE_PT_dimensions)
-bpy.types.register(SCENE_PT_antialiasing)
-bpy.types.register(SCENE_PT_shading)
-bpy.types.register(SCENE_PT_output)
-bpy.types.register(SCENE_PT_encoding)
-bpy.types.register(SCENE_PT_performance)
-bpy.types.register(SCENE_PT_post_processing)
-bpy.types.register(SCENE_PT_stamp)
-bpy.types.register(SCENE_PT_unit)
diff --git a/release/ui/buttons_texture.py b/release/ui/buttons_texture.py
deleted file mode 100644
index c95fa266aaa..00000000000
--- a/release/ui/buttons_texture.py
+++ /dev/null
@@ -1,758 +0,0 @@
-
-import bpy
-
-class TextureButtonsPanel(bpy.types.Panel):
- __space_type__ = 'PROPERTIES'
- __region_type__ = 'WINDOW'
- __context__ = "texture"
-
- def poll(self, context):
- tex = context.texture
- return (tex and (tex.type != 'NONE' or tex.use_nodes))
-
-class TEXTURE_PT_preview(TextureButtonsPanel):
- __label__ = "Preview"
-
- def draw(self, context):
- layout = self.layout
-
- tex = context.texture
- slot = context.texture_slot
- ma = context.material
- la = context.lamp
- wo = context.world
- br = context.brush
-
- if ma:
- layout.template_preview(tex, parent=ma, slot=slot)
- elif la:
- layout.template_preview(tex, parent=la, slot=slot)
- elif wo:
- layout.template_preview(tex, parent=wo, slot=slot)
- elif br:
- layout.template_preview(tex, parent=br, slot=slot)
- else:
- layout.template_preview(tex, slot=slot)
-
-class TEXTURE_PT_context_texture(TextureButtonsPanel):
- __show_header__ = False
-
- def poll(self, context):
- return (context.material or context.world or context.lamp or context.brush or context.texture)
-
- def draw(self, context):
- layout = self.layout
-
- tex = context.texture
-
- id = context.material
- if not id: id = context.lamp
- if not id: id = context.world
- if not id: id = context.brush
-
- space = context.space_data
-
- if id:
- row = layout.row()
- row.template_list(id, "textures", id, "active_texture_index", rows=2)
-
- split = layout.split(percentage=0.65)
-
- if id:
- split.template_ID(id, "active_texture", new="texture.new")
- elif tex:
- split.template_ID(space, "pin_id")
-
- if (not space.pin_id) and (
- context.sculpt_object or
- context.vertex_paint_object or
- context.weight_paint_object or
- context.texture_paint_object
- ):
- split.itemR(space, "brush_texture", text="Brush", toggle=True)
-
- if tex:
- layout.itemR(tex, "use_nodes")
-
- split = layout.split(percentage=0.2)
-
- if tex.use_nodes:
- slot = context.texture_slot
- split.itemL(text="Output:")
- split.itemR(slot, "output_node", text="")
-
- else:
- split.itemL(text="Type:")
- split.itemR(tex, "type", text="")
-
-class TEXTURE_PT_colors(TextureButtonsPanel):
- __label__ = "Colors"
- __default_closed__ = True
-
- def draw(self, context):
- layout = self.layout
-
- tex = context.texture
-
- layout.itemR(tex, "use_color_ramp", text="Ramp")
- if tex.use_color_ramp:
- layout.template_color_ramp(tex, "color_ramp", expand=True)
-
- split = layout.split()
-
- split.itemR(tex, "rgb_factor", text="Multiply RGB")
-
- col = split.column()
- col.itemL(text="Adjust:")
- col.itemR(tex, "brightness")
- col.itemR(tex, "contrast")
-
-# Texture Slot Panels #
-
-class TextureSlotPanel(TextureButtonsPanel):
- def poll(self, context):
- return (
- context.texture_slot and
- TextureButtonsPanel.poll(self, context)
- )
-
-class TEXTURE_PT_mapping(TextureSlotPanel):
- __label__ = "Mapping"
-
- def draw(self, context):
- layout = self.layout
-
- ma = context.material
- la = context.lamp
- wo = context.world
- br = context.brush
- tex = context.texture_slot
- textype = context.texture
-
- if not br:
- split = layout.split(percentage=0.3)
- col = split.column()
- col.itemL(text="Coordinates:")
- col = split.column()
- col.itemR(tex, "texture_coordinates", text="")
-
- if tex.texture_coordinates == 'ORCO':
- """
- ob = context.object
- if ob and ob.type == 'MESH':
- split = layout.split(percentage=0.3)
- split.itemL(text="Mesh:")
- split.itemR(ob.data, "texco_mesh", text="")
- """
- elif tex.texture_coordinates == 'UV':
- split = layout.split(percentage=0.3)
- split.itemL(text="Layer:")
- split.itemR(tex, "uv_layer", text="")
- elif tex.texture_coordinates == 'OBJECT':
- split = layout.split(percentage=0.3)
- split.itemL(text="Object:")
- split.itemR(tex, "object", text="")
-
- if ma:
- split = layout.split(percentage=0.3)
- split.itemL(text="Projection:")
- split.itemR(tex, "mapping", text="")
-
- split = layout.split()
-
- col = split.column()
- if tex.texture_coordinates in ('ORCO', 'UV'):
- col.itemR(tex, "from_dupli")
- elif tex.texture_coordinates == 'OBJECT':
- col.itemR(tex, "from_original")
- else:
- col.itemL()
-
- col = split.column()
- row = col.row()
- row.itemR(tex, "x_mapping", text="")
- row.itemR(tex, "y_mapping", text="")
- row.itemR(tex, "z_mapping", text="")
-
- if br:
- layout.itemR(tex, "brush_map_mode", expand=True)
-
- row = layout.row()
- row.active = tex.brush_map_mode in ('FIXED', 'TILED')
- row.itemR(tex, "angle")
-
- row = layout.row()
- row.active = tex.brush_map_mode in ('TILED', '3D')
- row.column().itemR(tex, "size")
- else:
- row = layout.row()
- row.column().itemR(tex, "offset")
- row.column().itemR(tex, "size")
-
-class TEXTURE_PT_influence(TextureSlotPanel):
- __label__ = "Influence"
-
- def draw(self, context):
- layout = self.layout
-
- ma = context.material
- la = context.lamp
- wo = context.world
- br = context.brush
- textype = context.texture
- tex = context.texture_slot
-
- def factor_but(layout, active, toggle, factor, name):
- row = layout.row(align=True)
- row.itemR(tex, toggle, text="")
- sub = row.row()
- sub.active = active
- sub.itemR(tex, factor, text=name, slider=True)
-
- if ma:
- if ma.type in ['SURFACE', 'HALO', 'WIRE']:
- split = layout.split()
-
- col = split.column()
- col.itemL(text="Diffuse:")
- factor_but(col, tex.map_diffuse, "map_diffuse", "diffuse_factor", "Intensity")
- factor_but(col, tex.map_colordiff, "map_colordiff", "colordiff_factor", "Color")
- factor_but(col, tex.map_alpha, "map_alpha", "alpha_factor", "Alpha")
- factor_but(col, tex.map_translucency, "map_translucency", "translucency_factor", "Translucency")
-
- col.itemL(text="Specular:")
- factor_but(col, tex.map_specular, "map_specular", "specular_factor", "Intensity")
- factor_but(col, tex.map_colorspec, "map_colorspec", "colorspec_factor", "Color")
- factor_but(col, tex.map_hardness, "map_hardness", "hardness_factor", "Hardness")
-
- col = split.column()
- col.itemL(text="Shading:")
- factor_but(col, tex.map_ambient, "map_ambient", "ambient_factor", "Ambient")
- factor_but(col, tex.map_emit, "map_emit", "emit_factor", "Emit")
- factor_but(col, tex.map_mirror, "map_mirror", "mirror_factor", "Mirror")
- factor_but(col, tex.map_raymir, "map_raymir", "raymir_factor", "Ray Mirror")
-
- col.itemL(text="Geometry:")
- factor_but(col, tex.map_normal, "map_normal", "normal_factor", "Normal")
- factor_but(col, tex.map_warp, "map_warp", "warp_factor", "Warp")
- factor_but(col, tex.map_displacement, "map_displacement", "displacement_factor", "Displace")
-
- #sub = col.column()
- #sub.active = tex.map_translucency or tex.map_emit or tex.map_alpha or tex.map_raymir or tex.map_hardness or tex.map_ambient or tex.map_specularity or tex.map_reflection or tex.map_mirror
- #sub.itemR(tex, "default_value", text="Amount", slider=True)
- elif ma.type == 'VOLUME':
- split = layout.split()
-
- col = split.column()
- factor_but(col, tex.map_density, "map_density", "density_factor", "Density")
- factor_but(col, tex.map_emission, "map_emission", "emission_factor", "Emission")
- factor_but(col, tex.map_absorption, "map_absorption", "absorption_factor", "Absorption")
- factor_but(col, tex.map_scattering, "map_scattering", "scattering_factor", "Scattering")
-
- col = split.column()
- col.itemL(text=" ")
- factor_but(col, tex.map_alpha, "map_coloremission", "coloremission_factor", "Emission Color")
- factor_but(col, tex.map_colorabsorption, "map_colorabsorption", "colorabsorption_factor", "Absorption Color")
-
- elif la:
- row = layout.row()
- factor_but(row, tex.map_color, "map_color", "color_factor", "Color")
- factor_but(row, tex.map_shadow, "map_shadow", "shadow_factor", "Shadow")
- elif wo:
- split = layout.split()
-
- col = split.column()
- factor_but(col, tex.map_blend, "map_blend", "blend_factor", "Blend")
- factor_but(col, tex.map_horizon, "map_horizon", "horizon_factor", "Horizon")
-
- col = split.column()
- factor_but(col, tex.map_zenith_up, "map_zenith_up", "zenith_up_factor", "Zenith Up")
- factor_but(col, tex.map_zenith_down, "map_zenith_down", "zenith_down_factor", "Zenith Down")
-
- layout.itemS()
-
- split = layout.split()
-
- col = split.column()
- col.itemR(tex, "blend_type", text="Blend")
- col.itemR(tex, "rgb_to_intensity")
- sub = col.column()
- sub.active = tex.rgb_to_intensity
- sub.itemR(tex, "color", text="")
-
- col = split.column()
- col.itemR(tex, "negate", text="Negative")
- col.itemR(tex, "stencil")
- if ma or wo:
- col.itemR(tex, "default_value", text="DVar", slider=True)
-
-# Texture Type Panels #
-
-class TextureTypePanel(TextureButtonsPanel):
- def poll(self, context):
- tex = context.texture
- return (tex and tex.type == self.tex_type and not tex.use_nodes)
-
-class TEXTURE_PT_clouds(TextureTypePanel):
- __label__ = "Clouds"
- 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")
-
- flow = layout.column_flow()
- flow.itemR(tex, "noise_size", text="Size")
- flow.itemR(tex, "noise_depth", text="Depth")
- flow.itemR(tex, "nabla", text="Nabla")
-
-class TEXTURE_PT_wood(TextureTypePanel):
- __label__ = "Wood"
- 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")
-
- flow = layout.column_flow()
- flow.active = tex.stype in ('RINGNOISE', 'BANDNOISE')
- flow.itemR(tex, "noise_size", text="Size")
- flow.itemR(tex, "turbulence")
- flow.itemR(tex, "nabla")
-
-class TEXTURE_PT_marble(TextureTypePanel):
- __label__ = "Marble"
- 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")
-
- flow = layout.column_flow()
- flow.itemR(tex, "noise_size", text="Size")
- flow.itemR(tex, "noise_depth", text="Depth")
- flow.itemR(tex, "turbulence")
- flow.itemR(tex, "nabla")
-
-class TEXTURE_PT_magic(TextureTypePanel):
- __label__ = "Magic"
- 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(TextureTypePanel):
- __label__ = "Blend"
- tex_type = 'BLEND'
-
- def draw(self, context):
- layout = self.layout
-
- tex = context.texture
-
- layout.itemR(tex, "progression")
- sub = layout.row()
-
- sub.active = (tex.progression in ('LINEAR', 'QUADRATIC', 'EASING', 'RADIAL'))
- sub.itemR(tex, "flip_axis", expand=True)
-
-class TEXTURE_PT_stucci(TextureTypePanel):
- __label__ = "Stucci"
- 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(TextureTypePanel):
- __label__ = "Image"
- tex_type = 'IMAGE'
-
- def draw(self, context):
- layout = self.layout
-
- tex = context.texture
-
- layout.template_image(tex, "image", tex.image_user)
-
-class TEXTURE_PT_image_sampling(TextureTypePanel):
- __label__ = "Image Sampling"
- __default_closed__ = True
- tex_type = 'IMAGE'
-
- def draw(self, context):
- layout = self.layout
-
- tex = context.texture
- slot = context.texture_slot
-
- split = layout.split()
-
- """
- col = split.column()
- col.itemR(tex, "flip_axis")
- col.itemR(tex, "normal_map")
- if slot:
- row = col.row()
- row.active = tex.normal_map
- row.itemR(slot, "normal_map_space", text="")
- """
-
- col = split.column()
- col.itemL(text="Alpha:")
- col.itemR(tex, "use_alpha", text="Use")
- col.itemR(tex, "calculate_alpha", text="Calculate")
- col.itemR(tex, "invert_alpha", text="Invert")
-
- col.itemL(text="Flip:")
- col.itemR(tex, "flip_axis", text="X/Y Axis")
-
- col = split.column()
- col.itemL(text="Filter:")
- col.itemR(tex, "filter", text="")
- col.itemR(tex, "mipmap")
-
- row = col.row()
- row.active = tex.mipmap
- row.itemR(tex, "mipmap_gauss", text="Gauss")
-
- col.itemR(tex, "interpolation")
- if tex.mipmap and tex.filter != 'DEFAULT':
- if tex.filter == 'FELINE':
- col.itemR(tex, "filter_probes", text="Probes")
- else:
- col.itemR(tex, "filter_eccentricity", text="Eccentricity")
-
-class TEXTURE_PT_image_mapping(TextureTypePanel):
- __label__ = "Image Mapping"
- __default_closed__ = True
- tex_type = 'IMAGE'
-
- def draw(self, context):
- layout = self.layout
-
- tex = context.texture
-
- layout.itemR(tex, "extension")
-
- split = layout.split()
-
- if tex.extension == 'REPEAT':
- col = split.column(align=True)
- col.itemL(text="Repeat:")
- col.itemR(tex, "repeat_x", text="X")
- col.itemR(tex, "repeat_y", text="Y")
-
- col = split.column(align=True)
- col.itemL(text="Mirror:")
- col.itemR(tex, "mirror_x", text="X")
- col.itemR(tex, "mirror_y", text="Y")
- elif tex.extension == 'CHECKER':
- col = split.column(align=True)
- row = col.row()
- row.itemR(tex, "checker_even", text="Even")
- row.itemR(tex, "checker_odd", text="Odd")
-
- split.itemR(tex, "checker_distance", text="Distance")
-
- layout.itemS()
-
- split = layout.split()
-
- col = split.column(align=True)
- #col.itemR(tex, "crop_rectangle")
- col.itemL(text="Crop Minimum:")
- col.itemR(tex, "crop_min_x", text="X")
- col.itemR(tex, "crop_min_y", text="Y")
-
- col = split.column(align=True)
- col.itemL(text="Crop Maximum:")
- col.itemR(tex, "crop_max_x", text="X")
- col.itemR(tex, "crop_max_y", text="Y")
-
-class TEXTURE_PT_plugin(TextureTypePanel):
- __label__ = "Plugin"
- tex_type = 'PLUGIN'
-
- def draw(self, context):
- layout = self.layout
-
- tex = context.texture
-
- layout.itemL(text="Nothing yet")
-
-class TEXTURE_PT_envmap(TextureTypePanel):
- __label__ = "Environment Map"
- tex_type = 'ENVIRONMENT_MAP'
-
- def draw(self, context):
- layout = self.layout
-
- tex = context.texture
-
- layout.itemL(text="Nothing yet")
-
-class TEXTURE_PT_musgrave(TextureTypePanel):
- __label__ = "Musgrave"
- tex_type = 'MUSGRAVE'
-
- def draw(self, context):
- layout = self.layout
-
- tex = context.texture
-
- layout.itemR(tex, "musgrave_type")
-
- split = layout.split()
-
- col = split.column()
- col.itemR(tex, "highest_dimension", text="Dimension")
- col.itemR(tex, "lacunarity")
- col.itemR(tex, "octaves")
-
- col = split.column()
- if (tex.musgrave_type in ('HETERO_TERRAIN', 'RIDGED_MULTIFRACTAL', 'HYBRID_MULTIFRACTAL')):
- col.itemR(tex, "offset")
- if (tex.musgrave_type in ('RIDGED_MULTIFRACTAL', 'HYBRID_MULTIFRACTAL')):
- col.itemR(tex, "gain")
- col.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(TextureTypePanel):
- __label__ = "Voronoi"
- tex_type = 'VORONOI'
-
- def draw(self, context):
- layout = self.layout
-
- tex = context.texture
-
- split = layout.split()
-
- col = split.column()
- col.itemL(text="Distance Metric:")
- col.itemR(tex, "distance_metric", text="")
- sub = col.column()
- sub.active = tex.distance_metric == 'MINKOVSKY'
- sub.itemR(tex, "minkovsky_exponent", text="Exponent")
- col.itemL(text="Coloring:")
- col.itemR(tex, "coloring", text="")
- col.itemR(tex, "noise_intensity", text="Intensity")
-
- col = split.column(align=True)
- col.itemL(text="Feature Weights:")
- col.itemR(tex, "weight_1", text="1", slider=True)
- col.itemR(tex, "weight_2", text="2", slider=True)
- col.itemR(tex, "weight_3", text="3", slider=True)
- col.itemR(tex, "weight_4", text="4", slider=True)
-
- layout.itemL(text="Noise:")
-
- row = layout.row()
- row.itemR(tex, "noise_size", text="Size")
- row.itemR(tex, "nabla")
-
-class TEXTURE_PT_distortednoise(TextureTypePanel):
- __label__ = "Distorted Noise"
- 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")
-
- flow = layout.column_flow()
- flow.itemR(tex, "distortion", text="Distortion")
- flow.itemR(tex, "noise_size", text="Size")
- flow.itemR(tex, "nabla")
-
-class TEXTURE_PT_voxeldata(TextureButtonsPanel):
- __label__ = "Voxel Data"
-
- def poll(self, context):
- tex = context.texture
- return (tex and tex.type == 'VOXEL_DATA')
-
- def draw(self, context):
- layout = self.layout
-
- tex = context.texture
- vd = tex.voxeldata
-
- layout.itemR(vd, "file_format")
- if vd.file_format in ['BLENDER_VOXEL', 'RAW_8BIT']:
- layout.itemR(vd, "source_path")
- if vd.file_format == 'RAW_8BIT':
- layout.itemR(vd, "resolution")
- elif vd.file_format == 'SMOKE':
- layout.itemR(vd, "domain_object")
-
- layout.itemR(vd, "still")
- row = layout.row()
- row.active = vd.still
- row.itemR(vd, "still_frame_number")
-
- layout.itemR(vd, "interpolation")
- layout.itemR(vd, "intensity")
-
-class TEXTURE_PT_pointdensity(TextureButtonsPanel):
- __label__ = "Point Density"
-
- def poll(self, context):
- tex = context.texture
- return (tex and tex.type == 'POINT_DENSITY')
-
- def draw(self, context):
- layout = self.layout
-
- tex = context.texture
- pd = tex.pointdensity
-
- layout.itemR(pd, "point_source", expand=True)
-
- split = layout.split()
-
- col = split.column()
- if pd.point_source == 'PARTICLE_SYSTEM':
- col.itemL(text="Object:")
- col.itemR(pd, "object", text="")
-
- sub = col.column()
- sub.enabled = pd.object
- if pd.object:
- sub.itemL(text="System:")
- sub.item_pointerR(pd, "particle_system", pd.object, "particle_systems", text="")
- sub.itemL(text="Cache:")
- sub.itemR(pd, "particle_cache", text="")
- else:
- col.itemL(text="Object:")
- col.itemR(pd, "object", text="")
- col.itemL(text="Cache:")
- col.itemR(pd, "vertices_cache", text="")
-
- col.itemS()
-
- col.itemL(text="Color Source:")
- col.itemR(pd, "color_source", text="")
- if pd.color_source in ('PARTICLE_SPEED', 'PARTICLE_VELOCITY'):
- col.itemR(pd, "speed_scale")
- if pd.color_source in ('PARTICLE_SPEED', 'PARTICLE_AGE'):
- layout.template_color_ramp(pd, "color_ramp", expand=True)
-
- col = split.column()
- col.itemL()
- col.itemR(pd, "radius")
- col.itemL(text="Falloff:")
- col.itemR(pd, "falloff", text="")
- if pd.falloff == 'SOFT':
- col.itemR(pd, "falloff_softness")
-
-class TEXTURE_PT_pointdensity_turbulence(TextureButtonsPanel):
- __label__ = "Turbulence"
-
- def poll(self, context):
- tex = context.texture
- return (tex and tex.type == 'POINT_DENSITY')
-
- def draw_header(self, context):
- layout = self.layout
-
- tex = context.texture
- pd = tex.pointdensity
-
- layout.itemR(pd, "turbulence", text="")
-
- def draw(self, context):
- layout = self.layout
-
- tex = context.texture
- pd = tex.pointdensity
- layout.active = pd.turbulence
-
- split = layout.split()
-
- col = split.column()
- col.itemL(text="Influence:")
- col.itemR(pd, "turbulence_influence", text="")
- col.itemL(text="Noise Basis:")
- col.itemR(pd, "noise_basis", text="")
-
- col = split.column()
- col.itemL()
- col.itemR(pd, "turbulence_size")
- col.itemR(pd, "turbulence_depth")
- col.itemR(pd, "turbulence_strength")
-
-bpy.types.register(TEXTURE_PT_context_texture)
-bpy.types.register(TEXTURE_PT_preview)
-
-bpy.types.register(TEXTURE_PT_clouds) # Texture Type Panels
-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_image_sampling)
-bpy.types.register(TEXTURE_PT_image_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_voxeldata)
-bpy.types.register(TEXTURE_PT_pointdensity)
-bpy.types.register(TEXTURE_PT_pointdensity_turbulence)
-
-bpy.types.register(TEXTURE_PT_colors)
-bpy.types.register(TEXTURE_PT_mapping)
-bpy.types.register(TEXTURE_PT_influence)
diff --git a/release/ui/buttons_world.py b/release/ui/buttons_world.py
deleted file mode 100644
index 3134c0ce46b..00000000000
--- a/release/ui/buttons_world.py
+++ /dev/null
@@ -1,181 +0,0 @@
-
-import bpy
-
-class WorldButtonsPanel(bpy.types.Panel):
- __space_type__ = 'PROPERTIES'
- __region_type__ = 'WINDOW'
- __context__ = "world"
- # COMPAT_ENGINES must be defined in each subclass, external engines can add themselves here
-
- def poll(self, context):
- rd = context.scene.render_data
- return (context.world) and (not rd.use_game_engine) and (rd.engine in self.COMPAT_ENGINES)
-
-class WORLD_PT_preview(WorldButtonsPanel):
- __label__ = "Preview"
- COMPAT_ENGINES = set(['BLENDER_RENDER'])
-
- def draw(self, context):
- self.layout.template_preview(context.world)
-
-class WORLD_PT_context_world(WorldButtonsPanel):
- __show_header__ = False
- COMPAT_ENGINES = set(['BLENDER_RENDER'])
-
- def poll(self, context):
- rd = context.scene.render_data
- return (not rd.use_game_engine) and (rd.engine in self.COMPAT_ENGINES)
-
- def draw(self, context):
- layout = self.layout
-
- scene = context.scene
- world = context.world
- space = context.space_data
-
- split = layout.split(percentage=0.65)
-
- if scene:
- split.template_ID(scene, "world", new="world.new")
- elif world:
- split.template_ID(space, "pin_id")
-
-class WORLD_PT_world(WorldButtonsPanel):
- __label__ = "World"
- COMPAT_ENGINES = set(['BLENDER_RENDER'])
-
- def draw(self, context):
- layout = self.layout
-
- world = context.world
-
- row = layout.row()
- row.itemR(world, "paper_sky")
- row.itemR(world, "blend_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_mist(WorldButtonsPanel):
- __label__ = "Mist"
- COMPAT_ENGINES = set(['BLENDER_RENDER'])
-
- def draw_header(self, context):
- world = context.world
-
- self.layout.itemR(world.mist, "enabled", text="")
-
- def draw(self, context):
- layout = self.layout
-
- world = context.world
-
- layout.active = world.mist.enabled
-
- flow = layout.column_flow()
- flow.itemR(world.mist, "intensity", slider=True)
- flow.itemR(world.mist, "start")
- flow.itemR(world.mist, "depth")
- flow.itemR(world.mist, "height")
-
- layout.itemR(world.mist, "falloff")
-
-class WORLD_PT_stars(WorldButtonsPanel):
- __label__ = "Stars"
- COMPAT_ENGINES = set(['BLENDER_RENDER'])
-
- def draw_header(self, context):
- world = context.world
-
- self.layout.itemR(world.stars, "enabled", text="")
-
- def draw(self, context):
- layout = self.layout
-
- world = context.world
-
- layout.active = world.stars.enabled
-
- flow = layout.column_flow()
- flow.itemR(world.stars, "size")
- flow.itemR(world.stars, "color_randomization", text="Colors")
- flow.itemR(world.stars, "min_distance", text="Min. Dist")
- flow.itemR(world.stars, "average_separation", text="Separation")
-
-class WORLD_PT_ambient_occlusion(WorldButtonsPanel):
- __label__ = "Ambient Occlusion"
- COMPAT_ENGINES = set(['BLENDER_RENDER'])
-
- def draw_header(self, context):
- world = context.world
-
- self.layout.itemR(world.ambient_occlusion, "enabled", text="")
-
- def draw(self, context):
- layout = self.layout
-
- ao = context.world.ambient_occlusion
-
- layout.active = ao.enabled
-
- layout.itemR(ao, "gather_method", expand=True)
-
- split = layout.split()
-
- col = split.column()
- col.itemL(text="Attenuation:")
- col.itemR(ao, "distance")
- col.itemR(ao, "falloff")
- sub = col.row()
- sub.active = ao.falloff
- sub.itemR(ao, "falloff_strength", text="Strength")
-
- if ao.gather_method == 'RAYTRACE':
- col = split.column()
-
- col.itemL(text="Sampling:")
- col.itemR(ao, "sample_method", text="")
-
- sub = col.column()
- sub.itemR(ao, "samples")
-
- if ao.sample_method == 'ADAPTIVE_QMC':
- sub.itemR(ao, "threshold")
- sub.itemR(ao, "adapt_to_speed", slider=True)
- elif ao.sample_method == 'CONSTANT_JITTERED':
- sub.itemR(ao, "bias")
-
- if ao.gather_method == 'APPROXIMATE':
- col = split.column()
-
- col.itemL(text="Sampling:")
- col.itemR(ao, "error_tolerance", text="Error")
- col.itemR(ao, "pixel_cache")
- col.itemR(ao, "correction")
-
- col = layout.column()
- col.itemL(text="Influence:")
-
- col.row().itemR(ao, "blend_mode", expand=True)
-
- split = layout.split()
-
- col = split.column()
- col.itemR(ao, "energy")
-
- col = split.column()
- sub = col.split(percentage=0.3)
- sub.itemL(text="Color:")
- sub.itemR(ao, "color", text="")
-
-bpy.types.register(WORLD_PT_context_world)
-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)
diff --git a/release/ui/space_buttons.py b/release/ui/space_buttons.py
deleted file mode 100644
index aa89c06ea08..00000000000
--- a/release/ui/space_buttons.py
+++ /dev/null
@@ -1,36 +0,0 @@
-
-import bpy
-
-class Buttons_HT_header(bpy.types.Header):
- __space_type__ = 'PROPERTIES'
-
- def draw(self, context):
- layout = self.layout
-
- so = context.space_data
- scene = context.scene
-
- row= layout.row(align=True)
- row.template_header()
-
- if context.area.show_menus:
- sub = row.row(align=True)
- sub.itemM("Buttons_MT_view", text="View")
-
- row = layout.row()
- row.itemR(so, "buttons_context", expand=True, text="")
- row.itemR(scene, "current_frame")
-
-class Buttons_MT_view(bpy.types.Menu):
- __space_type__ = 'PROPERTIES'
- __label__ = "View"
-
- def draw(self, context):
- layout = self.layout
- so = context.space_data
-
- col = layout.column()
- col.itemR(so, "panel_alignment", expand=True)
-
-bpy.types.register(Buttons_HT_header)
-bpy.types.register(Buttons_MT_view)
diff --git a/release/ui/space_console.py b/release/ui/space_console.py
deleted file mode 100644
index 4641d7900cb..00000000000
--- a/release/ui/space_console.py
+++ /dev/null
@@ -1,451 +0,0 @@
-
-import bpy
-
-import bpy_ops # XXX - should not need to do this
-del bpy_ops
-
-class CONSOLE_HT_header(bpy.types.Header):
- __space_type__ = 'CONSOLE'
-
- def draw(self, context):
- sc = context.space_data
- # text = sc.text
- layout = self.layout
-
- row= layout.row(align=True)
- row.template_header()
-
- if context.area.show_menus:
- sub = row.row(align=True)
-
- if sc.console_type == 'REPORT':
- sub.itemM("CONSOLE_MT_report")
- else:
- sub.itemM("CONSOLE_MT_console")
-
- layout.itemS()
- layout.itemR(sc, "console_type", expand=True)
-
- if sc.console_type == 'REPORT':
- row = layout.row(align=True)
- row.itemR(sc, "show_report_debug", text="Debug")
- row.itemR(sc, "show_report_info", text="Info")
- row.itemR(sc, "show_report_operator", text="Operators")
- row.itemR(sc, "show_report_warn", text="Warnings")
- row.itemR(sc, "show_report_error", text="Errors")
-
- row = layout.row()
- row.enabled = sc.show_report_operator
- row.itemO("console.report_replay")
- else:
- row = layout.row(align=True)
- row.itemO("console.autocomplete", text="Autocomplete")
-
-class CONSOLE_MT_console(bpy.types.Menu):
- __space_type__ = 'CONSOLE'
- __label__ = "Console"
-
- def draw(self, context):
- layout = self.layout
- sc = context.space_data
-
- layout.column()
- layout.itemO("console.clear")
- layout.itemO("console.copy")
- layout.itemO("console.paste")
-
-class CONSOLE_MT_report(bpy.types.Menu):
- __space_type__ = 'CONSOLE'
- __label__ = "Report"
-
- def draw(self, context):
- layout = self.layout
- sc = context.space_data
-
- layout.column()
- layout.itemO("console.select_all_toggle")
- layout.itemO("console.select_border")
- layout.itemO("console.report_delete")
- layout.itemO("console.report_copy")
-
-def add_scrollback(text, text_type):
- for l in text.split('\n'):
- bpy.ops.console.scrollback_append(text=l.replace('\t', ' '), type=text_type)
-
-def get_console(console_id):
- '''
- helper function for console operators
- currently each text datablock gets its own console - code.InteractiveConsole()
- ...which is stored in this function.
-
- console_id can be any hashable type
- '''
- import sys, code
-
- try: consoles = get_console.consoles
- except:consoles = get_console.consoles = {}
-
- # clear all dead consoles, use text names as IDs
- # TODO, find a way to clear IDs
- '''
- for console_id in list(consoles.keys()):
- if console_id not in bpy.data.texts:
- del consoles[id]
- '''
-
- try:
- namespace, console, stdout, stderr = consoles[console_id]
- except:
- namespace = {'__builtins__':__builtins__} # locals()
- namespace['bpy'] = bpy
-
- console = code.InteractiveConsole(namespace)
-
- import io
- stdout = io.StringIO()
- stderr = io.StringIO()
-
- consoles[console_id]= namespace, console, stdout, stderr
-
- return namespace, console, stdout, stderr
-
-class CONSOLE_OT_exec(bpy.types.Operator):
- '''Execute the current console line as a python expression.'''
- __idname__ = "console.execute"
- __label__ = "Console Execute"
- __register__ = False
-
- # Both prompts must be the same length
- PROMPT = '>>> '
- PROMPT_MULTI = '... '
-
- # is this working???
- '''
- def poll(self, context):
- return (context.space_data.type == 'PYTHON')
- ''' # its not :|
-
- def execute(self, context):
- import sys
-
- sc = context.space_data
-
- try:
- line = sc.history[-1].line
- except:
- return ('CANCELLED',)
-
- if sc.console_type != 'PYTHON':
- return ('CANCELLED',)
-
- namespace, console, stdout, stderr = get_console(hash(context.region))
-
- # redirect output
- sys.stdout = stdout
- sys.stderr = stderr
-
- # run the console
- if not line.strip():
- line_exec = '\n' # executes a multiline statement
- else:
- line_exec = line
-
- is_multiline = console.push(line_exec)
-
- stdout.seek(0)
- stderr.seek(0)
-
- output = stdout.read()
- output_err = stderr.read()
-
- # cleanup
- sys.stdout = sys.__stdout__
- sys.stderr = sys.__stderr__
- sys.last_traceback = None
-
- # So we can reuse, clear all data
- stdout.truncate(0)
- stderr.truncate(0)
-
- bpy.ops.console.scrollback_append(text = sc.prompt+line, type='INPUT')
-
- if is_multiline: sc.prompt = self.PROMPT_MULTI
- else: sc.prompt = self.PROMPT
-
- # insert a new blank line
- bpy.ops.console.history_append(text="", current_character=0, remove_duplicates= True)
-
- # Insert the output into the editor
- # not quite correct because the order might have changed, but ok 99% of the time.
- if output: add_scrollback(output, 'OUTPUT')
- if output_err: add_scrollback(output_err, 'ERROR')
-
-
- return ('FINISHED',)
-
-
-def autocomp(bcon):
- '''
- This function has been taken from a BGE console autocomp I wrote a while ago
- the dictionaty bcon is not needed but it means I can copy and paste from the old func
- which works ok for now.
-
- could be moved into its own module.
- '''
-
-
- def is_delimiter(ch):
- '''
- For skipping words
- '''
- if ch == '_':
- return False
- if ch.isalnum():
- return False
-
- return True
-
- def is_delimiter_autocomp(ch):
- '''
- When autocompleteing will earch back and
- '''
- if ch in '._[] "\'':
- return False
- if ch.isalnum():
- return False
-
- return True
-
-
- def do_autocomp(autocomp_prefix, autocomp_members):
- '''
- return text to insert and a list of options
- '''
- autocomp_members = [v for v in autocomp_members if v.startswith(autocomp_prefix)]
-
- print("AUTO: '%s'" % autocomp_prefix)
- print("MEMBERS: '%s'" % str(autocomp_members))
-
- if not autocomp_prefix:
- return '', autocomp_members
- elif len(autocomp_members) > 1:
- # find a common string between all members after the prefix
- # 'ge' [getA, getB, getC] --> 'get'
-
- # get the shortest member
- min_len = min([len(v) for v in autocomp_members])
-
- autocomp_prefix_ret = ''
-
- for i in range(len(autocomp_prefix), min_len):
- char_soup = set()
- for v in autocomp_members:
- char_soup.add(v[i])
-
- if len(char_soup) > 1:
- break
- else:
- autocomp_prefix_ret += char_soup.pop()
-
- return autocomp_prefix_ret, autocomp_members
- elif len(autocomp_members) == 1:
- if autocomp_prefix == autocomp_members[0]:
- # the variable matched the prefix exactly
- # add a '.' so you can quickly continue.
- # Could try add [] or other possible extensions rather then '.' too if we had the variable.
- return '.', []
- else:
- # finish off the of the word word
- return autocomp_members[0][len(autocomp_prefix):], []
- else:
- return '', []
-
-
- def BCon_PrevChar(bcon):
- cursor = bcon['cursor']-1
- if cursor<0:
- return None
-
- try:
- return bcon['edit_text'][cursor]
- except:
- return None
-
-
- def BCon_NextChar(bcon):
- try:
- return bcon['edit_text'][bcon['cursor']]
- except:
- return None
-
- def BCon_cursorLeft(bcon):
- bcon['cursor'] -= 1
- if bcon['cursor'] < 0:
- bcon['cursor'] = 0
-
- def BCon_cursorRight(bcon):
- bcon['cursor'] += 1
- if bcon['cursor'] > len(bcon['edit_text']):
- bcon['cursor'] = len(bcon['edit_text'])
-
- def BCon_AddScrollback(bcon, text):
-
- bcon['scrollback'] = bcon['scrollback'] + text
-
-
- def BCon_cursorInsertChar(bcon, ch):
- if bcon['cursor']==0:
- bcon['edit_text'] = ch + bcon['edit_text']
- elif bcon['cursor']==len(bcon['edit_text']):
- bcon['edit_text'] = bcon['edit_text'] + ch
- else:
- bcon['edit_text'] = bcon['edit_text'][:bcon['cursor']] + ch + bcon['edit_text'][bcon['cursor']:]
-
- bcon['cursor']
- if bcon['cursor'] > len(bcon['edit_text']):
- bcon['cursor'] = len(bcon['edit_text'])
- BCon_cursorRight(bcon)
-
-
- TEMP_NAME = '___tempname___'
-
- cursor_orig = bcon['cursor']
-
- ch = BCon_PrevChar(bcon)
- while ch != None and (not is_delimiter(ch)):
- ch = BCon_PrevChar(bcon)
- BCon_cursorLeft(bcon)
-
- if ch != None:
- BCon_cursorRight(bcon)
-
- #print (cursor_orig, bcon['cursor'])
-
- cursor_base = bcon['cursor']
-
- autocomp_prefix = bcon['edit_text'][cursor_base:cursor_orig]
-
- print("PREFIX:'%s'" % autocomp_prefix)
-
- # Get the previous word
- if BCon_PrevChar(bcon)=='.':
- BCon_cursorLeft(bcon)
- ch = BCon_PrevChar(bcon)
- while ch != None and is_delimiter_autocomp(ch)==False:
- ch = BCon_PrevChar(bcon)
- BCon_cursorLeft(bcon)
-
- cursor_new = bcon['cursor']
-
- if ch != None:
- cursor_new+=1
-
- pytxt = bcon['edit_text'][cursor_new:cursor_base-1].strip()
- print("AUTOCOMP EVAL: '%s'" % pytxt)
- #try:
- if pytxt:
- bcon['console'].runsource(TEMP_NAME + '=' + pytxt, '<input>', 'single')
- # print val
- else: ##except:
- val = None
-
- try:
- val = bcon['namespace'][TEMP_NAME]
- del bcon['namespace'][TEMP_NAME]
- except:
- val = None
-
- if val:
- autocomp_members = dir(val)
-
- autocomp_prefix_ret, autocomp_members = do_autocomp(autocomp_prefix, autocomp_members)
-
- bcon['cursor'] = cursor_orig
- for v in autocomp_prefix_ret:
- BCon_cursorInsertChar(bcon, v)
- cursor_orig = bcon['cursor']
-
- if autocomp_members:
- BCon_AddScrollback(bcon, ', '.join(autocomp_members))
-
- del val
-
- else:
- # Autocomp global namespace
- autocomp_members = bcon['namespace'].keys()
-
- if autocomp_prefix:
- autocomp_members = [v for v in autocomp_members if v.startswith(autocomp_prefix)]
-
- autocomp_prefix_ret, autocomp_members = do_autocomp(autocomp_prefix, autocomp_members)
-
- bcon['cursor'] = cursor_orig
- for v in autocomp_prefix_ret:
- BCon_cursorInsertChar(bcon, v)
- cursor_orig = bcon['cursor']
-
- if autocomp_members:
- BCon_AddScrollback(bcon, ', '.join(autocomp_members))
-
- bcon['cursor'] = cursor_orig
-
-
-class CONSOLE_OT_autocomplete(bpy.types.Operator):
- '''Evaluate the namespace up until the cursor and give a list of options or complete the name if there is only one.'''
- __idname__ = "console.autocomplete"
- __label__ = "Console Autocomplete"
- __register__ = False
-
- def poll(self, context):
- return context.space_data.console_type == 'PYTHON'
-
- def execute(self, context):
-
- sc = context.space_data
-
- namespace, console, stdout, stderr = get_console(hash(context.region))
-
- current_line = sc.history[-1]
- line = current_line.line
-
- if not console:
- return ('CANCELLED',)
-
- if sc.console_type != 'PYTHON':
- return ('CANCELLED',)
-
- # fake cursor, use for autocomp func.
- bcon = {}
- bcon['cursor'] = current_line.current_character
- bcon['console'] = console
- bcon['edit_text'] = line
- bcon['namespace'] = namespace
- bcon['scrollback'] = '' # nor from the BGE console
-
-
- # This function isnt aware of the text editor or being an operator
- # just does the autocomp then copy its results back
- autocomp(bcon)
-
- # Now we need to copy back the line from blender back into the text editor.
- # This will change when we dont use the text editor anymore
- if bcon['scrollback']:
- add_scrollback(bcon['scrollback'], 'INFO')
-
- # copy back
- current_line.line = bcon['edit_text']
- current_line.current_character = bcon['cursor']
-
- context.area.tag_redraw()
-
- return ('FINISHED',)
-
-
-
-bpy.types.register(CONSOLE_HT_header)
-bpy.types.register(CONSOLE_MT_console)
-bpy.types.register(CONSOLE_MT_report)
-
-bpy.ops.add(CONSOLE_OT_exec)
-bpy.ops.add(CONSOLE_OT_autocomplete)
-
diff --git a/release/ui/space_filebrowser.py b/release/ui/space_filebrowser.py
deleted file mode 100644
index f1ea5555787..00000000000
--- a/release/ui/space_filebrowser.py
+++ /dev/null
@@ -1,42 +0,0 @@
-
-import bpy
-
-class FILEBROWSER_HT_header(bpy.types.Header):
- __space_type__ = 'FILE_BROWSER'
-
- def draw(self, context):
- layout = self.layout
-
- st = context.space_data
- params = st.params
-
- layout.template_header(menus=False)
-
- row = layout.row(align=True)
- row.itemO("file.parent", text="", icon='ICON_FILE_PARENT')
- row.itemO("file.refresh", text="", icon='ICON_FILE_REFRESH')
- row.itemO("file.previous", text="", icon='ICON_PREV_KEYFRAME')
- row.itemO("file.next", text="", icon='ICON_NEXT_KEYFRAME')
-
- row = layout.row(align=True)
- row.itemO("file.directory_new", text="", icon='ICON_NEWFOLDER')
-
- layout.itemR(params, "display", expand=True, text="")
- layout.itemR(params, "sort", expand=True, text="")
-
- layout.itemR(params, "hide_dot")
- layout.itemR(params, "do_filter")
-
- row = layout.row(align=True)
- row.itemR(params, "filter_folder", text="");
- row.itemR(params, "filter_blender", text="");
- row.itemR(params, "filter_image", text="");
- row.itemR(params, "filter_movie", text="");
- row.itemR(params, "filter_script", text="");
- row.itemR(params, "filter_font", text="");
- row.itemR(params, "filter_sound", text="");
- row.itemR(params, "filter_text", text="");
-
- row.active = params.do_filter
-
-bpy.types.register(FILEBROWSER_HT_header)
diff --git a/release/ui/space_image.py b/release/ui/space_image.py
deleted file mode 100644
index b14bec0e40e..00000000000
--- a/release/ui/space_image.py
+++ /dev/null
@@ -1,503 +0,0 @@
-
-import bpy
-
-class IMAGE_MT_view(bpy.types.Menu):
- __space_type__ = 'IMAGE_EDITOR'
- __label__ = "View"
-
- def draw(self, context):
- layout = self.layout
-
- sima = context.space_data
- uv = sima.uv_editor
- settings = context.tool_settings
-
- show_uvedit = sima.show_uvedit
-
- layout.itemO("image.properties", icon='ICON_MENU_PANEL')
-
- layout.itemS()
-
- layout.itemR(sima, "update_automatically")
- if show_uvedit:
- layout.itemR(settings, "uv_local_view") # Numpad /
-
- layout.itemS()
-
- layout.itemO("image.view_zoom_in")
- layout.itemO("image.view_zoom_out")
-
- layout.itemS()
-
- ratios = [[1, 8], [1, 4], [1, 2], [1, 1], [2, 1], [4, 1], [8, 1]];
-
- for a, b in ratios:
- text = "Zoom %d:%d" % (a, b)
- layout.item_floatO("image.view_zoom_ratio", "ratio", a/float(b), text=text)
-
- layout.itemS()
-
- if show_uvedit:
- layout.itemO("image.view_selected")
-
- layout.itemO("image.view_all")
- layout.itemO("screen.screen_full_area")
-
-class IMAGE_MT_select(bpy.types.Menu):
- __space_type__ = 'IMAGE_EDITOR'
- __label__ = "Select"
-
- def draw(self, context):
- layout = self.layout
-
- layout.itemO("uv.select_border")
- layout.item_booleanO("uv.select_border", "pinned", True)
-
- layout.itemS()
-
- layout.itemO("uv.select_all_toggle")
- layout.itemO("uv.select_inverse")
- layout.itemO("uv.unlink_selection")
-
- layout.itemS()
-
- layout.itemO("uv.select_pinned")
- layout.itemO("uv.select_linked")
-
-class IMAGE_MT_image(bpy.types.Menu):
- __space_type__ = 'IMAGE_EDITOR'
- __label__ = "Image"
-
- def draw(self, context):
- layout = self.layout
-
- sima = context.space_data
- ima = sima.image
-
- layout.itemO("image.new")
- layout.itemO("image.open")
-
- show_render = sima.show_render
-
- if ima:
- if not show_render:
- layout.itemO("image.replace")
- layout.itemO("image.reload")
-
- layout.itemO("image.save")
- layout.itemO("image.save_as")
-
- if ima.source == 'SEQUENCE':
- layout.itemO("image.save_sequence")
-
- if not show_render:
- layout.itemS()
-
- if ima.packed_file:
- layout.itemO("image.unpack")
- else:
- layout.itemO("image.pack")
-
- # only for dirty && specific image types, perhaps
- # this could be done in operator poll too
- if ima.dirty:
- if ima.source in ('FILE', 'GENERATED') and ima.type != 'MULTILAYER':
- layout.item_booleanO("image.pack", "as_png", True, text="Pack As PNG")
-
- layout.itemS()
-
- layout.itemR(sima, "image_painting")
-
-class IMAGE_MT_uvs_showhide(bpy.types.Menu):
- __space_type__ = 'IMAGE_EDITOR'
- __label__ = "Show/Hide Faces"
-
- def draw(self, context):
- layout = self.layout
-
- layout.itemO("uv.reveal")
- layout.itemO("uv.hide")
- layout.item_booleanO("uv.hide", "unselected", True)
-
-class IMAGE_MT_uvs_transform(bpy.types.Menu):
- __space_type__ = 'IMAGE_EDITOR'
- __label__ = "Transform"
-
- def draw(self, context):
- layout = self.layout
-
- layout.itemO("tfm.translate")
- layout.itemO("tfm.rotate")
- layout.itemO("tfm.resize")
-
-class IMAGE_MT_uvs_mirror(bpy.types.Menu):
- __space_type__ = 'IMAGE_EDITOR'
- __label__ = "Mirror"
-
- def draw(self, context):
- layout = self.layout
- layout.operator_context = "EXEC_REGION_WIN"
-
- props= layout.itemO("tfm.mirror", text="X Axis", properties=True)
- props.constraint_axis[0]= True
-
- props= layout.itemO("tfm.mirror", text="Y Axis", properties=True)
- props.constraint_axis[1]= True
-
-class IMAGE_MT_uvs_weldalign(bpy.types.Menu):
- __space_type__ = 'IMAGE_EDITOR'
- __label__ = "Weld/Align"
-
- def draw(self, context):
- layout = self.layout
-
- layout.itemO("uv.weld") # W, 1
- layout.items_enumO("uv.align", "axis") # W, 2/3/4
-
-class IMAGE_MT_uvs(bpy.types.Menu):
- __space_type__ = 'IMAGE_EDITOR'
- __label__ = "UVs"
-
- def draw(self, context):
- layout = self.layout
-
- sima = context.space_data
- uv = sima.uv_editor
- settings = context.tool_settings
-
- layout.itemR(uv, "snap_to_pixels")
- layout.itemR(uv, "constrain_to_image_bounds")
-
- layout.itemS()
-
- layout.itemR(uv, "live_unwrap")
- layout.itemO("uv.unwrap")
- layout.item_booleanO("uv.pin", "clear", True, text="Unpin")
- layout.itemO("uv.pin")
-
- layout.itemS()
-
- layout.itemO("uv.pack_islands")
- layout.itemO("uv.average_islands_scale")
- layout.itemO("uv.minimize_stretch")
- layout.itemO("uv.stitch")
-
- layout.itemS()
-
- layout.itemM("IMAGE_MT_uvs_transform")
- layout.itemM("IMAGE_MT_uvs_mirror")
- layout.itemM("IMAGE_MT_uvs_weldalign")
-
- layout.itemS()
-
- layout.itemR(settings, "proportional_editing")
- layout.item_menu_enumR(settings, "proportional_editing_falloff")
-
- layout.itemS()
-
- layout.itemM("IMAGE_MT_uvs_showhide")
-
-class IMAGE_HT_header(bpy.types.Header):
- __space_type__ = 'IMAGE_EDITOR'
-
- def draw(self, context):
- layout = self.layout
-
- sima = context.space_data
- ima = sima.image
- iuser = sima.image_user
- settings = context.tool_settings
-
- show_render = sima.show_render
- show_paint = sima.show_paint
- show_uvedit = sima.show_uvedit
-
- row = layout.row(align=True)
- row.template_header()
-
- # menus
- if context.area.show_menus:
- sub = row.row(align=True)
- sub.itemM("IMAGE_MT_view")
-
- if show_uvedit:
- sub.itemM("IMAGE_MT_select")
-
- if ima and ima.dirty:
- sub.itemM("IMAGE_MT_image", text="Image*")
- else:
- sub.itemM("IMAGE_MT_image", text="Image")
-
- if show_uvedit:
- sub.itemM("IMAGE_MT_uvs")
-
- layout.template_ID(sima, "image", new="image.new")
-
- # uv editing
- if show_uvedit:
- uvedit = sima.uv_editor
-
- layout.itemR(uvedit, "pivot", text="", icon_only=True)
- layout.itemR(settings, "uv_sync_selection", text="")
-
- if settings.uv_sync_selection:
- layout.itemR(settings, "mesh_selection_mode", text="", expand=True)
- else:
- layout.itemR(settings, "uv_selection_mode", text="", expand=True)
- layout.itemR(uvedit, "sticky_selection_mode", text="", icon_only=True)
- pass
-
- row = layout.row(align=True)
- row.itemR(settings, "snap", text="")
- if settings.snap:
- row.itemR(settings, "snap_mode", text="")
-
- """
- mesh = context.edit_object.data
- row.item_pointerR(mesh, "active_uv_layer", mesh, "uv_textures")
- """
-
- if ima:
- # layers
- layout.template_image_layers(ima, iuser)
-
- # painting
- layout.itemR(sima, "image_painting", text="")
-
- # draw options
- row = layout.row(align=True)
- row.itemR(sima, "draw_channels", text="", expand=True)
-
- row = layout.row(align=True)
- if ima.type == 'COMPOSITE':
- row.itemO("image.record_composite", icon='ICON_REC')
- if ima.type == 'COMPOSITE' and ima.source in ('MOVIE', 'SEQUENCE'):
- row.itemO("image.play_composite", icon='ICON_PLAY')
-
- if show_uvedit or sima.image_painting:
- layout.itemR(sima, "update_automatically", text="")
-
-class IMAGE_PT_image_properties(bpy.types.Panel):
- __space_type__ = 'IMAGE_EDITOR'
- __region_type__ = 'UI'
- __label__ = "Image"
-
- def poll(self, context):
- sima = context.space_data
- return (sima.image)
-
- def draw(self, context):
- layout = self.layout
-
- sima = context.space_data
- ima = sima.image
- iuser = sima.image_user
-
- layout.template_image(sima, "image", iuser, compact=True)
-
-class IMAGE_PT_game_properties(bpy.types.Panel):
- __space_type__ = 'IMAGE_EDITOR'
- __region_type__ = 'UI'
- __label__ = "Game Properties"
-
- def poll(self, context):
- rd = context.scene.render_data
- sima = context.space_data
- return (sima and sima.image) and (rd.engine == 'BLENDER_GAME')
-
- def draw(self, context):
- layout = self.layout
-
- sima = context.space_data
- ima = sima.image
-
- split = layout.split()
-
- col = split.column()
-
- sub = col.column(align=True)
- sub.itemR(ima, "animated")
-
- subsub = sub.column()
- subsub.active = ima.animated
- subsub.itemR(ima, "animation_start", text="Start")
- subsub.itemR(ima, "animation_end", text="End")
- subsub.itemR(ima, "animation_speed", text="Speed")
-
- col.itemR(ima, "tiles")
- sub = col.column(align=True)
- sub.active = ima.tiles or ima.animated
- sub.itemR(ima, "tiles_x", text="X")
- sub.itemR(ima, "tiles_y", text="Y")
-
- col = split.column()
- col.itemL(text="Clamp:")
- col.itemR(ima, "clamp_x", text="X")
- col.itemR(ima, "clamp_y", text="Y")
- col.itemS()
- col.itemR(ima, "mapping", expand=True)
-
-
-
-class IMAGE_PT_view_properties(bpy.types.Panel):
- __space_type__ = 'IMAGE_EDITOR'
- __region_type__ = 'UI'
- __label__ = "Display"
-
- def poll(self, context):
- sima = context.space_data
- return (sima and (sima.image or sima.show_uvedit))
-
- def draw(self, context):
- layout = self.layout
-
- sima = context.space_data
- ima = sima.image
- show_uvedit = sima.show_uvedit
- uvedit = sima.uv_editor
-
- split = layout.split()
-
- col = split.column()
- if ima:
- col.itemR(ima, "display_aspect", text="Aspect Ratio")
-
- col = split.column()
- col.itemL(text="Coordinates:")
- col.itemR(sima, "draw_repeated", text="Repeat")
- if show_uvedit:
- col.itemR(uvedit, "normalized_coordinates", text="Normalized")
- elif show_uvedit:
- col.itemL(text="Coordinates:")
- col.itemR(uvedit, "normalized_coordinates", text="Normalized")
-
- if show_uvedit:
-
- col = layout.column()
- col.itemL(text="UVs:")
- row = col.row()
- row.itemR(uvedit, "edge_draw_type", expand=True)
-
- split = layout.split()
-
- col = split.column()
- col.itemR(uvedit, "draw_stretch", text="Stretch")
- sub = col.column()
- sub.active = uvedit.draw_stretch
- sub.row().itemR(uvedit, "draw_stretch_type", expand=True)
-
- col = split.column()
- col.itemR(uvedit, "draw_smooth_edges", text="Smooth")
- col.itemR(uvedit, "draw_modified_edges", text="Modified")
- #col.itemR(uvedit, "draw_edges")
- #col.itemR(uvedit, "draw_faces")
-
-class IMAGE_PT_paint(bpy.types.Panel):
- __space_type__ = 'IMAGE_EDITOR'
- __region_type__ = 'UI'
- __label__ = "Paint"
-
- def poll(self, context):
- sima = context.space_data
- return sima.show_paint
-
- def draw(self, context):
- layout = self.layout
-
- settings = context.tool_settings.image_paint
- brush = settings.brush
-
- col = layout.split().column()
- row = col.row()
- row.template_list(settings, "brushes", settings, "active_brush_index", rows=2)
-
- col.template_ID(settings, "brush", new="brush.add")
-
- row = layout.row(align=True)
- row.item_enumR(settings, "tool", 'DRAW')
- row.item_enumR(settings, "tool", 'SOFTEN')
- row.item_enumR(settings, "tool", 'CLONE')
- row.item_enumR(settings, "tool", 'SMEAR')
-
- if brush:
- col = layout.column()
- col.itemR(brush, "color", text="")
-
- row = col.row(align=True)
- row.itemR(brush, "size", slider=True)
- row.itemR(brush, "use_size_pressure", toggle=True, text="")
-
- row = col.row(align=True)
- row.itemR(brush, "strength", slider=True)
- row.itemR(brush, "use_strength_pressure", toggle=True, text="")
-
- row = col.row(align=True)
- row.itemR(brush, "jitter", slider=True)
- row.itemR(brush, "use_jitter_pressure", toggle=True, text="")
-
- col.itemR(brush, "blend", text="Blend")
-
-class IMAGE_PT_paint_stroke(bpy.types.Panel):
- __space_type__ = 'IMAGE_EDITOR'
- __region_type__ = 'UI'
- __label__ = "Paint Stroke"
- __default_closed__ = True
-
- def poll(self, context):
- sima = context.space_data
- settings = context.tool_settings.image_paint
- return sima.show_paint and settings.brush
-
- def draw(self, context):
- layout = self.layout
-
- settings = context.tool_settings.image_paint
- brush = settings.brush
-
- layout.itemR(brush, "use_airbrush")
- col = layout.column()
- col.active = brush.use_airbrush
- col.itemR(brush, "rate", slider=True)
-
- layout.itemR(brush, "use_space")
- row = layout.row(align=True)
- row.active = brush.use_space
- row.itemR(brush, "spacing", text="Distance", slider=True)
- row.itemR(brush, "use_spacing_pressure", toggle=True, text="")
-
-class IMAGE_PT_paint_curve(bpy.types.Panel):
- __space_type__ = 'IMAGE_EDITOR'
- __region_type__ = 'UI'
- __label__ = "Paint Curve"
- __default_closed__ = True
-
- def poll(self, context):
- sima = context.space_data
- settings = context.tool_settings.image_paint
- return sima.show_paint and settings.brush
-
- def draw(self, context):
- layout = self.layout
-
- settings = context.tool_settings.image_paint
- brush = settings.brush
-
- layout.template_curve_mapping(brush, "curve")
- layout.item_menu_enumO("brush.curve_preset", property="shape")
-
-bpy.types.register(IMAGE_MT_view)
-bpy.types.register(IMAGE_MT_select)
-bpy.types.register(IMAGE_MT_image)
-bpy.types.register(IMAGE_MT_uvs_showhide)
-bpy.types.register(IMAGE_MT_uvs_transform)
-bpy.types.register(IMAGE_MT_uvs_mirror)
-bpy.types.register(IMAGE_MT_uvs_weldalign)
-bpy.types.register(IMAGE_MT_uvs)
-bpy.types.register(IMAGE_HT_header)
-bpy.types.register(IMAGE_PT_image_properties)
-bpy.types.register(IMAGE_PT_paint)
-bpy.types.register(IMAGE_PT_paint_stroke)
-bpy.types.register(IMAGE_PT_paint_curve)
-bpy.types.register(IMAGE_PT_game_properties)
-bpy.types.register(IMAGE_PT_view_properties)
-
diff --git a/release/ui/space_info.py b/release/ui/space_info.py
deleted file mode 100644
index 7162716e73e..00000000000
--- a/release/ui/space_info.py
+++ /dev/null
@@ -1,292 +0,0 @@
-
-import bpy
-
-class INFO_HT_header(bpy.types.Header):
- __space_type__ = 'INFO'
-
- def draw(self, context):
- layout = self.layout
-
- st = context.space_data
- scene = context.scene
- rd = scene.render_data
-
- row = layout.row(align=True)
- row.template_header()
-
- if context.area.show_menus:
- sub = row.row(align=True)
- sub.itemM("INFO_MT_file")
- sub.itemM("INFO_MT_add")
- if rd.use_game_engine:
- sub.itemM("INFO_MT_game")
- else:
- sub.itemM("INFO_MT_render")
- sub.itemM("INFO_MT_help")
-
- layout.template_ID(context.window, "screen", new="screen.new", unlink="screen.delete")
- layout.template_ID(context.screen, "scene", new="scene.new", unlink="scene.delete")
-
- if rd.multiple_engines:
- layout.itemR(rd, "engine", text="")
-
- layout.itemS()
-
- layout.template_operator_search()
- layout.template_running_jobs()
-
- layout.itemL(text=scene.statistics())
-
-class INFO_MT_file(bpy.types.Menu):
- __space_type__ = 'INFO'
- __label__ = "File"
-
- def draw(self, context):
- layout = self.layout
-
- layout.operator_context = "EXEC_AREA"
- layout.itemO("wm.read_homefile", text="New")
- layout.operator_context = "INVOKE_AREA"
- layout.itemO("wm.open_mainfile", text="Open...")
- layout.item_menu_enumO("wm.open_recentfile", "file", text="Open Recent")
- layout.itemO("wm.recover_last_session")
-
- layout.itemS()
-
- layout.operator_context = "EXEC_AREA"
- layout.itemO("wm.save_mainfile", text="Save")
- layout.operator_context = "INVOKE_AREA"
- layout.itemO("wm.save_as_mainfile", text="Save As...")
- layout.itemO("screen.userpref_show", text="User Preferences...")
-
- layout.itemS()
- layout.operator_context = "INVOKE_AREA"
- layout.itemO("wm.link_append", text="Link")
- layout.item_booleanO("wm.link_append", "link", False, text="Append")
- layout.itemS()
-
- layout.itemM("INFO_MT_file_import")
- layout.itemM("INFO_MT_file_export")
-
- layout.itemS()
-
- layout.itemM("INFO_MT_file_external_data")
-
- layout.itemS()
-
- layout.operator_context = "EXEC_AREA"
- layout.itemO("wm.exit_blender", text="Quit")
-
-class INFO_MT_file_import(bpy.types.Menu):
- __space_type__ = 'INFO'
- __label__ = "Import"
-
- def draw(self, context):
- layout = self.layout
-
- layout.itemO("import.3ds", text="3DS")
- layout.itemO("import.obj", text="OBJ")
-
-
-class INFO_MT_file_export(bpy.types.Menu):
- __space_type__ = 'INFO'
- __label__ = "Export"
-
- def draw(self, context):
- layout = self.layout
-
- layout.itemO("export.3ds", text="3DS")
- layout.itemO("export.fbx", text="FBX")
- layout.itemO("export.obj", text="OBJ")
- layout.itemO("export.ply", text="PLY")
- layout.itemO("export.x3d", text="X3D")
-
-
-class INFO_MT_file_external_data(bpy.types.Menu):
- __space_type__ = 'INFO'
- __label__ = "External Data"
-
- def draw(self, context):
- layout = self.layout
-
- layout.itemO("file.pack_all", text="Pack into .blend file")
- layout.itemO("file.unpack_all", text="Unpack into Files...")
-
- layout.itemS()
-
- layout.itemO("file.make_paths_relative")
- layout.itemO("file.make_paths_absolute")
- layout.itemO("file.report_missing_files")
- layout.itemO("file.find_missing_files")
-
-class INFO_MT_add(bpy.types.Menu):
- __space_type__ = 'INFO'
- __label__ = "Add"
-
- def draw(self, context):
- layout = self.layout
-
- layout.operator_context = "EXEC_SCREEN"
-
- layout.item_menu_enumO("object.mesh_add", "type", text="Mesh", icon='ICON_OUTLINER_OB_MESH')
- layout.item_menu_enumO("object.curve_add", "type", text="Curve", icon='ICON_OUTLINER_OB_CURVE')
- layout.item_menu_enumO("object.surface_add", "type", text="Surface", icon='ICON_OUTLINER_OB_SURFACE')
- layout.item_menu_enumO("object.metaball_add", "type", 'META', text="Metaball", icon='ICON_OUTLINER_OB_META')
- layout.itemO("object.text_add", text="Text", icon='ICON_OUTLINER_OB_FONT')
-
- layout.itemS()
-
- layout.itemO("object.armature_add", text="Armature", icon='ICON_OUTLINER_OB_ARMATURE')
- layout.item_enumO("object.add", "type", 'LATTICE', icon='ICON_OUTLINER_OB_LATTICE')
- layout.item_enumO("object.add", "type", 'EMPTY', icon='ICON_OUTLINER_OB_EMPTY')
-
- layout.itemS()
-
- layout.item_enumO("object.add", "type", 'CAMERA', icon='ICON_OUTLINER_OB_CAMERA')
- layout.item_menu_enumO("object.lamp_add", "type", 'LAMP', text="Lamp", icon='ICON_OUTLINER_OB_LAMP')
-
-class INFO_MT_game(bpy.types.Menu):
- __space_type__ = 'INFO'
- __label__ = "Game"
-
- def draw(self, context):
- layout = self.layout
-
- gs = context.scene.game_data
-
- layout.itemO("view3d.game_start")
-
- layout.itemS()
-
- layout.itemR(gs, "show_debug_properties")
- layout.itemR(gs, "show_framerate_profile")
- layout.itemR(gs, "show_physics_visualization")
- layout.itemR(gs, "deprecation_warnings")
-
-class INFO_MT_render(bpy.types.Menu):
- __space_type__ = 'INFO'
- __label__ = "Render"
-
- def draw(self, context):
- layout = self.layout
-
- rd = context.scene.render_data
-
- layout.itemO("screen.render", text="Render Image")
- layout.item_booleanO("screen.render", "animation", True, text="Render Animation")
-
- layout.itemS()
-
- layout.itemO("screen.render_view_show")
-
-class INFO_MT_help(bpy.types.Menu):
- __space_type__ = 'INFO'
- __label__ = "Help"
-
- def draw(self, context):
- layout = self.layout
-
- layout.itemO("help.manual")
- layout.itemO("help.release_logs")
-
- layout.itemS()
-
- layout.itemO("help.blender_website")
- layout.itemO("help.blender_eshop")
- layout.itemO("help.developer_community")
- layout.itemO("help.user_community")
- layout.itemS()
- layout.itemO("help.operator_cheat_sheet")
-
-
-bpy.types.register(INFO_HT_header)
-bpy.types.register(INFO_MT_file)
-bpy.types.register(INFO_MT_file_import)
-bpy.types.register(INFO_MT_file_export)
-bpy.types.register(INFO_MT_file_external_data)
-bpy.types.register(INFO_MT_add)
-bpy.types.register(INFO_MT_game)
-bpy.types.register(INFO_MT_render)
-bpy.types.register(INFO_MT_help)
-
-# Help operators
-
-import bpy_ops # XXX - should not need to do this
-del bpy_ops
-
-class HelpOperator(bpy.types.Operator):
- def execute(self, context):
- try: import webbrowser
- except: webbrowser = None
-
- if webbrowser:
- webbrowser.open(self.__URL__)
- else:
- raise Exception("Operator requires a full Python installation")
-
- return ('FINISHED',)
-
-class HELP_OT_manual(HelpOperator):
- __idname__ = "help.manual"
- __label__ = "Manual"
- __URL__ = 'http://wiki.blender.org/index.php/Manual'
-
-class HELP_OT_release_logs(HelpOperator):
- __idname__ = "help.release_logs"
- __label__ = "Release Logs"
- __URL__ = 'http://www.blender.org/development/release-logs/'
-
-class HELP_OT_blender_website(HelpOperator):
- __idname__ = "help.blender_website"
- __label__ = "Blender Website"
- __URL__ = 'http://www.blender.org/'
-
-class HELP_OT_blender_eshop(HelpOperator):
- __idname__ = "help.blender_eshop"
- __label__ = "Blender e-Shop"
- __URL__ = 'http://www.blender3d.org/e-shop'
-
-class HELP_OT_developer_community(HelpOperator):
- __idname__ = "help.developer_community"
- __label__ = "Developer Community"
- __URL__ = 'http://www.blender.org/community/get-involved/'
-
-class HELP_OT_user_community(HelpOperator):
- __idname__ = "help.user_community"
- __label__ = "User Community"
- __URL__ = 'http://www.blender.org/community/user-community/'
-
-class HELP_OT_operator_cheat_sheet(bpy.types.Operator):
- __idname__ = "help.operator_cheat_sheet"
- __label__ = "Operator Cheet Sheet (new textblock)"
- def execute(self, context):
- op_strings = []
- tot = 0
- for op_module_name in dir(bpy.ops):
- op_module = getattr(bpy.ops, op_module_name)
- for op_submodule_name in dir(op_module):
- op = getattr(op_module, op_submodule_name)
- text = repr(op)
- if text.startswith('bpy.ops.'):
- op_strings.append(text)
- tot += 1
-
- op_strings.append('')
-
- bpy.ops.text.new() # XXX - assumes new text is always at the end!
- textblock = bpy.data.texts[-1]
- textblock.write('# %d Operators\n\n' % tot)
- textblock.write('\n'.join(op_strings))
- textblock.name = "OperatorList.txt"
- print("See OperatorList.txt textblock")
- return ('FINISHED',)
-
-
-bpy.ops.add(HELP_OT_manual)
-bpy.ops.add(HELP_OT_release_logs)
-bpy.ops.add(HELP_OT_blender_website)
-bpy.ops.add(HELP_OT_blender_eshop)
-bpy.ops.add(HELP_OT_developer_community)
-bpy.ops.add(HELP_OT_user_community)
-bpy.ops.add(HELP_OT_operator_cheat_sheet)
-
diff --git a/release/ui/space_logic.py b/release/ui/space_logic.py
deleted file mode 100644
index 5748d15a53a..00000000000
--- a/release/ui/space_logic.py
+++ /dev/null
@@ -1,29 +0,0 @@
-import bpy
-
-class LOGIC_PT_properties(bpy.types.Panel):
- __space_type__ = 'LOGIC_EDITOR'
- __region_type__ = 'UI'
- __label__ = "Properties"
-
- def poll(self, context):
- ob = context.active_object
- return ob and ob.game
-
- def draw(self, context):
- layout = self.layout
-
- ob = context.active_object
- game = ob.game
-
- layout.itemO("object.game_property_new", text="Add Game Property")
-
- for i, prop in enumerate(game.properties):
-
- row = layout.row(align=True)
- row.itemR(prop, "name", text="")
- row.itemR(prop, "type", text="")
- row.itemR(prop, "value", text="", toggle=True) # we dont care about the type. rna will display correctly
- row.itemR(prop, "debug", text="", toggle=True, icon='ICON_INFO')
- row.item_intO("object.game_property_remove", "index", i, text="", icon='ICON_X')
-
-bpy.types.register(LOGIC_PT_properties)
diff --git a/release/ui/space_node.py b/release/ui/space_node.py
deleted file mode 100644
index b32e6a9f61a..00000000000
--- a/release/ui/space_node.py
+++ /dev/null
@@ -1,118 +0,0 @@
-
-import bpy
-
-class NODE_HT_header(bpy.types.Header):
- __space_type__ = 'NODE_EDITOR'
-
- def draw(self, context):
- layout = self.layout
-
- snode = context.space_data
-
- row = layout.row(align=True)
- row.template_header()
-
- if context.area.show_menus:
- sub = row.row(align=True)
- sub.itemM("NODE_MT_view")
- sub.itemM("NODE_MT_select")
- sub.itemM("NODE_MT_add")
- sub.itemM("NODE_MT_node")
-
- row = layout.row()
- row.itemR(snode, "tree_type", text="", expand=True)
-
- if snode.tree_type == 'MATERIAL':
- ob = snode.id_from
- id = snode.id
- if ob:
- layout.template_ID(ob, "active_material", new="material.new")
- if id:
- layout.itemR(id, "use_nodes")
-
- elif snode.tree_type == 'TEXTURE':
- row.itemR(snode, "texture_type", text="", expand=True)
-
- id = snode.id
- id_from = snode.id_from
- if id_from:
- layout.template_ID(id_from, "active_texture", new="texture.new")
- if id:
- layout.itemR(id, "use_nodes")
-
- elif snode.tree_type == 'COMPOSITING':
- id = snode.id
-
- layout.itemR(id, "use_nodes")
- layout.itemR(id.render_data, "free_unused_nodes", text="Free Unused")
- layout.itemR(snode, "backdrop")
-
-class NODE_MT_view(bpy.types.Menu):
- __space_type__ = 'NODE_EDITOR'
- __label__ = "View"
-
- def draw(self, context):
- layout = self.layout
-
- # layout.itemO("grease_pencil..")
- # layout.itemS()
-
- layout.itemO("view2d.zoom_in")
- layout.itemO("view2d.zoom_out")
-
- layout.itemS()
-
- layout.itemO("node.view_all")
- layout.itemO("screen.screen_full_area")
-
-class NODE_MT_select(bpy.types.Menu):
- __space_type__ = 'NODE_EDITOR'
- __label__ = "Select"
-
- def draw(self, context):
- layout = self.layout
-
- layout.itemO("node.select_border")
-
- layout.itemS()
- layout.itemO("node.select_all")
- layout.itemO("node.select_linked_from")
- layout.itemO("node.select_linked_to")
-
-class NODE_MT_node(bpy.types.Menu):
- __space_type__ = 'NODE_EDITOR'
- __label__ = "Node"
-
- def draw(self, context):
- layout = self.layout
-
- layout.itemO("tfm.translate")
- layout.itemO("tfm.resize")
- layout.itemO("tfm.rotate")
-
- layout.itemS()
-
- layout.itemO("node.duplicate")
- layout.itemO("node.delete")
-
- # XXX
- # layout.itemS()
- # layout.itemO("node.make_link")
- layout.itemS()
- layout.itemO("node.group_edit")
- layout.itemO("node.group_ungroup")
- layout.itemO("node.group_make")
-
- layout.itemS()
-
- layout.itemO("node.visibility_toggle")
-
- # XXX
- # layout.itemO("node.rename")
- # layout.itemS()
- # layout.itemO("node.show_cyclic_dependencies")
-
-bpy.types.register(NODE_HT_header)
-bpy.types.register(NODE_MT_view)
-bpy.types.register(NODE_MT_select)
-bpy.types.register(NODE_MT_node)
diff --git a/release/ui/space_outliner.py b/release/ui/space_outliner.py
deleted file mode 100644
index 522b620e29d..00000000000
--- a/release/ui/space_outliner.py
+++ /dev/null
@@ -1,52 +0,0 @@
-
-import bpy
-
-class OUTLINER_HT_header(bpy.types.Header):
- __space_type__ = 'OUTLINER'
-
- def draw(self, context):
- so = context.space_data
- sce = context.scene
- layout = self.layout
-
- row = layout.row(align=True)
- row.template_header()
-
- if context.area.show_menus:
- sub = row.row(align=True)
- sub.itemM("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.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.keyingset_add_selected", text="", icon=31)
- row.itemO("outliner.keyingset_remove_selected", text="", icon=32)
-
- row.itemO("anim.insert_keyframe", text="", icon=514)
- row.itemO("anim.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.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
deleted file mode 100644
index a804998cdaa..00000000000
--- a/release/ui/space_sequencer.py
+++ /dev/null
@@ -1,600 +0,0 @@
-
-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'
-
- def draw(self, context):
- layout = self.layout
-
- st = context.space_data
-
- row = layout.row(align=True)
- row.template_header()
-
- if context.area.show_menus:
- sub = row.row(align=True)
- sub.itemM("SEQUENCER_MT_view")
-
- row.itemS()
-
- if st.display_mode == 'SEQUENCER':
- sub.itemM("SEQUENCER_MT_select")
- sub.itemM("SEQUENCER_MT_marker")
- sub.itemM("SEQUENCER_MT_add")
- sub.itemM("SEQUENCER_MT_strip")
-
- layout.itemR(st, "display_mode", text="")
-
- if st.display_mode == 'SEQUENCER':
- layout.itemS()
- layout.itemO("sequencer.reload")
- else:
- layout.itemR(st, "display_channel", text="Channel")
-
-class SEQUENCER_MT_view(bpy.types.Menu):
- __space_type__ = 'SEQUENCE_EDITOR'
- __label__ = "View"
-
- 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.view_all")
- layout.itemO("sequencer.view_selected")
- layout.itemS()
- layout.itemO("screen.screen_full_area", text="Toggle Full Screen")
- """
-
-
- /* 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);
- """
-
- layout.itemR(st, "draw_frames")
- if st.display_mode == 'IMAGE':
- layout.itemR(st, "draw_safe_margin")
- if st.display_mode == 'WAVEFORM':
- layout.itemR(st, "seperate_color_preview")
-
- """
- 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.select_active_side", "side", 'LEFT', text="Strips to the Left")
- layout.item_enumO("sequencer.select_active_side", "side", 'RIGHT', text="Strips to the Right")
- layout.itemS()
- layout.item_enumO("sequencer.select_handles", "side", 'BOTH', text="Surrounding Handles")
- layout.item_enumO("sequencer.select_handles", "side", 'LEFT', text="Left Handle")
- layout.item_enumO("sequencer.select_handles", "side", 'RIGHT', text="Right Handle")
- layout.itemS()
- layout.itemO("sequencer.select_linked")
- layout.itemO("sequencer.select_all_toggle")
- layout.itemO("sequencer.select_inverse")
-
-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("marker.add", text="Add Marker")
- layout.itemO("marker.duplicate", text="Duplicate Marker")
- layout.itemO("marker.move", text="Grab/Move Marker")
- layout.itemO("marker.delete", text="Delete Marker")
- layout.itemS()
- layout.itemL(text="ToDo: Name Marker")
-
- #layout.itemO("sequencer.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.scene_strip_add", text="Scene")
- layout.itemO("sequencer.movie_strip_add", text="Movie")
- layout.itemO("sequencer.image_strip_add", text="Image")
- layout.itemO("sequencer.sound_strip_add", text="Sound")
-
- layout.itemM("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
-
- layout.column()
- layout.item_enumO("sequencer.effect_strip_add", 'type', 'ADD')
- layout.item_enumO("sequencer.effect_strip_add", 'type', 'SUBTRACT')
- layout.item_enumO("sequencer.effect_strip_add", 'type', 'ALPHA_OVER')
- layout.item_enumO("sequencer.effect_strip_add", 'type', 'ALPHA_UNDER')
- layout.item_enumO("sequencer.effect_strip_add", 'type', 'GAMMA_CROSS')
- layout.item_enumO("sequencer.effect_strip_add", 'type', 'MULTIPLY')
- layout.item_enumO("sequencer.effect_strip_add", 'type', 'OVER_DROP')
- layout.item_enumO("sequencer.effect_strip_add", 'type', 'PLUGIN')
- layout.item_enumO("sequencer.effect_strip_add", 'type', 'WIPE')
- layout.item_enumO("sequencer.effect_strip_add", 'type', 'GLOW')
- layout.item_enumO("sequencer.effect_strip_add", 'type', 'TRANSFORM')
- layout.item_enumO("sequencer.effect_strip_add", 'type', 'COLOR')
- layout.item_enumO("sequencer.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
-
- layout.operator_context = 'INVOKE_REGION_WIN'
-
- layout.column()
- layout.item_enumO("tfm.transform", "mode", 'TRANSLATION', text="Grab/Move")
- layout.item_enumO("tfm.transform", "mode", 'TIME_EXTEND', text="Grab/Extend from frame")
- # uiItemO(layout, NULL, 0, "sequencer.strip_snap"); // TODO - add this operator
- layout.itemS()
-
- layout.item_enumO("sequencer.cut", "type", 'HARD', text="Cut (hard) at frame")
- layout.item_enumO("sequencer.cut", "type", 'SOFT', text="Cut (soft) at frame")
- layout.itemO("sequencer.images_separate")
- layout.itemS()
-
- layout.itemO("sequencer.duplicate")
- layout.itemO("sequencer.delete")
-
- strip = act_strip(context)
-
- if strip:
- stype = strip.type
-
- if stype=='EFFECT':
- layout.itemS()
- layout.itemO("sequencer.effect_change")
- layout.itemO("sequencer.effect_reassign_inputs")
- elif stype=='IMAGE':
- layout.itemS()
- layout.itemO("sequencer.image_change")
- elif stype=='SCENE':
- layout.itemS()
- layout.itemO("sequencer.scene_change", text="Change Scene")
- elif stype=='MOVIE':
- layout.itemS()
- layout.itemO("sequencer.movie_change")
-
- layout.itemS()
-
- layout.itemO("sequencer.meta_make")
- layout.itemO("sequencer.meta_separate")
-
- #if (ed && (ed->metastack.first || (ed->act_seq && ed->act_seq->type == SEQ_META))) {
- # uiItemS(layout);
- # uiItemO(layout, NULL, 0, "sequencer.meta_toggle");
- #}
-
- layout.itemS()
- layout.itemO("sequencer.reload")
- layout.itemS()
- layout.itemO("sequencer.lock")
- layout.itemO("sequencer.unlock")
- layout.itemO("sequencer.mute")
- layout.itemO("sequencer.unmute")
-
- layout.item_booleanO("sequencer.mute", "unselected", 1, text="Mute Deselected Strips")
-
- layout.itemO("sequencer.snap")
-
-# Panels
-class SequencerButtonsPanel(bpy.types.Panel):
- __space_type__ = 'SEQUENCE_EDITOR'
- __region_type__ = 'UI'
-
- def poll(self, context):
- return context.space_data.display_mode == 'SEQUENCER' and act_strip(context) != None
-
-class SequencerButtonsPanel_Output(bpy.types.Panel):
- __space_type__ = 'SEQUENCE_EDITOR'
- __region_type__ = 'UI'
-
- def poll(self, context):
- return context.space_data.display_mode != 'SEQUENCER'
-
-class SEQUENCER_PT_edit(SequencerButtonsPanel):
- __label__ = "Edit Strip"
-
- def draw(self, context):
- layout = self.layout
-
- strip = act_strip(context)
-
- split = layout.split(percentage=0.3)
- split.itemL(text="Name:")
- split.itemR(strip, "name", text="")
-
- split = layout.split(percentage=0.3)
- split.itemL(text="Type:")
- split.itemR(strip, "type", text="")
-
- split = layout.split(percentage=0.3)
- split.itemL(text="Blend:")
- split.itemR(strip, "blend_mode", text="")
-
- row = layout.row()
- if strip.mute == True:
- row.itemR(strip, "mute", toggle=True, icon='ICON_RESTRICT_VIEW_ON', text="")
- elif strip.mute == False:
- row.itemR(strip, "mute", toggle=True, icon='ICON_RESTRICT_VIEW_OFF', text="")
-
- sub = row.row()
- sub.active = (not strip.mute)
-
- sub.itemR(strip, "blend_opacity", text="Opacity", slider=True)
-
- row = layout.row()
- row.itemR(strip, "lock")
- row.itemR(strip, "frame_locked", text="Frame Lock")
-
- col = layout.column()
- col.enabled = not strip.lock
- col.itemR(strip, "channel")
- col.itemR(strip, "start_frame")
- col.itemR(strip, "length")
-
- col = layout.column(align=True)
- col.itemL(text="Offset:")
- col.itemR(strip, "start_offset", text="Start")
- col.itemR(strip, "end_offset", text="End")
-
- col = layout.column(align=True)
- col.itemL(text="Still:")
- col.itemR(strip, "start_still", text="Start")
- col.itemR(strip, "end_still", text="End")
-
-class SEQUENCER_PT_effect(SequencerButtonsPanel):
- __label__ = "Effect Strip"
-
- def poll(self, context):
- if context.space_data.display_mode != 'SEQUENCER':
- return False
-
- 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':
-
- col = layout.column()
- col.itemR(strip, "transition_type")
- col.itemL(text="Direction:")
- col.row().itemR(strip, "direction", expand=True)
-
- col = layout.column()
- col.itemR(strip, "blur_width", slider=True)
- if strip.transition_type in ('SINGLE', 'DOUBLE'):
- col.itemR(strip, "angle")
-
- elif strip.type == 'GLOW':
- flow = layout.column_flow()
- flow.itemR(strip, "threshold", slider=True)
- flow.itemR(strip, "clamp", slider=True)
- 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':
-
- col = layout.column()
- col.itemR(strip, "interpolation")
- col.itemR(strip, "translation_unit")
-
- col = layout.column(align=True)
- col.itemL(text="Position X:")
- col.itemR(strip, "translate_start_x", text="Start")
- col.itemR(strip, "translate_end_x", text="End")
-
- col = layout.column(align=True)
- col.itemL(text="Position Y:")
- col.itemR(strip, "translate_start_y", text="Start")
- col.itemR(strip, "translate_end_y", text="End")
-
- layout.itemS()
-
- col = layout.column(align=True)
- col.itemL(text="Scale X:")
- col.itemR(strip, "scale_start_x", text="Start")
- col.itemR(strip, "scale_end_x", text="End")
-
- col = layout.column(align=True)
- col.itemL(text="Scale Y:")
- col.itemR(strip, "scale_start_y", text="Start")
- col.itemR(strip, "scale_end_y", text="End")
-
- layout.itemS()
-
- col = layout.column(align=True)
- col.itemL(text="Rotation:")
- col.itemR(strip, "rotation_start", text="Start")
- col.itemR(strip, "rotation_end", text="End")
-
-class SEQUENCER_PT_input(SequencerButtonsPanel):
- __label__ = "Strip Input"
-
- def poll(self, context):
- if context.space_data.display_mode != 'SEQUENCER':
- return False
-
- strip = act_strip(context)
- if not strip:
- return False
-
- return strip.type in ('MOVIE', 'IMAGE')
-
- def draw(self, context):
- layout = self.layout
-
- strip = act_strip(context)
-
- split = layout.split(percentage=0.2)
- col = split.column()
- col.itemL(text="Path:")
- col = split.column()
- col.itemR(strip, "directory", text="")
-
- # Current element for the filename
-
-
- elem = strip.getStripElem(context.scene.current_frame)
- if elem:
- split = layout.split(percentage=0.2)
- col = split.column()
- col.itemL(text="File:")
- col = split.column()
- col.itemR(elem, "filename", text="") # strip.elements[0] could be a fallback
-
- layout.itemR(strip, "use_translation", text="Image Offset:")
- if strip.transform:
- col = layout.column(align=True)
- col.active = strip.use_translation
- col.itemR(strip.transform, "offset_x", text="X")
- col.itemR(strip.transform, "offset_y", text="Y")
-
- layout.itemR(strip, "use_crop", text="Image Crop:")
- if strip.crop:
- col = layout.column(align=True)
- col.active = strip.use_crop
- col.itemR(strip.crop, "top")
- col.itemR(strip.crop, "left")
- col.itemR(strip.crop, "bottom")
- col.itemR(strip.crop, "right")
-
- col = layout.column(align=True)
- col.itemL(text="Trim Duration:")
- col.itemR(strip, "animation_start_offset", text="Start")
- col.itemR(strip, "animation_end_offset", text="End")
-
-class SEQUENCER_PT_sound(SequencerButtonsPanel):
- __label__ = "Sound"
-
- def poll(self, context):
- if context.space_data.display_mode != 'SEQUENCER':
- return False
-
- strip = act_strip(context)
- if not strip:
- return False
-
- return strip.type in ('SOUND', )
-
- def draw(self, context):
- layout = self.layout
-
- strip = act_strip(context)
-
- layout.template_ID(strip, "sound", new="sound.open")
-
- layout.itemS()
- layout.itemR(strip.sound, "filename", text="")
-
- row = layout.row()
- if strip.sound.packed_file:
- row.itemO("sound.unpack", icon='ICON_PACKAGE', text="Unpack")
- else:
- row.itemO("sound.pack", icon='ICON_UGLYPACKAGE', text="Pack")
-
- row.itemR(strip.sound, "caching")
-
-class SEQUENCER_PT_filter(SequencerButtonsPanel):
- __label__ = "Filter"
-
- def poll(self, context):
- if context.space_data.display_mode != 'SEQUENCER':
- return False
-
- 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)
-
- col = layout.column()
- col.itemL(text="Video:")
- col.itemR(strip, "strobe")
- col.itemR(strip, "de_interlace")
-
- col = layout.column()
- col.itemL(text="Colors:")
- col.itemR(strip, "multiply_colors", text="Multiply")
- col.itemR(strip, "premultiply")
- col.itemR(strip, "convert_float")
-
- col = layout.column()
- col.itemL(text="Flip:")
- col.itemR(strip, "flip_x", text="X")
- col.itemR(strip, "flip_y", text="Y")
- col.itemR(strip, "reverse_frames", text="Backwards")
-
- layout.itemR(strip, "use_color_balance")
- if strip.color_balance: # TODO - need to add this somehow
- row = layout.row()
- row.active = strip.use_color_balance
- col = row.column()
- col.itemR(strip.color_balance, "lift")
- col.itemR(strip.color_balance, "inverse_lift", text="Inverse")
- col = row.column()
- col.itemR(strip.color_balance, "gamma")
- col.itemR(strip.color_balance, "inverse_gamma", text="Inverse")
- col = row.column()
- col.itemR(strip.color_balance, "gain")
- col.itemR(strip.color_balance, "inverse_gain", text="Inverse")
-
-class SEQUENCER_PT_proxy(SequencerButtonsPanel):
- __label__ = "Proxy"
-
- def poll(self, context):
- if context.space_data.display_mode != 'SEQUENCER':
- return False
-
- 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)
-
- self.layout.itemR(strip, "use_proxy", text="")
-
- def draw(self, context):
- layout = self.layout
-
- strip = act_strip(context)
-
- flow = layout.column_flow()
- flow.itemR(strip, "proxy_custom_directory")
- if strip.proxy: # TODO - need to add this somehow
- flow.itemR(strip.proxy, "directory")
- flow.itemR(strip.proxy, "file")
-
-class SEQUENCER_PT_view(SequencerButtonsPanel_Output):
- __label__ = "View Settings"
-
- def draw(self, context):
- layout = self.layout
-
- st = context.space_data
-
- col = layout.column()
- col.itemR(st, "draw_overexposed") # text="Zebra"
- col.itemR(st, "draw_safe_margin")
-
-bpy.types.register(SEQUENCER_HT_header) # header/menu classes
-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) # sequencer panels
-bpy.types.register(SEQUENCER_PT_effect)
-bpy.types.register(SEQUENCER_PT_input)
-bpy.types.register(SEQUENCER_PT_sound)
-bpy.types.register(SEQUENCER_PT_filter)
-bpy.types.register(SEQUENCER_PT_proxy)
-
-bpy.types.register(SEQUENCER_PT_view) # view panels
diff --git a/release/ui/space_text.py b/release/ui/space_text.py
deleted file mode 100644
index 117033c50a1..00000000000
--- a/release/ui/space_text.py
+++ /dev/null
@@ -1,245 +0,0 @@
-
-import bpy
-
-class TEXT_HT_header(bpy.types.Header):
- __space_type__ = 'TEXT_EDITOR'
-
- def draw(self, context):
- layout = self.layout
-
- st = context.space_data
- text = st.text
-
- row = layout.row(align=True)
- row.template_header()
-
- if context.area.show_menus:
- sub = row.row(align=True)
- sub.itemM("TEXT_MT_text")
- if text:
- sub.itemM("TEXT_MT_edit")
- sub.itemM("TEXT_MT_format")
-
- if text and text.modified:
- row = layout.row()
- # row.color(redalert)
- row.itemO("text.resolve_conflict", text="", icon='ICON_HELP')
-
- layout.template_ID(st, "text", new="text.new", unlink="text.unlink")
-
- row = layout.row(align=True)
- row.itemR(st, "line_numbers", text="")
- row.itemR(st, "word_wrap", text="")
- row.itemR(st, "syntax_highlight", text="")
-
- if text:
- row = layout.row()
- if text.filename != "":
- if text.dirty:
- row.itemL(text="File: *%s (unsaved)" % text.filename)
- else:
- row.itemL(text="File: %s" % 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):
- layout = self.layout
-
- st = context.space_data
-
- flow = layout.column_flow()
- flow.itemR(st, "line_numbers")
- flow.itemR(st, "word_wrap")
- flow.itemR(st, "syntax_highlight")
- flow.itemR(st, "live_edit")
-
- 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):
- layout = self.layout
-
- st = context.space_data
-
- # find
- col = layout.column(align=True)
- row = col.row()
- row.itemR(st, "find_text", text="")
- row.itemO("text.find_set_selected", text="", icon='ICON_TEXT')
- col.itemO("text.find")
-
- # replace
- col = layout.column(align=True)
- row = col.row()
- row.itemR(st, "replace_text", text="")
- row.itemO("text.replace_set_selected", text="", icon='ICON_TEXT')
- col.itemO("text.replace")
-
- # mark
- layout.itemO("text.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.new")
- layout.itemO("text.open")
-
- if text:
- layout.itemO("text.reload")
-
- layout.column()
- layout.itemO("text.save")
- layout.itemO("text.save_as")
-
- if text.filename != "":
- layout.itemO("text.make_internal")
-
- layout.column()
- layout.itemO("text.run_script")
-
- #ifndef DISABLE_PYTHON
- # XXX if(BPY_is_pyconstraint(text))
- # XXX uiMenuItemO(head, 0, "text.refresh_pyconstraints");
- #endif
-
- layout.itemS()
-
- layout.itemO("text.properties", icon='ICON_MENU_PANEL')
-
- #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
-
-class TEXT_MT_edit_view(bpy.types.Menu):
- __space_type__ = 'TEXT_EDITOR'
- __label__ = "View"
-
- def draw(self, context):
- layout = self.layout
-
- layout.item_enumO("text.move", "type", 'FILE_TOP', text="Top of File")
- layout.item_enumO("text.move", "type", 'FILE_BOTTOM', text="Bottom of File")
-
-class TEXT_MT_edit_select(bpy.types.Menu):
- __space_type__ = 'TEXT_EDITOR'
- __label__ = "Select"
-
- def draw(self, context):
- layout = self.layout
-
- layout.itemO("text.select_all")
- layout.itemO("text.select_line")
-
-class TEXT_MT_edit_markers(bpy.types.Menu):
- __space_type__ = 'TEXT_EDITOR'
- __label__ = "Markers"
-
- def draw(self, context):
- layout = self.layout
-
- layout.itemO("text.markers_clear")
- layout.itemO("text.next_marker")
- layout.itemO("text.previous_marker")
-
-class TEXT_MT_format(bpy.types.Menu):
- __space_type__ = 'TEXT_EDITOR'
- __label__ = "Format"
-
- def draw(self, context):
- layout = self.layout
-
- layout.itemO("text.indent")
- layout.itemO("text.unindent")
-
- layout.itemS()
-
- layout.itemO("text.comment")
- layout.itemO("text.uncomment")
-
- layout.itemS()
-
- layout.item_menu_enumO("text.convert_whitespace", "type")
-
-class TEXT_MT_edit_to3d(bpy.types.Menu):
- __space_type__ = 'TEXT_EDITOR'
- __label__ = "Text To 3D Object"
-
- def draw(self, context):
- layout = self.layout
-
- layout.item_booleanO("text.to_3d_object", "split_lines", False, text="One Object");
- layout.item_booleanO("text.to_3d_object", "split_lines", True, text="One Object Per Line");
-
-class TEXT_MT_edit(bpy.types.Menu):
- __space_type__ = 'TEXT_EDITOR'
- __label__ = "Edit"
-
- def poll(self, context):
- return (context.space_data.text)
-
- def draw(self, context):
- layout = self.layout
-
- layout.itemO("ed.undo")
- layout.itemO("ed.redo")
-
- layout.itemS()
-
- layout.itemO("text.cut")
- layout.itemO("text.copy")
- layout.itemO("text.paste")
-
- layout.itemS()
-
- layout.itemM("TEXT_MT_edit_view")
- layout.itemM("TEXT_MT_edit_select")
- layout.itemM("TEXT_MT_edit_markers")
-
- layout.itemS()
-
- layout.itemO("text.jump")
- layout.itemO("text.properties", text="Find...")
-
- layout.itemS()
-
- layout.itemM("TEXT_MT_edit_to3d")
-
-bpy.types.register(TEXT_HT_header)
-bpy.types.register(TEXT_PT_properties)
-bpy.types.register(TEXT_PT_find)
-bpy.types.register(TEXT_MT_text)
-bpy.types.register(TEXT_MT_format)
-bpy.types.register(TEXT_MT_edit)
-bpy.types.register(TEXT_MT_edit_view)
-bpy.types.register(TEXT_MT_edit_select)
-bpy.types.register(TEXT_MT_edit_markers)
-bpy.types.register(TEXT_MT_edit_to3d)
diff --git a/release/ui/space_time.py b/release/ui/space_time.py
deleted file mode 100644
index 696dcf18623..00000000000
--- a/release/ui/space_time.py
+++ /dev/null
@@ -1,151 +0,0 @@
-
-import bpy
-
-class TIME_HT_header(bpy.types.Header):
- __space_type__ = 'TIMELINE'
-
- def draw(self, context):
- layout = self.layout
-
- st = context.space_data
- scene = context.scene
- tools = context.tool_settings
- screen = context.screen
-
- row = layout.row(align=True)
- row.template_header()
-
- if context.area.show_menus:
- sub = row.row(align=True)
- sub.itemM("TIME_MT_view")
- sub.itemM("TIME_MT_frame")
- sub.itemM("TIME_MT_playback")
-
- layout.itemR(scene, "use_preview_range", text="PR")
-
- row = layout.row(align=True)
- if not scene.use_preview_range:
- row.itemR(scene, "start_frame", text="Start")
- row.itemR(scene, "end_frame", text="End")
- else:
- row.itemR(scene, "preview_range_start_frame", text="Start")
- row.itemR(scene, "preview_range_end_frame", text="End")
-
- layout.itemR(scene, "current_frame", text="")
-
- layout.itemS()
-
- row = layout.row(align=True)
- row.item_booleanO("screen.frame_jump", "end", False, text="", icon='ICON_REW')
- row.item_booleanO("screen.keyframe_jump", "next", False, text="", icon='ICON_PREV_KEYFRAME')
- if not screen.animation_playing:
- row.item_booleanO("screen.animation_play", "reverse", True, text="", icon='ICON_PLAY_REVERSE')
- row.itemO("screen.animation_play", text="", icon='ICON_PLAY')
- else:
- sub = row.row()
- sub.scale_x = 2.0
- sub.itemO("screen.animation_play", text="", icon='ICON_PAUSE')
- row.item_booleanO("screen.keyframe_jump", "next", True, text="", icon='ICON_NEXT_KEYFRAME')
- row.item_booleanO("screen.frame_jump", "end", True, text="", icon='ICON_FF')
-
- row = layout.row(align=True)
- row.itemR(tools, "enable_auto_key", text="", toggle=True, icon='ICON_REC')
- if screen.animation_playing and tools.enable_auto_key:
- subsub = row.row()
- subsub.itemR(tools, "record_with_nla", toggle=True)
-
- layout.itemR(scene, "sync_audio", text="", toggle=True, icon='ICON_SPEAKER')
-
- layout.itemS()
-
- row = layout.row(align=True)
- row.item_pointerR(scene, "active_keying_set", scene, "keying_sets", text="")
- row.itemO("anim.insert_keyframe", text="", icon='ICON_KEY_HLT')
- row.itemO("anim.delete_keyframe", text="", icon='ICON_KEY_DEHLT')
-
-class TIME_MT_view(bpy.types.Menu):
- __space_type__ = 'TIMELINE'
- __label__ = "View"
-
- def draw(self, context):
- layout = self.layout
-
- st = context.space_data
-
- layout.itemO("anim.time_toggle")
-
- layout.itemS()
-
- layout.itemR(st, "only_selected")
-
-class TIME_MT_frame(bpy.types.Menu):
- __space_type__ = 'TIMELINE'
- __label__ = "Frame"
-
- def draw(self, context):
- layout = self.layout
- tools = context.tool_settings
-
- layout.itemO("marker.add", text="Add Marker")
- layout.itemO("marker.duplicate", text="Duplicate Marker")
- layout.itemO("marker.move", text="Grab/Move Marker")
- layout.itemO("marker.delete", text="Delete Marker")
- layout.itemL(text="ToDo: Name Marker")
-
- layout.itemS()
-
- layout.itemO("time.start_frame_set")
- layout.itemO("time.end_frame_set")
-
- layout.itemS()
-
- sub = layout.row()
- sub.active = tools.enable_auto_key
- sub.itemM("TIME_MT_autokey")
-
-class TIME_MT_playback(bpy.types.Menu):
- __space_type__ = 'TIMELINE'
- __label__ = "Playback"
-
- def draw(self, context):
- layout = self.layout
-
- st = context.space_data
- scene = context.scene
-
- layout.itemR(st, "play_top_left")
- layout.itemR(st, "play_all_3d")
- layout.itemR(st, "play_anim")
- layout.itemR(st, "play_buttons")
- layout.itemR(st, "play_image")
- layout.itemR(st, "play_sequencer")
- layout.itemR(st, "play_nodes")
-
- layout.itemS()
-
- layout.itemR(st, "continue_physics")
-
- layout.itemS()
-
- layout.itemR(scene, "sync_audio", icon='ICON_SPEAKER')
- layout.itemR(scene, "mute_audio")
- layout.itemR(scene, "scrub_audio")
-
-class TIME_MT_autokey(bpy.types.Menu):
- __space_type__ = 'TIMELINE'
- __label__ = "Auto-Keyframing Mode"
-
- def draw(self, context):
- layout = self.layout
- tools = context.tool_settings
-
- layout.active = tools.enable_auto_key
-
- layout.item_enumR(tools, "autokey_mode", 'ADD_REPLACE_KEYS')
- layout.item_enumR(tools, "autokey_mode", 'REPLACE_KEYS')
-
-bpy.types.register(TIME_HT_header)
-bpy.types.register(TIME_MT_view)
-bpy.types.register(TIME_MT_frame)
-bpy.types.register(TIME_MT_autokey)
-bpy.types.register(TIME_MT_playback)
diff --git a/release/ui/space_userpref.py b/release/ui/space_userpref.py
deleted file mode 100644
index 9798e0ccab6..00000000000
--- a/release/ui/space_userpref.py
+++ /dev/null
@@ -1,405 +0,0 @@
-
-import bpy
-
-class USERPREF_HT_header(bpy.types.Header):
- __space_type__ = 'USER_PREFERENCES'
-
- def draw(self, context):
- layout = self.layout
- layout.template_header(menus=False)
-
- userpref = context.user_preferences
-
- layout.operator_context = "EXEC_AREA"
- layout.itemO("wm.save_homefile", text="Save As Default")
-
-class USERPREF_MT_view(bpy.types.Menu):
- __space_type__ = 'USER_PREFERENCES'
- __label__ = "View"
-
- def draw(self, context):
- layout = self.layout
-
-class USERPREF_PT_tabs(bpy.types.Panel):
- __space_type__ = 'USER_PREFERENCES'
- __show_header__ = False
-
- def draw(self, context):
- layout = self.layout
-
- userpref = context.user_preferences
-
- layout.itemR(userpref, "active_section", expand=True)
-
-class USERPREF_PT_view(bpy.types.Panel):
- __space_type__ = 'USER_PREFERENCES'
- __label__ = "View"
- __show_header__ = False
-
- def poll(self, context):
- userpref = context.user_preferences
- return (userpref.active_section == 'VIEW_CONTROLS')
-
- def draw(self, context):
- layout = self.layout
-
- userpref = context.user_preferences
- view = userpref.view
-
- split = layout.split()
-
- col = split.column()
- sub = col.split(percentage=0.85)
-
- sub1 = sub.column()
- sub1.itemL(text="Display:")
- sub1.itemR(view, "tooltips")
- sub1.itemR(view, "display_object_info", text="Object Info")
- sub1.itemR(view, "use_large_cursors")
- sub1.itemR(view, "show_view_name", text="View Name")
- sub1.itemR(view, "show_playback_fps", text="Playback FPS")
- sub1.itemR(view, "global_scene")
- sub1.itemR(view, "pin_floating_panels")
- sub1.itemR(view, "object_center_size")
- sub1.itemS()
- sub1.itemS()
- sub1.itemS()
- sub1.itemR(view, "show_mini_axis", text="Display Mini Axis")
- sub2 = sub1.column()
- sub2.enabled = view.show_mini_axis
- sub2.itemR(view, "mini_axis_size", text="Size")
- sub2.itemR(view, "mini_axis_brightness", text="Brightness")
-
- col = split.column()
- sub = col.split(percentage=0.85)
-
- sub1 = sub.column()
- sub1.itemL(text="View Manipulation:")
- sub1.itemR(view, "auto_depth")
- sub1.itemR(view, "global_pivot")
- sub1.itemR(view, "zoom_to_mouse")
- sub1.itemR(view, "rotate_around_selection")
- sub1.itemS()
- sub1.itemL(text="Zoom Style:")
- sub1.row().itemR(view, "viewport_zoom_style", expand=True)
- sub1.itemL(text="Orbit Style:")
- sub1.row().itemR(view, "view_rotation", expand=True)
- sub1.itemR(view, "perspective_orthographic_switch")
- sub1.itemR(view, "smooth_view")
- sub1.itemR(view, "rotation_angle")
- sub1.itemS()
- sub1.itemL(text="NDOF Device:")
- sub1.itemR(view, "ndof_pan_speed", text="Pan Speed")
- sub1.itemR(view, "ndof_rotate_speed", text="Orbit Speed")
-
- col = split.column()
- sub = col.split(percentage=0.85)
-
- sub1 = sub.column()
- sub1.itemL(text="Mouse Buttons:")
-
- sub2 = sub1.column()
- sub2.enabled = (view.select_mouse == 'RIGHT')
- sub2.itemR(view, "emulate_3_button_mouse")
- sub1.itemL(text="Select With:")
- sub1.row().itemR(view, "select_mouse", expand=True)
- sub1.itemL(text="Middle Mouse:")
- sub1.row().itemR(view, "middle_mouse", expand=True)
- sub1.itemR(view, "use_middle_mouse_paste")
- sub1.itemL(text="Mouse Wheel:")
- sub1.itemR(view, "wheel_invert_zoom", text="Invert Zoom")
- sub1.itemR(view, "wheel_scroll_lines", text="Scroll Lines")
- sub1.itemS()
- sub1.itemS()
- sub1.itemS()
- sub1.itemL(text="Menus:")
- sub1.itemR(view, "open_mouse_over")
- sub1.itemL(text="Menu Open Delay:")
- sub1.itemR(view, "open_toplevel_delay", text="Top Level")
- sub1.itemR(view, "open_sublevel_delay", text="Sub Level")
-
- col = split.column()
- sub = col.split(percentage=0.85)
-
- sub1 = sub.column()
- #manipulator
- sub1.itemR(view, "use_manipulator")
- sub2 = sub1.column()
- sub2.enabled = view.use_manipulator
- sub2.itemR(view, "manipulator_size", text="Size")
- sub2.itemR(view, "manipulator_handle_size", text="Handle Size")
- sub2.itemR(view, "manipulator_hotspot", text="Hotspot")
- sub1.itemS()
- sub1.itemS()
- sub1.itemS()
- sub1.itemL(text="Toolbox:")
- sub1.itemR(view, "use_column_layout")
- sub1.itemL(text="Open Toolbox Delay:")
- sub1.itemR(view, "open_left_mouse_delay", text="Hold LMB")
- sub1.itemR(view, "open_right_mouse_delay", text="Hold RMB")
-
-class USERPREF_PT_edit(bpy.types.Panel):
- __space_type__ = 'USER_PREFERENCES'
- __label__ = "Edit"
- __show_header__ = False
-
- def poll(self, context):
- userpref = context.user_preferences
- return (userpref.active_section == 'EDIT_METHODS')
-
- def draw(self, context):
- layout = self.layout
-
- userpref = context.user_preferences
- edit = userpref.edit
- view = userpref.view
-
- split = layout.split()
-
- col = split.column()
- sub = col.split(percentage=0.85)
-
- sub1 = sub.column()
- sub1.itemL(text="Link Materials To:")
- sub1.row().itemR(edit, "material_link", expand=True)
- sub1.itemS()
- sub1.itemS()
- sub1.itemS()
- sub1.itemL(text="New Objects:")
- sub1.itemR(edit, "enter_edit_mode")
- sub1.itemL(text="Align To:")
- sub1.row().itemR(edit, "object_align", expand=True)
- sub1.itemS()
- sub1.itemS()
- sub1.itemS()
- sub1.itemL(text="Transform:")
- sub1.itemR(edit, "drag_immediately")
-
- col = split.column()
- sub = col.split(percentage=0.85)
-
- sub1 = sub.column()
- sub1.itemL(text="Snap:")
- sub1.itemR(edit, "snap_translate", text="Translate")
- sub1.itemR(edit, "snap_rotate", text="Rotate")
- sub1.itemR(edit, "snap_scale", text="Scale")
- sub1.itemS()
- sub1.itemS()
- sub1.itemS()
- sub1.itemL(text="Grease Pencil:")
- sub1.itemR(edit, "grease_pencil_manhattan_distance", text="Manhattan Distance")
- sub1.itemR(edit, "grease_pencil_euclidean_distance", text="Euclidean Distance")
- # sub1.itemR(edit, "grease_pencil_simplify_stroke", text="Simplify Stroke")
- sub1.itemR(edit, "grease_pencil_eraser_radius", text="Eraser Radius")
- sub1.itemR(edit, "grease_pencil_smooth_stroke", text="Smooth Stroke")
-
- col = split.column()
- sub = col.split(percentage=0.85)
-
- sub1 = sub.column()
- sub1.itemL(text="Keyframing:")
- sub1.itemR(edit, "use_visual_keying")
- sub1.itemR(edit, "new_interpolation_type", text="New F-Curves")
- sub1.itemS()
- sub1.itemR(edit, "auto_keying_enable", text="Auto Keyframing")
- sub2 = sub1.column()
- sub2.enabled = edit.auto_keying_enable
- sub2.row().itemR(edit, "auto_keying_mode", expand=True)
- sub2.itemR(edit, "auto_keyframe_insert_available", text="Only Insert Available")
- sub2.itemR(edit, "auto_keyframe_insert_needed", text="Only Insert Needed")
-
- sub1.itemS()
- sub1.itemS()
- sub1.itemS()
-
- sub1.itemL(text="Undo:")
- sub1.itemR(edit, "global_undo")
- sub1.itemR(edit, "undo_steps", text="Steps")
- sub1.itemR(edit, "undo_memory_limit", text="Memory Limit")
-
- sub1.itemS()
- sub1.itemS()
- sub1.itemS()
-
- col = split.column()
- sub = col.split(percentage=0.85)
-
- sub1 = sub.column()
- sub1.itemL(text="Duplicate Data:")
- sub1.itemR(edit, "duplicate_mesh", text="Mesh")
- sub1.itemR(edit, "duplicate_surface", text="Surface")
- sub1.itemR(edit, "duplicate_curve", text="Curve")
- sub1.itemR(edit, "duplicate_text", text="Text")
- sub1.itemR(edit, "duplicate_metaball", text="Metaball")
- sub1.itemR(edit, "duplicate_armature", text="Armature")
- sub1.itemR(edit, "duplicate_lamp", text="Lamp")
- sub1.itemR(edit, "duplicate_material", text="Material")
- sub1.itemR(edit, "duplicate_texture", text="Texture")
- sub1.itemR(edit, "duplicate_ipo", text="F-Curve")
- sub1.itemR(edit, "duplicate_action", text="Action")
- sub1.itemR(edit, "duplicate_particle", text="Particle")
-
-class USERPREF_PT_system(bpy.types.Panel):
- __space_type__ = 'USER_PREFERENCES'
- __label__ = "System"
- __show_header__ = False
-
- def poll(self, context):
- userpref = context.user_preferences
- return (userpref.active_section == 'SYSTEM_OPENGL')
-
- def draw(self, context):
- layout = self.layout
-
- userpref = context.user_preferences
- system = userpref.system
-
- split = layout.split()
-
- col = split.column()
- sub = col.split(percentage=0.9)
-
- sub1 = sub.column()
- sub1.itemL(text="General:")
- sub1.itemR(system, "dpi")
- sub1.itemR(system, "frame_server_port")
- sub1.itemR(system, "scrollback", text="Console Scrollback")
- sub1.itemR(system, "emulate_numpad")
- sub1.itemR(system, "auto_run_python_scripts")
-
- sub1.itemS()
- sub1.itemS()
- sub1.itemS()
-
- sub1.itemL(text="Sound:")
- sub1.row().itemR(system, "audio_device", expand=True)
- sub2 = sub1.column()
- sub2.active = system.audio_device != 'AUDIO_DEVICE_NULL'
- sub2.itemR(system, "enable_all_codecs")
- sub2.itemR(system, "game_sound")
- sub2.itemR(system, "audio_channels", text="Channels")
- sub2.itemR(system, "audio_mixing_buffer", text="Mixing Buffer")
- sub2.itemR(system, "audio_sample_rate", text="Sample Rate")
- sub2.itemR(system, "audio_sample_format", text="Sample Format")
-
- col = split.column()
- sub = col.split(percentage=0.9)
-
- sub1 = sub .column()
- sub1.itemL(text="Weight Colors:")
- sub1.itemR(system, "use_weight_color_range", text="Use Custom Range")
- sub2 = sub1.column()
- sub2.active = system.use_weight_color_range
- sub2.template_color_ramp(system, "weight_color_range", expand=True)
-
- sub1.itemS()
- sub1.itemS()
- sub1.itemS()
-
- sub1.itemR(system, "language")
- sub1.itemL(text="Translate:")
- sub1.itemR(system, "translate_tooltips", text="Tooltips")
- sub1.itemR(system, "translate_buttons", text="Labels")
- sub1.itemR(system, "translate_toolbox", text="Toolbox")
-
- sub1.itemS()
-
- sub1.itemR(system, "use_textured_fonts")
-
- col = split.column()
- sub = col.split(percentage=0.9)
-
- sub1 = sub.column()
-
- sub1.itemL(text="OpenGL:")
- sub1.itemR(system, "clip_alpha", slider=True)
- sub1.itemR(system, "use_mipmaps")
- sub1.itemL(text="Window Draw Method:")
- sub1.row().itemR(system, "window_draw_method", expand=True)
- sub1.itemL(text="Textures:")
- sub1.itemR(system, "gl_texture_limit", text="Limit Size")
- sub1.itemR(system, "texture_time_out", text="Time Out")
- sub1.itemR(system, "texture_collection_rate", text="Collection Rate")
-
- sub1.itemS()
- sub1.itemS()
- sub1.itemS()
-
- sub1.itemL(text="Sequencer:")
- sub1.itemR(system, "prefetch_frames")
- sub1.itemR(system, "memory_cache_limit")
-
-class USERPREF_PT_filepaths(bpy.types.Panel):
- __space_type__ = 'USER_PREFERENCES'
- __label__ = "File Paths"
- __show_header__ = False
-
- def poll(self, context):
- userpref = context.user_preferences
- return (userpref.active_section == 'FILE_PATHS')
-
- def draw(self, context):
- layout = self.layout
-
- userpref = context.user_preferences
- paths = userpref.filepaths
-
- split = layout.split(percentage=0.6)
-
- col = split.column()
- col.itemL(text="File Paths:")
- sub = col.split(percentage=0.3)
-
- sub.itemL(text="Fonts:")
- sub.itemR(paths, "fonts_directory", text="")
- sub = col.split(percentage=0.3)
- sub.itemL(text="Textures:")
- sub.itemR(paths, "textures_directory", text="")
- sub = col.split(percentage=0.3)
- sub.itemL(text="Texture Plugins:")
- sub.itemR(paths, "texture_plugin_directory", text="")
- sub = col.split(percentage=0.3)
- sub.itemL(text="Sequence Plugins:")
- sub.itemR(paths, "sequence_plugin_directory", text="")
- sub = col.split(percentage=0.3)
- sub.itemL(text="Render Output:")
- sub.itemR(paths, "render_output_directory", text="")
- sub = col.split(percentage=0.3)
- sub.itemL(text="Scripts:")
- sub.itemR(paths, "python_scripts_directory", text="")
- sub = col.split(percentage=0.3)
- sub.itemL(text="Sounds:")
- sub.itemR(paths, "sounds_directory", text="")
- sub = col.split(percentage=0.3)
- sub.itemL(text="Temp:")
- sub.itemR(paths, "temporary_directory", text="")
-
- col = split.column()
- sub = col.split(percentage=0.2)
- sub1 = sub.column()
- sub2 = sub.column()
- sub2.itemL(text="Save & Load:")
- sub2.itemR(paths, "use_relative_paths")
- sub2.itemR(paths, "compress_file")
- sub2.itemR(paths, "load_ui")
- sub2.itemR(paths, "filter_file_extensions")
- sub2.itemR(paths, "hide_dot_files_datablocks")
- sub2.itemS()
- sub2.itemS()
- sub2.itemL(text="Auto Save:")
- sub2.itemR(paths, "save_version")
- sub2.itemR(paths, "recent_files")
- sub2.itemR(paths, "save_preview_images")
- sub2.itemR(paths, "auto_save_temporary_files")
- sub3 = sub2.column()
- sub3.enabled = paths.auto_save_temporary_files
- sub3.itemR(paths, "auto_save_time", text="Timer (mins)")
-
-bpy.types.register(USERPREF_HT_header)
-bpy.types.register(USERPREF_MT_view)
-bpy.types.register(USERPREF_PT_tabs)
-bpy.types.register(USERPREF_PT_view)
-bpy.types.register(USERPREF_PT_edit)
-bpy.types.register(USERPREF_PT_system)
-bpy.types.register(USERPREF_PT_filepaths)
-
diff --git a/release/ui/space_view3d.py b/release/ui/space_view3d.py
deleted file mode 100644
index 23f3b8a10ac..00000000000
--- a/release/ui/space_view3d.py
+++ /dev/null
@@ -1,1362 +0,0 @@
-
-import bpy
-
-# ********** Header **********
-
-class VIEW3D_HT_header(bpy.types.Header):
- __space_type__ = 'VIEW_3D'
-
- def draw(self, context):
- layout = self.layout
-
- view = context.space_data
- mode_string = context.mode
- edit_object = context.edit_object
- object = context.active_object
-
- row = layout.row(align=True)
- row.template_header()
-
- # Menus
- if context.area.show_menus:
- sub = row.row(align=True)
-
- sub.itemM("VIEW3D_MT_view")
-
- # Select Menu
- if mode_string not in ('EDIT_TEXT', 'SCULPT', 'PAINT_WEIGHT', 'PAINT_VERTEX', 'PAINT_TEXTURE'):
- sub.itemM("VIEW3D_MT_select_%s" % mode_string.lower())
-
- if edit_object:
- sub.itemM("VIEW3D_MT_edit_%s" % edit_object.type.lower())
- elif object:
- ob_mode_string = object.mode
-
- if mode_string not in ['PAINT_WEIGHT', 'PAINT_TEXTURE']:
- sub.itemM("VIEW3D_MT_%s" % mode_string.lower())
- else:
- sub.itemM("VIEW3D_MT_object")
-
- layout.template_header_3D()
-
-# ********** Menu **********
-
-# ********** Utilities **********
-
-class VIEW3D_MT_showhide(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
- __label__ = "Show/Hide"
- _operator_name = ""
-
- def draw(self, context):
- layout = self.layout
-
- layout.itemO("%s.reveal" % self._operator_name, text="Show Hidden")
- layout.itemO("%s.hide" % self._operator_name, text="Hide Selected")
- layout.item_booleanO("%s.hide" % self._operator_name, "unselected", True, text="Hide Unselected")
-
-class VIEW3D_MT_snap(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
- __label__ = "Snap"
-
- def draw(self, context):
- layout = self.layout
-
- layout.itemO("view3d.snap_selected_to_grid", text="Selection to Grid")
- layout.itemO("view3d.snap_selected_to_cursor", text="Selection to Cursor")
- layout.itemO("view3d.snap_selected_to_center", text="Selection to Center")
-
- layout.itemS()
-
- layout.itemO("view3d.snap_cursor_to_selected", text="Cursor to Selected")
- layout.itemO("view3d.snap_cursor_to_grid", text="Cursor to Grid")
- layout.itemO("view3d.snap_cursor_to_active", text="Cursor to Active")
-
-# ********** View menus **********
-
-class VIEW3D_MT_view(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
- __label__ = "View"
-
- def draw(self, context):
- layout = self.layout
-
- layout.itemO("view3d.properties", icon='ICON_MENU_PANEL')
- layout.itemO("view3d.toolbar", icon='ICON_MENU_PANEL')
-
- layout.itemS()
-
- layout.item_enumO("view3d.viewnumpad", "type", 'CAMERA')
- layout.item_enumO("view3d.viewnumpad", "type", 'TOP')
- layout.item_enumO("view3d.viewnumpad", "type", 'FRONT')
- layout.item_enumO("view3d.viewnumpad", "type", 'RIGHT')
-
- layout.itemM("VIEW3D_MT_view_cameras", text="Cameras")
-
- layout.itemS()
-
- layout.itemO("view3d.view_persportho")
-
- layout.itemS()
-
- layout.itemM("VIEW3D_MT_view_navigation")
- layout.itemM("VIEW3D_MT_view_align")
-
- layout.itemS()
-
- layout.operator_context = "INVOKE_REGION_WIN"
-
- layout.itemO("view3d.clip_border", text="Clipping Border...")
- layout.itemO("view3d.zoom_border", text="Zoom Border...")
-
- layout.itemS()
-
- layout.itemO("view3d.view_center")
- layout.itemO("view3d.view_all")
-
- layout.itemS()
-
- layout.itemO("screen.region_foursplit", text="Toggle Quad View")
- layout.itemO("screen.screen_full_area", text="Toggle Full Screen")
-
-class VIEW3D_MT_view_navigation(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
- __label__ = "Navigation"
-
- def draw(self, context):
- layout = self.layout
-
- layout.items_enumO("view3d.view_orbit", "type")
-
- layout.itemS()
-
- layout.items_enumO("view3d.view_pan", "type")
-
- layout.itemS()
-
- layout.item_floatO("view3d.zoom", "delta", 1.0, text="Zoom In")
- layout.item_floatO("view3d.zoom", "delta", -1.0, text="Zoom Out")
-
- layout.itemS()
-
- layout.itemO("view3d.fly")
-
-class VIEW3D_MT_view_align(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
- __label__ = "Align View"
-
- def draw(self, context):
- layout = self.layout
-
- layout.itemO("view3d.view_center")
-
-class VIEW3D_MT_view_cameras(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
- __label__ = "Cameras"
-
- def draw(self, context):
- layout = self.layout
-
-# ********** Select menus, suffix from context.mode **********
-
-class VIEW3D_MT_select_object(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
- __label__ = "Select"
-
- def draw(self, context):
- layout = self.layout
-
- layout.itemO("view3d.select_border")
-
- layout.itemS()
-
- layout.itemO("object.select_all_toggle", text="Select/Deselect All")
- layout.itemO("object.select_inverse", text="Inverse")
- layout.itemO("object.select_random", text="Random")
- layout.itemO("object.select_mirror", text="Mirror")
- layout.itemO("object.select_by_layer", text="Select All by Layer")
- layout.item_enumO("object.select_by_type", "type", "", text="Select All by Type...")
- layout.itemO("object.select_grouped", text="Select Grouped...")
-
-class VIEW3D_MT_select_pose(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
- __label__ = "Select"
-
- def draw(self, context):
- layout = self.layout
-
- layout.itemO("view3d.select_border", text="Border Select...")
-
- layout.itemS()
-
- layout.itemO("pose.select_all_toggle", text="Select/Deselect All")
- layout.itemO("pose.select_inverse", text="Inverse")
- layout.itemO("pose.select_constraint_target", text="Constraint Target")
- layout.itemO("pose.select_linked", text="Linked")
-
- layout.itemS()
-
- layout.item_enumO("pose.select_hierarchy", "direction", 'PARENT')
- layout.item_enumO("pose.select_hierarchy", "direction", 'CHILD')
-
- layout.itemS()
-
- props = layout.itemO("pose.select_hierarchy", properties=True, text="Extend Parent")
- props.extend = True
- props.direction = 'PARENT'
-
- props = layout.itemO("pose.select_hierarchy", properties=True, text="Extend Child")
- props.extend = True
- props.direction = 'CHILD'
-
-class VIEW3D_MT_select_particle(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
- __label__ = "Select"
-
- def draw(self, context):
- layout = self.layout
-
- layout.itemO("view3d.select_border")
-
- layout.itemS()
-
- layout.itemO("particle.select_all_toggle", text="Select/Deselect All")
- layout.itemO("particle.select_linked")
-
- layout.itemS()
-
- layout.itemO("particle.select_more")
- layout.itemO("particle.select_less")
-
-class VIEW3D_MT_select_edit_mesh(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
- __label__ = "Select"
-
- def draw(self, context):
- layout = self.layout
-
- layout.itemO("view3d.select_border", text="Border Select...")
-
- layout.itemS()
-
- layout.itemO("mesh.select_all_toggle", text="Select/Deselect All")
- layout.itemO("mesh.select_inverse", text="Inverse")
-
- layout.itemS()
-
- layout.itemO("mesh.select_random", text="Random...")
- layout.itemO("mesh.edges_select_sharp", text="Sharp Edges")
- layout.itemO("mesh.faces_select_linked_flat", text="Linked Flat Faces")
-
- layout.itemS()
-
- layout.item_enumO("mesh.select_by_number_vertices", "type", 'TRIANGLES', text="Triangles")
- layout.item_enumO("mesh.select_by_number_vertices", "type", 'QUADS', text="Quads")
- layout.item_enumO("mesh.select_by_number_vertices", "type", 'OTHER', text="Loose Verts/Edges")
- layout.itemO("mesh.select_similar", text="Similar...")
-
- layout.itemS()
-
- layout.itemO("mesh.select_less", text="Less")
- layout.itemO("mesh.select_more", text="More")
-
- layout.itemS()
-
- layout.itemO("mesh.select_linked", text="Linked")
- layout.itemO("mesh.select_vertex_path", text="Vertex Path")
- layout.itemO("mesh.loop_multi_select", text="Edge Loop")
- layout.item_booleanO("mesh.loop_multi_select", "ring", True, text="Edge Ring")
-
- layout.itemS()
-
- layout.itemO("mesh.loop_to_region")
- layout.itemO("mesh.region_to_loop")
-
-class VIEW3D_MT_select_edit_curve(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
- __label__ = "Select"
-
- def draw(self, context):
- layout = self.layout
-
- layout.itemO("view3d.select_border", text="Border Select...")
- layout.itemO("view3d.select_circle", text="Circle Select...")
-
- layout.itemS()
-
- layout.itemO("curve.select_all_toggle", text="Select/Deselect All")
- layout.itemO("curve.select_inverse")
- layout.itemO("curve.select_random")
- layout.itemO("curve.select_every_nth")
-
- layout.itemS()
-
- layout.itemO("curve.de_select_first")
- layout.itemO("curve.de_select_last")
- layout.itemO("curve.select_next")
- layout.itemO("curve.select_previous")
-
- layout.itemS()
-
- layout.itemO("curve.select_more")
- layout.itemO("curve.select_less")
-
-class VIEW3D_MT_select_edit_surface(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
- __label__ = "Select"
-
- def draw(self, context):
- layout = self.layout
-
- layout.itemO("view3d.select_border", text="Border Select...")
- layout.itemO("view3d.select_circle", text="Circle Select...")
-
- layout.itemS()
-
- layout.itemO("curve.select_all_toggle", text="Select/Deselect All")
- layout.itemO("curve.select_inverse")
- layout.itemO("curve.select_random")
- layout.itemO("curve.select_every_nth")
-
- layout.itemS()
-
- layout.itemO("curve.select_row")
-
- layout.itemS()
-
- layout.itemO("curve.select_more")
- layout.itemO("curve.select_less")
-
-class VIEW3D_MT_select_edit_metaball(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
- __label__ = "Select"
-
- def draw(self, context):
- layout = self.layout
-
- layout.itemO("view3d.select_border")
-
- layout.itemS()
-
- layout.itemO("mball.select_deselect_all_metaelems")
- layout.itemO("mball.select_inverse_metaelems")
-
- layout.itemS()
-
- layout.itemO("mball.select_random_metaelems")
-
-class VIEW3D_MT_select_edit_lattice(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
- __label__ = "Select"
-
- def draw(self, context):
- layout = self.layout
-
- layout.itemO("view3d.select_border")
-
- layout.itemS()
-
- layout.itemO("lattice.select_all_toggle", text="Select/Deselect All")
-
-class VIEW3D_MT_select_edit_armature(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
- __label__ = "Select"
-
- def draw(self, context):
- layout = self.layout
-
- layout.itemO("view3d.select_border", text="Border Select...")
-
- layout.itemS()
-
- layout.itemO("armature.select_all_toggle", text="Select/Deselect All")
- layout.itemO("armature.select_inverse", text="Inverse")
-
- layout.itemS()
-
- layout.item_enumO("armature.select_hierarchy", "direction", 'PARENT', text="Parent")
- layout.item_enumO("armature.select_hierarchy", "direction", 'CHILD', text="Child")
-
- layout.itemS()
-
- props = layout.itemO("armature.select_hierarchy", properties=True, text="Extend Parent")
- props.extend = True
- props.direction = 'PARENT'
-
- props = layout.itemO("armature.select_hierarchy", properties=True, text="Extend Child")
- props.extend = True
- props.direction = 'CHILD'
-
-class VIEW3D_MT_select_face(bpy.types.Menu):# XXX no matching enum
- __space_type__ = 'VIEW_3D'
- __label__ = "Select"
-
- def draw(self, context):
- layout = self.layout
-
- layout.view3d_select_faceselmenu()
-
-# ********** Object menu **********
-
-class VIEW3D_MT_object(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
- __context__ = "objectmode"
- __label__ = "Object"
-
- def draw(self, context):
- layout = self.layout
-
- layout.itemM("VIEW3D_MT_object_clear")
- layout.itemM("VIEW3D_MT_snap")
-
- layout.itemS()
-
- layout.itemO("anim.insert_keyframe_menu", text="Insert Keyframe...")
- layout.itemO("anim.delete_keyframe_v3d", text="Delete Keyframe...")
-
- layout.itemS()
-
- layout.itemO("object.duplicate_move")
- layout.item_booleanO("object.duplicate", "linked", True, text="Duplicate Linked")
- layout.itemO("object.delete", text="Delete...")
- layout.itemO("object.proxy_make", text="Make Proxy...")
-
- layout.itemS()
-
- layout.itemM("VIEW3D_MT_object_parent")
- layout.itemM("VIEW3D_MT_object_track")
- layout.itemM("VIEW3D_MT_object_group")
- layout.itemM("VIEW3D_MT_object_constraints")
-
- layout.itemS()
-
- layout.itemO("object.join")
-
- layout.itemS()
-
- layout.itemM("VIEW3D_MT_object_showhide")
-
-class VIEW3D_MT_object_clear(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
- __label__ = "Clear"
-
- def draw(self, context):
- layout = self.layout
-
- layout.itemO("object.location_clear", text="Location")
- layout.itemO("object.rotation_clear", text="Rotation")
- layout.itemO("object.scale_clear", text="Scale")
- layout.itemO("object.origin_clear", text="Origin")
-
-class VIEW3D_MT_object_parent(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
- __label__ = "Parent"
-
- def draw(self, context):
- layout = self.layout
-
- layout.itemO("object.parent_set", text="Set")
- layout.itemO("object.parent_clear", text="Clear")
-
-class VIEW3D_MT_object_track(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
- __label__ = "Track"
-
- def draw(self, context):
- layout = self.layout
-
- layout.itemO("object.track_set", text="Set")
- layout.itemO("object.track_clear", text="Clear")
-
-class VIEW3D_MT_object_group(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
- __label__ = "Group"
-
- def draw(self, context):
- layout = self.layout
-
- layout.itemO("group.group_create")
- layout.itemO("group.objects_remove")
-
- layout.itemS()
-
- layout.itemO("group.objects_add_active")
- layout.itemO("group.objects_remove_active")
-
-class VIEW3D_MT_object_constraints(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
- __label__ = "Constraints"
-
- def draw(self, context):
- layout = self.layout
-
- layout.itemO("object.constraint_add_with_targets")
- layout.itemO("object.constraints_clear")
-
-class VIEW3D_MT_object_showhide(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
- __label__ = "Show/Hide"
-
- def draw(self, context):
- layout = self.layout
-
- layout.itemO("object.restrictview_clear", text="Show Hidden")
- layout.itemO("object.restrictview_set", text="Hide Selected")
- layout.item_booleanO("object.restrictview_set", "unselected", True, text="Hide Unselected")
-
-# ********** Vertex paint menu **********
-
-class VIEW3D_MT_paint_vertex(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
- __label__ = "Paint"
-
- def draw(self, context):
- layout = self.layout
-
- sculpt = context.tool_settings.sculpt
-
- layout.itemO("paint.vertex_color_set")
- props = layout.itemO("paint.vertex_color_set", text="Set Selected Vertex Colors", properties=True)
- props.selected = True
-
-# ********** Sculpt menu **********
-
-class VIEW3D_MT_sculpt(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
- __label__ = "Sculpt"
-
- def draw(self, context):
- layout = self.layout
-
- sculpt = context.tool_settings.sculpt
- brush = context.tool_settings.sculpt.brush
-
- layout.itemR(sculpt, "symmetry_x")
- layout.itemR(sculpt, "symmetry_y")
- layout.itemR(sculpt, "symmetry_z")
- layout.itemS()
- layout.itemR(sculpt, "lock_x")
- layout.itemR(sculpt, "lock_y")
- layout.itemR(sculpt, "lock_z")
- layout.itemS()
- layout.item_menu_enumO("brush.curve_preset", property="shape")
- layout.itemS()
-
- if brush.sculpt_tool != 'GRAB':
- layout.itemR(brush, "use_airbrush")
-
- if brush.sculpt_tool != 'LAYER':
- layout.itemR(brush, "use_anchor")
-
- if brush.sculpt_tool in ('DRAW', 'PINCH', 'INFLATE', 'LAYER', 'CLAY'):
- layout.itemR(brush, "flip_direction")
-
- if brush.sculpt_tool == 'LAYER':
- layout.itemR(brush, "use_persistent")
- layout.itemO("sculpt.set_persistent_base")
-
-# ********** Particle menu **********
-
-class VIEW3D_MT_particle(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
- __label__ = "Particle"
-
- def draw(self, context):
- layout = self.layout
-
- particle_edit = context.tool_settings.particle_edit
-
- layout.itemO("particle.mirror")
-
- layout.itemS()
-
- layout.itemO("particle.remove_doubles")
- layout.itemO("particle.delete")
-
- if particle_edit.selection_mode == 'POINT':
- layout.itemO("particle.subdivide")
-
- layout.itemO("particle.rekey")
-
- layout.itemS()
-
- layout.itemM("VIEW3D_MT_particle_showhide")
-
-class VIEW3D_MT_particle_showhide(VIEW3D_MT_showhide):
- _operator_name = "particle"
-
-# ********** Pose Menu **********
-
-class VIEW3D_MT_pose(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
- __label__ = "Pose"
-
- def draw(self, context):
- layout = self.layout
-
- arm = context.active_object.data
-
- if arm.drawtype in ('BBONE', 'ENVELOPE'):
- layout.item_enumO("tfm.transform", "mode", 'BONESIZE', text="Scale Envelope Distance")
-
- layout.itemM("VIEW3D_MT_pose_transform")
-
- layout.itemS()
-
- layout.itemO("anim.insert_keyframe_menu", text="Insert Keyframe...")
- layout.itemO("anim.delete_keyframe_v3d", text="Delete Keyframe...")
-
- layout.itemS()
-
- layout.itemO("pose.apply")
-
- layout.itemS()
-
- layout.itemO("pose.copy")
- layout.itemO("pose.paste")
- layout.item_booleanO("pose.paste", "flipped", True, text="Paste X-Flipped Pose")
-
- layout.itemS()
-
- layout.itemM("VIEW3D_MT_pose_pose")
- layout.itemM("VIEW3D_MT_pose_motion")
- layout.itemM("VIEW3D_MT_pose_group")
-
- layout.itemS()
-
- layout.itemM("VIEW3D_MT_pose_ik")
- layout.itemM("VIEW3D_MT_pose_constraints")
-
- layout.itemS()
-
- layout.operator_context = "EXEC_AREA"
- layout.item_enumO("pose.autoside_names", "axis", 'XAXIS', text="AutoName Left/Right")
- layout.item_enumO("pose.autoside_names", "axis", 'YAXIS', text="AutoName Front/Back")
- layout.item_enumO("pose.autoside_names", "axis", 'ZAXIS', text="AutoName Top/Bottom")
-
- layout.itemO("pose.flip_names")
-
- layout.itemS()
-
- layout.operator_context = "INVOKE_AREA"
- layout.itemO("pose.armature_layers", text="Change Armature Layers...")
- layout.itemO("pose.bone_layers", text="Change Bone Layers...")
-
- layout.itemS()
-
- layout.itemM("VIEW3D_MT_pose_showhide")
- layout.item_menu_enumO("pose.flags_set", 'mode', text="Bone Settings")
-
-class VIEW3D_MT_pose_transform(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
- __label__ = "Clear Transform"
-
- def draw(self, context):
- layout = self.layout
-
- layout.itemL(text="User Transform")
-
- layout.itemO("pose.loc_clear", text="Location")
- layout.itemO("pose.rot_clear", text="Rotation")
- layout.itemO("pose.scale_clear", text="Scale")
-
- layout.itemL(text="Origin")
-
-class VIEW3D_MT_pose_pose(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
- __label__ = "Pose Library"
-
- def draw(self, context):
- layout = self.layout
-
- layout.itemO("poselib.browse_interactive", text="Browse Poses...")
-
- layout.itemS()
-
- layout.itemO("poselib.pose_add", text="Add Pose...")
- layout.itemO("poselib.pose_rename", text="Rename Pose...")
- layout.itemO("poselib.pose_remove", text="Remove Pose...")
-
-class VIEW3D_MT_pose_motion(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
- __label__ = "Motion Paths"
-
- def draw(self, context):
- layout = self.layout
-
- layout.itemO("pose.paths_calculate", text="Calculate")
- layout.itemO("pose.paths_clear", text="Clear")
-
-class VIEW3D_MT_pose_group(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
- __label__ = "Bone Groups"
-
- def draw(self, context):
- layout = self.layout
- layout.itemO("pose.group_add")
- layout.itemO("pose.group_remove")
-
- layout.itemS()
-
- layout.itemO("pose.group_assign")
- layout.itemO("pose.group_unassign")
-
-
-class VIEW3D_MT_pose_ik(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
- __label__ = "Inverse Kinematics"
-
- def draw(self, context):
- layout = self.layout
-
- layout.itemO("pose.ik_add")
- layout.itemO("pose.ik_clear")
-
-class VIEW3D_MT_pose_constraints(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
- __label__ = "Constraints"
-
- def draw(self, context):
- layout = self.layout
-
- layout.itemO("pose.constraint_add_with_targets", text="Add (With Targets)...")
- layout.itemO("pose.constraints_clear")
-
-class VIEW3D_MT_pose_showhide(VIEW3D_MT_showhide):
- _operator_name = "pose"
-
-# ********** Edit Menus, suffix from ob.type **********
-
-# Edit MESH
-class VIEW3D_MT_edit_mesh(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
- __label__ = "Mesh"
-
- def draw(self, context):
- layout = self.layout
-
- settings = context.tool_settings
-
- layout.itemO("ed.undo")
- layout.itemO("ed.redo")
-
- layout.itemS()
-
- layout.itemM("VIEW3D_MT_snap")
-
- layout.itemS()
-
- layout.itemO("uv.mapping_menu", text="UV Unwrap...")
-
- layout.itemS()
-
- layout.itemO("mesh.extrude")
- layout.itemO("mesh.duplicate")
- layout.itemO("mesh.delete", text="Delete...")
-
- layout.itemS()
-
- layout.itemM("VIEW3D_MT_edit_mesh_vertices")
- layout.itemM("VIEW3D_MT_edit_mesh_edges")
- layout.itemM("VIEW3D_MT_edit_mesh_faces")
- layout.itemM("VIEW3D_MT_edit_mesh_normals")
-
- layout.itemS()
-
- layout.itemR(settings, "automerge_editing")
- layout.itemR(settings, "proportional_editing")
- layout.item_menu_enumR(settings, "proportional_editing_falloff")
-
- layout.itemS()
-
- layout.itemM("VIEW3D_MT_edit_mesh_showhide")
-
-class VIEW3D_MT_edit_mesh_vertices(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
- __label__ = "Vertices"
-
- def draw(self, context):
- layout = self.layout
-
- layout.itemO("mesh.merge")
- layout.itemO("mesh.rip")
- layout.itemO("mesh.split")
- layout.itemO("mesh.separate")
-
- layout.itemS()
-
- layout.itemO("mesh.vertices_smooth")
- layout.itemO("mesh.remove_doubles")
-
-class VIEW3D_MT_edit_mesh_edges(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
- __label__ = "Edges"
-
- def draw(self, context):
- layout = self.layout
-
- layout.itemO("mesh.edge_face_add")
- layout.itemO("mesh.subdivide")
-
- layout.itemS()
-
- layout.itemO("mesh.mark_seam")
- layout.item_booleanO("mesh.mark_seam", "clear", True, text="Clear Seam")
-
- layout.itemS()
-
- layout.itemO("mesh.mark_sharp")
- layout.item_booleanO("mesh.mark_sharp", "clear", True, text="Clear Sharp")
-
- layout.itemS()
-
- layout.item_enumO("mesh.edge_rotate", "direction", 'CW', text="Rotate Edge CW")
- layout.item_enumO("mesh.edge_rotate", "direction", 'CCW', text="Rotate Edge CCW")
-
-class VIEW3D_MT_edit_mesh_faces(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
- __label__ = "Faces"
-
- def draw(self, context):
- layout = self.layout
-
- layout.itemO("mesh.edge_face_add")
- layout.itemO("mesh.fill")
- layout.itemO("mesh.beauty_fill")
-
- layout.itemS()
-
- layout.itemO("mesh.quads_convert_to_tris")
- layout.itemO("mesh.tris_convert_to_quads")
- layout.itemO("mesh.edge_flip")
-
- layout.itemS()
-
- layout.itemO("mesh.faces_shade_smooth")
- layout.itemO("mesh.faces_shade_flat")
-
-class VIEW3D_MT_edit_mesh_normals(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
- __label__ = "Normals"
-
- def draw(self, context):
- layout = self.layout
-
- layout.itemO("mesh.normals_make_consistent", text="Recalculate Outside")
- layout.item_booleanO("mesh.normals_make_consistent", "inside", True, text="Recalculate Inside")
-
- layout.itemS()
-
- layout.itemO("mesh.flip_normals")
-
-class VIEW3D_MT_edit_mesh_showhide(VIEW3D_MT_showhide):
- _operator_name = "mesh"
-
-# Edit Curve
-
-# draw_curve is used by VIEW3D_MT_edit_curve and VIEW3D_MT_edit_surface
-def draw_curve(self, context):
- layout = self.layout
-
- settings = context.tool_settings
-
- layout.itemM("VIEW3D_MT_snap")
-
- layout.itemS()
-
- layout.itemO("curve.extrude")
- layout.itemO("curve.duplicate")
- layout.itemO("curve.separate")
- layout.itemO("curve.make_segment")
- layout.itemO("curve.cyclic_toggle")
- layout.itemO("curve.delete", text="Delete...")
-
- layout.itemS()
-
- layout.itemM("VIEW3D_MT_edit_curve_ctrlpoints")
- layout.itemM("VIEW3D_MT_edit_curve_segments")
-
- layout.itemS()
-
- layout.itemR(settings, "proportional_editing")
- layout.item_menu_enumR(settings, "proportional_editing_falloff")
-
- layout.itemS()
-
- layout.itemM("VIEW3D_MT_edit_curve_showhide")
-
-class VIEW3D_MT_edit_curve(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
- __label__ = "Curve"
-
- draw = draw_curve
-
-class VIEW3D_MT_edit_curve_ctrlpoints(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
- __label__ = "Control Points"
-
- def draw(self, context):
- layout = self.layout
-
- edit_object = context.edit_object
-
- if edit_object.type == 'CURVE':
- layout.item_enumO("tfm.transform", "mode", 'TILT')
- layout.itemO("curve.tilt_clear")
- layout.itemO("curve.separate")
-
- layout.itemS()
-
- layout.item_menu_enumO("curve.handle_type_set", "type")
-
-class VIEW3D_MT_edit_curve_segments(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
- __label__ = "Segments"
-
- def draw(self, context):
- layout = self.layout
-
- layout.itemO("curve.subdivide")
- layout.itemO("curve.switch_direction")
-
-class VIEW3D_MT_edit_curve_showhide(VIEW3D_MT_showhide):
- _operator_name = "curve"
-
-# Edit SURFACE
-class VIEW3D_MT_edit_surface(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
- __label__ = "Surface"
-
- draw = draw_curve
-
-# Edit TEXT
-class VIEW3D_MT_edit_text(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
- __label__ = "Text"
-
- def draw(self, context):
- layout = self.layout
-
- layout.itemO("font.file_paste")
-
- layout.itemS()
-
- layout.itemm("view3d_mt_edit_text_chars")
-
-class VIEW3D_MT_edit_text_chars(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
- __label__ = "Special Characters"
-
- def draw(self, context):
- layout = self.layout
-
- layout.item_stringO("font.text_insert", "text", b'\xC2\xA9'.decode(), text="Copyright|Alt C")
- layout.item_stringO("font.text_insert", "text", b'\xC2\xAE'.decode(), text="Registered Trademark|Alt R")
-
- layout.itemS()
-
- layout.item_stringO("font.text_insert", "text", b'\xC2\xB0'.decode(), text="Degree Sign|Alt G")
- layout.item_stringO("font.text_insert", "text", b'\xC3\x97'.decode(), text="Multiplication Sign|Alt x")
- layout.item_stringO("font.text_insert", "text", b'\xC2\x8A'.decode(), text="Circle|Alt .")
- layout.item_stringO("font.text_insert", "text", b'\xC2\xB9'.decode(), text="Superscript 1|Alt 1")
- layout.item_stringO("font.text_insert", "text", b'\xC2\xB2'.decode(), text="Superscript 2|Alt 2")
- layout.item_stringO("font.text_insert", "text", b'\xC2\xB3'.decode(), text="Superscript 3|Alt 3")
- layout.item_stringO("font.text_insert", "text", b'\xC2\xBB'.decode(), text="Double >>|Alt >")
- layout.item_stringO("font.text_insert", "text", b'\xC2\xAB'.decode(), text="Double <<|Alt <")
- layout.item_stringO("font.text_insert", "text", b'\xE2\x80\xB0'.decode(), text="Promillage|Alt %")
-
- layout.itemS()
-
- layout.item_stringO("font.text_insert", "text", b'\xC2\xA4'.decode(), text="Dutch Florin|Alt F")
- layout.item_stringO("font.text_insert", "text", b'\xC2\xA3'.decode(), text="British Pound|Alt L")
- layout.item_stringO("font.text_insert", "text", b'\xC2\xA5'.decode(), text="Japanese Yen|Alt Y")
-
- layout.itemS()
-
- layout.item_stringO("font.text_insert", "text", b'\xC3\x9F'.decode(), text="German S|Alt S")
- layout.item_stringO("font.text_insert", "text", b'\xC2\xBF'.decode(), text="Spanish Question Mark|Alt ?")
- layout.item_stringO("font.text_insert", "text", b'\xC2\xA1'.decode(), text="Spanish Exclamation Mark|Alt !")
-
-# Edit META
-class VIEW3D_MT_edit_meta(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
- __label__ = "Metaball"
-
- def draw(self, context):
- layout = self.layout
-
- settings = context.tool_settings
-
- layout.itemO("ed.undo")
- layout.itemO("ed.redo")
-
- layout.itemS()
-
- layout.itemM("VIEW3D_MT_snap")
-
- layout.itemS()
-
- layout.itemO("mball.delete_metaelems", text="Delete...")
- layout.itemO("mball.duplicate_metaelems")
-
- layout.itemS()
-
- layout.itemR(settings, "proportional_editing")
- layout.item_menu_enumR(settings, "proportional_editing_falloff")
-
- layout.itemS()
-
- layout.itemM("VIEW3D_MT_edit_meta_showhide")
-
-class VIEW3D_MT_edit_meta_showhide(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
- __label__ = "Show/Hide"
-
- def draw(self, context):
- layout = self.layout
-
- layout.itemO("mball.reveal_metaelems", text="Show Hidden")
- layout.itemO("mball.hide_metaelems", text="Hide Selected")
- layout.item_booleanO("mball.hide_metaelems", "unselected", True, text="Hide Unselected")
-
-# Edit LATTICE
-class VIEW3D_MT_edit_lattice(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
- __label__ = "Lattice"
-
- def draw(self, context):
- layout = self.layout
-
- settings = context.tool_settings
-
- layout.itemM("VIEW3D_MT_snap")
-
- layout.itemS()
-
- layout.itemO("lattice.make_regular")
-
- layout.itemS()
-
- layout.itemR(settings, "proportional_editing")
- layout.item_menu_enumR(settings, "proportional_editing_falloff")
-
-# Edit ARMATURE
-class VIEW3D_MT_edit_armature(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
- __label__ = "Armature"
-
- def draw(self, context):
- layout = self.layout
-
- edit_object = context.edit_object
- arm = edit_object.data
-
- layout.itemM("VIEW3D_MT_snap")
- layout.itemM("VIEW3D_MT_edit_armature_roll")
-
- if arm.drawtype == 'ENVELOPE':
- layout.item_enumO("tfm.transform", "mode", 'BONESIZE', text="Scale Envelope Distance")
- else:
- layout.item_enumO("tfm.transform", "mode", 'BONESIZE', text="Scale B-Bone Width")
-
- layout.itemS()
-
- layout.itemO("armature.extrude")
-
- if arm.x_axis_mirror:
- layout.item_booleanO("armature.extrude", "forked", True, text="Extrude Forked")
-
- layout.itemO("armature.duplicate")
- layout.itemO("armature.merge")
- layout.itemO("armature.fill")
- layout.itemO("armature.delete")
- layout.itemO("armature.separate")
-
- layout.itemS()
-
- layout.itemO("armature.subdivide_multi", text="Subdivide")
-
- layout.itemS()
-
- layout.operator_context = "EXEC_AREA"
- layout.item_enumO("armature.autoside_names", "type", 'XAXIS', text="AutoName Left/Right")
- layout.item_enumO("armature.autoside_names", "type", 'YAXIS', text="AutoName Front/Back")
- layout.item_enumO("armature.autoside_names", "type", 'ZAXIS', text="AutoName Top/Bottom")
- layout.itemO("armature.flip_names")
-
- layout.itemS()
-
- layout.operator_context = "INVOKE_DEFAULT"
- layout.itemO("armature.armature_layers")
- layout.itemO("armature.bone_layers")
-
- layout.itemS()
-
- layout.itemM("VIEW3D_MT_edit_armature_parent")
-
- layout.itemS()
-
- layout.item_menu_enumO("armature.flags_set", "mode", text="Bone Settings")
-
-class VIEW3D_MT_edit_armature_parent(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
- __label__ = "Parent"
-
- def draw(self, context):
- layout = self.layout
-
- layout.itemO("armature.parent_set", text="Make")
- layout.itemO("armature.parent_clear", text="Clear")
-
-class VIEW3D_MT_edit_armature_roll(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
- __label__ = "Bone Roll"
-
- def draw(self, context):
- layout = self.layout
-
- layout.item_enumO("armature.calculate_roll", "type", 'GLOBALUP', text="Clear Roll (Z-Axis Up)")
- layout.item_enumO("armature.calculate_roll", "type", 'CURSOR', text="Roll to Cursor")
-
- layout.itemS()
-
- layout.item_enumO("tfm.transform", "mode", 'BONE_ROLL', text="Set Roll")
-
-# ********** Panel **********
-
-class VIEW3D_PT_3dview_properties(bpy.types.Panel):
- __space_type__ = 'VIEW_3D'
- __region_type__ = 'UI'
- __label__ = "View"
-
- def poll(self, context):
- view = context.space_data
- return (view)
-
- def draw(self, context):
- layout = self.layout
-
- view = context.space_data
- scene = context.scene
-
- col = layout.column()
- col.itemL(text="Camera:")
- col.itemR(view, "camera", text="")
- col.itemR(view, "lens")
-
- col = layout.column(align=True)
- col.itemL(text="Clip:")
- col.itemR(view, "clip_start", text="Start")
- col.itemR(view, "clip_end", text="End")
-
- col = layout.column(align=True)
- col.itemL(text="Grid:")
- col.itemR(view, "grid_lines", text="Lines")
- col.itemR(view, "grid_spacing", text="Spacing")
- col.itemR(view, "grid_subdivisions", text="Subdivisions")
-
- layout.column().itemR(scene, "cursor_location", text="3D Cursor:")
-
-class VIEW3D_PT_3dview_display(bpy.types.Panel):
- __space_type__ = 'VIEW_3D'
- __region_type__ = 'UI'
- __label__ = "Display"
- __default_closed__ = True
-
- def poll(self, context):
- view = context.space_data
- return (view)
-
- def draw(self, context):
- layout = self.layout
- view = context.space_data
-
- col = layout.column()
- col.itemR(view, "display_floor", text="Grid Floor")
- col.itemR(view, "display_x_axis", text="X Axis")
- col.itemR(view, "display_y_axis", text="Y Axis")
- col.itemR(view, "display_z_axis", text="Z Axis")
- col.itemR(view, "outline_selected")
- col.itemR(view, "all_object_centers")
- col.itemR(view, "relationship_lines")
- col.itemR(view, "textured_solid")
-
- layout.itemS()
-
- layout.itemO("screen.region_foursplit", text="Toggle Quad View")
-
- col = layout.column()
- col.itemR(view, "lock_rotation")
- col.itemR(view, "box_preview")
- col.itemR(view, "box_clip")
-
-class VIEW3D_PT_3dview_meshdisplay(bpy.types.Panel):
- __space_type__ = 'VIEW_3D'
- __region_type__ = 'UI'
- __label__ = "Mesh Display"
-
- def poll(self, context):
- editmesh = context.mode == 'EDIT_MESH'
- return (editmesh)
-
- def draw(self, context):
- layout = self.layout
-
- mesh = context.active_object.data
-
- col = layout.column()
- col.itemL(text="Overlays:")
- col.itemR(mesh, "draw_edges", text="Edges")
- col.itemR(mesh, "draw_faces", text="Faces")
- col.itemR(mesh, "draw_creases", text="Creases")
- col.itemR(mesh, "draw_bevel_weights", text="Bevel Weights")
- col.itemR(mesh, "draw_seams", text="Seams")
- col.itemR(mesh, "draw_sharp", text="Sharp")
-
- col.itemS()
- col.itemL(text="Normals:")
- col.itemR(mesh, "draw_normals", text="Face")
- col.itemR(mesh, "draw_vertex_normals", text="Vertex")
- col.itemR(context.scene.tool_settings, "normal_size", text="Normal Size")
-
- col.itemS()
- col.itemL(text="Numerics:")
- col.itemR(mesh, "draw_edge_lenght")
- col.itemR(mesh, "draw_edge_angle")
- col.itemR(mesh, "draw_face_area")
-
-
-class VIEW3D_PT_3dview_curvedisplay(bpy.types.Panel):
- __space_type__ = 'VIEW_3D'
- __region_type__ = 'UI'
- __label__ = "Curve Display"
-
- def poll(self, context):
- editmesh = context.mode == 'EDIT_CURVE'
- return (editmesh)
-
- def draw(self, context):
- layout = self.layout
-
- curve = context.active_object.data
-
- col = layout.column()
- col.itemL(text="Overlays:")
- col.itemR(curve, "draw_handles", text="Handles")
- col.itemR(curve, "draw_normals", text="Normals")
- col.itemR(context.scene.tool_settings, "normal_size", text="Normal Size")
-
-
-class VIEW3D_PT_background_image(bpy.types.Panel):
- __space_type__ = 'VIEW_3D'
- __region_type__ = 'UI'
- __label__ = "Background Image"
- __default_closed__ = True
-
- def poll(self, context):
- view = context.space_data
- bg = context.space_data.background_image
- return (view)
-
- def draw_header(self, context):
- layout = self.layout
- view = context.space_data
-
- layout.itemR(view, "display_background_image", text="")
-
- def draw(self, context):
- layout = self.layout
-
- view = context.space_data
- bg = view.background_image
-
- if bg:
- layout.active = view.display_background_image
-
- col = layout.column()
- col.itemR(bg, "image", text="")
- #col.itemR(bg, "image_user")
- col.itemR(bg, "size")
- col.itemR(bg, "transparency", slider=True)
-
-
- col = layout.column(align=True)
- col.itemL(text="Offset:")
- col.itemR(bg, "offset_x", text="X")
- col.itemR(bg, "offset_y", text="Y")
-
-bpy.types.register(VIEW3D_HT_header) # Header
-
-bpy.types.register(VIEW3D_MT_view) #View Menus
-bpy.types.register(VIEW3D_MT_view_navigation)
-bpy.types.register(VIEW3D_MT_view_align)
-bpy.types.register(VIEW3D_MT_view_cameras)
-
-bpy.types.register(VIEW3D_MT_select_object) # Select Menus
-bpy.types.register(VIEW3D_MT_select_pose)
-bpy.types.register(VIEW3D_MT_select_particle)
-bpy.types.register(VIEW3D_MT_select_edit_mesh)
-bpy.types.register(VIEW3D_MT_select_edit_curve)
-bpy.types.register(VIEW3D_MT_select_edit_surface)
-bpy.types.register(VIEW3D_MT_select_edit_metaball)
-bpy.types.register(VIEW3D_MT_select_edit_lattice)
-bpy.types.register(VIEW3D_MT_select_edit_armature)
-bpy.types.register(VIEW3D_MT_select_face) # XXX todo
-
-bpy.types.register(VIEW3D_MT_object) # Object Menu
-bpy.types.register(VIEW3D_MT_object_clear)
-bpy.types.register(VIEW3D_MT_object_parent)
-bpy.types.register(VIEW3D_MT_object_track)
-bpy.types.register(VIEW3D_MT_object_group)
-bpy.types.register(VIEW3D_MT_object_constraints)
-bpy.types.register(VIEW3D_MT_object_showhide)
-
-bpy.types.register(VIEW3D_MT_sculpt) # Sculpt Menu
-
-bpy.types.register(VIEW3D_MT_paint_vertex)
-
-bpy.types.register(VIEW3D_MT_particle) # Particle Menu
-bpy.types.register(VIEW3D_MT_particle_showhide)
-
-bpy.types.register(VIEW3D_MT_pose) # POSE Menu
-bpy.types.register(VIEW3D_MT_pose_transform)
-bpy.types.register(VIEW3D_MT_pose_pose)
-bpy.types.register(VIEW3D_MT_pose_motion)
-bpy.types.register(VIEW3D_MT_pose_group)
-bpy.types.register(VIEW3D_MT_pose_ik)
-bpy.types.register(VIEW3D_MT_pose_constraints)
-bpy.types.register(VIEW3D_MT_pose_showhide)
-
-bpy.types.register(VIEW3D_MT_snap) # Edit Menus
-
-bpy.types.register(VIEW3D_MT_edit_mesh)
-bpy.types.register(VIEW3D_MT_edit_mesh_vertices)
-bpy.types.register(VIEW3D_MT_edit_mesh_edges)
-bpy.types.register(VIEW3D_MT_edit_mesh_faces)
-bpy.types.register(VIEW3D_MT_edit_mesh_normals)
-bpy.types.register(VIEW3D_MT_edit_mesh_showhide)
-
-bpy.types.register(VIEW3D_MT_edit_curve)
-bpy.types.register(VIEW3D_MT_edit_curve_ctrlpoints)
-bpy.types.register(VIEW3D_MT_edit_curve_segments)
-bpy.types.register(VIEW3D_MT_edit_curve_showhide)
-
-bpy.types.register(VIEW3D_MT_edit_surface)
-
-bpy.types.register(VIEW3D_MT_edit_text)
-bpy.types.register(VIEW3D_MT_edit_text_chars)
-
-bpy.types.register(VIEW3D_MT_edit_meta)
-bpy.types.register(VIEW3D_MT_edit_meta_showhide)
-
-bpy.types.register(VIEW3D_MT_edit_lattice)
-
-bpy.types.register(VIEW3D_MT_edit_armature)
-bpy.types.register(VIEW3D_MT_edit_armature_parent)
-bpy.types.register(VIEW3D_MT_edit_armature_roll)
-
-bpy.types.register(VIEW3D_PT_3dview_properties) # Panels
-bpy.types.register(VIEW3D_PT_3dview_display)
-bpy.types.register(VIEW3D_PT_3dview_meshdisplay)
-bpy.types.register(VIEW3D_PT_3dview_curvedisplay)
-bpy.types.register(VIEW3D_PT_background_image)
diff --git a/release/ui/space_view3d_toolbar.py b/release/ui/space_view3d_toolbar.py
deleted file mode 100644
index 4c1b54ea8e6..00000000000
--- a/release/ui/space_view3d_toolbar.py
+++ /dev/null
@@ -1,746 +0,0 @@
-
-import bpy
-
-class View3DPanel(bpy.types.Panel):
- __space_type__ = 'VIEW_3D'
- __region_type__ = 'TOOLS'
-
-# ********** default tools for objectmode ****************
-
-class VIEW3D_PT_tools_objectmode(View3DPanel):
- __context__ = "objectmode"
- __label__ = "Object Tools"
-
- def draw(self, context):
- layout = self.layout
-
- col = layout.column(align=True)
- col.itemL(text="Transform:")
- col.itemO("tfm.translate")
- col.itemO("tfm.rotate")
- col.itemO("tfm.resize", text="Scale")
-
- col = layout.column(align=True)
- col.itemL(text="Object:")
- col.itemO("object.duplicate")
- col.itemO("object.delete")
-
- active_object= context.active_object
- if active_object and active_object.type == 'MESH':
-
- col = layout.column(align=True)
- col.itemL(text="Shading:")
- col.itemO("object.shade_smooth", text="Smooth")
- col.itemO("object.shade_flat", text="Flat")
-
- col = layout.column(align=True)
- col.itemL(text="Keyframes:")
- col.itemO("anim.insert_keyframe_menu", text="Insert")
- col.itemO("anim.delete_keyframe_v3d", text="Remove")
-
- col = layout.column(align=True)
- col.itemL(text="Repeat:")
- col.itemO("screen.repeat_last")
- col.itemO("screen.repeat_history", text="History...")
- col.itemO("screen.redo_last", text="Tweak...")
-
-# ********** default tools for editmode_mesh ****************
-
-class VIEW3D_PT_tools_meshedit(View3DPanel):
- __context__ = "mesh_edit"
- __label__ = "Mesh Tools"
-
- def draw(self, context):
- layout = self.layout
-
- col = layout.column(align=True)
- col.itemL(text="Transform:")
- col.itemO("tfm.translate")
- col.itemO("tfm.rotate")
- col.itemO("tfm.resize", text="Scale")
-
- col = layout.column(align=True)
- col.itemL(text="Mesh:")
- col.itemO("mesh.duplicate")
- col.itemO("mesh.delete")
-
- col = layout.column(align=True)
- col.itemL(text="Modeling:")
- col.itemO("mesh.extrude")
- col.itemO("mesh.subdivide")
- col.itemO("mesh.loopcut")
- col.itemO("mesh.spin")
- col.itemO("mesh.screw")
- col.itemO("mesh.merge")
- col.itemO("mesh.rip_move")
-
- col = layout.column(align=True)
- col.itemL(text="Shading:")
- col.itemO("mesh.faces_shade_smooth", text="Smooth")
- col.itemO("mesh.faces_shade_flat", text="Flat")
-
- col = layout.column(align=True)
- col.itemL(text="UV Mapping:")
- col.itemO("uv.mapping_menu", text="Unwrap")
- col.itemO("mesh.uvs_rotate")
- col.itemO("mesh.uvs_mirror")
-
- col = layout.column(align=True)
- col.itemL(text="Repeat:")
- col.itemO("screen.repeat_last")
- col.itemO("screen.repeat_history", text="History...")
- col.itemO("screen.redo_last", text="Tweak...")
-
-# ********** default tools for editmode_curve ****************
-
-class VIEW3D_PT_tools_curveedit(View3DPanel):
- __context__ = "curve_edit"
- __label__ = "Curve Tools"
-
- def draw(self, context):
- layout = self.layout
-
- col = layout.column(align=True)
- col.itemL(text="Transform:")
- col.itemO("tfm.translate")
- col.itemO("tfm.rotate")
- col.itemO("tfm.resize", text="Scale")
-
- col = layout.column(align=True)
- col.itemL(text="Curve:")
- col.itemO("curve.duplicate")
- col.itemO("curve.delete")
- col.itemO("curve.cyclic_toggle")
- col.itemO("curve.switch_direction")
- col.itemO("curve.spline_type_set")
-
- col = layout.column(align=True)
- col.itemL(text="Handles:")
- col.item_enumO("curve.handle_type_set", "type", 'AUTOMATIC')
- col.item_enumO("curve.handle_type_set", "type", 'VECTOR')
- col.item_enumO("curve.handle_type_set", "type", 'ALIGN')
- col.item_enumO("curve.handle_type_set", "type", 'FREE_ALIGN')
-
- col = layout.column(align=True)
- col.itemL(text="Modeling:")
- col.itemO("curve.extrude")
- col.itemO("curve.subdivide")
-
- col = layout.column(align=True)
- col.itemL(text="Repeat:")
- col.itemO("screen.repeat_last")
- col.itemO("screen.repeat_history", text="History...")
- col.itemO("screen.redo_last", text="Tweak...")
-
-# ********** default tools for editmode_surface ****************
-
-class VIEW3D_PT_tools_surfaceedit(View3DPanel):
- __context__ = "surface_edit"
- __label__ = "Surface Tools"
-
- def draw(self, context):
- layout = self.layout
-
- col = layout.column(align=True)
- col.itemL(text="Transform:")
- col.itemO("tfm.translate")
- col.itemO("tfm.rotate")
- col.itemO("tfm.resize", text="Scale")
-
- col = layout.column(align=True)
- col.itemL(text="Curve:")
- col.itemO("curve.duplicate")
- col.itemO("curve.delete")
- col.itemO("curve.cyclic_toggle")
- col.itemO("curve.switch_direction")
-
- col = layout.column(align=True)
- col.itemL(text="Modeling:")
- col.itemO("curve.extrude")
- col.itemO("curve.subdivide")
-
- col = layout.column(align=True)
- col.itemL(text="Repeat:")
- col.itemO("screen.repeat_last")
- col.itemO("screen.repeat_history", text="History...")
- col.itemO("screen.redo_last", text="Tweak...")
-
-# ********** default tools for editmode_text ****************
-
-class VIEW3D_PT_tools_textedit(View3DPanel):
- __context__ = "text_edit"
- __label__ = "Text Tools"
-
- def draw(self, context):
- layout = self.layout
-
- col = layout.column(align=True)
- col.itemL(text="Text Edit:")
- col.itemO("font.text_copy", text="Copy")
- col.itemO("font.text_cut", text="Cut")
- col.itemO("font.text_paste", text="Paste")
-
- col = layout.column(align=True)
- col.itemL(text="Style:")
- col.itemO("font.case_set")
- col.itemO("font.style_toggle")
-
- col = layout.column(align=True)
- col.itemL(text="Repeat:")
- col.itemO("screen.repeat_last")
- col.itemO("screen.repeat_history", text="History...")
- col.itemO("screen.redo_last", text="Tweak...")
-
-# ********** default tools for editmode_armature ****************
-
-class VIEW3D_PT_tools_armatureedit(View3DPanel):
- __context__ = "armature_edit"
- __label__ = "Armature Tools"
-
- def draw(self, context):
- layout = self.layout
-
- col = layout.column(align=True)
- col.itemL(text="Transform:")
- col.itemO("tfm.translate")
- col.itemO("tfm.rotate")
- col.itemO("tfm.resize", text="Scale")
-
- col = layout.column(align=True)
- col.itemL(text="Bones:")
- col.itemO("armature.bone_primitive_add", text="Add")
- col.itemO("armature.duplicate", text="Duplicate")
- col.itemO("armature.delete", text="Delete")
-
- col = layout.column(align=True)
- col.itemL(text="Modeling:")
- col.itemO("armature.extrude")
-
- col = layout.column(align=True)
- col.itemL(text="Repeat:")
- col.itemO("screen.repeat_last")
- col.itemO("screen.repeat_history", text="History...")
- col.itemO("screen.redo_last", text="Tweak...")
-
-# ********** default tools for editmode_mball ****************
-
-class VIEW3D_PT_tools_mballedit(View3DPanel):
- __context__ = "mball_edit"
- __label__ = "Meta Tools"
-
- def draw(self, context):
- layout = self.layout
-
- col = layout.column(align=True)
- col.itemL(text="Transform:")
- col.itemO("tfm.translate")
- col.itemO("tfm.rotate")
- col.itemO("tfm.resize", text="Scale")
-
- col = layout.column(align=True)
- col.itemL(text="Repeat:")
- col.itemO("screen.repeat_last")
- col.itemO("screen.repeat_history", text="History...")
- col.itemO("screen.redo_last", text="Tweak...")
-
-# ********** default tools for editmode_lattice ****************
-
-class VIEW3D_PT_tools_latticeedit(View3DPanel):
- __context__ = "lattice_edit"
- __label__ = "Lattice Tools"
-
- def draw(self, context):
- layout = self.layout
-
- col = layout.column(align=True)
- col.itemL(text="Transform:")
- col.itemO("tfm.translate")
- col.itemO("tfm.rotate")
- col.itemO("tfm.resize", text="Scale")
-
- col = layout.column(align=True)
- col.itemL(text="Repeat:")
- col.itemO("screen.repeat_last")
- col.itemO("screen.repeat_history", text="History...")
- col.itemO("screen.redo_last", text="Tweak...")
-
-# ********** default tools for posemode ****************
-
-class VIEW3D_PT_tools_posemode(View3DPanel):
- __context__ = "posemode"
- __label__ = "Pose Tools"
-
- def draw(self, context):
- layout = self.layout
-
- col = layout.column(align=True)
- col.itemL(text="Transform:")
- col.itemO("tfm.translate")
- col.itemO("tfm.rotate")
- col.itemO("tfm.resize", text="Scale")
-
- col = layout.column(align=True)
- col.itemL(text="Bones:")
- col.itemO("pose.hide", text="Hide")
- col.itemO("pose.reveal", text="Reveal")
-
- col = layout.column(align=True)
- col.itemL(text="Keyframes:")
- col.itemO("anim.insert_keyframe_menu", text="Insert")
- col.itemO("anim.delete_keyframe_v3d", text="Remove")
-
- col = layout.column(align=True)
- col.itemL(text="Pose:")
- col.itemO("pose.copy", text="Copy")
- col.itemO("pose.paste", text="Paste")
- col.itemO("poselib.pose_add", text="Add To Library")
- col.itemO("poselib.browse_interactive", text="Browse Library")
-
- col = layout.column(align=True)
- col.itemL(text="In-Between:")
- col.itemO("pose.relax", text="Relax")
- col.itemO("pose.push", text="Push")
- col.itemO("pose.breakdown", text="Breakdowner")
-
- col = layout.column(align=True)
- col.itemL(text="Repeat:")
- col.itemO("screen.repeat_last")
- col.itemO("screen.repeat_history", text="History...")
- col.itemO("screen.redo_last", text="Tweak...")
-
-# ********** default tools for paint modes ****************
-
-class PaintPanel(bpy.types.Panel):
- __space_type__ = 'VIEW_3D'
- __region_type__ = 'TOOLS'
-
- def paint_settings(self, context):
- ts = context.tool_settings
-
- if context.sculpt_object:
- return ts.sculpt
- elif context.vertex_paint_object:
- return ts.vertex_paint
- elif context.weight_paint_object:
- return ts.weight_paint
- elif context.texture_paint_object:
- return ts.image_paint
- elif context.particle_edit_object:
- return ts.particle_edit
-
- return False
-
-class VIEW3D_PT_tools_brush(PaintPanel):
- __label__ = "Brush"
-
- def poll(self, context):
- return self.paint_settings(context)
-
- def draw(self, context):
- layout = self.layout
-
- settings = self.paint_settings(context)
- brush = settings.brush
-
- if not context.particle_edit_object:
- col = layout.split().column()
- row = col.row()
- row.template_list(settings, "brushes", settings, "active_brush_index", rows=2)
-
- col.template_ID(settings, "brush", new="brush.add")
-
- # Particle Mode #
-
- # XXX This needs a check if psys is editable.
- if context.particle_edit_object:
- # XXX Select Particle System
- layout.column().itemR(settings, "tool", expand=True)
-
- if settings.tool != 'NONE':
- col = layout.column()
- col.itemR(brush, "size", slider=True)
- col.itemR(brush, "strength", slider=True)
-
- if settings.tool == 'ADD':
- col = layout.column()
- col.itemR(settings, "add_interpolate")
- sub = col.column(align=True)
- sub.active = settings.add_interpolate
- sub.itemR(brush, "steps", slider=True)
- sub.itemR(settings, "add_keys", slider=True)
- elif settings.tool == 'LENGTH':
- layout.itemR(brush, "length_mode", expand=True)
- elif settings.tool == 'PUFF':
- layout.itemR(brush, "puff_mode", expand=True)
-
- # Sculpt Mode #
-
- elif context.sculpt_object and brush:
- col = layout.column()
- col.itemS()
- col.itemR(brush, "sculpt_tool", expand=True)
- col.itemS()
-
- row = col.row(align=True)
- row.itemR(brush, "size", slider=True)
- row.itemR(brush, "use_size_pressure", toggle=True, text="")
-
- if brush.sculpt_tool != 'GRAB':
- row = col.row(align=True)
- row.itemR(brush, "strength", slider=True)
- row.itemR(brush, "use_strength_pressure", text="")
-
- ''' # XXX - TODO
- row = col.row(align=True)
- row.itemR(brush, "jitter", slider=True)
- row.itemR(brush, "use_jitter_pressure", toggle=True, text="")
- '''
- col = layout.column()
-
- if brush.sculpt_tool in ('DRAW', 'PINCH', 'INFLATE', 'LAYER', 'CLAY'):
- col.row().itemR(brush, "direction", expand=True)
-
- if brush.sculpt_tool == 'LAYER':
- col.itemR(brush, "persistent")
- col.itemO("sculpt.set_persistent_base")
-
- # Texture Paint Mode #
-
- elif context.texture_paint_object and brush:
- col = layout.column(align=True)
- col.item_enumR(settings, "tool", 'DRAW')
- col.item_enumR(settings, "tool", 'SOFTEN')
- col.item_enumR(settings, "tool", 'CLONE')
- col.item_enumR(settings, "tool", 'SMEAR')
-
- col = layout.column()
- col.itemR(brush, "color", text="")
-
- row = col.row(align=True)
- row.itemR(brush, "size", slider=True)
- row.itemR(brush, "use_size_pressure", toggle=True, text="")
-
- row = col.row(align=True)
- row.itemR(brush, "strength", slider=True)
- row.itemR(brush, "use_strength_pressure", toggle=True, text="")
-
- row = col.row(align=True)
- row.itemR(brush, "jitter", slider=True)
- row.itemR(brush, "use_jitter_pressure", toggle=True, text="")
-
- col.itemR(brush, "blend", text="Blend")
-
- # Weight Paint Mode #
-
- elif context.weight_paint_object and brush:
- layout.itemR(context.tool_settings, "vertex_group_weight", text="Weight", slider=True)
-
- col = layout.column()
- row = col.row(align=True)
- row.itemR(brush, "size", slider=True)
- row.itemR(brush, "use_size_pressure", toggle=True, text="")
-
- row = col.row(align=True)
- row.itemR(brush, "strength", slider=True)
- row.itemR(brush, "use_strength_pressure", toggle=True, text="")
-
- row = col.row(align=True)
- row.itemR(brush, "jitter", slider=True)
- row.itemR(brush, "use_jitter_pressure", toggle=True, text="")
-
- # Vertex Paint Mode #
-
- elif context.vertex_paint_object and brush:
- col = layout.column()
- col.itemR(brush, "color", text="")
-
- row = col.row(align=True)
- row.itemR(brush, "size", slider=True)
- row.itemR(brush, "use_size_pressure", toggle=True, text="")
-
- row = col.row(align=True)
- row.itemR(brush, "strength", slider=True)
- row.itemR(brush, "use_strength_pressure", toggle=True, text="")
-
- ''' # XXX - TODO
- row = col.row(align=True)
- row.itemR(brush, "jitter", slider=True)
- row.itemR(brush, "use_jitter_pressure", toggle=True, text="")
- '''
-
-class VIEW3D_PT_tools_brush_stroke(PaintPanel):
- __label__ = "Stroke"
- __default_closed__ = True
-
- def poll(self, context):
- settings = self.paint_settings(context)
- return (settings and settings.brush and (context.sculpt_object or
- context.vertex_paint_object or
- context.weight_paint_object or
- context.texture_paint_object))
-
- def draw(self, context):
- layout = self.layout
-
- settings = self.paint_settings(context)
- brush = settings.brush
- texture_paint = context.texture_paint_object
-
- if context.sculpt_object:
- if brush.sculpt_tool != 'LAYER':
- layout.itemR(brush, "use_anchor")
- layout.itemR(brush, "use_rake")
-
- layout.itemR(brush, "use_airbrush")
- col = layout.column()
- col.active = brush.use_airbrush
- col.itemR(brush, "rate", slider=True)
-
- if not texture_paint:
- layout.itemR(brush, "use_smooth_stroke")
- col = layout.column()
- col.active = brush.use_smooth_stroke
- col.itemR(brush, "smooth_stroke_radius", text="Radius", slider=True)
- col.itemR(brush, "smooth_stroke_factor", text="Factor", slider=True)
-
- layout.itemR(brush, "use_space")
- row = layout.row(align=True)
- row.active = brush.use_space
- row.itemR(brush, "spacing", text="Distance", slider=True)
- if texture_paint:
- row.itemR(brush, "use_spacing_pressure", toggle=True, text="")
-
-class VIEW3D_PT_tools_brush_curve(PaintPanel):
- __label__ = "Curve"
- __default_closed__ = True
-
- def poll(self, context):
- settings = self.paint_settings(context)
- return (settings and settings.brush and settings.brush.curve)
-
- def draw(self, context):
- layout = self.layout
-
- settings = self.paint_settings(context)
- brush = settings.brush
-
- layout.template_curve_mapping(brush, "curve")
- layout.item_menu_enumO("brush.curve_preset", property="shape")
-
-class VIEW3D_PT_sculpt_options(PaintPanel):
- __label__ = "Options"
-
- def poll(self, context):
- return context.sculpt_object
-
- def draw(self, context):
- layout = self.layout
-
- sculpt = context.tool_settings.sculpt
-
- col = layout.column()
- col.itemR(sculpt, "partial_redraw", text="Partial Refresh")
- col.itemR(sculpt, "show_brush")
-
- split = self.layout.split()
-
- col = split.column()
- col.itemL(text="Symmetry:")
- col.itemR(sculpt, "symmetry_x", text="X")
- col.itemR(sculpt, "symmetry_y", text="Y")
- col.itemR(sculpt, "symmetry_z", text="Z")
-
- col = split.column()
- col.itemL(text="Lock:")
- col.itemR(sculpt, "lock_x", text="X")
- col.itemR(sculpt, "lock_y", text="Y")
- col.itemR(sculpt, "lock_z", text="Z")
-
-# ********** default tools for weightpaint ****************
-
-class VIEW3D_PT_tools_weightpaint(View3DPanel):
- __context__ = "weightpaint"
- __label__ = "Options"
-
- def draw(self, context):
- layout = self.layout
-
- wpaint = context.tool_settings.weight_paint
-
- col = layout.column()
- col.itemL(text="Blend:")
- col.itemR(wpaint, "mode", text="")
- col.itemR(wpaint, "all_faces")
- col.itemR(wpaint, "normals")
- col.itemR(wpaint, "spray")
- col.itemR(wpaint, "vertex_dist", text="Distance")
-
-# Commented out because the Apply button isn't an operator yet, making these settings useless
-# col.itemL(text="Gamma:")
-# col.itemR(wpaint, "gamma", text="")
-# col.itemL(text="Multiply:")
-# col.itemR(wpaint, "mul", text="")
-
-# Also missing now:
-# Soft, Vgroup, X-Mirror and "Clear" Operator.
-
-# ********** default tools for vertexpaint ****************
-
-class VIEW3D_PT_tools_vertexpaint(View3DPanel):
- __context__ = "vertexpaint"
- __label__ = "Options"
-
- def draw(self, context):
- layout = self.layout
-
- vpaint = context.tool_settings.vertex_paint
-
- col = layout.column()
- col.itemL(text="Blend:")
- col.itemR(vpaint, "mode", text="")
- col.itemR(vpaint, "all_faces")
- col.itemR(vpaint, "normals")
- col.itemR(vpaint, "spray")
- col.itemR(vpaint, "vertex_dist", text="Distance")
-# Commented out because the Apply button isn't an operator yet, making these settings useless
-# col.itemL(text="Gamma:")
-# col.itemR(vpaint, "gamma", text="")
-# col.itemL(text="Multiply:")
-# col.itemR(vpaint, "mul", text="")
-
-
-# ********** default tools for texturepaint ****************
-
-class VIEW3D_PT_tools_projectpaint(View3DPanel):
- __context__ = "texturepaint"
- __label__ = "Project Paint"
-
- def poll(self, context):
- return context.tool_settings.image_paint.tool != 'SMEAR'
-
- def draw_header(self, context):
- ipaint = context.tool_settings.image_paint
-
- self.layout.itemR(ipaint, "use_projection", text="")
-
- def draw(self, context):
- layout = self.layout
-
- ipaint = context.tool_settings.image_paint
- settings = context.tool_settings.image_paint
- use_projection= ipaint.use_projection
-
- col = layout.column()
- sub = col.column()
- sub.active = use_projection
- sub.itemR(ipaint, "use_occlude")
- sub.itemR(ipaint, "use_backface_cull")
-
- split = layout.split()
-
- col = split.column()
- col.active = (use_projection)
- col.itemR(ipaint, "use_normal_falloff")
-
- col = split.column()
- col.active = (ipaint.use_normal_falloff and use_projection)
- col.itemR(ipaint, "normal_angle", text="")
-
- split = layout.split(percentage=0.7)
-
- col = split.column(align=False)
- col.active = (use_projection)
- col.itemR(ipaint, "use_stencil_layer")
-
- col = split.column(align=False)
- col.active = (use_projection and ipaint.use_stencil_layer)
- col.itemR(ipaint, "invert_stencil", text="Inv")
-
- col = layout.column()
- sub = col.column()
- sub.active = (settings.tool == 'CLONE')
- sub.itemR(ipaint, "use_clone_layer")
-
- sub = col.column()
- sub.itemR(ipaint, "seam_bleed")
-
-# ********** default tools for particle mode ****************
-
-class VIEW3D_PT_tools_particlemode(View3DPanel):
- __context__ = "particlemode"
- __label__ = "Options"
-
- def draw(self, context):
- layout = self.layout
-
- pe = context.tool_settings.particle_edit
- ob = pe.object
-
- row = layout.row()
- row.itemL(text="Edit:")
- row.itemR(pe, "type", text="")
-
- if pe.type == 'PARTICLES':
- if ob.particle_systems:
- if len(ob.particle_systems) > 1:
- layout.template_list(ob, "particle_systems", ob, "active_particle_system_index", type='ICONS')
-
- ptcache = ob.particle_systems[ob.active_particle_system_index].point_cache
- else:
- for md in ob.modifiers:
- if md.type==pe.type:
- ptcache = md.point_cache
-
- if ptcache and len(ptcache.point_cache_list) > 1:
- layout.template_list(ptcache, "point_cache_list", ptcache, "active_point_cache_index", type='ICONS')
-
-
- if not pe.editable:
- layout.itemL(text="Point cache must be baked")
- layout.itemL(text="to enable editing!")
-
- col = layout.column(align=True)
- if pe.hair:
- col.active = pe.editable
- col.itemR(pe, "emitter_deflect", text="Deflect emitter")
- sub = col.row()
- sub.active = pe.emitter_deflect
- sub.itemR(pe, "emitter_distance", text="Distance")
-
- col = layout.column(align=True)
- col.active = pe.editable
- col.itemL(text="Keep:")
- col.itemR(pe, "keep_lengths", text="Lenghts")
- col.itemR(pe, "keep_root", text="Root")
- if not pe.hair:
- col.itemL(text="Correct:")
- col.itemR(pe, "auto_velocity", text="Velocity")
-
- col = layout.column(align=True)
- col.active = pe.editable
- col.itemL(text="Draw:")
- col.itemR(pe, "draw_step", text="Path Steps")
- if pe.type == 'PARTICLES':
- col.itemR(pe, "draw_particles", text="Particles")
- col.itemR(pe, "fade_time")
- sub = col.row()
- sub.active = pe.fade_time
- sub.itemR(pe, "fade_frames", slider=True)
-
-bpy.types.register(VIEW3D_PT_tools_objectmode)
-bpy.types.register(VIEW3D_PT_tools_meshedit)
-bpy.types.register(VIEW3D_PT_tools_curveedit)
-bpy.types.register(VIEW3D_PT_tools_surfaceedit)
-bpy.types.register(VIEW3D_PT_tools_textedit)
-bpy.types.register(VIEW3D_PT_tools_armatureedit)
-bpy.types.register(VIEW3D_PT_tools_mballedit)
-bpy.types.register(VIEW3D_PT_tools_latticeedit)
-bpy.types.register(VIEW3D_PT_tools_posemode)
-bpy.types.register(VIEW3D_PT_tools_brush)
-bpy.types.register(VIEW3D_PT_tools_brush_stroke)
-bpy.types.register(VIEW3D_PT_tools_brush_curve)
-bpy.types.register(VIEW3D_PT_sculpt_options)
-bpy.types.register(VIEW3D_PT_tools_vertexpaint)
-bpy.types.register(VIEW3D_PT_tools_weightpaint)
-bpy.types.register(VIEW3D_PT_tools_projectpaint)
-bpy.types.register(VIEW3D_PT_tools_particlemode)