@@ -86,6 +86,7 @@ def make_property(
8686 # TODO: make an enum default value
8787 skein_property_groups [type_path ] = bpy .props .EnumProperty (
8888 items = items ,
89+ override = {"LIBRARY_OVERRIDABLE" },
8990 )
9091
9192 return skein_property_groups [type_path ]
@@ -104,6 +105,7 @@ def make_property(
104105 annotations ["skein_enum_index" ] = bpy .props .EnumProperty (
105106 name = "variant" ,
106107 items = items ,
108+ override = {"LIBRARY_OVERRIDABLE" },
107109 )
108110
109111 for option in component ["oneOf" ]:
@@ -125,7 +127,10 @@ def make_property(
125127 option
126128 )
127129 if inspect .isclass (property ):
128- annotations [key ] = bpy .props .PointerProperty (type = property )
130+ annotations [key ] = bpy .props .PointerProperty (
131+ type = property ,
132+ override = {"LIBRARY_OVERRIDABLE" },
133+ )
129134 else :
130135 annotations [key ] = property
131136
@@ -171,7 +176,10 @@ def make_property(
171176 component ["properties" ][key ]["type" ]["$ref" ]
172177 )
173178 if inspect .isclass (property ):
174- annotations [key ] = bpy .props .PointerProperty (type = property )
179+ annotations [key ] = bpy .props .PointerProperty (
180+ type = property ,
181+ override = {"LIBRARY_OVERRIDABLE" },
182+ )
175183 else :
176184 annotations [key ] = property
177185
@@ -224,18 +232,22 @@ def make_property(
224232 # print("- component[type]: ", component["type"])
225233 match component ["type" ]:
226234 case "boolean" :
227- return bpy .props .BoolProperty ()
235+ return bpy .props .BoolProperty (
236+ override = {"LIBRARY_OVERRIDABLE" }
237+ )
228238 case "uint" :
229239 match type_path :
230240 case "u8" :
231241 return bpy .props .IntProperty (
232242 min = 0 ,
233243 max = 255 ,
244+ override = {"LIBRARY_OVERRIDABLE" },
234245 )
235246 case "u16" :
236247 return bpy .props .IntProperty (
237248 min = 0 ,
238249 max = 65535 ,
250+ override = {"LIBRARY_OVERRIDABLE" },
239251 )
240252 case "u32" :
241253 return bpy .props .IntProperty (
@@ -244,6 +256,7 @@ def make_property(
244256 # 2^31, not 2^32, so not sure if we can even set
245257 # those numbers from inside blender
246258 # max=4294967295,
259+ override = {"LIBRARY_OVERRIDABLE" },
247260 )
248261 case "u64" :
249262 return bpy .props .IntProperty (
@@ -252,13 +265,15 @@ def make_property(
252265 # 2^31, not 2^32, so not sure if we can even set
253266 # those numbers from inside blender
254267 # max=4294967295,
268+ override = {"LIBRARY_OVERRIDABLE" },
255269 )
256270 case "u128" :
257271 return bpy .props .IntProperty (
258272 min = 0 ,
259273 # blender actually sets the default hard maximum to
260274 # 2^31, not 2^32, so not sure if we can even set
261275 # numbers bigger than this for u128 in Blender
276+ override = {"LIBRARY_OVERRIDABLE" },
262277 )
263278 case "usize" :
264279 return bpy .props .IntProperty (
@@ -267,82 +282,132 @@ def make_property(
267282 # 2^31, not 2^32, so not sure if we can even set
268283 # those numbers from inside blender
269284 # max=4294967295,
285+ override = {"LIBRARY_OVERRIDABLE" },
270286 )
271287 case _:
272288 print ("unknown uint type: " , type_path )
273- return bpy .props .IntProperty (min = 0 , )
289+ return bpy .props .IntProperty (
290+ min = 0 ,
291+ override = {"LIBRARY_OVERRIDABLE" }
292+ )
274293 case "int" :
275294 match type_path :
276295 case "i8" :
277296 return bpy .props .IntProperty (
278297 min = - 128 ,
279298 max = 127 ,
299+ override = {"LIBRARY_OVERRIDABLE" },
280300 )
281301 case "i16" :
282302 return bpy .props .IntProperty (
283303 min = - 32_768 ,
284304 max = 32_767 ,
305+ override = {"LIBRARY_OVERRIDABLE" },
285306 )
286307 case "i32" :
287308 return bpy .props .IntProperty (
288309 min = - 2_147_483_648 ,
289310 max = 2_147_483_647 ,
311+ override = {"LIBRARY_OVERRIDABLE" },
290312 )
291313 case "i64" :
292- return bpy .props .IntProperty ()
314+ return bpy .props .IntProperty (
315+ override = {"LIBRARY_OVERRIDABLE" },
316+ )
293317 case "isize" :
294- return bpy .props .IntProperty ()
318+ return bpy .props .IntProperty (
319+ override = {"LIBRARY_OVERRIDABLE" },
320+ )
295321 case _:
296322 print ("unknown iint type: " , type_path )
297- return bpy .props .IntProperty (min = 0 , )
323+ return bpy .props .IntProperty (
324+ min = 0 ,
325+ override = {"LIBRARY_OVERRIDABLE" },
326+ )
298327 case "float" :
299- return bpy .props .FloatProperty ()
328+ return bpy .props .FloatProperty (
329+ override = {"LIBRARY_OVERRIDABLE" },
330+ )
300331 case "string" :
301- return bpy .props .StringProperty ()
332+ return bpy .props .StringProperty (
333+ override = {"LIBRARY_OVERRIDABLE" },
334+ )
302335 case "object" :
303336 if debug :
304337 print ("component: " , component )
305338 match component ["typePath" ]:
306339 case "core::num::NonZeroU8" :
307- return bpy .props .IntProperty (min = 0 , max = 255 , default = 1 )
340+ return bpy .props .IntProperty (
341+ min = 0 ,
342+ max = 255 ,
343+ default = 1 ,
344+ override = {"LIBRARY_OVERRIDABLE" },
345+ )
308346 case "core::num::NonZeroU16" :
309- return bpy .props .IntProperty (min = 1 , max = 65535 , default = 1 )
347+ return bpy .props .IntProperty (
348+ min = 1 ,
349+ max = 65535 ,
350+ default = 1 ,
351+ override = {"LIBRARY_OVERRIDABLE" },
352+ )
310353 case "core::num::NonZeroU32" :
311- return bpy .props .IntProperty (min = 1 , default = 1 )
354+ return bpy .props .IntProperty (
355+ min = 1 ,
356+ default = 1 ,
357+ override = {"LIBRARY_OVERRIDABLE" },
358+ )
312359 case "core::num::NonZeroU64" :
313- return bpy .props .IntProperty (min = 1 , default = 1 )
360+ return bpy .props .IntProperty (
361+ min = 1 ,
362+ default = 1 ,
363+ override = {"LIBRARY_OVERRIDABLE" },
364+ )
314365 # TODO: prevent 0 from being valid for NonZeroI* values, but how?
315366 case "core::num::NonZeroI8" :
316367 return bpy .props .IntProperty (
317368 min = - 128 ,
318369 max = 127 ,
319- default = 1
370+ default = 1 ,
371+ override = {"LIBRARY_OVERRIDABLE" },
320372 )
321373 case "core::num::NonZeroI16" :
322374 return bpy .props .IntProperty (
323375 min = - 32_768 ,
324376 max = 32_767 ,
325- default = 1
377+ default = 1 ,
378+ override = {"LIBRARY_OVERRIDABLE" },
326379 )
327380 case "core::num::NonZeroI32" :
328381 return bpy .props .IntProperty (
329382 min = - 2_147_483_648 ,
330383 max = 2_147_483_647 ,
331- default = 1
384+ default = 1 ,
385+ override = {"LIBRARY_OVERRIDABLE" },
332386 )
333387 case "core::num::NonZeroI64" :
334- return bpy .props .IntProperty (default = 1 )
388+ return bpy .props .IntProperty (
389+ default = 1 ,
390+ override = {"LIBRARY_OVERRIDABLE" },
391+ )
335392 case "smol_str::SmolStr" :
336- return bpy .props .StringProperty ()
393+ return bpy .props .StringProperty (
394+ override = {"LIBRARY_OVERRIDABLE" },
395+ )
337396 case "alloc::borrow::Cow<str>" :
338- return bpy .props .StringProperty ()
397+ return bpy .props .StringProperty (
398+ override = {"LIBRARY_OVERRIDABLE" },
399+ )
339400 case "avian3d::collision::collider::parry::TrimeshFlags" :
340401 # TODO: What do we do about this. hard coding third-party crate
341402 # primitive Value handling is... not great. Can we figure out
342403 # how to insert this data into the reflection information?
343404 # its opaque intentionally, so really this is a set of checkboxes
344405 # represented as a bitfield and the UI should reflect that.
345- return bpy .props .IntProperty (min = 0 , max = 255 )
406+ return bpy .props .IntProperty (
407+ min = 0 ,
408+ max = 255 ,
409+ override = {"LIBRARY_OVERRIDABLE" },
410+ )
346411 case "core::time::Duration" :
347412 if debug :
348413 print ("core::time::Duration is currently not handled" )
0 commit comments