@@ -132,7 +132,7 @@ def makeNamespacePrefixOverride(module_list):
132132namespace_prefix_override = None
133133
134134# Features to be exported
135- export_enums = False
135+ export_enums = True
136136export_consts = True
137137with_wrapped_functions = True
138138with_default_params = True
@@ -916,7 +916,7 @@ def gen(self, dst_file, src_files, core_bindings):
916916 if ns_name .split ('.' )[0 ] != 'cv' :
917917 continue
918918 for name , enum in sorted (ns .enums .items ()):
919- if not name . endswith ( '.anonymous' ) :
919+ if '.unnamed_' not in name :
920920 name = name .replace ("cv." , "" )
921921 enum_values = []
922922 for enum_val in enum :
@@ -936,7 +936,10 @@ def gen(self, dst_file, src_files, core_bindings):
936936 for ns_name , ns in sorted (self .namespaces .items ()):
937937 if ns_name .split ('.' )[0 ] != 'cv' :
938938 continue
939+ # TODO CALIB_FIX_FOCAL_LENGTH is defined both in cv:: and cv::fisheye
940+ prefix = 'FISHEYE_' if 'fisheye' in ns_name else ''
939941 for name , const in sorted (ns .consts .items ()):
942+ name = prefix + name
940943 # print("Gen consts: ", name, const)
941944 self .bindings .append (const_template .substitute (js_name = name , value = const ))
942945
0 commit comments