Python bpy.props.IntProperty() Examples
The following are 2
code examples of bpy.props.IntProperty().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
bpy.props
, or try the search function
.
Example #1
Source File: nodes_terrain_analysis_reclassify.py From BlenderGIS with GNU General Public License v3.0 | 6 votes |
def register(): for cls in classes: try: bpy.utils.register_class(cls) except ValueError as e: log.warning('{} is already registered, now unregister and retry... '.format(cls)) bpy.utils.unregister_class(cls) bpy.utils.register_class(cls) #Create uilist collections bpy.types.Scene.uiListCollec = CollectionProperty(type=RECLASS_PG_color) bpy.types.Scene.uiListIndex = IntProperty() #used to store the index of the selected item in the uilist bpy.types.Scene.colorRampPreview = CollectionProperty(type=RECLASS_PG_color_preview) #Add handlers bpy.app.handlers.depsgraph_update_post.append(scene_update) # bpy.types.Scene.analysisMode = EnumProperty( name = "Mode", description = "Choose the type of analysis this material do", items = [('HEIGHT', 'Height', "Height analysis"), ('SLOPE', 'Slope', "Slope analysis"), ('ASPECT', 'Aspect', "Aspect analysis")], update = updateAnalysisMode )
Example #2
Source File: idproperty.py From Blender-WMO-import-export-scripts with GNU General Public License v3.0 | 5 votes |
def register(): for col_name, type_name in SUPPORTED_COLLECTIONS: type = getattr(bpy.types, type_name) type.id = p.IntProperty(name="unique id", get=_create_id_getter(col_name)) counter_name = col_name + "_id_counter" setattr(bpy.types.Scene, counter_name, p.IntProperty(name="unique id counter", default=1)) handlers.load_post.append(load_file) handlers.scene_update_pre.append(load_file_shim)