scene.test_array = (True, False)
print([x for x in scene.test_array])
-#scene.test_date = "blah" # this would fail, property is read-only
+# scene.test_date = "blah" # this would fail, property is read-only
print(scene.test_date)
scene.test_enum = 'BLUE'
# Python equivalent
for i in range(len(seq)):
some_seq[i] = getattr(collection[i], attr)
-
- # ***** 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.
- #
- # Contributor(s): Campbell Barton, Luca Bonavita
- #
- # #**** END GPL LICENSE BLOCK #****
+# ##### 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.
+#
+# Contributor(s): Campbell Barton
+#
+# ##### END GPL LICENSE BLOCK #####
# <pep8 compliant>
- # ***** 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.
- #
- # Contributor(s): Campbell Barton
- #
- # #**** END GPL LICENSE BLOCK #****
+# ##### 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.
+#
+# Contributor(s): Campbell Barton
+#
+# ##### END GPL LICENSE BLOCK #####
# <pep8 compliant>
from . import engine
from . import version_update
+
class CyclesRender(bpy.types.RenderEngine):
bl_idname = 'CYCLES'
bl_label = "Cycles Render"
layout = self.layout
rd = context.scene.render
- scene = context.scene
+ # scene = context.scene
layout.active = rd.use_motion_blur
layout = self.layout
rd = context.scene.render
- scene = context.scene
+ # scene = context.scene
ob = context.object
cob = ob.cycles
layout = self.layout
mat = context.material
- cmat = mat.cycles
+ # cmat = mat.cycles
panel_node_draw(layout, mat, 'OUTPUT_MATERIAL', 'Volume')
@classmethod
def poll(cls, context):
- scene = context.scene
psys = context.particle_system
return CyclesButtonsPanel.poll(context) and psys and psys.settings.type == 'HAIR'
box.prop(cbk, "normal_space", text="Space")
row = box.row(align=True)
- row.label(text = "Swizzle:")
+ row.label(text="Swizzle:")
row.prop(cbk, "normal_r", text="")
row.prop(cbk, "normal_g", text="")
row.prop(cbk, "normal_b", text="")
process_msg(msgs, default_context, cls.__doc__, msgsrc, reports, check_ctxt_rna_tip, settings)
# Panels' "tabs" system.
- if hasattr(bl_rna, 'bl_category') and bl_rna.bl_category:
+ if hasattr(bl_rna, 'bl_category') and bl_rna.bl_category:
process_msg(msgs, default_context, bl_rna.bl_category, msgsrc, reports, check_ctxt_rna, settings)
- if hasattr(bl_rna, 'bl_label') and bl_rna.bl_label:
+ if hasattr(bl_rna, 'bl_label') and bl_rna.bl_label:
process_msg(msgs, msgctxt, bl_rna.bl_label, msgsrc, reports, check_ctxt_rna, settings)
walk_properties(cls)
#key = self.settings.PO_HEADER_KEY
#for uid, trans in self.trans.items():
#if key not in trans.msgs:
- #trans.msgs[key]
+ #trans.msgs[key]
self.unescape()
def write(self, kind, langs=set()):
draw_funcs = cls._dyn_ui_initialize()
try:
draw_funcs.remove(draw_func)
- except:
+ except ValueError:
pass
bpy.types.Sequence,
)
-
def number_to_str(val, val_type):
if val_type == int:
return "%d" % val
):
def rna2xml_node(xml_node, value):
-# print("evaluating:", xml_node.nodeName)
+ # print("evaluating:", xml_node.nodeName)
# ---------------------------------------------------------------------
# Simple attributes
for attr in xml_node.attributes.keys():
-# print(" ", attr)
+ # print(" ", attr)
subvalue = getattr(value, attr, Ellipsis)
if subvalue is Ellipsis:
# 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.
paths = from_paths | to_paths
def update_cb(base, class_name, old_path, fcurve, options):
- print(options)
+ # print(options)
+
def handle_deg2rad(fcurve):
if fcurve is not None:
if hasattr(fcurve, "keyframes"):
max_co[0] = max(bb_vec[0], max_co[0])
max_co[1] = max(bb_vec[1], max_co[1])
max_co[2] = max(bb_vec[2], max_co[2])
-
-
+
+
def grid_location(x, y):
return (x * 200, y * 150)
try:
os.makedirs(path_addons, exist_ok=True)
except:
- import traceback
traceback.print_exc()
# Check if we are installing from a target path,
col.label(text="Measure:")
col.operator("view3d.ruler")
-
sub.prop_search(ob, "parent_bone", parent.data, "bones", text="")
sub.active = (parent is not None)
+
class GROUP_MT_specials(Menu):
bl_label = "Group Specials"
col.template_ID(settings, "clone_image")
col.label("UV Map")
col.menu("VIEW3D_MT_tools_projectpaint_clone", text=clone_text, translate=False)
-
-
else:
col.prop(brush, "clone_image", text="Image")
col.prop(brush, "clone_alpha", text="Alpha")
-
-
col.separator()
if capabilities.has_radius:
def draw(self, context):
layout = self.layout
- sc = context.space_data
+ # sc = context.space_data
# clip = sc.clip
col = layout.column(align=True)
op = layout.operator("sequencer.select", text="All strips to the Right")
op.left_right = 'RIGHT'
op.linked_time = True
-
+
layout.separator()
layout.operator("sequencer.select_handles", text="Surrounding Handles").side = 'BOTH'
layout.operator("sequencer.select_handles", text="Left Handle").side = 'LEFT'
layout.operator("anim.previewrange_clear")
layout.operator("anim.previewrange_set")
+
class SEQUENCER_MT_add(Menu):
bl_label = "Add"
col = layout.column(align=True)
if strip.type == 'SPEED':
col.prop(strip, "multiply_speed")
- elif strip.type in {'CROSS', 'GAMMA_CROSS', 'WIPE', 'ALPHA_OVER','ALPHA_UNDER','OVER_DROP'}:
+ elif strip.type in {'CROSS', 'GAMMA_CROSS', 'WIPE', 'ALPHA_OVER', 'ALPHA_UNDER', 'OVER_DROP'}:
col.prop(strip, "use_default_fade", "Default fade")
if not strip.use_default_fade:
col.prop(strip, "effect_fader", text="Effect fader")
col.prop(system, "use_gpu_mipmap")
col.prop(system, "use_16bit_textures")
-
if system.is_occlusion_query_supported():
col.separator()
col.label(text="Selection")
layout = self.layout
with_freestyle = bpy.app.build_options.freestyle
- scene = context.scene
layout.operator_context = 'INVOKE_REGION_WIN'
layout = self.layout
with_freestyle = bpy.app.build_options.freestyle
- scene = context.scene
layout.operator_context = 'INVOKE_REGION_WIN'
sub = row.row(align=True)
sub.active = mesh.show_normal_vertex or mesh.show_normal_face or mesh.show_normal_loop
- sub.prop(context.scene.tool_settings, "normal_size", text="Size")
+ sub.prop(scene.tool_settings, "normal_size", text="Size")
col.separator()
split = layout.split()
col = layout.column()
col.label("Painting Mode")
- col.prop(settings, "mode", text = "")
+ col.prop(settings, "mode", text="")
col.separator()
if settings.mode == 'MATERIAL':
col.operator("image.save_dirty", text="Save All Images")
-
class VIEW3D_PT_stencil_projectpaint(View3DPanel, Panel):
bl_context = "imagepaint"
bl_label = "Stencil"
import bpy
-from mathutils import Vector
from bpy_extras import view3d_utils
if __name__ == "__main__":
register()
-
global_namespace = {"__file__": filepath, "__name__": "__main__"}
with open(filepath, 'rb') as file:
exec(compile(file.read(), filepath, 'exec'), global_namespace)
-
register()
bpy.ops.wm.call_menu_pie(name="VIEW3D_PIE_template")
-
- # ***** 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.
- #
- # Contributor(s): Campbell Barton
- #
- # #**** END GPL LICENSE BLOCK #****
+# ##### 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.
+#
+# Contributor(s): Campbell Barton
+#
+# ##### END GPL LICENSE BLOCK #####
# <pep8 compliant>
import traceback
traceback.print_exc()
- import sys
+ # import sys
# sys.exit(1) # comment to debug
else: