mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-27 10:51:13 +00:00
Minor fix
This commit is contained in:
@@ -46,6 +46,9 @@ classes = (
|
|||||||
# properties, this is where you tell Blender where they are going to be stored.
|
# properties, this is where you tell Blender where they are going to be stored.
|
||||||
# You might see more advanced registrations happening in other modules.
|
# You might see more advanced registrations happening in other modules.
|
||||||
def register():
|
def register():
|
||||||
|
# Properties are usually stored on bpy.types.Scene when they are something
|
||||||
|
# that affects everything in the project, or bpy.types.Object when they
|
||||||
|
# affect a single BIM element.
|
||||||
bpy.types.Scene.BIMDemoProperties = bpy.props.PointerProperty(type=prop.BIMDemoProperties)
|
bpy.types.Scene.BIMDemoProperties = bpy.props.PointerProperty(type=prop.BIMDemoProperties)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -16,9 +16,24 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with BlenderBIM Add-on. If not, see <http://www.gnu.org/licenses/>.
|
# along with BlenderBIM Add-on. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
# ############################################################################ #
|
||||||
|
|
||||||
|
# Hey there! Welcome to the BlenderBIM Add-on code. Please feel free to reach
|
||||||
|
# out if you have any questions or need further guidance. Happy hacking!
|
||||||
|
|
||||||
|
# ############################################################################ #
|
||||||
|
|
||||||
|
# Every module has a prop.py file to define Blender properties. Any time you
|
||||||
|
# want an interface widget like an input field, dropdown, checkbox, or number
|
||||||
|
# slider, you need a Blender property to store that widget's data. If you want
|
||||||
|
# to store data that will affect the Blender interface, you also need a
|
||||||
|
# property. Properties are stored in the .blend file, so when your user closes
|
||||||
|
# their Blender session, and reopens it, things are how they left it.
|
||||||
|
|
||||||
import bpy
|
import bpy
|
||||||
from blenderbim.bim.prop import StrProperty, Attribute
|
|
||||||
from bpy.types import PropertyGroup
|
from bpy.types import PropertyGroup
|
||||||
|
# Properties have many different data types. We won't use all of them in this
|
||||||
|
# demo module, but this is a list for your reference.
|
||||||
from bpy.props import (
|
from bpy.props import (
|
||||||
PointerProperty,
|
PointerProperty,
|
||||||
StringProperty,
|
StringProperty,
|
||||||
@@ -31,7 +46,15 @@ from bpy.props import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
# All properties must belong in a property group. Usually, you'd have a group
|
||||||
|
# named after your module.
|
||||||
class BIMDemoProperties(PropertyGroup):
|
class BIMDemoProperties(PropertyGroup):
|
||||||
|
# This first property is a string. This means that in the interface, it will
|
||||||
|
# represent a text input field. We can give it a name and a default value.
|
||||||
|
# The name will be the label shown next to the input field in the interface.
|
||||||
name: StringProperty(name="Name", default="New Project Name")
|
name: StringProperty(name="Name", default="New Project Name")
|
||||||
|
# Not all properties need to be shown using their equivalent input widget.
|
||||||
|
# In this case, we can store a message string, but we will never show it as
|
||||||
|
# an input text field in the ui.py.
|
||||||
message: StringProperty(name="Message")
|
message: StringProperty(name="Message")
|
||||||
show_hints: BoolProperty(name="Show Hints", default=False)
|
show_hints: BoolProperty(name="Show Hints", default=False)
|
||||||
|
|||||||
Reference in New Issue
Block a user