{"title": "Custom property for Dimensions field", "timestamp": 1776090143.206946, "description": "", "author": {"username": "Tcll", "bio": "", "invited": [], "invited_by": "blenderdumbass", "title": "Tcll", "website": "", "mastodon": "", "editsIn": ["forum", "Themes_CSS", "blender_subforum", "reviews"], "css_personal": "VNGAI80AQDKRQAN37YT76RTQS7RWMCQ5QCMZXCVR1ZSR0SRL5I", "avatar": "https://blenderdumbass.org/pictures/user_upload/Tcll/4DP2K5BYTUMUJENP.png", "jami": "", "peertube": "", "activity_pub": {"pub": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAySTPD4VRanttr+yAR/gp\nZ1pyo5fSXxVvYB29BN2terbS31oDhPOK9O0nzMkEEZ7hgarU4fqaMYBV0gOCPcBU\neO7lDVUomWdOqOaIgrqXe0KH6wpn+AwQJ+iJWUkIlb2QMyfY0d202YC+LJ+tY0Is\n/EpCjVcR8rBDXT6ZvniQfb+PhIaCWVspWWU726m3aDksS1kzeZgBzpucP4lKF+mR\n3srEzsN0is1eNRPA7efeEHSBZyV0vvA0wOoYNwHYjwleb1JgRfLvdcb3lZD6StTD\nlQ53KymLUjTZD36ZMg6tkg2kSE5V58l/aRpar8WlVe1THlcq2OXJUnwssK/9kSbX\nSQIDAQAB\n-----END PUBLIC KEY-----\n"}, "css_posts": "VNGAI80AQDKRQAN37YT76RTQS7RWMCQ5QCMZXCVR1ZSR0SRL5I", "url": "https://blenderdumbass.org/account/Tcll"}, "thumbnail": "", "license": "", "views": {"amount": 7, "dates": {"2026-04-13": 2, "2026-04-14": 2, "2026-04-19": 2, "2026-05-12": 1}}, "recording": "", "comments": {"comments": [{"text": "For the context it seems like this is Blender 2.79 and not a modern Blender. Which complicates things since Blender did a lot of changes to the [depsgraph](/articles/upbge_-_what_is_depsgraph__and_how_to_optimize_for_depsgraph_) since that. ", "username": "blenderdumbass", "id": 0, "timestamp": 1776090594.029174}, {"text": "I think the most low-tech solution would be to split the frame and focus one side on the length object. While having like a model of a ruler next to it. ", "username": "blenderdumbass", "id": 1, "timestamp": 1776090642.3560753}, {"text": "c:1\r\n\r\n@blenderdumbass \r\n\r\nlol that reminds me of what I used to do to make outline curves for SVG art (I no longer use this as PyCharm is a better SVG editor capable of proper outlines that don't look polygonal) XD\r\n\r\nyou needed a separate frame just to modify the stroke-width curve, and it got rather insane quite rapidly XD\r\n\r\nboth that and this are ghetto af XD\r\n\r\nfor a makeshift ruler, I'd say you actually don't need much to make that work...\r\n\r\nthe Array object can just have a fixed unit-width  that can easily be tracked, say `0.01` for precision\r\n\r\nthen all you really need is to offset a marker object to the desired length the Array object will extend to\r\n\r\nyou don't even need to have the entire length in view, just a good portion before the marker should be good enough :P\r\n\r\nthough it would still be nice to see the actual number rather than having to flip between object selections to verify accuracy... heh :P", "username": "Tcll", "id": 2, "timestamp": 1776091848.8685763}, {"text": "Figured something out... you can technically stuff a python expression referencing a specific value in the scene.\r\n\r\n```\r\nbpy.data.objects[\"Cube.001\"].dimensions.z\r\n```\r\n\r\nthis is what I put into the driver of cube 1 to make it move to the size of cube 2. And not just scale, but the dimension. But since depsgraph is not particularly great in blender 2.79. It doesn't update automatically.", "username": "blenderdumbass", "id": 3, "timestamp": 1776094094.7790205}, {"text": "Okay. Blender has templates in the Text Editor that spawn example code for how to add functionality. I modified one a bit and got this:\r\n\r\n```\r\nimport bpy\r\n\r\n\r\nclass HelloWorldPanel(bpy.types.Panel):\r\n    \"\"\"Creates a Panel in the Object properties window\"\"\"\r\n    bl_label = \"Size Panel\"\r\n    bl_idname = \"OBJECT_PT_hello\"\r\n    bl_space_type = 'PROPERTIES'\r\n    bl_region_type = 'WINDOW'\r\n    bl_context = \"object\"\r\n\r\n    def draw(self, context):\r\n        layout = self.layout\r\n        row = layout.row()\r\n        row.label(text=\"SIZE IS: \" + str(bpy.data.objects[\"Cube.001\"].dimensions.z))\r\n\r\n\r\ndef register():\r\n    bpy.utils.register_class(HelloWorldPanel)\r\n\r\n\r\ndef unregister():\r\n    bpy.utils.unregister_class(HelloWorldPanel)\r\n\r\n\r\nif __name__ == \"__main__\":\r\n    register()\r\n\r\n```\r\n\r\nIt spawns a little size thingie in the Object properties. And it is updated in real time. Using the example dimensions from \r\nc:3\r\n\r\n![UI Element in action](/pictures/user_upload/blenderdumbass/size_thingie.png)", "username": "blenderdumbass", "id": 4, "timestamp": 1776094523.27322}, {"text": "awesome, that worked perfectly!\r\n\r\nI even multiplied the dimension value by 10 and marked it with `mm` (my grid is unit-accurate to cm, so it works out nicely)\r\n\r\nbut yeah here it is to show: :)\r\n![](/pictures/user_upload/Tcll/NJ5MWBVM4HNY8PFT.png)", "username": "Tcll", "id": 5, "timestamp": 1776121984.0341454}]}, "collections": [], "languages": {}, "hashtags": [], "not_ai_proof": "", "warning": "", "tab": "blender_subforum", "url": "https://blenderdumbass.org/blender_subforum/custom_property_for_dimensions_field", "likes": ["blenderdumbass"]}