fake-bpy-module icon indicating copy to clipboard operation
fake-bpy-module copied to clipboard

CollectionProperty don't have add(),clear(),move() ... mothed

Open 1641585051 opened this issue 1 year ago • 1 comments

IMG_20220807_174554 IMG_20220807_174616

 CollcetionProperty has many motheds ,such as add, clear ,move ...,this have similar motheds to list ,but blender api doc and your fake_module don't defined and declared  them, I don't know what the reason is ?  
 The evidence is in Collection Example ,URL is

"https://docs.blender.org/api/current/bpy.props.htmlhighlight=collectionproperty#bpy.props.CollectionProperty" 'add' method in the example is not found in doc and blender_module ,I found it through python reflection (dict(obj)..) The blender terminal can be passed through a method that the doc and fake_blender_module does not have. Can you please solve this problem?

1641585051 avatar Aug 07 '22 10:08 1641585051

@1641585051

Is there any documentations of the return type of bpy.props.CollectionProperty? We refer the documentation when we generate module.

nutti avatar Aug 11 '22 09:08 nutti

@nutti blender doc has no relevant function description, possibly an oversight of theirs ,but add func does work out in blender's console. of course three are other functions I see. if the parameters and signatures of the function are not documented,there is readlly no way to fix the problem.

I'm just reporting this to you,whitch also relies on blender's official doc fix if it can't be solveld , it will not affect the development of the plugin, However,there will be no hint of this in VSCode

1641585051 avatar Aug 17 '22 01:08 1641585051

@1641585051

I think the document is generated from source/blender/python/intern/bpy_props.c#L3426-L3437.

This is a bit complicated situation because bpy.props.CollectionProperty adds a property to the RNA object not returning a value.

nutti avatar Aug 20 '22 09:08 nutti

@nutti blender c and C plusplus source code I have not studied carefully,if you think you can solve it, then it will be great, beceuse when I see other developers writing code for properties, even if they write the type,they still don't have the hints for these functions

1641585051 avatar Aug 23 '22 15:08 1641585051

I think bpy.props.* does not return bpy.types.*Property because bpy.prop.* is also used for the annotation of the class (internally generates properties and functions, so on). So, it seems difficult to support this feature by changing the document.

nutti avatar Aug 26 '22 12:08 nutti

well,thank you for your work in this regard

1641585051 avatar Aug 27 '22 12:08 1641585051

Due to the technical reason, close this issue. If there is a good method to solve this issue, please let me know.

nutti avatar Aug 28 '22 05:08 nutti