Custom properties on Blender objects

Hello,

First of all, great job on the part of Speckle getting Speckle into the wild. I’m just starting Speckle workflow development and it’s an impressive concept that delivers on the project’s underlying concept of versioned geometry transfer.

Round trip workflow currently under development:
Revit - Speckle - Blender - Topologic - gbXML - Analysis - Dynamo: analysis results returned to Revit.

The general workflow concept is functional. The problem the development team has encountered is in setting custom properties on Blender objects that reflect Speckle properties.

Please see the attached image for an example of a Speckle property we would like to transfer to a custom property on Blender objects. ‘Space 2’, the ‘type’ data, would allow us to incorporate a ‘key’ value into gbXML output to facilitate analysis and results transfer by Dynamo back to Revit. Without this kind of definitive ‘key’ value the detailed workflow concept is broken in that the connection to the reference Revit element is lost.

Generally speaking, are custom properties on Blender objects supported at the moment? If so, how do we implement this capability?

Any direction the community might be able to provide would be appreciated.

Best wishes,
Jake Staub

1 Like

Hey Jake, welcome to our forum!

I think that’s possible, but only from python, anyways @izzylys is our blender expert and author of the blender connector, she’ll be able to help you!

Hello Matteo,

Thanks for the welcome to the forum.

Glad to hear that setting properties on Blender objects is possible. It’s a critical path hurdle for the team to clear.

Dr. Wassim Jabi of Topologic who is working the Blender/python side of the problem has established contact with Izzy. A resolution effort is in process.

I will report the result of the resolution effort to the forum at the end of the resolution process.

Best wishes,
Jake

1 Like

I guess you need to get the glazed part out of Revit as well and also convert these to planar objects trying to keep some information. I found that part more difficult then getting the spaces out.

heya @jpstaub & @Wassim_Jabi !

so custom props are supported in blender, but the reason you were not seeing revit custom props on your blender geometry is because those props in your screenshot are on the parent Revit object while the object you see in blender is the child Mesh object. if you were to attach any custom properties to the mesh itself, then they would always come through in blender.

I have just triggered the release a new version of the blender connector (v2.4.3) that will add the parent custom properties to all the child geometry objects. it should be available to download very soon! :rocket:


note that this is a bit of a temporary fix - at the moment the parent props are attached to all child geometry objects of a revit object. i am working on a larger refactor that will combine received objects into multimaterial meshes such that you will only have 1 child geo object per revit object which will get your additional revit props. however, I thought I’d push out this intermediary fix to unblock you guys

5 Likes

Hi Izzy,

Thanks for the explanation as well as responsiveness in working out a better way for the community.

I’m not familiar enough with Speckle to understand how to attach a custom property to the mesh itself with Revit. However, it seems like you have made that an obsolete requirement.

In a mad dash to a solution @Wassim_Jabi built up a collection of Speckle nodes for sverchok on Blender to receive Revit custom properties. These nodes should be posted to github eventually for the Speckle community.

Again, thanks your responsiveness and the workaround.

Best wishes,
Jake

3 Likes

Hello MaxT,

Thanks for your comment.

Eventually we settled on sending Revit Window elements to Speckle as solid Window blocks. Topologic in Blender combines Mass geometry with Window block geometry to form a Cell Complex with Apertures that serves as the basis for forward translation by OpenStudio to gbXML format.

Best wishes,
Jake

1 Like

Thanks Jake, does this meen that you are able to determine what parts of a curtain wall that is transparent as well?

Hi MaxT,

We have not worked with curtain walls to date.

However, based on the way Topologic consumes geometry from Speckle my guess is the strategy at this stage would be to use solids to represent the transparent panels that make up a curtain wall. If your target serialization is gbXML it would probably be best to abstract curtain wall sections to a single block with an area equivalent to the transparent area of a given section of curtain wall.

Best wishes,
Jake

Hello, I am writing here because I just had an ideea related to this topic but on a reversed workflow.
What I would like to see is Speckle being able to read Blender custom properties and other mesh and material properties so that you can have some early project estimating or scheduling when working in a conceptual mesh.
Things like material name and areas/quantity, some sort of basic BIM information that could be built into a Blender object

Also I notice that right now, Area value it is retrieved as Null
image

Hi @Constantinesis, Thanks for your suggestions, I think there’s some interesting potential here.

You’ll be glad to here, I’ve just experimented with area calculation on meshes from Blender, it was a very small change on our end, so I’m happy to include this for our next release (2.13) :grin:

Volume calculation would be a little more difficult to implement, but if it’s useful to you, I can track an issue for it.


On the topic of materials. We do send some material info, including the material name and some basic PBR properties. Was there anything more you were looking for in this regard?

And as far as BIM properties, I may need some more info about exactly what features you are looking for.
Are you wanting something similar to the CAD → BIM Mapping tool we have in the Rhino connector, but for Blender?
Or are you simply looking for any custom properties on blender objects to be sent (in which case, this already works!)

5 Likes

Hi @Jedd ! Nice to see the area feature update.
Ultimately a BIM mapping tool would be perfect but untill then, I was thinking about custom properties that can be embedded into Blender objects and sent to Speckle for scheduling and analysis, etc
Could you give me an example on what it is possible already?

Custom Properties

Right now, any custom properties on a blender object will be attached under the converted speckle object’s properties, like so:

So any properties you add to objects should show up in speckle, and be available to view/filter for in the viewer.

Note, this only works for properties on Objects, we plan on supporting collection custom properties some time soon.


Quick demo of the filtering options available in our viewer.

Here’s a rather fun example of how properties can be filtered in our viewer.
Here I’ve attached a Monkey Age and Monkey Name custom property to these monkeys in Blender. After sending to speckle, using Filter Group, we can see, visualize, and filter for monkeys based on these custom properties (this works for any properties on speckle objects, not just custom properties from blender, and not just for monkeys :monkey: )

Here’s the link, you can try if for your self.


How to add custom properties to Blender Objects:

It’s quite simple to add properties to an object through Blenders UI

If you want to get fancy, you can also do this through a python script. Which you could use to automate applying properties, or run calculations (like volume :wink:) if you have the python skills.

import bpy

#Get object by name
myObject = bpy.data.objects["Cube"]

#Add custom props
myObject["my custom integer"] = 123
myObject["my custom float"] = 0.5
myObject["my custom string"] = "Hello Speckle!"

#Refresh the current view layer to make sure our changes get applied immediatly
bpy.context.view_layer.update()

et voilà

Although note, we only support attaching primitive types, like Float, Integer, Bool and String types (and lists of)


As far as receiving these props in other connectors.
The Excel and Power BI connectors can consume any speckle data. And can enable some powerful scheduling and reporting workflows.

Rhino, Skp, and Revit, I don’t think we support receiving custom properties from Blender. But this is something we could look at supporting.

And hopefully we will eventually have a mapping tool in Blender. But right now, don’t expect to see anything soon. :sweat_smile:

3 Likes

@Jedd Thank you for the detailed explanations !

A post was split to a new topic: Adding custom properties to Speckle objects in BlenderBIM with python

When sending from Revit into Blender, is there a way to have the Revit Custom Parameter values converted into Blender Custom Parameters? I only have a handful of Parameter come from Revit into Blender.
image

Unfortunately, we don’t have functionality to attach Revit parameters onto Blender objects out of the box. Just simple properties that are directly on the objects themselves.

However, @gokermu has showed off a way to pick certain Revit Parameters and attach them as Blender properties via a simple python script that can be added as part of the receiving process in Blender.

With a few tweaks, you can use this script to attach the properties you care about to the blender objects.

2 Likes