@@ -63,7 +63,8 @@ class LoadClip(plugin.NukeLoader):
6363
6464 # option gui
6565 options_defaults = {
66- "start_at_workfile" : True ,
66+ "set_frame_range" : True ,
67+ "start_at_workfile" : False ,
6768 "add_retime" : True ,
6869 "node_type" : "auto" ,
6970 }
@@ -73,6 +74,11 @@ class LoadClip(plugin.NukeLoader):
7374 @classmethod
7475 def get_options (cls , * args ):
7576 return [
77+ BoolDef (
78+ "set_frame_range" ,
79+ label = "Set frame range from version data" ,
80+ default = cls .options_defaults ["set_frame_range" ]
81+ ),
7682 BoolDef (
7783 "start_at_workfile" ,
7884 label = "Start at workfile's start frame" ,
@@ -124,10 +130,12 @@ def load(self, context, name, namespace, options):
124130 filepath = filepath .replace ("\\ " , "/" )
125131 self .log .debug ("_ filepath: {}" .format (filepath ))
126132
127- start_at_workfile = options .get (
133+ start_at_workfile : bool = options .get (
128134 "start_at_workfile" , self .options_defaults ["start_at_workfile" ])
129-
130- add_retime = options .get (
135+ set_frame_range : bool = options .get (
136+ "set_frame_range" , self .options_defaults ["set_frame_range" ]
137+ )
138+ add_retime : bool = options .get (
131139 "add_retime" , self .options_defaults ["add_retime" ])
132140
133141 repre_id = repre_entity ["id" ]
@@ -181,7 +189,7 @@ def load(self, context, name, namespace, options):
181189 version_entity ,
182190 repre_entity
183191 )
184- if first is not None and last is not None :
192+ if set_frame_range and first is not None and last is not None :
185193 self ._set_range_to_node (read_node , first , last )
186194
187195 if start_at_workfile :
@@ -297,6 +305,7 @@ def update(self, container, context):
297305 self .log .debug ("_ filepath: {}" .format (filepath ))
298306
299307 start_at_workfile = "start at" in read_node ['frame_mode' ].value ()
308+ set_frame_range = self .options_defaults ["set_frame_range" ]
300309
301310 add_retime = [
302311 key for key in read_node .knobs ().keys ()
@@ -331,7 +340,7 @@ def update(self, container, context):
331340 version_entity ,
332341 repre_entity
333342 )
334- if first is not None and last is not None :
343+ if set_frame_range and first is not None and last is not None :
335344 self ._set_range_to_node (read_node , first , last )
336345 else :
337346 first = int (read_node ['first' ].value ())
0 commit comments