ran through pep8 checker
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
|
||||
# <pep8 compliant>
|
||||
|
||||
|
||||
def print_help(targets):
|
||||
print("CMake quicky wrapper, no valid targets given.")
|
||||
print(" * targets can contain a subset of the full target name.")
|
||||
@@ -60,7 +61,6 @@ def main():
|
||||
targets.add(line)
|
||||
file.close()
|
||||
|
||||
|
||||
# remove cmake targets
|
||||
bad = set([
|
||||
"help",
|
||||
@@ -78,7 +78,6 @@ def main():
|
||||
|
||||
targets -= set(bad)
|
||||
|
||||
|
||||
# parse args
|
||||
targets = list(targets)
|
||||
targets.sort()
|
||||
|
@@ -60,7 +60,6 @@ def add_object_data(context, obdata, operator=None):
|
||||
if context.space_data and context.space_data.type == 'VIEW_3D':
|
||||
base.layers_from_view(context.space_data)
|
||||
|
||||
|
||||
obj_new.matrix_world = add_object_align_init(context, operator)
|
||||
|
||||
obj_act = scene.objects.active
|
||||
|
@@ -50,7 +50,6 @@ def _main():
|
||||
pydoc.Helper.getline = lambda self, prompt: None
|
||||
pydoc.TextDoc.use_bold = lambda self, text: text
|
||||
|
||||
|
||||
# if "-d" in sys.argv: # Enable this to measure startup speed
|
||||
if 0:
|
||||
import cProfile
|
||||
|
@@ -26,6 +26,7 @@ functions for dealing with paths in Blender.
|
||||
import bpy as _bpy
|
||||
import os as _os
|
||||
|
||||
|
||||
def abspath(path):
|
||||
"""
|
||||
Returns the absolute path relative to the current blend file using the "//" prefix.
|
||||
@@ -107,7 +108,7 @@ def resolve_ncase(path):
|
||||
import os
|
||||
|
||||
def _ncase_path_found(path):
|
||||
if path=='' or os.path.exists(path):
|
||||
if path == "" or os.path.exists(path):
|
||||
return path, True
|
||||
|
||||
filename = os.path.basename(path) # filename may be a directory or a file
|
||||
|
@@ -30,6 +30,7 @@ import sys as _sys
|
||||
from _bpy import blend_paths
|
||||
from _bpy import script_paths as _bpy_script_paths
|
||||
|
||||
|
||||
def _test_import(module_name, loaded_modules):
|
||||
import traceback
|
||||
import time
|
||||
@@ -84,6 +85,7 @@ def modules_from_path(path, loaded_modules):
|
||||
|
||||
return modules
|
||||
|
||||
|
||||
_global_loaded_modules = [] # store loaded module names for reloading.
|
||||
import bpy_types as _bpy_types # keep for comparisons, never ever reload this.
|
||||
|
||||
@@ -216,8 +218,6 @@ def load_scripts(reload_scripts=False, refresh_scripts=False):
|
||||
_bpy_types._register_immediate = True
|
||||
|
||||
|
||||
|
||||
|
||||
# base scripts
|
||||
_scripts = _os.path.join(_os.path.dirname(__file__), _os.path.pardir, _os.path.pardir)
|
||||
_scripts = (_os.path.normpath(_scripts), )
|
||||
|
@@ -427,7 +427,6 @@ class Mesh(bpy_types.ID):
|
||||
# Dont look at this again
|
||||
ed_adj[:] = []
|
||||
|
||||
|
||||
return edge_loops
|
||||
|
||||
def edge_loops_from_edges(self, edges=None):
|
||||
@@ -556,6 +555,7 @@ PropertiesMap = {}
|
||||
# registers moduals instantly.
|
||||
_register_immediate = True
|
||||
|
||||
|
||||
def _unregister_module(module, free=True):
|
||||
for t in TypeMap.get(module, ()):
|
||||
try:
|
||||
@@ -568,7 +568,6 @@ def _unregister_module(module, free=True):
|
||||
if free == True and module in TypeMap:
|
||||
del TypeMap[module]
|
||||
|
||||
|
||||
for t in PropertiesMap.get(module, ()):
|
||||
try:
|
||||
bpy_types.unregister(t)
|
||||
@@ -616,11 +615,13 @@ class RNAMeta(type):
|
||||
|
||||
return result
|
||||
|
||||
|
||||
class RNAMetaRegister(RNAMeta):
|
||||
@classmethod
|
||||
def _register_immediate(cls):
|
||||
return True
|
||||
|
||||
|
||||
class OrderedMeta(RNAMeta):
|
||||
|
||||
def __init__(cls, name, bases, attributes):
|
||||
@@ -630,6 +631,7 @@ class OrderedMeta(RNAMeta):
|
||||
def __prepare__(name, bases, **kwargs):
|
||||
return collections.OrderedDict()
|
||||
|
||||
|
||||
# Only defined so operators members can be used by accessing self.order
|
||||
class Operator(StructRNA, metaclass=OrderedMeta):
|
||||
__slots__ = ()
|
||||
@@ -645,12 +647,15 @@ class Macro(StructRNA, metaclass=OrderedMeta):
|
||||
from _bpy import ops
|
||||
return ops.macro_define(self, opname)
|
||||
|
||||
|
||||
class IDPropertyGroup(StructRNA, metaclass=RNAMetaRegister):
|
||||
__slots__ = ()
|
||||
|
||||
|
||||
class RenderEngine(StructRNA, metaclass=RNAMeta):
|
||||
__slots__ = ()
|
||||
|
||||
|
||||
class _GenericUI:
|
||||
__slots__ = ()
|
||||
|
||||
|
@@ -37,6 +37,8 @@ or simple python blender/ui function calls.
|
||||
"""
|
||||
|
||||
TAG, ARGS, CHILDREN = range(3)
|
||||
|
||||
|
||||
class ReturnStore(tuple):
|
||||
def __getitem__(self, key):
|
||||
|
||||
@@ -95,7 +97,6 @@ def toxml(py_data, indent=" "):
|
||||
for py_item in data_ls:
|
||||
xml_node = newdoc.createElement(py_item[TAG])
|
||||
|
||||
|
||||
# ok if its empty
|
||||
_to_xml_iter(xml_node, py_item[CHILDREN])
|
||||
|
||||
@@ -115,7 +116,6 @@ def fromxml(data):
|
||||
kwargs[key] = value
|
||||
return kwargs
|
||||
|
||||
|
||||
def _fromxml(xml_node):
|
||||
py_item = (xml_node.tagName, _fromxml_kwargs(xml_node), [])
|
||||
#_fromxml_iter(py_item, xml_node.childNodes)
|
||||
|
@@ -43,7 +43,6 @@ def compat_str(text, line_length=0):
|
||||
text_ls.append(text)
|
||||
text = '\n '.join(text_ls)
|
||||
|
||||
|
||||
#text = text.replace('.', '.\n')
|
||||
#text = text.replace(']', ']\n')
|
||||
text = text.replace("\n", "\\n")
|
||||
@@ -88,7 +87,6 @@ def graph_armature(obj, filepath, FAKE_PARENT=True, CONSTRAINTS=True, DRIVERS=Tr
|
||||
else:
|
||||
opts.append("fillcolor=white")
|
||||
|
||||
|
||||
fw('"%s" [%s];\n' % (bone.name, ','.join(opts)))
|
||||
|
||||
fw('\n\n# Hierarchy:\n')
|
||||
@@ -162,7 +160,7 @@ def graph_armature(obj, filepath, FAKE_PARENT=True, CONSTRAINTS=True, DRIVERS=Tr
|
||||
pbone_target = rna_path_as_pbone(target.data_path)
|
||||
rna_path_target = target.data_path
|
||||
if pbone_target:
|
||||
opts = ['dir=forward', "weight=1", "arrowhead=normal", "arrowtail=none", "constraint=false", 'color="blue"', "labelfontsize=4"] # ,
|
||||
opts = ['dir=forward', "weight=1", "arrowhead=normal", "arrowtail=none", "constraint=false", 'color="blue"', "labelfontsize=4"]
|
||||
display_source = rna_path.replace("pose.bones", "")
|
||||
display_target = rna_path_target.replace("pose.bones", "")
|
||||
if XTRA_INFO:
|
||||
|
@@ -21,6 +21,7 @@
|
||||
import bpy
|
||||
from bpy.props import *
|
||||
|
||||
|
||||
class ExportHelper:
|
||||
filepath = StringProperty(name="File Path", description="Filepath used for exporting the file", maxlen=1024, default="", subtype='FILE_PATH')
|
||||
check_existing = BoolProperty(name="Check Existing", description="Check and warn on overwriting existing files", default=True, options={'HIDDEN'})
|
||||
@@ -83,6 +84,7 @@ def unpack_list(list_of_tuples):
|
||||
flat_list_extend(t)
|
||||
return flat_list
|
||||
|
||||
|
||||
# same as above except that it adds 0 for triangle faces
|
||||
def unpack_face_list(list_of_tuples):
|
||||
#allocate the entire list
|
||||
|
@@ -201,14 +201,12 @@ class InfoPropertyRNA:
|
||||
if self.type == "enum":
|
||||
self.enum_items[:] = rna_prop.items.keys()
|
||||
|
||||
|
||||
if self.array_length:
|
||||
self.default = tuple(getattr(rna_prop, "default_array", ()))
|
||||
else:
|
||||
self.default = getattr(rna_prop, "default", None)
|
||||
self.default_str = "" # fallback
|
||||
|
||||
|
||||
if self.type == "pointer":
|
||||
# pointer has no default, just set as None
|
||||
self.default = None
|
||||
@@ -466,16 +464,12 @@ def BuildRNAInfo():
|
||||
# NOT USED YET
|
||||
## rna_functions_dict[identifier] = get_direct_functions(rna_struct)
|
||||
|
||||
|
||||
# fill in these later
|
||||
rna_children_dict[identifier] = []
|
||||
rna_references_dict[identifier] = []
|
||||
|
||||
|
||||
else:
|
||||
print("Ignoring", rna_type_name)
|
||||
|
||||
|
||||
structs.sort() # not needed but speeds up sort below, setting items without an inheritance first
|
||||
|
||||
# Arrange so classes are always defined in the correct order
|
||||
@@ -506,7 +500,6 @@ def BuildRNAInfo():
|
||||
|
||||
# Done ordering structs
|
||||
|
||||
|
||||
# precalc vars to avoid a lot of looping
|
||||
for (rna_base, identifier, rna_struct) in structs:
|
||||
|
||||
@@ -536,18 +529,15 @@ def BuildRNAInfo():
|
||||
if rna_prop_ptr:
|
||||
rna_references_dict[rna_prop_ptr.identifier].append("%s.%s" % (rna_struct_path, rna_func.identifier))
|
||||
|
||||
|
||||
# Store nested children
|
||||
nested = rna_struct.nested
|
||||
if nested:
|
||||
rna_children_dict[nested.identifier].append(rna_struct)
|
||||
|
||||
|
||||
# Sort the refs, just reads nicer
|
||||
for rna_refs in rna_references_dict.values():
|
||||
rna_refs.sort()
|
||||
|
||||
|
||||
info_structs = []
|
||||
for (rna_base, identifier, rna_struct) in structs:
|
||||
#if rna_struct.nested:
|
||||
@@ -590,7 +580,6 @@ def BuildRNAInfo():
|
||||
if default < prop.min or default > prop.max:
|
||||
print("\t %s.%s, %s not in [%s - %s]" % (rna_info.identifier, prop.identifier, default, prop.min, prop.max))
|
||||
|
||||
|
||||
# now for operators
|
||||
op_mods = dir(bpy.ops)
|
||||
|
||||
@@ -616,10 +605,8 @@ def BuildRNAInfo():
|
||||
for rna_prop in rna_info.args:
|
||||
rna_prop.build()
|
||||
|
||||
|
||||
#for rna_info in InfoStructRNA.global_lookup.values():
|
||||
# print(rna_info)
|
||||
|
||||
return InfoStructRNA.global_lookup, InfoFunctionRNA.global_lookup, InfoOperatorRNA.global_lookup, InfoPropertyRNA.global_lookup
|
||||
|
||||
|
||||
|
@@ -143,4 +143,3 @@ class PropertyPanel():
|
||||
|
||||
def draw(self, context):
|
||||
draw(self.layout, context, self._context_path)
|
||||
|
||||
|
@@ -26,6 +26,7 @@ language_id = 'python'
|
||||
# but python expects this in some places
|
||||
_BPY_MAIN_OWN = True
|
||||
|
||||
|
||||
def add_scrollback(text, text_type):
|
||||
for l in text.split('\n'):
|
||||
bpy.ops.console.scrollback_append(text=l.replace('\t', ' '),
|
||||
|
@@ -192,6 +192,7 @@ class ProjectApply(bpy.types.Operator):
|
||||
def register():
|
||||
pass
|
||||
|
||||
|
||||
def unregister():
|
||||
pass
|
||||
|
||||
|
@@ -66,7 +66,6 @@ class ExportFBX(bpy.types.Operator, ExportHelper):
|
||||
BATCH_OWN_DIR = BoolProperty(name="Own Dir", description="Create a dir for each exported file", default=True)
|
||||
BATCH_FILE_PREFIX = StringProperty(name="Prefix", description="Prefix each file with this name", maxlen=1024, default="")
|
||||
|
||||
|
||||
def execute(self, context):
|
||||
import math
|
||||
from mathutils import Matrix
|
||||
@@ -79,9 +78,12 @@ class ExportFBX(bpy.types.Operator, ExportHelper):
|
||||
|
||||
GLOBAL_MATRIX = Matrix()
|
||||
GLOBAL_MATRIX[0][0] = GLOBAL_MATRIX[1][1] = GLOBAL_MATRIX[2][2] = self.properties.TX_SCALE
|
||||
if self.properties.TX_XROT90: GLOBAL_MATRIX = mtx4_x90n * GLOBAL_MATRIX
|
||||
if self.properties.TX_YROT90: GLOBAL_MATRIX = mtx4_y90n * GLOBAL_MATRIX
|
||||
if self.properties.TX_ZROT90: GLOBAL_MATRIX = mtx4_z90n * GLOBAL_MATRIX
|
||||
if self.properties.TX_XROT90:
|
||||
GLOBAL_MATRIX = mtx4_x90n * GLOBAL_MATRIX
|
||||
if self.properties.TX_YROT90:
|
||||
GLOBAL_MATRIX = mtx4_y90n * GLOBAL_MATRIX
|
||||
if self.properties.TX_ZROT90:
|
||||
GLOBAL_MATRIX = mtx4_z90n * GLOBAL_MATRIX
|
||||
|
||||
import io_scene_fbx.export_fbx
|
||||
return io_scene_fbx.export_fbx.save(self, context, GLOBAL_MATRIX=GLOBAL_MATRIX, **self.properties)
|
||||
|
@@ -111,7 +111,6 @@ class MeshMirrorUV(bpy.types.Operator):
|
||||
if j is not None:
|
||||
vmap[i] = j
|
||||
|
||||
|
||||
active_uv_layer = None
|
||||
for lay in mesh.uv_textures:
|
||||
if lay.active:
|
||||
@@ -162,7 +161,6 @@ class MeshMirrorUV(bpy.types.Operator):
|
||||
v1 = faces[j].vertices[:]
|
||||
v2 = [vmap[k] for k in faces[i].vertices[:]]
|
||||
|
||||
|
||||
for k in range(len(uv1)):
|
||||
k_map = v1.index(v2[k])
|
||||
uv1[k].x = - (uv2[k_map].x - 0.5) + 0.5
|
||||
|
@@ -118,7 +118,6 @@ class SelectHierarchy(bpy.types.Operator):
|
||||
select_new = []
|
||||
act_new = None
|
||||
|
||||
|
||||
selected_objects = context.selected_objects
|
||||
obj_act = context.object
|
||||
|
||||
@@ -345,7 +344,6 @@ class ShapeTransfer(bpy.types.Operator):
|
||||
n1loc = v1 + orig_normals[i1] * edge_length
|
||||
n2loc = v2 + orig_normals[i2] * edge_length
|
||||
|
||||
|
||||
# now get the target nloc's
|
||||
v1_to, v2_to = target_coords[i1], target_coords[i2]
|
||||
edlen_to = (v1_to - v2_to).length
|
||||
@@ -553,6 +551,8 @@ class IsolateTypeRender(bpy.types.Operator):
|
||||
|
||||
return {'FINISHED'}
|
||||
|
||||
|
||||
|
||||
class ClearAllRestrictRender(bpy.types.Operator):
|
||||
'''Reveal all render objects by setting the hide render flag'''
|
||||
bl_idname = "object.hide_render_clear_all"
|
||||
|
@@ -203,6 +203,7 @@ class AddPresetInteraction(AddPresetBase, bpy.types.Operator):
|
||||
|
||||
preset_subdir = "interaction"
|
||||
|
||||
|
||||
def register():
|
||||
pass
|
||||
|
||||
|
@@ -60,7 +60,6 @@ def guess_player_path(preset):
|
||||
elif preset == 'MPLAYER':
|
||||
player_path = "mplayer"
|
||||
|
||||
|
||||
return player_path
|
||||
|
||||
|
||||
|
@@ -23,6 +23,7 @@ import bpy
|
||||
from bpy.props import *
|
||||
from rna_prop_ui import rna_idprop_ui_prop_get, rna_idprop_ui_prop_clear
|
||||
|
||||
|
||||
class MESH_OT_delete_edgeloop(bpy.types.Operator):
|
||||
'''Delete an edge loop by merging the faces on each side to a single face loop'''
|
||||
bl_idname = "mesh.delete_edgeloop"
|
||||
@@ -99,7 +100,7 @@ class WM_OT_context_set_int(bpy.types.Operator): # same as enum
|
||||
execute = execute_context_assign
|
||||
|
||||
|
||||
class WM_OT_context_scale_int(bpy.types.Operator): # same as enum
|
||||
class WM_OT_context_scale_int(bpy.types.Operator):
|
||||
'''Scale an int context value.'''
|
||||
bl_idname = "wm.context_scale_int"
|
||||
bl_label = "Context Set"
|
||||
@@ -687,7 +688,6 @@ class WM_OT_properties_edit(bpy.types.Operator):
|
||||
# print(exec_str)
|
||||
exec(exec_str)
|
||||
|
||||
|
||||
# Reassign
|
||||
exec_str = "item['%s'] = %s" % (prop, repr(value_eval))
|
||||
# print(exec_str)
|
||||
@@ -767,6 +767,7 @@ class WM_OT_properties_remove(bpy.types.Operator):
|
||||
del item[self.properties.property]
|
||||
return {'FINISHED'}
|
||||
|
||||
|
||||
def register():
|
||||
pass
|
||||
|
||||
|
@@ -92,12 +92,8 @@ class OnionSkinButtonsPanel():
|
||||
col.prop(arm, "show_only_ghost_selected", text="Selected Only")
|
||||
|
||||
|
||||
|
||||
# NOTE:
|
||||
# The specialised panel types are derived in their respective UI modules
|
||||
|
||||
|
||||
|
||||
def register():
|
||||
pass
|
||||
|
||||
|
@@ -219,7 +219,6 @@ class DATA_PT_iksolver_itasc(ArmatureButtonsPanel, bpy.types.Panel):
|
||||
col = split.column()
|
||||
col.prop(itasc, "iterations")
|
||||
|
||||
|
||||
if simulation:
|
||||
layout.prop(itasc, "use_auto_step")
|
||||
row = layout.row()
|
||||
@@ -240,6 +239,7 @@ class DATA_PT_iksolver_itasc(ArmatureButtonsPanel, bpy.types.Panel):
|
||||
|
||||
from properties_animviz import MotionPathButtonsPanel, OnionSkinButtonsPanel
|
||||
|
||||
|
||||
class DATA_PT_motion_paths(MotionPathButtonsPanel, bpy.types.Panel):
|
||||
#bl_label = "Bones Motion Paths"
|
||||
bl_context = "data"
|
||||
@@ -288,6 +288,7 @@ class DATA_PT_custom_props_arm(ArmatureButtonsPanel, PropertyPanel, bpy.types.Pa
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
|
||||
_context_path = "object.data"
|
||||
|
||||
|
||||
def register():
|
||||
pass
|
||||
|
||||
|
@@ -320,7 +320,6 @@ def register():
|
||||
maxlen=64,
|
||||
default="")
|
||||
|
||||
|
||||
PoseTemplateSettings.CollectionProperty(attr="templates", type=PoseTemplate, name="Templates", description="")
|
||||
PoseTemplateSettings.IntProperty(attr="active_template_index",
|
||||
name="Index of the active slave",
|
||||
|
@@ -43,7 +43,6 @@ class DATA_PT_empty(DataButtonsPanel, bpy.types.Panel):
|
||||
layout.prop(ob, "empty_draw_size", text="Size")
|
||||
|
||||
|
||||
|
||||
def register():
|
||||
pass
|
||||
|
||||
|
@@ -64,6 +64,7 @@ class DATA_PT_context_lamp(DataButtonsPanel, bpy.types.Panel):
|
||||
if texture_count != 0:
|
||||
split.label(text=str(texture_count), icon='TEXTURE')
|
||||
|
||||
|
||||
class DATA_PT_preview(DataButtonsPanel, bpy.types.Panel):
|
||||
bl_label = "Preview"
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
|
||||
|
@@ -470,7 +470,6 @@ class PARTICLE_PT_physics(ParticleButtonsPanel, bpy.types.Panel):
|
||||
elif part.physics_type == 'BOIDS':
|
||||
boids = part.boids
|
||||
|
||||
|
||||
row = layout.row()
|
||||
row.prop(boids, "use_flight")
|
||||
row.prop(boids, "use_land")
|
||||
@@ -1032,7 +1031,6 @@ class PARTICLE_PT_vertexgroups(ParticleButtonsPanel, bpy.types.Panel):
|
||||
row.label(text="Vertex Group")
|
||||
row.label(text="Negate")
|
||||
|
||||
|
||||
row = layout.row()
|
||||
row.prop_search(psys, "vertex_group_density", ob, "vertex_groups", text="Density")
|
||||
row.prop(psys, "invert_vertex_group_density", text="")
|
||||
|
@@ -97,7 +97,6 @@ def point_cache_ui(self, context, cache, enabled, cachetype):
|
||||
sub.enabled = enabled
|
||||
sub.operator("ptcache.bake_from_cache", text="Current Cache to Bake")
|
||||
|
||||
|
||||
col = split.column()
|
||||
col.operator("ptcache.bake_all", text="Bake All Dynamics").bake = True
|
||||
col.operator("ptcache.free_bake_all", text="Free All Bakes")
|
||||
@@ -107,7 +106,6 @@ def point_cache_ui(self, context, cache, enabled, cachetype):
|
||||
def effector_weights_ui(self, context, weights):
|
||||
layout = self.layout
|
||||
|
||||
|
||||
layout.prop(weights, "group")
|
||||
|
||||
split = layout.split()
|
||||
@@ -142,7 +140,6 @@ def effector_weights_ui(self, context, weights):
|
||||
def basic_force_field_settings_ui(self, context, field):
|
||||
layout = self.layout
|
||||
|
||||
|
||||
split = layout.split()
|
||||
|
||||
if not field or field.type == 'NONE':
|
||||
@@ -191,7 +188,6 @@ def basic_force_field_settings_ui(self, context, field):
|
||||
def basic_force_field_falloff_ui(self, context, field):
|
||||
layout = self.layout
|
||||
|
||||
|
||||
# XXX: This doesn't update for some reason.
|
||||
#split = layout.split()
|
||||
split = layout.split(percentage=0.35)
|
||||
|
@@ -58,7 +58,6 @@ class PHYSICS_PT_fluid(PhysicButtonsPanel, bpy.types.Panel):
|
||||
split.operator("object.modifier_add", text="Add").type = 'FLUID_SIMULATION'
|
||||
split.label()
|
||||
|
||||
|
||||
if md:
|
||||
row = layout.row()
|
||||
row.prop(fluid, "type")
|
||||
|
@@ -107,7 +107,6 @@ class PHYSICS_PT_smoke(PhysicButtonsPanel, bpy.types.Panel):
|
||||
sub.active = flow.initial_velocity
|
||||
sub.prop(flow, "velocity_factor", text="Multiplier")
|
||||
|
||||
|
||||
sub = split.column()
|
||||
sub.active = not md.flow_settings.use_outflow
|
||||
sub.label(text="Behavior:")
|
||||
|
@@ -188,7 +188,6 @@ class PHYSICS_PT_softbody_edge(PhysicButtonsPanel, bpy.types.Panel):
|
||||
#sub = col.column()
|
||||
#sub.enabled = softbody.aero > 0
|
||||
|
||||
|
||||
col.label(text="Collision:")
|
||||
col.prop(softbody, "use_edge_collision", text="Edge")
|
||||
col.prop(softbody, "use_face_collision", text="Face")
|
||||
|
@@ -102,7 +102,6 @@ class RENDER_PT_layers(RenderButtonsPanel, bpy.types.Panel):
|
||||
col.label(text="Mask Layers:")
|
||||
col.prop(rl, "layers_zmask", text="")
|
||||
|
||||
|
||||
layout.separator()
|
||||
layout.label(text="Include:")
|
||||
|
||||
@@ -264,7 +263,6 @@ class RENDER_PT_post_processing(RenderButtonsPanel, bpy.types.Panel):
|
||||
sub.row().prop(rd, "field_order", expand=True)
|
||||
sub.prop(rd, "use_fields_still", text="Still")
|
||||
|
||||
|
||||
col = split.column()
|
||||
col.prop(rd, "use_edge_enhance")
|
||||
sub = col.column()
|
||||
@@ -503,6 +501,7 @@ class RENDER_PT_motion_blur(RenderButtonsPanel, bpy.types.Panel):
|
||||
row.prop(rd, "motion_blur_samples")
|
||||
row.prop(rd, "motion_blur_shutter")
|
||||
|
||||
|
||||
class RENDER_PT_dimensions(RenderButtonsPanel, bpy.types.Panel):
|
||||
bl_label = "Dimensions"
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER'}
|
||||
|
@@ -134,7 +134,6 @@ class SCENE_PT_keying_set_paths(SceneButtonsPanel, bpy.types.Panel):
|
||||
col.template_any_ID(ksp, "id", "id_type")
|
||||
col.template_path_builder(ksp, "data_path", ksp.id)
|
||||
|
||||
|
||||
row = layout.row()
|
||||
|
||||
col = row.column()
|
||||
@@ -230,7 +229,6 @@ class ANIM_OT_keying_set_export(bpy.types.Operator):
|
||||
scene = context.scene
|
||||
ks = scene.keying_sets.active
|
||||
|
||||
|
||||
f.write("# Keying Set: %s\n" % ks.name)
|
||||
|
||||
f.write("import bpy\n\n")
|
||||
@@ -249,7 +247,6 @@ class ANIM_OT_keying_set_export(bpy.types.Operator):
|
||||
f.write("ks.use_insertkey_xyz_to_rgb = %s\n" % ks.use_insertkey_xyz_to_rgb)
|
||||
f.write("\n")
|
||||
|
||||
|
||||
# generate and write set of lookups for id's used in paths
|
||||
id_to_paths_cache = {} # cache for syncing ID-blocks to bpy paths + shorthands
|
||||
|
||||
@@ -278,7 +275,6 @@ class ANIM_OT_keying_set_export(bpy.types.Operator):
|
||||
f.write("%s = %s\n" % (id_pair[0], id_pair[1]))
|
||||
f.write("\n")
|
||||
|
||||
|
||||
# write paths
|
||||
f.write("# Path Definitions\n")
|
||||
for ksp in ks.paths:
|
||||
|
@@ -691,7 +691,6 @@ class TEXTURE_PT_envmap(TextureTypePanel, bpy.types.Panel):
|
||||
tex = context.texture
|
||||
env = tex.environment_map
|
||||
|
||||
|
||||
row = layout.row()
|
||||
row.prop(env, "source", expand=True)
|
||||
row.menu("TEXTURE_MT_envmap_specials", icon='DOWNARROW_HLT', text="")
|
||||
|
@@ -62,6 +62,7 @@ class WORLD_PT_context_world(WorldButtonsPanel, bpy.types.Panel):
|
||||
if texture_count:
|
||||
split.label(text=str(texture_count), icon='TEXTURE')
|
||||
|
||||
|
||||
class WORLD_PT_preview(WorldButtonsPanel, bpy.types.Panel):
|
||||
bl_label = "Preview"
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER'}
|
||||
|
@@ -50,7 +50,7 @@ class IMAGE_MT_view(bpy.types.Menu):
|
||||
|
||||
layout.prop(sima, "use_realtime_update")
|
||||
if show_uvedit:
|
||||
layout.prop(toolsettings, "show_uv_local_view") # Numpad /
|
||||
layout.prop(toolsettings, "show_uv_local_view")
|
||||
layout.prop(uv, "show_other_objects")
|
||||
|
||||
layout.separator()
|
||||
@@ -663,6 +663,7 @@ class IMAGE_PT_paint_curve(BrushButtonsPanel, bpy.types.Panel):
|
||||
row.operator("brush.curve_preset", icon="LINCURVE", text="").shape = 'LINE'
|
||||
row.operator("brush.curve_preset", icon="NOCURVE", text="").shape = 'MAX'
|
||||
|
||||
|
||||
def register():
|
||||
pass
|
||||
|
||||
|
@@ -352,7 +352,6 @@ class HELP_OT_operator_cheat_sheet(bpy.types.Operator):
|
||||
return {'FINISHED'}
|
||||
|
||||
|
||||
|
||||
def register():
|
||||
pass
|
||||
|
||||
|
@@ -458,7 +458,6 @@ class SEQUENCER_PT_effect(SequencerButtonsPanel, bpy.types.Panel):
|
||||
for i in range(1, strip.channel):
|
||||
row.operator("sequencer.cut_multicam", text=str(i)).camera = i
|
||||
|
||||
|
||||
col = layout.column(align=True)
|
||||
if strip.type == 'SPEED':
|
||||
col.prop(strip, "speed_fader", text="Speed fader")
|
||||
@@ -566,7 +565,6 @@ class SEQUENCER_PT_input(SequencerButtonsPanel, bpy.types.Panel):
|
||||
# TODO, sound???
|
||||
# end drawing filename
|
||||
|
||||
|
||||
layout.prop(strip, "use_translation", text="Image Offset:")
|
||||
if strip.use_translation:
|
||||
col = layout.column(align=True)
|
||||
@@ -789,6 +787,7 @@ class SEQUENCER_PT_view(SequencerButtonsPanel_Output, bpy.types.Panel):
|
||||
col.prop(st, "show_separate_color")
|
||||
col.prop(st, "proxy_render_size")
|
||||
|
||||
|
||||
def register():
|
||||
pass
|
||||
|
||||
|
@@ -293,6 +293,7 @@ class TEXT_MT_toolbox(bpy.types.Menu):
|
||||
|
||||
layout.operator("text.run_script")
|
||||
|
||||
|
||||
def register():
|
||||
pass
|
||||
|
||||
|
@@ -192,6 +192,7 @@ class TIME_MT_autokey(bpy.types.Menu):
|
||||
layout.prop_enum(tools, "auto_keying_mode", 'ADD_REPLACE_KEYS')
|
||||
layout.prop_enum(tools, "auto_keying_mode", 'REPLACE_KEYS')
|
||||
|
||||
|
||||
def register():
|
||||
pass
|
||||
|
||||
|
@@ -359,7 +359,6 @@ class USERPREF_PT_system(bpy.types.Panel):
|
||||
|
||||
split = layout.split()
|
||||
|
||||
|
||||
# 1. Column
|
||||
column = split.column()
|
||||
colsplit = column.split(percentage=0.85)
|
||||
@@ -412,7 +411,6 @@ class USERPREF_PT_system(bpy.types.Panel):
|
||||
|
||||
#col.prop(system, "use_textured_fonts")
|
||||
|
||||
|
||||
# 2. Column
|
||||
column = split.column()
|
||||
colsplit = column.split(percentage=0.85)
|
||||
@@ -439,7 +437,6 @@ class USERPREF_PT_system(bpy.types.Panel):
|
||||
col.prop(system, "prefetch_frames")
|
||||
col.prop(system, "memory_cache_limit")
|
||||
|
||||
|
||||
# 3. Column
|
||||
column = split.column()
|
||||
|
||||
@@ -527,7 +524,6 @@ class USERPREF_PT_theme(bpy.types.Panel):
|
||||
|
||||
split = layout.split(percentage=0.4)
|
||||
|
||||
|
||||
layout.separator()
|
||||
layout.separator()
|
||||
|
||||
@@ -624,7 +620,6 @@ class USERPREF_PT_theme(bpy.types.Panel):
|
||||
colsub.row().prop(ui, "inner_key_sel")
|
||||
colsub.row().prop(ui, "blend")
|
||||
|
||||
|
||||
ui = theme.user_interface
|
||||
col.separator()
|
||||
col.separator()
|
||||
@@ -906,7 +901,6 @@ class USERPREF_PT_addons(bpy.types.Panel):
|
||||
if mod:
|
||||
USERPREF_PT_addons._addons_fake_modules[mod_name] = mod
|
||||
|
||||
|
||||
# just incase we get stale modules, not likely
|
||||
for mod_stale in modules_stale:
|
||||
del USERPREF_PT_addons._addons_fake_modules[mod_stale]
|
||||
@@ -956,7 +950,6 @@ class USERPREF_PT_addons(bpy.types.Panel):
|
||||
(filter == "Enabled" and is_enabled) or \
|
||||
(filter == "Disabled" and not is_enabled):
|
||||
|
||||
|
||||
if search and search not in info["name"].lower():
|
||||
if info["author"]:
|
||||
if search not in info["author"].lower():
|
||||
@@ -974,7 +967,8 @@ class USERPREF_PT_addons(bpy.types.Panel):
|
||||
rowsub = row.row()
|
||||
rowsub.active = is_enabled
|
||||
rowsub.label(text='%s: %s' % (info['category'], info["name"]))
|
||||
if info["warning"]: rowsub.label(icon='ERROR')
|
||||
if info["warning"]:
|
||||
rowsub.label(icon='ERROR')
|
||||
|
||||
if is_enabled:
|
||||
row.operator("wm.addon_disable", icon='CHECKBOX_HLT', text="", emboss=False).module = module_name
|
||||
@@ -1215,6 +1209,7 @@ class WM_OT_addon_expand(bpy.types.Operator):
|
||||
def register():
|
||||
pass
|
||||
|
||||
|
||||
def unregister():
|
||||
pass
|
||||
|
||||
|
@@ -793,9 +793,11 @@ class WM_OT_keyconfig_remove(bpy.types.Operator):
|
||||
wm.keyconfigs.remove(keyconfig)
|
||||
return {'FINISHED'}
|
||||
|
||||
|
||||
def register():
|
||||
pass
|
||||
|
||||
|
||||
def unregister():
|
||||
pass
|
||||
|
||||
|
@@ -608,7 +608,6 @@ class VIEW3D_MT_select_edit_armature(bpy.types.Menu):
|
||||
|
||||
layout.operator("view3d.select_border")
|
||||
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.operator("armature.select_all", text="Select/Deselect All")
|
||||
@@ -799,6 +798,7 @@ class VIEW3D_MT_object_specials(bpy.types.Menu):
|
||||
props = layout.operator("object.isolate_type_render")
|
||||
props = layout.operator("object.hide_render_clear_all")
|
||||
|
||||
|
||||
class VIEW3D_MT_object_apply(bpy.types.Menu):
|
||||
bl_label = "Apply"
|
||||
|
||||
|
@@ -92,14 +92,12 @@ class VIEW3D_PT_tools_meshedit(View3DPanel, bpy.types.Panel):
|
||||
col.operator("transform.resize", text="Scale")
|
||||
col.operator("transform.shrink_fatten", text="Along Normal")
|
||||
|
||||
|
||||
col = layout.column(align=True)
|
||||
col.label(text="Deform:")
|
||||
col.operator("transform.edge_slide")
|
||||
col.operator("mesh.rip_move")
|
||||
col.operator("mesh.vertices_smooth")
|
||||
|
||||
|
||||
col = layout.column(align=True)
|
||||
col.label(text="Add:")
|
||||
col.operator("view3d.edit_mesh_extrude_move_normal", text="Extrude Region")
|
||||
@@ -127,7 +125,6 @@ class VIEW3D_PT_tools_meshedit(View3DPanel, bpy.types.Panel):
|
||||
col.operator("mesh.mark_seam")
|
||||
col.operator("mesh.mark_seam", text="Clear Seam").clear = True
|
||||
|
||||
|
||||
col = layout.column(align=True)
|
||||
col.label(text="Shading:")
|
||||
col.operator("mesh.faces_shade_smooth", text="Smooth")
|
||||
@@ -540,7 +537,6 @@ class VIEW3D_PT_tools_brush(PaintPanel, bpy.types.Panel):
|
||||
|
||||
col = layout.column()
|
||||
|
||||
|
||||
col.separator()
|
||||
|
||||
row = col.row(align=True)
|
||||
@@ -554,7 +550,6 @@ class VIEW3D_PT_tools_brush(PaintPanel, bpy.types.Panel):
|
||||
|
||||
row.prop(brush, "use_pressure_size", toggle=True, text="")
|
||||
|
||||
|
||||
if brush.sculpt_tool not in ('SNAKE_HOOK', 'GRAB', 'ROTATE'):
|
||||
col.separator()
|
||||
|
||||
@@ -569,8 +564,6 @@ class VIEW3D_PT_tools_brush(PaintPanel, bpy.types.Panel):
|
||||
row.prop(brush, "strength", text="Strength", slider=True)
|
||||
row.prop(brush, "use_pressure_strength", text="")
|
||||
|
||||
|
||||
|
||||
if brush.sculpt_tool not in ('SMOOTH'):
|
||||
col.separator()
|
||||
|
||||
@@ -578,16 +571,12 @@ class VIEW3D_PT_tools_brush(PaintPanel, bpy.types.Panel):
|
||||
row.prop(brush, "auto_smooth_factor", slider=True)
|
||||
row.prop(brush, "use_inverse_smooth_pressure", toggle=True, text="")
|
||||
|
||||
|
||||
|
||||
if brush.sculpt_tool in ('GRAB', 'SNAKE_HOOK'):
|
||||
col.separator()
|
||||
|
||||
row = col.row(align=True)
|
||||
row.prop(brush, "normal_weight", slider=True)
|
||||
|
||||
|
||||
|
||||
if brush.sculpt_tool in ('CREASE', 'BLOB'):
|
||||
col.separator()
|
||||
|
||||
@@ -633,8 +622,6 @@ class VIEW3D_PT_tools_brush(PaintPanel, bpy.types.Panel):
|
||||
|
||||
col.prop(brush, "use_accumulate")
|
||||
|
||||
|
||||
|
||||
if brush.sculpt_tool == 'LAYER':
|
||||
col.separator()
|
||||
|
||||
@@ -675,9 +662,7 @@ class VIEW3D_PT_tools_brush(PaintPanel, bpy.types.Panel):
|
||||
col.active = (brush.blend not in ('ERASE_ALPHA', 'ADD_ALPHA'))
|
||||
col.prop(brush, "use_alpha")
|
||||
|
||||
|
||||
# Weight Paint Mode #
|
||||
|
||||
elif context.weight_paint_object and brush:
|
||||
layout.prop(context.tool_settings, "vertex_group_weight", text="Weight", slider=True)
|
||||
layout.prop(context.tool_settings, "use_auto_normalize", text="Auto Normalize")
|
||||
@@ -697,7 +682,6 @@ class VIEW3D_PT_tools_brush(PaintPanel, bpy.types.Panel):
|
||||
row.prop(brush, "use_pressure_jitter", toggle=True, text="")
|
||||
|
||||
# Vertex Paint Mode #
|
||||
|
||||
elif context.vertex_paint_object and brush:
|
||||
col = layout.column()
|
||||
col.template_color_wheel(brush, "color", value_slider=True)
|
||||
@@ -741,11 +725,8 @@ class VIEW3D_PT_tools_brush_texture(PaintPanel, bpy.types.Panel):
|
||||
if context.sculpt_object:
|
||||
#XXX duplicated from properties_texture.py
|
||||
|
||||
|
||||
|
||||
col.separator()
|
||||
|
||||
|
||||
col.label(text="Brush Mapping:")
|
||||
row = col.row(align=True)
|
||||
row.prop(tex_slot, "map_mode", expand=True)
|
||||
@@ -988,7 +969,6 @@ class VIEW3D_PT_sculpt_options(PaintPanel, bpy.types.Panel):
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
|
||||
tool_settings = context.tool_settings
|
||||
sculpt = tool_settings.sculpt
|
||||
settings = __class__.paint_settings(context)
|
||||
@@ -1015,7 +995,6 @@ class VIEW3D_PT_sculpt_options(PaintPanel, bpy.types.Panel):
|
||||
row.prop(sculpt, "lock_z", text="Z", toggle=True)
|
||||
|
||||
|
||||
|
||||
class VIEW3D_PT_sculpt_symmetry(PaintPanel, bpy.types.Panel):
|
||||
bl_label = "Symmetry"
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
@@ -1051,6 +1030,7 @@ class VIEW3D_PT_sculpt_symmetry(PaintPanel, bpy.types.Panel):
|
||||
|
||||
col.prop(sculpt, "use_symmetry_feather", text="Feather")
|
||||
|
||||
|
||||
class VIEW3D_PT_tools_brush_appearance(PaintPanel, bpy.types.Panel):
|
||||
bl_label = "Appearance"
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
@@ -1066,7 +1046,7 @@ class VIEW3D_PT_tools_brush_appearance(PaintPanel, bpy.types.Panel):
|
||||
settings = __class__.paint_settings(context)
|
||||
brush = settings.brush
|
||||
|
||||
col = layout.column();
|
||||
col = layout.column()
|
||||
|
||||
if context.sculpt_object and context.tool_settings.sculpt:
|
||||
#if brush.sculpt_tool in ('DRAW', 'INFLATE', 'CLAY', 'PINCH', 'CREASE', 'BLOB', 'FLATTEN', 'FILL', 'SCRAPE', 'CLAY_TUBES'):
|
||||
@@ -1260,6 +1240,7 @@ class VIEW3D_PT_imagepaint_options(PaintPanel):
|
||||
col.prop(tool_settings, "sculpt_paint_use_unified_size", text="Size")
|
||||
col.prop(tool_settings, "sculpt_paint_use_unified_strength", text="Strength")
|
||||
|
||||
|
||||
class VIEW3D_MT_tools_projectpaint_clone(bpy.types.Menu):
|
||||
bl_label = "Clone Layer"
|
||||
|
||||
@@ -1311,7 +1292,6 @@ class VIEW3D_PT_tools_particlemode(View3DPanel, bpy.types.Panel):
|
||||
if ptcache and len(ptcache.point_caches) > 1:
|
||||
layout.template_list(ptcache, "point_caches", ptcache.point_caches, "active_index", type='ICONS')
|
||||
|
||||
|
||||
if not pe.is_editable:
|
||||
layout.label(text="Point cache must be baked")
|
||||
layout.label(text="to enable editing!")
|
||||
|
@@ -23,6 +23,7 @@
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
def api_dump(use_properties=True, use_functions=True):
|
||||
|
||||
def prop_type(prop):
|
||||
@@ -42,7 +43,6 @@ def api_dump(use_properties=True, use_functions=True):
|
||||
data_str += "=%s" % prop.default_str
|
||||
args.append(data_str)
|
||||
|
||||
|
||||
data_str = "%s.%s(%s)" % (struct_id_str, func_id, ", ".join(args))
|
||||
if func.return_values:
|
||||
return_args = ", ".join([prop_type(arg) for arg in func.return_values])
|
||||
@@ -52,7 +52,6 @@ def api_dump(use_properties=True, use_functions=True):
|
||||
data_str += " --> %s" % return_args
|
||||
return data_str
|
||||
|
||||
|
||||
def prop_to_str(struct_id_str, prop_id, prop):
|
||||
|
||||
prop_str = " <-- %s" % prop_type(prop)
|
||||
@@ -70,7 +69,6 @@ def api_dump(use_properties=True, use_functions=True):
|
||||
|
||||
return struct_id_str
|
||||
|
||||
|
||||
def dump_funcs():
|
||||
data = []
|
||||
for struct_id, v in sorted(struct.items()):
|
||||
|
Reference in New Issue
Block a user