@@ -296,27 +296,33 @@ def getMergedValues(self):
296296 # Start with a copy of local values
297297 merged = dict (self .values )
298298
299- # Check if we have a model (guide root)
300- if not hasattr (self , 'model' ) or not self .model :
301- return merged
302-
303- # Check if blueprint is enabled on the main guide
304- if not self .model .hasAttr ("use_blueprint" ):
299+ # Resolve blueprint settings from Maya node (live guide) or from the
300+ # model_options dict injected by set_from_dict (serialized build path).
301+ if hasattr (self , "model" ) and self .model :
302+ # Live guide: read directly from the Maya guide root node.
303+ if not self .model .hasAttr ("use_blueprint" ):
304+ return merged
305+ use_blueprint = self .model .attr ("use_blueprint" ).get ()
306+ blueprint_path = self .model .attr ("blueprint_path" ).get ()
307+ # Per-component local override stored as a Maya attribute.
308+ local_override = False
309+ if self .root and self .root .hasAttr ("blueprint_local_override" ):
310+ local_override = self .root .attr ("blueprint_local_override" ).get ()
311+ elif hasattr (self , "model_options" ):
312+ # Serialized build: values forwarded by Main.set_from_dict.
313+ use_blueprint = self .model_options .get ("use_blueprint" , False )
314+ blueprint_path = self .model_options .get ("blueprint_path" , "" )
315+ # Per-component local override is already in self.values.
316+ local_override = self .values .get ("blueprint_local_override" , False )
317+ else :
305318 return merged
306319
307- use_blueprint = self .model .attr ("use_blueprint" ).get ()
308320 if not use_blueprint :
309321 return merged
310322
311- # Check if local override is enabled for this component
312- if self .root .hasAttr ("blueprint_local_override" ):
313- local_override = self .root .attr ("blueprint_local_override" ).get ()
314- if local_override :
315- # Use local settings
316- return merged
323+ if local_override :
324+ return merged
317325
318- # Get blueprint path
319- blueprint_path = self .model .attr ("blueprint_path" ).get ()
320326 if not blueprint_path :
321327 return merged
322328
0 commit comments