本文整理匯總了Python中bpy.props.FloatProperty方法的典型用法代碼示例。如果您正苦於以下問題:Python props.FloatProperty方法的具體用法?Python props.FloatProperty怎麽用?Python props.FloatProperty使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類bpy.props
的用法示例。
在下文中一共展示了props.FloatProperty方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: init_props
# 需要導入模塊: from bpy import props [as 別名]
# 或者: from bpy.props import FloatProperty [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)
示例2: register
# 需要導入模塊: from bpy import props [as 別名]
# 或者: from bpy.props import FloatProperty [as 別名]
def register():
Scene.archipack_progress = FloatProperty(
options={'SKIP_SAVE'},
default=-1,
subtype='PERCENTAGE',
precision=1,
min=-1,
soft_min=0,
soft_max=100,
max=101,
update=update)
Scene.archipack_progress_text = StringProperty(
options={'SKIP_SAVE'},
default="Progress",
update=update)
global info_header_draw
info_header_draw = bpy.types.INFO_HT_header.draw
def info_draw(self, context):
global info_header_draw
info_header_draw(self, context)
if (context.scene.archipack_progress > -1 and
context.scene.archipack_progress < 101):
self.layout.separator()
text = context.scene.archipack_progress_text
self.layout.prop(context.scene,
"archipack_progress",
text=text,
slider=True)
bpy.types.INFO_HT_header.draw = info_draw