本文整理汇总了Python中bpy.props.BoolProperty方法的典型用法代码示例。如果您正苦于以下问题:Python props.BoolProperty方法的具体用法?Python props.BoolProperty怎么用?Python props.BoolProperty使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类bpy.props
的用法示例。
在下文中一共展示了props.BoolProperty方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: SetObjScale
# 需要导入模块: from bpy import props [as 别名]
# 或者: from bpy.props import BoolProperty [as 别名]
def SetObjScale(scn):
bpy.types.Scene.UEObjScale = BoolProperty(
name = "Scale Selected Objects",update = ObjScale_Callback,
description = "True or False?")
scn['UEObjScale'] = ObjScale
return
#-------------------------------------------
#---------SCENE SETTINGS FUNCTIONS----------
#-------------------------------------------
#-------------------------------------------
#---------BATCH RENAME CALLBACKS-----------
#-------------------------------------------
#base name callback
示例2: Animation_UI_Properties
# 需要导入模块: from bpy import props [as 别名]
# 或者: from bpy.props import BoolProperty [as 别名]
def Animation_UI_Properties(scn):
#Show Rig Options
bpy.types.Scene.UE_Show_Rig_Props= BoolProperty(
name = "Show Rig Options",
default=True,
update = UE_Show_Rig_Props_Callback,
description = "Show The options for the RIG")
scn['UE_Show_Rig_Props'] = True
#Show Rig Export Options
bpy.types.Scene.UE_Show_Export_options= BoolProperty(
name = "Show Export Options",
default=False,
update = UE_Show_Export_option_Callback,
description = "Show Export Options for customize the fbx name,folder and scale")
scn['UE_Show_Export_options'] = False
#Rig Callbacks UE_ShowAdvanced_Rig_Prop_Callback
示例3: register
# 需要导入模块: from bpy import props [as 别名]
# 或者: from bpy.props import BoolProperty [as 别名]
def register():
from bpy.types import Scene
from bpy.props import (BoolProperty,
IntProperty,
StringProperty,
)
Scene.pc_pc2_rotx = BoolProperty(default=True, name="Rotx = 90")
Scene.pc_pc2_world_space = BoolProperty(default=True, name="World Space")
Scene.pc_pc2_modifiers = BoolProperty(default=True, name="Apply Modifiers")
Scene.pc_pc2_subsurf = BoolProperty(default=True, name="Turn Off SubSurf")
Scene.pc_pc2_start = IntProperty(default=0, name="Frame Start")
Scene.pc_pc2_end = IntProperty(default=100, name="Frame End")
Scene.pc_pc2_group = StringProperty()
Scene.pc_pc2_folder = StringProperty(default="Set me Please!")
Scene.pc_pc2_exclude = StringProperty(default="*")
bpy.utils.register_module(__name__)
示例4: register
# 需要导入模块: from bpy import props [as 别名]
# 或者: from bpy.props import BoolProperty [as 别名]
def register():
bpy.types.Scene.save_after_render = BoolProperty(
name='Save after render',
default=True,
description='Automatically save rendered images into: //auto_save/')
bpy.types.Scene.save_blend = BoolProperty(
name = 'with .blend',
default=True,
description='Also save .blend file into: //auto_save/')
bpy.types.Scene.auto_save_format = EnumProperty(
name='Auto Save File Format',
description='File Format for the auto saves.',
items={
('PNG', 'png', 'Save as png'),
('JPEG', 'jpg', 'Save as jpg'),
('OPEN_EXR_MULTILAYER', 'exr', 'Save as multilayer exr')},
default='PNG')
bpy.types.Scene.auto_save_subfolders = BoolProperty(
name='subfolder',
default=False,
description='Save into individual subfolders per blend name')
bpy.app.handlers.render_post.append(auto_save_render)
bpy.types.RENDER_PT_render.append(auto_save_UI)
示例5: register
# 需要导入模块: from bpy import props [as 别名]
# 或者: from bpy.props import BoolProperty [as 别名]
def register():
bpy.types.Scene.Clay = BoolProperty(
name='Clay Render',
description='Use Clay Render',
default=False)
bpy.types.Scene.Clay_Pinned = BoolProperty(
name='Clay Pinned',
description='Clay Material Stores',
default=False)
bpy.types.Material.Mat_Clay = bpy.props.BoolProperty(
name='Use as Clay',
description='Use as Clay',
default=False)
bpy.utils.register_class(ClayPinned)
bpy.utils.register_class(CheckClay)
bpy.types.RENDER_PT_render.prepend(draw_clay_render)
bpy.types.MATERIAL_PT_options.append(draw_clay_options)
bpy.types.INFO_HT_header.append(draw_clay_warning)
示例6: Main_UI_Properties
# 需要导入模块: from bpy import props [as 别名]
# 或者: from bpy.props import BoolProperty [as 别名]
def Main_UI_Properties(scn):
#Scene Tools
bpy.types.Scene.UESceneTools = BoolProperty(
name = "Rename Data",
default=False,
update = UE_Scene_Tools_Callback,
description = "Activate the Scene tools")
scn['UESceneTools'] = False
#Rename Tools
bpy.types.Scene.UERenameTools = BoolProperty(
name = "Rename Data",
default=False,
update = UE_Rename_Tools_Callback,
description = "Activate Rename tools")
scn['UERenameTools'] = False
#Export Tools
bpy.types.Scene.UEExportTools = BoolProperty(
name = "Rename Data",
default=False,
update = UE_Export_Tools_Callback,
description = "Activate Export tools")
scn['UEExportTools'] = False
#Animation Tools
bpy.types.Scene.UEAnimationTools = BoolProperty(
name = "Rename Data",
default=False,
update = UE_Animation_Tools_Callback,
description = "Activate Animation tools")
scn['UEAnimationTools'] = False
#-------------------------------------------
#--------STORE SCENE SETTINGS PROPS---------
#-------------------------------------------
#---------------------
#Props Callbacks -----
#---------------------
示例7: register
# 需要导入模块: from bpy import props [as 别名]
# 或者: from bpy.props import BoolProperty [as 别名]
def register():
bpy.utils.register_class(AutoLoftModalOperator)
bpy.utils.register_class(OperatorAutoLoftCurves)
bpy.types.WindowManager.auto_loft = BoolProperty(default=False,
name="Auto Loft",
update=run_auto_loft)
bpy.context.window_manager.auto_loft = False
示例8: init_props
# 需要导入模块: from bpy import props [as 别名]
# 或者: from bpy.props import BoolProperty [as 别名]
def init_props(scene):
scene.muv_props = MUV_Properties()
scene.muv_uvbb_cp_size = FloatProperty(
name="Size",
description="Control Point Size",
default=6.0,
min=3.0,
max=100.0)
scene.muv_uvbb_cp_react_size = FloatProperty(
name="React Size",
description="Size event fired",
default=10.0,
min=3.0,
max=100.0)
scene.muv_uvbb_uniform_scaling = BoolProperty(
name="Uniform Scaling",
description="Enable Uniform Scaling",
default=False)
scene.muv_texproj_tex_magnitude = FloatProperty(
name="Magnitude",
description="Texture Magnitude.",
default=0.5,
min=0.0,
max=100.0)
scene.muv_texproj_tex_image = EnumProperty(
name="Image",
description="Texture Image.",
items=get_loaded_texture_name)
scene.muv_texproj_tex_transparency = FloatProperty(
name="Transparency",
description="Texture Transparency.",
default=0.2,
min=0.0,
max=1.0)
示例9: __init__
# 需要导入模块: from bpy import props [as 别名]
# 或者: from bpy.props import BoolProperty [as 别名]
def __init__(self, brain, bpyNode):
self.brain = brain # type: Brain
self.neurons = self.brain.neurons # type: List[Neuron]
self.inputs = [] # type: List[str] - strings are names of neurons
self.result = None # type: None | ImpulseContainer - Cache for current
self.resultLog = [(0, 0, 0), (0, 0, 0)] # type: List[(int, int, int)]
self.fillOutput = BoolProperty(default=True)
self.bpyNode = bpyNode # type: cm_bpyNodes.LogicNode
self.settings = {} # type: Dict[str, bpy.props.*]
self.dependantOn = [] # type: List[str] - strings are names of neurons
示例10: register
# 需要导入模块: from bpy import props [as 别名]
# 或者: from bpy.props import BoolProperty [as 别名]
def register():
"""TODO Missing documentation"""
# add the drawing status boolean to the window manager
bpy.types.WindowManager.drawing_status = BoolProperty(
default=False,
name='Hide Model Information',
description="Draw additional data visualization for Phobos items in 3D View.",
)
bpy.utils.register_class(DisplayInformationOperator)
示例11: register
# 需要导入模块: from bpy import props [as 别名]
# 或者: from bpy.props import BoolProperty [as 别名]
def register():
"""TODO Missing documentation"""
from bpy.types import WindowManager
from bpy.props import StringProperty, EnumProperty, BoolProperty
WindowManager.modelpreview = EnumProperty(items=getModelListForEnumProperty, name='Model')
WindowManager.category = EnumProperty(items=getCategoriesForEnumProperty, name='Category')
compileModelList()
示例12: invoke
# 需要导入模块: from bpy import props [as 别名]
# 或者: from bpy.props import BoolProperty [as 别名]
def invoke(self, context, event):
self.filepath = context.active_object.RobotEditor.modelMeta.model_folder.replace(" ", "_")
if self.filepath == "":
self.filepath = global_properties.model_name.get(bpy.context.scene).replace(" ", "_")
context.window_manager.fileselect_add(self)
return {'RUNNING_MODAL'}
#
#
# filepath = StringProperty(name="Filename", subtype='FILE_PATH')
# gazebo = BoolProperty(name="Export Gazebo tags", default=True)
#
# package_url = BoolProperty(name="Package URL", default=True)
#
# base_link_name = StringProperty(name="Base link:", default="root_link")
#
# @RDOperator.OperatorLogger
# @RDOperator.Postconditions(ModelSelected, ObjectMode)
# def execute(self, context):
# """
# Code snipped from `<http://stackoverflow.com/questions/1855095/how-to-create-a-zip-archive-of-a-directory>`_
# """
# import zipfile
#
# if os.path.isdir(self.filepath):
# self.logger.debug(self.filepath)
# self.report({'ERROR'}, "No File selected!")
# return {'FINISHED'}
#
# def zipdir(path, ziph):
# # ziph is zipfile handle
# for root, dirs, files in os.walk(path):
# self.logger.debug("%s, %s, %s,", root, dirs, files)
# for file in files:
# file_path = os.path.join(root, file)
# ziph.write(file_path, os.path.relpath(file_path, path))
#
# with tempfile.TemporaryDirectory() as target:
# create_package(self, context, target, self.base_link_name)
#
# with zipfile.ZipFile(self.filepath, 'w') as zipf:
# zipdir(target, zipf)
#
# return {'FINISHED'}
#
# def invoke(self, context, event):
# context.window_manager.fileselect_add(self)
# return {'RUNNING_MODAL'}