diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2010-04-04 23:50:22 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2010-04-04 23:50:22 +0400 |
commit | f9e2f6acd761492c52500bf72e32a4ad5a33757b (patch) | |
tree | df44ac89101bf0be263a8d53623c9302dca5e59c /release | |
parent | 65b2ef5b15ae56758f7097df98dbce9ba3fe1454 (diff) | |
parent | 687c752b75bc488b2de5a4186ba2398b31dbb46e (diff) |
Merged changes in the trunk up to revision 27992.
Diffstat (limited to 'release')
43 files changed, 524 insertions, 218 deletions
diff --git a/release/plugins/sequence/blur.c b/release/plugins/sequence/blur.c index 261bfa40351..c23a924ac65 100644 --- a/release/plugins/sequence/blur.c +++ b/release/plugins/sequence/blur.c @@ -160,7 +160,7 @@ void doblur(struct ImBuf *mbuf, float fac, Cast *cast) char *irect, *prect, *mrect; float *irectf, *prectf, *mrectf; - /* wich buffers ? */ + /* which buffers ? */ if(fac>7.0) fac= 7.0; if(fac<=1.0) return; diff --git a/release/scripts/io/export_fbx.py b/release/scripts/io/export_fbx.py index bc1a0b82d85..a69addf72f5 100644 --- a/release/scripts/io/export_fbx.py +++ b/release/scripts/io/export_fbx.py @@ -2041,7 +2041,7 @@ def write(filename, batch_objects = None, \ # ob_base.makeDisplayList() # This causes the makeDisplayList command to effect the mesh - scene.set_frame(scene.current_frame) + scene.set_frame(scene.frame_current) # Blender.Set('curframe', Blender.Get('curframe')) @@ -2216,7 +2216,7 @@ def write(filename, batch_objects = None, \ ob_base.make_display_list() # ob_base.makeDisplayList() # This causes the makeDisplayList command to effect the mesh - scene.set_frame(scene.current_frame) + scene.set_frame(scene.frame_current) # Blender.Set('curframe', Blender.Get('curframe')) del tmp_ob_type, tmp_objects @@ -2701,9 +2701,9 @@ Connections: {''') return int(0.5 + ((t/fps) * 46186158000)) fps = float(render.fps) - start = scene.start_frame + start = scene.frame_start # start = render.sFrame - end = scene.end_frame + end = scene.frame_end # end = render.eFrame if end < start: start, end = end, start if start==end: ANIM_ENABLE = False @@ -2713,7 +2713,7 @@ Connections: {''') if ANIM_ENABLE and [tmp for tmp in ob_anim_lists if tmp]: - frame_orig = scene.current_frame + frame_orig = scene.frame_current # frame_orig = Blender.Get('curframe') if ANIM_OPTIMIZE: diff --git a/release/scripts/io/export_mdd.py b/release/scripts/io/export_mdd.py index cf72169121c..be3ddbc73bd 100644 --- a/release/scripts/io/export_mdd.py +++ b/release/scripts/io/export_mdd.py @@ -82,7 +82,7 @@ def write(filename, sce, ob, PREF_STARTFRAME, PREF_ENDFRAME, PREF_FPS): bpy.ops.object.mode_set(mode='OBJECT') - orig_frame = sce.current_frame + orig_frame = sce.frame_current sce.set_frame(PREF_STARTFRAME) me = ob.create_mesh(True, 'PREVIEW') @@ -162,8 +162,8 @@ class ExportMDD(bpy.types.Operator): path = StringProperty(name="File Path", description="File path used for exporting the MDD file", maxlen=1024) check_existing = BoolProperty(name="Check Existing", description="Check and warn on overwriting existing files", default=True, options={'HIDDEN'}) fps = IntProperty(name="Frames Per Second", description="Number of frames/second", min=minfps, max=maxfps, default=25) - start_frame = IntProperty(name="Start Frame", description="Start frame for baking", min=minframe, max=maxframe, default=1) - end_frame = IntProperty(name="End Frame", description="End frame for baking", min=minframe, max=maxframe, default=250) + frame_start = IntProperty(name="Start Frame", description="Start frame for baking", min=minframe, max=maxframe, default=1) + frame_end = IntProperty(name="End Frame", description="End frame for baking", min=minframe, max=maxframe, default=250) def poll(self, context): ob = context.active_object @@ -173,7 +173,7 @@ class ExportMDD(bpy.types.Operator): if not self.properties.path: raise Exception("filename not set") write(self.properties.path, context.scene, context.active_object, - self.properties.start_frame, self.properties.end_frame, self.properties.fps) + self.properties.frame_start, self.properties.frame_end, self.properties.fps) return {'FINISHED'} def invoke(self, context, event): diff --git a/release/scripts/io/export_obj.py b/release/scripts/io/export_obj.py index 1f3b8c7db47..6ea00a74435 100644 --- a/release/scripts/io/export_obj.py +++ b/release/scripts/io/export_obj.py @@ -839,14 +839,14 @@ def do_export(filename, context, for scn in export_scenes: # scn.makeCurrent() # If already current, this is not slow. # context = scn.getRenderingContext() - orig_frame = scn.current_frame + orig_frame = scn.frame_current if EXPORT_ALL_SCENES: # Add scene name into the context_name context_name[1] = '_%s' % bpy.utils.clean_name(scn.name) # WARNING, its possible that this could cause a collision. we could fix if were feeling parranoied. # Export an animation? if EXPORT_ANIMATION: - scene_frames = range(scn.start_frame, context.end_frame+1) # Up to and including the end frame. + scene_frames = range(scn.frame_start, context.frame_end + 1) # Up to and including the end frame. else: scene_frames = [orig_frame] # Dont export an animation. @@ -855,7 +855,7 @@ def do_export(filename, context, if EXPORT_ANIMATION: # Add frame to the filename. context_name[2] = '_%.6d' % frame - scn.current_frame = frame + scn.frame_current = frame if EXPORT_SEL_ONLY: export_objects = context.selected_objects else: @@ -874,7 +874,7 @@ def do_export(filename, context, EXPORT_POLYGROUPS, EXPORT_CURVE_AS_NURBS) - scn.current_frame = orig_frame + scn.frame_current = orig_frame # Restore old active scene. # orig_scene.makeCurrent() diff --git a/release/scripts/io/import_anim_bvh.py b/release/scripts/io/import_anim_bvh.py index 364bd6e96ee..e6142a2db8a 100644 --- a/release/scripts/io/import_anim_bvh.py +++ b/release/scripts/io/import_anim_bvh.py @@ -321,11 +321,11 @@ def bvh_node_dict2objects(context, bvh_nodes, IMPORT_START_FRAME=1, IMPORT_LOOP= # Animate the data, the last used bvh_node will do since they all have the same number of frames - for current_frame in range(len(bvh_node.anim_data)): - Blender.Set('curframe', current_frame + IMPORT_START_FRAME) + for frame_current in range(len(bvh_node.anim_data)): + Blender.Set('curframe', frame_current + IMPORT_START_FRAME) for bvh_node in bvh_nodes.values(): - lx, ly, lz, rx, ry, rz = bvh_node.anim_data[current_frame] + lx, ly, lz, rx, ry, rz = bvh_node.anim_data[frame_current] rest_head_local = bvh_node.rest_head_local bvh_node.temp.loc = rest_head_local + Vector(lx, ly, lz) @@ -508,16 +508,16 @@ def bvh_node_dict2armature(context, bvh_nodes, ROT_MODE='XYZ', IMPORT_START_FRAM prev_euler = [Euler() for i in range(len(bvh_nodes))] # Animate the data, the last used bvh_node will do since they all have the same number of frames - for current_frame in range(len(bvh_node.anim_data)-1): # skip the first frame (rest frame) - # print current_frame + for frame_current in range(len(bvh_node.anim_data)-1): # skip the first frame (rest frame) + # print frame_current - # if current_frame==40: # debugging + # if frame_current==40: # debugging # break # Dont neet to set the current frame for i, bvh_node in enumerate(bvh_nodes.values()): pose_bone, bone, bone_rest_matrix, bone_rest_matrix_inv = bvh_node.temp - lx, ly, lz, rx, ry, rz = bvh_node.anim_data[current_frame + 1] + lx, ly, lz, rx, ry, rz = bvh_node.anim_data[frame_current + 1] if bvh_node.has_rot: bone_rotation_matrix = Euler(rx, ry, rz).to_matrix().resize4x4() @@ -565,7 +565,7 @@ class BvhImporter(bpy.types.Operator): path = StringProperty(name="File Path", description="File path used for importing the OBJ file", maxlen=1024, default="") scale = FloatProperty(name="Scale", description="Scale the BVH by this value", min=0.0001, max=1000000.0, soft_min=0.001, soft_max=100.0, default=0.1) - start_frame = IntProperty(name="Start Frame", description="Starting frame for the animation", default=1) + frame_start = IntProperty(name="Start Frame", description="Starting frame for the animation", default=1) loop = BoolProperty(name="Loop", description="Loop the animation playback", default=False) rotate_mode = EnumProperty(items=( ('QUATERNION', "Quaternion", "Convert rotations to quaternions"), @@ -597,7 +597,7 @@ class BvhImporter(bpy.types.Operator): bvh_node_dict2armature(context, bvh_nodes, ROT_MODE=self.properties.rotate_mode, - IMPORT_START_FRAME=self.properties.start_frame, + IMPORT_START_FRAME=self.properties.frame_start, IMPORT_LOOP=self.properties.loop) print('Done in %.4f\n' % (time.time() - t1)) @@ -609,7 +609,8 @@ class BvhImporter(bpy.types.Operator): return {'RUNNING_MODAL'} -menu_func = lambda self, context: self.layout.operator(BvhImporter.bl_idname, text="Motion Capture (.bvh)") +def menu_func(self, context): + self.layout.operator(BvhImporter.bl_idname, text="Motion Capture (.bvh)") def register(): diff --git a/release/scripts/io/import_scene_3ds.py b/release/scripts/io/import_scene_3ds.py index d1dbdc62563..19bb734028b 100644 --- a/release/scripts/io/import_scene_3ds.py +++ b/release/scripts/io/import_scene_3ds.py @@ -1030,8 +1030,8 @@ class IMPORT_OT_autodesk_3ds(bpy.types.Operator): return {'RUNNING_MODAL'} -menu_func = lambda self, context: self.layout.operator(IMPORT_OT_autodesk_3ds.bl_idname, text="3D Studio (.3ds)") - +def menu_func(self, context): + self.layout.operator(IMPORT_OT_autodesk_3ds.bl_idname, text="3D Studio (.3ds)") def register(): bpy.types.register(IMPORT_OT_autodesk_3ds) diff --git a/release/scripts/io/import_scene_obj.py b/release/scripts/io/import_scene_obj.py index e12d0c8eaac..9a147b06b07 100644 --- a/release/scripts/io/import_scene_obj.py +++ b/release/scripts/io/import_scene_obj.py @@ -322,7 +322,7 @@ def load_image(imagepath, dirname): for path in variants: if os.path.exists(path): - return bpy.data.add_image(path) + return bpy.data.images.load(path) else: print(path, "doesn't exist") @@ -521,7 +521,6 @@ def split_mesh(verts_loc, faces, unique_materials, filepath, SPLIT_OB_OR_GROUP, ''' Takes vert_loc and faces, and seperates into multiple sets of (verts_loc, faces, unique_materials, dataname) - This is done so objects do not overload the 16 material limit. ''' filename = stripExt(stripPath(filepath)) @@ -715,9 +714,8 @@ def create_mesh(scn, new_objects, has_ngons, CREATE_FGONS, CREATE_EDGES, verts_l me= bpy.data.meshes.new(dataname) # make sure the list isnt too big - for material in materials[0:16]: + for material in materials: me.add_material(material) -# me.materials= materials[0:16] # make sure the list isnt too big. #me.verts.extend([(0,0,0)]) # dummy vert me.add_geometry(len(verts_loc), 0, len(faces)) @@ -772,8 +770,6 @@ def create_mesh(scn, new_objects, has_ngons, CREATE_FGONS, CREATE_EDGES, verts_l if context_material: if context_material_old is not context_material: mat= material_mapping[context_material] - if mat>15: - mat= 15 context_material_old= context_material blender_face.material_index= mat @@ -1363,7 +1359,7 @@ def load_obj_ui(filepath, BATCH_LOAD= False): 'Separate objects from obj...',\ ('Object', SPLIT_OBJECTS, 'Import OBJ Objects into Blender Objects'),\ ('Group', SPLIT_GROUPS, 'Import OBJ Groups into Blender Objects'),\ - ('Material', SPLIT_MATERIALS, 'Import each material into a seperate mesh (Avoids > 16 per mesh error)'),\ + ('Split Materials', SPLIT_MATERIALS, 'Import each material into a seperate mesh'),\ 'Options...',\ ('Keep Vert Order', KEEP_VERT_ORDER, 'Keep vert and face order, disables some other options.'),\ ('Clamp Scale:', CLAMP_SIZE, 0.0, 1000.0, 'Clamp the size to this maximum (Zero to Disable)'),\ @@ -1449,7 +1445,7 @@ def load_obj_ui(filepath, BATCH_LOAD= False): Draw.BeginAlign() SPLIT_OBJECTS = Draw.Toggle('Object', EVENT_REDRAW, ui_x+9, ui_y+89, 55, 21, SPLIT_OBJECTS.val, 'Import OBJ Objects into Blender Objects', do_split) SPLIT_GROUPS = Draw.Toggle('Group', EVENT_REDRAW, ui_x+64, ui_y+89, 55, 21, SPLIT_GROUPS.val, 'Import OBJ Groups into Blender Objects', do_split) - SPLIT_MATERIALS = Draw.Toggle('Material', EVENT_REDRAW, ui_x+119, ui_y+89, 60, 21, SPLIT_MATERIALS.val, 'Import each material into a seperate mesh (Avoids > 16 per mesh error)', do_split) + SPLIT_MATERIALS = Draw.Toggle('Split Materials', EVENT_REDRAW, ui_x+119, ui_y+89, 60, 21, SPLIT_MATERIALS.val, 'Import each material into a seperate mesh', do_split) Draw.EndAlign() # Only used for user feedback @@ -1587,7 +1583,7 @@ class IMPORT_OT_obj(bpy.types.Operator): CREATE_EDGES = BoolProperty(name="Lines as Edges", description="Import lines and faces with 2 verts as edge", default= True) SPLIT_OBJECTS = BoolProperty(name="Object", description="Import OBJ Objects into Blender Objects", default= True) SPLIT_GROUPS = BoolProperty(name="Group", description="Import OBJ Groups into Blender Objects", default= True) - SPLIT_MATERIALS = BoolProperty(name="Material", description="Import each material into a seperate mesh (Avoids > 16 per mesh error)", default= True) + SPLIT_MATERIALS = BoolProperty(name="Split Materials", description="Import each material into a seperate mesh", default= False) # old comment: only used for user feedback # disabled this option because in old code a handler for it disabled SPLIT* params, it's not passed to load_obj # KEEP_VERT_ORDER = BoolProperty(name="Keep Vert Order", description="Keep vert and face order, disables split options, enable for morph targets", default= True) @@ -1621,7 +1617,8 @@ class IMPORT_OT_obj(bpy.types.Operator): return {'RUNNING_MODAL'} -menu_func = lambda self, context: self.layout.operator(IMPORT_OT_obj.bl_idname, text="Wavefront (.obj)") +def menu_func(self, context): + self.layout.operator(IMPORT_OT_obj.bl_idname, text="Wavefront (.obj)") def register(): diff --git a/release/scripts/io/import_shape_mdd.py b/release/scripts/io/import_shape_mdd.py index 106645eaa6b..884fa92ddd0 100644 --- a/release/scripts/io/import_shape_mdd.py +++ b/release/scripts/io/import_shape_mdd.py @@ -45,17 +45,17 @@ def mdd_import(filepath, ob, scene, PREF_START_FRAME=0, PREF_JUMP=1): frames, points = unpack(">2i", file.read(8)) time = unpack((">%df" % frames), file.read(frames * 4)) - print('\tpoints:%d frames:%d' % (points,frames)) + print('\tpoints:%d frames:%d' % (points, frames)) # If target object doesn't have Basis shape key, create it. try: - num_keys = len( ob.data.shape_keys.keys ) + num_keys = len(ob.data.shape_keys.keys) except: basis = ob.add_shape_key() basis.name = "Basis" ob.data.update() - scene.current_frame = PREF_START_FRAME + scene.frame_current = PREF_START_FRAME def UpdateMesh(ob, fr): @@ -68,13 +68,11 @@ def mdd_import(filepath, ob, scene, PREF_START_FRAME=0, PREF_JUMP=1): index = len(ob.data.shape_keys.keys)-1 ob.shape_key_lock = True - verts = ob.data.shape_keys.keys[ len(ob.data.shape_keys.keys)-1 ].data + verts = ob.data.shape_keys.keys[len(ob.data.shape_keys.keys)-1].data - for v in verts: - # 12 is the size of 3 floats - x,y,z= unpack('>3f', file.read(12)) - v.co[:] = x,z,y + for v in verts: # 12 is the size of 3 floats + v.co[:] = unpack('>3f', file.read(12)) #me.update() ob.shape_key_lock = False @@ -82,15 +80,15 @@ def mdd_import(filepath, ob, scene, PREF_START_FRAME=0, PREF_JUMP=1): # insert keyframes shape_keys = ob.data.shape_keys - scene.current_frame -= 1 + scene.frame_current -= 1 ob.data.shape_keys.keys[index].value = 0.0 shape_keys.keys[len(ob.data.shape_keys.keys)-1].keyframe_insert("value") - scene.current_frame += 1 + scene.frame_current += 1 ob.data.shape_keys.keys[index].value = 1.0 shape_keys.keys[len(ob.data.shape_keys.keys)-1].keyframe_insert("value") - scene.current_frame += 1 + scene.frame_current += 1 ob.data.shape_keys.keys[index].value = 0.0 shape_keys.keys[len(ob.data.shape_keys.keys)-1].keyframe_insert("value") @@ -120,8 +118,7 @@ class importMDD(bpy.types.Operator): # to the class instance from the operator settings before calling. path = StringProperty(name="File Path", description="File path used for importing the MDD file", maxlen=1024) #fps = IntProperty(name="Frames Per Second", description="Number of frames/second", min=minfps, max=maxfps, default=25) - start_frame = IntProperty(name="Start Frame", description="Start frame for inserting animation", min=minframe, max=maxframe, default=0) - + frame_start = IntProperty(name="Start Frame", description="Start frame for inserting animation", min=minframe, max=maxframe, default=0) def poll(self, context): ob = context.active_object @@ -131,7 +128,7 @@ class importMDD(bpy.types.Operator): if not self.properties.path: raise Exception("filename not set") - mdd_import( self.properties.path, bpy.context.active_object, context.scene, self.properties.start_frame, 1) + mdd_import(self.properties.path, bpy.context.active_object, context.scene, self.properties.frame_start, 1) return {'FINISHED'} @@ -149,6 +146,7 @@ def register(): bpy.types.register(importMDD) bpy.types.INFO_MT_file_import.append(menu_func) + def unregister(): bpy.types.unregister(importMDD) bpy.types.INFO_MT_file_import.remove(menu_func) diff --git a/release/scripts/io/netrender/client.py b/release/scripts/io/netrender/client.py index 792a699bfe8..3acc0e1c2e1 100644 --- a/release/scripts/io/netrender/client.py +++ b/release/scripts/io/netrender/client.py @@ -96,10 +96,10 @@ def clientSendJob(conn, scene, anim = False): job = netrender.model.RenderJob() if anim: - for f in range(scene.start_frame, scene.end_frame + 1): + for f in range(scene.frame_start, scene.frame_end + 1): job.addFrame(f) else: - job.addFrame(scene.current_frame) + job.addFrame(scene.frame_current) filename = bpy.data.filename job.addFile(filename) @@ -228,7 +228,7 @@ class NetworkRenderEngine(bpy.types.RenderEngine): self.update_stats("", "Network render waiting for results") - requestResult(conn, job_id, scene.current_frame) + requestResult(conn, job_id, scene.frame_current) response = conn.getresponse() if response.status == http.client.NO_CONTENT: @@ -236,12 +236,12 @@ class NetworkRenderEngine(bpy.types.RenderEngine): netsettings.job_id = clientSendJob(conn, scene) job_id = netsettings.job_id - requestResult(conn, job_id, scene.current_frame) + requestResult(conn, job_id, scene.frame_current) response = conn.getresponse() while response.status == http.client.ACCEPTED and not self.test_break(): time.sleep(1) - requestResult(conn, job_id, scene.current_frame) + requestResult(conn, job_id, scene.frame_current) response = conn.getresponse() # cancel new jobs (animate on network) on break diff --git a/release/scripts/keyingsets/keyingsets_utils.py b/release/scripts/keyingsets/keyingsets_utils.py index 3d57130b6e5..2b0793fe36b 100644 --- a/release/scripts/keyingsets/keyingsets_utils.py +++ b/release/scripts/keyingsets/keyingsets_utils.py @@ -81,7 +81,7 @@ def get_transform_generators_base_info(data): path = "" # data on ID-blocks directly should get grouped by the KeyingSet - grouping = None; + grouping = None else: # get the path to the ID-block path = data.path_to_id() diff --git a/release/scripts/modules/bpy_types.py b/release/scripts/modules/bpy_types.py index 060de711637..16fac74b9d0 100644 --- a/release/scripts/modules/bpy_types.py +++ b/release/scripts/modules/bpy_types.py @@ -490,7 +490,7 @@ class Header(StructRNA, _GenericUI): class Menu(StructRNA, _GenericUI): __slots__ = () - def path_menu(self, searchpaths, operator): + def path_menu(self, searchpaths, operator, props_default={}): layout = self.layout # hard coded to set the operators 'path' to the filename. @@ -511,7 +511,12 @@ class Menu(StructRNA, _GenericUI): if f.startswith("."): continue - layout.operator(operator, text=bpy.utils.display_name(f)).path = path + props = layout.operator(operator, text=bpy.utils.display_name(f)) + + for attr, value in props_default.items(): + setattr(props, attr, value) + + props.path = path def draw_preset(self, context): """Define these on the subclass diff --git a/release/scripts/modules/rigify/__init__.py b/release/scripts/modules/rigify/__init__.py index ec9afd78dce..ee6cc934c1b 100644 --- a/release/scripts/modules/rigify/__init__.py +++ b/release/scripts/modules/rigify/__init__.py @@ -234,12 +234,12 @@ def generate_rig(context, obj_orig, prefix="ORG-", META_DEF=True): bone_gen = obj.pose.bones[bone.name] # Rotation mode and transform locks - bone_gen.rotation_mode = bone.rotation_mode - bone_gen.lock_rotation = tuple(bone.lock_rotation) - bone_gen.lock_rotation_w = bone.lock_rotation_w + bone_gen.rotation_mode = bone.rotation_mode + bone_gen.lock_rotation = tuple(bone.lock_rotation) + bone_gen.lock_rotation_w = bone.lock_rotation_w bone_gen.lock_rotations_4d = bone.lock_rotations_4d - bone_gen.lock_location = tuple(bone.lock_location) - bone_gen.lock_scale = tuple(bone.lock_scale) + bone_gen.lock_location = tuple(bone.lock_location) + bone_gen.lock_scale = tuple(bone.lock_scale) # Custom properties for prop in bone.keys(): diff --git a/release/scripts/modules/rigify/eye_balls.py b/release/scripts/modules/rigify/eye_balls.py index 9cb3c8229b0..8c126151024 100644 --- a/release/scripts/modules/rigify/eye_balls.py +++ b/release/scripts/modules/rigify/eye_balls.py @@ -241,8 +241,8 @@ def control(obj, definitions, base_names, options): con.subtarget = target_ctrl con.action = spread_action con.transform_channel = 'SCALE_X' - con.start_frame = -20 - con.end_frame = 20 + con.frame_start = -20 + con.frame_end = 20 con.minimum = 0.0 con.maximum = 2.0 con.target_space = 'LOCAL' diff --git a/release/scripts/modules/rigify/eye_lid.py b/release/scripts/modules/rigify/eye_lid.py index 39804e6b704..6eb1ff87d82 100644 --- a/release/scripts/modules/rigify/eye_lid.py +++ b/release/scripts/modules/rigify/eye_lid.py @@ -433,8 +433,8 @@ def control(obj, definitions, base_names, options): con.subtarget = upper_lid_ctrl con.action = close_action con.transform_channel = 'LOCATION_Y' - con.start_frame = -30 - con.end_frame = 30 + con.frame_start = -30 + con.frame_end = 30 con.minimum = -distance*2 con.maximum = distance con.target_space = 'LOCAL' @@ -452,8 +452,8 @@ def control(obj, definitions, base_names, options): con.subtarget = upper_lid_ctrl con.action = close_action con.transform_channel = 'LOCATION_Y' - con.start_frame = -30 - con.end_frame = 30 + con.frame_start = -30 + con.frame_end = 30 con.minimum = -distance*2 con.maximum = distance con.target_space = 'LOCAL' @@ -470,8 +470,8 @@ def control(obj, definitions, base_names, options): con.subtarget = upper_lid_ctrl con.action = close_action con.transform_channel = 'LOCATION_Y' - con.start_frame = -30 - con.end_frame = 30 + con.frame_start = -30 + con.frame_end = 30 con.minimum = -distance*2 con.maximum = distance con.target_space = 'LOCAL' @@ -488,8 +488,8 @@ def control(obj, definitions, base_names, options): con.subtarget = upper_lid_ctrl con.action = close_action con.transform_channel = 'LOCATION_Y' - con.start_frame = -30 - con.end_frame = 30 + con.frame_start = -30 + con.frame_end = 30 con.minimum = -distance*2 con.maximum = distance con.target_space = 'LOCAL' @@ -506,8 +506,8 @@ def control(obj, definitions, base_names, options): con.subtarget = upper_lid_ctrl con.action = close_action con.transform_channel = 'LOCATION_Y' - con.start_frame = -30 - con.end_frame = 30 + con.frame_start = -30 + con.frame_end = 30 con.minimum = -distance*2 con.maximum = distance con.target_space = 'LOCAL' @@ -525,8 +525,8 @@ def control(obj, definitions, base_names, options): con.subtarget = lower_lid_ctrl con.action = close_action con.transform_channel = 'LOCATION_Y' - con.start_frame = -30 - con.end_frame = 30 + con.frame_start = -30 + con.frame_end = 30 con.minimum = -distance con.maximum = distance*2 con.target_space = 'LOCAL' @@ -543,8 +543,8 @@ def control(obj, definitions, base_names, options): con.subtarget = lower_lid_ctrl con.action = close_action con.transform_channel = 'LOCATION_Y' - con.start_frame = -30 - con.end_frame = 30 + con.frame_start = -30 + con.frame_end = 30 con.minimum = -distance con.maximum = distance*2 con.target_space = 'LOCAL' @@ -561,8 +561,8 @@ def control(obj, definitions, base_names, options): con.subtarget = lower_lid_ctrl con.action = close_action con.transform_channel = 'LOCATION_Y' - con.start_frame = -30 - con.end_frame = 30 + con.frame_start = -30 + con.frame_end = 30 con.minimum = -distance con.maximum = distance*2 con.target_space = 'LOCAL' @@ -579,8 +579,8 @@ def control(obj, definitions, base_names, options): con.subtarget = lower_lid_ctrl con.action = close_action con.transform_channel = 'LOCATION_Y' - con.start_frame = -30 - con.end_frame = 30 + con.frame_start = -30 + con.frame_end = 30 con.minimum = -distance con.maximum = distance*2 con.target_space = 'LOCAL' @@ -597,8 +597,8 @@ def control(obj, definitions, base_names, options): con.subtarget = lower_lid_ctrl con.action = close_action con.transform_channel = 'LOCATION_Y' - con.start_frame = -30 - con.end_frame = 30 + con.frame_start = -30 + con.frame_end = 30 con.minimum = -distance con.maximum = distance*2 con.target_space = 'LOCAL' diff --git a/release/scripts/modules/rigify/mouth.py b/release/scripts/modules/rigify/mouth.py index 31d7c5a1ce9..4defd28f56a 100644 --- a/release/scripts/modules/rigify/mouth.py +++ b/release/scripts/modules/rigify/mouth.py @@ -543,8 +543,8 @@ def control(obj, definitions, base_names, options): con.subtarget = jopent con.action = open_action con.transform_channel = 'SCALE_Y' - con.start_frame = 0 - con.end_frame = 60 + con.frame_start = 0 + con.frame_end = 60 con.minimum = 0.0 con.maximum = 1.0 con.target_space = 'LOCAL' @@ -561,8 +561,8 @@ def control(obj, definitions, base_names, options): con.subtarget = jopent con.action = open_action con.transform_channel = 'SCALE_Y' - con.start_frame = 0 - con.end_frame = 60 + con.frame_start = 0 + con.frame_end = 60 con.minimum = 0.0 con.maximum = 1.0 con.target_space = 'LOCAL' @@ -579,8 +579,8 @@ def control(obj, definitions, base_names, options): con.subtarget = jopent con.action = open_action con.transform_channel = 'SCALE_Y' - con.start_frame = 0 - con.end_frame = 60 + con.frame_start = 0 + con.frame_end = 60 con.minimum = 0.0 con.maximum = 1.0 con.target_space = 'LOCAL' @@ -597,8 +597,8 @@ def control(obj, definitions, base_names, options): con.subtarget = jopent con.action = open_action con.transform_channel = 'SCALE_Y' - con.start_frame = 0 - con.end_frame = 60 + con.frame_start = 0 + con.frame_end = 60 con.minimum = 0.0 con.maximum = 1.0 con.target_space = 'LOCAL' @@ -615,8 +615,8 @@ def control(obj, definitions, base_names, options): con.subtarget = jopent con.action = open_action con.transform_channel = 'SCALE_Y' - con.start_frame = 0 - con.end_frame = 60 + con.frame_start = 0 + con.frame_end = 60 con.minimum = 0.0 con.maximum = 1.0 con.target_space = 'LOCAL' @@ -633,8 +633,8 @@ def control(obj, definitions, base_names, options): con.subtarget = jopent con.action = open_action con.transform_channel = 'SCALE_Y' - con.start_frame = 0 - con.end_frame = 60 + con.frame_start = 0 + con.frame_end = 60 con.minimum = 0.0 con.maximum = 1.0 con.target_space = 'LOCAL' @@ -651,8 +651,8 @@ def control(obj, definitions, base_names, options): con.subtarget = jopent con.action = open_action con.transform_channel = 'SCALE_Y' - con.start_frame = 0 - con.end_frame = 60 + con.frame_start = 0 + con.frame_end = 60 con.minimum = 0.0 con.maximum = 1.0 con.target_space = 'LOCAL' @@ -669,8 +669,8 @@ def control(obj, definitions, base_names, options): con.subtarget = jopent con.action = open_action con.transform_channel = 'SCALE_Y' - con.start_frame = 0 - con.end_frame = 60 + con.frame_start = 0 + con.frame_end = 60 con.minimum = 0.0 con.maximum = 1.0 con.target_space = 'LOCAL' diff --git a/release/scripts/modules/rigify/stretch.py b/release/scripts/modules/rigify/stretch.py index 3727c484d6a..1c3d317b4b1 100644 --- a/release/scripts/modules/rigify/stretch.py +++ b/release/scripts/modules/rigify/stretch.py @@ -41,12 +41,12 @@ RIG_TYPE = "stretch" # pbone = obj.pose.bones['Bone'] # pbone['type'] = 'copy' -bool_map = {0:False, 1:True, - 0.0:False, 1.0:True, - "false":False, "true":True, - "False":False, "True":True, - "no":False, "yes":True, - "No":False, "Yes":True} +bool_map = {0: False, 1: True, + 0.0: False, 1.0: True, + "false": False, "true": True, + "False": False, "True": True, + "no": False, "yes": True, + "No": False, "Yes": True} def metarig_definition(obj, orig_bone_name): diff --git a/release/scripts/op/add_mesh_torus.py b/release/scripts/op/add_mesh_torus.py index 825b23c49e1..601cc712dda 100644 --- a/release/scripts/op/add_mesh_torus.py +++ b/release/scripts/op/add_mesh_torus.py @@ -154,9 +154,8 @@ class AddTorus(bpy.types.Operator): return {'FINISHED'} -# Add to the menu -menu_func = (lambda self, context: self.layout.operator(AddTorus.bl_idname, - text="Torus", icon='MESH_DONUT')) +def menu_func(self, context): + self.layout.operator(AddTorus.bl_idname, text="Torus", icon='MESH_DONUT') def register(): diff --git a/release/scripts/op/image.py b/release/scripts/op/image.py index e0e75a1f17a..f362f55d37e 100644 --- a/release/scripts/op/image.py +++ b/release/scripts/op/image.py @@ -21,6 +21,7 @@ import bpy from bpy.props import StringProperty + class EditExternally(bpy.types.Operator): '''Edit image in an external application''' bl_idname = "image.external_edit" @@ -74,7 +75,7 @@ class EditExternally(bpy.types.Operator): self.properties.path = path self.execute(context) - + return {'FINISHED'} @@ -181,7 +182,6 @@ class ProjectApply(bpy.types.Operator): return {'FINISHED'} - classes = [ EditExternally, SaveDirty, diff --git a/release/scripts/op/nla.py b/release/scripts/op/nla.py new file mode 100644 index 00000000000..db8c0be053a --- /dev/null +++ b/release/scripts/op/nla.py @@ -0,0 +1,205 @@ +# ##### BEGIN GPL LICENSE BLOCK ##### +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# ##### END GPL LICENSE BLOCK ##### + +# <pep8 compliant> + +import bpy + + +def pose_info(): + from Mathutils import Matrix + + info = {} + + obj = bpy.context.object + pose = obj.pose + + pose_items = pose.bones.items() + + for name, pbone in pose_items: + binfo = {} + bone = pbone.bone + + binfo["parent"] = getattr(bone.parent, "name", None) + binfo["bone"] = bone + binfo["pbone"] = pbone + binfo["matrix_local"] = bone.matrix_local.copy() + try: + binfo["matrix_local_inv"] = binfo["matrix_local"].copy().invert() + except: + binfo["matrix_local_inv"] = Matrix() + + binfo["matrix"] = bone.matrix.copy() + binfo["matrix_pose"] = pbone.matrix.copy() + try: + binfo["matrix_pose_inv"] = binfo["matrix_pose"].copy().invert() + except: + binfo["matrix_pose_inv"] = Matrix() + + print(binfo["matrix_pose"]) + info[name] = binfo + + for name, pbone in pose_items: + binfo = info[name] + binfo_parent = binfo.get("parent", None) + if binfo_parent: + binfo_parent = info[binfo_parent] + + matrix = binfo["matrix_pose"] + rest_matrix = binfo["matrix_local"] + + if binfo_parent: + matrix = binfo_parent["matrix_pose_inv"] * matrix + rest_matrix = binfo_parent["matrix_local_inv"] * rest_matrix + + matrix = rest_matrix.copy().invert() * matrix + + binfo["matrix_key"] = matrix.copy() + + return info + + +def bake(frame_start, frame_end, step=1, only_selected=False): + # import nla; reload(nla); nla.bake() + + scene = bpy.context.scene + obj = bpy.context.object + pose = obj.pose + + info_ls = [] + + frame_range = range(frame_start, frame_end + 1, step) + + # could spped this up by applying steps here too... + for f in frame_range: + scene.set_frame(f) + + info = pose_info() + info_ls.append(info) + f += 1 + + action = bpy.data.actions.new("Action") + + bpy.context.object.animation_data.action = action + + pose_items = pose.bones.items() + + for name, pbone in pose_items: + if only_selected and not pbone.selected: + continue + + for f in frame_range: + matrix = info_ls[int((f - frame_start) / step)][name]["matrix_key"] + + #pbone.location = matrix.translation_part() + #pbone.rotation_quaternion = matrix.to_quat() + pbone.matrix_local = [f for v in matrix for f in v] + + pbone.keyframe_insert("location", -1, f) + + rotation_mode = pbone.rotation_mode + + if rotation_mode == 'QUATERNION': + pbone.keyframe_insert("rotation_quaternion", -1, f) + elif rotation_mode == 'AXIS_ANGLE': + pbone.keyframe_insert("rotation_axis_angle", -1, f) + else: # euler, XYZ, ZXY etc + pbone.keyframe_insert("rotation_euler", -1, f) + + pbone.keyframe_insert("scale", -1, f) + + # assign groups, could become a more generic function + agrp_loc = action.groups.add("Location") + agrp_rot = action.groups.add("Rotation") + agrp_sca = action.groups.add("Scale") + + for fcu in action.fcurves: + path = fcu.data_path.rsplit(".", 1)[-1] + + if path.startswith("loc"): + fcu.group = agrp_loc + if path.startswith("rot"): + fcu.group = agrp_rot + if path.startswith("sca"): + fcu.group = agrp_sca + + return action + + +from bpy.props import * + + +class BakeAction(bpy.types.Operator): + '''Add a torus mesh''' + bl_idname = "nla.bake" + bl_label = "Bake Action" + bl_options = {'REGISTER', 'UNDO'} + + frame_start = IntProperty(name="Start Frame", + description="Start frame for baking", + default=1, min=1, max=300000) + frame_end = IntProperty(name="End Frame", + description="End frame for baking", + default=250, min=1, max=300000) + step = IntProperty(name="Frame Step", + description="Frame Step", + default=1, min=1, max=120) + only_selected = BoolProperty(name="Only Selected", + default=True) + + def execute(self, context): + props = self.properties + + action = bake(props.frame_start, props.frame_end, props.step, props.only_selected) + + # basic cleanup, could move elsewhere + for fcu in action.fcurves: + keyframe_points = fcu.keyframe_points + i = 1 + while i < len(fcu.keyframe_points) - 1: + val_prev = keyframe_points[i - 1].co[1] + val_next = keyframe_points[i + 1].co[1] + val = keyframe_points[i].co[1] + + if abs(val - val_prev) + abs(val - val_next) < 0.0001: + keyframe_points.remove(keyframe_points[i]) + else: + i += 1 + + return {'FINISHED'} + + def invoke(self, context, event): + wm = context.manager + return wm.invoke_props_dialog(self) + + +#def menu_func(self, context): +# self.layout.operator(BakeAction.bl_idname, text="Bake Armature Action") + + +def register(): + bpy.types.register(BakeAction) + # bpy.types.INFO_MT_mesh_add.append(menu_func) + + +def unregister(): + bpy.types.unregister(BakeAction) + # bpy.types.INFO_MT_mesh_add.remove(menu_func) + +if __name__ == "__main__": + register() diff --git a/release/scripts/op/screen_play_rendered_anim.py b/release/scripts/op/screen_play_rendered_anim.py index e809251de7c..2ecd445df1d 100644 --- a/release/scripts/op/screen_play_rendered_anim.py +++ b/release/scripts/op/screen_play_rendered_anim.py @@ -89,11 +89,11 @@ class PlayRenderedAnim(bpy.types.Operator): if is_movie == False and preset in ('FRAMECYCLER', 'RV', 'MPLAYER'): # replace the number with '#' file_a = rd.frame_path(frame=0) - + # TODO, make an api call for this frame_tmp = 9 file_b = rd.frame_path(frame=frame_tmp) - + while len(file_a) == len(file_b): frame_tmp = (frame_tmp * 10) + 9 print(frame_tmp) @@ -103,7 +103,7 @@ class PlayRenderedAnim(bpy.types.Operator): file = ''.join([(c if file_b[i] == c else "#") for i, c in enumerate(file_a)]) else: # works for movies and images - file = rd.frame_path(frame=scene.start_frame) + file = rd.frame_path(frame=scene.frame_start) file = bpy.utils.expandpath(file) # expand '//' @@ -116,7 +116,7 @@ class PlayRenderedAnim(bpy.types.Operator): opts = [file, "-playback_speed", str(rd.fps)] cmd.extend(opts) elif preset == 'FRAMECYCLER': - opts = [file, "%d-%d" % (scene.start_frame, scene.end_frame)] + opts = [file, "%d-%d" % (scene.frame_start, scene.frame_end)] cmd.extend(opts) elif preset == 'RV': opts = ["-fps", str(rd.fps), "-play", "[ %s ]" % file] diff --git a/release/scripts/op/sequencer.py b/release/scripts/op/sequencer.py index 76d5c9cfee9..b3b674cb97e 100644 --- a/release/scripts/op/sequencer.py +++ b/release/scripts/op/sequencer.py @@ -49,22 +49,22 @@ class SequencerCrossfadeSounds(bpy.types.Operator): if seq2 == None: self.report({'ERROR'}, "Select 2 sound strips.") return {'CANCELLED'} - if seq1.start_frame_final > seq2.start_frame_final: + if seq1.frame_final_start > seq2.frame_final_start: s = seq1 seq1 = seq2 seq2 = s - if seq1.end_frame_final > seq2.start_frame_final: - tempcfra = context.scene.current_frame - context.scene.current_frame = seq2.start_frame_final + if seq1.frame_final_end > seq2.frame_final_start: + tempcfra = context.scene.frame_current + context.scene.frame_current = seq2.frame_final_start seq1.keyframe_insert('volume') - context.scene.current_frame = seq1.end_frame_final + context.scene.frame_current = seq1.frame_final_end seq1.volume = 0 seq1.keyframe_insert('volume') seq2.keyframe_insert('volume') - context.scene.current_frame = seq2.start_frame_final + context.scene.frame_current = seq2.frame_final_start seq2.volume = 0 seq2.keyframe_insert('volume') - context.scene.current_frame = tempcfra + context.scene.frame_current = tempcfra return {'FINISHED'} else: self.report({'ERROR'}, "The selected strips don't overlap.") diff --git a/release/scripts/ui/properties_animviz.py b/release/scripts/ui/properties_animviz.py index 15cd80c6fdf..311a8b119cf 100644 --- a/release/scripts/ui/properties_animviz.py +++ b/release/scripts/ui/properties_animviz.py @@ -49,8 +49,8 @@ class MotionPathButtonsPanel(bpy.types.Panel): sub.prop(mps, "before_current", text="Before") sub.prop(mps, "after_current", text="After") elif (mps.type == 'RANGE'): - sub.prop(mps, "start_frame", text="Start") - sub.prop(mps, "end_frame", text="End") + sub.prop(mps, "frame_start", text="Start") + sub.prop(mps, "frame_end", text="End") sub.prop(mps, "frame_step", text="Step") if bones: @@ -88,8 +88,8 @@ class OnionSkinButtonsPanel(bpy.types.Panel): sub = col.column(align=True) if arm.ghost_type == 'RANGE': - sub.prop(arm, "ghost_start_frame", text="Start") - sub.prop(arm, "ghost_end_frame", text="End") + sub.prop(arm, "ghost_frame_start", text="Start") + sub.prop(arm, "ghost_frame_end", text="End") sub.prop(arm, "ghost_size", text="Step") elif arm.ghost_type == 'CURRENT_FRAME': sub.prop(arm, "ghost_step", text="Range") diff --git a/release/scripts/ui/properties_data_armature.py b/release/scripts/ui/properties_data_armature.py index 4f382d550e2..976c2ad78d5 100644 --- a/release/scripts/ui/properties_data_armature.py +++ b/release/scripts/ui/properties_data_armature.py @@ -186,8 +186,8 @@ class DATA_PT_ghost(DataButtonsPanel): sub = col.column(align=True) if arm.ghost_type == 'RANGE': - sub.prop(arm, "ghost_start_frame", text="Start") - sub.prop(arm, "ghost_end_frame", text="End") + sub.prop(arm, "ghost_frame_start", text="Start") + sub.prop(arm, "ghost_frame_end", text="End") sub.prop(arm, "ghost_size", text="Step") elif arm.ghost_type == 'CURRENT_FRAME': sub.prop(arm, "ghost_step", text="Range") diff --git a/release/scripts/ui/properties_data_curve.py b/release/scripts/ui/properties_data_curve.py index 8e381986f23..62c81df2ece 100644 --- a/release/scripts/ui/properties_data_curve.py +++ b/release/scripts/ui/properties_data_curve.py @@ -120,7 +120,6 @@ class DATA_PT_shape_curve(DataButtonsPanel): if is_curve or is_text: sub = col.column() - sub.active = (curve.dimensions == '2D') sub.label(text="Caps:") sub.prop(curve, "front") sub.prop(curve, "back") diff --git a/release/scripts/ui/properties_data_modifier.py b/release/scripts/ui/properties_data_modifier.py index 8bf1617c124..5ae971bce6f 100644 --- a/release/scripts/ui/properties_data_modifier.py +++ b/release/scripts/ui/properties_data_modifier.py @@ -368,7 +368,6 @@ class DATA_PT_modifiers(DataButtonsPanel): sub = col.column() sub.label(text="Object:") sub.prop(md, "object", text="") - sub.prop(md, "mode", text="") sub.active = not md.is_bound if wide_ui: col = split.column() @@ -386,15 +385,14 @@ class DATA_PT_modifiers(DataButtonsPanel): else: layout.operator("object.meshdeform_bind", text="Bind") - if md.mode == 'VOLUME': - split = layout.split() + split = layout.split() - col = split.column() - col.prop(md, "precision") + col = split.column() + col.prop(md, "precision") - if wide_ui: - col = split.column() - col.prop(md, "dynamic") + if wide_ui: + col = split.column() + col.prop(md, "dynamic") def MIRROR(self, layout, ob, md, wide_ui): layout.prop(md, "merge_limit") @@ -499,14 +497,14 @@ class DATA_PT_modifiers(DataButtonsPanel): def SCREW(self, layout, ob, md, wide_ui): split = layout.split() - + col = split.column() col.prop(md, "axis") col.prop(md, "object", text="AxisOb") col.prop(md, "angle") col.prop(md, "steps") col.prop(md, "render_steps") - + if wide_ui: col = split.column() row = col.row() @@ -518,7 +516,6 @@ class DATA_PT_modifiers(DataButtonsPanel): col.prop(md, "use_normal_calculate") col.prop(md, "use_normal_flip") col.prop(md, "iterations") - def SHRINKWRAP(self, layout, ob, md, wide_ui): split = layout.split() @@ -625,11 +622,13 @@ class DATA_PT_modifiers(DataButtonsPanel): layout.label(text="See Soft Body panel.") def SOLIDIFY(self, layout, ob, md, wide_ui): - layout.prop(md, "offset") split = layout.split() col = split.column() + col.prop(md, "thickness") + col.prop_object(md, "vertex_group", ob, "vertex_groups", text="") + col.label(text="Crease:") col.prop(md, "edge_crease_inner", text="Inner") col.prop(md, "edge_crease_outer", text="Outer") @@ -637,7 +636,15 @@ class DATA_PT_modifiers(DataButtonsPanel): if wide_ui: col = split.column() - col.label() + + col.prop(md, "offset") + colsub = col.column() + colsub.active = (md.vertex_group is not "") + colsub.prop(md, "invert", text="Invert") + + if wide_ui: + col.label(text="") + col.prop(md, "use_rim") col.prop(md, "use_even_offset") col.prop(md, "use_quality_normals") @@ -661,6 +668,7 @@ class DATA_PT_modifiers(DataButtonsPanel): if wide_ui: col = split.column() col.label(text="Options:") + col.prop(md, "subsurf_uv") col.prop(md, "optimal_display") def SURFACE(self, layout, ob, md, wide_ui): @@ -689,9 +697,12 @@ class DATA_PT_modifiers(DataButtonsPanel): if wide_ui: col = split.column() sub = col.column(align=True) - sub.label(text="Aspect Ratio:") - sub.prop(md, "horizontal_aspect_ratio", text="Horizontal") - sub.prop(md, "vertical_aspect_ratio", text="Vertical") + sub.prop(md, "aspect_x", text="Aspect X") + sub.prop(md, "aspect_y", text="Aspect Y") + + sub = col.column(align=True) + sub.prop(md, "scale_x", text="Scale X") + sub.prop(md, "scale_y", text="Scale Y") def WAVE(self, layout, ob, md, wide_ui): split = layout.split() diff --git a/release/scripts/ui/properties_object.py b/release/scripts/ui/properties_object.py index d83253bf771..7169d936904 100644 --- a/release/scripts/ui/properties_object.py +++ b/release/scripts/ui/properties_object.py @@ -35,12 +35,15 @@ class OBJECT_PT_context_object(ObjectButtonsPanel): def draw(self, context): layout = self.layout - + space = context.space_data ob = context.object row = layout.row() row.label(text="", icon='OBJECT_DATA') - row.prop(ob, "name", text="") + if space.use_pin_id: + row.template_ID(space, "pin_id") + else: + row.prop(ob, "name", text="") class OBJECT_PT_custom_props(ObjectButtonsPanel, PropertyPanel): @@ -269,6 +272,8 @@ class OBJECT_PT_duplication(ObjectButtonsPanel): layout.prop(ob, "dupli_group", text="") # XXX: the following options are all quite buggy, ancient hacks that should be dropped + + class OBJECT_PT_animation(ObjectButtonsPanel): bl_label = "Animation Hacks" bl_default_closed = True @@ -294,7 +299,7 @@ class OBJECT_PT_animation(ObjectButtonsPanel): row.prop(ob, "slow_parent") row.active = (ob.parent is not None) col.prop(ob, "time_offset", text="Offset") - + # XXX: these are still used for a few curve-related tracking features if wide_ui: col = split.column() diff --git a/release/scripts/ui/properties_object_constraint.py b/release/scripts/ui/properties_object_constraint.py index 47306dd92ac..481da716e02 100644 --- a/release/scripts/ui/properties_object_constraint.py +++ b/release/scripts/ui/properties_object_constraint.py @@ -496,8 +496,8 @@ class ConstraintButtonsPanel(bpy.types.Panel): col = split.column(align=True) col.label(text="Action Length:") - col.prop(con, "start_frame", text="Start") - col.prop(con, "end_frame", text="End") + col.prop(con, "frame_start", text="Start") + col.prop(con, "frame_end", text="End") if wide_ui: col = split.column(align=True) diff --git a/release/scripts/ui/properties_particle.py b/release/scripts/ui/properties_particle.py index dbd2b90fea2..54ddb6da8a6 100644 --- a/release/scripts/ui/properties_particle.py +++ b/release/scripts/ui/properties_particle.py @@ -395,6 +395,43 @@ class PARTICLE_PT_physics(ParticleButtonsPanel): sub.prop(part, "integrator") sub.prop(part, "time_tweak") + elif part.physics_type == 'FLUID': + fluid = part.fluid + split = layout.split() + sub = split.column() + + sub.label(text="Forces:") + sub.prop(part, "brownian_factor") + sub.prop(part, "drag_factor", slider=True) + sub.prop(part, "damp_factor", slider=True) + sub = split.column() + sub.prop(part, "size_deflect") + sub.prop(part, "die_on_collision") + sub.prop(part, "integrator") + sub.prop(part, "time_tweak") + + split = layout.split() + sub = split.column() + sub.label(text="Fluid Interaction:") + sub.prop(fluid, "fluid_radius", slider=True) + sub.prop(fluid, "stiffness_k") + sub.prop(fluid, "stiffness_knear") + sub.prop(fluid, "rest_density") + + sub.label(text="Viscosity:") + sub.prop(fluid, "viscosity_omega", text="Linear") + sub.prop(fluid, "viscosity_beta", text="Square") + + sub = split.column() + + sub.label(text="Springs:") + sub.prop(fluid, "spring_k", text="Force", slider=True) + sub.prop(fluid, "rest_length", slider=True) + layout.label(text="Multiple fluids interactions:") + + sub.label(text="Buoyancy:") + sub.prop(fluid, "buoyancy", slider=True) + elif part.physics_type == 'KEYED': split = layout.split() sub = split.column() @@ -454,7 +491,7 @@ class PARTICLE_PT_physics(ParticleButtonsPanel): col.prop(boids, "banking", slider=True) col.prop(boids, "height", slider=True) - if part.physics_type == 'KEYED' or part.physics_type == 'BOIDS': + if part.physics_type == 'KEYED' or part.physics_type == 'BOIDS' or part.physics_type == 'FLUID': if part.physics_type == 'BOIDS': layout.label(text="Relations:") @@ -484,7 +521,7 @@ class PARTICLE_PT_physics(ParticleButtonsPanel): col.active = psys.keyed_timing col.prop(key, "time") col.prop(key, "duration") - else: + elif part.physics_type == 'BOIDS': sub = row.row() #doesn't work yet #sub.red_alert = key.valid @@ -492,6 +529,12 @@ class PARTICLE_PT_physics(ParticleButtonsPanel): sub.prop(key, "system", text="System") layout.prop(key, "mode", expand=True) + elif part.physics_type == 'FLUID': + sub = row.row() + #doesn't work yet + #sub.red_alert = key.valid + sub.prop(key, "object", text="") + sub.prop(key, "system", text="System") class PARTICLE_PT_boidbrain(ParticleButtonsPanel): diff --git a/release/scripts/ui/properties_physics_cloth.py b/release/scripts/ui/properties_physics_cloth.py index 22a83e02ba7..8761e8a38c0 100644 --- a/release/scripts/ui/properties_physics_cloth.py +++ b/release/scripts/ui/properties_physics_cloth.py @@ -129,6 +129,12 @@ class PHYSICS_PT_cloth(PhysicButtonsPanel): col.prop(cloth, "goal_friction", text="Friction") """ + key = ob.data.shape_keys + + if key: + col.label(text="Rest Shape Key:") + col.prop_object(cloth, "rest_shape_key", key, "keys", text="") + class PHYSICS_PT_cloth_cache(PhysicButtonsPanel): bl_label = "Cloth Cache" @@ -181,6 +187,7 @@ class PHYSICS_PT_cloth_collision(PhysicButtonsPanel): layout.prop(cloth, "group") + class PHYSICS_PT_cloth_stiffness(PhysicButtonsPanel): bl_label = "Cloth Stiffness Scaling" bl_default_closed = True diff --git a/release/scripts/ui/properties_physics_common.py b/release/scripts/ui/properties_physics_common.py index 9b24115d492..372509773ef 100644 --- a/release/scripts/ui/properties_physics_common.py +++ b/release/scripts/ui/properties_physics_common.py @@ -53,8 +53,8 @@ def point_cache_ui(self, context, cache, enabled, particles, smoke): if not particles: row = layout.row() row.enabled = enabled - row.prop(cache, "start_frame") - row.prop(cache, "end_frame") + row.prop(cache, "frame_start") + row.prop(cache, "frame_end") row = layout.row() diff --git a/release/scripts/ui/properties_physics_fluid.py b/release/scripts/ui/properties_physics_fluid.py index c6fd7e930d9..c033b6b6870 100644 --- a/release/scripts/ui/properties_physics_fluid.py +++ b/release/scripts/ui/properties_physics_fluid.py @@ -53,7 +53,7 @@ class PHYSICS_PT_fluid(PhysicButtonsPanel): row = split.row(align=True) row.prop(md, "render", text="") row.prop(md, "realtime", text="") - + fluid = md.settings else: @@ -75,11 +75,11 @@ class PHYSICS_PT_fluid(PhysicButtonsPanel): layout.prop(fluid, "type", text="") if fluid.type not in ('NONE', 'DOMAIN', 'PARTICLE'): layout.prop(fluid, "active", text="") - + layout = layout.column() if fluid.type not in ('NONE', 'DOMAIN', 'PARTICLE'): layout.active = fluid.active - + if fluid.type == 'DOMAIN': layout.operator("fluid.bake", text="Bake Fluid Simulation", icon='MOD_FLUIDSIM') split = layout.split() @@ -243,7 +243,7 @@ class PHYSICS_PT_domain_gravity(PhysicButtonsPanel): else: col.label(text="Gravity:") col.prop(fluid, "gravity", text="") - + if scene.unit_settings.system != 'NONE': col.label(text="Using Scene Size Units", icon="SCENE_DATA") sub = col.column() diff --git a/release/scripts/ui/properties_render.py b/release/scripts/ui/properties_render.py index 553e6a8b4ed..ed0f70a18b1 100644 --- a/release/scripts/ui/properties_render.py +++ b/release/scripts/ui/properties_render.py @@ -566,8 +566,8 @@ class RENDER_PT_dimensions(RenderButtonsPanel): col = split.column() sub = col.column(align=True) sub.label(text="Frame Range:") - sub.prop(scene, "start_frame", text="Start") - sub.prop(scene, "end_frame", text="End") + sub.prop(scene, "frame_start", text="Start") + sub.prop(scene, "frame_end", text="End") sub.prop(scene, "frame_step", text="Step") sub.label(text="Frame Rate:") diff --git a/release/scripts/ui/properties_scene.py b/release/scripts/ui/properties_scene.py index 714f22f5ca6..4b48ec926a6 100644 --- a/release/scripts/ui/properties_scene.py +++ b/release/scripts/ui/properties_scene.py @@ -89,6 +89,7 @@ class SCENE_PT_keying_sets(SceneButtonsPanel): row = layout.row() col = row.column() + # XXX: this fails because index is not what this expects... col.template_list(scene, "keying_sets", scene, "active_keying_set_index", rows=2) col = row.column(align=True) @@ -96,7 +97,7 @@ class SCENE_PT_keying_sets(SceneButtonsPanel): col.operator("anim.keying_set_remove", icon='ZOOMOUT', text="") ks = scene.active_keying_set - if ks: + if ks and ks.absolute: row = layout.row() col = row.column() @@ -119,7 +120,7 @@ class SCENE_PT_keying_set_paths(SceneButtonsPanel): bl_label = "Active Keying Set" def poll(self, context): - return (context.scene.active_keying_set and context.scene.active_keying_set.absolute); + return (context.scene.active_keying_set and context.scene.active_keying_set.absolute) def draw(self, context): layout = self.layout @@ -162,7 +163,7 @@ class SCENE_PT_keying_set_paths(SceneButtonsPanel): col.prop(ksp, "grouping") if ksp.grouping == 'NAMED': col.prop(ksp, "group") - + col.label(text="Keyframing Settings:") col.prop(ksp, "insertkey_needed", text="Needed") col.prop(ksp, "insertkey_visual", text="Visual") @@ -310,8 +311,10 @@ class ANIM_OT_keying_set_export(bpy.types.Operator): f.write("%s, '%s'" % (id_bpy_path, ksp.data_path)) # array index settings (if applicable) - if ksp.entire_array is False: - f.write(", entire_array=False, array_index=%d" % ksp.array_index) + if ksp.entire_array: + f.write(", index=-1") + else: + f.write(", index=%d" % ksp.array_index) # grouping settings (if applicable) # NOTE: the current default is KEYINGSET, but if this changes, change this code too diff --git a/release/scripts/ui/properties_texture.py b/release/scripts/ui/properties_texture.py index 2894761e7ac..7a2213c719c 100644 --- a/release/scripts/ui/properties_texture.py +++ b/release/scripts/ui/properties_texture.py @@ -29,8 +29,8 @@ class TEXTURE_MT_specials(bpy.types.Menu): def draw(self, context): layout = self.layout - layout.operator("material.mtex_copy", icon='COPYDOWN') - layout.operator("material.mtex_paste", icon='PASTEDOWN') + layout.operator("texture.slot_copy", icon='COPYDOWN') + layout.operator("texture.slot_paste", icon='PASTEDOWN') class TEXTURE_MT_envmap_specials(bpy.types.Menu): diff --git a/release/scripts/ui/space_buttons.py b/release/scripts/ui/space_buttons.py index 019f751449f..9fc30a8189b 100644 --- a/release/scripts/ui/space_buttons.py +++ b/release/scripts/ui/space_buttons.py @@ -38,7 +38,7 @@ class Buttons_HT_header(bpy.types.Header): row = layout.row() row.prop(so, "buttons_context", expand=True, text="") - row.prop(scene, "current_frame") + row.prop(scene, "frame_current") class Buttons_MT_view(bpy.types.Menu): diff --git a/release/scripts/ui/space_image.py b/release/scripts/ui/space_image.py index b8c5c010407..1c48b99939d 100644 --- a/release/scripts/ui/space_image.py +++ b/release/scripts/ui/space_image.py @@ -252,7 +252,7 @@ class IMAGE_HT_header(bpy.types.Header): iuser = sima.image_user toolsettings = context.tool_settings - # show_render = sima.show_render + show_render = sima.show_render # show_paint = sima.show_paint show_uvedit = sima.show_uvedit @@ -276,6 +276,8 @@ class IMAGE_HT_header(bpy.types.Header): sub.menu("IMAGE_MT_uvs") layout.template_ID(sima, "image", new="image.new") + if not show_render: + layout.prop(sima, "image_pin", text="") # uv editing if show_uvedit: @@ -406,6 +408,7 @@ class IMAGE_PT_view_histogram(bpy.types.Panel): layout.template_histogram(sima, "histogram") + class IMAGE_PT_sample_line(bpy.types.Panel): bl_space_type = 'IMAGE_EDITOR' bl_region_type = 'PREVIEW' @@ -421,6 +424,7 @@ class IMAGE_PT_sample_line(bpy.types.Panel): sima = context.space_data layout.template_histogram(sima, "sample_histogram") + class IMAGE_PT_view_properties(bpy.types.Panel): bl_space_type = 'IMAGE_EDITOR' bl_region_type = 'UI' @@ -459,6 +463,9 @@ class IMAGE_PT_view_properties(bpy.types.Panel): if show_uvedit: col = layout.column() + col.prop(uvedit, "cursor_location") + + col = layout.column() col.label(text="UVs:") row = col.row() if wide_ui: diff --git a/release/scripts/ui/space_info.py b/release/scripts/ui/space_info.py index f8f8f5cefe3..e1dccc0c9f0 100644 --- a/release/scripts/ui/space_info.py +++ b/release/scripts/ui/space_info.py @@ -241,7 +241,7 @@ class INFO_MT_add(bpy.types.Menu): if(len(bpy.data.groups) > 10): layout.operator_context = 'INVOKE_DEFAULT' - layout.operator("object.group_instance_add", "type", text="Group Instance...", icon='OUTLINER_OB_EMPTY') + layout.operator("object.group_instance_add", text="Group Instance...", icon='OUTLINER_OB_EMPTY') else: layout.operator_menu_enum("object.group_instance_add", "type", text="Group Instance", icon='OUTLINER_OB_EMPTY') @@ -309,6 +309,8 @@ class INFO_MT_help(bpy.types.Menu): layout.separator() layout.operator("help.python_api", icon='URL') layout.operator("help.operator_cheat_sheet") + layout.separator() + layout.operator("wm.splash") # Help operators diff --git a/release/scripts/ui/space_sequencer.py b/release/scripts/ui/space_sequencer.py index 9d7ac872c75..4680c5c1d19 100644 --- a/release/scripts/ui/space_sequencer.py +++ b/release/scripts/ui/space_sequencer.py @@ -245,21 +245,24 @@ class SEQUENCER_MT_strip(bpy.types.Menu): if strip: stype = strip.type - - if stype == 'EFFECT': - layout.separator() - layout.operator("sequencer.effect_change") - layout.operator("sequencer.effect_reassign_inputs") + + # XXX note strip.type is never equal to 'EFFECT', look at seq_type_items within rna_sequencer.c + if stype == 'EFFECT': + pass + # layout.separator() + # layout.operator("sequencer.effect_change") + # layout.operator("sequencer.effect_reassign_inputs") elif stype == 'IMAGE': layout.separator() # layout.operator("sequencer.image_change") layout.operator("sequencer.rendersize") elif stype == 'SCENE': - layout.separator() - layout.operator("sequencer.scene_change", text="Change Scene") + pass + # layout.separator() + # layout.operator("sequencer.scene_change", text="Change Scene") elif stype == 'MOVIE': layout.separator() - layout.operator("sequencer.movie_change") + # layout.operator("sequencer.movie_change") layout.operator("sequencer.rendersize") layout.separator() @@ -347,20 +350,20 @@ class SEQUENCER_PT_edit(SequencerButtonsPanel): col = layout.column() col.enabled = not strip.lock col.prop(strip, "channel") - col.prop(strip, "start_frame") + col.prop(strip, "frame_start") subrow = col.split(percentage=0.66) subrow.prop(strip, "length") subrow.label(text="%.2f sec" % (strip.length / (render.fps / render.fps_base))) col = layout.column(align=True) col.label(text="Offset:") - col.prop(strip, "start_offset", text="Start") - col.prop(strip, "end_offset", text="End") + col.prop(strip, "frame_offset_start", text="Start") + col.prop(strip, "frame_offset_end", text="End") col = layout.column(align=True) col.label(text="Still:") - col.prop(strip, "start_still", text="Start") - col.prop(strip, "end_still", text="End") + col.prop(strip, "frame_still_start", text="Start") + col.prop(strip, "frame_still_end", text="End") class SEQUENCER_PT_preview(bpy.types.Panel): @@ -377,7 +380,7 @@ class SEQUENCER_PT_preview(bpy.types.Panel): col = layout.column() col.active = render.use_sequencer_gl_preview col.prop(render, "sequencer_gl_preview", text="") - + col = layout.column() col.prop(render, "use_sequencer_gl_render", text="Open GL Render") col = layout.column() @@ -579,7 +582,7 @@ class SEQUENCER_PT_input_image(SEQUENCER_PT_input): # Current element for the filename - elem = strip.getStripElem(context.scene.current_frame) + elem = strip.getStripElem(context.scene.frame_current) if elem: split = layout.split(percentage=0.2) col = split.column() diff --git a/release/scripts/ui/space_text.py b/release/scripts/ui/space_text.py index 3a789566a61..9f52ae25121 100644 --- a/release/scripts/ui/space_text.py +++ b/release/scripts/ui/space_text.py @@ -177,7 +177,7 @@ class TEXT_MT_templates(bpy.types.Menu): bl_label = "Script Templates" def draw(self, context): - self.path_menu(bpy.utils.script_paths("templates"), "text.open") + self.path_menu(bpy.utils.script_paths("templates"), "text.open", {"internal": True}) class TEXT_MT_edit_view(bpy.types.Menu): diff --git a/release/scripts/ui/space_time.py b/release/scripts/ui/space_time.py index cfd5fdfce0b..7417b9659b2 100644 --- a/release/scripts/ui/space_time.py +++ b/release/scripts/ui/space_time.py @@ -43,13 +43,13 @@ class TIME_HT_header(bpy.types.Header): row = layout.row(align=True) if not scene.use_preview_range: - row.prop(scene, "start_frame", text="Start") - row.prop(scene, "end_frame", text="End") + row.prop(scene, "frame_start", text="Start") + row.prop(scene, "frame_end", text="End") else: - row.prop(scene, "preview_range_start_frame", text="Start") - row.prop(scene, "preview_range_end_frame", text="End") + row.prop(scene, "preview_range_frame_start", text="Start") + row.prop(scene, "preview_range_frame_end", text="End") - layout.prop(scene, "current_frame", text="") + layout.prop(scene, "frame_current", text="") layout.separator() diff --git a/release/scripts/ui/space_userpref.py b/release/scripts/ui/space_userpref.py index 11969abfbb1..6a244c79857 100644 --- a/release/scripts/ui/space_userpref.py +++ b/release/scripts/ui/space_userpref.py @@ -165,16 +165,18 @@ class USERPREF_HT_header(bpy.types.Header): layout.operator_context = 'EXEC_AREA' layout.operator("wm.save_homefile", text="Save As Default") + layout.operator_context = 'INVOKE_DEFAULT' + if userpref.active_section == 'INPUT': - layout.operator_context = 'INVOKE_DEFAULT' - op = layout.operator("wm.keyconfig_export", "Export Key Configuration...") + op = layout.operator("wm.keyconfig_export") op.path = "keymap.py" - op = layout.operator("wm.keyconfig_import", "Import Key Configuration...") + op = layout.operator("wm.keyconfig_import") op.path = "keymap.py" elif userpref.active_section == 'ADDONS': - layout.operator_context = 'INVOKE_DEFAULT' - op = layout.operator("wm.addon_install", "Install Add-On...") + op = layout.operator("wm.addon_install") op.path = "*.py" + elif userpref.active_section == 'THEMES': + op = layout.operator("ui.reset_default_theme") class USERPREF_PT_tabs(bpy.types.Panel): @@ -376,7 +378,8 @@ class USERPREF_PT_edit(bpy.types.Panel): col.separator() col.label(text="New F-Curve Defaults:") - col.prop(edit, "new_interpolation_type", text="Interpolation") + col.prop(edit, "keyframe_new_interpolation_type", text="Interpolation") + col.prop(edit, "keyframe_new_handle_type", text="Handles") col.prop(edit, "insertkey_xyz_to_rgb", text="XYZ to RGB") col.separator() @@ -712,14 +715,24 @@ class USERPREF_PT_theme(bpy.types.Panel): col.prop(graph, "active_channels_group") col.prop(graph, "dopesheet_channel") col.prop(graph, "dopesheet_subchannel") - col.prop(graph, "vertex") + col.prop(graph, "frame_current") col = split.column() - col.prop(graph, "current_frame") + col.prop(graph, "vertex") col.prop(graph, "handle_vertex") col.prop(graph, "handle_vertex_select") col.separator() col.prop(graph, "handle_vertex_size") + col.separator() + col.separator() + col.prop(graph, "handle_free") + col.prop(graph, "handle_auto") + col.prop(graph, "handle_vect") + col.prop(graph, "handle_align") + col.prop(graph, "handle_sel_free") + col.prop(graph, "handle_sel_auto") + col.prop(graph, "handle_sel_vect") + col.prop(graph, "handle_sel_align") elif theme.theme_area == 'FILE_BROWSER': file_browse = theme.file_browser @@ -762,7 +775,7 @@ class USERPREF_PT_theme(bpy.types.Panel): col = split.column() col.prop(nla, "strips") col.prop(nla, "strips_selected") - col.prop(nla, "current_frame") + col.prop(nla, "frame_current") elif theme.theme_area == 'DOPESHEET_EDITOR': dope = theme.dopesheet_editor @@ -785,7 +798,7 @@ class USERPREF_PT_theme(bpy.types.Panel): col.prop(dope, "long_key_selected") col = split.column() - col.prop(dope, "current_frame") + col.prop(dope, "frame_current") col.prop(dope, "dopesheet_channel") col.prop(dope, "dopesheet_subchannel") @@ -832,7 +845,7 @@ class USERPREF_PT_theme(bpy.types.Panel): col = split.column() col.prop(seq, "meta_strip") - col.prop(seq, "current_frame") + col.prop(seq, "frame_current") col.prop(seq, "keyframe") col.prop(seq, "draw_action") @@ -891,7 +904,7 @@ class USERPREF_PT_theme(bpy.types.Panel): col.prop(time, "grid") col = split.column() - col.prop(time, "current_frame") + col.prop(time, "frame_current") elif theme.theme_area == 'NODE_EDITOR': node = theme.node_editor @@ -1285,8 +1298,8 @@ class USERPREF_PT_input(bpy.types.Panel): sub.row().prop(inputs, "view_rotation", expand=True) sub.label(text="Zoom Style:") - sub.row().prop(inputs, "viewport_zoom_style", expand=True) - if inputs.viewport_zoom_style == 'DOLLY': + sub.row().prop(inputs, "zoom_style", text="") + if inputs.zoom_style == 'DOLLY': sub.row().prop(inputs, "zoom_axis", expand=True) sub.prop(inputs, "invert_zoom_direction") @@ -1299,11 +1312,12 @@ class USERPREF_PT_input(bpy.types.Panel): #sub.prop(view, "wheel_scroll_lines", text="Scroll Lines") col.separator() - + ''' not implemented yet sub = col.column() sub.label(text="NDOF Device:") sub.prop(inputs, "ndof_pan_speed", text="Pan Speed") sub.prop(inputs, "ndof_rotate_speed", text="Orbit Speed") + ''' row.separator() @@ -1488,6 +1502,10 @@ class USERPREF_PT_addons(bpy.types.Panel): split = column.row().split(percentage=0.15) split.label(text='Location:') split.label(text=info["location"]) + if info["description"]: + split = column.row().split(percentage=0.15) + split.label(text='Description:') + split.label(text=info["description"]) if info["url"]: split = column.row().split(percentage=0.15) split.label(text="Internet:") @@ -1517,7 +1535,7 @@ class USERPREF_PT_addons(bpy.types.Panel): from bpy.props import * -def addon_info_get(mod, info_basis={"name": "", "author": "", "version": "", "blender": "", "location": "", "url": "", "category": "", "expanded": False}): +def addon_info_get(mod, info_basis={"name": "", "author": "", "version": "", "blender": "", "location": "", "description": "", "url": "", "category": "", "expanded": False}): addon_info = getattr(mod, "bl_addon_info", {}) # avoid re-initializing @@ -1600,7 +1618,7 @@ class WM_OT_addon_disable(bpy.types.Operator): class WM_OT_addon_install(bpy.types.Operator): "Install an addon" bl_idname = "wm.addon_install" - bl_label = "Install Add-On" + bl_label = "Install Add-On..." module = StringProperty(name="Module", description="Module name of the addon to disable") @@ -1705,9 +1723,9 @@ class WM_OT_keyconfig_test(bpy.types.Operator): def kmistr(kmi): if km.modal: - s = ["kmi = km.add_modal_item(\'%s\', \'%s\', \'%s\'" % (kmi.propvalue, kmi.type, kmi.value)] + s = ["kmi = km.items.add_modal(\'%s\', \'%s\', \'%s\'" % (kmi.propvalue, kmi.type, kmi.value)] else: - s = ["kmi = km.add_item(\'%s\', \'%s\', \'%s\'" % (kmi.idname, kmi.type, kmi.value)] + s = ["kmi = km.items.add(\'%s\', \'%s\', \'%s\'" % (kmi.idname, kmi.type, kmi.value)] if kmi.any: s.append(", any=True") @@ -1913,9 +1931,9 @@ class WM_OT_keyconfig_export(bpy.types.Operator): f.write("km = kc.add_keymap('%s', space_type='%s', region_type='%s', modal=%s)\n\n" % (km.name, km.space_type, km.region_type, km.modal)) for kmi in km.items: if km.modal: - f.write("kmi = km.add_modal_item('%s', '%s', '%s'" % (kmi.propvalue, kmi.type, kmi.value)) + f.write("kmi = km.items.add_modal('%s', '%s', '%s'" % (kmi.propvalue, kmi.type, kmi.value)) else: - f.write("kmi = km.add_item('%s', '%s', '%s'" % (kmi.idname, kmi.type, kmi.value)) + f.write("kmi = km.items.add('%s', '%s', '%s'" % (kmi.idname, kmi.type, kmi.value)) if kmi.any: f.write(", any=True") else: @@ -2019,9 +2037,9 @@ class WM_OT_keyitem_add(bpy.types.Operator): kc = wm.default_keyconfig if km.modal: - km.add_modal_item("", 'A', 'PRESS') # kmi + km.items.add_modal("", 'A', 'PRESS') # kmi else: - km.add_item("none", 'A', 'PRESS') # kmi + km.items.add("none", 'A', 'PRESS') # kmi # clear filter and expand keymap so we can see the newly added item if kc.filter != '': diff --git a/release/scripts/ui/space_view3d.py b/release/scripts/ui/space_view3d.py index 3cc588ecbaa..fa0c5029416 100644 --- a/release/scripts/ui/space_view3d.py +++ b/release/scripts/ui/space_view3d.py @@ -250,8 +250,11 @@ class VIEW3D_MT_view(bpy.types.Menu): layout.operator("view3d.viewnumpad", text="Camera").type = 'CAMERA' layout.operator("view3d.viewnumpad", text="Top").type = 'TOP' + layout.operator("view3d.viewnumpad", text="Bottom").type = 'BOTTOM' layout.operator("view3d.viewnumpad", text="Front").type = 'FRONT' + layout.operator("view3d.viewnumpad", text="Back").type = 'BACK' layout.operator("view3d.viewnumpad", text="Right").type = 'RIGHT' + layout.operator("view3d.viewnumpad", text="Left").type = 'LEFT' layout.menu("VIEW3D_MT_view_cameras", text="Cameras") @@ -1919,12 +1922,12 @@ class VIEW3D_PT_3dview_display(bpy.types.Panel): col.active = display_all split = col.split(percentage=0.55) split.prop(view, "display_floor", text="Grid Floor") - + row = split.row(align=True) row.prop(view, "display_x_axis", text="X", toggle=True) row.prop(view, "display_y_axis", text="Y", toggle=True) row.prop(view, "display_z_axis", text="Z", toggle=True) - + sub = col.column(align=True) sub.active = (display_all and view.display_floor) sub.prop(view, "grid_lines", text="Lines") diff --git a/release/scripts/ui/space_view3d_toolbar.py b/release/scripts/ui/space_view3d_toolbar.py index 603ed93efed..099e7944784 100644 --- a/release/scripts/ui/space_view3d_toolbar.py +++ b/release/scripts/ui/space_view3d_toolbar.py @@ -606,7 +606,7 @@ class VIEW3D_PT_tools_brush(PaintPanel): col = layout.column() col.active = (brush.blend not in ('ERASE_ALPHA', 'ADD_ALPHA')) col.prop(brush, "use_alpha") - + # Weight Paint Mode # |