code cleanup:
- cycles ui used 'cscene' for scene.cycles and scene.cycles_curves - style cleanup
This commit is contained in:
@@ -28,8 +28,8 @@ c['slavePortnum'] = 9989
|
|||||||
from buildbot.changes.svnpoller import SVNPoller
|
from buildbot.changes.svnpoller import SVNPoller
|
||||||
|
|
||||||
c['change_source'] = SVNPoller(
|
c['change_source'] = SVNPoller(
|
||||||
'https://svn.blender.org/svnroot/bf-blender/trunk/',
|
'https://svn.blender.org/svnroot/bf-blender/trunk/',
|
||||||
pollinterval=1200)
|
pollinterval=1200)
|
||||||
|
|
||||||
# BUILDERS
|
# BUILDERS
|
||||||
#
|
#
|
||||||
@@ -74,9 +74,11 @@ def svn_step(branch=''):
|
|||||||
else:
|
else:
|
||||||
return SVN(baseURL='https://svn.blender.org/svnroot/bf-blender/%%BRANCH%%/blender', mode='update', defaultBranch='trunk', workdir='blender')
|
return SVN(baseURL='https://svn.blender.org/svnroot/bf-blender/%%BRANCH%%/blender', mode='update', defaultBranch='trunk', workdir='blender')
|
||||||
|
|
||||||
|
|
||||||
def lib_svn_step(dir):
|
def lib_svn_step(dir):
|
||||||
return SVN(name='lib svn', baseURL='https://svn.blender.org/svnroot/bf-blender/%%BRANCH%%/lib/' + dir, mode='update', defaultBranch='trunk', workdir='lib/' + dir)
|
return SVN(name='lib svn', baseURL='https://svn.blender.org/svnroot/bf-blender/%%BRANCH%%/lib/' + dir, mode='update', defaultBranch='trunk', workdir='lib/' + dir)
|
||||||
|
|
||||||
|
|
||||||
def rsync_step(id, branch, rsync_script):
|
def rsync_step(id, branch, rsync_script):
|
||||||
return ShellCommand(name='rsync', command=['python', rsync_script, id, branch], description='uploading', descriptionDone='uploaded', workdir='install')
|
return ShellCommand(name='rsync', command=['python', rsync_script, id, branch], description='uploading', descriptionDone='uploaded', workdir='install')
|
||||||
|
|
||||||
@@ -155,9 +157,9 @@ for i in range(0, schedule_cycle):
|
|||||||
|
|
||||||
print(names)
|
print(names)
|
||||||
c['schedulers'].append(timed.Nightly(name='nightly' + str(i),
|
c['schedulers'].append(timed.Nightly(name='nightly' + str(i),
|
||||||
builderNames=names,
|
builderNames=names,
|
||||||
hour=3+i,
|
hour=3 + i,
|
||||||
minute=0))
|
minute=0))
|
||||||
|
|
||||||
# STATUS TARGETS
|
# STATUS TARGETS
|
||||||
#
|
#
|
||||||
|
@@ -41,5 +41,3 @@ print(command)
|
|||||||
|
|
||||||
ret = os.system(command)
|
ret = os.system(command)
|
||||||
sys.exit(ret)
|
sys.exit(ret)
|
||||||
|
|
||||||
|
|
||||||
|
@@ -50,7 +50,7 @@ def main():
|
|||||||
check_commands = []
|
check_commands = []
|
||||||
for c, inc_dirs, defs in source_info:
|
for c, inc_dirs, defs in source_info:
|
||||||
cmd = ([CHECKER_BIN] +
|
cmd = ([CHECKER_BIN] +
|
||||||
CHECKER_ARGS +
|
CHECKER_ARGS +
|
||||||
[c] +
|
[c] +
|
||||||
[("-I%s" % i) for i in inc_dirs] +
|
[("-I%s" % i) for i in inc_dirs] +
|
||||||
[("-D%s" % d) for d in defs]
|
[("-D%s" % d) for d in defs]
|
||||||
|
@@ -56,7 +56,7 @@ def main():
|
|||||||
check_commands = []
|
check_commands = []
|
||||||
for c, inc_dirs, defs in source_info:
|
for c, inc_dirs, defs in source_info:
|
||||||
cmd = ([CHECKER_BIN] +
|
cmd = ([CHECKER_BIN] +
|
||||||
CHECKER_ARGS +
|
CHECKER_ARGS +
|
||||||
[c] +
|
[c] +
|
||||||
[("-I%s" % i) for i in inc_dirs] +
|
[("-I%s" % i) for i in inc_dirs] +
|
||||||
[("-D%s" % d) for d in defs]
|
[("-D%s" % d) for d in defs]
|
||||||
|
@@ -41,6 +41,7 @@ import os
|
|||||||
|
|
||||||
USE_QUIET = (os.environ.get("QUIET", None) is not None)
|
USE_QUIET = (os.environ.get("QUIET", None) is not None)
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
source_info = project_source_info.build_info(use_cxx=False, ignore_prefix_list=CHECKER_IGNORE_PREFIX)
|
source_info = project_source_info.build_info(use_cxx=False, ignore_prefix_list=CHECKER_IGNORE_PREFIX)
|
||||||
|
|
||||||
@@ -48,7 +49,7 @@ def main():
|
|||||||
for c, inc_dirs, defs in source_info:
|
for c, inc_dirs, defs in source_info:
|
||||||
|
|
||||||
cmd = ([CHECKER_BIN] +
|
cmd = ([CHECKER_BIN] +
|
||||||
CHECKER_ARGS +
|
CHECKER_ARGS +
|
||||||
[c] +
|
[c] +
|
||||||
[("-I%s" % i) for i in inc_dirs] +
|
[("-I%s" % i) for i in inc_dirs] +
|
||||||
[("-D%s" % d) for d in defs]
|
[("-D%s" % d) for d in defs]
|
||||||
|
@@ -47,7 +47,7 @@ def main():
|
|||||||
for c, inc_dirs, defs in source_info:
|
for c, inc_dirs, defs in source_info:
|
||||||
|
|
||||||
cmd = ([CHECKER_BIN] +
|
cmd = ([CHECKER_BIN] +
|
||||||
CHECKER_ARGS +
|
CHECKER_ARGS +
|
||||||
[c] +
|
[c] +
|
||||||
[("-I%s" % i) for i in inc_dirs] +
|
[("-I%s" % i) for i in inc_dirs] +
|
||||||
[("-D%s" % d) for d in defs]
|
[("-D%s" % d) for d in defs]
|
||||||
|
@@ -79,7 +79,7 @@ def main():
|
|||||||
check_commands = []
|
check_commands = []
|
||||||
for c, inc_dirs, defs in source_info:
|
for c, inc_dirs, defs in source_info:
|
||||||
cmd = ([CHECKER_BIN] +
|
cmd = ([CHECKER_BIN] +
|
||||||
CHECKER_ARGS +
|
CHECKER_ARGS +
|
||||||
[c] +
|
[c] +
|
||||||
[("-I%s" % i) for i in inc_dirs] +
|
[("-I%s" % i) for i in inc_dirs] +
|
||||||
[("-D%s" % d) for d in defs]
|
[("-D%s" % d) for d in defs]
|
||||||
|
@@ -151,7 +151,6 @@ def cmake_advanced_info():
|
|||||||
os.system(cmd)
|
os.system(cmd)
|
||||||
return join(CMAKE_DIR, ".cproject")
|
return join(CMAKE_DIR, ".cproject")
|
||||||
|
|
||||||
|
|
||||||
includes = []
|
includes = []
|
||||||
defines = []
|
defines = []
|
||||||
|
|
||||||
|
@@ -89,12 +89,12 @@ def makefile_log():
|
|||||||
if make_exe_basename.startswith("make"):
|
if make_exe_basename.startswith("make"):
|
||||||
print("running 'make' with --dry-run ...")
|
print("running 'make' with --dry-run ...")
|
||||||
process = subprocess.Popen([make_exe, "--always-make", "--dry-run", "--keep-going", "VERBOSE=1"],
|
process = subprocess.Popen([make_exe, "--always-make", "--dry-run", "--keep-going", "VERBOSE=1"],
|
||||||
stdout=subprocess.PIPE,
|
stdout=subprocess.PIPE,
|
||||||
)
|
)
|
||||||
elif make_exe_basename.startswith("ninja"):
|
elif make_exe_basename.startswith("ninja"):
|
||||||
print("running 'ninja' with -t commands ...")
|
print("running 'ninja' with -t commands ...")
|
||||||
process = subprocess.Popen([make_exe, "-t", "commands"],
|
process = subprocess.Popen([make_exe, "-t", "commands"],
|
||||||
stdout=subprocess.PIPE,
|
stdout=subprocess.PIPE,
|
||||||
)
|
)
|
||||||
|
|
||||||
while process.poll():
|
while process.poll():
|
||||||
|
@@ -16,6 +16,7 @@ import bpy
|
|||||||
def get_float(self):
|
def get_float(self):
|
||||||
return self["testprop"]
|
return self["testprop"]
|
||||||
|
|
||||||
|
|
||||||
def set_float(self, value):
|
def set_float(self, value):
|
||||||
self["testprop"] = value
|
self["testprop"] = value
|
||||||
|
|
||||||
@@ -36,6 +37,7 @@ bpy.types.Scene.test_date = bpy.props.StringProperty(get=get_date)
|
|||||||
def get_array(self):
|
def get_array(self):
|
||||||
return (True, self["somebool"])
|
return (True, self["somebool"])
|
||||||
|
|
||||||
|
|
||||||
def set_array(self, values):
|
def set_array(self, values):
|
||||||
self["somebool"] = values[0] and values[1]
|
self["somebool"] = values[0] and values[1]
|
||||||
|
|
||||||
@@ -51,10 +53,12 @@ test_items = [
|
|||||||
("YELLOW", "Red", "", 4),
|
("YELLOW", "Red", "", 4),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
def get_enum(self):
|
def get_enum(self):
|
||||||
import random
|
import random
|
||||||
return random.randint(1, 4)
|
return random.randint(1, 4)
|
||||||
|
|
||||||
|
|
||||||
def set_enum(self, value):
|
def set_enum(self, value):
|
||||||
print("setting value", value)
|
print("setting value", value)
|
||||||
|
|
||||||
@@ -66,16 +70,16 @@ bpy.types.Scene.test_enum = bpy.props.EnumProperty(items=test_items, get=get_enu
|
|||||||
scene = bpy.context.scene
|
scene = bpy.context.scene
|
||||||
|
|
||||||
scene.test_float = 12.34
|
scene.test_float = 12.34
|
||||||
print (scene.test_float)
|
print(scene.test_float)
|
||||||
|
|
||||||
scene.test_array = (True, False)
|
scene.test_array = (True, False)
|
||||||
print ([x for x in scene.test_array])
|
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)
|
print(scene.test_date)
|
||||||
|
|
||||||
scene.test_enum = 'BLUE'
|
scene.test_enum = 'BLUE'
|
||||||
print (scene.test_enum)
|
print(scene.test_enum)
|
||||||
|
|
||||||
|
|
||||||
# >>> 12.34000015258789
|
# >>> 12.34000015258789
|
||||||
|
@@ -113,7 +113,6 @@ def main():
|
|||||||
fsrc.close()
|
fsrc.close()
|
||||||
del fsrc
|
del fsrc
|
||||||
|
|
||||||
|
|
||||||
# namespace hack
|
# namespace hack
|
||||||
vars = (
|
vars = (
|
||||||
"BMO_OP_SLOT_ELEMENT_BUF",
|
"BMO_OP_SLOT_ELEMENT_BUF",
|
||||||
@@ -191,7 +190,6 @@ def main():
|
|||||||
# print(global_namespace["result"])
|
# print(global_namespace["result"])
|
||||||
blocks_py.append((comment, global_namespace["result"]))
|
blocks_py.append((comment, global_namespace["result"]))
|
||||||
|
|
||||||
|
|
||||||
# ---------------------
|
# ---------------------
|
||||||
# Now convert into rst.
|
# Now convert into rst.
|
||||||
fout = open(OUT_RST, 'w', encoding="utf-8")
|
fout = open(OUT_RST, 'w', encoding="utf-8")
|
||||||
@@ -236,7 +234,6 @@ def main():
|
|||||||
fw("\n")
|
fw("\n")
|
||||||
# -- done
|
# -- done
|
||||||
|
|
||||||
|
|
||||||
# get the args
|
# get the args
|
||||||
def get_args_wash(args, args_index, is_ret):
|
def get_args_wash(args, args_index, is_ret):
|
||||||
args_wash = []
|
args_wash = []
|
||||||
@@ -306,9 +303,12 @@ def main():
|
|||||||
assert(tp_sub is not None)
|
assert(tp_sub is not None)
|
||||||
|
|
||||||
ls = []
|
ls = []
|
||||||
if tp_sub & BM_VERT: ls.append(":class:`bmesh.types.BMVert`")
|
if tp_sub & BM_VERT:
|
||||||
if tp_sub & BM_EDGE: ls.append(":class:`bmesh.types.BMEdge`")
|
ls.append(":class:`bmesh.types.BMVert`")
|
||||||
if tp_sub & BM_FACE: ls.append(":class:`bmesh.types.BMFace`")
|
if tp_sub & BM_EDGE:
|
||||||
|
ls.append(":class:`bmesh.types.BMEdge`")
|
||||||
|
if tp_sub & BM_FACE:
|
||||||
|
ls.append(":class:`bmesh.types.BMFace`")
|
||||||
assert(ls) # must be at least one
|
assert(ls) # must be at least one
|
||||||
|
|
||||||
if tp_sub & BMO_OP_SLOT_SUBTYPE_ELEM_IS_SINGLE:
|
if tp_sub & BMO_OP_SLOT_SUBTYPE_ELEM_IS_SINGLE:
|
||||||
|
@@ -984,6 +984,7 @@ context_type_map = {
|
|||||||
"world": ("World", False),
|
"world": ("World", False),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def pycontext2sphinx(basepath):
|
def pycontext2sphinx(basepath):
|
||||||
# Only use once. very irregular
|
# Only use once. very irregular
|
||||||
|
|
||||||
@@ -1011,7 +1012,6 @@ def pycontext2sphinx(basepath):
|
|||||||
"sequencer_context_dir",
|
"sequencer_context_dir",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
unique = set()
|
unique = set()
|
||||||
blend_cdll = ctypes.CDLL("")
|
blend_cdll = ctypes.CDLL("")
|
||||||
for ctx_str in context_strings:
|
for ctx_str in context_strings:
|
||||||
|
@@ -34,6 +34,7 @@ import bpy
|
|||||||
|
|
||||||
from . import engine
|
from . import engine
|
||||||
|
|
||||||
|
|
||||||
class CyclesRender(bpy.types.RenderEngine):
|
class CyclesRender(bpy.types.RenderEngine):
|
||||||
bl_idname = 'CYCLES'
|
bl_idname = 'CYCLES'
|
||||||
bl_label = "Cycles Render"
|
bl_label = "Cycles Render"
|
||||||
@@ -68,7 +69,7 @@ class CyclesRender(bpy.types.RenderEngine):
|
|||||||
def view_update(self, context):
|
def view_update(self, context):
|
||||||
if not self.session:
|
if not self.session:
|
||||||
engine.create(self, context.blend_data, context.scene,
|
engine.create(self, context.blend_data, context.scene,
|
||||||
context.region, context.space_data, context.region_data)
|
context.region, context.space_data, context.region_data)
|
||||||
engine.update(self, context.blend_data, context.scene)
|
engine.update(self, context.blend_data, context.scene)
|
||||||
|
|
||||||
def view_draw(self, context):
|
def view_draw(self, context):
|
||||||
@@ -104,4 +105,3 @@ def unregister():
|
|||||||
properties.unregister()
|
properties.unregister()
|
||||||
presets.unregister()
|
presets.unregister()
|
||||||
bpy.utils.unregister_module(__name__)
|
bpy.utils.unregister_module(__name__)
|
||||||
|
|
||||||
|
@@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
# <pep8 compliant>
|
# <pep8 compliant>
|
||||||
|
|
||||||
|
|
||||||
def init():
|
def init():
|
||||||
import bpy
|
import bpy
|
||||||
import _cycles
|
import _cycles
|
||||||
@@ -89,4 +90,3 @@ def available_devices():
|
|||||||
def with_osl():
|
def with_osl():
|
||||||
import _cycles
|
import _cycles
|
||||||
return _cycles.with_osl
|
return _cycles.with_osl
|
||||||
|
|
||||||
|
@@ -18,10 +18,13 @@
|
|||||||
|
|
||||||
# <pep8 compliant>
|
# <pep8 compliant>
|
||||||
|
|
||||||
import bpy, _cycles, os, tempfile
|
import bpy
|
||||||
|
import _cycles
|
||||||
|
|
||||||
|
|
||||||
# compile .osl file with given filepath to temporary .oso file
|
|
||||||
def osl_compile(input_path, report):
|
def osl_compile(input_path, report):
|
||||||
|
"""compile .osl file with given filepath to temporary .oso file"""
|
||||||
|
import tempfile
|
||||||
output_file = tempfile.NamedTemporaryFile(mode='w', suffix=".oso", delete=False)
|
output_file = tempfile.NamedTemporaryFile(mode='w', suffix=".oso", delete=False)
|
||||||
output_path = output_file.name
|
output_path = output_file.name
|
||||||
output_file.close()
|
output_file.close()
|
||||||
@@ -33,9 +36,12 @@ def osl_compile(input_path, report):
|
|||||||
|
|
||||||
return ok, output_path
|
return ok, output_path
|
||||||
|
|
||||||
# compile and update shader script node
|
|
||||||
def update_script_node(node, report):
|
def update_script_node(node, report):
|
||||||
import os, shutil
|
"""compile and update shader script node"""
|
||||||
|
import os
|
||||||
|
import shutil
|
||||||
|
import tempfile
|
||||||
|
|
||||||
if node.mode == 'EXTERNAL':
|
if node.mode == 'EXTERNAL':
|
||||||
# compile external script file
|
# compile external script file
|
||||||
@@ -125,4 +131,3 @@ def update_script_node(node, report):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
return ok
|
return ok
|
||||||
|
|
||||||
|
@@ -105,6 +105,7 @@ enum_tile_order = (
|
|||||||
('BOTTOM_TO_TOP', "Bottom to Top", "Render from bottom to top"),
|
('BOTTOM_TO_TOP', "Bottom to Top", "Render from bottom to top"),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
class CyclesRenderSettings(bpy.types.PropertyGroup):
|
class CyclesRenderSettings(bpy.types.PropertyGroup):
|
||||||
@classmethod
|
@classmethod
|
||||||
def register(cls):
|
def register(cls):
|
||||||
@@ -620,6 +621,7 @@ class CyclesMeshSettings(bpy.types.PropertyGroup):
|
|||||||
del bpy.types.Curve.cycles
|
del bpy.types.Curve.cycles
|
||||||
del bpy.types.MetaBall.cycles
|
del bpy.types.MetaBall.cycles
|
||||||
|
|
||||||
|
|
||||||
class CyclesCurveRenderSettings(bpy.types.PropertyGroup):
|
class CyclesCurveRenderSettings(bpy.types.PropertyGroup):
|
||||||
@classmethod
|
@classmethod
|
||||||
def register(cls):
|
def register(cls):
|
||||||
@@ -742,6 +744,7 @@ class CyclesCurveRenderSettings(bpy.types.PropertyGroup):
|
|||||||
def unregister(cls):
|
def unregister(cls):
|
||||||
del bpy.types.Scene.cycles_curves
|
del bpy.types.Scene.cycles_curves
|
||||||
|
|
||||||
|
|
||||||
class CyclesCurveSettings(bpy.types.PropertyGroup):
|
class CyclesCurveSettings(bpy.types.PropertyGroup):
|
||||||
@classmethod
|
@classmethod
|
||||||
def register(cls):
|
def register(cls):
|
||||||
@@ -778,6 +781,7 @@ class CyclesCurveSettings(bpy.types.PropertyGroup):
|
|||||||
def unregister(cls):
|
def unregister(cls):
|
||||||
del bpy.types.ParticleSettings.cycles
|
del bpy.types.ParticleSettings.cycles
|
||||||
|
|
||||||
|
|
||||||
def register():
|
def register():
|
||||||
bpy.utils.register_class(CyclesRenderSettings)
|
bpy.utils.register_class(CyclesRenderSettings)
|
||||||
bpy.utils.register_class(CyclesCameraSettings)
|
bpy.utils.register_class(CyclesCameraSettings)
|
||||||
|
@@ -946,69 +946,73 @@ class CyclesParticle_PT_textures(CyclesButtonsPanel, Panel):
|
|||||||
slot = part.texture_slots[part.active_texture_index]
|
slot = part.texture_slots[part.active_texture_index]
|
||||||
layout.template_ID(slot, "texture", new="texture.new")
|
layout.template_ID(slot, "texture", new="texture.new")
|
||||||
|
|
||||||
|
|
||||||
class CyclesRender_PT_CurveRendering(CyclesButtonsPanel, Panel):
|
class CyclesRender_PT_CurveRendering(CyclesButtonsPanel, Panel):
|
||||||
bl_label = "Cycles Hair Rendering"
|
bl_label = "Cycles Hair Rendering"
|
||||||
bl_context = "particle"
|
bl_context = "particle"
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
|
scene = context.scene
|
||||||
|
cscene = scene.cycles
|
||||||
psys = context.particle_system
|
psys = context.particle_system
|
||||||
device_type = context.user_preferences.system.compute_device_type
|
device_type = context.user_preferences.system.compute_device_type
|
||||||
experimental = context.scene.cycles.feature_set == 'EXPERIMENTAL' and (context.scene.cycles.device == 'CPU' or device_type == 'NONE')
|
experimental = ((cscene.feature_set == 'EXPERIMENTAL') and (cscene.device == 'CPU' or device_type == 'NONE'))
|
||||||
return CyclesButtonsPanel.poll(context) and experimental and psys
|
return CyclesButtonsPanel.poll(context) and experimental and psys
|
||||||
|
|
||||||
def draw_header(self, context):
|
def draw_header(self, context):
|
||||||
cscene = context.scene.cycles_curves
|
ccscene = context.scene.cycles_curves
|
||||||
self.layout.prop(cscene, "use_curves", text="")
|
self.layout.prop(ccscene, "use_curves", text="")
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
|
|
||||||
scene = context.scene
|
scene = context.scene
|
||||||
cscene = scene.cycles_curves
|
ccscene = scene.cycles_curves
|
||||||
|
|
||||||
layout.active = cscene.use_curves
|
layout.active = ccscene.use_curves
|
||||||
|
|
||||||
layout.prop(cscene, "preset", text="Mode")
|
layout.prop(ccscene, "preset", text="Mode")
|
||||||
|
|
||||||
if cscene.preset == 'CUSTOM':
|
if ccscene.preset == 'CUSTOM':
|
||||||
layout.prop(cscene, "primitive", text="Primitive")
|
layout.prop(ccscene, "primitive", text="Primitive")
|
||||||
|
|
||||||
if cscene.primitive == 'TRIANGLES':
|
if ccscene.primitive == 'TRIANGLES':
|
||||||
layout.prop(cscene, "triangle_method", text="Method")
|
layout.prop(ccscene, "triangle_method", text="Method")
|
||||||
if cscene.triangle_method == 'TESSELLATED_TRIANGLES':
|
if ccscene.triangle_method == 'TESSELLATED_TRIANGLES':
|
||||||
layout.prop(cscene, "resolution", text="Resolution")
|
layout.prop(ccscene, "resolution", text="Resolution")
|
||||||
layout.prop(cscene, "use_smooth", text="Smooth")
|
layout.prop(ccscene, "use_smooth", text="Smooth")
|
||||||
elif cscene.primitive == 'LINE_SEGMENTS':
|
elif ccscene.primitive == 'LINE_SEGMENTS':
|
||||||
layout.prop(cscene, "use_backfacing", text="Check back-faces")
|
layout.prop(ccscene, "use_backfacing", text="Check back-faces")
|
||||||
|
|
||||||
row = layout.row()
|
row = layout.row()
|
||||||
row.prop(cscene, "use_encasing", text="Exclude encasing")
|
row.prop(ccscene, "use_encasing", text="Exclude encasing")
|
||||||
sub = row.row()
|
sub = row.row()
|
||||||
sub.active = cscene.use_encasing
|
sub.active = ccscene.use_encasing
|
||||||
sub.prop(cscene, "encasing_ratio", text="Ratio for encasing")
|
sub.prop(ccscene, "encasing_ratio", text="Ratio for encasing")
|
||||||
|
|
||||||
layout.prop(cscene, "line_method", text="Method")
|
layout.prop(ccscene, "line_method", text="Method")
|
||||||
layout.prop(cscene, "use_tangent_normal", text="Use tangent normal as default")
|
layout.prop(ccscene, "use_tangent_normal", text="Use tangent normal as default")
|
||||||
layout.prop(cscene, "use_tangent_normal_geometry", text="Use tangent normal geometry")
|
layout.prop(ccscene, "use_tangent_normal_geometry", text="Use tangent normal geometry")
|
||||||
layout.prop(cscene, "use_tangent_normal_correction", text="Correct tangent normal for slope")
|
layout.prop(ccscene, "use_tangent_normal_correction", text="Correct tangent normal for slope")
|
||||||
layout.prop(cscene, "interpolation", text="Interpolation")
|
layout.prop(ccscene, "interpolation", text="Interpolation")
|
||||||
|
|
||||||
row = layout.row()
|
row = layout.row()
|
||||||
row.prop(cscene, "segments", text="Segments")
|
row.prop(ccscene, "segments", text="Segments")
|
||||||
row.prop(cscene, "normalmix", text="Ray Mix")
|
row.prop(ccscene, "normalmix", text="Ray Mix")
|
||||||
elif cscene.primitive == 'CURVE_SEGMENTS' or cscene.primitive == 'CURVE_RIBBONS':
|
elif ccscene.primitive in {'CURVE_SEGMENTS', 'CURVE_RIBBONS'}:
|
||||||
layout.prop(cscene, "subdivisions", text="Curve subdivisions")
|
layout.prop(ccscene, "subdivisions", text="Curve subdivisions")
|
||||||
layout.prop(cscene, "use_backfacing", text="Check back-faces")
|
layout.prop(ccscene, "use_backfacing", text="Check back-faces")
|
||||||
|
|
||||||
layout.prop(cscene, "interpolation", text="Interpolation")
|
layout.prop(ccscene, "interpolation", text="Interpolation")
|
||||||
row = layout.row()
|
row = layout.row()
|
||||||
row.prop(cscene, "segments", text="Segments")
|
row.prop(ccscene, "segments", text="Segments")
|
||||||
|
|
||||||
row = layout.row()
|
row = layout.row()
|
||||||
row.prop(cscene, "use_cache", text="Export cache with children")
|
row.prop(ccscene, "use_cache", text="Export cache with children")
|
||||||
if cscene.use_cache:
|
if ccscene.use_cache:
|
||||||
row.prop(cscene, "use_parents", text="Include parents")
|
row.prop(ccscene, "use_parents", text="Include parents")
|
||||||
|
|
||||||
|
|
||||||
class CyclesParticle_PT_CurveSettings(CyclesButtonsPanel, Panel):
|
class CyclesParticle_PT_CurveSettings(CyclesButtonsPanel, Panel):
|
||||||
bl_label = "Cycles Hair Settings"
|
bl_label = "Cycles Hair Settings"
|
||||||
@@ -1016,9 +1020,12 @@ class CyclesParticle_PT_CurveSettings(CyclesButtonsPanel, Panel):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
use_curves = context.scene.cycles_curves.use_curves and context.particle_system
|
scene = context.scene
|
||||||
|
cscene = scene.cycles
|
||||||
|
ccscene = scene.cycles_curves
|
||||||
|
use_curves = ccscene.use_curves and context.particle_system
|
||||||
device_type = context.user_preferences.system.compute_device_type
|
device_type = context.user_preferences.system.compute_device_type
|
||||||
experimental = context.scene.cycles.feature_set == 'EXPERIMENTAL' and (context.scene.cycles.device == 'CPU' or device_type == 'NONE')
|
experimental = cscene.feature_set == 'EXPERIMENTAL' and (cscene.device == 'CPU' or device_type == 'NONE')
|
||||||
return CyclesButtonsPanel.poll(context) and experimental and use_curves
|
return CyclesButtonsPanel.poll(context) and experimental and use_curves
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
@@ -1097,74 +1104,75 @@ def draw_pause(self, context):
|
|||||||
|
|
||||||
|
|
||||||
def get_panels():
|
def get_panels():
|
||||||
|
types = bpy.types
|
||||||
return (
|
return (
|
||||||
bpy.types.RENDER_PT_render,
|
types.RENDER_PT_render,
|
||||||
bpy.types.RENDER_PT_output,
|
types.RENDER_PT_output,
|
||||||
bpy.types.RENDER_PT_encoding,
|
types.RENDER_PT_encoding,
|
||||||
bpy.types.RENDER_PT_dimensions,
|
types.RENDER_PT_dimensions,
|
||||||
bpy.types.RENDER_PT_stamp,
|
types.RENDER_PT_stamp,
|
||||||
bpy.types.SCENE_PT_scene,
|
types.SCENE_PT_scene,
|
||||||
bpy.types.SCENE_PT_audio,
|
types.SCENE_PT_audio,
|
||||||
bpy.types.SCENE_PT_unit,
|
types.SCENE_PT_unit,
|
||||||
bpy.types.SCENE_PT_keying_sets,
|
types.SCENE_PT_keying_sets,
|
||||||
bpy.types.SCENE_PT_keying_set_paths,
|
types.SCENE_PT_keying_set_paths,
|
||||||
bpy.types.SCENE_PT_physics,
|
types.SCENE_PT_physics,
|
||||||
bpy.types.WORLD_PT_context_world,
|
types.WORLD_PT_context_world,
|
||||||
bpy.types.DATA_PT_context_mesh,
|
types.DATA_PT_context_mesh,
|
||||||
bpy.types.DATA_PT_context_camera,
|
types.DATA_PT_context_camera,
|
||||||
bpy.types.DATA_PT_context_lamp,
|
types.DATA_PT_context_lamp,
|
||||||
bpy.types.DATA_PT_context_speaker,
|
types.DATA_PT_context_speaker,
|
||||||
bpy.types.DATA_PT_texture_space,
|
types.DATA_PT_texture_space,
|
||||||
bpy.types.DATA_PT_curve_texture_space,
|
types.DATA_PT_curve_texture_space,
|
||||||
bpy.types.DATA_PT_mball_texture_space,
|
types.DATA_PT_mball_texture_space,
|
||||||
bpy.types.DATA_PT_vertex_groups,
|
types.DATA_PT_vertex_groups,
|
||||||
bpy.types.DATA_PT_shape_keys,
|
types.DATA_PT_shape_keys,
|
||||||
bpy.types.DATA_PT_uv_texture,
|
types.DATA_PT_uv_texture,
|
||||||
bpy.types.DATA_PT_vertex_colors,
|
types.DATA_PT_vertex_colors,
|
||||||
bpy.types.DATA_PT_camera,
|
types.DATA_PT_camera,
|
||||||
bpy.types.DATA_PT_camera_display,
|
types.DATA_PT_camera_display,
|
||||||
bpy.types.DATA_PT_lens,
|
types.DATA_PT_lens,
|
||||||
bpy.types.DATA_PT_speaker,
|
types.DATA_PT_speaker,
|
||||||
bpy.types.DATA_PT_distance,
|
types.DATA_PT_distance,
|
||||||
bpy.types.DATA_PT_cone,
|
types.DATA_PT_cone,
|
||||||
bpy.types.DATA_PT_customdata,
|
types.DATA_PT_customdata,
|
||||||
bpy.types.DATA_PT_custom_props_mesh,
|
types.DATA_PT_custom_props_mesh,
|
||||||
bpy.types.DATA_PT_custom_props_camera,
|
types.DATA_PT_custom_props_camera,
|
||||||
bpy.types.DATA_PT_custom_props_lamp,
|
types.DATA_PT_custom_props_lamp,
|
||||||
bpy.types.DATA_PT_custom_props_speaker,
|
types.DATA_PT_custom_props_speaker,
|
||||||
bpy.types.TEXTURE_PT_clouds,
|
types.TEXTURE_PT_clouds,
|
||||||
bpy.types.TEXTURE_PT_wood,
|
types.TEXTURE_PT_wood,
|
||||||
bpy.types.TEXTURE_PT_marble,
|
types.TEXTURE_PT_marble,
|
||||||
bpy.types.TEXTURE_PT_magic,
|
types.TEXTURE_PT_magic,
|
||||||
bpy.types.TEXTURE_PT_blend,
|
types.TEXTURE_PT_blend,
|
||||||
bpy.types.TEXTURE_PT_stucci,
|
types.TEXTURE_PT_stucci,
|
||||||
bpy.types.TEXTURE_PT_image,
|
types.TEXTURE_PT_image,
|
||||||
bpy.types.TEXTURE_PT_image_sampling,
|
types.TEXTURE_PT_image_sampling,
|
||||||
bpy.types.TEXTURE_PT_image_mapping,
|
types.TEXTURE_PT_image_mapping,
|
||||||
bpy.types.TEXTURE_PT_musgrave,
|
types.TEXTURE_PT_musgrave,
|
||||||
bpy.types.TEXTURE_PT_voronoi,
|
types.TEXTURE_PT_voronoi,
|
||||||
bpy.types.TEXTURE_PT_distortednoise,
|
types.TEXTURE_PT_distortednoise,
|
||||||
bpy.types.TEXTURE_PT_voxeldata,
|
types.TEXTURE_PT_voxeldata,
|
||||||
bpy.types.TEXTURE_PT_pointdensity,
|
types.TEXTURE_PT_pointdensity,
|
||||||
bpy.types.TEXTURE_PT_pointdensity_turbulence,
|
types.TEXTURE_PT_pointdensity_turbulence,
|
||||||
bpy.types.TEXTURE_PT_mapping,
|
types.TEXTURE_PT_mapping,
|
||||||
bpy.types.TEXTURE_PT_influence,
|
types.TEXTURE_PT_influence,
|
||||||
bpy.types.TEXTURE_PT_colors,
|
types.TEXTURE_PT_colors,
|
||||||
bpy.types.PARTICLE_PT_context_particles,
|
types.PARTICLE_PT_context_particles,
|
||||||
bpy.types.PARTICLE_PT_emission,
|
types.PARTICLE_PT_emission,
|
||||||
bpy.types.PARTICLE_PT_hair_dynamics,
|
types.PARTICLE_PT_hair_dynamics,
|
||||||
bpy.types.PARTICLE_PT_cache,
|
types.PARTICLE_PT_cache,
|
||||||
bpy.types.PARTICLE_PT_velocity,
|
types.PARTICLE_PT_velocity,
|
||||||
bpy.types.PARTICLE_PT_rotation,
|
types.PARTICLE_PT_rotation,
|
||||||
bpy.types.PARTICLE_PT_physics,
|
types.PARTICLE_PT_physics,
|
||||||
bpy.types.PARTICLE_PT_boidbrain,
|
types.PARTICLE_PT_boidbrain,
|
||||||
bpy.types.PARTICLE_PT_render,
|
types.PARTICLE_PT_render,
|
||||||
bpy.types.PARTICLE_PT_draw,
|
types.PARTICLE_PT_draw,
|
||||||
bpy.types.PARTICLE_PT_children,
|
types.PARTICLE_PT_children,
|
||||||
bpy.types.PARTICLE_PT_field_weights,
|
types.PARTICLE_PT_field_weights,
|
||||||
bpy.types.PARTICLE_PT_force_fields,
|
types.PARTICLE_PT_force_fields,
|
||||||
bpy.types.PARTICLE_PT_vertexgroups,
|
types.PARTICLE_PT_vertexgroups,
|
||||||
bpy.types.PARTICLE_PT_custom_props,
|
types.PARTICLE_PT_custom_props,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@@ -651,7 +651,7 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but)
|
|||||||
ofsx = 0; //(but->block->panel) ? but->block->panel->ofsx : 0;
|
ofsx = 0; //(but->block->panel) ? but->block->panel->ofsx : 0;
|
||||||
ofsy = 0; //(but->block->panel) ? but->block->panel->ofsy : 0;
|
ofsy = 0; //(but->block->panel) ? but->block->panel->ofsy : 0;
|
||||||
|
|
||||||
rect_fl.xmin = (but->rect.xmin + but->rect.xmax) * 0.5f + ofsx - TIP_BORDER_X;
|
rect_fl.xmin = BLI_rctf_cent_x(&but->rect) + ofsx - TIP_BORDER_X;
|
||||||
rect_fl.xmax = rect_fl.xmin + fontw + TIP_BORDER_X;
|
rect_fl.xmax = rect_fl.xmin + fontw + TIP_BORDER_X;
|
||||||
rect_fl.ymax = but->rect.ymin + ofsy - TIP_BORDER_Y;
|
rect_fl.ymax = but->rect.ymin + ofsy - TIP_BORDER_Y;
|
||||||
rect_fl.ymin = rect_fl.ymax - fonth - TIP_BORDER_Y;
|
rect_fl.ymin = rect_fl.ymax - fonth - TIP_BORDER_Y;
|
||||||
|
@@ -108,7 +108,7 @@ typedef struct TransCon {
|
|||||||
void (*applyVec)(struct TransInfo *t, struct TransData *td, const float in[3], float out[3], float pvec[3]);
|
void (*applyVec)(struct TransInfo *t, struct TransData *td, const float in[3], float out[3], float pvec[3]);
|
||||||
/* Apply function pointer for linear vectorial transformation */
|
/* Apply function pointer for linear vectorial transformation */
|
||||||
/* The last three parameters are pointers to the in/out/printable vectors */
|
/* The last three parameters are pointers to the in/out/printable vectors */
|
||||||
void (*applySize)(struct TransInfo *t, struct TransData *td, float [3][3]);
|
void (*applySize)(struct TransInfo *t, struct TransData *td, float smat[3][3]);
|
||||||
/* Apply function pointer for size transformation */
|
/* Apply function pointer for size transformation */
|
||||||
void (*applyRot)(struct TransInfo *t, struct TransData *td, float vec[3], float *angle);
|
void (*applyRot)(struct TransInfo *t, struct TransData *td, float vec[3], float *angle);
|
||||||
/* Apply function pointer for rotation transformation */
|
/* Apply function pointer for rotation transformation */
|
||||||
|
@@ -26,6 +26,7 @@ import addon_utils
|
|||||||
import sys
|
import sys
|
||||||
import imp
|
import imp
|
||||||
|
|
||||||
|
|
||||||
def disable_addons():
|
def disable_addons():
|
||||||
# first disable all
|
# first disable all
|
||||||
addons = bpy.context.user_preferences.addons
|
addons = bpy.context.user_preferences.addons
|
||||||
|
@@ -56,6 +56,7 @@ modules = (
|
|||||||
("gpu.rst", "gpu", False),
|
("gpu.rst", "gpu", False),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def is_directive_pydata(filepath, directive):
|
def is_directive_pydata(filepath, directive):
|
||||||
if directive.type in {"function", "method", "class", "attribute", "data"}:
|
if directive.type in {"function", "method", "class", "attribute", "data"}:
|
||||||
return True
|
return True
|
||||||
@@ -113,7 +114,6 @@ def module_validate(filepath, mod, mod_name, doctree, partial_ok):
|
|||||||
print(directive_to_str(filepath, directive_child), end=" ")
|
print(directive_to_str(filepath, directive_child), end=" ")
|
||||||
print("rst contains non existing class member %r" % attr_id)
|
print("rst contains non existing class member %r" % attr_id)
|
||||||
|
|
||||||
|
|
||||||
# MODULE member missing from RST ???
|
# MODULE member missing from RST ???
|
||||||
doctree_dict = directive_members_dict(filepath, doctree)
|
doctree_dict = directive_members_dict(filepath, doctree)
|
||||||
for attr in dir(mod):
|
for attr in dir(mod):
|
||||||
|
Reference in New Issue
Block a user