Cleanup: style
This commit is contained in:
@@ -324,15 +324,15 @@ class ShapeTransfer(Operator):
|
||||
('OFFSET',
|
||||
"Offset",
|
||||
"Apply the relative positional offset",
|
||||
),
|
||||
),
|
||||
('RELATIVE_FACE',
|
||||
"Relative Face",
|
||||
"Calculate relative position (using faces)",
|
||||
),
|
||||
),
|
||||
('RELATIVE_EDGE',
|
||||
"Relative Edge",
|
||||
"Calculate relative position (using edges)",
|
||||
),
|
||||
),
|
||||
),
|
||||
name="Transformation Mode",
|
||||
description="Relative shape positions to the new shape method",
|
||||
|
||||
@@ -46,11 +46,13 @@ def object_ensure_material(obj, mat_name):
|
||||
obj.data.materials.append(mat)
|
||||
return mat
|
||||
|
||||
|
||||
class ObjectModeOperator:
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
return context.mode == 'OBJECT'
|
||||
|
||||
|
||||
class QuickFur(ObjectModeOperator, Operator):
|
||||
bl_idname = "object.quick_fur"
|
||||
bl_label = "Quick Fur"
|
||||
@@ -507,10 +509,11 @@ class QuickFluid(ObjectModeOperator, Operator):
|
||||
# and scale with initial velocity
|
||||
v = 0.5 * self.initial_velocity
|
||||
obj.location = 0.5 * (max_co + min_co) + Vector((0.0, 0.0, -1.0)) + v
|
||||
obj.scale = (0.5 * (max_co - min_co) +
|
||||
Vector((1.0, 1.0, 2.0)) +
|
||||
Vector((abs(v[0]), abs(v[1]), abs(v[2])))
|
||||
)
|
||||
obj.scale = (
|
||||
0.5 * (max_co - min_co) +
|
||||
Vector((1.0, 1.0, 2.0)) +
|
||||
Vector((abs(v[0]), abs(v[1]), abs(v[2])))
|
||||
)
|
||||
|
||||
# setup smoke domain
|
||||
bpy.ops.object.modifier_add(type='FLUID_SIMULATION')
|
||||
|
||||
@@ -583,10 +583,10 @@ def packIslands(islandList):
|
||||
w, h = maxx - minx, maxy - miny
|
||||
|
||||
if USER_ISLAND_MARGIN:
|
||||
minx -= USER_ISLAND_MARGIN * w/2
|
||||
miny -= USER_ISLAND_MARGIN * h/2
|
||||
maxx += USER_ISLAND_MARGIN * w/2
|
||||
maxy += USER_ISLAND_MARGIN * h/2
|
||||
minx -= USER_ISLAND_MARGIN * w / 2
|
||||
miny -= USER_ISLAND_MARGIN * h / 2
|
||||
maxx += USER_ISLAND_MARGIN * w / 2
|
||||
maxy += USER_ISLAND_MARGIN * h / 2
|
||||
|
||||
# recalc width and height
|
||||
w, h = maxx - minx, maxy - miny
|
||||
|
||||
@@ -1423,7 +1423,6 @@ class WM_OT_sysinfo(Operator):
|
||||
return {'RUNNING_MODAL'}
|
||||
|
||||
|
||||
|
||||
class WM_OT_operator_cheat_sheet(Operator):
|
||||
"""List all the Operators in a text-block, useful for scripting"""
|
||||
bl_idname = "wm.operator_cheat_sheet"
|
||||
@@ -1484,7 +1483,6 @@ class WM_OT_owner_disable(Operator):
|
||||
return {'FINISHED'}
|
||||
|
||||
|
||||
|
||||
class WM_OT_tool_set_by_id(Operator):
|
||||
"""Set the tool by name (for keymaps)"""
|
||||
bl_idname = "wm.tool_set_by_id"
|
||||
@@ -1666,7 +1664,7 @@ class WM_MT_splash(Menu):
|
||||
# Draw setup screen if no preferences have been saved yet.
|
||||
import os
|
||||
|
||||
userconfig_path = bpy.utils.user_resource('CONFIG');
|
||||
userconfig_path = bpy.utils.user_resource('CONFIG')
|
||||
userdef_path = os.path.join(userconfig_path, "userpref.blend")
|
||||
|
||||
if not os.path.isfile(userdef_path):
|
||||
|
||||
Reference in New Issue
Block a user