@@ -80,17 +80,18 @@ pub enum RegistryItem {
8080pub struct RustScriptPropDesc {
8181 pub name : & ' static str ,
8282 pub ty : VariantType ,
83+ pub class_name : ClassName ,
8384 pub exported : bool ,
8485 pub hint : PropertyHint ,
8586 pub hint_string : String ,
8687 pub description : & ' static str ,
8788}
8889
8990impl RustScriptPropDesc {
90- pub fn to_property_info ( & self , class_name : & ' static str ) -> RustScriptPropertyInfo {
91+ pub fn to_property_info ( & self ) -> RustScriptPropertyInfo {
9192 RustScriptPropertyInfo {
9293 variant_type : self . ty ,
93- class_name,
94+ class_name : self . class_name ,
9495 property_name : self . name ,
9596 usage : if self . exported {
9697 ( PropertyUsageFlags :: EDITOR | PropertyUsageFlags :: STORAGE ) . ord ( )
@@ -118,12 +119,12 @@ impl RustScriptMethodDesc {
118119 id,
119120 method_name : self . name ,
120121 class_name,
121- return_type : self . return_type . to_property_info ( class_name ) ,
122+ return_type : self . return_type . to_property_info ( ) ,
122123 flags : self . flags . ord ( ) ,
123124 arguments : self
124125 . arguments
125126 . iter ( )
126- . map ( |arg| arg. to_property_info ( class_name ) )
127+ . map ( |arg| arg. to_property_info ( ) )
127128 . collect ( ) ,
128129 description : self . description ,
129130 }
@@ -143,7 +144,7 @@ impl From<RustScriptSignalDesc> for RustScriptSignalInfo {
143144 arguments : value
144145 . arguments
145146 . iter ( )
146- . map ( |arg| arg. to_property_info ( " \0 " ) )
147+ . map ( |arg| arg. to_property_info ( ) )
147148 . collect ( ) ,
148149 description : value. description ,
149150 }
@@ -174,7 +175,7 @@ pub fn assemble_metadata<'a>(
174175 . map ( |class| {
175176 let props = ( class. properties ) ( )
176177 . into_iter ( )
177- . map ( |prop| prop. to_property_info ( class . class_name ) )
178+ . map ( |prop| prop. to_property_info ( ) )
178179 . collect ( ) ;
179180
180181 let methods = methods
@@ -210,7 +211,7 @@ pub fn assemble_metadata<'a>(
210211pub struct RustScriptPropertyInfo {
211212 pub variant_type : VariantType ,
212213 pub property_name : & ' static str ,
213- pub class_name : & ' static str ,
214+ pub class_name : ClassName ,
214215 pub hint : i32 ,
215216 pub hint_string : String ,
216217 pub usage : u64 ,
@@ -222,7 +223,7 @@ impl From<&RustScriptPropertyInfo> for PropertyInfo {
222223 Self {
223224 variant_type : value. variant_type ,
224225 property_name : value. property_name . into ( ) ,
225- class_name : ClassName :: from_ascii_cstr ( value. class_name . as_bytes ( ) ) ,
226+ class_name : value. class_name ,
226227 hint : PropertyHint :: try_from_ord ( value. hint ) . unwrap_or ( PropertyHint :: NONE ) ,
227228 hint_string : value. hint_string . to_godot ( ) ,
228229 usage : PropertyUsageFlags :: try_from_ord ( value. usage )
0 commit comments