Skip to content

Commit

Permalink
Added all missing VisualServer bindings
Browse files Browse the repository at this point in the history
- Added bindings for multimesh, immediate, skeleton, light, reflection probe, gi probe, lightmap, particles, camera, environment, scenario, instance
- Removed draw and sync, were duplicates of force_* equivalents
- Bumped binders max arguments from 11 to 13
- Wrote some wrappers as not all methods were variant-friendly
  • Loading branch information
Zylann committed Jan 20, 2018
1 parent f5234e7 commit e415fd0
Show file tree
Hide file tree
Showing 5 changed files with 345 additions and 5 deletions.
41 changes: 41 additions & 0 deletions core/class_db.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,47 @@ MethodDefinition D_METHOD(const char *p_name, const char *p_arg1, const char *p_
return md;
}

MethodDefinition D_METHOD(const char *p_name, const char *p_arg1, const char *p_arg2, const char *p_arg3, const char *p_arg4, const char *p_arg5, const char *p_arg6, const char *p_arg7, const char *p_arg8, const char *p_arg9, const char *p_arg10, const char *p_arg11, const char *p_arg12) {

MethodDefinition md;
md.name = StaticCString::create(p_name);
md.args.resize(12);
md.args[0] = StaticCString::create(p_arg1);
md.args[1] = StaticCString::create(p_arg2);
md.args[2] = StaticCString::create(p_arg3);
md.args[3] = StaticCString::create(p_arg4);
md.args[4] = StaticCString::create(p_arg5);
md.args[5] = StaticCString::create(p_arg6);
md.args[6] = StaticCString::create(p_arg7);
md.args[7] = StaticCString::create(p_arg8);
md.args[8] = StaticCString::create(p_arg9);
md.args[9] = StaticCString::create(p_arg10);
md.args[10] = StaticCString::create(p_arg11);
md.args[11] = StaticCString::create(p_arg12);
return md;
}

MethodDefinition D_METHOD(const char *p_name, const char *p_arg1, const char *p_arg2, const char *p_arg3, const char *p_arg4, const char *p_arg5, const char *p_arg6, const char *p_arg7, const char *p_arg8, const char *p_arg9, const char *p_arg10, const char *p_arg11, const char *p_arg12, const char *p_arg13) {

MethodDefinition md;
md.name = StaticCString::create(p_name);
md.args.resize(13);
md.args[0] = StaticCString::create(p_arg1);
md.args[1] = StaticCString::create(p_arg2);
md.args[2] = StaticCString::create(p_arg3);
md.args[3] = StaticCString::create(p_arg4);
md.args[4] = StaticCString::create(p_arg5);
md.args[5] = StaticCString::create(p_arg6);
md.args[6] = StaticCString::create(p_arg7);
md.args[7] = StaticCString::create(p_arg8);
md.args[8] = StaticCString::create(p_arg9);
md.args[9] = StaticCString::create(p_arg10);
md.args[10] = StaticCString::create(p_arg11);
md.args[11] = StaticCString::create(p_arg12);
md.args[12] = StaticCString::create(p_arg13);
return md;
}

#endif

ClassDB::APIType ClassDB::current_api = API_CORE;
Expand Down
2 changes: 2 additions & 0 deletions core/class_db.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ MethodDefinition D_METHOD(const char *p_name, const char *p_arg1, const char *p_
MethodDefinition D_METHOD(const char *p_name, const char *p_arg1, const char *p_arg2, const char *p_arg3, const char *p_arg4, const char *p_arg5, const char *p_arg6, const char *p_arg7, const char *p_arg8, const char *p_arg9);
MethodDefinition D_METHOD(const char *p_name, const char *p_arg1, const char *p_arg2, const char *p_arg3, const char *p_arg4, const char *p_arg5, const char *p_arg6, const char *p_arg7, const char *p_arg8, const char *p_arg9, const char *p_arg10);
MethodDefinition D_METHOD(const char *p_name, const char *p_arg1, const char *p_arg2, const char *p_arg3, const char *p_arg4, const char *p_arg5, const char *p_arg6, const char *p_arg7, const char *p_arg8, const char *p_arg9, const char *p_arg10, const char *p_arg11);
MethodDefinition D_METHOD(const char *p_name, const char *p_arg1, const char *p_arg2, const char *p_arg3, const char *p_arg4, const char *p_arg5, const char *p_arg6, const char *p_arg7, const char *p_arg8, const char *p_arg9, const char *p_arg10, const char *p_arg11, const char *p_arg12);
MethodDefinition D_METHOD(const char *p_name, const char *p_arg1, const char *p_arg2, const char *p_arg3, const char *p_arg4, const char *p_arg5, const char *p_arg6, const char *p_arg7, const char *p_arg8, const char *p_arg9, const char *p_arg10, const char *p_arg11, const char *p_arg12, const char *p_arg13);

#else

Expand Down
2 changes: 1 addition & 1 deletion core/make_binders.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ def make_version(template, nargs, argmax, const, ret):

def run(target, source, env):

versions = 11
versions = 13
versions_ext = 6
text = ""
text_ext = ""
Expand Down
Loading

0 comments on commit e415fd0

Please sign in to comment.