Editing BlenderBIM Add-on/BlenderBIM Add-on code examples
From Wiki.OSArch
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
− | |||
− | |||
==Run a script in blender from command line== | ==Run a script in blender from command line== | ||
Blender can run any Python script headlessly. This allows for a lot of automation, which may run on a scheduled time. On Linux or Mac, you can combine this with cron, or use scheduled tasks on Windows. For example, to run the script <code>script.py</code>, just execute: | Blender can run any Python script headlessly. This allows for a lot of automation, which may run on a scheduled time. On Linux or Mac, you can combine this with cron, or use scheduled tasks on Windows. For example, to run the script <code>script.py</code>, just execute: | ||
Line 46: | Line 44: | ||
=Access IFC objects= | =Access IFC objects= | ||
− | Access multiple objects of specific | + | Access multiple objects of specific criterion. |
==Access Elements== | ==Access Elements== | ||
<syntaxhighlight lang="python"> | <syntaxhighlight lang="python"> | ||
Line 57: | Line 55: | ||
=Read object IFC data= | =Read object IFC data= | ||
Examples affect active object only. | Examples affect active object only. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
==Element Storey== | ==Element Storey== | ||
<syntaxhighlight lang="python"> | <syntaxhighlight lang="python"> | ||
Line 112: | Line 100: | ||
prop.string_value = "Hello World !" | prop.string_value = "Hello World !" | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
[[Category:Blender]] [[Category:BlenderBIM Add-on]] | [[Category:Blender]] [[Category:BlenderBIM Add-on]] |