当前位置: 首页>>代码示例>>Python>>正文


Python bpy.props方法代码示例

本文整理汇总了Python中bpy.props方法的典型用法代码示例。如果您正苦于以下问题:Python bpy.props方法的具体用法?Python bpy.props怎么用?Python bpy.props使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在bpy的用法示例。


在下文中一共展示了bpy.props方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: ai_properties

# 需要导入模块: import bpy [as 别名]
# 或者: from bpy import props [as 别名]
def ai_properties(self):
        props = {
            "filter": ('STRING', self.filter),
            "mipmap_bias": ('INT', self.mipmap_bias),
            "single_channel": ('BOOL', self.single_channel),
            "start_channel": ('BYTE', self.start_channel),
            "swrap": ('STRING', self.swrap),
            "twrap": ('STRING', self.twrap),
            "sscale": ('FLOAT', self.sscale),
            "tscale": ('FLOAT', self.tscale),
            "sflip": ('BOOL', self.sflip),
            "tflip": ('BOOL', self.tflip),
            "soffset": ('FLOAT', self.soffset),
            "toffset": ('FLOAT', self.toffset),
            "swap_st": ('BOOL', self.swap_st),
            "ignore_missing_textures": ('BOOL', self.swap_st),
        }
        if self.filename:
            props["filename"] = ('STRING', bpy.path.abspath(self.filename))
        if self.uvset:
            props["uvset"] = ('STRING', self.uvset)
        return props 
开发者ID:griffin-copperfield,项目名称:Arnold-For-Blender,代码行数:24,代码来源:nodes.py

示例2: modal

# 需要导入模块: import bpy [as 别名]
# 或者: from bpy import props [as 别名]
def modal(self, context, event):
        if event.type == 'TIMER':
            if not self._thread.is_alive():
                wm = context.window_manager
                props = wm.sketchfab
                terminate(props.filepath)
                if context.area:
                    context.area.tag_redraw()

                # forward message from upload thread
                if not sf_state.report_type:
                    sf_state.report_type = 'ERROR'
                self.report({sf_state.report_type}, sf_state.report_message)

                wm.event_timer_remove(self._timer)
                self._thread.join()
                sf_state.uploading = False
                return {'FINISHED'}

        return {'PASS_THROUGH'} 
开发者ID:Microvellum,项目名称:Fluid-Designer,代码行数:22,代码来源:__init__.py

示例3: update_fpath

# 需要导入模块: import bpy [as 别名]
# 或者: from bpy import props [as 别名]
def update_fpath(self, context):
    global start_up
    start_up=False
    ReadLabel(bpy.context.scene.fpath)
    if Message != "":
        start_up=True
    else:
        typ = bpy.types.Scene
        var = bpy.props
        typ.FromLat = var.FloatProperty(description="From Latitude", min=float(MINIMUM_LATITUDE), max=float(MAXIMUM_LATITUDE), precision=3, default=0.0)
        typ.ToLat = var.FloatProperty(description="To Latitude", min=float(MINIMUM_LATITUDE), max=float(MAXIMUM_LATITUDE), precision=3)
        typ.FromLong = var.FloatProperty(description="From Longitude", min=float(WESTERNMOST_LONGITUDE), max=float(EASTERNMOST_LONGITUDE), precision=3)
        typ.ToLong = var.FloatProperty(description="To Longitude", min=float(WESTERNMOST_LONGITUDE), max=float(EASTERNMOST_LONGITUDE), precision=3)
        typ.Scale = var.IntProperty(description="Scale", min=1, max=100, default=1)
        typ.Magnify = var.BoolProperty(description="Magnify", default=False)


#Import the data and draw the planet 
开发者ID:Microvellum,项目名称:Fluid-Designer,代码行数:20,代码来源:io_import_LRO_Lola_MGS_Mola_img.py

示例4: initialize

# 需要导入模块: import bpy [as 别名]
# 或者: from bpy import props [as 别名]
def initialize():
    global MAXIMUM_LATITUDE, MINIMUM_LATITUDE
    global WESTERNMOST_LONGITUDE, EASTERNMOST_LONGITUDE
    global LINES, LINE_SAMPLES, SAMPLE_BITS, MAP_RESOLUTION
    global OFFSET, SCALING_FACTOR
    global SAMPLE_TYPE, UNIT, TARGET_NAME, RadiusUM, Message
    global start_up

    LINES = LINE_SAMPLES = SAMPLE_BITS = MAP_RESOLUTION = 0
    MAXIMUM_LATITUDE = MINIMUM_LATITUDE = 0.0
    WESTERNMOST_LONGITUDE = EASTERNMOST_LONGITUDE = 0.0
    OFFSET = SCALING_FACTOR = 0.0
    SAMPLE_TYPE = UNIT = TARGET_NAME = RadiusUM = Message = ""
    start_up=True

    bpy.types.Scene.fpath = bpy.props.StringProperty(
        name="Import File ",
        description="Select your img file",
        subtype="FILE_PATH",
        default="",
        update=update_fpath) 
开发者ID:Microvellum,项目名称:Fluid-Designer,代码行数:23,代码来源:io_import_LRO_Lola_MGS_Mola_img.py

示例5: register

# 需要导入模块: import bpy [as 别名]
# 或者: from bpy import props [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__) 
开发者ID:Microvellum,项目名称:Fluid-Designer,代码行数:20,代码来源:oscurart_mesh_cache_tools.py

示例6: save

# 需要导入模块: import bpy [as 别名]
# 或者: from bpy import props [as 别名]
def save(self):
        scn = bpy.context.scene
        cats = set([cat.name for cat in self.cats])
        libpath = bpy.context.scene.matlib.current_library.path
        
        cmd = """
print(30*"+")
import bpy
if not hasattr(bpy.context.scene, "matlib_categories"):
    class EmptyProps(bpy.types.PropertyGroup):
        pass
    bpy.utils.register_class(EmptyProps)
    bpy.types.Scene.matlib_categories = bpy.props.CollectionProperty(type=EmptyProps)
cats = bpy.context.scene.matlib_categories
for cat in cats:
    cats.remove(0)
"""
        for cat in cats:
            cmd += """
cat = cats.add()
cat.name = "%s" """ % cat.capitalize()
        cmd +='''
bpy.ops.wm.save_mainfile(filepath="%s", check_existing=False, compress=True)''' % winpath(libpath)

        return send_command(cmd, "save_categories.py") 
开发者ID:Microvellum,项目名称:Fluid-Designer,代码行数:27,代码来源:__init__.py

示例7: register

# 需要导入模块: import bpy [as 别名]
# 或者: from bpy import props [as 别名]
def register():
    bpy.utils.register_class(CubeMapInfo)
    bpy.utils.register_class(CubeMapSetup)
    bpy.types.Scene.cube_map = bpy.props.PointerProperty(
            name="cube_map",
            type=CubeMapInfo,
            options={'HIDDEN'},
            )

    bpy.utils.register_class(RENDER_PT_cube_map)

    bpy.app.handlers.render_init.append(cube_map_render_init)
    bpy.app.handlers.render_pre.append(cube_map_render_pre)
    bpy.app.handlers.render_post.append(cube_map_render_post)
    bpy.app.handlers.render_cancel.append(cube_map_render_cancel)
    bpy.app.handlers.render_complete.append(cube_map_render_complete) 
开发者ID:Microvellum,项目名称:Fluid-Designer,代码行数:18,代码来源:render_cube_map.py

示例8: register

# 需要导入模块: import bpy [as 别名]
# 或者: from bpy import props [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) 
开发者ID:Microvellum,项目名称:Fluid-Designer,代码行数:23,代码来源:render_clay.py

示例9: execute

# 需要导入模块: import bpy [as 别名]
# 或者: from bpy import props [as 别名]
def execute(self, context):
        props = context.scene.muv_props.texlock
        obj = bpy.context.active_object
        bm = bmesh.from_edit_mesh(obj.data)
        if muv_common.check_version(2, 73, 0) >= 0:
            bm.verts.ensure_lookup_table()
            bm.edges.ensure_lookup_table()
            bm.faces.ensure_lookup_table()

        if not bm.loops.layers.uv:
            self.report(
                {'WARNING'}, "Object must have more than one UV map")
            return {'CANCELLED'}
        uv_layer = bm.loops.layers.uv.verify()

        props.verts_orig = [
            {"vidx": v.index, "vco": v.co.copy(), "moved": False}
            for v in bm.verts if v.select]

        return {'FINISHED'} 
开发者ID:Microvellum,项目名称:Fluid-Designer,代码行数:22,代码来源:muv_texlock_ops.py

示例10: register

# 需要导入模块: import bpy [as 别名]
# 或者: from bpy import props [as 别名]
def register():
    from bpy.types import WindowManager
    from bpy.props import EnumProperty

    WindowManager.lls_tex_previews = EnumProperty(
            items=enum_previews_from_directory_items,
            get=preview_enum_get,
            set=preview_enum_set,
            )
    import bpy.utils.previews
    pcoll = bpy.utils.previews.new()
    pcoll.lls_tex_previews = ()
    pcoll.initiated = False
    pcoll.dir_update_time = os.path.getmtime(directory)

    preview_collections["main"] = pcoll 
开发者ID:leomoon-studios,项目名称:leomoon-lightstudio,代码行数:18,代码来源:light_preview_list.py

示例11: execute

# 需要导入模块: import bpy [as 别名]
# 或者: from bpy import props [as 别名]
def execute(self, context):
        props = context.scene.LLStudio
        index = props.list_index

        props.profile_list.remove(index)

        ''' Delete/Switch Hierarchy stuff '''
        #delete objects from current profile
        obsToRemove = family(context.scene.objects[props.last_empty])
        collectionsToRemove = set()
        for ob in obsToRemove:
            collectionsToRemove.update(ob.users_collection)
            ob.use_fake_user = False
        bpy.ops.object.delete({"selected_objects": obsToRemove}, use_global=True)
        for c in collectionsToRemove:
            if c.name.startswith('LLS_'):
                bpy.data.collections.remove(c)

        # update index
        if index > 0:
            index = index - 1
        props.list_index = index

        return{'FINISHED'} 
开发者ID:leomoon-studios,项目名称:leomoon-lightstudio,代码行数:26,代码来源:light_profiles.py

示例12: register

# 需要导入模块: import bpy [as 别名]
# 或者: from bpy import props [as 别名]
def register():
	for cls in classes:
		bpy.utils.register_class(cls)
	#bpy.types.Scene.trees = bpy.props.PointerProperty(type=TreeSettings)


# Unregister 
开发者ID:3DMish,项目名称:Blender-Add-ons-3DM-Snow,代码行数:9,代码来源:3dm_snow_for_2_80.py

示例13: draw

# 需要导入模块: import bpy [as 别名]
# 或者: from bpy import props [as 别名]
def draw(self, context):
        layout = self.layout

        camera = context.camera
        props = camera.arnold

        col = layout.column()
        col.prop(props, "camera_type")

        layout.prop(props, "exposure")

        col = layout.column()
        col.prop(props, "rolling_shutter")
        col.prop(props, "rolling_shutter_duration")

        col = layout.column()
        col.prop(props, "enable_dof")
        subcol = col.column()
        subcol.enabled = props.enable_dof
        subcol.prop(props, "aperture_size")
        subcol.prop(props, "aperture_blades")
        subcol.prop(props, "aperture_blade_curvature")
        subcol.prop(props, "aperture_rotation")
        subcol.prop(props, "aperture_aspect_ratio")

        col = layout.column()
        col.prop(props, "shutter_start")
        col.prop(props, "shutter_end")
        col.prop(props, "shutter_type")

##
## Object
## 
开发者ID:griffin-copperfield,项目名称:Arnold-For-Blender,代码行数:35,代码来源:ui.py

示例14: register

# 需要导入模块: import bpy [as 别名]
# 或者: from bpy import props [as 别名]
def register():
    bpy.utils.register_class(CreateWritingAnimPanel)
    bpy.utils.register_class(CreateWritingAnimOp)
    bpy.utils.register_class(SeparateSplinesObjsOp)
    bpy.utils.register_class(CreateWritingAnimParams)
    bpy.types.WindowManager.createWritingAnimParams = \
        bpy.props.PointerProperty(type=CreateWritingAnimParams) 
开发者ID:Shriinivas,项目名称:writinganimation,代码行数:9,代码来源:writinganim_2_8.py

示例15: invokeFunction

# 需要导入模块: import bpy [as 别名]
# 或者: from bpy import props [as 别名]
def invokeFunction(self, layout, functionName, text = "", icon = "NONE",
                       description = "", emboss = True, confirm = False, data = None,
                       passEvent = False):
        idName = getInvokeFunctionOperator(description)
        props = layout.operator(idName, text = text, icon = icon, emboss = emboss)
        props.callback = self.newCallback(functionName)
        props.invokeWithData = data is not None
        props.confirm = confirm
        props.data = str(data)
        props.passEvent = passEvent 
开发者ID:hsab,项目名称:GrowthNodes,代码行数:12,代码来源:umog_node.py


注:本文中的bpy.props方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。