@@ -176,7 +176,7 @@ public abstract class CvmDropdownHelper
176176 var parentPath = GetParentPath ( cvm ) ;
177177
178178 // Skip dropdown if we're in definition contexts
179- if ( IsInDefinitionContext ( parentPath ) )
179+ if ( IsInDefinitionContext ( parentPath , parent . ResolvedData ) )
180180 {
181181 return new Dictionary < string , string > ( ) ; // Return empty to use regular integer editor
182182 }
@@ -253,7 +253,7 @@ public abstract class CvmDropdownHelper
253253 {
254254 // Check if we're in a definition context vs usage context
255255 var parentPath = GetParentPath ( cvm ) ;
256- if ( IsInDefinitionContext ( parentPath ) )
256+ if ( IsInDefinitionContext ( parentPath , parent . ResolvedData ) )
257257 {
258258 return new Dictionary < string , string > ( ) ; // Return empty to use regular integer editor
259259 }
@@ -301,7 +301,7 @@ public abstract class CvmDropdownHelper
301301 {
302302 // Check if we're in a definition context vs usage context
303303 var parentPath = GetParentPath ( cvm ) ;
304- if ( IsInDefinitionContext ( parentPath ) )
304+ if ( IsInDefinitionContext ( parentPath , parent . ResolvedData ) )
305305 {
306306 return new Dictionary < string , string > ( ) ; // Return empty to use regular integer editor
307307 }
@@ -359,7 +359,7 @@ public abstract class CvmDropdownHelper
359359 {
360360 // Check if we're in a definition context vs usage context
361361 var parentPath = GetParentPath ( cvm ) ;
362- if ( IsInDefinitionContext ( parentPath ) )
362+ if ( IsInDefinitionContext ( parentPath , parent . ResolvedData ) )
363363 {
364364 return new Dictionary < string , string > ( ) ; // Return empty to use regular integer editor
365365 }
@@ -397,7 +397,7 @@ public abstract class CvmDropdownHelper
397397 {
398398 // Check if we're in a definition context vs usage context
399399 var parentPath = GetParentPath ( cvm ) ;
400- if ( IsInDefinitionContext ( parentPath ) )
400+ if ( IsInDefinitionContext ( parentPath , parent . ResolvedData ) )
401401 {
402402 return new Dictionary < string , string > ( ) ; // Return empty to use regular integer editor
403403 }
@@ -441,7 +441,7 @@ public abstract class CvmDropdownHelper
441441 {
442442 // Check if we're in a definition context vs usage context
443443 var parentPath = GetParentPath ( cvm ) ;
444- if ( IsInDefinitionContext ( parentPath ) )
444+ if ( IsInDefinitionContext ( parentPath , parent . ResolvedData ) )
445445 {
446446 return new Dictionary < string , string > ( ) ; // Return empty to use regular integer editor
447447 }
@@ -484,7 +484,7 @@ public abstract class CvmDropdownHelper
484484 {
485485 // Check if we're in a definition context vs usage context
486486 var parentPath = GetParentPath ( cvm ) ;
487- if ( IsInDefinitionContext ( parentPath ) )
487+ if ( IsInDefinitionContext ( parentPath , parent . ResolvedData ) )
488488 {
489489 return new Dictionary < string , string > ( ) ; // Return empty to use regular integer editor
490490 }
@@ -527,7 +527,7 @@ public abstract class CvmDropdownHelper
527527 {
528528 // Check if we're in a definition context vs usage context
529529 var parentPath = GetParentPath ( cvm ) ;
530- if ( IsInDefinitionContext ( parentPath ) )
530+ if ( IsInDefinitionContext ( parentPath , parent . ResolvedData ) )
531531 {
532532 return new Dictionary < string , string > ( ) ;
533533 }
@@ -885,7 +885,7 @@ public static bool HasDropdownOptions(ChunkViewModel cvm)
885885 if ( cvm . Name == "id" )
886886 {
887887 var parentPath = GetParentPath ( cvm ) ;
888- if ( IsInDefinitionContext ( parentPath ) )
888+ if ( IsInDefinitionContext ( parentPath , parent . ResolvedData ) )
889889 {
890890 return false ; // Use regular integer editor for definition contexts
891891 }
@@ -1057,7 +1057,7 @@ private static string GetParentPath(ChunkViewModel cvm)
10571057 /// Determines if we're in a definition context where IDs should be editable
10581058 /// vs usage context where dropdowns are helpful
10591059 /// </summary>
1060- private static bool IsInDefinitionContext ( string parentPath )
1060+ private static bool IsInDefinitionContext ( string parentPath , IRedType ? parentType = null )
10611061 {
10621062 // Usage contexts that can be inside definition paths
10631063 var usagePaths = new [ ] { "bodyCinematicAnimSets" , "lipsyncAnimSet" , "dynamicAnimSets" } ;
@@ -1066,6 +1066,13 @@ private static bool IsInDefinitionContext(string parentPath)
10661066 return false ;
10671067 }
10681068
1069+ // Special handling for screenplay store: only scnscreenplayItemId should be editable in definition context
1070+ if ( parentType is scnscreenplayItemId &&
1071+ ( parentPath . Contains ( "screenplayStore.lines" ) || parentPath . Contains ( "screenplayStore.options" ) ) )
1072+ {
1073+ return true ;
1074+ }
1075+
10691076 // Definition contexts where IDs should be directly editable
10701077 var definitionPaths = new [ ]
10711078 {
@@ -1075,9 +1082,7 @@ private static bool IsInDefinitionContext(string parentPath)
10751082 "props" , // Prop definitions
10761083 "workspotInstances" , // Workspot instance definitions
10771084 "effectInstances" , // Effect instance definitions
1078- "effectDefinitions" , // Effect definitions
1079- "screenplayStore.lines" , // Screenplay dialogue line definitions
1080- "screenplayStore.options" // Screenplay choice option definitions
1085+ "effectDefinitions" // Effect definitions
10811086 } ;
10821087
10831088 return definitionPaths . Any ( parentPath . Contains ) ;
0 commit comments